October 9, 2015

Taking CSS to the next level

blue steps Taking CSS to the next level
For a long while, I used CSS to just do little stuff. I’d change the background color of a form field, or do a fancier background image treatment. But, to get my layout right, I’d still fall back to tables. Sometimes, I’d use a hybrid table/css layout. Several layout effects were just too much bother using CSS, so I never really went all the way with it.

This summer, while programming eBookTribe, I finally took it to the next level. That site is completely laid out using semantic markup and organized, logical CSS. I’m so pleased with the result. It is much more maintainable and easily tweaked to fit my designer’s picky eye, not to mention an order of magnitude more accessible to screen readers and assistive technology.

A shot of energy

I learned tons by reading design sites on the net, but the biggest single boost of energy/knowledge was "CSS Mastery: Advanced Web Standards Solutions", by Andy Budd, Simon Collison, and Cameron Moll.

One of the most brilliant techniques, really a breakthrough for me from CSS Mastery, is the technique of highlighting the current page in the nav bar using all CSS. No more need to have the script determine the page and programatically mark the active nav button. Very slick, and very easy to do once I grasped the technique.

[tags]CSS Mastery,web design[/tags]

Google Checkout – Initial Impressions from a developer

shopping cart Google Checkout   Initial Impressions from a developerThis weekend I wrote my first Google Checkout integration module in my favorite language, Python. I didn’t expect much, largely because I am used to the more simple and limited offering from PayPal. I thought the initial offering from Google would be simple, limited, and straightforward.


It goes about as deep as you’d want to go, but almost all the “deep features” are optional. At the easiest, you can simply post a “buy now” button, much like you can do with PayPal. But at the most advanced, you can have complete order flow tracking with multiple order states, split and recurring payments, with tax-tables, zip-code based shipping tables, and a complete coupon system.

Two Levels

At the basic level, you can simply have Google handle taking payment for your shopping cart. You can have line items for each cart item, and a shipping charge. Once the customer buys, you get an email, and you manage the charge request and the shipment status on Google’s site.

That’s what I am doing on eBookTribe for now. Here’s the Django template for an order from that site:

<?xml version="1.0" encoding="UTF-8"?>
<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">
{% for orderitem in cart.orderitems.all %}<item>
<item-name>{{ orderitem.title }}</item-name>
<item-description>{{ orderitem.description }}</item-description>
<unit-price currency="USD">{{ orderitem.price }}</unit-price>
<quantity>{{ orderitem.quantity }}</quantity>
</item>{% endfor %}
{% if edit_url %}<edit-cart-url>{{ edit_url }}</edit-cart-url>{% endif %}
{% if continue_url %}<continue-shopping-url>{{ continue_url }}</continue-shopping-url>{% endif %}

I think that is so clean, almost elegant. The bottom part is support for “continue shopping” and “edit cart” links from Google’s site.

“Level 2″ integration with Google occurs when you give Google a callback url, which must be SSL enabled. Using that callback, Google and your website can communicate regarding status changes, and your site can request card capture, refunds, set shipping status, etc. I’m looking forward to coding this part, but for now, I’m going to launch with just the level 1 integration.


I’ve never been fond of how PayPal forms are so easily modified by customers. All the information is right there in the form, to be manipulated at will. That means that the merchant, me, has to manually verify totals and match it to the order before shipping. Google has a much better solution.

With Google Checkout, you get a merchant ID and key. You convert the shopping cart XML into a base64 representation and post that as one form element, and you post the signed hash for it in another form element. Since your key is private, and visible only on the server side, your customers cannot modify the form prior to submitting it.

An encoded google shopping cart form looks something like this:

<form name="google_form" action="https://sandbox.google.com/cws/v2/Merchant/YOURMERCHANTIDHERE/checkout" method="post">
<input type="hidden" name="cart"
<input type="hidden" name="signature" value="XvnIeUBLq2loVK78RU/+PaqRLXo="/>

<input type="image" name="Google Checkout"
alt="Fast checkout through Google"/>


Google Checkout is quite a bit more difficult to get working initially than PayPal, but much more rewarding. After working with it for only a weekend, I think that PayPal should be quaking in its books. This is one excellent solution, and one that I really look forward to continuing to explore.

[tags]python, google checkout, gcheckout, gbuy, paypal[/tags]

iSale Review

isale shot iSale ReviewLately, I’ve been using iSale to help me list items on eBay using my Mac. I’ve used it enough now that I can give a reasonable review of its functionality.

So far, I’ve listed 10 items using the software. Listing is very straightforward, you simply click on the plus-sign to add a listing, which brings up a blank template. One nice feature is that it automatically brings up the last-used template. After all, once you settle on a template, you are unlikely to want to change very often.

Filling in the template

I simply drag-n-drop pictures from iPhoto to my template. The images are automatically uploaded to your choice of eBay, .mac, or an ftp site when you submit the listing. The program optionally creates a typical eBay "click the thumbnail to enlarge" gallery.

After my images are uploaded, I fill in the title and then click in the various template areas to fill out the template with the "meat" of the listing. This is usually pretty fast, and made even more simple by iSale’s capability to seek out previously used descriptions from eBay and Amazon. Some might find that unethical, luckily I don’t.

I’ve manually edited my favorite template to include my standard terms and conditions. That makes it somewhat faster for me to fill out the template, since it is basically just pictures and a short description at that point.

Filling in the sale data

iSale tries very hard to make the sale data entry process very simple. It preloads all the categories from eBay, so you can narrow into your item’s proper category quickly. It allows you to set all the standard eBay options such as shipment types, gallery, bolding, buy-it-now, reserve price, etc, all from one handy screen. I am constantly using the "scheduled auction" feature, which is simple and accurate. I’ve yet to find anything fail to work properly in this section, which is fairly amazing, if you think about it.

Sale Tracking

While the auction is running, it appears on a dashboard widget with its current bidded price. I thought this was sort of a gimmick at first, but I’m really finding this useful, and much speedier than logging into eBay and looking on my "selling" page.

I haven’t used the shipment helper parts of the program. Honestly, I just noticed them today. I think I’ll try them with the next sale, they might make things a bit more straightforward, automating the shipping receipt for me.



  • The program is strong and mature.
  • It always seems to work properly, and just as expected.
  • It certainly is much faster than manually listing with hand-coded HTML. Why bother hand-coding for a throwaway thing like an auction?
  • The templating system works well
  • The iPhoto integration is a killer feature.
  • The dashboard widget is very useful for tracking auctions.


  • The templates are difficult to edit. I had to guess and experiment to hack in a custom template which was just the way I wanted it, while keeping the iPhoto and text-template-block stuff intact. I acknowledge that this might be described in a document somewhere, but I certainly couldn’t find it.
  • I think the "corkboard" for auctions looks cheesy, and I wish I could turn it off.
  • Summary

    This program is a complete winner for my purposes, I give it an 8 out of 10. If it had an integrated template editor, I’d give it a 10.


Mac software I use every day

cd tilted Mac software I use every dayIn the grand tradition of Daring Fireball I’m going to share my software choices. To keep it short and sweet, this time I’ll limit myself to software I use every day.

Software which is always loaded

These are the ones I almost always have running.

  • Path Finder – Finder done right.
  • Ecto – A great blogging client, which understands that I have several different blogs to update. It is easy to use and gives me exactly the right amount of power for daily use.
  • ITerm – I suppose there are some better shells, but I always end up going back to the trusty multi-tab ITerm.
  • Sciral Consistency – A new addition, this little app keeps me aware of my main tasks, and helps remind me to be “consistent” in doing them on time. It is really quite clever and effective.
  • SSH Agent – Never type your password again on your hosting accounts! I use this more than you could believe. I’m always amazed at how few people know about SSH key agents. Check them out, they are well worth the few minutes to understand.
  • Pastor – Keeps my passwords all organized and secure. I think I may be trying Yojimbo as a more full-featured replacement.
  • ITunes – I don’t know what would ever shake me loose of this killer app.
  • Quicksilver – Geeky, gorgeous, and far far superior to Spotlight for what I need most often. I hate mousing around looking for apps, I want to launch them now with a couple keystrokes. I’ve never seen anything which matches Quicksilver on any other platform. It is a true killer app.
  • Firefox – I program for Firefox, and test in IE/Win and Safari. It is the best practice, since if it works in Firefox it usually isn’t that hard to get it to work in the other two.
  • NeoOffice – Yes it is a memory hog, and it starts slower than molasses. But it works very very well as an office suite. I usually have a word processing document up, and often a spreadsheet.
  • Mail.app – Built-in, multi-account, and not ugly. It wins.

Software I use every day, as needed

  • Carbon Emacs – I am an Emacs-head. I’ve tried TextMate, but didn’t feel the love. Emacs is everything I need a programming editor to be. Plus, I actually like Lisp.
  • Endicia – I reviewed this software a month ago, and I use it every day. I cannot even begin to say how many hours it has saved me preparing shipping labels and (more importantly) allowing me to skip the post office lines.
  • Adobe ImageReady – I used to use Photoshop for everything, but Imageready is smaller for my day-to-day purposes. Mostly what I need to do is resize graphics and possibly lay in a bit of text. ImageReady is more than enough for this, and I really like the “save optimized as” command.
  • VoodooPad – A personal Wiki which is great for capturing ideas and details. I’m considering replacing it with Curio as a more usable way to integrate graphics and handle multiple projects.
  • TextWrangler – Some things aren’t worth booting Emacs, so I end up using the small, fast TextWrangler for them.

[tags]OSX Software[/tags]

Why Rimuhosting is my new VPS provider

net cable Why Rimuhosting is my new VPS providerI’m decided to use Rimuhosting as my new VPS provider. In my last post, I gave a comparison table for the VPS providers that made my short list.

I really spent a long while reading and researching my choices. Please keep in mind that my priorities are almost certainly not yours. For me, Rimuhosting was definitely the best choice. Let me explain my thinking:

First, I made a “gut-level” cut.

No-Go:Anything with less than 148 megs of ram, which had (in my very subjective opinion) a lesser rep, or which had a lame website. Out: Powervps level 0 (memory), VPSLand (spotty rep), XELHosting (clueless, uniformative website), Jaguar Discovery (memory), Liquidweb (Price), Solarweb (memory, rep)

Next: I assigned points based on features.

  • Cost: 5 points for under $40-49, 10 for $30-39, 15 for $20-29.
  • Reputation: 10 points for “great” reputation, as judged by me from reading reviews on other sites.
  • OS: 5 points for Debian
  • VPS: 7 points for Xen
  • Memory: 5 points for 256 megs or better
  • Space: 2 points for 10gigs, 5 points for more
  • Panel: 5 points if included for free
  • Bandwidth: 5 points for greater than 100Gigs
  • Backups: 5 points
  • Scores:

    • Rimuhosting: 37
    • JaguarPC: 34
    • A2B2: 32
    • PowerVPS: 32
    • Hosteasier: 32
    • DEHE: 28
    • ServInt: 27


Endicia for Mac Review, initial impressions

snail Endicia for Mac Review, initial impressionsI’ve been shipping a lot of packages lately. It was a big pain, and now it is not. That’s my basic review of Endicia for Mac.

Manual shipping

When I first started shipping, I’d manually label each package. My handwriting is terrible, so it looked like a retarded monkey wrote the label, and I wasted several bubble-mailers by boneheaded misprinting. It took more time than you might think to label each package. But that time paled next to the time it took to stand in line at the Post Office to mail the things. Ouch.

Automated shipping – the equipment

I purchased a 25-pound USB scale for $85 from Endicia. It works very nicely from within the software. Just put the package on the scale and click “weigh”.

My label printer is a Dymo 400 Turbo from Label city for $109, and I bought a roll of three-part internet postage labels #30387.(Here’s a coupon Endicia for Mac Review, initial impressions) for $15.

It all worked right away on my G5, with no fiddling about, pleasing me greatly.

Endicia Account

To use Endicia, you create an account and pay a monthly fee. I’m using the “premium account” at $15.95 per month. This lets me print unlimited postage, creates customs forms for me, and gives me access to the cheaper-than-USPS Endicia insurance.

Then, I attached a credit card to the account and bought an initial pool of postage. You can add more at any time from the website or from the software itself.

The software

I am pleased to say that the software has performed flawlessly so far. I’ve shipped about a dozen things over the weekend, and been pleasantly surprised at how seamlessly it works.

  • Get an order, copy the address from the confirmation email
  • Paste into Endicia’s address area.
  • Hit validate, this reformats it according to what the post office in that country wants as a standard. (Very helpful indeed.)
  • Select the type of shipping.
  • Click “Weigh”.
  • Put a note in logging area about what this is (so you can look it up later). There is an area for an order number as well.
  • Click print, then confirm on the next page
  • Drop the packages in the bulk-mail bin and the post-office and skip the long, slow lines!


This wonderful, easy-to-use system has cut my shipping time down from 4-5 minutes each to less than 2, and made the drop-off part almost instantaneous. I ship every day, so that alone is saving me 10-30 minutes. Add up all that time savings and you’ll quickly see why this is a complete winner of a setup for me. I rarely give such unreserved recommendations, but so far they’ve really earned it.

[tags]Mac, Endicia, label printing, dymo, usps,reviews,online postage[/tags]

Coding Flow and Techniques

mattock Coding Flow and TechniquesAny programmer will tell you that one of the characteristics of really getting into a programming "flow" is that your mind is completely engaged. I think of it sort of like a stack. I have all these small tasks which need to be accomplished, and which can’t be put off because they’ll block my progress.

So, I stick the current task on the top of the mental stack, and do the little diversion. The diversion might have more diversions which get stacked on top. But pretty much I do them in last-in-first-out order. For example, today I was programming an email confirmation system in Django.

    A stacked task example

  • I was testing my form template, and wanted to make it both pretty and XHTML valid (Stack: 1).
  • To do that, I needed to make a base template which the confirmation forms would extend (task 2).
  • The base template really should use CSS for ease of formatting, and for standards compliance (Stack: 1,2).
  • Oh, but CSS in Django really should be served by the media server, yet I haven’t mapped the media URL on my development server. I should do that now, or else it won’t resolve (Stack: 1,2,3).
  • Start NetInfo Manager, map it (Stack 1,2,3,4-complete).
  • Add the media url domain to Apache as a virtual host (Stack: 1,2,3,5-complete).
  • Bounce apache, test media domain (Stack: 1,2,3,6)
  • Troubleshoot why apache didn’t bounce properly – bad vhost line (Stack 1,2,3,6,7-complete)
  • Bounce apache, test media domain, success (Stack: 1,2,3,6-complete)
  • Test Django CSS from template, hard coding media URL (Stack: 1,2,3,8-complete)
  • Oh, but hard-coding is foolish when the media URL is stored in the settings. Is there a way to use the settings? (Stack: 1,2,3,9)
  • No, but I can write a templatetag. (Stack: 1,2,3,9,10)
  • Lookup template tag docs, write one to do media URLs for me. (Stack: 1,2,3,9,10,11-complete)
  • Test new template tag. (Stack: 1,2,3-complete,9-complete,10-complete)
  • Test base template with new tag. (Stack: 1,2-complete)
  • Test form, extending base template. (Stack: 1-complete)

