Home > Extreme Programming > Cold Turkey

Cold Turkey

Cold Turkey

March 23rd | 2010

Cold Turkey

Recently I went on vacation. Being the developer that I am, this didn’t keep me away from doing a little coding. I was “forbidden” from bringing a work laptop, but I brought my personal netbook which had Office, Windows, iTunes, and a messaging client. One day I was asked to write a system tray application for someone who was moving from Windows XP to Windows 7, which was missing a feature from XP. It was easy enough to write, but I didn’t have my normal tool belt with me. All I was armed with was notepad, and the Visual Basic .NET Compiler. I’d be writing an application without my faithful tools. Cold Turkey.

The first thing I did was build a mini IDE: basically, a batch script that would compile my file and add all the assembly references. My only reference was MSDN which is rather slow in Belarus. I eventually ended up writing another program that used reflection to dump the classes of namespaces and the public members of classes.

This lead me to a blog post I read more than a year ago, “Intellisense rots the brain”. That got me thinking: Code quality should not be determined by your toolset. I thought back to my post on extension methods . My argument against extension methods was that you can’t tell the difference between an extension method and an instance method without the help of an IDE. Now the argument might be, “Kevin, you were using no tools at all. Isn’t that an unlikely case? I’ll always have my tools.” But then why strive to write good code at all? A tool shouldn’t be telling you how to write code.

So, I propose a challenge. Try writing code for a day, even an hour, using notepad. Not Notepad2 or notepad++. Though you can cheat and use MSBuild to compile your solution. It might just change your idea of what good code is.

Kevin Jones is a Team Lead at Thycotic Software, an agile software services and product development company based in Washington DC. Secret Server is our flagship password management software product.

Categories: Extreme Programming
  1. Valamas
    March 23, 2010 at 8:32 pm

    To use only notepad and not something like notepad++ is bad. Notepad has poor undo and redo; something i expected to be rectified with vista/w7/w2008. One mistake and you can lose many lines/hours of work. Not to mention if you accidentally open a file twice and save over yourself.

    As for generally writing in notepad? True, intellisence rots your brain, but there are plenty of things that rot your brain, such as copying and pasting code/connectionstrings.

    However, back in the 90’s a friend convinced me to write HTML using a source editor rather than a wysiwyg interface (Html Hotdog i think it was). I am grateful for that advice. I still remember the wrox html reference mini-book with a dirty flick line on the page edge. (Wish I still had that book).

    I write good code with assitance like Visual Studio and resharper because i maintain my standards. It easy to let a tool do 90% of the work and then you dont do the remaining 10% if that makes any sence.

    Kudos on the challenge you undertook.


  2. March 24, 2010 at 12:30 pm

    Your comments is like saying soldiers should fight wars with bare hands. It is more naturally and honorable and you can learn more. However, the first guy to bring a gun or a tank will be the the winner of the war. Developers have a lot to do and learn and it is unfortunate that we have to let things like IDE’s and intellisense stand in the way of fundamental-understanding.

  3. kjones
    March 24, 2010 at 3:14 pm

    @Phil – My intention wasn’t to say that we shouldn’t use tools at all, in fact all I did was recommend not using tools for an hour (or as long as you can stand). It really gives you an new appreciation of code. I agree that not using tools is a terrible idea, it’s very inefficient. But every now and then it’s good to do to remind yourself what it’s like.

  4. Someone
    March 25, 2010 at 12:50 pm

    Thanks for your story, it’s a nice read.

    Funny enough I started developing using notepad. Simply because I couldn’t afford myself visual studio.net and the fact that the express editions did not exist at that time. I worked as an office clerk at an insurance company and wanted to switch careers so I had no other option I knew of.
    The lack of IT related friends didn’t help to much either.

    My first 3 .Net exams, I passed after creating all my exercises with nothing more than notepad and the command prompt.

    The moral of the story? I still write almost everything in “source view” and I have a very thorough understanding of how to organize my code. After two years not touching a piece of code I can find almost all of my variables and methods blind because I would still use the same name for these variable and methods if I had to name them today.

    So does that make me proud? No, it’s something that was born by the lack of other options and thus not something to be proud of. Does it make me good?

    Hell yes! I spot typo’s way faster than anybody else does. I know all standard patterns by hearth and use them all over. One glance at the names of my classes, and you’ll know the workings of the library.
    I think BEFORE I write (!= refactoring).
    I write as less code as possible (== less typo’s)
    I design as clear as possible (!= intellisense)

    So to me… starting development with notepad realy did help me in becoming a sufficient developer.

  5. July 14, 2010 at 1:43 pm

    Using Notepad.exe is simply too advanced. You need to get closer to the bare minimum. My personal favorite is:

    C:\Sample>copy con source.cs

    Now you must make sure each line is correct before moving to the next line.

  1. March 23, 2010 at 5:43 pm
  2. March 24, 2010 at 7:49 am
  3. July 22, 2010 at 7:11 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: