HeadSpin Blog http://blog.headspin.com You know what the truth is? The truth is something my neighbor believes. If I want to make friends with him I ask him what he believes. He tells me and I say “Yeah, Yeah ain’t it the Truth?” Tue, 07 Sep 2010 21:05:39 +0000 en hourly 1 http://wordpress.org/?v=3.1-alpha Thoughts on Random Thoughts http://blog.headspin.com/?p=286 http://blog.headspin.com/?p=286#comments Tue, 07 Sep 2010 20:14:40 +0000 admin http://blog.headspin.com/?p=286 Continue reading ]]> Yesterday I put up a post on my blog about programming. I did this because I had read an earlier post that inspired me about the idea of trying to write something every day. The basic idea was that if you keep at it you will get better. So I had a go.

The incredible irony here is that one of the points I was making in my blog post was that much of the skill of a programmer seems to me to be innate and thus I wondered if it can be taught. So while I was demonstrating my belief in the idea of practice, I was demonstrating it by questioning it.

Um whatever,  on a good day 10 people read my blog. Thanks sis!

The post actually got picked up on a few sites and I got literally 500x more traffic than I expected. From this experience I learned a few things:

1) Wp-cache is a good thing.
2) I really do need practice writing.
3) I would have been alot better off with a few shorter posts.
When you title something “Some random thoughts on …” You pretty much give up any pretense of saying you are making a coherent argument about anything. That should have been my first clue that my post wasn’t ready for prime time.

Still reading all the comments does help me realize what I was trying to say:

1) I think people’s ability to deal with complexity seems at least to be some kind of innate trait
2) Managing complexity is a key skill in programming
3) Abstractions can both reduce and introduce complexity
4) Javascript is more complex than many people think
5) We should worry about 4) since we seem to be using it for everything now.

I’ll try to do better next time.

Things I wasn’t trying to say:

1) I am awesome
2) If you aren’t awesome like me quit trying, you will always be a loser.

For the record. I don’t think I am awesome. I have done some cool stuff and some crappy stuff. I have worked with people who were both better and worse at this than me. I’d say I am good not great. When I was 26 maybe I was great. Its hard to remember.

I also don’t think people can’t improve. That wasn’t my point. People get better there is just a limit on how much better they will get.  I ride my bike almost everyday.  I actually climb hills better than when I was 26, but I am getting no closer to winning the Tour De France much less a local cyclocross race.

]]>
http://blog.headspin.com/?feed=rss2&p=286 3
Some random thoughts on programming http://blog.headspin.com/?p=274 http://blog.headspin.com/?p=274#comments Mon, 06 Sep 2010 23:02:39 +0000 admin http://blog.headspin.com/?p=274 Continue reading ]]> Since this post actually got read by people I made a follow up to clarify some of what I was saying. Thanks internet for helping me realize how bad I am at making my point.

As I near the end of my third decade programming, I keep finding myself coming back to pondering the same kind of questions.

  • Why are some people good at this and some are not?
  • Can the latter be trained to be the former?
  • What is the role of language, development environment, methodology, etc. in improving productivity?

I’ve always been partial to the “hacker”. The person who can just flat out code. For some people this seems to come easy. I have been lucky enough to work with a few people like this and it has been awesome. As you talk with them about a problem they are already breaking it down and have an idea of how the final system will work. I don’t mean that other aspects of professionalism, experience, etc. aren’t important its just that I believe in the end there is a raw kind of talent that you can’t teach. My wife can sing, I can’t, and not for lack of practice.  She practices, but she can also belt out a perfect tune without hardly trying.

What are the core talents that makes someone a good hacker? I think there are two:

  1. The ability to break down an idea/system into an abstract set of “concepts and actions”
  2. The ability to understand how these “concepts and actions” execute in a particular environment.

Note that I didn’t say anything about coding. Coding is actually the least interesting part. If you can do the others well, coding is just another kind of typing. Coding is the thing your fingers do while your mind is flipping between 1) and 2). Learning a new language is less about learning the syntax than it is about learning the execution model.

