Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been working as a freelance web and app developer for a couple of years now (not long I know), and I've just been given my first large project.

Needless to say it didn't go very smoothly, so I sought advice from a more senior programmer involved in the project, about how to approach it.

He said that I had drastically been over thinking the task at hand, and that because I had never tackled a large project like this I'd been spending too much time over thinking design patterns. In his wise words, he told me "F*ck the future, build for now".

Is this a trend programmers typically follow when going about a project like this? For example, if you were asked to do a proof of concept model, is it a typical trend just to mash a workable example out as soon as possible?

Edit: In light of the debate this has sparked, I'd like to mention that this situation is fairly extreme: we have very tight deadlines due to factors beyond our control (i.e. the market we're aiming for will lose interest if we don't show them something) and he was/is very right in his advice for this particular task.

share|improve this question
5  
that one seem more related to coding than design – Balog Pal Jun 5 at 12:54
12  
I +1-ed just for "F*ck the future, build for now". If he feels like endorsing this statement, I'll be glad to credit him whenever I add that to a commit log after I scrap something I dumbly overengineered (which happens way more than I'd like to). – haylem Jun 5 at 18:57
5  
Reminds me of an old coworker who was always "gold plating" his apps with too much features, design overdose and things that weren't in the requirement at all just to "show off" or "preparing for a future that would never come". Very interesting question :) – Jean-François Côté Jun 5 at 20:01
5  
@Jean : The only projects where "a future that would never come" happens are programs that are failures (even if the project was deemed a success). If your program is successful then that means it is being used. If it's being used then users will want more features. If you adhere to the "build for now" philosophy then you get the current state of most software today. Utter garbage, difficult to change. The only reason developers can get away with it is because it is so prevalent. Developers who are skilled will build systems faster doing it correctly to begin with and don't end up with trash. – Dunk Jun 5 at 20:17
10  
Questions like this are like a Rorschach test. The OP doesn't supply enough information to know whether he is actually an over-designer or his mentor is an under-designer. In the absence of sufficient information, everyone sees what they want. – PeterAllenWebb Jun 6 at 0:16
show 12 more comments

10 Answers

up vote 42 down vote accepted

When you start out programming, everything is a proof of concept even if it is just to yourself. There are cases when an idea requires something quick and dirty or a prototype because time is a key factor. The massive fear among developers is stakeholders thinking the little app is ready for production or you should be able add features at the same rate forever. You work on a large project and find out this isn't the case.

Large projects usually have more complex requirements, so there is a temptation to try and implement complex designs. You'll spend a lot of time reading, researching and trying to implement them. This can become a big time waster, but it is all part of learning and gaining experience. Knowing when to use a particular design is difficult and usually comes with experience. I tried "that" on "this" project and it didn't work but now I see it should work over "here".

You have to plan and plan a lot, but don't do it all at once. It definitely doesn't have to be done all at the beginning. I'd rather see someone create their first large project like this:

  1. Design and discuss a little bit.
  2. Write a bunch of code that does something.
  3. Recognize the problems and STOP coding.
  4. Get serious about design and stop worrying about losing momentum or your code-mojo and ignore the project manager (You're doing him/her a favor.).
  5. Get the project under control. Fix your messes. Make sure everyone understands the plan. Keep the project under control.

Sometimes you hit one of those features that really makes you concerned on how to implement it in the existing codebase. This not the time to "just make it work". I had a boss who said, "Sometimes you have to grab a stool instead of a hammer." He told me this after he caught me "thinking" at my desk and didn't assume I was goofing-off and made sure I understood he wanted me to do more of it. Genius.

Ultimately, your code is the design. It is supported by documents, diagrams, meetings, email, whiteboard discussions, SO questions, arguments, cussing, fits of rage and quiet chats over coffee. There is a point where you can't design any more and risk having to throw more design time away because of the flaws you will only discover trying to write the code. Also, the more code you write the better chances you will introduce a design flaw that you can't code your way out of and may have to trash a lot of your code. Time for the stool again.

share|improve this answer
+1 for doing your bosses a favor, even if they don't think so – superM Jun 5 at 14:26
1  
+1 Great post. It is indeed a good manager who recognises that a good design needs to percolate - and this doesn't necessarily involve the keyboard! – Robbie Dee Jun 5 at 15:10
Argg if only I read this answer before I started! Thank you, and for someone who's just starting out in this industry I'm loving these crazy learning curves! – user1454517 Jun 5 at 15:31
2  
+1 for You have to plan and plan a lot, but don't do it all at once. – Rafael Cichocki Jun 6 at 10:06
2  
@Geek: mojo, flow, zone... or whatever geeky/trendy/hipster term one might chose to describe a state of productivity. – haylem Jun 7 at 14:56
show 1 more comment

Captain Obvious to the Rescue!

I'll be Captain Obvious here and say that there's some middle ground to be found.

You do want to build for the future and avoid locking yourself into a technological choice or a bad design. But you don't want to spend 3 months designing something that should be simple, or adding extension points for a quick and dirty app that will have a 2 year lifespan and is unlikely to have follow-up projects.

It's difficult to find the distinction, because you can't always predict the success of your product and if you'll need to extend it later.

Build for Now if...

  • the project is going to get scrapped,
  • the project has a short life-span,
  • the project should not have extensions,
  • the project doesn't have a risk impact value (mostly in terms of image).

In general, in-house projects or something built for a customer should developed by being more on the side of what your colleague said. Be sure to have straight requirements, and relate to them as needed to know what's needed and what's not. Anything that's a "nice to have" you don't want to spend too much time on. It doesn't mean you should code like a pig either.

Leave the General Problem for later, if it may ever be necessary and worth the effort:

XKCD: The General Problem

Build for the Future if...

  • the project will be public,
  • the project is a component to be reused,
  • the project is a stepping stone for other projects,
  • the project will have follow-up projects or service releases with enhancements.

If it's for something public, or that's going to be reused in other projects, then you've got a much higher probability that a bad design will come back to haunt you, so you should pay more attention to that. But it's not always guaranteed.

Guidelines

I'd say adhere to the following and go from there as best as you can, and you should be in the position of designing products that aren't eating at your resources and time but still are relatively adaptable without requiring major rewords:

  • know that YAGNI,
  • KISS,
  • whenever you feel like scratching a itch and think of an addition, write it down, and look back at your requirements (you should have some, even large guidelines for a small project) and ask yourself if these are priorities or not, and add primary business value or not.

I know that I personally tend to overthink and overengineer things, and it really helps me to write things down and very often re-think if I need that feature I think about. Often, the answer is no or "it would be cool later". Those last ones are dangerous, because I keep thinking about them, and I need to force myself not to plan for them.

The best way to code without overengineering and without blocking yourself for later is to focus on a good minimal design. Break things down nicely as components that you can later extend, but without thinking already about how they may be extend later. You can't predict the future.

Just build simple things.

Dilemmata

Overengineering

Is this a trend programmers typically follow when going about a project like this?

Hell yeah. It's a known dilemma, and it only shows that you care about the product if you face it (or maybe that you're bored and that your mind wanders). If you don't, that worries me more.

Don't worry, it's an age-old debate, which has other ramifications. The one where you believe in the Right Way / Right Thing wonder if less is always truly more and if worse is always truly better, and if you are a MIT or New Jersey kind of guy.

Prototyping / Quick-n-Dirty / Less is More

Is it a typical trend just to mash a workable example out as soon as possible?

It's kind of a trend, but not how the vast majority or projects are approached. But this is a good trend in my opinion. However, it's got a mean downside to it.

Is it common to churn out quick and dirty prototypes? Yup. Unfortunately, it's also a trend to promote quick and dirty prototypes to actual products or to use them as the base for actual products under some pressure of some kind (management, time, money, bla bla bla). Just be careful with that and to put your foot down if someone wants to do this. That's when a prototype comes back to haunt you.

Dilbert on shipping prototypes directly to production

There are obvious advantages to prototyping, but also a lot of potential for misuse and abuse (many the exact inverse of the previously listed advantages as an outcome).

When to Use Prototyping?

There's also some hints on the best types of projects to use prototyping:

[...] prototyping is most beneficial in systems that will have many interactions with the users.

[...] prototyping is very effective in the analysis and design of on-line systems, especially for transaction processing, where the use of screen dialogs is much more in evidence. The greater the interaction between the computer and the user, the greater the benefit [...]

"One of the most productive uses of rapid prototyping to date has been as a tool for iterative user requirements engineering and human-computer interface design."

On the other hand:

Systems with little user interaction, such as batch processing or systems that mostly do calculations, benefit little from prototyping. Sometimes, the coding needed to perform the system functions may be too intensive and the potential gains that prototyping could provide are too small.

Ah and if you have a green monster around, just make sure to keep it within your budget...:

Dilbert on extending prototyping periods

share|improve this answer
1  
I can't emphasize enough how important the points you've made about prototyping are. I don't think this is really what the question was about (mainly about when it's ok to stop and design, rather than just build as I understand it), but prototyping is definitely a relevant part of that process. Nice job! – Benjamin Gruenbaum Jun 7 at 13:10
@BenjaminGruenbaum: Thanks. Glad you like it. – haylem Jun 7 at 13:18
1  
I'm quite puzzled as to why I'd get a downvote here. Please be kind enough to give information on that, so I can see the errors of my ways, sensei. – haylem Jun 7 at 15:58
+1 For the comic strips! ;) Very good answer. – Dynamic Jun 8 at 17:00

Do programmers typically build something that works now without thinking about the future?

Yes.

Should they do so?

No.

At a first glance it would seem that "thinking about the future" violates established design principles like KISS and YAGNI, which claim that there shouldn't be implemented anything that isn't required right now.

But actually it doesn't. Thinking about the future means designing simple, extensible and manageable software. This is especially important for long-term projects. New features will be required with time, and having a solid design will make it easier to add new pieces.

Even if you aren't going to work on a project after you complete it, you should still develop it intelligently. Its your work, and you should do it well, at least in order not to forget how good work is done.

share|improve this answer
2  
Although what you say makes a lot of sense my personnal experience tells me otherwise. Typically when devs get in the mode @F***k it... just ship it@ there tends to be a boat load of copy pasted code springing all over the place. The end result is utterly unmaintanable. Thinking ahead is not just about extentions and modifications but maintenance as well. – Newtopian Jun 5 at 15:25

Agile developers have a saying, "You Aren't Gonna Need it (YAGNI)" which encourages that you design for what you need now rather than what you think you might need in the future. To extend a design to work in the future, the recommended route is to refactor.

The important aspect to this is to keep the requirements for your product in your mind as you design, and to ensure that you are not designing for a bunch of requirements that might happen in the future.

There is something to be said for developers who can think two or three iterations ahead - they know their clients or the domain so well that they can anticipate future needs with high degrees of accuracy and build for them, but if you're not sure, it's best not to spend too much time on things that you or the clients don't need.

share|improve this answer

Is this a trend programmers typically follow when going about a project like this?

I suspect what your mentor meant was that you shouldn't build in any additional complexity that may not be required by the final solution.

It is all too easy to think that an app should do this and that and get massively sidetracked.

As for design patterns, it is worth remembering that they're a means to an end. If you find with experience that a certain design pattern doesn't fit despite your earlier hunch, then this could indicate a code smell.

For example, if you were asked to do a proof of concept model, is it a typical trend just to mash a workable example out as soon as possible?

It is worth getting a steer before the project starts as to what milestones there are and whether they'll want to see a bit of everything (vertical slice) or just each part in detail as you develop it (horizontal slice). As part of the initial design, I find it worth story boarding the whole app so even though the code isn't written you can do a helicopter view of the whole thing or a deep dive of a given area.

share|improve this answer

Design is usually open-ended so it is way too easy to apply too much or too little of it. And you will know the correct amount only after the project is done or discarded. Or even not then.

There's no general recipe for success, but you can learn to recognize extremes. Complete design of everything up front hardly ever works beyond trivial stuff. It's okay to leave components for refining and just have a feeling that it can be done, or there's a way to discover problems early.

You may look up how incremental development works if you're not familiar. Successful methods usually are iterative on one or more levels, seek tight feedback and grow on some skeleton.

share|improve this answer

He said that I had drastically been over thinking the task at hand, and that because I had never tackled a large project like this I'd been spending too much time over thinking design patterns. In his wise words, he told me "F*ck the future, build for now".

I think that's a bit of a cowboy mentality from the other developer. The modern day's version of a tough nerd who just "does it now". It's become a popular theme among startups and no thanks to people at Facebook for starting the phrase "getting it done is better than doing it right".

It's appealing. It's encouraging and offers visions of developers standing around a console clapping their hands as they launch their big project into the world on time, on budget and all because they did not over engineer anything.

