154

Note more discussion at http://news.ycombinator.com/item?id=4037794

I have a relatively simple development task, but every time I try to attack it, I end up spiraling in deep thoughts - how could it extending the future, what are the 2nd generation clients going to need, how does it affect "non functional" aspects (e.g. Performance, authorization...), how would it best to architect to allow change...

I remember myself a while ago, younger and, perhaps, more eager. The "me" I was then wouldn't have given a thought about all that - he would've gone ahead and wrote something, then rewrote it, then rewrote it again (and again...). The "me" today is more hesitant, more careful.

I find it much easier today to sit and plan and instruct other people on how to do things than to actually go ahead and do them myself - not because I don't like to code - the opposite, I love to! - but because every time I sit at the keyboard, I end up in that same annoying place.

Is this wrong? Is this a natural evolution, or did I drive myself into a rut?

Fair disclosure - in the past I was a developer, today my job title is a "system architect". Good luck figuring what it means - but that's the title.


Wow. I honestly didn't expect this question to generate that many responses. I'll try to sum it up.

Reasons:

  1. Analysis paralysis / Over engineering / gold plating / (any other "too much thinking up-front can hurt you").
  2. Too much experience for the given task.
  3. Not focusing on what's important.
  4. Not enough experience (and realizing that).

Solutions (not matched to reasons):

  1. Testing first.
  2. Start coding (+ for fun)
  3. One to throw away (+ one API to throw away).
  4. Set time constraints.
  5. Strip away the fluff, stay with the stuff.
  6. Make flexible code (kinda opposite to "one to throw away", no?).

Thanks to everyone - I think the major benefit here was to realize that I'm not alone in this experience. I have, actually, already started coding and some of the too-big things have fallen off, naturally.

Since this question is closed, I'll accept the answer with most votes as of today. When/if it changes - I'll try to follow.

gnat
  • 21,213
  • 29
  • 113
  • 291
Ran Biron
  • 457
  • 47
    Time pressure helps a lot to stop overthinking things. – user281377 May 28 '12 at 20:56
  • 51
  • 1
    Agree with the time pressure. Nothing to make people get stuff done like "this MUST be done at LATEST by Monday, because that is when the customer starts testing ". –  May 28 '12 at 22:42
  • 50
    Drink 2 beers.. – Andrew T Finnell May 29 '12 at 00:21
  • 6
    Second System Effect, anyone? – Billy ONeal May 29 '12 at 00:44
  • 21
    Your problem is not "knowing too much", but analyzing too much. You don't need to care about performance, future features, etc. too much now, it's not that the world's gonna end if the customer gives you a new feature that's a bit hard to implement – Louis Rhys May 29 '12 at 02:29
  • 6
    Welcome to Analysis Paralysis :) – Songo May 29 '12 at 08:48
  • 1
    Think "Minimum Viable Product." What's the least you could ship with? Then start there, ship, and add based on market feedback. – Scott C Wilson May 29 '12 at 11:05
  • you and me both – kyjelly90210 May 29 '12 at 12:26
  • 2
    Holy crap - when I read this, it was as though I wrote it myself. After 5 years of churning out bad (but working/profitable) code, I now stare at the screen paralyzed but the thought of doing it wrong. I think it started when I really began trying to use Design Patterns. – MattW May 29 '12 at 12:44
  • I don't believe you meant to say it this way but saying "I know too much" comes off a tad arrogant. You might also find the book discussed in this wikipedia article worth your while to read and consider: http://en.wikipedia.org/wiki/The_Paradox_of_Choice:_Why_More_Is_Less – Onorio Catenacci May 31 '12 at 20:43
  • 2
    This question falls under "software engineering" and (maaaaaybe) "development methodologies", and has a specific answer: How not to over-analyze. Why was it closed? – Izkata May 31 '12 at 21:40

22 Answers22

90

Thinking about these things is definitely good, but don't let it stop your progress.

One approach that works really well (especially with iterative development) is to implement a simple solution and then refactor as necessary later. This keeps the code as simple as possible, and avoids over-engineering. Most of the performance or architecture changes you are contemplating probably aren't going to be required anyway, so don't bother writing them until they have officially become necessary. For example, don't worry about performance until a profiler has told you that it's time to improve performance.

One thing you can do to help you adjust is to set a hard time limit on how long you think about something before writing code. Most of the time, the code will turn out better if you think for a little, write it, realize your mistakes, and then fix them by refactoring.

There is a balance to be struck here. You shouldn't just jump in head-first and not think about the consequences, but you also shouldn't try to over-engineer your code either.

klochner
  • 101
Oleksi
  • 11,894
  • 2
  • 54
  • 54
48

Wikipedia names it "Analysis paralysis" in software. The recipe is to stick to agile methodologies. Meaning that any activity or individual action has much more value than attempt to establish practices or policies. Every contributor in the team is valuable, no matter how well or bad the person's abilities fit to architectural ideals. In agile, individuals, egos are first, the policies are last.

My favorite answer is "Architecture is verb". Stop thinking, start acting, no matter how imperfectly and inefficient you and the team will feel. Maybe the first actions can be dismantling inappropriate policies.

Peter Mortensen
  • 1,045
  • 2
  • 12
  • 14
44

40 years ago Fred Brooks wrote about this "Write one to throw away, you will anyhow." Nothing has changed........

mattnz
  • 21,362
38

Is this wrong? Is this a natural evolution, or did I drive myself into a rut?

It depends. This tends to be a common step along the road of a developer.

  1. Start throwing crap together, get bitten in the ass by it
  2. Start over-engineering the living hell out of everything, realize that YAGNI
  3. Settle on some pragmatic middle ground where the easy stuff is slapped together and the hard/change-likely stuff is given enough engineering to make it easy enough to work with/change.

It's only a rut if you stay at number 2.

Telastyn
  • 109,398
  • 4
    +1 You'll realize you're in a rut at number 2 when you start over-engineering "Hello World". – Spoike May 29 '12 at 09:00
  • 3
    @Spoike - Or Fizzbuzz. Ala, Enterprise Fizzbuzz! – CraigTP May 29 '12 at 10:05
  • 1
  • Realize that 3 is wrong as well, and only concern yourself with fulfilling the business needs instead of the technical needs. The universal Business Need is that everything will change constant, small or large. The implementation details will fall in line with the bottom line drivers, and will be address when they need to be, no sooner, no later. Just In Time Development.
  • –  May 30 '12 at 01:15