Writing good, correct code involves not just conceiving of how something should be 1) but also understanding all that can happen 2).

I honestly don’t know if these things can be taught.

In 30 years I have only seen a few examples where a mediocre programmer became good or a good one became great and zero examples of a mediocre programmer becoming great.

What does this mean for people who want to build large software systems? The easy answer is to only hire great people. Which is fine when you can do it but not everyone can be or hire the best so what is left for the majority?

What should be done to make things easier for people aren’t in the top 5%?

There are lots of nice things that have been invented like source code control, higher level languages, garbage collection, etc. which reduce or abstract away some of the problems. And while sometimes these abstractions are leaky, they are really one of the few weapons we have against the beast called Complexity. Complexity is the key problem we face, especially if we are not wizards because:

A persons talent with regard to 1)  and 2) above determine how much complexity they can deal with.

When I was in gradual school at UNC-CH Fred Brooks (the mythical man month guy) used to talk about Complexity as being a major thing which makes programming hard. Its not something easily cast aside:
Quoting Dr Brooks:

The complexity of software is an essential property, not an accidental one. Hence, descriptions of a software entity that abstract away its complexity often abstract away its essence.

I wish I had appreciated everything Fred said when I was a cocky grad student as much as I appreciate it today… sigh.

Some things are hard because they are hard and not much can be done about them. Still our goal needs to be to not try to make it worse than it is.

To this end, some people say:

Do the simplest thing that will work.

I agree but prefer this formulation:

Strive for the simplest thing that can’t possibly fail.

If you think about what can go wrong you are more likely to find the problems than if you think about what will go right.

I wish I could say we were making progress in reducing complexity but we seem to be adding it into our programming environments rather than removing it. One of the things I have thought about recently is the complexity of these abstractions themselves. Programming languages of today are so much more abstracted and complex than what I learned on (assembler, basic, pascal, C).

For example the world (or at least the web) is currently engaged in writing or rewriting everything in Javascript. Not because JS is so awesome, but because 15 years ago it got stuck into browsers, then we all got stuck with browsers and thus we are all stuck with JS. Sure there’s lots of server stuff done in various other languages but really how long can that last? How long can one justify having to write 2 parts of an application in 2 different languages?

The future looks like node.js.

I am not a JS hater. Its just that I used to think Javascript was a simple language. As someone who wrote 3D Game engine code in C++, my thought was “if these webkids can do JS then it can’t be that complicated”. After building a webapp using Javascript/Dojo/svg to create a realtime browser for genetic information, I realize how wrong I was.

Sure its all nice and simple when you are doing this:

$(“#imhungry”).click(function() { alert(“food”);});

However a lot of complexity lurks just under hood. And its the way it all interacts that concerns me. Crockford called it  Lisp in C’s clothing. This should excite a few people and scare the crap out of the rest.

JS has lots of opportunity for expressing yourself in interesting ways. Expressiveness is good, but too much of it can create more problems than it solves. Back when C++ was a bunch of source code you downloaded from at&t and you had to compile the complier yourself before you could use it, we grad students stayed up late eating bad fried chicken and debating the merits of O-O programming. It was at this point I began to wonder if the productivity gains of O-O were more the offset by the time spent debating about what good O-O practice is. This tape has played in my head more than a few times in my career.

Its not all bad of course: On balance, garbage collection is a win and I see lots of benefits to using closures in JS, but the underlying complexities of things escape most people and their interactions are understood by even fewer. If you have to slog through this (and you should) to understand what happens when you call a function, you are cutting out alot of people from fully understanding what is going on when thier code executes.

I hope that some of this will be address by standards of practice. Things like Google’s guidelines seem to be a good start.  As with C++, I think that the best hope for improving productivity will actually be to agree on limits on how we use these tools rather than seeing how far we can push the envelope.

Well except for wizards and we know who we are :)

]]>
http://blog.headspin.com/?feed=rss2&p=274 28
Obsession http://blog.headspin.com/?p=268 http://blog.headspin.com/?p=268#comments Tue, 06 Jul 2010 15:08:49 +0000 admin http://blog.headspin.com/?p=268 Sometimes when I am feeling a little obsessed with something. I wonder where I stand on some kind of scale relative to other people. Today I wonder, what FedEx package has had the most hits on its tracking page.

]]>
http://blog.headspin.com/?feed=rss2&p=268 0
Nimbulist http://blog.headspin.com/?p=265 http://blog.headspin.com/?p=265#comments Wed, 23 Jun 2010 20:35:25 +0000 admin http://blog.headspin.com/?p=265 Continue reading ]]> I finally actually finished an iPhone app and put it in the store. Its pretty simple but solves a problem I actually had. I am a big user of Evernote and but thier iPhone client is pretty clunky for editing todo lists. Nimbulist (app store link) lets you do this quickly with what I think is the minimal number of required touches.

]]>
http://blog.headspin.com/?feed=rss2&p=265 0
Getting Auto updates to work in recent WordPress http://blog.headspin.com/?p=262 http://blog.headspin.com/?p=262#comments Tue, 15 Jun 2010 17:40:04 +0000 admin http://blog.headspin.com/?p=262 If you are in this hell:

Connection Information:

To preform the requested action…

This guy is your friend:

http://www.kgarner.com/blog/archives/2009/06/13/direct-auto-update-on-wordpress-2-8/

Quick version:

define('FS_METHOD', 'direct');
]]>
http://blog.headspin.com/?feed=rss2&p=262 0
Bike ride photo… http://blog.headspin.com/?p=258 http://blog.headspin.com/?p=258#comments Mon, 24 May 2010 15:27:56 +0000 admin http://blog.headspin.com/?p=258 Saw this on a ride recently.

What exactly is GOD charging these days for Freedom?

]]>
http://blog.headspin.com/?feed=rss2&p=258 0
Something I learned yesterday http://blog.headspin.com/?p=256 http://blog.headspin.com/?p=256#comments Sun, 25 Apr 2010 01:34:06 +0000 admin http://blog.headspin.com/?p=256 Continue reading ]]> If you stop to ask directions from people carrying shotguns (in this case security people walking along the road),  they may ask you for a ride if they do, Its probably going to end up that you have people with shotguns in the back seat of your car for a while. For me at least it worked out this time but I may not pick people with guns to ask for directions again.

]]>
http://blog.headspin.com/?feed=rss2&p=256 0
The best part of travel http://blog.headspin.com/?p=255 http://blog.headspin.com/?p=255#comments Thu, 22 Apr 2010 06:27:36 +0000 admin http://blog.headspin.com/?p=255 Continue reading ]]> Starts after the plane lands.

just starting an 11 day trip to el Salvador with optional side trip to Guatemala. Writing this using the neighbors’ wifi from my friends house here in auachapan. Flights we all good and I’m looking forward to heading to sonsonate tomorrow.

Hopefully there will be better photos then too.

Btw. Something I learned recently. Here they lock your cell phone to a sim card the old schooll way. They glue it.

]]>
http://blog.headspin.com/?feed=rss2&p=255 0
Heading south http://blog.headspin.com/?p=252 http://blog.headspin.com/?p=252#comments Tue, 20 Apr 2010 13:51:45 +0000 admin http://blog.headspin.com/?p=252 Heading back to El Salvador for 11 days tomorrow. Been looking forward to this trip for a while. I hope to post some updates here.

]]>
http://blog.headspin.com/?feed=rss2&p=252 0
Changing fortunes http://blog.headspin.com/?p=247 http://blog.headspin.com/?p=247#comments Thu, 15 Apr 2010 14:33:28 +0000 admin http://blog.headspin.com/?p=247 Nothing new here. But the visuals are pretty striking to me:

The 1990s

The 2000s

]]>
http://blog.headspin.com/?feed=rss2&p=247 0