Archive Of Blog Entries (Nov 2007 to May 2008)
secretGeek .:dotnuts about dotnet:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Archive of Blog Entries

blog entries from November 2007 to May 2008

Sat, 31 May 2008 12:18:33 GMT

Return from an offline sojourn

I was offline for a few days over the past fortnight, and found it really refreshing. Without the continual distraction of the internet I was able to concentrate on achieving a lot of things that had been niggling me for a while.

Amongst those was the addition of some long overdue 'luxury features' for TimeSnapper that I hope will make it more meaningful for a lot of users. (No doubt I'll bombard you with the details when we release the next upgrade).

With the internet out of the way, my 'at home' productivity went from its usually mid-40's mark to a whopping 98%.

There were a lot of blog entries I jotted down notes for, but now I'm just happy not to contribute too much to the hyper-noise of the internet for one more day ;-).

But here's an example of an 'awesome Atli tooltip' found deep inside the codebase for TimeSnapper.

        Me.Label4.Text = "Productive Applications:"

        Me.ToolTip1.SetToolTip(Me.Label4, "Productive Applications are those that relate to your work." & vbCrLf & _

                                          "Solitaire, for example, is NOT a productive application, " & vbCrLf & _

                                          "unless you are working on becoming the world champion of " & vbCrLf & _

                                          "solitaire.")

It's these kind of gems that help me enjoy work on this product more and more with every version.

Now, back to the usual un-productive fare:

If you too have been tricked into using twitter, you can follow me here.

Read On...


Mon, 26 May 2008 11:14:46 GMT

Leaky Abstractions? Try Asp.Net!

First here's a code example:

Single line 'TextBox':

<asp:TextBox ID='dd1' runat='server' TextMode="SingleLine" MaxLength="10"> </asp:TextBox>
                                                                                    ^^^^This 'MaxLength' is respected!

Multi line 'TextBox':

<asp:TextBox ID='dd1' runat='server' TextMode="MultiLine" MaxLength="10"> </asp:TextBox>
                                                                                    ^^^^This 'MaxLength' gets ignored!

Now here it is in pictures:

max length ignored on multi-line TextBox

The single-line TextBox respects the maximum length property. The multi line textbox does not. We see other differences too: these two 'TextBoxen' differ from each other in far more than the number of rows.

The cause here is a classic 'Leaky Abstraction' - and asp.net is riddled with such leaks.

The 'abstraction' of "TextBox" is used to emit either one of three underlying html elements -- "TextArea", "Input type=text" or "input type=password" -- depending on the 'TextMode' property. The three controls are wildly different animals.

"Solutions" to this problem tend to use javascript to stop input once the maxlength is reached.

Edge cases are frequently missed, for example:

  • Once maxlength is reached, ignore input, but don't ignore: Arrow keys, Delete key and Backspace. Others?.
  • Pasting of text should truncate down to maxlength.
  • Disabling of javascript is always possible, so length validation needs to be applied on server side as well.
  • Now that javascript is in play, browser compatability becomes a bigger problem.

That's pretty nasty stuff to have to perform -- and worse, you're given no warning that you need to perform it.

The API tells you that there is a maxlength property you can use... but the API, in this case, is lying.

I'm not really concerned with this problem technically. And I think the asp.net abstraction is so extreme that it's admirable. I'd like to know how to patch this kind of leak.

Here's what I'm wondering:

Is there a way the text box class could have been implemented so that you get a compile error for setting the maxlength property when the textmode is multiline?

That would be enough to make it a safe abstraction in my books. It's more extreme than the static typing afforded by most static type systems.

I expect that such a constraint could be achieved with a language/tool like Spec#.

An alternative would be to throw an exception when setting the maxlength property if the textbox type is multi-line, and vice versa. But that seems like quite a faulty approach.

I'm just not happy about this at all. I think I will need to write a very stern letter to Scott Guthrie.

Read On...


Mon, 26 May 2008 10:42:17 GMT

A truly original thought

"Everything of importance has been said before by somebody who did not discover it."
--Alfred North Whitehead

Yet, once in a while, a true genius will strike upon a genuinely original thought.

Here's some such wisdom from JCooney:

"Who would you back in a fight: Cab Calloway or Darth Maul?"
--JoCo Loco

Tell me there isn't a multi-million dollar best-selling console game and movie franchise in that question?

cab calloway -- you may know him from blues brothers where he sung minnie the moocher with its catch cry hi de hi de hi de hidarth maul -- you may recognise him from the phantom menace or else just because hey! he sure looks like your mother

Read On...


Tue, 20 May 2008 11:08:43 GMT

Throw New VirtualMachine();

Today's crazy idea.

For serious exception handling:

throw new VirtualMachine();

...immediately spins up a new virtual machine, identical to the currently running machine, only with a debugger attached and paused on a breakpoint at the currently active line of code which caused the exception.

The development/operations team are notified and given a url with which to connect to the new virtual machine. A bug is lodged in your support system.

Meanwhile, execution continues essentially 'uninterrupted' in the original machine.

Read On...


Mon, 19 May 2008 06:51:57 GMT

Undo, redo, predo, preundo

Undo and redo are nice, but what i'd like to see is: Predo.

Undo provides a way to reverse what you've just done.

Redo is a way to unreverse what you've just undone.

Predo will be a way to do what you've not yet done.

And preundo would be a way to avoid doing what you've not yet done.

Read On...


Sat, 17 May 2008 04:50:18 GMT

A little "bit" of programming therapy

I have a new habit that I enjoy, even though I am certain it is getting on the nerves of my colleagues.

Whenever I find a bug in a piece of logic I've written -- whenever I find I've used || instead of && or left out a !, I shake my fist at the sky and shout, at the top of lungs, "Damn you George Boole!"

Try it. Very therapeutic.

(actually I kind of whisper it under my breath most of the time)

Read On...


Thu, 15 May 2008 09:49:28 GMT

Coding Koan: the power of one

Given a sufficiently large framework, any application can be a one-liner.

Read On...


Tue, 13 May 2008 11:40:45 GMT

Behavior Driven Development: As Human As Possible

I've been intrigued with everything I've read about "Behavior Driven Development" -- which is essentially a friendlier face on Test Driven Development.

For beginners like me I think the most obvious concept is that BDD = Test Driven Development Plus "natural sentence style test naming" as JP Boodhoo calls it.

For example, David Laribee gives examples where Tests and test fixtures are simply renamed according to a strict pattern, like this:

namespace Specs_for_TransactionElection
{
[TestFixture]
public class When_an_election_is_started : Spec
{
private ITransaction _stubTransaction;
private TransactionElection _election;

[Test]
public void The_result_should_be_in_progress()
{

Assert.AreEqual(_election.Result, TransactionElectionResult.InProgress);
}
}

The upshot of this is that the tests in the code runner read like a restricted-subset of plain English:

Behavior Driven Development example from Resharper

Some people, including David Laribee and Ryan LaNeve have said that the output of these stories could be improved to present a more human-readable form.

The treeview control itself should present a "Friendlier" form of those names -- underscores could be converted into spaces. Larger fonts could be used for sub-headings. And the larger headings should be in lower contrast colour, so you can fade them out when you want to.

Here's a dodgy mockup:

Specifications for Transaction Election passed When votes are cast: passed A single no vote should rollback the transaction.passed A no vote will leave the election with a finished and voted no status. passed Unanimous yes votes will commit the underlying transaction.

The point here is that I'm not talking about improving the output of the unit test tool -- for example the 'Dox report generated by the MbUnit GUI runner' (as Ryan LaNeve has demonstrated)-- I'm talking about changing the runner itself so that it directly cleans up the names of the tests and fixtures for presentation.

It could even report on "Convention Breakers". (Squiggly red underline perhaps).

(side note: matt calla provides a macro for doing the exact opposite of this.)

(Other side note: is this similar to Donald Knuth's idea of literate programming?)

Read On...


Tue, 06 May 2008 12:44:30 GMT

What To (Really) Do If You Find Out Your Parents Are Using Vista (redux)

I probably owe Vista an apology for that previous slurring. I started out wanting to say something else altogether, but once that idea had occurred to me, I found it irresistable ;-)

So here's the real story: My Parents Bought Vista. Shocking, yes. But it's not the end of the world. I'm here to tell you there is Life On Vista.

Here are practical tips for how to deal with Parental Vista Use.

  1. Remove OEM Junk
  2. Good children don't let parents run as admin
  3. Set their hard drive free!
  4. A digital Camera without a backup strategy is a loaded handgun without a safety switch
  5. No Aero for You!

Remove OEM Junk

First thing to do is to identify any OEM crap that the vendor will have bundled on there. I had to delete a bunch of Compaq nonsense and then kill a trial-copy of Norton Anti Virus (NAV).

Norton Anti Virus: just say no.

If you want to run anti-virus software, you want AVG.

But also... maybe you noticed that Vista has a very heavy-handed security model of its own, nothing like the "run anything" hey day of windows in previous eras. So maybe it occurred to you that anti-virus software is not such a necessity on Vista as it was on previous Windows Operating Systems.

In a way, using anti-virus software and UAC (User Account Control) at the same time, reminds me of the old saw about the Irishman who wore two condoms: "to be sure, to be sure."

So I think you ought to choose: UAC or AVG.

But the dumbest choice is NAV plus UAC.

While you're at it, check for any unwanted startup programs (run "msconfig") and see what services are set to start automatically.

Good children don't let parents run as admin

Remember the crazy times back at the turn of the millennium? The default SA password for SQL Server was [blank] -- and every man and his hound ran as admin?

Those days are gone, Jack, and it's time to reel your parents in. They ain't admins. They are guests on their own machine and they will treat it with respect, dammit.

If they have software that demands they run as admin... you'll stick that b*tch in a VM and tell it to shut the hell up. Capisco?

Should they need to elevate to admin to install some software... they will beg for help, explain their crazy predicament, apologise for their tom-foolery, and you will vnc onto their machine (with Fog Creek CoPilot, TeamViewer or some other remote assistance tool) and do the necessary.

Set their hard drives free!

Two tips here:

  1. Turn off Indexing
  2. Enable advanced performance (on SATA drives)

Indexing is turned on by default... and it's a heavy tax your parents don't need. In some crazy scramble to catch up to google, and to make up for their past failures in hard drive searching, they want to bring your hard drive to its knees permanently, so that the one time you search for something, there will be a plethora of irrelevant results presented imeediately and without pause. Turn off indexing. Really. Your mother don't need it.

She doesn't even need indexing on her email. If she does have a big pst file that she wants to search, she will operate differently to you and I. She'll carefully craft her search, and then, while the search is running she'll make a nice hot cup of tea. Time is different for each generation.

If they have a SATA disk in their Vista machine... the setting Enable write caching on the disk is enabled by default on SATA disks in Windows Vista, but the second setting Enable advanced performance is not enabled by defaultEnable Advanced Performance

  1. Click Start, right-click on "Computer" and click "Manage" (you may get a UAC prompt here)
  2. Select "Device Manager", and expand the node for "Disk drives"
  3. Right-click on their primary hard drive, and select "Properties"
  4. Go to the "Policies" tab, and make sure "Enable write caching" on the disk and "Enable advanced performance" are both selected.
  5. Hit OK, close Computer Management

This can allegedly allow you to lose data if the power goes out suddenly. Yet some people have used it for years without incident. I consider it safe enough. You be the judge.

A Digital Camera without a backup strategy is a loaded handgun without a safety switch

Say it with me, say it loud:

A digital camera without a backup strategy is a loaded handgun without a safety switch

But what have digital cameras got to do with helping parents use Vista?

Because the same parents who go out and buy themselves Vista without understanding the repercussions are the exact kind of people who purchase a digital camera on a whim.

So generally a child who has one of these problems also has the other. I think.

So for this one, I urge you to read Scott Hanselman's excellent article, On Losing Data and a Family Backup Strategy.

No Aero Glass for You!

There's nothing for you to do in this step, just something to be aware of.

Vista Home Basic doesn't support the Vista Aero theme. Maybe you knew that already, but it had slipped by me, and I was baffled why it wasn't available, wasting time to trying to work out what was so bad about their machine that it didn't give Aero as an option.

Turned out that their hardware was plenty good enough. But the stingy buggers in the shop had pulled a swift one on the poor dears and given them the criminally downscale poor cousin of vista -- the Suburban Ghetto edition.

Apparently it's an easy registry tweak to get around -- but I haven't tried it as yet.

The history of why this version exists is a kind of unholy alliance between sellers of substandard hardware and mercenary-cannibals from the camels and rubber duckies sect of capitalism. There's a lawsuit in the US.

But I digress.

There is life after a Vista install.

You don't need to upgrade to XP.

And there are even some features of Vista I like. ([Alt]+[Up arrow] to move up a directory in explorer, amongst others)

Read On...


Sat, 03 May 2008 23:43:30 GMT

What To Do If You Find Out Your Parents Are Using Vista

Look at it. Recognize it. Your parents wellbeing could depend on it!

First, take a deep breath...

You're not a failure as a child. You're not helpless. And you're not alone.

If you think you're a failure, consider this: There are many parents with neglectful kids, who never use Vista. There are also parents with seemingly model children who do use Vista.

As a child, it is your job to look after your parent's technological well being. But even the most responsible child cannot monitor their parents 24 hours of every day. A loving child will gives their parent as much freedom as possible.

Unfortunately, there are many pushers out there, just waiting to get your parents habituated to Vista. These people have infiltrated our computer shops. The sad truth is that many computers available on the market today are already spiked with deadly Vista. Parents are being lured with tales of Aero Glass and Safer computing. Too many of them are incapable of seeing beyond the lurid and gratuitous sales pitch. Before long they are waking up to reality, with a Vista Home Basic installation, and a raging does of other OEM tricks, like Norton Anti Virus and Microsoft Works.

So the first thing to accept is that Vista, while indeed dangerous, is an unavoidable problem for your parents to deal with. And they'll do it better and faster if you're aware, involved and don't stick your head in the sand.

THE AWARE CHILD HAS THE SAFEST PARENT

Part of awareness and a major deterrent to experimentation is to talk to your parents about Vista.

But even with a lot of your involvement, there are no guarantees. So it's important to know the symptoms of Vista use and to take action if you see your parent displaying them.

They may develop chronic constipation
or diarrhea, and just seem tired
and lethargic all the time. They may
have trouble remembering things and
forget something you told them
just a few minutes earlier.

THE WARNING SIGNS

There are no symptoms that are absolutely reliable. But there are clues.

Most of these symptoms tend to be gradual which is why your awareness is so important.

Don't jump to conclusions, but do investigate any suspicions you have as fully as possible. Trust your intuition.

Many of the warning signs for Vista use are the same as those for depression or for the ups and downs of being an ageing parent in a world gone technological. There's also the possibility it's a physical or emotional problem.

But whatever the problem, we're talking about a parent who needs help. Right now.

START WITHIN THE FAMILY - BUT DON'T WAIT TO GET HELP IF THERE IS A PROBLEM.

Nothing beats the power of love and family support. That has to start with frank discussion.

Don't make it an attack. And don't try to talk with your parent if he or she seems under the influence.

Wait for a calm moment and then explain that you're worried about a certain operating system (be specific) and give your parent every opportunity to explain. That means really listening, not doing all the clicking.

Use "I" messages -- sentences that start with "I" -- explaining how your parent's Vista use affects you and your community.

At the same time, it's important to speak frankly about the possibility of Vista. And it's particularly important to talk about your values and why you're dead set against Vista for them at this time.

If your parent seems evasive or if his or her explanations are not convincing, you should consult your doctor or a professional operating system abuse counselor to rule out illness and to ask for advice.

In addition, you may also want to have your parent visit a mental health professional to see if there are emotional problems that either underlie or are caused by their Vista usage.

FURTHER ACTION IS PROBABLY NECESSARY.

Even if your parent seems non-responsive or belligerent, if you suspect Vista is involved, immediate action is vital.

First, you'll need an evaluation from a health professional skilled in diagnosing parents with operating system or office application problems. You may want to get involved with an intervention program to learn techniques that will help convince a Vista user to accept help. For the user, there are self-help, outpatient, day care, residency, and 24-hour hospitalization programs.

The right program depends entirely on the circumstances and the degree of Vista involvement. Here, you'll need professional help to make an informed choice.

Another point: If a program is to succeed, the family needs to be part of it. This can mean personal or family counseling. It may also involve participating in a support group where you learn about co-dependency and how not to play into the problems that might prompt further Vista use.

If you don't know about Vista reduction programs in your area, call your family doctor, local hospital or county mental health society or retirement village counselor for a referral. You can also call the national helpline for advice and a referral or investigate twelve step programs in your local capital city.

WHATEVER YOU DO, DON'T GIVE UP

That parent who upsets you so much today is the same dear parent who, only yesterday, raised you and looked after you. They're in way over their heads, and they never needed you quite as much as they need you now.

No matter what they say.

(This cautionary tale owes a debt of gratitude to 'what to do if you think your child is on drugs')

Read On...


Fri, 02 May 2008 11:50:56 GMT

Sample Code From Text-Adventure Game Platforms

I'm using the occasional snippet of spare time I don't have to write a 'platform' for constructing Wiki-based Adventure Games (more). It's a kind of -- and I shiver in horror at the term -- a Domain Specific Language.

So, when you're inventing a Domain Specific Language for writing Wiki-based Adventure Games... I guess it's a good idea to acknowledge:

a) You're gonna suck at it and

b) it's been done before.

So, I guess it's time to consult the classics.

Thanks to a post from _why, i've learnt about Scumm, the Script Creation Utility for Maniac Mansion.

Here's a snippet of ScummC provided by _why:

object carolObj {
name = "Indigenous lifeform";
verb(int vrb,int objA,int objB) {
case TalkTo:
zobTalkToCarol();
return;
case LookAt:
if( ! knowsCarol ) {
egoSay("A large carbon based mammal, it seems.");
waitForMessage();
}
else {
egoSay("It is Carol, one of the local lifeforms.");
waitForMessage();
}
return;
case Smell:
egoSay("This creature has an overwhelming pungent smell.");
return;
case Move:
egoSay("The lifeform is surprisingly sturdy, I don't believe I can use force.");
return;
}
}

Well that's very nice.

Sierra

Now, how about that megalith of adventure games from the 1980s, Sierra Online?

Sierra used an interpreter called AGI (adventure game interpreter) to make such classics as Leisure Suit Larry and King's Quest.

(Leisure Suit Larry is a kind-of formative game for my entire character and personality. In case you didn't realise this, I thought I'd spell it out now.)

Here's a code snippet:

if (said("look","door")) {
if (posn(ego,0,120,159,167)) {
print("These doors are strongly built
to keep out unwanted visitors.");
}
else {
print("You can't see them from
here.");
}
}

(example from: Making adventure games with AGI)

GrimE

GrimE is a game engine written in scripting language LUA, touted as "the successor to SCUMM, preserving some of that engine's features" (according to the big 'pedia.)

I haven't found a sample or a good starting resource -- so if you find one, please send it along.

Agast

Also under the wikipedia category of Adventure Game Engines, I found AGAST

Here's a morsel of agast scripting...

"For example, here's an event that is triggered when the player looks at his goldenmop:

event Lookat <> GoldenMop
{
EGO:
"It's my trusty golden mop."
"I got that years ago for saving the galaxy."
}

(later)

var TalkedToGiantLizard;

event Talkto -> GiantLizard
{
if TalkedToGiantLizard {
"Since he won't talk to me, I won't talk to him either."
}
else {
"Hi up there, Gozira!"
delay 10;
"He probably can't hear me, or he doesn't speak English."
TalkedToGiantLizard = true;
}
}

Wintermute

Wintermute (from dead-code) -- how awesome.

Here's an example of scripting for wintermute, (taken from here)

on "first"
{
Game.Msg("Do something after the first choice.");
}

on "second"
{
Game.Msg("Do something after the second choice.");
}

on "third"
{
Game.Msg("Do something after the third choice.");
dlgObject.removeIcon("second");
}

ZIL

Zil? Zork Implementation Language of course! What else would you implement Zork in?

And it's time for lisp-like languages to bring a close to this article ;-)

Here's what the definition of the Living Room from Zork I looks like:

<ROOM LIVING-ROOM
(LOC ROOMS)
(DESC "Living Room")
(EAST TO KITCHEN)
(WEST TO STRANGE-PASSAGE IF CYCLOPS-FLED ELSE
"The wooden door is nailed shut.")
(DOWN PER TRAP-DOOR-EXIT)
(ACTION LIVING ROOM-F)
(FLAGS RLANDBIT ONBIT SACREDBIT)
(GLOBAL STAIRS)
(THINGS <> NAILS NAILS-PSEUDO)>

(from 'Zil [pdf]')

(And how's this for an intriguing name for a pdf [from the ZIL entry at wikipedia] "How to Fit a Large Program Into a Small Machine")

Okay. That's about all I wanted to share. I think the similarities and differences are telling. You see common concepts like "ego" and character manipulation. You see different styles.

I'd like to make some pompous over-reaching statement that text adventure games encompass every deep complex issue of software engineering. That a platform that allows efficient construction of games would need to be a shining example of superb software craftsmanship, with all the right buzzword compliance to drag our industry into a new era of productivity.

But I think Douglas Crockford (inventor of Json) distills the soul of a great computer game, in his very entertaining article 'The Expurgation of Maniac Mansion, :

  1. meet people,
  2. kill people,
  3. take their money,
  4. buy more weapons.

And, indeed, This is the chief pattern I want to enable with my wiki adventure game. Mercenary. Ruthless. Vile. And most of all: good clean fun.

Read On...


Thu, 24 Apr 2008 10:22:45 GMT

TimeSnapper 3.0 -- an interactive, bubbling cauldron of possibilities

TimeSnapper 3.0 out now! This is the activity cloud

While the googles and microsofts have been touting their clouds and their meshes, we've been enhancifying the cloud capabilities of TimeSnapper. (And by "we" I mean my dilligent colleague Atli, who is the driving force on this one.)

The TimeSnapper 'life analysis system' has finally reached version 3.0.

(Wondering what TimeSnapper is? Overview here)

This was a pretty solid overhaul, with many improvements under the covers (see release notes if you're detail oriented).

On the surface, the most important change is that the "activity cloud" (one of our reports) is now far more interactive.

Previously the 'activity cloud' was just a static word cloud, giving you an instant visual clue about what you've been up to.

Now it is an interactive, bubbling cauldron of possibilities. A self-organising mind map of your life.

Click on a word in the activity cloud to see a more detailed activity cloud, specific to that word.

click on a word to see extra detail...

(In the little screenshots at right, i've clicked on the word fogBugz, to see more detail about what i've been doing there, for example)

But here's what I like: the different ways to view your life are now converging into one seamless experience.

TimeSnapper has three main ways of viewing your life:

There's the day browser, where you watch a movie of your computing life. There's the reports, where you get a high level breakdown (including the activity cloud). And there's the 'activity grid' where you can search with more fine-grained criteria, and explore the results in a hierarchical grid.

Those three places are more integrated together than previously. You can travel through them, zooming in, ping-ponging back and forth. Learning what's really going on in your life.

click on a word to see extra detail...

Now you can view the word cloud report to get quick overview. Zoom into the word you're interested in. Click the 'View activity' link to open the activity grid, and see a listing, line by line of what you've done in relation to that word. Then double-click on any one of those lines to see the screenshots that were taken at the time (in the day browser).

(And if needed, right-click on that image, and extract the text from it, using OCR.)

You probably have to to try it to get it. For example, when Atli and I were reviewing these features, we shared a few screenshots during our discussions. And he immediately asked, "Oh, are you buying a Mazda?" Bingo. Your life in cloud form.

But don't be scared by this kind of power. You can password protect your data. And you can make it record only the apps you want. It's your life, just a better informed one.

 

Read On...


Tue, 22 Apr 2008 10:17:09 GMT

Be warned: the laptop compubody sock is out there

wait until the wearer is clearly absorbed in their laptop activities before you approach.

If you see someone wearing this garment in a public place, my advice to you is simple:

Act swiftly. Move in silently and with great stealth. Bludgeon the wearer to death with a baseball bat. Step away, slowly.

You will be doing the human gene pool a tremendous favour.





(...alright, i ought to admit i'm not really a genocidal maniac, and the people at instructables are probably creative geniuses, DaVincis of the knitting world etc, who deserve some praise to accompany that ridicule.)

Read On...


Fri, 18 Apr 2008 12:04:14 GMT

Everything that's bad for you is suddenly good for you!

In IT it seems that everything your lecturers once told you is bad and useless, turns out to be good and fruitful.

It's a reversal of the Woody Allen quote:

"Everything that our parents told us was good for us, turned out to be bad.

The sun. Milk. Red meat. College. Catholic girls."

(I'm deliberately paraphrasing)

For example...

We were once taught that dynamic sql is the path to poor performance and woeful security. And yet we now see that this is nonsense -- dynamic ORMs bring about increased performance and richer security models. Damn it!

We were once taught that permissive typing is bad and leads to buggy software. And yet we now see, with the rise of Ruby, Python and modern dynamic programming, the opposite is true. Permissive is expressive. Dynamic is productive.

We were once taught that significant whitespace is a relic of punch cards and poor computers, which all modern languages must eschew. Yet we now see that modern and future languages will support significant white space with a vengeance!

But most shocking of all!!

We were once taught that flat, wide, single-tabled denormalised data structures are the road to death, pain and -- worst of all -- slow, inconsistent data. Yet we now (maybe) see with google BigTable that in fact this is the future: this is faster and actually, sorry Jenkins, your rdbms is dead.

I'd love to be a stickler and a stalwart... but screw it. History is bunk. Bring out the learn!

And thus I'm left wondering... What else appears taboo and verboten? What else did our 'teachers' claim was 'bad' ?

Well - one thing was certainly frowned upon: the use of GOTO!

So....

I'M BRINGING HER BACK! WELCOME THE GOTO!

You may consider me a touch behind the times. But wiser heads will see me as preceding the curve.

What is a try...catch but a glorified JMP? (aka goto) Where would a switch be without an implicit goto, hey zooba?

What else do you see that's been besmirched too long? What other versatilities in IT have been marginalised far too long?

Bring out your dead.

Read On...


Sat, 12 Apr 2008 10:06:05 GMT

Everything I know about Code Reviews I learnt from Star Wars (and JCooney)

Imagine you're on a project where Joseph Cooney performs code reviews on everything you try to check in...just theoretically. And, theoretically, people like Don Syme and Joel Pobar are on hand to provide useful feedback at times...

Many many iterations ago... in a project far, far away...


Joseph (in red, indented)Leon (in blue)
Aren't you a little short for a developer?Don't underestimate the Force.You may dispense with the pleasantries, Bambrick. I'm here to put you back on schedule.So, can I can check it in? You like my code?You'll never find a more wretched hive of scum and villainy.We must be cautious.What's that line of code there?It's an old code, but it checks out. I was about to check it in.Does it compile?I find your lack of faith disturbing.

This part uses composition. The weapon of a true coder. Not as clumsy or random as code generation or polymorphism; an elegant design pattern for a more civilized age.
Don't be too proud of this technological terror you've constructed. The power to destroy performance is insignificant compared to the power of an enterprise rules engine.We shall re-double our efforts...I hope so bambrick for your sake. The build master is not as forgiving as I am.Look, Your Worshipfulness, let's get one thing straight. I take orders from just one person: meIt's a wonder you're still alive.It's a valid implementation. Screaming about it won't help you.Let 'em defect it. It is not wise to upset a tester.But Joe, nobody worries about upsetting a developer.That's 'cause devs don't pull people's arms out of their sockets when they lose. Testers are known to do that.Wonderful girl. Either I'm going to kill her or I'm beginning to like her.So I'll check it in?I have a very bad feeling about this...[pauses]

It's a TRAP... err CRAP
Damn fool, I knew you were going to say that.Your insight serves you well. Bury your feelings deep down, LB. They do you credit, but they could be made to serve the rules engine.

You can write this shit LB, but that doesn't mean we can checkit in.

Last resort: use Jedi mind tricks on Joseph:

These are not the bugs you're looking for (wave hands)These are not the bugs we're looking for.
You may go about your business. Check it in.

Read On...


Fri, 11 Apr 2008 20:25:04 GMT

Syntax highlighting of strings

Maybe this is a fiddly little point, but I think it's the sort of detail that's worth paying attention to.

The theory is:

Syntax highlighting of strings could be improved to make reading easier

In the following code example, look at the way the string is 'highlighted':

return string.Format("<a href=\"{0}\">{0}</a>", link);

The red highlighting covers not just the literal string itself, but also the quote characters and the escape characters: the 'meta' guff that decorates the string.

So in the previous example, there's no clue given to the naked eye that some of the quote marks are "literal" quote marks, and others are delimiters to mark the beginning or end of the string.

Instead, syntax highlighting gives up, right when it could be most helpful. And it's left as a parsing exercise for the programmer to determine what is and isn't really a string.

Here's a different way the syntax highlighting could be implemented:

return string.Format("<a href=\"{0}\">{0}</a>", link);

Now colour (actually -- saturation) is used to differentiate between the literal parts of the string, and the 'meta' parts of the string (the escape characters and the quote delimiters).

It looks strange at first glance, because it's an alien concept -- but i think that if you were used to this type of highlighting, it would allow you to "see" what escaping is going on in a string, far more readily.

More importantly -- it allows you to selectively 'see past' the escaping.

If you look at the second example, you can 'train' your eyes to focus on just the literal string itself -- until you see basically:

return string.Format("<a href=\"{0}\">{0}</a>

And thus you can reason about the text you've written, or proof-read it, in greater isolation from things that only the parser needs to worry about (the mechanics of escape characters etc.)

Read On...


Wed, 09 Apr 2008 09:01:57 GMT

Google AppEngine: evil virus or viral evil?

google app engine is interesting

After reading all the negative publicity that google's new application engine is generating -- I couldn't believe my eyes!

Could it really be that bad?

Or are these people just crazy paranoid schizofreakazoids with nothing better to do than write mealy-mouthed whinge posts about a whole pile of baloney?

So I signed up, downloaded the sdk, and got my hands stuck right in there. Then I waded through all the contractual jibber jabber and came to my own conclusion:

Yep, evil.

Read the fine print guys! Sheesh!

Every page of your application must have the "Google Rocks" logo in all four corners. The only language you can use is Gython -- Google Python, accessing your data via Gorm -- the Google ORM. The cost is fifty bucks per click -- that's google dollars -- bought at the google exchange rate. Plus, your code gets locked in Google's basement (aka GFS) for ever and ever.

Serious though, this cloud computing stuff (see also EC2 from Amazon, IBM blue cloud) looks pretty amazing.

Cough, cough, (Just making sure Ray Ozzie is awake). I'm going to say that a little louder.

this cloud computing stuff looks pretty amazing!

You freakin' got that yet Microsoft?

And this is just the very early days.

We will hear a hell of a lot of hype about this concept yet.

Then we will go through a bitter trough of disillusionment.

And then there will arise that grand surging tide of productivity as the vision is finally realised, five years from now, by which time we'll all be considering it old skool, as we float around in our hovering moped-atron-segways, reading e-newspaper articles about how Wikipedia bought Microsoft in exchange for a vintage single core computer from the e-smithsonian.

And then apple will put out a hand held elastic compute cloud, and six-year-old african kids will be wearing them as a fashion accessory.

Ah, back to reality:

Google will soon unveil Ruby as language number 2 on the platform. This right now... this is just the fluffer ;-)

Read On...


Fri, 04 Apr 2008 11:06:19 GMT

Perfect for lounging

--Why do you hate workflow so much?

My only problem with workflow software is that you have to sell your soul to the devil first.

--And that's a conflict of interest, since you already sold your soul, right?

Technically, yes, I sold my soul already. But it turned up on ebay and I bought it back.

--"One soul. Hardly used. Lacks ethics and morality. Perfect for lounging. Supports upgrade to 'weasel'."

You read the ad?

--Read it?! I almost out-bid you.

Read On...


Fri, 28 Mar 2008 11:57:31 GMT

Meeting Frustration, Chaos and Despair Head On. And loving it.

Marcus Auerelius was a chump. Cleverer than I, and emperor of the modern world. But a halfwit, at best.

Old Marcus A. spake thus:

"Begin each day by saying to yourself, 'Today I shall meet people who are interfering, ungrateful, arrogant, deceitful, envious, and selfish.' They are made this way because of their ignorance of what is good and evil... but I, who have seen the nature of good and beauty, and of evil and its ugliness, know that the inner nature of the man who does evil is the same as mine, therefore I can't be harmed by any of these men, for no one can impose on me what is degrading."

Yet my philosophy is richer, though -- at a glance -- far poorer.

For I add to this outlook the respective wisdoms of Newton and Hanlon:

An object will stay at rest or continue at a constant velocity unless acted upon by an external unbalanced force

...and...

Never attribute to malice that which can be adequately explained by stupidity

Hence, with my modern stoic attitude, I proudly announce:

I begin each day by reminding myself,

"Today I shall meet with frustration, anxiety, anger, antagonism, annoyance, mistrust, frivolity, ignorance, hubris, jealousy, laziness and despair.

But things must be such, as we are born in ignorance, and continue as such -- without tremendous interference. Momentum, entropy and the scourge of complexity lead all of us toward chaos, panic and compromise, despite the most industrious of minds and the noblest of hearts.

If, on tiny occasions, we succeed at bringing joy in place of despair, knowledge in place of ignorance or order over chaos, no matter how insignificant is our victory, we shall smile quietly and confidently, knowing that having beaten nature, we will be punished with ample severity."

Read On...


Thu, 27 Mar 2008 10:45:27 GMT

Workflow software: I'm calling the bluff.

I could be completely wrong about this -- but I'm just going to make some bold and disparaging remarks about the whole existence of workflow software and see what happens.

Here we go.

A state machine is about the most basic electronic circuit you can make. You can throw one together with a couple of transistors.

And in software, writing a state machine is so simple that it's hard not to write one.

But simple ideas leave room for big inflation. Sales people know that the best things to sell are inflated big ideas.

So the field of Enterprise-Level Workflow Software was born.

And businesses buy them, happy to take a short-term hit in productivity, since it will lead to long-term benefits. But when you buy an expensive wrapper around a five dollar piece of softeware, the long term effects are confusion, complexity and further cost.

Business are universally worse off because of the advent of 'work flow' products.

I hear the response "Oh but workflow has a lot of value-add over rolling your own solution. You get persistence of long running processes, for one thing."

Persistence? Persistence? Don't we have these thing called databases? Isn't that our usual, and fairly well understood persistence mechanism?

Also there's value-added services such as logging and reporting.

Logging? reporting? I'm still thinking 'database.'

Ah, but here's the super-answer:

Lego Mindstorms NXT programming

Workflow products include graphical tools for letting business analysts design their business processes without involving coders.

Without... without... You're kidding right? You ought to smell what you're shovelling.

Show me a working 'business analyst' -- one, who is not now nor has ever been a coder -- who successfully designs 'business workflows' using an off the shelf tool, and who didn't require *any* expensive training, and who achieves their task in less time and with more precision than a coder. And who doesn't need to call technical support for help at the time.

Show me just one.

World wide.

I can wait. I give you one month. Nah, screw it. I give you eternity.


Whenever I get too saddened by these things, i think of my big idea for a whole new class of enterprise component:

The 'IF' server.

Here's the general pitch.

(switch to the kind of voice-talent they use when advertising john grisham films)

Business today is complex. You need to make decisions. But every decision will take you down a certain path. Who can you count on to get you there?

Business needs alignment.

Business processes need to work together to guarantee that decisions are made for the greater good. Or evil, if that's the business you're in. We don't discriminate against evil.

Consider a difficult decision. It may be hard to make, but with an IF server, we can serve up either a true or a false, whichever you prefer.

You can have the most complex business scenarios in the world, and if you tell us to return true, we will. Every time.

Your IT department is a complex and challenging part of your business. They control a complex array of applications, of all sizes and across many platforms. Custom software is never dependable. But an IF server, can be relied upon.

Imagine... A single standard for IF processing, accessible from across the entire organisation.

Using proven open standards, like XML -- the Lingua Franca that powers today's fortune 500 businesses -- every application can link to the same powerhouse of decision making excellence: Your IF server.

Now you know: no matter what software your team is writing, they can connect to the IF server and be given one standard result. Monday? Then it's true.

Tuesday? Then it's false.

You run the business. You decide.

No more doubt. No more incompatabilities. No more missed deadlines and lost opportunities.

You can crush the competition. You can destroy them all.

IF only you purchase now.

The IF Platform Server One Million and One. A revolution in business processing solutions.

Read On...


Fri, 21 Mar 2008 10:35:09 GMT

3 Types of Argument

competing models of SU behaviour following M1

Engineering Argument:

There are two ways to implement something. Neither option is perfect -- both have their own compromises, which are known and measurable. Argument centres on which compromises are most acceptable.

Example: should the bike-shed be made from wood or brick?

Artistic Argument:

There are two ways to implement something. Both are functionally correct, but have unquantifiable differences. Argument centres on intuition and opinion.

Example: should we paint the bike-shed topaz or cyan?

Religious Argument:

There are two conflicting points of view. Both are utterly wrong. Argument has no centroid and no limiting factors.

Example: should the bike-shed be built to honour the green walrus or the almighty unicorn?

Read On...


Sat, 15 Mar 2008 12:41:19 GMT

F# Eye for the C# guy

This Tuesday, 18th of March, I'm giving an introductory talk about F# at the Queensland MSDN user group.

Head to Level 9 of Waterfront Place (1 Eagle Street, Brisbane City, Queensland) arrive between 5:30 and 6 pm.

Come on now! You'll love it! Forget spending time with the family -- learn a new language!

F# Eye for the C# guy

An introduction to Microsoft's newest official language, F#, geared toward C# and VB.net coders.

See how functional programming, object-oriented programming and imperative programming can work together to provide untold expressiveness.

If you only learn one new language this year, F# ought to be the one.

I've been putting the polish on this talk all weekend, and I'm very much looking forward to delivering it.

Please come along if you can. RSVP to Mike if you're interested.

Read On...


Sat, 15 Mar 2008 10:42:20 GMT

Anonymous Methods: Now that's a dumb name!

This has always bothered me and I've never quite put my finger on it until now.

I love anonymous methods (in .net 2.0+). I've over used them, sure. I've under used them, too. And I've gotten all too excited about them.

But the name is so very wrong. It puts the emphasis in all the wrong places. Anonymous, hey? Well what've they got to hide?

Consider this chunk of code:

Dim Result as Integer = Math.Sqrt(16)

What is '16' in the above snippet?

Well, it's a value. And it gets passed to a parameter. Simple. But a different answer we could give -- if we wanted to bamboozle people right at the start -- would be:

"Well in this case '16' is an anonymous variable."

A what? A huh? A... well.. you're just trying to sound clever aren't you?

Calling it an 'anonymous variable' is only useful if you are the damn fool who's stuck with the job of writing a compiler for the underlying language. It doesn't help the regular johnny coders like you and me who code in the damn language every day. (unless the build is broken that day of course.) (or there are too many meetings that day.) (or the keyboards are wrong.)

Similarly -- an 'anonymous method' is really just a 'code block', or an 'immediate method', or an 'inline method.'

The point isn't that it is anonymous, the point is that it's a method.

Maybe the term could be "throwaway method" -- as in, it's a method that's not designed for re-use. You just use it in this one place and then throw it away.

Ah, rant complete.

Read On...


Fri, 14 Mar 2008 10:51:47 GMT

Who Would You Back? Really?

So I was sitting at work this week, immersed in some complex n-tier, m-dimensional, z-class np-hard problem, when cooney interjects with a gob-smackingly complexicated puzzler, that spins my mind in a vortex of impossible tangles. Get this:

"Who would you back in a fight? Indiana Jones or Han Solo?"

A riddle wrapped in a puzzle, shipped home in an enigma with pre-paid mystery and a side heaping of conundrums.

After narrowing it down (Sword or Pistols? Stock whip is allowed? Blaster is kosher? Bare knuckle or gloves?) I had the details downpat (bare knuckle, earth, queensbury rules) and took the question home to Mrs Secret Geek to ponder over dinner.

"Both are quick on the draw,"

said mrs secret geek, mostly immersed in her afore-mentioned nintendo ds

"but while Han's a short-sighted scoundrel, Indy has the superior intellect, and less reliance on the sidekick. Clearly, Indy FTW."

I went back to work the next day, happy with this answer, only to be hit with a barrage of further dilemmas:

"Who would you back? Rocky or Rambo?"

And, over lunch, many more in the pattern

"Who would you back? $0 versus $1?"

With $0, $1 represented by various combinations of the following:

  • Fidel Castro versus John F Kennedy?
  • Jesus versus Buddha?
  • Abraham Lincoln v Richard Nixon?
  • Hitler v Chairman Mao?
  • Gandhi v Mother Theresa?
  • Bradman v Pharlap?
  • Gandalf vs Spock? (note this is Gandalf the grey, not ol' whitey)
  • Dumbledore v Mr Miyagi?
  • Bruce Lee v Ryu (from Street Fighter)?
  • Michael Knight v Astroboy?
  • Newton v Einstein?
  • Webster v Arnold?
  • Tron v Neo?
  • Kevin Mitnick v Matthew Broderick in War Games?
  • Terminator v R2D2?
  • Sarah Connor v John McClane?
  • Socrates v Nietzsche?
  • Ewoks v Oompa Loompas?
  • Babbage v Pascal?
  • Voldemort v Vader?
  • Frodo v Skywalker? (luke, that is) (pre jedi training) (i say skywalker's got him on reach)
  • Gollum v Yoda v Doby -- all-in freak brawl!

So, what do you say, unwashed internet masses. Who would you back? And why?

Read On...


Fri, 07 Mar 2008 00:02:39 GMT

More about the wiki adventure game...

I've started to implement the wiki adventure game idea from last week. I plan to contribute it to CodePlex, and maybe make a site. It's being written in Javascript mostly, but with C# on the server side. Some JSON, some regex. I considered and ruled out using Ruby, Volta, Silverlight, Asp.net MVC and a bunch of other technologies I don't understand, for reasons that Pseale has elucidated nicely.

I've got a benchmark in mind for what constitutes the 1.0 version of the game. Basically, once you're able to create a simple game akin to Pug Wars (see also, Drug Wars, Dope Wars)... that would be 1.0.

That game can be composed as a two-page game, with trading, banking, some randomness and an ever decreasing number of days remaining.

I've got ideas for what would be in a 2.0 and 3.0 version.

Here's the general concepts leading up to version 2.0...

A player has four lists (keyvalue collections, perhaps)

  • SimpleAttributes, such as name and avatar.
  • InventoryList, your useful items
  • SkillList, graded abilities that get you places, unlock certain possibilities in the game.
  • VitalsList, your score, your health, your hunger, your wisdom, charm and so on.

What actual items are in these lists depend on the game authors.

Inventory, would be composed of items that are intrinsically tradeable. Each item has an item-type, e.g. "Gold" and a qty, e.g. "57".

Say you visit a witch who is willing to sell you 1 donkey in exchange for 57 gold pieces. Very good. Trading is a built in feature of the platform. Normal fair trading applies: you can't spend more than you have. You can't buy the donkey and keep the gold. You can't buy more donkey's than the witch is selling.

Now, here's the clever bit: all tradeable items are, in theory, capable of becoming weapons. You may have noticed this from watching Jackie Chan films. That's not just a park bench! It's a weapon!

Given the appropriate skill, any item can be used as a weapon. If you don't have the crossbow skill, then that crossbow you just found is nothing more than a tradeable commodity to you. But once you bump into that wise old cross bow trainer, and acquire the cross bow skill, you will suddenly be able to employ it in any future fight. (Some items can act as weapons even if you have no skill -- the seal club for example)

Similarly, all tradeable items are capable of acting as 'food'. And what is 'food' in the general sense? It's a thing that can be consumed and thus its quantity diminished, but the consumption of which will alter one of your vital signs in some way. So this category really covers Foods, drink, poison, potions, medicines and the like. A keg of spirits may increase your drunkedness from 0 to 100. A bottle of poison, will decrease your health from 42 to 0. You can't dimish a vital sign below zero, but you can certainly try.

Can a tradeable item be both weaponry and food? Certainly! A well timed pretzel to the eye can disable many an attacker.

What weapons can be used on what adversaries?

That depends how a creature is defined. Some creatures can be attacked equally with any and all weapons.

But many creatures are impervious to all but a few weapons. Superman for example: Impervious to all, vulnerable to: "kryptonite".

Okay, that's the basic mechanics that will go into the game. I think it will game authors a lot of flexibility in the text adventures they can construct.

Writing the javascript is an alarmingly fun process. I'm beginning to agree with Justice Gray's famous retort he uses whenever someone complains that javascript is a terrible language:

Javascript doesn't suck, you do

See ya later. Dodgy pre-alpha Prototype here

Read On...


Fri, 29 Feb 2008 11:43:48 GMT

(Some) Computer Technicians Are Creepy

he right clicks task bar and selects properties

Well, this leaves me feeling somewhat sick in the stomach.

I was planning to put out some other blog entries just now, but i've felt dizzy and nauseous for the last few hours. Here's the story:

Last week I took my computer in to the shop to get it fixed. (I refuse to deal with hardware. I don't even change staples in a stapler. I have the midas touch and can even blow up passive circuits when they're disconnected plus i'm wearing a static wrist strap.)

I got the computer back a few days later and everything was fine.

he goes to advanced menu and clicks on clear list

On a crazy paranoid whim, I decided to look back through my TimeSnapper history to see if the technicians had used my computer in any unexpected ways.

I've been meaning to check this all week. I even woke in the night once, thinking: I really ought to check what TimeSnapper says happened on my computer when it was in the shop.

Well I finally got around to checking, just now. And what I found has left me unwell. It's nothing too major, but here goes.

A technician started up the computer and spent a short while looking through the 'my pictures' folder. First they looked at some photos of my baby daughter. Then they perused through some other family photos. Finally, they cleared the 'recent documents' list, checked that it was clear, and shut down the computer. (Sequence shown at right.)

The bit where they deleted the recent documents list happened extremely quickly. Watching it play out i am certain that they've done this activity many times before on many other people's machines.

he check that recent documents are indeed clear

I'm not too worried. They were pretty quick about it, only had the most cursory glance really. All sorts of other things were possible. My paranoid delusions included them installing a keylogger, searching for banking information. Lots of other possibilities. So it's not bad as such. I'll probably continue to use them for my computer needs (hey they're the best in town). But I'll probably create a guest account with minimum permissions, next time. And I still wonder what other things dirty technicians are getting away with on other machines entrusted to their care.

Okay that's off my chest now. And onto yours ;-)

 

Read On...


Wed, 27 Feb 2008 07:55:44 GMT

Wiki as Text Adventure Game

The first computer programs I ever wrote were text adventure games. It was bliss. I didn't spend much time playing games. For me it was all about the writing.

How about you? Did you ever write 'interactive fiction?'

The basic genre consists of a story that moves from one location to another. The hero of the game, that's you, can collect "things" as you go, and certain impasses are reached if you don't have the correct "things".

There is fighting. There are monsters. Puzzles. Traps. There's an abundance of description. And plenty of adventure.

Here's my current idea: write a wiki-style site where contributors don't just write webpages, they construct text adventure games.

Wiki-style formatting would do for the text. And for the game mechanicsm itself, there would need to be some simple features provided by the platform.

Hyperlinks and standard web navigation would take the place of those cumbersome command parsing consoles that leave you furious trying to guess the programmer's intent.

Here are the things I think you'd need for starters:

  • Some kind of 'state-bag' to act as your inventory. Your pocket contains string, matches and lint.
  • A declarative way of indicating items that the player can collect. You find 57 gold pieces
  • A way of increasing or decreasing scores against a player. You have 12 days remaining, and you have 14 health points
  • A way of trading items. The witch offers you the invisibility potion in exchange for 3 gold pieces.
  • A way of keeping some options hidden unless you have or do certain things. If Skillset.Contains(Romance) then Paragraph3.Visible = true.
  • A fighting routine that can combine the use of weapons, skills, armory, and luck.

With those basic building blocks, I think some pretty fantastic stuff could be created.

Who's up for the challenge? Come on lazy web, create for me (or find) a wiki-style web site for authoring text adventure games.

And now for some gratuitous linking.

Read On...


Sun, 24 Feb 2008 08:49:48 GMT

Your Brain Is In 10 Kinds of Trouble

Ever feel a little anxious? Here's 10 modern mental pitfalls familiar to today's office worker.

These problems can seem to blend into each other, but are each distinct problems, that can be attacked separately.

problems

  1. Information overload
  2. News overload
  3. Skill reinvention
  4. Always on
  5. Interruptions and alarms
  6. Increasing expectations
  7. Multi tasking
  8. Paradox of choice
  9. Fractured time
  10. Sociopathic social overload

Information overload

There is so much information available that no human being can possibly digest it.

This concept is so familiar now that it's almost docile in relation to the problems that follow. Alvin Toffler first coined the term, way back in 1970 before most of you were even born.

News overload

If too much information was the only problem, then you could slowly digest it, or read summaries of it. Eventually, throughout your lifetime, you'd move closer to having a handle on it all. But in fact there's a stream of new information being added to the information overload, and the rate of new information is increasing.

Every day, regardless of how much effort you make to learn, you know an ever smaller percentage of what is knowable.

Skill reinvention

New stuff is not just meaningless gossip either. Some of it is very deep and useful. New technical skills are harder to absorb than news items. By definition, you can't acquire a skill by reading about it alone. You have to practice it, over and over, to have any hope of acquiring it.

And no sooner have you begun to master an important new technical skill, than a new technical skill is announced as The Way. (Coping hints here)


The first three problems add up to create a classic Red Queen's Race:

"...it takes all the running you can do, to keep in the same place. If you want to get somewhere else, you must run at least twice as fast as that!"

Always on

The information, news and new skills don't turn up at nicely scheduled times, either. Thanks to mobile phones, blackberries, pdas, ipods, laptops and home offices, it's possible to be voluntarily connected to the infomonster at every moment and in every place.

Consider this: evolution is a nasty business where only the fittest survive. Yet evolution hasn't cured us of the need to sleep eight hours a day. Primative society was also rough and mean -- yet it afforded its members a day of rest each week. Modern technology is rougher and meaner than both evolution and primative societies put together. Work harder you damn slacker!

Interruptions and alarms

Information doesn't sneak up quietly: it noisily announces itself, with alarms and popups designed to put you on edge! IM, skype, email and all the afore mentioned 'always on' devices are just waiting to rattle your nerves. The layout in a Cubicle farm does nothing to limit physical/noise interruptions. There are also car alarms, home alarms, fire alarms, smoke alarms, and many others, all equally 'important'. (Raganwald's lashed out about this in the past)

Increasing expectations

Our standards increase to swallow most productivity gains.

For example (I heard this on a gtd or .net podcast... if anyone knows the source, please share) Prior to the 1950's, there were no washing machines, and the avg. household spent 6 hours per week washing clothes. The invention of the common domestic washing machine was proclaimed to be a great liberator... but the net effect today? We continue to spend 6 hours per week washing clothes, only we now do 10 times as much washing. i.e we have cleaner clothes & more of them -- but we're still just as much a slave of our tasks.

Similarly, producing a document today in Word 11 takes just as much time as it did in WordPerfect 1.1 -- the output should be considerably nicer, but then again, the reader is expecting a nicer output. So what did we gain exactly?

Apparent multi-tasking

Our operating systems support the appearance of performing more than one task at once. We humans trick ourselves into believing we're capable of working on more than one task at a time.

Favourite articles on this include, Human Task Switches Considered Harmful - Joel on Software and Coding Horror: The Multi-Tasking Myth.

A symptom of the previous three, is the concept of "Busy Work" -- the ability to appear busy while not actually getting anything done. Example: checking your email.

"No one really multitasks. You just spend less time on any one thing."

(from ADT Article)

Sociopathic social overload

I can't even begin to explain this one. You can talk to 150 IM buddies, send and receive a hundred emails -- complete social overload really... and yet this can be accompanied by no real physical interaction with anyone at all, ever. Facial expressions, body language, voice intonation, the wonders of touch... all of this gets compressed into a couple of emoticons. Weird.

Here's an example from a friend of mine. He described how his son was sitting on the couch, playing with his Nintendo DS, when he was supposed to be taking the dog for a walk. Nothing too unusual there... except, he was playing Nintendogs (a virtual pet simulation) in which he'd created a virtual dog based on his real dog. His real life pet ended up being returned to the pound. Seriosly. I think that's a sign of something... we're overdue for an apocalypse I guess.

Paradox of choice

There are more options than ever before. And even the most trivial choices require some amount of thought. You can't opt out of all the options -- yet the cost of taking the time, choosing wisely, will often outweigh the benefit of a wise choice -- Analysis Paralysis.

Barry Schwartz is the guru who explains this best:

...we assume that more choice means better options and greater satisfaction. But beware of excessive choice: choice overload can make you question the decisions you make before you even make them, it can set you up for unrealistically high expectations, and it can make you blame yourself for any and all failures. In the long run, this can lead to decision-making paralysis. And in a culture that tells us that there is no excuse for falling short of perfection when your options are limitless, too much choice can lead to clinical depression.

(from Barry's page at Swarthmore)

Further info, Barry gave a talk at google explaining the Paradox of Choice. He has a book called 'The Paradox of Choice: Why More Is Less'. (Ironically, the book is available new or used, with or without super shipping, possibly as a companion to 'The Wisdom of Crowds', at any one of 58 different prices, depending on who you buy from -- aaargh!)

(Also -- there is this book "The Progress Paradox: How Life Gets Better While People Feel Worse" by Gregg Easterbrook which seems to be thematically similar... or you might want to peruse "The Era of Choice: The Ability to Choose and Its Transformation of Contemporary Life" by Edward C. Rosenthal... personally i don't know which one to choose!)

I think Segal's Law is quite relevant:

"A man with a watch knows what time it is. A man with two watches is never sure."

Fractured time

Everything is now available in 'Near Real Time' -- effectively meaning that every action involves a small delay. Rather than large delays which can be scheduled around and dealt with, we have many thousands of tiny delays, which cut up our time and give us just fractions of slack time -- a second, ten seconds, one minute, here, there and everywhere. Click a link and wait a tiny bit. Put food in a microwave and wait one minute. Switch from design view to source view -- and wait a few seconds. Compile your code, and wait a bit. If the waits were much bigger we could schedule for them and find a use for them. If the waits were reduced to zero seconds, then there'd be no 'mental stack stress'. But instead our attention is cut to pieces by this effect, and it provides a nucleation point for distraction.

Steve McConnell touches on this concept in the blog entry, "Is Faster Always Faster?". What I haven't seen investigated is the net effect of time-fracture on a person's psychological well-being.

Okay. Next week, let's write about how to deal with all of this. If we can find the time.

Read On...


Wed, 20 Feb 2008 07:36:29 GMT

Organizational Tools for different scope and time

looking through unposted writings from last year, found this odd little (incomplete) table.

ScopeFuture Present Past
smallerTODO Lists (sticky note?) Timesheet
smallPlans TimeSnapper Records/Journals
mediumGoals Event logs Histories
largeMind maps(revelation)(remembrance)
largerSpecifications (epiphany) (tome)
#inf.(vision)(dream)(?)

the idea is that different tools are used depending if we're interested in big things or little things, and whether we're looking forward, looking back, or living in the moment.

almost makes sense... but not quite ;-)

Read On...


Sat, 16 Feb 2008 09:51:50 GMT

A reflection on hate week.

Couple of weeks ago i thought the internet was just fulla the old hate speak.

People were savaging Paul Graham without remorse (no url available: people have retracted so many criticisms), because he dared to share some code he'd been working on.

Ruby on rails was getting savaged, with the kind of vigour that only a new year can bring. Joel Spolsky was being taunted with agist remarks, because he didn't like one of google's incubation projects.

I agree and disagree with most of the sentiments expressed.

Back to that in a moment ... more important: i've recently been reading about great australian inventions. And every story has the same crazy pattern!

Crazy pattern is this:

  • dude sees a real need and invents something that answers it perfectly.
  • shares the idea with industry leaders and people who share that problem
  • they slam him, ridicule him, and just generally want to smash his face in for wasting time and attention on such a ridiculous problem.
  • either: he proves them right on his death bed or more often:
  • he dies, alone and poor, but his successor proves that the ideas were sound

Even in so-called rational, logical industries (like science and engineering) these things occur again and again!

Let me repeat that, in case it's new to you: even very intelligent scientists and engineers, like you and me, continually dismiss and disregard important breakthroughs in our fields.

No, really. Continuously. We dismiss ideas more readily than less intelligent people. it's our blessig and our curse.

Again, the classic quote is:

"Don't worry about people stealing an idea. If it's original, you will have to ram it down their throats."

I was thinking today: maybe some ideas at work that have been dismissed recently were actually cleverer than "the group" realised. Group think is a seductive and terrible thing. And i wish i had time to concentrate on timesnapper, 24/7. Or failing that, to blog about creativity 24/7. The only real lesson is:

accept ALL criticism. but take NONE of it to heart.

Read On...


Sat, 16 Feb 2008 09:07:41 GMT

sg: as seen in print!

click through to view full size, legible.

An interview with my ugly old self was in the sydney morning herald this week, possibly as a consequence of being listed (erroneously) in some top 100 australian blog lists, or possibly as a consequence of being in the smh previously.

This was fun: i only wish i could have linked out to hanselman for inspring the WAF (wife acceptance factor) concept on which the interview was built.

Though the wording at the end implies the opposite, I didn't write to them asking to be published.

A friend of mine claims he has moved beyond html and now sees wpf as the future. He constantly says "the web is dead to me."

While I'm not so extreme in my pronouncements, i'd have to say that print media is dead to me.

Still it was fun to be involved.

Truth be told, i only consider that print media is dead to me as a kind of sarcastic revange against the fact that my awesome comedy sc-fi novel remains unpublished. Damn you, print world! (shakes fist at print world).

Anyone got any contacts in the awesome comedy sc-fi novel publishing world? I've got the hottest damn manuscript, you'd kill to see it, kill bad.

Read On...


Sat, 09 Feb 2008 09:44:56 GMT

TimeSnapper 2.7: Word Clouds reveal your computing lifestyle!

Word Cloud giving a quick overview of your computing lifestyle

This is an awesome update to TimeSnapper, entirely thanks to Atli, my co-conspirator.

This new report, Activity Cloud, analyses the title text of all the applications you've used and gives an immediate, high impact view into what the hell you've been doing with your life lately.

It's clever enough to avoid a bunch of common words/phrases that would otherwise muddy the picture.

Please give it a go. Download timesnapper (if you've tried it previously, this new version will renew your 30 day trial).

By the way, we always renew your trial with every new version. If you're a serial software trialler (like me) we don't want to punish you. We want to welcome you. And maybe get some feedback.

As always the release notes are available online but also, we (and by 'we' i mean 'Atli') have added an RSS feed so you can subscribe to learn about updates: Point your RSS aggregator here.

 

timesnapper word clouds and some kate bush 80s mega fun

This Word Cloud feature also, somehow reminds me of Kate Bush's embarrasingly awesome Cloud Busting filmclip from my 80's toddlerhood.

Activity Cloud is available by right-clicking on any screen and selecting "Reports" (or "Go to > Reports")

As always I have to beg you: bring the feedback! We live for feedback! (Anonymous feedback welcome too.) We act on so much of it, that we're pretty much your submissive slave, ever-willing to do thy bidding.

So, don't hold back in the suggestions department. (And purchasing a license is considered nice as well)

 

Read On...


Sat, 09 Feb 2008 06:55:23 GMT

Mega-Million Dollar Idea: Diamonds@Home

No doubt you've heard of the SETI project and the Folding@Home project -- both of which let home computers act as nodes in a gigantic grid computing effort to mine information out of massive data sets.

Well I've come up with a different idea for an @Home project. First, let's talk about diamonds.a kimberlite pipe

How are diamonds formed? The simple version

Liquid diamond forms when carbon is melted and compressed by over 45000 atmospheres of pressure. This occurs naturally at around 200 km below the earth's surface.

If the temperature and pressure are quickly dropped to surface values, then the liquid diamond will cool into diamond crystals: valuable gemstones. If the temperature or pressure drop too slowly then the carbon will form relatively worthless graphite instead.

There is a geological structure in which a jet of liquid diamond from deep below the earth can suddenly erupt up to the surface of the earth, thus cooling and losing pressure very rapidly, resulting in diamonds, not graphite.

These jewel encrusted, diamond tipped jets of carbonaceous gas and ore are known as Kimberlite pipes, named after the town of Kimberly in South Africa, where a diamond rich kimberlite pipe was discovered, sparking a mad diamond rush in the ninteenth century.

Precious needle in a massive haystack

Although it is over 200 kilometres deep, a kimberlite pipe might be only 100 to a 1000 metres wide at the earth's surface.

Furthermore, not every kimberlite pipe contains diamonds. Some estimates say that only 1 in every 200 pipes contains the girl's best friend.

But given the enormous value of those that do contains diamond, it's worth sampling them all.

So, Diamonds@Home...

Here's where rough science ends and pure speculation begins:

Imagine a neural net that carefully analyses images from google earth. If sufficient training data is available, and sufficient grid computing power, perhaps such a system could identify hundreds of potentially diamond-rich sites throughout the world.

Rather than volunteering your spare computer cycles to help cure cancer (folding@home) or discover alien life (seti), you could use it to selfishly aim to become mega rich and fat with bling.

This would benefit humanity how?

Very little! It would lead to more ugly opencut mines, would fuel man's vain greed, and ultimately flood the diamond market.

But maybe, if anyone is hoping to write a science fiction novel, it might be a nice pasttime for a megalomaniac criminal genius?

Or not.


(image courtesy of yoinked from Geological Survey of Namibia)

Read On...


Fri, 08 Feb 2008 10:12:26 GMT

Thought game: What if SQL had a type called 'Operator'

Say you have a query, inside a stored procedure, that said:

SELECT *
FROM People
WHERE Age > @Age

And then you had another stored procedure, almost identical, that said:

SELECT *
FROM People
WHERE Age <= @Age

It'd be nice to apply some modularisation to this problem and instead have one procedure that said:

SELECT *
FROM People
WHERE Age @Operator @Age

And so on. Without using dynamic sql. Discuss ;-)

Read On...


Fri, 08 Feb 2008 09:40:44 GMT

Stop being walked. Start walking.

Great entry from Chip's Quips, courtesy of Arjan.

"Walking the dogs the other day — or (as everyone I encounter invariably remarks) as they were walking me, I began to see that activity as a metaphor for my life: barely under control, unable to slow down, being dragged along by others. Suddenly I planted my feet and pulled back hard on the leash. Halley and Harry [the dogs] turned back in surprise to inquire into the cause of this unaccustomed demonstration of my will. I made them walk at a slower pace the rest of the way, and I felt a resolve to do the same for my life. To take back control."

I hear you Chip!

There's so much rush and ferment and movement around us; it's easy to be swept along with the tide. But in truth, there is no tide. It's your body, your mind. Choose your own adventure, Chip.

Read On...


Sat, 26 Jan 2008 11:48:12 GMT

secretGeek's guide to selecting a cartoon to suit your chosen IT career

i work in itI work in IT.
What cartoon should I read?

i work in itProfessional developer?
Try Dilbert

i work in itScientician or functional programmer?
Try xkcd

i work in itUser interface professional?
Try OK/Cancel

i work in itTester or office gossip?
Try bugbash

i work in itSystem administrator,
Mail room employee,
or live out of a shopping trolley?
Try UserFriendly.org

 

Read On...


Thu, 17 Jan 2008 08:21:26 GMT

NDepend, Cyclic Dependencies, and the Shroud of Turing

NDepend, Cyclic Dependencies, and the Shroud of TuringPatrick Smacchia's NDepend is a brilliant way to get an overview of a .net solution, and then drill in and really understand what's going on.

For example -- let's examine what we learn as we focus in on part of the dependency graph of a large .net solution composed of many components.

I'll choose a region (marked in red below) where there are cyclic dependencies, and analyse it at a progressively greater level of detail...

Read On...


Thu, 17 Jan 2008 03:31:11 GMT

One Handgun Per Child

Having spoken plenty enough about the One Laptop Per Child project recently i just want to finish by saying that I am very proud to be a member of the IT industry at such a time as this.

How great it would be if other industries shared our spirit of endeavour. Perhaps the firearms industry could come forward with the "One Handgun Per Child" project.

The banks could step forward and offer "One Mortgage Per Child"

Governments could offer "One soul-destroying job in a miasma of bureaucratic inconsequentiality Per Child"

Correctional facilities industry, "One Prison Cell Per Child" project

And so on for all other industries.

Lucky you, lucky me. Lucky kids.

Read On...


Fri, 11 Jan 2008 10:45:11 GMT

52 great reasons to fail at software

Subtitle: I just gave you 51 great excuses and you're still pushing that 'people' crap??

Earlier in the week I wrote "51 Core Abilities of Successful Software" in which i gave conclusive evidence that successful software is technically impossible.

Yesterday, Jeff Atwood posts "No Matter What They Tell You, It's a People Problem" giving a compelling and utterly convincing argument that ultimately the reason for failure is 'people'.

This argument always reminds me of the film, Soylent Green, in which it's ultimately revealed that the government is rationing out human flesh as the new staple diet:

[last lines]
Det. Thorn
It's people. Soylent Green is made out of people. They're making our food out of people. Next thing they'll be breeding us like cattle for food. You've gotta tell them. You've gotta tell them!

Hatcher
I promise, Tiger. I promise. I'll tell the exchange.

Det. Thorn
You tell everybody. Listen to me, Hatcher. You've gotta tell them! Soylent Green is people! We've gotta stop them somehow!

And yes... I agree.. but the HR Weasel in me says "it's not people, it's personnel!"

[last lines]
Bruce
It's personnel. Software is made out of personnel. They're making our code out of employees. Next thing they'll be breeding us like cubicle-cattle for off-shoring. You've gotta tell them. You've gotta tell them!

Jeff
I promise, Bruce. I promise. I'll tell the internets.

Bruce
You tell everybody at Digg. Listen to me, Jeff. You've gotta tell Del.Icio.us! Tell programming.reddit.com! Software is people! We've gotta stop them somehow!

And when you're a tiny little micro-isv, it's not personnel: it's personal. As in,

"This time, it's personal!" [1]

But you know - I'm just adding Jeff's assertion to my own: so now there's 52 great reasons to fail at software.

Hey, I like that. I'll make it the heading and blog this crazy shit!

52 great reasons to fail at software


[1] what is the source of that tag-line? One of the rambo films? one of the Rockies? All of the rambo films and all of the rocky films?

Read On...


Thu, 10 Jan 2008 10:01:06 GMT

How To Win At Negotiation

OLPC seeks a truce with intel... or... OLPC says intel is a backstabber

In case you can't read the text: there are two separate news stories within two hours of each other.

The first headline is:

OLPC... seeks a truce with Intel [1]

and the second, two hours later reads:

OLPC says Intel is a backstabber[2]

Okay i'm not sure what the lesson is. Here's three possibilities:

  1. Nicholas Negroponte, chairman of One Laptop Per Child, makes so many tangential statements that you can interpret him any way you want
  2. Journalists aren't exactly straight shooters
  3. Breakups are messy.

Anyway I saw an XO in the flesh today [note, an XO is the first model of laptop built for the One Laptop Per Child project], thanks to JCooney (or one of the Cooneys). Nifty gadget, let me tell ya! I was suprised at how tiny it is.

Read On...


Wed, 09 Jan 2008 06:24:27 GMT

51 Core Abilities of Successful Software

To be successful, a project must balance these 51 core abilities


  1. Accessibility
  2. Affordability
  3. Beauty
  4. Build
  5. Caching
  6. Code Coverage
  7. Compatibility
  8. Complexity
  9. Consistency
  10. Credibility
  11. Cyclomatic complexity
  12. Discoverability
  13. Documentation
  14. Efficiency
  15. Ethics
  16. Extensibility
  17. Honesty
  18. Integration
  19. Licensing
  20. Logging and instrumentability
  21. Maintainability
  22. Marketability
  23. Memorability
  24. Modularity
  25. Open-ness
  26. Optimisibility
  27. Originality
  28. Parallelability
  29. Performance
  30. Platform versatility
  31. Popularity
  32. Power
  33. Practicality
  34. Predictability
  35. Purity
  36. Readability
  37. Reliability
  38. Remarkability
  39. Responsiveness
  40. Reusability
  41. Robustness
  42. Scalability
  43. Scriptability (automatability)
  44. Security
  45. Simplicity
  46. Testability
  47. Transparency
  48. Trustworthiness
  49. Usability
  50. User eXperience
  51. Versatility

You have room for three.

Security and usability are two.

Pick one.

[Apologies to Scott Adams who provided the template. See dilbert cartoon (here too)]

Read On...


Sat, 05 Jan 2008 11:32:04 GMT

secretGeek: Predictions for 2008

1. You'll personally sponsor a couple of 100 dollar laptops

I don't currently know how to sign up to do this -- but by the end of the year I will know how. And i will have done so. Several times. And I predict you will too.

I currently sponsor a young girl through world vision and find it an excellent past time (suggest you do the same -- my rich, intelligent, well-fed reader) but i think this hundred dollar laptop is a specific new way of helping the world in which we lucky programmers will lead the way.

If not us, who? If not now, when?

Now, onto some less-preachy predictions for the year ;-)

That crusty fiend Ajax Ninja says:

'...2008 will be the year that pissed off angel investors scream "show me the money" and MBA types go running over the cliffs...'

I still fear that this will be the year when Steve Ballmer will grip Bill Gates in his mighty bear-like arms and, with one powerful lunge, bite his head off with mighty iron-enriched jaws. We all have our fears, right?

I figure the most interesting predictions are around the possibility of an ongoing oil crisis, and maybe where economies like US and China are headed. And how many hurricanes will the northern hemisphere see this summer? But I'm no eco-financial pundit so i have to leave that topic alone.

Apple: Less than Inflation

Let's talk Apple. Sell your shares now, people. It could be a long time before they look anything like this healthy again.

apples share price is pretty healthy after 2007... okay i admit my anti-apple bias is inspired by little things that probably do not affect the share price, just as the luring of mike gunderloy, the unlikely success of apple allowing third party hardware suppliers to furnish their devices and just how damn aggravating i find itunes 7

2008, Language of the Year? AAAAAAAAA!

RoR is so 2006, and you know that already.

Haskell is so... 1906 or something and most people think you've said Pascal when what you said was Haskell and you have to repeat it "No, Not Pascal Pee but Haskell Haitch," and then they google for it as Hascal, and think "what the hell?" so no not haskell either, and no no no, Scala is so bourgeois it makes me want to swallow my own adenoids. The language -- the ONLY language to be seen tappety tapping in 2008 is AAAAAAAAA!

Concurrency won't go away

While the trickle of anti-Ror hate speak will grow to a roar (and fade away as the 'plateau of productivity' emerges) you can be sure that the pro-concurrency mantra won't dissipate before the year is through.

Of course all of the examples will centres around 'embarrasingly parallelizable problems' (you down with EPP? yeh, you know me) while the real world is of-course bound in the "non-trivial legacy enterprise hell," the NTLEH, pronounced antler, because it's almost cute.

Facebook is evil. And sh*thouse at contextual advertising

Hang on, that's not a prediction, that's a statement. And yes, I still use them.

Being sh*thouse at contextual advertising is going to hurt them before being evil hurts them. They might get better at advertising. But they'll still be evil.

How did last year's prediction work out?

Main prediction was around 'Dynamic.Net' -- and I was pretty much correct though not specific enough really.

Most importantly, my riskiest prediction of all turned out to be correct: There actually was war in the middle east. And some peace too. Incredible stuff.

Read On...


Mon, 31 Dec 2007 12:02:29 GMT

Christmas Roundup

a robot

Received a new niece.

Revised tally: 5 nephews, 2 nieces. Yay Katie.

Invented dozens of Christmas stories for a niece and nephew, including the one with rudolph and the bear trap, the one with santa and the exploding chimney, the one with the monster who chops off childrens fingers; my best work I swear. But niece and nephew kept pleading: tell us another one, but make it funny.

Taught said niece and nephew to master MS paint.

Attracted yet another cyclone. I visit beaches, storms arrive! It's 'a very mild super power'.

Read about F#. Wrote fractals in logo, sans computer. (Have typed them up since, see below).

Drew robots. Top fun and very childish.

More info about logo after the jump.

The Daily Grind has ground to a halt. Fare well Mike!

sierpinski koch curve
tree fern

Read On...


Mon, 24 Dec 2007 10:49:06 GMT

Logo Programming!

***

Q: What did kids do back in the olden days, before smoking crack and sniffin glue was the regular hobby it is for today's youngsters?

A: Why, they programmed in Logo, silly!

What a christmas treat! I just saw this heading, Logo Rediscovered on programming.reddit.com -- and immediately had to take their challenge:

Can you figure out how to draw a tree?

a tree in logo

Spoiler alert:Here's my code for implementing a tree...

Read On...


Sat, 22 Dec 2007 11:51:45 GMT

F#: More Mandelbrot Madness

******

Since no-one took the bait, i had to implement my own F# bitmap writer. This was fun. Dodgy code here.

Suddenly though, Josh from TechnoFattie, wrote and said he'd tried it. His code is neater than mine, and I liked his colour scheme.

Yoink. I modified my code to use his approach in places. Then, to try and stay ahead, I implemented experimental support for zooming and panning.

"Experimental support" is a great term -- in this case it means, approximately, 'broken'.

Funny though, that this runs a great deal slower than an old fractal studio program I had on my 286.

There's a lot to be said for problem-specific optimisations.

Read On...


Thu, 20 Dec 2007 10:03:52 GMT

F### yeh! i still got it baby!

lukeh put out an elegant F# mandelbrot program, that gives this output to the console:

                                        #

####
####
# ##########
#################
###################
#####################
####### ######################
######### ######################
#############################################
######### ######################
####### ######################
#####################
###################
#################
# ##########
####
####

#

i tinkered with it, just to see if i could understand how it was working...

I turned the output into this:

000000000000001111111111111111111111111111111111111111111111111111
000000000000111111111111111111111111111111111111111111111111111111
000000000011111111111111122222222222111111111111111111111111111111
000000001111111111222222222222222222222222211111111111111111111111
000000011111112222222222222222333334974433322221111111111111111111
000000111112222222222222222333333445698994333322221111111111111111
000001112222222222222222333333344457899975443333222221111111111111
000011222222222222222233333334455679 97544443322222211111111111
000112222222222222233333344567777899 99875559433222221111111111
001122222222222223333444455699 99 99999943222222111111111
001222222222223344444445557999 9654322222211111111
0122222223334469666666666799 9894332222221111111
022233333344456999999998899 975332222222111111
02333333444456799 99 964333222222111111
0333335555679999 9 754333222222111111
0 97654333222222111111
0333335555679999 9 754333222222111111
02333333444456799 99 964333222222111111
022233333344456999999998899 975332222222111111
0122222223334469666666666799 9894332222221111111
001222222222223344444445557999 9654322222211111111
001122222222222223333444455699 99 99999943222222111111111
000112222222222222233333344567777899 99875559433222221111111111
000011222222222222222233333334455679 97544443322222211111111111
000001112222222222222222333333344457899975443333222221111111111111
000000111112222222222222222333333445698994333322221111111111111111
000000011111112222222222222222333334974433322221111111111111111111
000000001111111111222222222222222222222222211111111111111111111111
000000000011111111111111122222222222111111111111111111111111111111
000000000000111111111111111111111111111111111111111111111111111111
000000000000001111111111111111111111111111111111111111111111111111
000000000000000011111111111111111111111111111111111111111111111100

I think i'm getting the hang of it!

I love learning by doing... you change a little bit and then you run it again... then you tweak something else and you see what happens...

Here's my minor variation on luke's code Only difference:

i noticed he was saying "a * a" in one place, which is very cumbersome and repetitive [ ;-) ] -- so i implemented a custom 'squared' operator in there, using this name for the operator: '!!!!!@**'

Now instead of getting sore wrists typing out something as long winded and error prone as "a * a", i could simply say ( !!!!!@** a ) and F# would treat this as a * a.

Also, i reversed the 'colours', showing how many iterations it takes the function to 'escape' the inner circle from a given point. (i did know some maths stuff once upon a time y'know).

(I wrote a 'min' function in there too. i know there'd be one implemented already, but i'm trying to do simple tinkering here ;-) )

Your mission!

Next step: do the same thing rendering pixels to a bitmap instead... then i could try breaking that up amongst multiple cores... no... sleep time.

The interested reader is invited to finish this problem for me ;-)

Read On...


Fri, 14 Dec 2007 11:26:18 GMT

How To Re-Start A Blog

So you've finally decided to start a blog. You feel you've got a lot to say and you realise a blog might be the right place to say it. But once you've signed up... you suddenly feel a little unsure of yourself. You thought you had an infinity of ideas, but now you've got blogger's block before you've even begun... Well what do you do?

Here's what I recommend. Start by writing one short post on each of the following topics. (I'm assuming a tech audience here)

Articles To Kick Start Your Blog

  1. My favourite software/tools
  2. My favourite blogs
  3. My favourite books
  4. Technologies/Issues I wish I knew More About
  5. Technologies/Issues I wish I'd never touched.A big shout out to crystal, excel vba and MS Access 2.0 from me ;-)

Once you've published short entries on each of those, you'll have a bit of a backlog, a kind of grounding that gives you an unexpected confidence. This will also serve to help establish your own identity in a way that is more useful and less self-indulgent than most blogs.

As demonstrated by Chris Sells

As a great example, Chris Sells used this technique when starting his own blog, many decades ago, before .net 1.0 had shipped. You can read from him:

And I choose to tag...

In the nature of these kinds of suggestions, I'll tag some blogs I know of that are either new or seemed to stall early -- but all of which have creative and intelligent writers:

Read On...


Fri, 14 Dec 2007 11:00:00 GMT

Nerdgasm 101

Alright, I just had a total nerdgasm.

Joe Cooney showed me his copy of 3D Programming for Windows, which is indeed signed by Charles Petzold.

Brain-fluid is shooting out my nostrils!

Read On...


Sun, 09 Dec 2007 10:04:53 GMT

TimeSnapper 2.6: Hook It Up

TimeSnapper 2.6 snuck out last week, and has been going well.

There's a big list of new features available in our release notes.

We've addressed the 'navigational spaghetti' that i wrote about previously, by adding a menu available from anywhere in the application.

But the big new feature...

Read On...


Thu, 06 Dec 2007 08:50:28 GMT

Journey of an idea

Journey of an idea, from enthusiastic conception into the highest levels of an organisation, via multitudinous layers of self-doubt, misdirection, middle management and final airing at the highest level with a subsequent swift defeat and hasty retreat.

"Journey of an idea, from enthusiastic conception into the highest levels of an organisation, via multitudinous layers of self-doubt, misdirection, middle management and final airing at the highest level with a subsequent swift defeat and hasty retreat."

An infographic after Minard. click here.

Read On...


Sat, 01 Dec 2007 02:10:26 GMT

Bug Eyed VS2008 Guy Freaks Me Out

My minders and the other people who care for me have told me not to put this blog entry out.

They have told me that it is cruel and bilious. That it is just trash talk and hater-speak.

But I won't be silenced. I cannot be oppressed. The right to free speech is up there. Pretty high. At least 7 out of 10. So I shall share.

Here I go.

Where did they find this freak whose shows up in the VS2008 install? Who is he? What the hell happened to him?

vs2008 install

I must have kicked off at least 10 VS2008 installs in the last few months -- and i keep getting more and more freaked out by this guy.

HIS FACE IS TOO SMALL FOR HIS HEAD! His eyes are beady. And they seem to follow your mouse cursor around the screen. Don't they!?

I really think he's an example of photoshop touch ups gone wrong.

If you draw a line from the centre of his chin to the tip of his crown, you'll see that his face is slightly off centre with his head.

While this could be a genuine congenital abnormality, I think it's the result of poor digital cosmetic surgery.

In their haste to air brush any blemishes out of this guy, they -- the marketing/design people at microsoft -- have removed his face and later pasted it back on, slightly out of place and a little bit too small.

To demonstrate this, I've drawn the apparent centre line of his head in green, and what I consider the true centre line in blue.

centre line of head does not match centre line of face

The biggest problem is that his face is simply smaller than it should be. So I've corrected the problem.

Here was my first attempt:

face centred on head

You'll agree he looks perfectly normal now.

And after a little lip and eye surgery I think he looks even better again. He could go onto bigger things, perhaps appearing in the install for Expression Blend, which I'm told has a much higher quality bar.

nicer eyes and mouth

Read On...


Thu, 29 Nov 2007 10:23:01 GMT

Fuzzy Search: Check this out and report back please, o lazy web.

type in the sproc or table name... hey presto it appears as you type! Even forgives bad spelling!

Ah-ha! A fine example of incremental search can be seen in JCooney's excellent add-in for SQL Server Management Studio 2005.

You begin to type the name of the object you're after -- and hey presto, using some mega-tricky fuzzy logic it finds every vaguely related to what you've typed.

Very useful if you find yourself performing Exploratory SQL Development -- or even if you just suffer NADD and can't remember the exact name of the sprocs you just wrote.

The fuzzy search feature is provided by Australian Micro-ISV Shuffle Text. At their blog you will find an incredible, epic and very honest post about building a micro isv.

The landing page for shuffletext highlight (their fuzzy search tool) claims:

only 3-4 lines of code required to get Highlight integrated in to your .NET app!

Bold claims! Brassy stuff!

How about this, o lazy web...

you check it out, download it for me, try it out, and get back to me: is it that easy to use?

Does the fuzzy search actually work? or is it just some crackpot hairbrain fool's gold banter from a bunch of ninkompoop hasbeen wannabe's? The sort of stuff JCooney usually includes in his 'works on my machine' code? Or is it as clever and easy to use as it appears?

Nifty tool... if we can find a way to include it in TimeSnapper then I'm sure we will!

Read On...


Thu, 29 Nov 2007 10:06:24 GMT

Idea: Ribbon Bar Item Finder

type in the property you want and the relevant tab will light up with the control highlighted

As a special reward to the people with longer attention spans, I've included a joke near the end of this blog entry. I highly recommend continuing up to that point, at least, as it is certainly one of the funnier jokes that has been written since, let us say, the invention of trans-human discourse.

But first, here's a free idea which I would like to share with our old buddies, the Office Team: why not add a 'finder' at the top of your nifty ribbon bars?

(Click here to keep reading... and remember there's a clever joke at the end.)

Read On...


Mon, 26 Nov 2007 09:20:55 GMT

Beautiful Code, or rather, Beaut Comments.

My code isn't worth boasting about, but I think I've written some nice comments in my time.

Here's a comment from TimeSnapper that I'm particularly proud of.

comment representing timebar control

It uses an ascii diagram to describe how a bunch of constants relate to the shape of the TimeBar control:

timebar control itself

One day, hopefully my best work will be in the code, not just the comments ;-)

(The obvious side thought is -- why can't we embed diagrams and images in the comments of our code? Or at least some kind of textile-style wiki-like markup/markdown? And how much does that thought make you shudder as a potential avenue of IDE abuse?)

Read On...


Wed, 21 Nov 2007 21:36:38 GMT

Challenge: Changing the stored credentials on 64 instances of IIS every 30 days

I'm no web farmer, and don't have responsibility for any web farms. But here's an interesting challeng I've been asked about, second hand.

Say you have 64 instances of IIS 6.0, running on 64 different machines.

You've set the credentials in IIS to use a particular domain user, say "MyDomain\MyIISAdmin"

But every 30 days the password will be changed, in line with corporate policy.

The "solution" according to one company was "Well you'll just have to change it manually because microsoft have no solution to this."

I don't buy that for a second! What would be your plan of attack? How would you crack this tough nut?

Read On...


Thu, 15 Nov 2007 10:50:41 GMT

SecretGeek: live and dangerous!!

This Tuesday, 20th November, I'll be speaking the Queensland MSDN User group.

If you're in the Brisbane region, please come along!

Time: 17:30 for 18:00 - 19:30
Location: Microsoft Brisbane office, Level 9, Waterfront Place, 1 Eagle St, Brisbane

Here's the topic...

Coming out of the garage: Build your own tiny software company.

Brisbane's most handsome developer answers such age old riddles as:

  • Why is a MicroISV better than a license to print money?
  • What simple steps can I take to turn my latent ideas into a source of passive income?

A walkthrough of what's involved in establishing your personal software empire, without resorting to cyber crime.

Leon is an independent .net consultant, responsible for TimeSnapper.com and secretGeek.net.

(While they mention my incredible good looks they fail to mention that I'll be sporting a plush moustache, which I'll explain below)

Robert Crago will also be speaking, on Mobile PC Development, and in particular:

A Pen is NOT a Mouse

Robert will demonstrate how ease of use can dramatically improve only if the full power of the pen is harnessed. New ways of inputting and selecting will be demonstrated, along with several innovative pen-centric controls for both TabletPC and Windows Mobile devices. Windows Mobile 6.0 WispLite ink and handwriting recognition will be featured. End users will learn what to look for in a great pen-powered application.

I'm very much looking forward to it and hope to see every last one of you there, regardless of your geographical dispersal.

Due to my current independent status, you'll observe that this is the first time I've spoken to anybody other than my invisible pet cat in over three weeks. It should be amusing and very confronting. Bring tranquilisers.

Now about that moustache...

1 in 6 men suffer depression and most do not seek help.

Untreated depression is a leading risk factor for suicide. Bummer!

Last year in Australia, almost 20,000 men were diagnosed with prostate cancer, and almost 3000 died.

All through November I'm growin a mo, to bring ridicule upon myself and attention to this important cause.

To donate:
go to http://www.movember.com/au/donate, enter my registration number 83250 and your credit card details. Seven dollars ought to do it.

For Aussies:
You can instead send a cheque, payable to the "Movember Foundation", with my registration Number: 83250.

Send it to:

PO Box 292,
Prahran VIC 3181.
Donations over $2 are tax deductible.

Money raised by Mo-vember is donated to the Prostate Cancer Foundation of Australia and beyondblue - the national depression initiative, which will use the funds to create awareness, fund research and increase support networks for those men who suffer from prostate cancer and male depression.

Thanks for your support, and I hope to see ya on tuesday.

(False bravado regarding personal appearance is a trick i stole outright from that ugly misfit, justice gray. Cheers justice!)

Read On...


Thu, 15 Nov 2007 00:02:53 GMT

New Sniglet: An Ungument

An ungument is the complete opposite of an argument. And when you compare the difference between an ungument and an argument, you may realise that only an ungument has any merit.

An ungument is where two people converse, each of them willing to have their opinion changed by the other person.

Contrast this with an argument, where two people, each fixed in their own belief, use rhetoric and device to try and convince an audience that their opponent is wrong in their belief.

Unguments are just as feisty as arguments -- as a person may have many objections that need to be overcome before they will gratefully relinquish their old opinion.

Once an argument/ungument is concluded you may hear this kind of thought expressed by the loser/winner:

"Ah, I lost the argument, yes, but I won the ungument, and know more now than I once did. My fellow ungumenter has a way to go and hopefully one day he can lose his own arguments and gain an ungument for himself."

It's better to win an ungument than an argument.

Read On...


Wed, 14 Nov 2007 10:10:54 GMT

Revolutionary (versus Evolutionary) Code Generation

It's just about time to throw out all my code and rewrite it in {x}. Again.

Many of the changes to the .net framework in the last few years have allowed me to get away with just refactoring some of my code, or perhaps discarding the ugliest portions of it. Over time it seems to reduce down, like a knob of butter simmering on a hot plate.

But with the syntax changes in 3.0, it seems that almost everything I've written can be rearranged into a simpler style. And the biggest effects will be felt in the data access code: this means my use of code generation is set to change drastically.

First up -- a short run down of my general approach in regards to code generation.

The Evolutionary Approach

1. Write good code, manually.

Even if you'll eventually 'generate' the code, you want to first be an expert at writing it manually.

This is the wax-on, wax-off part of the game.

2. Move logic away from the user interface, into 'business' classes.

User interface and 'business logic' will each go through big changes -- indpendently of each other. Separating the two is such common advice that it's often treated gospel to many. Either way, it's usually worth it.

3. Refactor code into small reusable portions where possible.

You want to avoid repetition. So where the same code is repeated in slightly different ways, you extract this into a small helper class, or a utility function.

The code is now smaller, and neater -- but it's not gone altogether.

4. Convert what's left into templates

Take the remaining code, look at what overall patterns exist and convert the code into templates (CodeSmith for me, kiddo!) to accomodate accordingly.

A fair rule of thumb is that you should have carefully written it by hand three times before extracting it into a template.

Now, when the code generator does its work, the generated code will be the best possible code.

In theory.

So if things are going well...

The goal is to have:

  1. no repetition in manual code.
  2. no need to customize generated code.
  3. no logic in forms/code behinds.
  4. 'business logic' in 'business classes'
  5. Generated code where necessary. Less is more.

And this is evolutionary because?

Over time, as the framework improves... the libraries and templates evolve, just a little bit.

For example, when nullable types were introduced, it became easier to talk to the database (where fields are natually 'nullable').

Hence, the templates were improved in places, and the helper functions were reduced or improved in places.

Generics were a big change. Writing 'type-safe' collections went from being 'code-intensive' to trivial, e.g.(List<Person>). This made the 'list template' simpler, but didn't get rid of it altogether.

The introduction of partial classes meant that rather than customizing a generated class through inheritance, it could be done by adding a partial class. This was neat -- but hardly reduced the code that was generated.

I mentioned a revolution...

Now, I'll probably move to using Linq to SQL -- and a lot of the fundamental code generation will now be handled by the Linq To Sql generator. This is a revolutionary moment: and revolutions are not without their bloodshed.

I'm expecting trouble. I'm expecting confusion. I'm expecting mistakes.

Linq to SQL will be generating code using the goodness of Linq. Great, wonderful, shiny. But. Unlike my own CodeSmith templates, it'll be generating the sort of code that I don't yet have the experience to write manually. That's a worrying shift.

And what of the generated code it replaces? Will it replace everything that my current DAL's do? And where it falls short, can I customise the generator? Or do I need to generate extensions through a separate tool?

How good is the Linq to SQL ORM designer? I've seen already that I can't right click on a table and 'refresh'. This was a glaring oversight that annoyed me in the first five minutes... What else is in store? Is this thing ready to be part of the core process in big 'line of business' apps?

Actually... shiny new tools to play with... I guess the answer is... Bring It On!

(am i the only one who accidentally types 'ling' when i mean 'linq'? (no))

Also -- by the way, since no one I've spoken to seemed to realise this: you can get Linq to work on .net 2.0 sp1 machine, if you include the right dll's with your project.

Read On...


Wed, 14 Nov 2007 01:54:15 GMT

Fix and continue in Smalltalk

'Fix and continue' in smalltalk is similar to edit and continue in .net. But listen to how well it's described in this screencast from James Robertson. I love the metaphor he uses:

"In most environments, when you're in the debugger, what you've got is a dead patient and you're a forensic pathologist. The best you can do is figure out what killed the poor guy and then hope that the next version doesn't die of the same thing.

"In smalltalk you're a surgeon. You've got the guy laid out on a table. He's under anaesthesia, but you can patch him up and send him on his way."
James Robertson

This is reminiscent of the old medical saying:

You can always make a correct diagnosis - but sometimes, you have to wait until the autopsy
(via Dr Karl)

For an interestng rant against edit and continue, read what frans bouma said on the topic in 2003. (If you're not yet familiar with Frans -- then you might like to read his 2003 rant against stored procedures too.)

On a different track, check out this amazing Douglas Adams DocuFantasy Video from 1990. He does a pretty nice job of pre-empting YouTube, the internet, and of covering the pre-history of the pre-internet as it stood at that time. A clippy like butler 'agent' even makes an appearance.

Read On...


Mon, 12 Nov 2007 21:57:50 GMT

Who's the customer?

The customer is always right, right... but who is the customer? Would you recognise them if you met them?

You're a company that makes its money from selling ads as part of its search results. Who's the customer?

  1. The companies who wish to advertise
  2. The people who perform the searches

You work for a company -- you sell software to pharmacies, and that software is used by its sales staff to help diagnose members of the public. Who's the customer?

  1. Your boss
  2. The pharmacies
  3. The staff at the pharmacies
  4. The people who are diagnosed

Anyone?

Read On...


Sun, 11 Nov 2007 11:37:39 GMT

Designer vs Developer

Microsoft Australia have put out a site named "Designer vs Developer" where the challenge is to guess whether someone is a designer or a developer.

On the one hand this is the most ridiculous piece of thinly veiled marketing I've ever seen.

On the other hand -- it's really addictive, and far too entertaining!

The surprise for me was just how bad I am at telling a designer from a developer. I averaged below 50% -- worse than you'd expect from guessing alone.

Designer vs Developer -- take a guess.

Read On...


Sat, 10 Nov 2007 10:51:53 GMT

The great big leaky sales funnel: a micro-ISV primer

1,000,000 people read about timesnapper...

50% don't click on the link to the website. (500,000 people remain)

50% visit the site, don't bother to download it. (250,000 people remain)

50% begin to install, but get distracted and forget. (125,000 people remain)

50% install TimeSnapper, but never run it again. (62,500 people remain)

50% run it, but can't work out how to use it. (31,250 people remain)

50% can use it, but don't find it very useful. (15,625 people remain)

50% want to buy it, but can't find the website again. (7,812 people remain)

50% find the website, but can't see where to purchase it. (3906 people remain)

50% find where to purchase it, but don't like the price. (1953 people remain)

50% don't mind the price, but don't trust paypal. (977 people remain)

50% trust pay pal, but enter the wrong credit card details. (488 people remain)

And that's how 1,000,000 people can become your first 500 precious customers!

Double the effectiveness of any one step in the chain, and you double the number of customers at the end of it all.

Obviously, once you've found a customer, treat 'em good. Listen to what they suggest in the forums, help them when they have problems.

(I'm currently preparing a talk for the Queensland MSDN user group -- November 20 -- about building a micro ISV. The above thought struck me, so i decided to share it here.)

Read On...


Sat, 10 Nov 2007 01:46:05 GMT

Fluidic APIs are stupid... NOT!

People rave about Ruby with its fancy schmancy ability to construct internal DSL's (Domain Specific Languages). The oft-touted example is:

20.minutes.ago

In .net we now have 'extension methods', which let us do all sorts of lingustic gymnastics, including 20.minutes.ago (albeit with a few extra brackets in C#) (phil haack posted an example 6.months.ago)

But the examples are all a little contrived: 20.minutes.ago happens to form a logical chain where each word passes a value to the following word. But very few phrases are like that.

The real question is: can we turn all of our .net code into fluidic and beautiful prose?

Can we implement, for example, the Shakespeare Programming Language as an internal DSL, in C#?

Here goes...

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