Archive Of Blog Entries (March to November 2007)
secretGeek .:dotnuts about dotnet:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Archive of Blog Entries

blog entries from March to November 2007

Tue, 06 Nov 2007 10:48:55 GMT

TimeSnapper Special - 9 More Days

We are extending the special price on TimeSnapper for nine more days.

If you've been dying to buy it -- or meaning to try it -- now is the time.

2 year anniversary special

TimeSnapper is "an automatic screenshot journal" -- it creates a time-lapse movie out of everything you do on your computer. This increases your productivity, helps you create timesheets, helps you recover lost text, helps you retrace your steps, helps with testing, makes you smarter, healthier and more attractive to other people.

Download it. Buy it. Someone even made a youtube movie about it. Now that is success.

A big thank you to the people who've downloaded it or purchased it in the past few weeks. We've put some of your feedback in the testimonials page. Cheers.

Read On...


Fri, 02 Nov 2007 12:01:34 GMT

Your Brain, And the Effects of Syntax Highlighting

Dr. Edward de Bono wrote a little epistle once, on the value of Syntax Highlighting in your IDE.

"You are in a plane that is coming in to land at Heathrow airport in London. The plane passes over several car parks. You say to yourself: 'I am going to notice all the cars coloured red.' You look at the car park and all the cars coloured red jump out to you. Red is a fairly common colour. So you choose 'bright blue'. This colour is much more rare and your eye scans over the cars. Suddenly a bright blue car jumps out of the mass.

"There are two important points about this simple experiment. The first point is that you are giving instructions to your own brain. The second is that you are 'sensitizing' the brain to certain types of input."
Edward De Bono
Textbook of Wisdom

Syntax Highlighting is a mainstay of today's IDE's -- it helps your eyes choose to look at just one thing at a time.

If you want to look at comments, you tune out all but the green writing, for example.

To detect the keywords, you look at the blue writing and only the blue writing.

Query editors were much slower than IDE's at gaining syntax highlighting. So we developed a ritual of typing keywords in UPPER case, so that the eye can separate them more easily.

Some people might argue that syntax highlighting is just a kind of garish cosmetic to distract you from the dire ugliness of the language's syntax. Perhaps if the syntax were perfect, then no highlighting would be needed. Or: the uglier the language, the more desperately it needs cosmetic enhancement from the IDE.

One way to create such ugliness is to combine lots of language in one file. Classic ASP springs to mind.

And in classic ASP, you find some pretty brutal syntax highlighting -- no one's gonna miss those bright yellow <% signs.

Some of the ugliest syntax around is found in Text Templates used for generating code. I don't blame the tools -- it's just the polyglotic nature of code gen.

My favourite codegen tool is CodeSmith -- and, naturally, CodeSmith templates can get fairly ugly.

Here, syntax highlighting is of most importance, and you find the same ultra-bright template delimiters as in ye olde Visual Interdev:

syntax highlighting in codesmith

What i'd like is something cleverer -- some way that let's you separate out the two languages that are intertwined. So that your mind can more easily switch gears between pondering one language and another. I don't know how. ;-)

Recently i've heard of a new spin on syntax highlighting -- in VB 9 you can embed XML statements directly in your code, so called 'XML literals'. These statements are 'lowlighted' instead of 'highlighted:'

Lowlighting as a form of highlighting

Notice (above) how the xml is just slightly faded into the background. Subtle, but interesting.

I tinkered with the settings in CodeSmith to make the template delimiters a little more subtle:

subtler syntax highlighting in codesmith

It's better, but you're limited by the color picker they use, which confines your choice somewhat.

***

CodeSmith's bin folder has a file called ActiproSoftware.SyntaxEditor.dll so i'm guessing they use components from ActiPro Software

(ActiPro: "The core SyntaxEditor control provides a free implementation of C# and Visual Basic that has syntax highlighting, outlining, and several other features.")

(Powershell Analyzer seems to use the same components.)

Wrapping this up -- i found an interesting (though not convincing) argument against syntax highlighting.

Read On...


Thu, 01 Nov 2007 00:12:21 GMT

Which came first... the domain model or the human?

I found this article on dzone (and other places) recently... and just wanted to state my counter counter argument argument. The summary at dzone said:

"Never Start With the Data Model

The best systems start with a domain model and work through the various layers of the system down to the database, not the other way around..."

I have a big distaste for thinking of models (Data or Domain models) as something special, or truthful.

Models are just models... shadows, reflections, abstract thought stuff... they aren't the real thing:

Model makers are liars, simplifiers, beautifiers.

Do you want clothes that only fit models?

Software also shouldn't be built just to suit models.

'Models' are a modern spin on that ridiculous old notion of plato's cave. The folly of which is that you end up bending the people to suit the model.

Build on top of models, sure. But expect the model to need many corrections... factor that into your process.

