I’m scratching my head over trees again. Rendering trees. It’s really the fun bit when you’re thinking hardest about a problem and really chiselling the code to get the essence of what you’re trying to do expressed on the page. I think there are a lot of similarities with writing – but much of coding is just teasing the ideas into life once they have been expressed in a usable form whereas with writing it’s continuous ideas and how they play against each other.
Having discovered the C# functional lambda stuff in IEnumerators I now can’t decide whether this is a good thing or not. Changing the programming context just for the sake of it being cool or whizzy sacrifices readability of course and with the complex stuff you don’t want to bury it in flashy language just because you think it’s the new(ish) thing to do.
And then of course you do actually write something edgy because you’re buried up to your neck in a problem and almost as soon as you’ve written it and tested that it does indeed miraculously do what you want it to .. you can’t work out if what you’re written is actually right or if it’s just some horrible fluke or if it will break with different test data. And rather than testing it to destruction there and then you just wander off and do something else and will have to spend a long time getting to grips with it all again the next time you come back.
So you can feel your brain muscles working.
Anyway I’ve had one of those kind of days today – edgy, brain working, things working, code coming out just looking right. It doesn’t happen all the time but when it does it makes me want to stop immediately and go and drink beer to a long lost scintilla of genius.