Your editor and you


Wednesday, November 7th, 2007 at 10:59 pm, philosophy

Yesterday I saw somebody implementing a piece of software without knowing what the actual problem was. There weren’t just a few details missing, almost everything was unclear by then. He just started hacking like that: Classes there, interfaces there, unit tests etc, etc. It seemed so ridiculous to me that I had to ask him. “Ey, we can refactor later” was his response and he continued. Well, of course everybody has its own strategies, I just couldn’t imagine that in the end he will have achieved a clean design without having thrown away everything. How can you be that crazy and just spill out code without have any concrete details about what you should actually do?

How to write software?His next reply was “Ey, look mate: You can press here and here, and then magically everything gets reordered. It’s so fancy!”.
Soon he run into a problem. Ha! You have a race condition somewhere, now what you gonna do with all your refactoring tools? He calmly started his debugger tried / failed / built / continued until he got it fixed. He wasn’t coding in vi, nano, EditPlus or TextMate. Of course not, it was one of those Java editors with trillions of features.

And he felt save using it. Oh yes. He loved that warm and fuzzy feeling of live API browsing when pressing a single dot. Those underlined statements which warned him about possible pitfalls like Microsoft Word does with grammatical errors. The relaxed feeling he had because he knew he will be able to refactor all his code later into a nice class hierarchy anyway.

FeaturesWe all like it, don’t we? Those bloated and fat enterprise programming environments with their sweet features they provide. You don’t have to think about algorithms anymore because “I can debug them later anyway” and you don’t think about performance issues because “My performance tool will highlight the bad statements”. Soon you don’t even think about design anymore because “I can update my software architecture in that other UML tool”

But do you remember the first time you opened that editor? Oh yes, it took ages to load (you realized why it shipped on a DVD). It was fat, cluttered with options, menus and wizards. Everything was so slow because of all the bloat it had. You missed the tactile feedback from your TextMate times.

Anyway, it was worth to give up that old stupid editor! Look at all the new and shiny features you got now: PerformanceAnalyzer which puts a red bullet in front of computation intensive statements. The UnitTestGenerator. The DocGenerator. The DataStructureWizard. The AutoPatternizer.

Soon you started to code before thinking. You ignored your carefully crafted code conventions: “Look it up in DocGenerator”, you stopped thinking about architecture: “UML Refactorer will do it later forFeatures me”. Anyway, you could do it: Your imaginary friends were waiting to help you with all your coding issues, weren’t they?
Hold on a second, did you forget? Where have they been before that last release, when your boss came in and yelled about the disastrous performance of the module you wrote, PerformanceAnalyzer didn’t help you, eh? What about that other guy who had to write an extension for you application, but the “UML Refactoring Tool” failed because of an “internal error” You gave up your lovely editor for a few fancy features which barely work.

However, time passed and the more code you were spilling out, the more you forgot about the old days. You unconsciously accepted everything which surrounded you. Slowly you became like the editor you use and feared the first time you opened: Fat, bloated and slow.

Close your eyes, take a deep breath and go back a few years in time. Now, enjoy the old but refreshing feelings you had with your simple editor.

Tags: , ,

6 Responses so far

  1. luca Says:

    I agree with you. Especially folks who started their programming life with a ‘big’ editor tend to browse the stack while hunting a bug (Which is not so efficient on multi threaded apps). The C guys mostly think about what they actually did.

    Anyway, you could have been a bit more precise in this post. The problem are not the big editors, its the lack of knowledge about things “under the hood” which make you like described in this post.

  2. Reto Bachman Says:

    Well it depends. For the, lets call them ‘better’ developers, it doesn’t really matter. They know how to use their tools and get one of those “imaginary friends” :D when it makes sense.
    However, for the average ones it’s not such a bad thing when they have a ‘guide’ in their editor. So they can’t mess up too many things. Design isn’t done by them anyway.

    And now to your point: If you started using all those sweet features in your first source file, then its very like (imo) your skills won’t improve over time.
    I could easily tell you who in my team used Notepad, EditPlus or nano for their first project without asking them, it’s just too obvious.

  3. giu Says:

    Where have they been before that last release, when your boss came in and yelled about the disastrous performance of the module you wrote, PerformanceAnalyzer didn’t help you, eh?

    I know where he (the developer) wasn’t (because of the disastrous performance): In the Prog2-lecture about “Data Structures & Algorithms” and that’s the reason why he never really will know what a Big-Oh notation is. Just like his failed mate, the PerformanceAnalyzer ;)

  4. Chrigi Says:

    Yep!
    It’s the kind of problem you have when you use a tool but don’t know how it works. Anyway, 90% of the time it will do the job.
    So why not use it?

    Ha, we are in IT and thus working on those other 10% (the other things have already been solved by somebody(otherwise there wouldn’t be a tool)). Using a tool you don’t know what it’s doing under the hood will kill you.

  5. Tobias Says:

    Hey steve

    i found my way through the internet to your blog because of chrigi. Hope to read something new soon!!!

    The AutoPatternizer.

    :D i keep this expression in mind. lol :)

    You missed the tactile feedback from your TextMate times.

    You got a point here. In vs2005 it sometimes just doesn’t feel “real time”. Also if it’s just a few ms, it’s incredible annoying!

    btw, think about highlighting your double quoted thoughts and spoken stuff.

  6. steve Says:

    Thank you all for the comments!

    @luca
    thx luca. I noticed the same when I read the articel a few days later it was published. I keep that in mind for the next time.

    @reto
    It was more from a developer’s view. However, you are right here. Anyway, it should be asked why you have those developers you need to protect from themselves with ‘guides’ in the first place ;) No, I don’t belive in boilercode producers :)

    @giu
    :) Exactly! I have the need for such a thing all the time because I skipped too many lessons then ;)
    Good old Prog2 and PnProg lessons.. you cannot automatize the things you learn there.

    @chrigi
    Right, especially it will fail four hours before release. Knowing whats under the hood is essentially to some degree.

    @tobi
    welcome :)
    I noticed it as well. If you continue writing it get “flushed” out a few secs later (!)
    Good idea. I think about it. Maybe the best thing is if i introduce a new css class, tag all those comments with it and start playing with the colors and fonts.

Leave a Reply