Introducing the 'Common Lisp Objection System'

braces... you know, like lisp

Start by using miscategorisation as an objection strategy:

"Lisp is only for AI."

Quickly move on to Common Syntactical Objections:

"Lisp is ugly, Betty! Those terrible braces!"

Try the Turing-tarpit objection:

"I can do everything I need without using lisp."

Try the market-forces objection:

"If lisp is great, then everyone would already be using it."

If all else fails: try an ad hominem attack:

"Lisp is only for smug lisp weenies."

Finally... give in...

embrace the lambda.

(While i'm still dabbling in scheme on my daily commute, and pondering the truth about lisp, I'm not yet a smug lisp weenie myself. But I mis-read the name 'Common Lisp Object System' as 'Common Lisp Objection System' and thought it sounded like a nice title.)

 

TimeSnapper -- Feature Comparison

We've finally posted up a Feature Comparison Chart for TimeSnapper that tells you the difference between the 'free' and 'professional' editions.

This is something we didn't create at first (at first there was only a free version!) and it's something that will take continual maintenance as the professional edition pulls further ahead...

Hopefully some people will find it useful.

Remember I'm no graphic designer -- so anyone with suggestions for making that page look nicer, please speak up...

The next version is being actively developed (as always). Crunch time is approaching, it should be available soon.

I was absolutely saved by the OCR extraction feature this week when I lost my "ToDo.txt" file at work.

This is the file that acts as a workbench for all my text manipulation, hosts countless drafts of code snippets and ideas, and at the top of the file is my daily activity log.

I don't back it up onto work servers because it's such a personal document... yet as i discovered this week, it's one of my most valuable digital assets.

By the way -- have you seen that site: Todotxt.com, maintained by one of my favourite people, Gina Trapani (chief hacker behind life hacker). When I find that extra day of the week (Unday, between sunday and monday) I'll spend it writing some powershell scripts for todo.txt management.

 

An Open Letter To Scott Guthrie.

the famous yellow screen of death

(I saw someone else write one of these -- so i thought i'd give it a go)

Listen Here Scott!

I have an idea that might help microsoft overtake google for online ad revenue.

Why not place text-based advertisements on the default 'yellow screen of death' error page that comes with asp.net.

Just little one-liners, right down the bottom of the page, are all you'd need, something like this:

I know many companies that would pay a premium to be included on such oft-visited pages.

Say there are 100 million asp.net sites, visited 10000 times a day each, erroring just 0.01 percent of the time, that's 100 million impressions per day!

Slip a few bugs in the next release of asp.net -- you could easily push it up over a billion impressions per day!

I don't ask much. The usual 30% commission will suffice.

take care,
lb

(image snaffled from coding horror. Ta Jeff!)

 

Zombie-Friendly Pick-To-Light Home Kitchen

The new father is a walking zombie. mornings are the worst -- i'm a stumbling dribbling dementia patient.

Confession continues...

I get up in the morning and i make breakfast for the wife and i, but i'm fast asleep at the time. i wander back and forth in the kitchen, open the fridge and forget what i'm after.

I pick up the milk, walk across the kitchen, walk back to the fridge and put the milk back with ever using it. I take it out again, put milk in my coffee, put it back in the fridge before i've put milk on my cereal.

Waiting for the kettle to boil i fall asleep in the lounge room, wake up to find one of my shoes in the freezer, my watch is missing, i stagger around, uncertain where it is... i put off shaving for another day, put on a four minute timer to have a shower (there's a water crisis in brisbane) then fall asleep standing up.

My real wish is that i'd have a domestic robot to perform repetive little inane tasks for me, giving me just one more minute to sleep. but domestic robots cost too much.

In warehouses they use something called "pick to light" systems, so they can employ human zombies to perform simple tasks, without buying expensive robots.

"In a typical Pick to Light system, the operator scans a bar-coded address label attached to a shipper, carton, or tote box. Digital displays located in front of each pick bin tell the operator which SKUs to pick and how many."

(from here)

Every morning in this foggy state I vaguely wish for a Pick-to-light system in my kitchen.

First a light goes on in front of the kettle. So I pick up the kettle.

Now a light goes on at the tap -- so i walk to the tap and fill the kettle (still fast asleep)

A light goes on back where the kettle goes -- so i walk back with it and plug it in, set it to boil.

Now a light goes on where the cereal bowls are kept. I take them out. A light goes on above the cutlery drawer -- i open it and a little screen tells me -- "two teaspoons, two table spoons". I take them out. The fridge begins to blink "milk", i go and get the milk. a light blinks above the sugar bowl... and so on for twenty more steps.

Final step: a light goes on in my head. It's time to wake up for the day.

Of course, for any of this to work i'd still have to put things back when i'm done with them. i'm a "managed-runtime" developer -- we don't believe in manually deallocating the resources we acquire. so i need an automatic garbage collector to return the items to their rightful place when i'm done with them. my wife isn't willing to take on the responsibility. i'm sure not. maybe i can train the baby to put things away for daddy. clean up your toys, put away dad's empty beer cans, there's a good kid. who knows.

~~~~~~zombie dad.

(p.s. see also -- kitchen kan-ban, Why you need a domestic robot, Where's my damn robot and The Ezy Fridge)

(p.p.s. new idea: for every item in the house, attach a piece of string with the other end fixed to the item's 'home position'. Then, to find an item, just go to home position and pull on the string. This would be perfect!)

(p^3.s i gave a lecture on Zen Buddhism for Amputees but only one guy turned up to hear me speak. it went well. i got a standing ovation and the room was filled with the sound of one hand clapping.)

 

Are We There Yet? Using Circles To Measure Progress

progress_chart

There's an old saying (with variations) that says:

"the first 50 percent of a project takes 90 percent of the time and effort;
The remaining 50 percent of the project takes the other 90 percent of the time and effort."

A similarly pessimistic sentiment about project estimation says:

"It always takes longer than you expect - even when you take into account the fact that it will take longer than you expect"

(source anyone? Mythical Man Month?)

You can't use a straight line to plot progress. Instead we make a lot of progress at first. And by the end progress slows to a crawl. But it isn't asymptotic to completion -- completion is eventually achieved.

I tried the simplest equation I know of that has this property -- a circle. (Well a quarter of a circle, to be precise)...

How far through do you feel you are? How far through are you really?

ActualProgress = Sqrt( 100^2 - (100 - ApparentProgress)^2 )

Expected Time versus Actual Time

How To Read The Above Chart

When I think I'm half way there -- I'm not even 20% of the way there.

When I think I'm 99.5% of the way there -- sorry but that last half of a percent takes ten percent of the total time.

When I feel like I'm 87% of the way there --- I'm really only half way there.

When I feel like I'm 90% of the way there --- I'm not even 60% of the way there.

Anyway -- this was all just an exercise in dodgy-hand-waving-mathematics, but I like it. Don't use this formula for drawing up a billion-dollar-space-shuttle-budget, or anything like that.

 

Why Accurate Estimations Are Just Not Possible

Estimating a new feature... it's like a little fish swimming toward you.

little fish

Here comes the little fish.

little fish

Look at the little fish!

little fish

The fish is tiny!

little fish

I can eat this fish! I'll swallow him in one bite!

little fish

Are you sure it's going to be so easy?

little fish

Of course it will be easy! This fish is tiny!

little fish

But you've been wrong before.

little fish

Shut up, voice in my head, this fish is tiny! I'm staring straight at it!

little fish

One bite. Munch! Gone! This will be a cinch! It's hardly a fish! Just a dot! A tiny dot! I'll eat the tiny dot!

little fish

Here comes the fish!

little fish

Wait a second. I'm getting a bad feeling about this.

little fish

It's too late. You're committed now.

little fish

Here's the fish from side on.

little fish in profile

Oh. Damn.

 

Scheming on the Pocket PC

I've temporarily adopted a Pocket PC -- and wanted to do something fun on it.

Some people suggested I download some games... but there are better things than games.

Code! Code is where the fun is.

So I tried to find some tools for Programming on the Pocket PC.

Not programming for the Pocket PC mind you -- I mean I want to sit on the bus or train and write programs on the tiny screen.

There was very little available, or very little I could find. (Got any suggestions?)

One thing I found was very intriguing though -- so I downloaded it immediately:

Pocket Scheme -- a scheme interpreter for the pocket PC.

Scheme is a variant of Lisp (yes... that.) and i've been keen to get further into lisp (or to escape the nonsense ravings of lisp-nut-jobs and the like ;-)) for a while.

Lately this introduction to lisp has been my friend.

The Little Schemer

Within 24 hours of downloading pocket scheme:

  • i'd ordered a copy of 'the little schemer' from amazon
  • i'd decided to purchase my own pocket pc ;-)

As part of dabbling with Scheme while on the train (and without internet access) I decided i needed some Scheme documentation on the Pocket PC. A bit of research told me that 'Teach Yourself Scheme in FixNum days' would suit my needs nicely.

But screen real-estate is expensive on the Pocket PC. And even scrolling is a pain. I worked out that what I really wanted was just the code samples from the book all in one page.

This is where it got fun. I decided to write a powershell script to extract all the code samples and put them into a html file. Any excuse for a bit of powershell ;-)

Here's the basic script:

PS C:\> $webclient = new-object system.net.webclient
PS C:\> 3..23 | %{$page=$webclient.DownloadString("http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-$_.html");"<h2><a href='http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-$_.html'>Chapter $_</a></h2>" >> c:\matches.html;get-matches $page "(<pre .*?/pre>)" >> c:\matches.html }

Oh -- and that also relies on this function, get-matches, which is based on a snippet of Lee Holmes --

Get-Matches

function get-matches (
    [string] $content = "",
    [string] $regex = ""
     )
{
   $returnMatches = new-object System.Collections.ArrayList

   $resultingMatches = [Regex]::Matches($content, $regex, "IgnoreCase,Singleline")
   foreach($match in $resultingMatches)
   {
      [void] $returnMatches.Add($match.Groups[1].Value.Trim())
   }

   $returnMatches
}

The result is almost half a megabyte of lisp examples, in neatly formatted html (zips down to just 23K).

I've written to the author (Dorai Sitaram) to request permission to share the resulting file. I haven't heard back yet -- but if i do, I'll make it available as a download.

Now, about those Games. To increase the WAF, I'll need to find some good games for the pocket PC. Suggestions?

 

Step 3 of 25 -- Design Your Website

At last we've made it to Step 3 of the '25 steps to create your own MicroISV' -- Design your website.

I've had this written for a while, but everything has intervened to slow me down. It turns out my baby girl is damn entertaining and exhausting. I bought a book on Powershell. Work has been unsane. Easter happened. I've been tinkering with Lisp (yes, bloody lisp!), we slipped out a release of TimeSnapper, started packing in features, improvements and bug fixes for the next version like a pair of raving software lunatics, and i've been quietly developing a heap of new million-dollar-ideas to replace the previous pack of duds ;-).

Now where were we? Design a website...

Unfortunately, there's a catch ;-)

Step 3, "Design a Website", needs to be performed after Step 4 -- "Provide Basic Website Content".

Catch is: the best time to perform Step 4 (provide basic website content) is once you've completed Step 3 (designed your website)

That's some catch, Catch-22. It's the best there is.

So I suggest you perform Step 3 and Step 4 more or less together.

And of course, I'll release Step 3 now, but Step 4... you'll have to wait for that ;-)

Here we go.

After visiting thousands of web-sites of ISV's big and small, I've decided that there are two aspects of your website design that far outweight every other aspect put together:

Download and Screenshots. Download and Screenshots. Download and Screenshots.

In an instant, a new visitor to your site should be able to find where to download the software, and where to look at screenshots.

The visitor should be able to tell these things from ten paces away, with their monitor upside down, even if they're illiterate, half drunk, vision-impaired and looking the other way.

(Okay -- if their monitor is upside down they might mistake downloads for uploads, so forget that part).

There must be images, that the eye is drawn to, to indicate each of these things.

And ideally, they should be able to get to these two things from any page of your website.

I'm not going to belabour this point... just take it to heart and assume that if you haven't made your downloads and screenshots extremely obvious then you FAIL! Got that? F-A-I-L. ;-)

Now onto...

How To Design a Website: Don't!

Maybe you've noticed this. Other people have already gone ahead and designed a few websites for you. Several billion of them in fact.

There are thousands of free web templates to pick from -- run a google search for 'free web templates'.

And here's a popular recent article that contains a nice run down of websites that provide free web templates.

I ought to mention some of my preferred places for finding templates:

(I think it's fair to mention that for TimeSnapper we use a design by Andreas Viklund.)

You need to check the license associated with any template you like. Templates can have all sorts of restrictions on them. Some are only usable by non-commercial ventures. Some insist on certain forms of credit. Free templates are non-exclusive, meaning that anyone else is free to use them. (But don't be too afraid of that: fear is the biggest enemy you have to overcome). But do take the time to browse their license.

For example -- here's a note on the license associated with the first template I stumbled onto just now:

BoxedType is a free template from Free CSS Templates released under a Creative Commons Attribution 2.5 License. The photos are from PDPhoto.org.

You're free to use it for both commercial or personal use. I only ask that you link back to my site in some way. Enjoy :)

That's the sort of note you're hoping to find.

And the Template you should pick is...

You need to make your own judgements about how suitable a design is to your particular needs. No-one can prescribe aesthetics. But you should check that the website works under these conditions: in the most common browsers, both with and without javascript.

Once you've downloaded your template of choice, what you usually get is a zip file containing:

  • the license
  • one web page
  • associated Css files
  • associated image files

So it's up to you to work out how to turn this single page into the basis for an entire website. And it's pretty easy to do everything wrong and go completely nuts at this stage. The thing you need to keep in mind is...

Maintenance. It's all about the Maintenance.

In your MicroISV there will be various types of changes you will need to make to your website. And you want to make these changes quick and clean.

I've done something I almost never do at this point -- research! I've written to various other people who run small software companies and found out what sort of changes they've had to make to their site.

Based on this, and my own experience, here's some examples of the types of changes you will make:

  • You decide to change your slogan -- and need to have this reflected on every page
  • You offer a 'special' for a month or so, and want this shown on every page (and later -- not shown)
  • You suddenly realise the copyright notice is two years out of date!
  • You change the name of the file that can be downloaded -- but you've referred to it all over your site!
  • Product features are changed, and frequently asked questions are updated or added
  • Release notes or news items are added.

And a lot of other changes too.

They fall into a few categories:

  • Modify every page at once
  • Add a new page
  • Modify the content of one page
  • Add an item to a page

So you need to find some solution that lets you maintain your site in an easy way.

And yet, this can be the departure point into insanity for a lot of people. It's too easy to think:

Pitfall: Rolling your own CMS.

You're a programmer -- so why not write your own CMS, to manage your little website?

This is such a tempting pitfall and relies on the psychological shortcoming of the invididual. I've made this mistake myself (see https://secretgeek.net/SmartJelly.asp). Basically, writing your own CMS at this point is an enjoyable form of procrastination. It feels like you're making progress -- but deep down you know that you're deliverately delaying the possibility of failure.

So maybe you ought to use someone else's CMS? Think again.

Pitfall: Using an expensive or complex CMS

When I started this chapter I wanted to declare: you don't need any kind of stinking content management system to manage a micro isv website.

I wanted to try and start a new techno-political movement -- the ANTI-CMS movement.

But I try not to trust these old instincts of mine. So I asked around -- and the answer I got back was surprising. Unanimous agreement!

None of the MicroISV's I quizzed were using a content management system -- some didn't even know what a CMS is. They tend to use static html, managed by hand, uploaded from home PC to website via FTP. It seems that for once my instinct is aligned with practice -- a CMS is a waste of time for a Micro ISV.

You only need to focus on the problem at hand. How do I:

  • Modify every page at once
  • Add a new page
  • Modify the content of one page
  • Add an item to a page

To use an agile warcry...

Do the simplest thing that could possibly work

I've got a very minimalist technique that I'm happy with for now. (And there is one other technique you can use an alternative. I'll get to that next.)

The emphasis is absolutely on minimal.

I get the template page, and i cut several parts out of it -- placing them in little files of their own. I then use "server-side-includes" to reuse these chunks on every single page. I cut out the header, the main menu, and the footer.

'Server Side Includes' (SSI) are an old old old web trick. Dinosaurs used to use them before they all became extinct. I'm not suggesting a direct correlation between SSI and the extinction of dinosaurs. By the way.

This isn't the place to describe how SSI works (go and read a decent tutorial... we'll be waiting for you to return). It's sufficient to say this:

  1. You include a chunk of text inside a html page by writing a comment like this:
    <!--#include virtual="headerfile.txt" -->
  2. They are generally ignored, and therefore useless, on files with a ".htm" or ".html" extension. The page that contains the 'include' comment must be a file that is 'parsed' by the server (not just served, like so much text). Hence, your files may need to have a file extension of ".asp" or ".shtml" or ".php" or ".aspx" or even ".chm".

This second one is a very important. So for this reason you have to make all of your files end with something other than plain old 'htm' (or 'html'). You should instead use whatever file extension you're likely to end up needing. (I'll talk more about choosing a file extension in the next article, cause it's a point that requires some educated guesses)

So you need to find the 'header' part of your template, the 'menu' (there might be two or more of these!) and the footer. You then need to place these chunks in little files of their own. And where they used to be, you include a line that says <!--#include virtual="headerfile.txt" --> (assuming 'headerfile.txt' is the name of the file that includes the chunk you are treating as your header.

It takes a little bit of skill, a little bit of theory, and a little bit of practice, to grab the right chunk each time. It's worth getting it right though, because you are trying to avoid doing extra work later on.

You want these included chunks of text to include all the parts that are common on every page -- and to exclude all the parts that are potentially different on every page.

In practice this means you ought to avoid the 'title' tag, and you ought to avoid the meta tags as well.

A different technique

The other way to simplify maintenance, without using a CMS, and without using SSI, it to stick with static html, but to sharpen your skills at using Search and Replace across multiple files at once.

This has the disadvantage that you must have an up to date copy of every web page, downloaded to your local PC before you perform the search and replace. But other than that, it's a pretty slick technique.

To perform the actual 'multi-file' search and replace, you've got a lot of options. You can use a grep-style command. You can use an editor, like TextPad, that lets you search and replace in multiple files at once. You could use perl, batch files, or the exemplary DataBatcher. My preferred technique is (of course) powershell. Just remember to keep it simple.

But Content Precedes Layout (which Precedes Content)

Okay -- now before reading the text above, please make sure you've read the next article -- creating content for your website. Without content there is no purpose in designing a website.

Best of luck!

(Your feedback is of course required. Be critical. Be polite. But be harsh, too.)

Resources:

Some Images for your 'Download' link... (and more here) (note -- respect the copyright of these images.)

(And an amusing example of a website that used an Andreas Viklund template, but didn't think to update the default text -- (scroll to the bottom to read 'Copyright © 2005 Your Name'. ;-)

 

Knuth on Software Patents

And wow -- just when I thought I was sick to death of reading about Software Patents -- check out this quote from Knuth Yes That Knuth:

Congress wisely decided long ago that mathematical things cannot be patented. Surely nobody could apply mathematics if it were necessary to pay a license fee whenever the theorem of Pythagoras is employed. The basic algorithmic ideas that people are now rushing to patent are so fundamental, the result threatens to be like what would happen if we allowed authors to have patents on individual words and concepts. Novelists or journalists would be unable to write stories unless their publishers had permission from the owners of the words. Algorithms are exactly as basic to software as words are to writers, because they are the fundamental building blocks needed to make interesting products. What would happen if individual lawyers could patent their methods of defense, or if Supreme Court justices could patent their precedents?

(from Donald Knuth's Open Letter to the Commissioner of Patents and Trademarks)

Argument by analogy is fiendishly difficult (like using chopsticks to nail spaghetti to a wall?) but Donald does it very well.

 

10 "Million-Dollar-Ideas" from secretGeek.net

Here's a list of some of the ideas i've shared on this site over the past few years -- ideas that haven't gone anywhere, but are still just out there waiting to be picked up and tinkered with.

  1. FTL: Faster than Light -- Functional Text Language
  2. Open Code Sharing
  3. monadRail -- Powershell on Rails
  4. Exec Inline -- run C# or VB.net code inside the IDE
  5. Annotating Your Code with Simple Tests
  6. 3 Examples from the Future of CSS
  7. Cascading File Types
  8. IXML -- a mother language for XML et al (see also seXml: a very dirty little dialect)
  9. KeyTraino: utility that knows all the right keystrokes
  10. XPLT: eXtensible Parser Language Transformations
  11. Some Suggested Add-Ins for Visual Studio.Net
  12. Excel-Lite: Hey coder! This spreadsheet's for you!