Your Tools Control You

Been a while since I have blogged. Will be writing a few over the next few weeks.

Hopefully over time you as a developer change your opinions. One thing I have drastically changed my opinion over time on is tooling. As many know I used to work heavily on a tool called mighty moose (still works and is OSS). One of the things I built into mighty moose was a pretty cool graphing feature I thought was the bees knees at the time that I built it. You can see it and alot of other cool features Svein and I built into it here:

http://continuoustests.com

One thing that was interesting with the graphs was people would bring them up and file support complaints that the nodes were too little when they brought it up on their code because there were 500 boxes in the graph (one got an OutOfMemory on it, in debugging it was a graph with over 50k nodes in it). This was never a problem with the graph it was a problem with the code.

I still believe such tools can have value and help make better software however I don’t really use such tools any more. In fact I have gone from being very pro-tooling to being very anti-tooling. Tools control your thinking process. I can probably look at the output of your process and figure out what tools you were using!

A classic example of this many have worked with is a typical .NET 1.1 win/webforms app written in Visual Studio. VS has a great (I mean seriously wonderful) step debugger built into it. The problem is that people tend to use it. A typical workflow would be change some code, hit f5, start stepping through. One of the other cool features, truely innovative at the time, was the ability to easily change code on the fly.

Speaking of ASP.NET have you ever looked at what came out over http from it? If you ever have wondered what a dementor’s kiss feels like I reckon its similar.

dementor-s-kiss-o

The problem in this example is when you are then given the code that was developed in this way. You suddenly find out that is the only workflow that will actually work with the code. You will find other artifacts as well such as nested loops and longer functions as the tools work better that way! Its quite annoying to think step into vs step over.

This is a classic case of tools controlling your output.

Other examples of this can be seen in tools like intellij or resharper. A typical smell of such tooling is that interfaces are backwards in a domain model. Instead of the domain model defining the contract it wants and an implementer adapting to that interface they “extract interface” from the implementer. This is quite backwards but a typical smell.

Another example can be seen in code of people using containers, ask yourself do you use almost exclusively constructor injection? Have you constructor injected a dependency that you only used in one method? Does the granularity actually match there?

Given most of these things are small. But these small changes start adding up.

Back to mighty moose. I found it changed the way I was writing code. One thing I got lazy with was the structure of my code in terms of files because I had graphs to navigate. I also got lazy about tests because the minimizer would not run them most of the time. I even got a bit dangerous trusting my risk metrics.

Today I have gone back to a plain text editor.
I write unit tests but don’t TDD (TDD has its effects)
I like REPLs
I try to log like I am debugging a problem (should be normally debuggable without a debugger, let’s just say when running involves burning eproms you think more about it first)

What’s interesting is I find I am almost back to where I was 15 years ago writing embedded code on 68030/68040s with a VT terminal plugged in for log messages. I see more and more the push back on big tooling and its a good thing (of course the “pushbacks” keep adding more and more functionality and becoming IDEs themselves! kind of reminds me of the 3 year old 50kloc “micro orms”)

p.s. I’m still looking for a nice text editor setup for F# with support for type providers etc if someone knows one.

15 Comments

  1. Posted January 14, 2015 at 8:28 am | Permalink | Reply

    I really love emacs, especially with cider for clojure development. There is currently no debugger 🙂 so one would be nice. But I agree with you on this. OS X -> Emacs -> Clojure -> nRepl = pure enjoyment.
    I dont TDD either, I write Unit tests for things I think are important and I experiment with the REPL heaps.
    Most of the code I write is purely functional now and I dont really miss the IDE.

  2. Rémi BOURGAREL
    Posted January 14, 2015 at 9:32 am | Permalink | Reply

    What is the purpose of structuring your code into files ? The purpose is not to “have a clean file structure” it is “to be able to navigate in your classes easily”. So for this purpose you prefer to choose a worse tool (=manually) because you think about the way to the purpose instead of the purpose alone.
    We are not artists, our job is to build project with tools, like a house builder. The house builder doesn’t say “i prefer a shovel to a digger because I really like to have big arms”, the purpose is not to have big arms here, but to dig a hole (and I agree that the house builder has to know a few things about mechanics for being able to repair his digger).
    If you think yourself as an artist or craftsman then your right, the way to the purpose is part of the purpose.

    • Posted January 14, 2015 at 11:59 am | Permalink | Reply

      “What is the purpose of structuring your code into files ? The purpose is not to “have a clean file structure” it is “to be able to navigate in your classes easily”. So for this purpose you prefer to choose a worse tool (=manually) because you think about the way to the purpose instead of the purpose alone.”

      If I have a classes thats are only used together its often easier to keep them in one file for navigation purposes. But last I checked even vim is able to automate putting classes in files not sure how this relates to an IDE

  3. Posted January 14, 2015 at 9:12 pm | Permalink | Reply

    I think that whilst in theory I like the idea of using say Sublime instead of VS, in reality, all that tooling in VS allows me to spend more time designing solutions and coding them and deploying them. Without it I would probably have to write my own tooling. Like if I was a carpenter, I would be using an electric plane rather than a manual one if I needed to do more than a hobby level of planing. In the same way, I have to write a lot of SQL so I find a tool like Redgate SQL Prompt about doubles my coding productivity (more quality than quantity I hasten to add).

    • Posted March 10, 2015 at 12:32 am | Permalink | Reply

      Have you tried it? Or are you imagining what things are like?

  4. Posted January 15, 2015 at 5:00 am | Permalink | Reply

    Greg: Use emacs 🙂

  5. Posted January 29, 2015 at 4:41 pm | Permalink | Reply

    How do you run your tests? I assume from the commandline.. But at which granularity then, individual tests, or a namespace at a time.. ?

  6. Jason Wyglendowski
    Posted February 2, 2015 at 2:30 am | Permalink | Reply

    Greg there is one person that I can think off that may be able to advise a good text editor for F# is Bryan Hunter. On twitter he can be reached @bryan_hunter. He did a spot on Dot net rocks talking about F# and Elixir. He was recommending Atom for Elixir but I think it can do F# as well. Anyway it might be worth looking him up.

  7. Thomas
    Posted March 10, 2015 at 12:09 am | Permalink | Reply

    You are obviously aware of the pitfalls a given tool provides to your development habits. But is it really necessary to treat them as The One Ring? Why do you think that it is – for you – better to avoid using them at all?

    • Posted March 10, 2015 at 12:31 am | Permalink | Reply

      I do still use tools even mentioned in the post.

      It’s arguing the extreme opposite to move to the middle.

      • Thomas
        Posted March 10, 2015 at 12:53 am | Permalink

        Thanx for not having me to rub a stick for lighting my next smoke!

      • Posted March 10, 2015 at 12:57 am | Permalink

        Huh

        What in my reply made you think that?

  8. Thomas
    Posted March 10, 2015 at 1:10 am | Permalink | Reply

    Not your reply, but your original post. Anyway, nothing to complain about. I consider myself a hobbit in this case.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: