Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, 21 August 2009

Time for new project type?

I’m not a web developer. While I did do some classic ASP earlier in my career, it’s mostly been about classic (Delphi) Win32 applications for me. So recently I thought I’d have a look at ASP.NET. At the same time, I thought I’d also have a look at ASP.NET MVC since that seems to be the in thing at the moment. Now I have no bias either way. I’m fairly new to both, but I just loved the simplicity of ASP.NET MVC. I’m not sure if simplicity is the word I need here, because actually, classic ASP.NET is perhaps the easier option for an inexperienced developer, as it uses abstractions to make Web development a drag and drop affair. Still, ASP.NET MVC just felt more natural to me. I’m sure had I looked at it 10-12 years ago (and had ASP.NET and ASP.NET MVC been around), I would have loved ASP.NET, and wondered why they even bothered with MVC.

This got me thinking about my day job. Since Delphi 1 we’ve opened up the IDE and clicked on New VCL Forms Application, got our empty form and started dropping components on the surface. We drop a few more components, create a few bindings, write a few event handlers, and hey presto we have an application. I bet every Delphi developer started out that way, and it works, but as you get more experienced, you begin to realise that for any real-world, half decent application, this sort of coding style just doesn’t scale well, and more importantly doesn’t maintain well. So you add a datamodule, and move all your database components to it, and feel happy for all of about 3 minutes. Something still bothers you though, so you get rid of the datamodules, and get rid of the data aware components, and perhaps write a framework, or even get a third party one. You read the book on design patterns, and see how many of them you can fit into your application.

Now that’s all well and good, and your framework may be great, but it’s different than my framework. Actually, I keep changing my framework of choice depending on what article or book I read last. My point is, that there is no consistency. So while the data-aware component model works well for beginners, and I would not advocate getting rid of it, I think Delphi is more than mature enough to have a new model. Sure we can look at third-party vendors for this model, or we can write it ourselves, but if we want real consistency, it needs to be in the IDE right next to Create New VCL Forms Application, and everybody needs to have it in their IDE. That way, when that new developer outgrows the 100 components per form model, and he or she is ready for the next level, there’s a clear path.

So how about it Embarcadero? Perhaps it’s time for Delphi to grow up a bit. I dunno, some kind of MVC pattern perhaps. Perhaps Passive View. Why not more than one? Wouldn’t you like to see this in the menu under File|New

New Passive View Project

Or maybe it’s just me!

Sunday, 10 May 2009

Consumer Protection

The European Commission is proposing wants to make developers, liable for their own code. When they say developers, I guess they mean the actual company that releases the software, rather than the individual developer.

I have mixed feelings about this. As a developer, this would mean a fundamental change in the way we do things. It will probably stifle innovation, as new developments will become increasingly expensive. As a user, I’d welcome it. No more security holes in Microsoft browsers, and more importantly to me, no more bugs in my favourite IDE, Delphi. At the very least, companies would have to be more responsive with their bug fix updates (hint, hint Codegear. I’m still waiting for update 3. At this rate though, the EC will have passed their law, and Codegear will have to release their update!)

Is this a good thing, or a bad thing? Have we, as developers, had it too easy? Have we relied on our users to find our bugs?

Monday, 23 February 2009

My definition of good code

Following on from my post regarding JclExprEval of the Jedi Code Library, Barry Kelly, left me a comment that in fact the unit had been documented, and he gave me a link to it.

I don't think I'm going to even bother downloading it. I can't really see what the documentation can give me that looking at the code hasn't (although being a curious fellow, I no doubt will). The is self documenting. Considering it was all new code to me, it took me no more than a few minutes to make the necessary changes to it to get it to work in my situation.

So while I have said before that to describe what good code is is rather difficult, my new definition for good code is any code which is discoverable and maintainable without resorting to documentation (because be honest, who reads the manual?) is good code. I probably should add it should also do what it's supposed to, but that's a given, no?

Without flattering Mr Kelly too much, JclExprEval fits that description perfectly. Now, back to the awful code that I was labouring with on Friday, which certainly doesn't fit that description.

What did you learn today?

Do you ever wonder how accountants manage to get out of bed every day and go to work? Apart from the occasional, new tax law, their profession has basically stayed the same for hundreds of years. An accountant is basically doing the same thing today, that he did yesterday.

I think we're in a profession that by definition is interesting every day. You don't even have to swap technologies every couple of days to learn something new. I've been doing Object Pascal and Delphi for a long time now, but I learnt something new in Delphi today, and today is no exception. In fact the days I learn nothing are few and far between.