It's an idealistic fantasy and life doesn't work this way.

A fool will rush into a project thinking he can just "do it" and get it done. Success will favor the developer who prepares for the unseen challenges, and treats his profession like fine craftsmanship.

Any senior developer can criticize, condemn and complain - and most do!

While he/she tells you that you are "over thinking" the project. I congratulate you on actually "thinking" first. You have taken your first steps in being a better developer then the other guy.

Is this a trend programmers typically follow when going about a project like this? For example, if you were asked to do a proof of concept model, is it a typical trend just to mash a workable example out as soon as possible?

That's exactly what a proof of concept is. It's an attempt to mash something out as quickly as possible so that people can take a step back and look at it. It's done to prevent mistakes, misdirection and wasted time/money.

There are many different kinds of proof of concepts. You can build something that is thrown away in the garbage when done, or you can build something that represents a starting point for the project. That all depends upon what you need, and how close the concept is to the final product.

It's also an opportunity to demonstrate your ideas. There have been times when I've presented a prototype that took things to a level they didn't expect.

share|improve this answer
1  
+1 for mentioning the plague of pseudo-mentors in Internet – volkerjaan Jun 8 at 17:57

Show me your code and I will tell you who you are

Your code is your visit card. If you write messy code, what tell you about yourself to the other people? Just think of that. Every time we find in office a really bad fragment of code, we ask ourselves, who have written it and how on hell was he passed through the university?

You are becoming what you code

Your code is your program for life.

A programmer writing bad code is like a ballet dancer dancing in striptease club

Some people don't care dancing in striptease club. But if they are tallented dancers, they are wasting their skills. If you are poor dancer but have nice legs, you can strip for many.

Finally, you should read Gogol's novelle 'The Portrait', and you should be warned by the story of the main character. You friend is similar to the man from the portrait. He is luring you with money, but you'll pay the high price for it.

share|improve this answer
I didn't ask for people to make personal comments about my mentor, I asked where the boundaries where with regards to over thinking design patterns. "Luring you with money" is a stupid irrelevant assumption, and in actual fact hes not the one paying me. – user1454517 Jun 8 at 17:34

F*ck the future, build for now

For me it's a warning signal, that the person that have told that thinks that:

1) No matter how much I care, nobody will appreciate it

2) If something goes wrong, it's always my fault

3) I do the most, and get the least money. All goes to managers and salesmen.

4) If they don't care about me, I won't care about them.

I've met a few such people. It was usually an early syndrome of burnout.

However, it's also very destructive. It's like prisoner's dilemma. If most of the people do their work good, someone who cheats and doesn't care, and escape with the first symptoms of problems, can long go unpunished, because someone will clean up after him. But if the most people would do like that, the whole environment would be corrupt, the programmers would be overloaded with numerous bugs and constant rewrite from scratch, and the wages will get low.

In fact, I know a few corporations which follow your friend's rules. They are hiring people for very short period, pay them far below average and produce tons of completely unmanageable code, which is thought to reach the minimal quality needed to get client to pay. I guess you wouldn't like to work for such company. So don't behave as if you'd work there.

share|improve this answer
Well he's the director of a fairly large company so "I do the most, and get the least money. All goes to managers and salesmen." doesn't really apply – user1454517 Jun 5 at 19:18
You have written he is programmer, so what is in reality? – Łukasz Lech Jun 5 at 19:51
2  
A programmer, who is also the director of a company.. – user1454517 Jun 5 at 19:59
1  
OK so let me guess. His company is one of those I've described. People are underpaid and the rotation rate is immense? – Łukasz Lech Jun 5 at 21:02
F*ck the future, build for now

This is the brutal reality of software development at this time. Just do what he says and keep your head down. It won't be pretty but you might keep your job.

After a few decades of experience you may have the power to gainsay this attitude. Get there and you're quids-in. Do it properly AND f### the future. Do it the way it should be done!

share|improve this answer
3  
What does keeping my head down have to do with it? – user1454517 Jun 6 at 0:54
"You're either boring or you stand out. You're either invisible or remarkable. All your life you're told to keep your head down, work hard, don't make waves and get it done. What rubbish..." (How to be remarkable) – gnat Jun 6 at 6:03
You are fucking you own future, and yourself doing that. It's said that people are thinking so :((( – volkerjaan Jun 8 at 6:13

protected by haylem 1 hour ago

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.