(Breaking news on this subject: Microsoft's SOA vision: 'The model is the application', found via LosTechies, via Interesting Finds)

My preference says -- start anywhere. In fact, you start outside the software. With, you know... real people. The actual software aspect can start anywhere. User interface is a great place to start. So is the business logic layer. So is the database. Everything is open to change.

Read On...


Wed, 31 Oct 2007 12:09:20 GMT

JonGalloway.Equals(Nostradamus)

"Microsoft should ship SubSonic"

Jon Galloway, August 2006

"Microsoft Snags Open-Source Project Lead" (i.e. Subsonic creator, Rob Conery)

Darryl K Taft, eWeek article, Oct 2007

In order to foresee what's happening next month, perhaps we ought to review Jon's blog from September 2006.

Anyway, word is that Rob will help bring MVC to the asp.net framework -- by fleshing out the pre-alpha MVC that ScottGu announced at the ALT.Net conference.

Regarding SubSonic, i've downloaded version 2.03 of Subsonic for a bit of fun. I've got some thoughts -- but they're not ready to share yet, so I'll hold back for now. It's all positive. Go and try SubSonic for yourself.

Read On...


Wed, 31 Oct 2007 00:45:40 GMT

Brisbane's Independent .NET Consultant

Maybe I can help your team, your business, or someone you know?

Currently, I'm free to fulfill any short term consulting needs you might have:

  • Your software architecture needs a review?
  • Your software strategy is falling apart? Maybe you never had one?
  • Development practices need to be refreshed?
  • Feel you're not using the tools you should? Sick of using a screw driver to hammer in nails?
  • Customers and developers just not listening to each other?
  • Need to write a lot of code, and not much time to do it?
  • Need help with a sluggish database?
  • Has your team turned Toxic?
  • Bug count heading north instead of south?
  • Got nasty technical issues that need some serious brain time?
  • Projects never seem to ship?
  • Or (last resort) just need a humour coach?

My resume is online. Contact me by email to LeonBambrick@gmail.com

Read On...


Fri, 26 Oct 2007 02:26:18 GMT

Why Are So Many Dev Tools Orange?

This isn't a comprehensive survey by any means... but the four dev tools I'm using right now all have orange icons...

some orange devtool icons
  • Mozilla
  • Visual Studio
  • Codesmith
  • MS SQL Studio

Just as acronyms all scramble to include the letter 'X' so too, dev tools scramble toward the colour orange.

Note to self: 'OrangeX' would be the ultimate name for a dev tool.

(and if you think Mozilla isn't a dev tool... then you're just not using it right)

Read On...


Tue, 23 Oct 2007 00:28:03 GMT

My First WPF Application - A visual tour

a visual tour of building your first app in WPFa visual tour of building your first app in WPFa visual tour of building your first app in WPFa visual tour of building your first app in WPF
a visual tour of building your first app in WPFa visual tour of building your first app in WPFa visual tour of building your first app in WPFa visual tour of building your first app in WPF
a visual tour of building your first app in WPFa visual tour of building your first app in WPFa visual tour of building your first app in WPFa visual tour of building your first app in WPF

With facebook out of the way, I can get on with more serious geeky pursuits, such as tinkering with WPF.

I've just written what amounts to my first WPF application -- naturally it's another implementation of the world's simplest code generator.

So, come along on a visual tour of thinking and building with WPF.

Read On...


Sat, 20 Oct 2007 11:08:17 GMT

Visual Studio News Channel: Give Hanselman a Go!

The main news channel in Visual Studio must be seen every day by millions of hard working developers.

It sits on the start page, prime real-estate for getting messages to real people who work with the dastardly complex tool that is visual studio.

Now look at how paltry this feed is!

useless msdn feed in vs2005

http://go.microsoft.com/fwlink/?linkid=35587&clcid=409

In six months, they've sent a total of 4 items to this feed! FOUR items!

I can imagine some apologist at MSDN saying "oh yes, but there's all these loopholes to jump through in a company the size of microsoft and a quality bar that..." -- BALONEY!! I ain't buying it.

You can see that they arrive in little bursts, as though it's right down the priority list, as someone's part-time job, when they get around to it..

An audience of millions. Millions. And they do nothing with it.

There could be tutorials on new features, help on under-used features, showcases of great solutions -- basically, you could stick ScottGu's blog in there and get a much better first approximation of the right material.

Check out the settings in Visual Studio that control this:

settings in vs 2005

By default it checks for updates every 60 minutes. At four updates per 6 months, that's about 1 update every 70 thousand minutes.

So let me go ahead and change the polling frequency to "every 70,000 minutes" ... oh wait, it won't let me set a value greater than one thousand. Because like, there's no way the dev-div team who wrote this feature would ever imagine that the MSDN team (who are professional journalists) could ever be so slow at publishing news.

I checked and Visual Studio 2008 seems to have the same feed, and the same settings around it.

three years on... same feed different vs

This Looks Like a Job for Hansel-Man!

So here's my plan: Developer Division should wrest control of this feed away from the MSDN team and into their own hands. In particular, since Scott Hanselman is their new internal professional blogger about town -- I've decided to assign this job to ScottHa himself.

So if you're listening Scott -- here's your challenge: Get control of that feed, and start pumping it full of useful, thoughtful, educational news items. One per day ought to be sufficient. I'll check on your progress in one month.

Read On...


Fri, 19 Oct 2007 13:44:53 GMT

How to block websites that kill your productivity.

Yesterday I wasted about an hour of good time on Facebook. And worse, I found that even when I'd started doing productive work, I kept shifting back to facebook and wasting more of my time. I can't say that I gained anything out of this effort. It was a dead loss. So today, i removed it from my life, in a single step.

Sites like facebook are such effective time-wasters because they relax the 'executive brain'-- the centre responsible for focused decision making, and leave you at the mercy of your impulses and compulsions. Much like watching reality tv shows, or being the subject of hypnosis.

Many of us spend a lot of our time with the 'executive brain' switched off. We become volunatry zombies. Let's say that again, in big writing:

We Are Voluntary Zombies!!

In order to delete Facebook, i opened this file:

C:\WINDOWS\system32\drivers\etc\hosts

and I added this line:

0.0.0.0 www.facebook.com

Now when I go to facebook.com, it gets routed to 0.0.0.0 and the browser shows 'Connection closed by remote server'

I can bring it back of course, by deliberately unblocking the site.

But the key word is 'deliberate'. Giving in to temptation is not usually a deliberate act.

When given the chance to deliberate, i'll need to engage my 'executive brain', and one of two things will happen:

  1. I'll decide i don't really want to visit facebook, or
  2. I'll visit it briefly and conscientiously, then re-block it afterwards.

(note, to unblock it, just add a comment symbol, '#' to the front of that line in the hosts file)

And, at the risk of being tarred, feathered, shot, drawn, hung, quartered and teased -- i only realised I was wasting time at that site because of the concerned intervention of my good and discounted friend, TimeSnapper. Thanks ts for stepping in where others didn't dare!

I'm using TimeSnapper more every day. For monitoring, understanding, accounting, timesheeting... there's so many ways to benefit (yeh, and more to come of course. we never rest... we're like that terminator guy in that movie, what was it? terminator).

Anyway, I block whatever sites I feel I ought to, and I've got some half-formed ideas about a toy to automate the blocking and temporary unblocking. Do you see a need?

Read On...


Fri, 19 Oct 2007 13:07:59 GMT

Go Don Syme!! Go F#!!

According to the relevant sources, F# is to be productized as a bona-fide language, not just a 'research project'.

I worry as others do that F# will shoot over the heads of too many of us programmers... with PLinq coming to C# mainstream we'll probably avoid needing to think about it all together...

And i fear Steve Thompson has a point with his response:

"likelihood of the average .Net programmer picking up this language is vanishingly remote"

but i disagree on principle with his statement that:

"...syntax a huge obstacle to understanding the fundamental..."

I've seen too many dyed-in-the-wool programmers argue that VB.net or C# is fundamentally superior to C#/Vb.net on such shallow basis.

I'm convinced that syntax is tangential for anyone who *uses* a language in anger. The human brain is far more maleable. After you tackle a few languages we learn to think in a meta-language far richer than what we merely type. (Yeh, 'Why' - I'm throwing down the damn gauntlet to your ridiculous claim, that Ruby is 'the language of our thoughts'.. grow up Why! Get a better set of lungs you wheezing freakazoid! just kidding i love your work, even you're so damn wrong. Yet admirable and funny.. and wrong! damn you, wrong!)

(new sub theory, regarding the age-old question, which is better a terse or a verbose syntax? -- in the early days of learning to program, a verbose syntax is better, but later a terse syntax is better. Hence, more experienced programmers appreciate terse syntax even in languages that are new to them. An ideal language, meanwhile, would allow for both, without causing disadvantrage either group. This is impossible, of course, hence language wars are inexorable.

One respondent, clearly a Pythonista, said, somewhat naïvely:

"This looks like Microsoft's solution to Python."

A fairer comment would've been: 'This looks like Microsoft's response and extension to O'Caml' -- which it is.

Enough on F#... let me say:

if your application has Ugly Corners You Wish to Beautify:
Consider F#.

If you have thoughts too beautiful for your day job:
Consider F#.

If you pose parallel solutions to problems posed in serial:
Consider F#.

If you... want to...

then please...

Consider F#!!!

(ps. It doesn't stand for Fortran.net.)

Read On...


Fri, 19 Oct 2007 11:41:07 GMT

The future of microsoft development

Where is mainline Microsoft development today? Where tomorrow?

Once, mainline Microsoft development was: MFC C++ apps and VB 5 applications. For the windows platform.

Then, for a short while it was Windows Forms applications, in .net, mostly C#, partly VB.net.

For the last several years, ASP.net has had the lion's share of attention from microsoft.

(Compare the data providers in Windows forms versus Web forms... linq support is complete on the web, but patchy on windows)

Where's it headed now? Will it return to the windows platform, with WPF? Or stay web-based with silverlight?

Is WPF "too much too late" for development on the windows platform?

Is asp.net for html now doomed, like MFC or VB 6? Will ajax for asp.net move ahead, or be dropped for silverlight?

Why do we always quit at 90%?

Are microsoft afraid that if they do anything well, it will give them nowhere to go?

Or is the last 10% harder than the first 90% put together?

Did Robert Scoble Die For Nothing?

No, hang on, honestly. Let's try that again. I say: 'Did Robert Scoble Die For Nothing?' and you say, 'But wait. Robert Scoble's still alive,' got it? Okay.

me: Did Robert Scoble Die For Nothing?

you: But wait. Robert Scoble's still alive.

(very good, now i say...)

me: Oh, I hadn't noticed.

Read On...


Tue, 16 Oct 2007 11:19:36 GMT

TimeSnapper On Sale: 2 year anniversary special

It's now been two years since we made the first version of TimeSnapper available. In celebration of getting so far (from 1.0 to 2.5) we're offering TimeSnapper at a special price:

TimeSnapper is now on sale, from $39.95 down to just $24.95

Or, to express it in a more gratuitous web 1.0 way:

Was $39.95 Now an
INSANE
$24.95!!

More gratuitous again:

TimeSnapper currently just $24.95

Or go with the modern classic:

TimeSnapper currently just $24.95

Thanks again to everyone who's helped us with suggestions and feedback. More improvements are on the way soon, as always!

(animated led sign generated at wigflip, mirror image generated at h-master.)

Read On...


Fri, 12 Oct 2007 08:51:26 GMT

Don't Forget The Caret^ and the $tick

stupid cartoon

When using a regular expression for validation.... don't forget the caret^ and the $tick

Let's say, you want to make sure the user types in a 3 digit number.

Simple! Can't be simpler:

\d\d\d

Let's test if this suits the following:

"500" -- Yep!
"999" -- Yep!
"123" -- Yep!

All good so far. Let's check that it fails on the following:

"5" -- Yep!
"99" -- Yep!
"ABC" -- Yep!
"" -- Yep!

That's good too. I guess we're done, right?

stupid cartoon

Uh-oh! It looks like we forget the caret^ and the $tick!

Therefore the following would return a match!

"HEY I like the film 2001 a space odyssey!" -- Oops! matches our expression!

as would

"But 2010 was just junk right?" -- Oops! another match!

What if we use a caret "^" and a dollar sign "$" to anchor the expression to the start and end...

^\d\d\d$

stupid cartoon

Now we'll get the result we want!

So when using a regular expression for validation, don't forget to anchor them to the front and the back, by using... you guessed it...

the caret^ and the $tick.

(donkey image lifted from an article about Team Building)

Read On...


Sun, 07 Oct 2007 13:03:31 GMT

Q: What's the cleverest kind of code?

A: No code at all!

I was looking for this quote:


...and I found it on Chris Sell's blog.

But in the comments I found this even more profound point...

And that's truer than anything. Code is always noxious to human senses. It's not built for human consumption. You get used to your own. But even still -- it's noxious stuff. The less of it the better.

Read On...


Fri, 05 Oct 2007 09:46:26 GMT

Wow! That baby really has its mother's eyes!

wow that baby really has its mothers eyes

No, not like that, like this:

wow that baby really has its mothers eyes

Sheesh.

Read On...


Thu, 04 Oct 2007 02:29:17 GMT

Facebook -- what every concerned user needs to know!

First up, facebook facebook facebook me me me, facebook facebook facebook, and also facebook facebook friends facebook no friends facebook facebook me me me me facebook.

Mostly, facebook crackbook facebook stalkbook facebook magic eight ball says facebook applications everyone facebook facebook can't shut up about it facebook facebook, productivity, facebook costing business millions, facebook facebook until all he could do was sit in a corner muttering facebook facebook facebook facebook.

Children as young as three years of age, meanwhile facebook facebook i'm starting a facebook group 'overcoming facebook addiction' and burma facebook facebook , facebook, because a facebook group is really gonna make that regime sit up and take notice, poke poke facebook facebook poke them poke them wake up crazy burma bad guys, cop this facebook facebook facebook facebook poke.

The story for developers is perhaps the most compelling of all, as facebook apps can facebook other facebook apps with a massive user base of facebook users and facebook apps and facebook facebook facebook facebook.

If john lennon was alive today facebook jesus facebook gandhi facebook einstein facebook darwin facebook hitler facebook elvis facebook marilyn facebook mother theresa facebook shakespeare facebook facebook i don't even know this person facebook facebook.

so, ah, get a life, yeh? then twitter it.

Read On...


Wed, 03 Oct 2007 11:44:36 GMT

WSCG as a Batch File

sample of a cartoon from strip generator

Full respect to Raj Chaudhuri for implementing the World's Simplest Code Generator as a Batch file (this was in response to it being reimplemented in javascript).

Matt Casto tells me he is currently working on a Silverlight implementation of the WSCG. Hurry up and share it with us Matt!

In other news...

The cartoon generator tool at stripgenerator.com is pretty fun.

Here's a dodgy example I put together.

sample of a cartoon from strip generator

And finally...

Paris Hilton has now been seen nak3d by so many men that chicken is officially known as 'the other white meat.'

Read On...


Mon, 01 Oct 2007 08:06:55 GMT

Transform Your Children Into Computer Programmers With SourceGear

Eric Sink, in another of his inspired, yet somehow dorky, marketing ploys, wants us to make fools of ourselves by posing as idiots in exchange for free t-shirts.

For example -- poor Craig Andera was tricked into posting this rather sad display:

Craig Andera prostituting himself in order to help with Erics marketing

(available from here in a larger, and therefore dorkier, image.)

The smart people don't lower themselves to this kind of behaviour. Instead, we get our kids to do it ;-)

Here's Lily before she became an evil mastermind:

Not yet a mastermind

Notice the vacant stare and the inability to concentrate on her keyboard.

Here she is after donning a sourceGear shirt and being instantly transformed into a megalomaniacal computer genius/evil mastermind.

***

(You may recognise her Commodore 64 from earlier adventures, and you may recall sourceGear vault from earlier dragon-dodging escapades).

(um... no offence meant Craig... I know you're not a dork, but rather an "Über Cool Nerd King" [pronounced: 'dörk'])

Read On...


Mon, 01 Oct 2007 05:33:50 GMT

Password Protect Your TimeSnapper Images!

Password Protect your TimeSnapper images

We snuck out a new version of TimeSnapper last week. The release notes are online.

You may be interested in the main new feature: allowing the cautious user to safeguard their images from prying eyes, through password protection.

When turned on (via the options form) this will cause your snapshots to be encrypted using a bit of algorithmic goodness from the System.Security.Cryptography namespace.

There's also a raft of little tweaks to improve usability, mostly based on feedback received at the forums, or through support emails.

(image at right is from an early work on cryptography, Polygraphique et Vniverselle Escriture Cabalistique.here by Johannes Trithemius)

Read On...


Wed, 26 Sep 2007 03:45:22 GMT

The Inaugural TimeSnapper Professional 'MikeG.Next' Honorary Award Of Linkblogging Excellence

***

This is a little overdue now. I promised over a month ago to hand out prizes for whichever linkblog looks set to take over the role that Mike Gunderloy's Daily Grind has long fulfilled.

Note that such a person won't actually replace Mike himself. Now let's see...

Read On...


Sun, 23 Sep 2007 11:15:08 GMT

The Principle of Scale: A fundamental lesson they failed to teach us at school

...which answers questions such as:

Why do babies need extra layers of clothing?
Why can a flea jump 200 times its own body length?
What led to moore's law?
Why is an elephant the only mammal that can't jump?
Who do babies spend so much time eating and drinking?
Why would spiderman fall off the walls he tries to stick to?
Why are insect's legs so skinny?

Read On...


Tue, 11 Sep 2007 11:22:12 GMT

Navigational Spaghetti -- What are your thoughts?

navigation in timesnapper todaynavigation in timesnapper tomorrownavigation in timesnapper the day after tomorrow [predicated]

TimeSnapper (like a lot of software) has grown organically. From simple beginnings its feature set has expanded to contain possibilties of which we never dreamt.

But this organic growth has meant that the navigational structure within the program has failed to keep up.

Occasionally we get requests for features that are already present -- simply because existing features can be hard to locate. (I call this 'The MS Office Paradox')

Sometimes we get requests along the lines of "I once found this great feature in timesnapper, but now I can't seem to get back there." (let's call this 'The Minos Conundrum')

And sometimes we get suggestions along the lines of "How can I get from screen X to screen Y, in less than five steps, without going through any form twice?" (i call this 'The Bridges of Königsberg Puzzle)

These kind of requests have been steadily increasing over the life of the program so far, and it's not going to get any simpler.

To try and understand the problem, I sat down today and drew a picture of the major forms in the application and how you can get from one to the other. The picture was too big to scan in, so I re-drew it in Visio. It ain't pretty:

navigation in timesnapper today

Then I added in lines for all the major new routes that people have been asking for:

navigation in timesnapper tomorrow

And I immediately predicated where this was all headed:

navigation in timesnapper the day after tomorrow [predicated]

So unless we're willing to let TimeSnapper turn into a pastafarian deity, its important we address this within one or two releases.

I don't know what the best solution to this is, and we're open to ideas. If you've got any -- please share.

One thought I've had is that we could include a context menu throughout the application, so that wherever you are you can right-click and get a 'goto' menu that gives you consistent choices.

That way, without cluttering up the interface, we make every path possible. The downside to this is that it lacks discoverability. Another option is to include it as a menu at the top of each form. This would take up real-estate and sometimes seem inappropriate.

We haven't considered including a ribbon-bar, or sticking a giant MS Outlook 97-style bar on every form, or turning it into an MDI style application.

All up it's one of those simple yet thorny design issues that software development is filled with. So i thought i'd share it, and see what ideas were out there.

Read On...


Fri, 07 Sep 2007 02:42:01 GMT

Step 5 of 25 to Building a Micro-ISV: Install traffic monitoring on your web site

(See also, The complete list: 25 steps for building a Micro-ISV)

Online businesses have amazing capabilities when it comes to understanding their customers. With good web analytic software we can know where every potential customer has come from, what they did while on our site, and where they ended up.

To gather this same kind of information, Offline businesses are stuck doing expensive surveys and employing demographics companies. All they end up with is a vague shadow of a reflection of a grain of the truth.

But even still, offline business are willing to pay exorbitant sums for this kind of information. Why do they blow all that dough? Because everything in business revolves around knowing your customer.

And lucky for us, the best things in web analytics are free.

If you want -- the decision of which web analytics provider to use can be an incredibly complex experience. You can purchase a 275 page book from CMS Watch!

Or you can use:

"Leon's 100% guaranteed, absolutely idiot-proof one-step guide to choosing the right web analytics provider"

Here it is...

  1. CHOOSE GOOGLE

Google Analytics (wikipedia entry) is the monster in this field. It's very easy to use, a cinch to install and chock full of information.

We use it at TimeSnapper. My business partner Atli set it up, so i can't really talk about the specifics. There's plenty written about it elsewhere, including some great info about Google Analytics from LifeHacker

But here's quick coverage, on one of the basic web-analysis issues that is particular to people who distribute binaries, such as Micro-ISV's.

Q: How do you use page-tracking software to track downloads, rather than page hits?

For example, when someone downloads your software, they might be downloading a zip file or an msi file. That's not a web page... how can web analytics software keep tabs on that?

I've got two answers to this one. Firstly, you can configure google analytics to record info about links being clicked (that lead to these files) as if they were files in their own right. See info about urchin tracker for help.

The other techniques is that your web server will have tracked every request for such files -- so you can turn logging on with your web server and mine the logs. There's a lot of free software that can make this easy for you.

Some of the packages for doing this (and this is 'seriously old-skool stuff' that your web 2.0 script kiddies can't remember as they weren't born when these things hit their hey dey) include Awstats, webtrends and analog.

What's the end game?

Contrary to common opinion, web analytics are not an end in themselves. It's not just about the pretty dashboards. All of that information is gathered for a reason -- feedback control.

Once you're gathering detailed feedback -- you can begin to gauge the effectiveness of all of the marketing activities that you engage in. And in software, and on the internet -- EVERYTHING is marketing. In fact, marketing is so central to everything you do online, that you don't even need to think of it as marketing. It's just 'being'.

So you re-arrange the layout of your landing page. Was it a good thing or a bad thing? That's what analytics can tell you! You changed the download image, changed your template, re-worded your slogan, put flyers in your local nudist colonies newspaper... did it have any effect? Should you do more of that or less? Analytics! That's where the answers is!!

Well-Regarded Alternatives

I have no experience with these three alternatives -- but if there's a feature you need and Google Analytics doesn't offer it, then check out these three little fellas, because they're recommended by various contributors at the joelonsoftware business of software forum

Increase Your Arsenal!

For the serious infonaut, there's other tools you can use as well.

We've set up Google Alerts to give us a daily email about anyone mentioning TimeSnapper or any other topics of interest to us.

Services like Technorati are also useful for finding out who's mentioning your product, or that of a competitors, or any topic you are tracking.

Where to from here?

I co-implemented these 25 steps a year ago now (with TimeSnapper), and first started to write about them nine months ago.

There's been a long break between writing steps number 4 and 5. But don't assume that i've stopped writing them, nor believe that I've promised to complete them.

If there's a particular step that you're waiting for, or if you need particular support or advice about your Micro-ISV, don't hesitate to email me (leonbambrick at gmail dot com). Other people sure do, and I love to help out where I can.

Also of course, I recommend the joel on software 'business of software' forum as a great place to ask any questions you have. The people there are always helpful, if sometimes a little grouchy ;-)

If you're looking for a book on the topic, I know of two excellent books: The Business of Software, by Eric Sink and MICRO-ISV from Vision to Reality by Bob Walsh. I haven't read Bob's book -- but my business partner Atli sure has. I know this because I get this steady stream of suggestions from him, all of which are dynamite stuff.

Read On...


Thu, 30 Aug 2007 01:30:04 GMT

Thou Shalt Have One Exit Point Per Subroutine -- A Monkey Cage Conundrum

Back when I was a wee lad in Engineerin' school, fussin' with alloc and malloc and all of that hurty stuff, a particular lesson was drilled into us:

Thou Shalt Have One Exit Point Per Subroutine

This was given as gospel and we learnt it as such. It was such a fundamental principle of the coding style they drummed into us that the reasons for it were glossed over quickly -- "it make's maintenance easier".

I stuck to that principle for years -- until finally I thought about the underlying reasons, the trade-offs involved, and realised that the benefits were redundant now. The rule had become, mostly, bunk.

Yet, every time I write a subroutine that has more than one exit point, I find that other monkeys in my monkey cage jump up and down and screech and throw excrement and chatter excitedly.

The psychological aspect of their behaviour was opaque to me until recently when Phill Haack pointed out a particular monkey cage experiment.

So go and read about that monkey cage experiment now. I'll be here. Grinning demonically. Then we'll continue.

Read On...


Thu, 30 Aug 2007 01:08:37 GMT

Brisbane .Net Developers: Interested in MOSS integration or K2 Workflow?

A company just around the corner from where I work is looking to build up a strong team of .net developers.

Read On...


Fri, 24 Aug 2007 13:04:07 GMT

General Purpose Programming Language... Good For Nothing?

There's a famous screencast in which David Heinemeier Hansson shows how to use Ruby on Rails to build a blog engine, in under ten minutes.

BUT THIS ISN'T A BLOG POST ABOUT RUBY! THIS IS A MIDNIGHT FRIDAY RANT ABOUT LANGUAGE DESIGN, SO JUST CHILL OUT AND SIT BACK SONNY. CHILL THE F**K OUT. Sorry, just had to clear that up.

Anyway, in one part of this talk he says something like:

rails... doesn't have a special templating language... it just uses ruby evERYWHere...

and i thought "cool -- use it everywhere. Sounds good. Or maybe -- wait! Bad! Bad! Dangerous!!"

then my wandering memory was struck by a few stray shots of Raganwald talking about using Ruby to build a domain specific language and i thought -- "Perhaps... but it'd better be a damn good language."

Y'see, using "one-language-everywhere-for-everything" sounds nice on the surface, but in practice it can be a terrible thing. My friend Zooba recently gave an equolent example of the 'one language to rule them all' concept and it's inherant problems.

But let's dive in as deep as we can. Let's discuss general purpose programming languages. IN DEPTH. Big, bloody awesome terrible depth. Ready?

Read On...


Tue, 21 Aug 2007 00:19:14 GMT

A weird casestudy in technical research

I used SQL profiler to grab the SQL that a crystal report generated.

Here's a snippet:

AND "Customer"."OrderDate"<{ts '2007-08-17 00:00:01'})

The curly brackets and the 'ts' looked strange to me. Not something I'd used before.

I wasn't sure what sort of thing 'ts' was. I googled it -- and found nothing. I checked SQL Server books on line, but no luck there either. Squiggly brackets and 'ts' are, by their nature, very hard to search for.

So I tried some variations to see what happened:

Select {ts '2007-08-17 00:00:01'} -- returns a date
Select {'2007-08-17 00:00:01'} -- fails (Syntax error or access violation)
Select ts '2007-08-17 00:00:01' --fails (Invalid column name 'ts')
Select ts('2007-08-17 00:00:01') --fails ('ts' is not a recognized function name)
select {ts '1'} -- fails (Syntax error converting datetime from character string)
Select {as '2007-08-17 00:00:01'} -- fails (Syntax error or access violation)

I figured it's some kind of special built in thing. And if this exists, there must be other special built in things I don't know about.

I wrote a short powershell program that generates all the combinations of two letters "aa, ab, ac..." right up to "zz". And then (using WSCG) I generated a monster T-SQL script of this form:

select 'aa'
go
Select {aa 5}
go
select 'ab'
go
Select {ab 5}
go
--(and so on up to 'zz')

Now I ran that script to see if any other two letter combinations stood out, and returned different error messages to the rest.

It turned out there were three such pairs of letters that produced a different error result to the rest:

  1. fn
  2. oj
  3. ts

Now googling those three all together was enough to get me a result, and thus find the meaning and documentation on 'ts'!

Read On...


Fri, 17 Aug 2007 10:49:03 GMT

The Next Mike Gunderloy

You know I love Mike Gunderloy as much as any heterosexual, god-fearing, code-loving, dude can love another dude. Which is a lot.

But you also know that Mike Gunderloy has, for ethical reasons, decided to shun microsoft as much as any heterosexual, god-fearing, code-loving, dude can. Which is a lot.

And I respect that. A lot. Word, Mike. Word. But I have the bills. And the cynicism of cynicism, and the 'satire-as-a-defence' and so forth. So I stick with microsoft for the foreseeable.

Furthermore, and far sadder: Mike tells us that by the end of this year he plans to give up writing his popular daily microsoft news blog, 'the daily grind'.

So the search is on -- where can I get my succinct daily fix of news relevant to my dayjob, without having to trawl through all the muck myself?

Who's going to get up early so that I don't have to?

Read On...


Wed, 15 Aug 2007 23:52:39 GMT

Look at all the things I'm NOT doing!

I read a nice lament about Time Management at Matt Casto's blog and wanted to give my own 'Time Management' tip, specific to .net geeks like you and I:

Make a list of what you DON'T have to do.

have you heard the saying:

"you don't know what you do until you know what you don't do!"?

for us .net geeks it's important to regularly say:

"okay, here's are some cool and fascinating technologies that i would learn if i had the time, but i'm NOT going to learn them, because I am but a single humble limited human being, not all things to all people"

My Current list of "WON'T DO" learning items is:

And then a second list:

"here's some great stuff that I'm NOT going to learn in depth just yet, because they're still too new. For now, I only need to know the basics"

  • Silverlight
  • Iron Ruby
  • SQL 2008
  • VS 2008

And then I tell myself:

"When they are more mature they will be easier to learn, and more fun to use"

Remember how frustrating XAML was when the tool support was absent? Remember writing WSDL files in notepad? Did you ever try to use Notepad to write windows forms? It's not a good way to spend your years! There is a benefit, but it's outweighed by the cost. When a technology goes from 'bleeding edge' to usable... well there's a lot less bleeding involved!

If I am suddenly thrust into a project where I'm expected to KNOW these technologies inside-out YESTERDAY!... I'll be okay. We are all masters of "Just In Time" learning. It's cool. We can handle it.

If you still feel overwhelmed by the pressure to keep up... go back and read 'You Are Not Inadequate'.

(End of feel-good-pep-talk-for-my-own-benefit-following-teched-overload)

(p.s. Similarly there is a list of web pages that i stop myself from visiting. XKCD. Icanhascheezburger. YouTube. WorseThanFailure. If someone has a funny XKCD comic to show me -- i ask them to email it to me, rather than let myself get drawn into that vortex...)

(p.p.s. The title 'Look at all the things I'm NOT doing' is taken from something DHH said in a popular webcast where he's building a blog engine from scratch using ror. In my head, i can hear his voice saying it now.)

Read On...


Wed, 15 Aug 2007 05:06:43 GMT

World's Simplest Code Generator: implemented in pure Javascript

worlds simplest code generator implemented in pure javascript

Last night I was stuck using an old laptop, with no dev tools and no internet connection.

A machine without dev tools is like a pub without beer, i lamented, when i suddenly remembered Douglas Crockford's essay 'Javascript, the world's most misunderstood programming language.'

So I fired up notepad and set about re-writing "the world's simplest code generator" -- in pure javascript this time.

This was a fun and liberating exercise: programming without any tool support (remember Chucky Petzold's Does Visual Studio Rot The Mind?).

There were a few unexpected delights and challenges, that i'll talk about now. If you want to use (or bookmark) this new, faster version of the WSCG, i've polished it up a little and uploaded it to here:

world's simplest code generator (javascript edition)

Read On...


Sun, 12 Aug 2007 02:36:17 GMT

Argument Modifiers: 'ref', 'out', 'params' and 'this'

Some c-sharp devs must slink through their whole skanky career, utterly ignorant about argument modifiers.

There's usually a way to avoid thinking about them: if you're willing to write a lot more code and have your existing stuff crash and get patched many more times.

The best known 'argument modifier' is probably 'ref' -- and it's purpose is pretty damn powerful. I assume you know its purpose: but just imagine you've just gone from a state of not knowing what the ref param modifier does, to a state where you know what it does. Think of all the things you couldn't do before that are now open to you. Hold that thought.

I'd say that I use 'out' possibly a little more often than I use 'ref' -- yet I wouldn't rank it quite so high on the 'mind-blowing' stakes. The 'params' argument modifier is certainly mind-blowing, if you've never used it before. It gives the language a whole big chunk of 'affordance' -- allow you to achieve, very simply, ranges of motion that are otherwise almost inachievable.

But what about the 'this' modifier.

I'd wager that 70% of the C sharp devs out there haven't yet parsed the 'this' argument modifier.

And when they do -- i hope to see the nightsky light up with the colourful spectacle of a hundred thousand minds noisily exploding under the power of extension methods.

If you're part of that sad 70%, go now and learn how to implement an extension method or ten.

Read On...


Sat, 11 Aug 2007 11:48:21 GMT

Scoop: Microsoft Expression Suite To Run On Apple Computers!

Have just returned from tech.ed (Australia) with an awesome scoop to share. Discovering this fact was one of those slow motion moments when the hero gets shot -- so obvious yet so far-reaching.

The Expression Suite of tools were designed to be run on apple from the very first moment. The ramifications of this are bigger than big.

The information was extracted from various MS people, occasionally using Veritaserum (read 'alcohol') where needed. (Note also that many MS people I spoke to knew nothing about this, and had not even heard of the rumour)

There is currently a 'super secret' project underway at Microsoft, to put together the underlying cross-platform framework necessary to enable the Expression suite of products to run on Apple Computers. Seamlessly, natively, super fast, beautifully.

This is a huge 'tell' in terms of microsoft's future direction and strategy as a company.

I see it as Microsoft accepting, at the highest levels, that they've lost the API-war -- and hence aiming to redefine the battle ground for where the future profit centres for their software company will be. They're looking beyond operating systems, and clinging to the source of all their successes to date: a strong developer focus.

But Wait? Aren't Operating Systems Great?

Hello 1995? This is 2007 calling -- we want to show you Windows Vista. OS's are too expensive to build, too hard to deploy, far too hard to update, and impossible to secure.

If developers on every platform, every medium, in every language and every device -- be it apple, windows or linux -- be it desktop, server, or web -- be it ruby, python, angle brackets (Html/XML/Ria), squiggly brackets(C/Java/C# family), or begins and ends (VB) -- if all developers and all designers are using microsoft tools to build their software, then microsoft can branch out, moving beyond OS development and ensuring they are the dominant force in tomorrow's software as well as today's.

Eat that google, apple, ibm, java, etc.

This is big thinking, strategic stuff.

Disclaimer -- I don't want to get anyone in trouble. Everyone who spoke to me did so under a veil of 'plausible deniability'. I ensured them that no one would believe me, so they were free to speak their mind. Ssad, but true, and like a typical, terrible, journaliste I agreed not to unveil my sources. Don't ask. Note also that Visual Studio won't run on Apple computers, just Expression Blend et al. We're happy to accept xaml from the black skivvy wearing apple using auteurs... but code? no thank you... For now... (You don't want to know what's coming after 'Rosario'... hint: who's for a Browser-Based IDE?)

Read On...


Sat, 04 Aug 2007 12:30:14 GMT

Sorry Visual Basic -- I is through *WITH* YOU!

I've always had a soft spot for visual basic.

Sure it's verbose. (verbose, like XML, is evil.)

Sure it feels patronising to say "nothing" when you really mean "null".

Sure some of the default settings were criminally stupid.

Sure VB over uses the round brackets, like they're good enough for parameters, arrays and generics all at once, yet makes no clear distinction about using them for method versus property references... then mis-uses the angle brackets for crazy non-XML stuff like attributes.

But it has background compilation, and -- smarter still -- it has the with statement.

The with statement is way cool.

With is like the (not yet invented) Context Driven Development which will give us a further 46% productivity gain. (Eat that, smug lisp weenies!)

Yet with just bit me bad -- turns out there's something fundamental i didn't know about with...

Read On...


Fri, 03 Aug 2007 12:11:00 GMT

How to aggregate a bit column

This is an oldie but a goodie:

When you first try to count the number of true values in a bit column (in SQL Server) you get this error:

"The sum or average aggregate operation cannot take a bit data type as an argument."

(caused by a query such as...

"SELECT SUM(MyBitField) FROM MyTableWhatHasABitColumn")

With droyad's help we came up with four ways to get around the problem:

SELECT
        SUM(CAST(MyBitField AS INT)) AS '1st Technique',
        SUM(CASE(MyBitField) WHEN 1 THEN 1 ELSE 0 END) AS '2nd Technique',
        COUNT(NULLIF(MyBitField,0)) AS '3rd Technique',
FROM
        MyTableWhatHasABitColumn

4th Technique: Another approach is to get a bigger hammer. In SQL Server 2005 you can create user defined aggregates, in the .net language of your choice. But that was the specific path I was trying to avoid going down.

Comparing the performance of these four techniques is left as an exercise for the avid reader. My favourite is the "COUNT NULLIF." I hope it ain't too slow.

Read On...


Sat, 28 Jul 2007 07:43:24 GMT

Microsoft Expression Family... WTF?

When it comes to the 'Expression' family of Microsoft products, I have (until now) been about as confused as a man who's offered a shovel, a spade and a mattock, then told to take his pick.

What's the story with all these Expression tools?

There have been all sorts of codenames come and go -- and all the products seem to have some overlap with existing or retired Microsoft tools.

Here's the skinny as near as I can tell:

The Evil OverlordsTM of Microsoft have put out the following:

  • Microsoft Expression Web
  • Microsoft Expression Blend
  • Microsoft Expression Design
  • Microsoft Expression Media

and

  • Microsoft Expression Studio.

What are they for? what's the difference? and what do they do? Here's all the answers you'll need...

Read On...


Wed, 25 Jul 2007 10:30:25 GMT

Hogwarts: an alternative dictionary.

(bit off topic this one.)

I've been reading over people's shoulders on the bus -- books today seem full of strange words I never learnt at school.

Here's some of the weirdest words i've noticed in the book most people are reading this week, and the definitions I've come up with to try and make sense of it all.

Read On...


Sun, 22 Jul 2007 06:55:25 GMT

Exec Inline AddIn for Visual Studio 2005 -- Get It Now

Exec Inline for Visual Studio 2005

I still use the Exec-Inline addin now and then -- so I've updated it to work for VS 2005.

Download ExecInline 2005 Download ExecInline.zip

To install it:

  1. unzip this file -- ExecInline.zip -- into the folder:

    "C:\Documents and Settings\{Your Username}\My Documents\Visual Studio 2005\Addins"
  2. (If the folder doesn't exist -- create it!)

  3. Next time you start visual studio 2005 the tools menu should contain a new item: 'ExecInline' with a smiley face icon. (if not, check the Addins menu to see that it's loaded)

Select a snippet of your code, press 'ExecInline' -- and KAPOW! The snippet is executed all by itself.

Read On...


Tue, 17 Jul 2007 00:40:32 GMT

Sick Of Being Nagged to Restart, Every 10 Minutes After An Update?

restart keeps nagging every 10 minutes... stop it like this

This is a tip that has been posted a lot of times before, but I've drawn a little picture to make it simpler.

First, here it is in words:

  1. Open the windows Run dialog
  2. type in "gpedit.msc" press ok -- this opens the "Group Policy" management Console
  3. Open "Local Computer Policy"
  4. Open "Computer Configuration"
  5. Open "Administrative Templates"
  6. Open "Windows Components"
  7. Open "Windows Update"
  8. Double click on "Re-prompt for restart with scheduled installations"
  9. Select "Disabled"
  10. Click "OK"
  11. Close the Group Policy management console

Here's the picture...

Read On...


Sun, 15 Jul 2007 10:21:34 GMT

ATM Thief Busted By Observant Internet Watcher?

Wired News reported [link updated] about a brazen trickster who reprogrammed an ATM to think it was dispensing $1 notes when it dispensed $20 notes... The thief stuck twice, taking a couple of thousand dollars.

The police are baffled. And the trail runs cold... Until now!

The story continues with possibly legitimate internet world first exclusive scoop...

Read On...


Fri, 13 Jul 2007 12:46:53 GMT

What a week in source code!

I've been working way too hard to notice anything around me. Apparently my mother died. I barely lifted my hands from the keyboard. You know how it is.

But I'm told the two most memorable articles on the webtubes this week are:

Interestingly the first was written by a Canadian. (A what? They're kind of like Americans.) This is the inimitable Justice Gray who is funny, intelligent and just freaking weird. I'm a big fan of his words.

and the second was written by one of those lovable whingers from ShutUpAndCodeBetter, no not the brilliant Sam Gentile or grumpy bum Scott Belware (:-))... rather, the other, nicer, one, Jeremy Miller. I haven't had a chance to read it -- so tell me if Jeremy's train of thought is worth catching. I suspect it is :-) And I do love a bit of ADHD.

Something else I've been enyoing is: QuickUnit.net a really clever "Simple Unit Testing" framework, based on one of my (so-called) 'million dollars ideas', i.e.: Annotating your code with simple tests'". Get it! use it! Experience ultra simple unit testing! Improve it! Keep us updated!

Also: Arjan's World is a nice place to get an almost daily update of what's new. Write to Arjan and ask him to keep up the great work!

In other news, I saw this heading: "Jakob Nielsen says 'donít be like Scoble'" and thought, yep. secretGeek says 'Don't be like Scoble!' Chicks won't dig ya.

Also, Windows Home Server!!! HMMOGMFJCAM! that's a pretty groovy tool! Get this one and join up your whole house, pronto.

Ah, and meanwhile, the excellent Haacked got himself re-skinned.

Read On...


Fri, 06 Jul 2007 13:08:23 GMT

That Shakespeare Loved His Code

I don't think anyone ever quite understood the inherant difficulty of software maintenance quite so well as old William Shakespeare.

After all, it was crazy Will who once wrote:

"Striving to better oft we mar what's well"
--King Lear

So true. He compresses whole volumes into that one sweet line. Years of practice poured into a paragraph.

Maybe it's this which explains Shakespeare's fondness for test-driven development. But the more I read his works, the more confused a picture I get of old Will.

Read On...


Fri, 06 Jul 2007 12:11:30 GMT

Wisdom from Atli:

(why write my own material when I can just republish things Atli says...)

"My biggest nightmare: pressing Send and noticing 'everyone@internet.com' in the TO list! (which would of course leave a copy of the email on every computer in the world)

Read On...


Thu, 05 Jul 2007 02:35:54 GMT

Portable Open Persona

Portable Open Persona

On the nintendo wii you are represented by a character known as a Mii -- a little avatar that represents yourself. It has a cartoonish appearance, reminiscent of those WeeMee characters I've seen around.

Here's the clever bit:

This same avatar can be taken from one game to another, and even from one Wii console to another.

Extending this idea...

Read On...


Fri, 29 Jun 2007 12:41:13 GMT

Separation Anxiety

(Okay this won't necessarily make any sense.

I've been thinking about three different but similar concepts.

They're all based on this template:

Separate your $x from your $y: how why and why not?

where $x and $y could be:

  • content and presentation
  • database and business rules
  • code and data

Read On...


Thu, 28 Jun 2007 02:34:42 GMT

Law of Software Contracts

I'm not a lawyer... but i'd like to wade in on contract law a little if i may ;-)

This entry, from Cem Kaner, "A first look at the proposed Principles of the Law of Software Contracts", was mentioned in Larkware today.

It includes this snippet of the proposed principles:

"a vendor who knows of a hidden material defect in its product
but sells the product without disclosing the defect
is liable to the customer for damage (including expenses)
caused by the defect."

(And Adam Goucher has more here.)

Legal stuff always raises more questions for me than it answers. And a bunch of questions jump out from the little that Cem has quoted.

F'rinstance, what about: a vendor who knows about a defect, but considered it immaterial? This happens all the time.

Or, more common still: a vendor who has an employee who momentarily knew about a limitation of the product, but didn't expect that that limitation would lead to a material defect?

Here's an Example...

You're writing some code, you choose to implement an algorithm in a particular way, which has a limitation.

You don't consider the limitation to be major, so you don't document it. But since you wrote the code, it's clearly evident that you did know about the limitation at the time you wrote the code.

The limitation isn't revealed by the sort of testing a 'reasonable' buyer would perform, and it isn't mentioned in documentation.

When put out in the field, the limitation causes some material defect in the behaviour of the software, that has massive consequences.

For example: the medical system you're writing didn't correctly handle the turkish letter "i"... hence a patient slipped through the system and died.

Who pays?

Go at it, legal geeks.

Read On...


Tue, 26 Jun 2007 21:54:52 GMT

Use TimeSnapper to Track Your Baldness

From Atli in the TimeSnapper forums, had to republish this one ;-) ...

I just bought myself a webcam and have experimented with programmatically taking snapshots - works pretty sweet - and I actually think it could make for a nice addition...

Later on, you could play back your year and exactly pinpoint the when and the why you went bald! (pretty sure it's related to a whacky debugging session )

wish I had this feature a few years back

Cheers
Atli

Read On...


Fri, 22 Jun 2007 02:48:23 GMT

do you want a server farm with that bottle of milk?

This is kind of embarrasing, but what the hell, i'll share it anyway.

While I'm generally messy, disorganised etc., I have created order in one particular part of my life: the 'master shopping list'.

this sounds like the nerdiest, most anal thing imaginable. People -- even nice people like other programmers -- think this is a freakish and terrible thing to use. Well, stick it Jack. The list works a treat!

what i've got is an excel spreadsheet that contains every item we buy from the grocery store. The spreadsheet is laid out in the exact same order that the products are located in the store.

this master list makes it much easier to prepare for a shopping trip, and makes it almost impossible to forget things when you're there.

The first problem this list solves is those rare items that you run out of much less often than you go shopping. it's so easy to forget that you're almost out of toothpaste, or deoderant.

the biggest benefit of this list was something quite unexpected. thanks to this list we now only need to go shopping once every 3 or 4 weeks. And when we do go, the trips are quick, and stress-free. (dairy products and fresh fruit n veg are a different, much faster, weekly, task)

The question is: do i want to take this nerdy list one step further? the next thing would be to add a "minimum shelf level" for each item, as well as a re-order level. For example, "reorder pizza bases if there's less than 2 remaining -- and restock them up to a level of 5." It's too nerdy... yet tempting.

but it doesn't end there... oh no. there's three more steps i can see beyond that.

Read On...


Fri, 22 Jun 2007 01:47:11 GMT

Diabetes promo ends in 5 minutes

Help Cure Diabetes

Purchase TimeSnapper in the next five minutes and half the proceeds go to help fight diabetes. Last grains of sand trickling through the hourglass on this promo. After that, please donate directly.

Read On...


Thu, 21 Jun 2007 05:16:43 GMT

TimeSnapper Diabetes Promotion Ending Soon!

Help Cure Diabetes

Almost two weeks ago I announced that we'd be giving money to help cure diabetes, on your behalf.

The deal is that if you buy TimeSnapper, we'll give half the ticket price to help Team Hanselman (and the American Diabetes Association) Fight Diabetes.

A big thank you to those who have taken part already. There's been some great feedback and messages so far.

Our promotion is ending soon! If you wanted to take part, then you've got to hurry, there's less than 24 hours remaining!

(You'll still be able to make a direct donation, which will be tax deductible. But if you want some TimeSnapper power to go with that good feeling of giving -- purchase now!)

Read On...


Tue, 19 Jun 2007 23:09:41 GMT

Some Trillion Dollar Problems

Joe Cooney was telling me about some Million Dollar Ideas of his, and they were nice. But since then I've been thinking about Big Problems. Really Big Problems -- and here's four of them, as an example.

Read On...


Thu, 14 Jun 2007 23:16:57 GMT

Can You Fix My Printer?

An old friend of mine is now a senior partner at a large global accounting firm. Apparently he bills his time at something like $600 an hour.

So when he had a BBQ on the week, I enjoyed asking him really detailed questions about what sort of things I could get tax deductions on. What are the specific laws about deducting laptops, computers, pdas and so on. Any answer he gave I'd grill him in detail to try and pick holes in his knowledge. Really helpful stuff, much appreciated.

After a few hours of this, during which time I'd drunk quite a bit of his beer, enjoyed a big meal he prepared, and sampled all sorts of expensive wines from his growing collection, he mentioned that his printer wasn't working. Could I take a quick look at it, it's probably something dead simple, he said.

Your printer? for god's sake. What the hell do you think I am? some kind of bloody 'technician'??

Boy some people are rude. Some friend he turned out to be.

Read On...


Fri, 08 Jun 2007 00:15:19 GMT

Fight Diabetes with TimeSnapper

Help Cure Diabetes

Special Offer! We haven't done a special offer before, so please forgive me if I'm not very good at this.

For two weeks, starting now, if you purchase TimeSnapper Professional (US$39.95) (direct download here), we'll donate half the ticket price to help Team Hanselman Fight Diabetes.

So the American Diabetes Association are trying to cure diabetes. It's obviously a noble goal, but I think it's also an achievable goal, and it will be one of those gifts that never stop giving.

At a more personal level, as many of you know, my friend and longtime supporter of TimeSnapper, Scott Hanselman battles this nasty condition every day. It permeates every moment of his life -- and even wakes him from his sleep. (Check out this transcript showing what he went through on one fairly typical day.) I mean this is seriously intrusive stuff!

You can of course also make a direct donation, which will be tax deductible.

Read On...


Thu, 07 Jun 2007 11:25:47 GMT

Choosing between Apple, Microsoft and Linux

Maybe choosing between Apple, Microsoft and Linux is like choosing whether to side with Hitler, Mussolini or Stalin.

Discuss.

Read On...


Sat, 02 Jun 2007 09:32:22 GMT

Perfect Productivity with TimeSnapper 2.4

TimeSnapper 2.4 now available

TimeSnapper 2.4 is now available. There's two big new features.

First up is the Productivity Calculator. You can now mark certain applications and certain keywords as 'Productive' -- and then keep track of your productivity.

It takes no time to set it up (there's a wizard!) but it's very effective. Because you have a complete record of how you work, you can focus in on the unproductive stuff -- see how it started, how it progressed and how it ended.

Read On...


Thu, 31 May 2007 23:50:34 GMT

TestDriven.net-Gate: Don't Blame Microsoft, Blame Jason Weber

There's a kerfuffle about Microsoft vs TestDriven.Net Express at the moment.

It's interesting stuff, to say the least!

Many of the comments are prefaced with comments like "I haven't read everything about this, but I feel..." and this is a shame because opinions became too polarised, and leap for tabloid explanations such as "Microsoft is Evil" when the truth, as always, is far murkier.

If you have time, you really ought to read the whole thing.

I've read as much as I can, and here's my analysis.

Read On...


Mon, 28 May 2007 22:43:25 GMT

ORM Smackdown!

In case you missed it, there was a very amusing DotNetRocks episode this week, billed as an 'ORM Smackdown' (listen here) between Ted Neward and Orein 'Ayende Rahein' Eini

Here's my summary of some of the points of contention [note that this is in my words, not theirs and i expect i've completely missed the point on most of these ;-) ]...

Read On...


Fri, 25 May 2007 04:51:49 GMT

MicroISV: Step 4 of 25 -- Basic Website Content

(This is Part 4 of 25 steps to Build a Micro ISV)

(A MicroISV, in case you were wondering, is a very small software company that turns a profit. The sort that any hard working software developer can run in their spare time. My MicroISV is called TimeSnapper)

In the previous step (Web design for MicroISVs) we dodged a big nasty bullet: we side-stepped the need to work hard on the graphic design of our website. Great move! We grabbed our beautiful, professional-looking web template straight from an online repository. Yoink! Thank you!

Read On...


Tue, 22 May 2007 00:14:21 GMT

Etags? I've never even heard of eTags!

Etags cure cancer! Etags let REST replace WS.*

Etags help blind children understand colour.

Etags are magical lightning bolts of clarity in a world of confusion.

Etags can be just like date stamps but with double quotes around em.

(note to self -- consider writing a 3 min guide on this).

Read On...


Fri, 18 May 2007 00:34:39 GMT

The Yerkes-whatzy law of who now?

Yerkes-Dodson Law of Arousal

In psychology they have something called 'The Yerkes-Dodson Law of Arousal' which goes roughly like this:

'Arousal' doesn't mean sexual arousal, you dirty-minded buffoons, so stop sniggering. 'Arousal' means 'Cognitive Arousal' and could also be taken to mean 'alterness', or 'pressure'. A common synonym is 'stress'.

The YD-Law is demonstrated in the graph shown on the right.

Let's break the graph into three regions:

  1. When your stress is low, you won't perform well.
  2. With just the right amount of pressure you'll achieve your peak performance. This is sometimes referred to as being "In The Zone."
  3. With too much stress your performance will degrade.

We can term these three regions as "Low Stress", "Optimal Stress" (aka 'The Zone'), and "Over Stressed".

(Continues)

Read On...


Thu, 17 May 2007 22:40:05 GMT

Faster Than Light -- For Real This Time

Doekman has posted an example implementation of FTL.

"FTL" ("Functional Text Language" or "Faster Than Light"), is one of the "million dollar ideas" I posted about a little while ago.

It gives wikis the ability to use input controls and dataflow formulae (the same type of formulae you use in spreadsheets).

Hence, when fully implemented, it would be the fastest and most open way to develop a simple web application. We're talking blisteringly fast stuff.

It's one of my favourite ideas -- but I've never had time to take it further.

A few people contacted me about this idea when I re-blogged it -- and I'm really glad to see an implementation.

Doekman's demo has some nifty features too -- there's built in range operations for summing or averaging a group of controls in one go. (You can go "@Sum(t1..t10)" for example to sum up ten textboxes). He's done the tooltip text thing I'm after where the formula behind a textbox is visible as the tooltip for that textbox.

There's no comment facility at Doekman's blog -- so leave feedback here with me (as a comment) and I'll make sure it gets to him.

Read On...


Thu, 17 May 2007 04:00:19 GMT

Text Files -- What are they good for?

At TimeSnapper we use a text file for managing our todo items. Plain Old Text (P.O.T) -- are we potty?

Someone I know and respect tells me I'm crazy -- that we should use a bug tracking application, or a wiki, or, basically, anything at all would be an improvement.

Are they right? Am I crazy? No and Yes, respectively?

Our todo file is checked into the source repository (we use sourcegear vault), and included in the main TimeSnapper solution. Multiple people can work on the todo file at once, and can merge their changes together if needed.

The downside to using a text file: you can't include images. But you can include url's that point to images, and notes referring to other files as needed.

It's a semi-structured text file, in the sense that we have conventions we use for keeping it tidy, succinct and relevant. We archive portions off, once they're completed. We separate it with headings, we nest information with indenting.

So what's wrong with using a text file?

The complaint this dude made was that it's "not gonna scale".

Well, maybe it won't scale to a point where we have fifty developers working on TimeSnapper.

But we can safely wait to cross that bridge when we come to it. Text files hardly lock us in. The data is easy to export. ;-)

What do you say? Can a globally distributed two person ISV track their tasks more efficiently in some other way?

Read On...


Sat, 12 May 2007 12:14:55 GMT

I'm always the last to know

"we are here on Earth to fart around, and don't let anybody tell you any different"

So i just found out -- a month after the fact -- that kurt vonnegut died. If you haven't read any of his books, please do. Start with Slaughterhouse five. It's a short read, worthy of a very long read.

Buy it. Pay full price if you have to. It's the best novel of the twentieth century. I've read a lot of other contenders, but Slaughterhouse five is a very long way in front.

If you like that then read Cat's Cradle too. If you like that then read God Bless You Mr Rosewater.

On the other hand, If you like slaughterhouse five but hate cat's cradle then read 'time's arrow' by martin amis. If you like slaughterhouse five but hate cat's cradle and hate time's arrow by Martin Amis then read Catch 22 by Jospeh Heller. If you're still not happy, then just read Slaughterhouse Five again. And again.

Next time someone mentions a war somewhere I'm going to say "Did Kurt Vonnegut die for nothing?"

And no, it's not going to make much sense, but I think I'll say it anyway.

Read On...


Fri, 11 May 2007 12:48:07 GMT

NO ONE IS GOING TO STEAL YOUR BRILLIANT IDEA.

I get emails occasionally from one-person-software-companies, and those who are thinking of creating small software companies. (Micro-ISV's we call them)

And i give help where i can, positivity where-ever possible. i don't give much time, of course. But i give everything i can. (Oh, And i'd love to hear from you, of course! i've always got a positive word or ten!)

But one thing i hear again and again is this:

how can i get started, when my idea is so clever that the first time i utter it, i fear someone will steal it?

This is such a common fear!

And boy, I have had that fear! I know it so damn well. Yet -- it's utterly misguided!

please believe me!

no one is gonna steal your idea....

Read On...


Fri, 11 May 2007 11:46:30 GMT

Translating a little bit of (microsoft) double talk...

I think that microsoft are pretty open these days. But (maybe for legal reasons) they can't always say what they mean. And on such occasions it's up to us, the community, to step forward and translate the double talk.

Here's a snippet from the launch page for a new technology: Jasper

I'll try and translate, here goes...

Read On...


Fri, 11 May 2007 03:58:48 GMT

The Truth About Attention Deficit Dis... Oh, new mail.

brain.serialize

Read On...


Fri, 11 May 2007 03:25:40 GMT

tarzan of the source code

Sometimes when moving through a large visual studio project it feels like some kind of parkour chase scene... I do a search to find something similar to what i'm looking for -- hit F12 to go to definition -- rename the offending class in order to cause compiler errors from all references to that class -- look through the list of compiler errors until i find the reference i'm looking for -- scan through that method until i find something it's doing -- f12 to go to another definition... like swinging through a jungle, slashing and jumping, grabbing onto vines and swinging... jungle vine navigation, tarzan of the source code.

Read On...


Wed, 09 May 2007 21:52:16 GMT

Back Seat Driven Development

Various development 'methodologies' talk about being 'driven' from one place or another --

Model driven, Test Driven, User Interface Driven, Todo Driven Development (ahem) and so on...

Each of these practices dictate a particular starting place for work -- a single place from which the 'truth' emanates. The resulting tool chain is focused on radiating the 'truth' outward from this driving place -- whether it's the model, the tests, the spec, the database, the user interface.

When the truth changes, you go back to the 'driving' place, alter it, and update the solution from there. So in model driven development you alter the model then rebuild the app. In test driven development you update your tests and see what fails. In database driven development, you alter your database and re-run your code generators.

This is all nice -- but each form is limiting.

What would be nice (and by nice I mean damn impossible) would be if each of these potential places was both a driver and a result.

So that -- without prejudice (without fighting the tools) -- you could update the user interface and have this change flow back to the business layer, the database, the tests, the model, all places.

You could then tweak the database and have this change flow out to the tests, the business layer, the user interface, the model. You could change the model and have the change propagate around to each place.

In code generation speak I think they call this 'active code generation' -- and it's never seemed realistic or clean.

But that's what I would like, please. And I would like you to go and write just such a tool for me please.

I will pay eight dollars for it.

Read On...


Wed, 09 May 2007 05:03:22 GMT

Can Software Be Like Building Lego?

I'm not thinking about programming the actual solid plastic bricks (though some people do). Rather i'm thinking about the idea of:

"Making the construction of a program, as simple, fun and obvious, as putting lego blocks together"

I've seen lots of people write about this idea before -- either denying that such a thing is possible, or pimping their own new tool as the long-awaited realisation of the 'lego programming' dream.

But neither side has ever clinched if for me. One group argues that lego programming is not possible, because programming is just too tricky.

The other group will point to some new technology they've created, and claim that this will finally bring 'programming to the masses' -- which is the kind of crazy talk i'm tired of.

But I like to think about this Lego Programming idea now and then. To understand the idea, I think you've got to start by looking at lego itself...

Read On...


Thu, 03 May 2007 22:05:49 GMT

Silverlight, Apollo... Lock In?

vendor lockin can be bad, sooner or later

a summary of mark pilgrim's silly season

mark pilgrim goes on a characteristically cynical rant against new vendor-specific 'ria' platforms (silverlight from microsoft, and apollo from adobe). (ria means 'rich internet application')

Although it's quite a short rant, who has time for prose? Here's the cartoon version:

Read On...


Mon, 30 Apr 2007 03:35:12 GMT

Joel On Metaphors: The Best Developers

Don't feel obliged to read on. Really.

Read On...


Sun, 29 Apr 2007 22:40:37 GMT

New Social Activity Sharing Site: Twatter

twatter logo, thanks to mspaint

This looks great!

Read On...


Mon, 23 Apr 2007 00:25:41 GMT

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.

Read On...


Fri, 20 Apr 2007 10:14:33 GMT

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...

Read On...


Fri, 20 Apr 2007 07:36:44 GMT

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!)

Read On...


Fri, 20 Apr 2007 01:51:04 GMT

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...

Read On...


Thu, 19 Apr 2007 04:51:02 GMT

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)...

Read On...


Wed, 18 Apr 2007 23:17:22 GMT

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

Read On...


Sat, 14 Apr 2007 01:26:39 GMT

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:

Read On...


Fri, 13 Apr 2007 11:07:23 GMT

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.

Read On...


Fri, 13 Apr 2007 01:15:45 GMT

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.

Read On...



Wed, 04 Apr 2007 21:21:08 GMT

Found a Commodore 64 on the side of the road

So I found a Commodore 64 on the side of the road this morning.

In Brisbane we have something called a 'roadside collection' which is a week where you get all the junk out of your garage and pile it up on the street outside your house. The city council come along and collect it, but not before hordes of scavengers pick through it and take just about everything, no matter how worthless.

I was walking to the bus this morning, just as one of my neighbours was putting out their stuff for roadside collection. Included in their dusty heap of crap was an original commodore 64! I picked it up and looked at it for a minute, then put it down and kept walking.

I looked back in time to see a blue utility truck pull up and two young guys start dismantling the heap and taking things, including the C-64.

For a moment I was dissappointed that I hadn't grabbed it and stuffed it in my bag. It might be cool to be able to pull out a commodore 64 whenever I needed an extra-core for a particularly difficult computation.

But then I figure, no, I'm happy not to be the guy with the cubicle full of old computers. I'm sure there are ample computer museums that will help the C-64 live on into posterity, so that old fogies can reminisce about the first program they ever wrote: 10 Goto 10. ;-)

Read On...


Thu, 29 Mar 2007 02:20:17 GMT

Number 1 Sign Your Software Project Is Doomed

I noticed these three similar headings at Dzone (and elsewhere)

  1. Top Ten Signs Your Software Project is Doomed
  2. 7 Signs Your Project Will Never Make it to Production
  3. Warning Signs Your Web Application Project May Fail

And I thought I should write down the:

Number 1 Sign Your Software Project Is Doomed:

  1. You immediately clicked on and read all three of those articles because you had a strong gut feeling you should.

Sometimes, whatever you think you are -- that's what you are.

Read On...


Wed, 28 Mar 2007 01:22:18 GMT

'Reuse' Is Not Usable

First, here's my attempt at a greenspunism:

Bambrick's 8th Rule of Code Reuse

It's far easier and much less trouble to find and use a bug-ridden, poorly implemented snippet of code written by a 13 year old blogger on the other side of the world, than it is to find and use the equivalent piece of code, written by your team leader on the other side of a cubicle partition.

And I think that 'the copy and paste school of code reuse' is flourishing, and will always flourish, even though it gives very suboptimal results.

Let's look at some reasons why it flourishes, and some reasons why it's not so hot in the long run (feel free to suggest your own).

Read On...


Wed, 28 Mar 2007 00:53:36 GMT

Damn Lambda

The increasingly 'functional' nature of C# still confuses me at times.

An
anonymous function with
anonymous parameters set an
anonymous object to an
anonymous type with an
anonymous value.

Cancel or Allow?

~~~~anon.

Read On...


Thu, 22 Mar 2007 22:29:05 GMT

Powershell on Rails -- MonadRail!

Okay -- i've been going on about powershell a lot lately. And you want to hear about other things. I can accept that. Even the people on the bus seem to pull faces when i start spontaneously talking about powershell.

(An old lady on the bus this morning, for example, just didn't get it. --A universal parser! I said, but did she even smile? Not a smirk.)

Well, the reason for the powershell obsession is that I'm currently reading "Powershell in Action" by Bruce Payette which is a cracker! It goes deep into the language, as deep as can be.

And I've been thinking about using Powershell for writing websites. Rails-style, no less.

Read On...


Thu, 22 Mar 2007 04:59:03 GMT

Remove Duplicate Rows From A Text File Using Powershell

If your text file is already sorted... then removing duplicates is very easy.

PS:\> gc $filename | get-unique > $newfileName

(But remember, the Get-Unique command only works on sorted data!)

If the file's content is not sorted, and the final order of the lines is unimportant, then it's also easy....

Sort it -- and then use Get-Unique

gc $filename | sort | get-unique > $newfileName

(You now end up with a file that is sorted, and where every line is unique)

However... the case that one bumps into is always the tricky case...

Read On...


Thu, 22 Mar 2007 00:49:58 GMT

Is there a general solution to string templating?

String Templating seems to be a problem that gets solved over and over again. But is there a general problem underneath at all? And if so, can a general solution be designed, implemented everywhere and used with confidence? Read on for rampant speculation.

Read On...


Wed, 21 Mar 2007 21:02:13 GMT

Windows Updates Make Me Nervous

Rather surprised by the new 'updates are ready' message from Microsoft. Hmmm.

revised updates message from microsoft

Perhaps they know just how much frustration we had on the home pc recently due to their dodgy updates.

(Fixed thanks to Scott Swigart)

Read On...


Mon, 19 Mar 2007 02:47:58 GMT

How Naming Works At Microsoft

Proposed NameFeedback from Microsoft HQ
X#Too snappy
XenToo religious
Polyphonic C#Too arty
COmegaToo Mathematical
XOmegaToo greek
XLinqStill Too Snappy
Linq to XmlNot Long enough
Microsoft Ubiquitous
Structured Services
Framework For
XML Querying
and Collaboration 2008!
Perfect!

Read On...


Sun, 18 Mar 2007 22:28:12 GMT

Remove empty lines from a file using Powershell.

I needed to remove the blank lines from a file.

Normally when I need to do this, I use a regular expression in TextPad. (replace "\r\n\r\n" with "\r\n"... and iterate) -- but TextPad wasn't available on this machine, and I couldn't connect to the internet to grab it.

So I fired up PowerShell and messed around with the syntax until it worked.

gc c:\FileWithEmptyLines.txt | where {$_ -ne ""} > c:\FileWithNoEmptyLines.txt

I don't know if that was the prettiest way to do it -- but I got the result I needed ;-)

The nicest thing was that I didn't need to look anything up -- I just tried variations until I got the result I wanted. I didn't remember the syntax of the 'where' statement or the 'not equal to' operator -- I guessed and got them right within one or two guesses. Nice language design, Bruce!

(I didn't even remember the command 'gc' -- but since i wanted the powershell equivalent of the 'type' command, so i entered 'alias type' and found 'Get-Content' is the powershell equivalent of 'Type' which i guessed was also known as just 'gc')

Read On...


Wed, 14 Mar 2007 04:09:19 GMT

A Faster Ruby.

[Devil's Advocate (Dvl) talks to Ruby Advocate (Rby). Inspired by ruby forum discussion, via Scott Hanselman.]

Dvl: Ruby has poor computational performance.

Rby: What? No it doesn't.

Dvl: Yes it does. You ruby people are in denial about the whole topic of Ruby's poor computational speed.

Rby: Denial? What? No we're not! Look over there!

Dvl: Yes you are. Try and say it with me "computational performance."

Rby: Comp... u... tay... What about developer performance, hey? Developer productivity is more important. Elegance, beauty, blah blah, love-ins, simplicity

Dvl: Well if Ruby developers are so damn productive, why can't they write a faster ruby?

Rby (covering ears and shouting): SHUT UP! SHUT UP! SHUT UP!

Read On...


Wed, 14 Mar 2007 02:01:28 GMT

There's Three Ways To Know Anything

Okay, so i've decided there are three ways to know anything. Maybe there's more ways. So, there are at least three ways to know anything. Everything.

Say you want to write really good .Net code: code that fulfills all your needs, does cool stuff, and works reliably. There's three ways.

Read On...


Mon, 12 Mar 2007 22:23:25 GMT

Test-Driven Hypocrisy? Who tests the test?

An oft heard mantra in Test-Driven Development is "if it's not tested, it's broken" and I have to admit that this slogan makes me cringe -- and leads to some of my own hidden objections to TDD.

"If it's not tested it's broken" -- okay it's a blatant exaggeration -- yet this seems to be lost on a lot of people. What it really means is something more like:

"If it's not tested with unit tests then it's unlikely to be tested elsewhere and hence we'd be making a fairly safe bet, to assume that it contains bugs."

But somehow this has less punch than the exaggerated mantra

"If tested it ain't, broken it is."

I like exaggeration -- hell, i probably like it a thousand more times than you do -- but i get annoyed when people take exaggerations literally.

For kicks, let's apply the principle literally and see where it gets us:

Say you write some code. Oops. You should've written tests first. Your code's broke.

So now you write code to test your code.

Oops, the code you wrote to test your code is broke. Fool! You didn't write any tests to test the tests that test the code that broke.

Stack overflow. Goodnight.

Discuss.

Read On...


Sun, 11 Mar 2007 21:00:00 GMT

Agile and Test-Driven: A Marriage Made In Hell?

Agile and Test-Driven go together like a horse and carriage... or do they?

Thanks to an excellent series of articles at Raganwald, I'm currently rethinking some of my old prejudices against agile and test-driven practices, to see if i'll start adopting them as a more central part of my style. (Note: I'm not against either of these practices, but i'm certainly not a true believer)

Thus i've been trying to uncover my hidden objections, to see if they can be overcome. But along the way a few boggling conundrums have presented themselves. See what you think.

Read On...


Fri, 09 Mar 2007 11:37:43 GMT

Essential 'Programming' Skills for Non-Programmers

If you work in IT and you're not a programmer then firstly, welcome... I hope you enjoy the site ;-)

To succeed in IT I think there are still some 'programming' skills that will be worth taking the time to learn.

These are skills that won't die out quickly, and that will help you in general trouble-shooting and comprehension.

Okay -- maybe this is a pompous list... but I welcome any adds, edits, deletes. Here goes.

  • HTML: Dare to 'view source'
  • SQL: Learn to select, from, where, order
  • XML: Learn what makes a document well formed
  • Spreadsheets: Please learn to write formulae in cells
  • Coffee: Now make me a damn coffee you admin nitwit

Read On...


Hey good looking!

I see you've scrolled all the way to the foot of the page. Check out the secretGeek archives!

Articles

The Canine Pyramid The Canine Pyramid
Humans: A Tragedy. Humans: A Tragedy.
ACK! ACK!
OfficeQuest... Gamification for the Office Suite OfficeQuest... Gamification for the Office Suite
New product launch: NimbleSET New product launch: NimbleSET
Programming The Robot from Diary of a Wimpy Kid Programming The Robot from Diary of a Wimpy Kid
Happy new year 2014 Happy new year 2014
Downtime as a service Downtime as a service
The Shape of Your Irrationality The Shape of Your Irrationality
This is why I don't go to nice restaurants any more. This is why I don't go to nice restaurants any more.
A flowchart of what programmers do at work all day A flowchart of what programmers do at work all day
The Telepresent Man. The Telepresent Man.
Interview with an Ex-Microsoftie. Interview with an Ex-Microsoftie.
CRUMBS! Commandline navigation tool for Powershell CRUMBS! Commandline navigation tool for Powershell
Little tool for making Amazon affiliate links Little tool for making Amazon affiliate links
Extracting a Trello board as markdown Extracting a Trello board as markdown
hgs: Manage Lots of Mercurial Projects Simultaneously hgs: Manage Lots of Mercurial Projects Simultaneously
You Must Get It! You Must Get It!
AddDays: A Very Simple Date Calculator AddDays: A Very Simple Date Calculator
Google caught in a lie. Google caught in a lie.
NimbleText 2.0: More Than Twice The Price! NimbleText 2.0: More Than Twice The Price!
A Computer Simulation of Creative Work, or 'How To Get Nothing Done' A Computer Simulation of Creative Work, or 'How To Get Nothing Done'
NimbleText 1.9 -- BoomTown! NimbleText 1.9 -- BoomTown!
Line Endings. Line Endings.
**This** is how you pivot **This** is how you pivot
Art of the command-line helper Art of the command-line helper
Go and read a book. Go and read a book.
Slurp up mega-traffic by writing scalable, timeless search-bait Slurp up mega-traffic by writing scalable, timeless search-bait
Do *NOT* try this Hacking Script at home Do *NOT* try this Hacking Script at home
The 'Should I automate it?' Calculator The 'Should I automate it?' Calculator

Archives Complete secretGeek Archives

TimeSnapper -- Automated Screenshot Journal TimeSnapper: automatic screenshot journal

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker



[powered by Google] 

How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink

InfoText - amazing search for SharePoint
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
Aussie Bushwalking
BrisParks :: best parks for kids in brisbane
PhysioTec, Brisbane Specialist Physiotherapy & Pilates
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2003 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2003 .: privacy