Some nights I can't sleep because I've just figured out a way for the algorithm I've been toiling over to work 50% faster than I had been currently implementing it. I actually wake up most mornings, eager to fire up Delphi. I think we're lucky.

The great thing is, that no matter what I learnt or did today, tomorrow will be much better. One of the questions I answered on Stack Overflow, was What was the first program you wrote, and you were proud of? I thought about this for while, and each time I thought of something cool I wrote, I immediately thought of something cooler I did a little later. So finally I answered thus :

I always think the software I wrote yesterday sucks, the software I'm writing today is cool, and the software I'm going to write tomorrow will rock!

I wonder if on accountant forums (do they exist) anybody ever asks What's the first balance sheet you did, and you were proud of? It just doesn't have the same ring to it, does it?

Friday, 20 February 2009

See what I mean?

I recently posted about the difference between developers and good developers. The point I made is being confirmed to me on a little application I've been asked to have a look at. The application in question is written in Delphi, by someone in the organisation who is not a developer. I knew this before I saw the code, but I can confirm the fact now that I have.

This is what happens when you have someone who thinks How hard can it be? That's the problem with Delphi, it makes it look so easy. And it is very easy to write your Hello World applications. In my opinion, it's easier than .NET (although that is not too hard to get started in either)

The problem is we don't have enough Delphi developers. Someone needs a small application. It's one form, spread over two tabs, less than a weeks work. All developers are tied up, and the conversation goes :

Manager 1 - Didn't Joe do some VB programming a few years back?

Manager 2 - Yes, I believe he did.

Manager 1 - Jolly good, get him to write that new application we need.

(The names have been changed to protect the guilty)

That's where the problems started. When it was ready, the testers noted there were a lot of bugs, and the more that were fixed, the more cropped up. That's where I come in. I have to try and salvage something from this mess.

So what do I have? A small application with a lot of Access Violations is what I have.. Some when you start it up, others when you press certain buttons, and a few more when you close it down. I had a quick look at the code, and found that while the developer (and I use the word in the loosest possible way) seems to know about classes and objects as he/she has created a hierarchy of classes, he doesn't really understand it. It's not all drag and drop (oh how I wish it was) It goes down hill from there. He/she has evidently not heard of encapsulation. All variables are exposed as public (glorified globals). Forget polymorphism, and someone forgot to tell him/her that Delphi has no garbage collector. Mix all of that together and you get a mess. Most of the time he/she has made no attempt to free objects. A few times, he/she has tried, but thought that setting an object instance to nil would do the trick. variables are declared (publicly) in base classes and then created when needed. Sometimes multiple times, thus leaking memory like a sieve. I could go on and on, but I don't want to cry and short my keyboard.

So would garbage collection have made a difference? Not really, it would still have been a mess, just a different type of mess.

Saturday, 7 February 2009

Should we really learn C?

I'm referring to something Joel Spolsky keeps telling Jeff Atwood (both of Stackoverflow) Joel says that even if you are not going to be programming in C, learning it will stand you in good stead. As much as I hate C (hate is perhaps too strong a word), I kind of agree with him. I was thinking about this in the context of garbage collection. Everybody seems to love garbage collection, and it seems to be the number one must have feature for Delphi. I guess the theory goes, if you don't have to think about freeing your objects, then your code will have less bugs in it, and thus by default you are a better programmer. Does it work that way? Not really. I recently had the misfortune to have a look at some Delphi code written by someone who clearly didn't know that objects were his responsibility. Objects were being created left, right and centre, and not being freed after use. There were a few attempts at freeing objects, but this was just a misguided assignment of nil to various objects. It was a mess, and the application leaked like a sieve (a colander for you Americans out there!) Would garbage collection have made his code any better? To be honest, I don't think it would. Ok, it would have freed the developer from the responsibility of freeing his objects, but he just didn't get the basics of being a programmer. His code would still have sucked. It would have leaked a little less for sure, but it would still have been a maintenance nightmare. And you know what, garbage collection would have probably masked the fact this guy didn't know what he was doing. His application would have worked. We'd perhaps have noticed further down the line when it is much more expensive to fix. Delphi wasn't as forgiving, and rudely protested with multiple access violations.

So, yes, garbage collection is cool, saves time and typing (40% I'm told), but I fear we're growing a generation of script kiddies (apologies to script gurus, who know what they are doing), who can get an application (albeit a small one) up and running, but have created an albatross around the neck of the next guy to inherit their code. So, yeah, C maybe a dying language, and pointer manipulation and managing your own memory maybe dying concepts, but learning the basics of how to program is essential, and it's these languages and concepts that best help you do that.

There's a perfect analogy in the world of (real)languages. Latin is a dead language, but for years, it was taught in schools, and students hated it, because it was of no use to them in every day life, or so they thought. The thing is though, so many modern languages are based on Latin, that anyone with a knowledge of Latin, is automatically a better linguist. His English, Italian, French, Spanish etc etc will automatically be so much better for having learnt Latin.

So by all means, let's have garbage collection, let's have all these coder aids, but let's not forget how to program.

Thursday, 5 February 2009

When did we all get so lazy?

There seems to be a movement towards writing less code. I see it all the time.

  1. You have C and C# evangelists who can't stand Pascal because they can do in two key strokes, what Pascal does in nine ({ and } as opposed to begin and end;) This one's a personal preference issue. Personally I find begin and end 100 times more readable, but I also understand that others may prefer their curly braces.
  2. In my post about garbage collection, some of the commentators reminded me that if you use Delphi, because it doesn't have garbage collection, you have to write 40% more code (all those silly try..finally clauses). Again, you may have valid reasons to want garbage collection, and I respect those reasons. But don;t tell me writing less code is a good reason.
  3. The push towards functional programming is another one. I'm told that using a functional programming language for certain problems would result in me writing a lot less code. Look Ma, I wrote all that code in one line! I may be a bit harsh here, as some of the functional constructs are really elegant, but what I'm getting at is that use something by all means if it results in your code being more readable, and not because it results in a few less lines.
  4. Pascal requires an interface and an implementation section. You declare a class twice. It must be bad right? Like I've said before, for me, a Pascal class is immediately readable. The interface has no clutter. To achieve the same thing with say, a C# class you need code folding.

I could go on and on. I think the theory goes that if you can type, say 70 wpm, and that you can't physically type faster than that, then the only way to churn applications out faster is to use languages and constructs that need less typing. The theory implies that if you are writing 40% less code than I am, (and we both type at the same speed), then you're producing 40% more work than I am. What the theory conveniently ignores is that I may think 40% faster than you. I'm not saying that writing less code is a bad thing. I will always write less code if I can, but never at the expense of clarity. I will add begin and end where the compiler doesn't need them if I think it makes the code less ambiguous. I'll not use the with construct , and retype the object or record instance each and every time, if I think the code is more readable for it (it always is). The important thing to remember is the speed a developer can write good maintainable code is rarely due to the number of characters he/she can churn out. A lot of it is to do with the thought that goes into producing the code, when the hands are no where near the keyboard. It's to do with the cost of maintenance of that code. This all reminds me of those C competitions where C enthusiasts would vie to write the shortest piece of code that actually does something. It doesn't matter that you had to sit down with pen and paper for a few hours to figure out what his little program did. Aim for clarity and eliminate ambiguity. If that means you end up writing a bit more code, so be it, in the long run you'll actually save time.

Wednesday, 4 February 2009

Born Again Delphi?

I've just read an extremely interesting (and long) article about the future of Delphi. The catalyst for the article was Nick Hodges post on the future of Delphi. Some interesting things on the wish list for the new Delphi.

Compiler Speed

For most of my professional life I have used Delphi, and Turbo Pascal before that. I take the compiler speed for granted, and compile my code often, just because I can. I think I'd notice if the Delphi compiler was to all of a sudden take a lot longer to produce the goods, and I would not be happy!

Interface/Implementation

I'm all for typing less code, but not at the expense of clarity. Having to declare the class in the interface section, and the implement it in the implementation section may seem like a waste of time, but it makes Pascal so much more readable than say C#. Even if we didn't have shortcuts such as ctrl+c (complete class) or ctrl+shift+up and ctrl+shift+dn (toggle between interface and implementation), I'd still want a separate interface and implementation section.

Declare Inline Variables

I've started using these in Delphi Prism, and they rock. Now this is one place where you write less code (albeit a little less), but clarity improves.

for var i : Integer := 0 to 20 do

Case Sensitivity

No. No. No. Why? Why? Why? I don't get it. If I have two variables test and Test, in the same scope, then I've just introduced an ambiguity. Which one do I use? Which one did I mean to use last year?

No. No. No.

With Statement

I don't like it, I don't use it, and I think people who write code such as :

with MyObject, HisObject, TheirObject do

Should be shot! (yes I have seen code like that)

Smart Pointers and Garbage Collection

The author is basically for some form of smart pointers and against garbage collection. I'm on the fence here. As long as anything is optional in this area, then go for it. I'll make my decision after I've seen it in action.

There were a few other points, but the ones above were the interesting ones. I just hope the rewrite of the Delphi compiler is the right thing to do. Look what happened to Netscape when they decided to rewrite their flagship product!

Monday, 12 January 2009

Is Google your cup of tea?

I've just read a report that says that every time you do two Google searches, it produces the same amount of carbon dioxide as boiling a kettle for a cup of tea. Wow. That's a lot of tea. Or rather a lot of carbon dioxides!

The problem is we're addicted to Google(replace the search engine of your choice here). Not addicted in a "a little bit of a therapy, and I can give it up" kind of way, but the "I just can't live without it" way.

Just today, I was trying to install CruiseControl.NET. I installed IIS, then installed Cruise Control, then tried to bring up the Web Dashboard.

Prism12-01-2009-19.19.25

Now what? Well, 2 minutes and half a cup of tea later I had my answer. It's a problem with IIS when installed after the .NET framework. Just run the following command in the framework folder (my case c:\windows\microsoft.net\framework\v2.0.50727)

aspnet_regiis -i

This apparently resets all the necessary registry keys. I tried this, and viola, it worked.

What did we use to do before the Internet and Google? I don't think they used to pay us enough for the job we did. I would have had to go out, to the local bookstore, and find a book about Continuous Integration, buy it, and hope it covered that particular problem. How many cups of tea would that have involved?

I say we should just give up on tea!

Sunday, 11 January 2009

Working from home

As I approach the fifth anniversary of working from home, I'm starting to think about the pros and cons of working remotely. Joel Spolsky has said many times on his blog and his podcast that he thinks developers should be in the office, and not work from home. Jeff Atwood his co-conspirator on the Stack Overflow podcast meanwhile is currently working from home on Stackoverflow.com, with another two developers, who are also working from home (and I don't mean his home!). He obviously thinks it's a good idea. So do I.