If you are a programmer, you’ll recognize this style of thinking. If not, and you’ve managed to read this far, perhaps you’ll understand a bit more why we get flustered when people walk up to ask questions. If a programmer is managing a stack of tasks 5 or 6 items deep, it gets easy to lose the thread of what is going on.

I’ve been working for years at getting better about interruptions. I love the flow state, but I think that we programmers make it too fragile when we try to keep everything in our head. The thing is that always seems like you are almost there, so the time to write down anything about your stacked task is a waste of time. I’ve been fighting that tendency, with varying degrees of success.

For quite a while, I’ve been doing this mostly by keeping an engineering notebook. That way I can scribble notes which will – sometimes – lead me back to the path if I get distracted. Today I tried a new technique, which was to use the excellent little app Sidenote for OSX. It is just a little "Sticky" style note taker which lives on the side of your screen. It minimizes when not in use, and it autosaves all the time. That’s a nice bit right there, you don’t even have to think about saving.

Basically, I’ve started using it for two things. 1) To track my "stack" and 2) to track needed/possible future refactorings. I haven’t gotten fully in the habit yet, but I had a six hour long coding-flow session today, and Sidenote was a very helpful part of that. The stack is empty and I have one refactor to do. Plus, I got to code my heart out, which always feels great.
[tags]Sidenote,flow,coding flow,productivity,programming[/tags]

Decent Small Business Accounting Package for Mac? Anyone?

questioning Decent Small Business Accounting Package for Mac?  Anyone?I spent almost the entire afternoon yesterday researching accounting packages for the Mac. There really weren’t that many serious competitors.

The Contenders

QuickBooks Pro 6: I really loathe Intuit, so I start very prejudiced against this package. They did such a terrible job on TurboTax 2005 for Mac, and they actually drove me away from my decade-long use of Quicken with their awful product for the Mac. That said, I am actually thinking of trying this product, mostly because many small-business accountants are comfortable accepting Quickbooks files, and there are a lot of books explaining how to use it. That’s a pretty strong pair of reasons, but I think their Mac products stink so badly that I might have to set it up on a Windows computer, and that’s a whole can of worms right there.

MYOB Accountedge: Much more Mac-friendly, from what I read. Yet sort of quirky, and not highly rated at all by the users at Amazon. It seems like a love/hate rating war at Amazon, actually. I’m thinking that if I do go with a Mac product, I will definitely try this one first, or perhaps its little brother MYOB Firstedge, which is only $99 and can later be upgraded to the full Accountedge product. The problem is that apparently there is no “best practices” book for me to work from when using this software.

Checkmark Multiledger: This is very complete, and from what I read elsewhere, it is favored by many accountants. I think that is because it so bare and to-the-bone. Unfortunately, that makes it not all that useable for me. I don’t want to be an accountant, I just want to run my ecommerce store, and send the books to an accountant who’ll perform his black arts upon them. This is too raw for me. I downloaded the demo and was, to put it mildly, very confused.

Linux Options

I could use sql-ledger, I suppose, but I wasn’t excited by what I saw. It looks like a web version of Multiledger. If I was completely comfortable with accounting, I might like it, but for me at this point in my business career, no.

Gaah, maybe Windows

I really don’t enjoy operating system wars. I usually stay out of them, after making my preferences clear. Suffice to say that I do not like Windows at all, so much so that I’ve managed to avoid programming for Windows for almost five years. Yet the number and quality of choices for Windows accounting software is so much greater.

I’m very interested in Peachtree Complete Accounting 2006, which I read great things about. Or, if I could win a free copy of “Microsoft Office Small Business Accounting 2006 from Startup Nation, I’d happily use it. I just don’t want to pay them money for their software.

This is a big decision, and it will have a big impact on my company, whatever I choose. I’ve got more research to do, I think. At the least I need to talk with other small business owners or accountants to get their recommendations.