I get my own room, with a closing door, something I would not have at the office. I start working in the morning completely fresh, as opposed to being worn out from the hour commute. On top of all that, I'm happier than ever, because I get to see my daughter growing up. A happy developer is a contented developer is a productive developer.

Ok, so what's the catch? Well, I'm sure not everyone is cut out for working from home. It can get lonely I guess, but I have my own social life, and it never did revolve around the geeks I worked with. (no offence, I'm a geek too, just prefer the company of non-geeks to try and keep sane!) I have a fast broadband connection, with vpn access into the network at work. So I'm just in an office with a long network cable. I checkout, I commit, I do all the usual things I would do if I was in the office. Some cite communication, or lack of it as a problem. I guess it can be, but I can discuss things over the phone (for some reason, company policy prohibits Skype), I can "look over someone's shoulder" using VNC or Webex. I regularly review code with both developers and testers. It works well.

Not to be 100% biased, I would say there are two major problems, and unless you can overcome them, they might make working from home difficult. The first is motivation. Or rather lack of it. I've been doing this for so long now, that I get up in the morning, and just 'go to work'. That happens to be down the hall from the bedroom, but it's where I work. There are times when you just can't concentrate, and there are other times when you can't stop concentrating. It's the same when you're in an office, it's just that in the office, your boss is around, so you pretend to work. At home, I know that if I'm not concentrating now, I'll be productive later. So I'll do something else. The work get's done. That's the main thing. The second problem is paradoxically, the opposite of the first one. Knowing when to stop! Separating work from home life. I confess that I have more problems with this one than the first. I have no real solution for this one, except perhaps a nagging wife!

Thursday, 1 January 2009

Positive Delphi Post

I’ve been a bit negative towards Delphi in my last two posts, here and here. Actually they were negative towards Codegear/Emarcadero and not to Delphi. Delphi has been good to me, so here’s a positive post.

One of the major reasons people/companies say they can’t use Delphi for any new work is the uncertainty of where Delphi will be in a year. They say things like “What if Borland/Inprise (remember that?)/Codegear/Ebarcadero are not here in a year’s time?” All pretty good questions, but ones I’ve been hearing since about Delphi 4. The thing is Delphi may actually be in a better place than Microsoft technologies! No, here me out!

If I’d have started a project a year ago, and chose Delphi, I’d have used Delphi 2007. Right now I’d be upgrading to Delphi 2009, and adding Unicode goodness to my application and looking good for the future. Now, if I’d have decided to write my application in C# or VB.NET. I’d have probably gone for a Winforms application, and have used Linq to SQL to get to SQL Server. Well guess what, Winforms and Linq to SQL have been superseded. You’re supposed to use WPF and Entity Framework from now on, even if those two technologies feel decidedly beta at the moment. Who knows what they’ll have replaced them with in a year or two. There just doesn’t seem to be any plan there.

Happy New Year.

Monday, 29 December 2008

The Hypothetical just became Categorical

My last post was about Microsoft’s Bizspark program. When I started that post, it’s entire premise was built on the hypothesis that I would want to start a Micro ISV. As I wrote more and more of it, I kept saying to myself, why not? Give it a go? You’ve got no excuse now.

Now don’t get me wrong, it wasn’t just the cost of Delphi that kept the idea just that, an idea. There are other things, but the fear of failure is a really strong deterrent. I guess that fear is still there, but if I do fail, I won’t have spent a few thousand Dollars/Euros/Pounds setting up my development environment.

I’ve got a few ideas for products. Some of them pretty good. I figure whatever I do, I’ll be learning, and that’s always a good thing. So I signed up for Bizspark. I thought I’d have to go through hoops. I thought it would be hard. In fact it was really easy. I just found a partner willing to back me, and I’m in, I’m now a Bizspark member.

I’m slipping slowly away from my Pascal roots. It does hurt, but I have to follow my head and not my heart. At work we are moving away from Delphi, I’ve got to keep up, and start thinking more like a .NET developer, and less like a Delphi one.

A few of the comments to my previous post, said forget licenses, use a pirate copy of Delphi 2009. Well, that just doesn’t feel right to me. Ironically though, Codegear get no money from those pirates, but they get no money from those of us who just can’t afford the price of their product either. Nobody wins.

I’m sure I’ll be using Delphi for a few more years to come (First smile since the start of this post). It’s what I’m paid to do. But the decision has been made at work. Sooner or later I’ll be doing C# full time.

Monday, 22 December 2008

Program Structure – Code Folding

You know how in Delphi 2005 (could have been Delphi 8, but who actually used that?) Object Pascal was introduced to the world of code folding. Code folding, is where the IDE lets you hide certain parts of your code. Either it automatically chooses certain areas, or you can add further areas of your own.

Great, we all said. We have the same feature they have in C# and Visual Studio. Honestly though, have you ever used it in Delphi? I did initially, just because it was there, but I soon realised I just didn’t need it. Object Pascal with it’s interface and implementation sections allows you to look at a class’s declaration, and understand what it does at a glance. C# on the other hand, mingles the declaration with the implementation, which makes classes unreadable if they get above a certain size.

You can look at this from two angles.

  1. Object Pascal, while verbose is much more readable. With things like class completion and jumping between method declarations and implementation, the verbosity is not that big a deal, and anyway, I’d rather type a little more code if it makes it more readable.
  2. C# encourages you to make classes small. That’s a good thing. With Object Pascal, you can create very large classes, and still maintain readability, whereas with C#, you are forced early on to keep classes small.

So I guess the conclusion I came up with is that code folding is bad. If you need to fold code to make it readable, then your classes are probably too big. If you ignore code folding, C# actually may have an advantage here, because you are forced to some extent to keep classes small, whilst Object Pascal encourages (or at least doesn’t penalise) you to use large classes.

I think I’m going to call it a draw!

Sunday, 21 December 2008

Do I really need to be a touch Typist?

I’ve just read Lars blog post regarding programmers and touch typing. I’ve been meaning to write about this for a while as I’ve read quite a few blog posts and heard quite a few podcasts where programmers insist that touch typing is a must have skill for programmers. Now, before I comment, I have to stress that I’m not a touch typist in the true sense, in that I do not use all my fingers. I probably use around 2 or 3 fingers per hand. My speed is around 70-80 wpm and I only occasionally need to look at the keyboard.

Now for the controversial bit. I think that touch typing is not a must for a programmer. So what if you can touch type at 120 words per minute? Can you think that fast? Can you code in your head that fast? Speed of coding has absolutely nothing to do with speed of typing, but rather the speed at which you can solve problems. As I said above, my typing speed, at full tilt, approaches the 80 wpm, but if you were to count the number of words I type in a whole day of coding, and divide it by the number of hours I worked, you’re unlikely to get anything near 80 wpm. That’s because typing is just the end-result of what we do. It’s the bit that communicates what’s in our heads to our machines. It’s not typing which makes us good at what we do, it’s the brain behind it.

When someone says  a programmer must be a touch typist, I assume they are talking about speed. They assume that if you are a touch typist you are fast. And I agree, you are fast. You are fast at typing words. It doesn’t mean you are a fast coder, and it certainly doesn’t mean you are a good coder. It’s a bit like saying an artist must be quick with his brush. Does it make the final painting better?

Lars states that Touch typists are usually able to involve themselves in a discussion about something else, while touch typing. That may be true, but coders need to concentrate. They’re not just typing words, they’re writing code. If you can solve problems whilst whilst holding a discussion with someone about something completely unrelated, then your brain works differently than mine. (Not even women can multi-task where coding is involved!)

(No offence to Lars, I’ve been meaning to write this for a while!)

Saturday, 13 December 2008

Do all great programmers start young?

I was recently hearing one of the Stackoverflow podcasts, where Jeff and Joel were interviewing Steve Yegge from Google. Jeff mentioned how he started programming at the age of around 13, and how the developers he has the most affinity with are also those who started at around 13, and were largely self-taught. Steve agreed with him (being one of those who started young), and insisted that the best developers are those who start young and are self-taught. And I have to agree! Well I would, since I started at 13 too.

I remember my parents bought us a Texas Instruments TI 99/4A, when we couldn’t find any Sinclair Spectrums (I think they were called Timex in the US) in stock anywhere. It was Christmas 1981, and I was 12 going on 13. The first thing I did when we got the computer home, was to type out one of those game listings you’d find in video game magazines. I’d actually bought the magazine before the computer. After spending a few hours typing it in (my typing skills were non existent then!), I typed in run, and waited. It kind of worked, but the score at the top right hand corner of the screen was not working. Disaster! I must have typed something in wrong. So I roped in my little brother to read me line by line, while I checked for any typos. After another few hours, we finally concluded, that we had typed it in correctly. I don’t know what drove me, but I had to fix it. It was a graphical score, with each digit independent of the others. So with every increase in score, you’d increment the units column, until it were at 9, in which case, you’d set it back to 0, and increment the tens column, and so on and so forth. Seems trivial now, but it took me a few days to figure out TI-BASIC, and fix it. But boy what elation when I ran it, and it finally worked. The subsequent month’s magazine printed the bug-fix, but I had fixed it on my own. I was officially a programmer. Luckily due to a hardware quirk, while my friends played fast machine code games on their Commodore 64s and Spectrums, the TI99/4A had some drab Basic and Extended Basic games available or wildly expensive (well to a 12 year old they were)cartridges. So if you had a TI99/4A, you either learnt to program, or you made friends with the neighbours and their Commodore! I started writing games, and even advertised and sold a few tapes. (storage was on plain old audio tapes) …and so began the love affair with computers.

So when did you start programming?

Sunday, 9 November 2008

Stack Overflow

I was programming long before the internet, and long before Google. I sometimes wonder how we managed it before we had that great resource. I guess we read lots of books, and perhaps solved more problems ourselves. Or perhaps we just didn’t have as many problems as we do today. Whatever it is we used to do, I couldn’t do my job today without Google.

Well now we just may have something that in a few years time we’ll be wondering how we ever used to do our job without it.  Stackoverflow.com is that something. What is Stackoverflow.com? It’s a site where you can go and ask any programming question, and get an accurate answer pretty quickly. The genius of the site though, is how it gets developers to answer questions.

To get people to do anything, you either need to give them money, or you have to cater to their ego. Funnily enough, people will usually respond more to having their ego stoked, than if you were to wave money in front of their face. So back to that genius master stroke. Stackoverflow.com has a system of reputation and badges. You earn reputation for asking and answering questions. Other developers can vote your entries up or down depending on how good they think your effort was. That causes your reputation to go up and down. Reputation is like a video game score, and if you spend any time on Stackoverflow.com, it starts to feel like a game. The badges are awarded for attaining certain milestones such as giving an answer with 10 up votes (Nice Answer) or leaving 10 comments (Commentator) etc etc. I’m not so sure about the badges, but gaining reputation is addictive. The more reputation you gain, the more status you have, and the more status you have, the more administrator rights you gain over the site as a whole.

There are downsides to the site though. One is that it is very addictive. The other is that it can get depressing, as you begin to realize how little you really know. When you realize that there are over 40,000 questions,  and you can only answer a handful of them, it can get you down a bit.

So if you have a programming question you need answering, try out Stackoverflow.com.