News for hackers. Stuff that matters.
Re:Ask HN: Coding Quickly; How? by patio11 on Sunday May 03, 2009 @01:06AM (#590561)
I measure my production time in days, not hours, so any tips on just how to "code quicker"?

Code less.

That isn't being flippant. Code you don't write is code you don't have to debug. It is code you don't have to integrate with your other functions. It is code you don't have to refactor. It is code that requires no maintenance.

I got the first version of my application up, running, and out the door in 8 days at a "normal work week" rate. I'm not a particularly good programmer, I just cut the feature set for 1.0 to the bone. Since then it has been three years now of iterations on the existing codebase that typically add a just a few hundred lines at a time.

I also rely -- heavily -- on libraries and frameworks that do stuff better than I could, and on Google for code references whenever I'm doing something which is new to me. (It took me probably 3 years until I could write Swing apps without a browser open. By that standard you'd think I'd be able to do it for Rails by now... but not quite, unless it is a pretty basic app.)

Re:Ask HN: Coding Quickly; How? by Hexstream on Sunday May 03, 2009 @10:47AM (#590868)
"Code less."

I find this philosophy depressing in the long run. If the first concern that pops to mind whenever you need to add a feature or change something is "how can I do this in the least amount of code", you'll be depressed when comes the time to code something that simply inherently takes a huge amount of code to tackle. You'll be less likely to make that big refactoring that would greatly enhance the consistency of your codebase and facilitate further developments.

As it is, my codebase is a place I spend most of my life in, so I like to keep the place tidy and know where everything is. I want to feel at home in my home.

Re:Ask HN: Coding Quickly; How? by stcredzero on Sunday May 03, 2009 @01:57AM (#590612)
Coding less is key. But, for the code you do have to write, and for deciding exactly how to code less, the underlying talent has to do with managing risk by decomposing your problem into small chunks.

Once you have your "problem" pared down to the minimum needed, if you can decompose your system into lots of small parts that you can analyze easily and make darn sure are correct, then you can code without having to backtrack and do costly debugging. You'll also find that writing the code also goes more quickly once you do this. "Knowing where to start" also becomes much easier if you do this.

Re:Ask HN: Coding Quickly; How? by ashleyw on Sunday May 03, 2009 @09:32AM (#590823)

    Code less.
Or a better way of putting it — just DO less.

Start out with a plan, and spend as little time as you can in the prototype/experiment stage. Write down what you need to do to create a "minimum viable product".

A minimum viable product model is what all "coded in X hours" web-apps create. Quite literally, just launch as soon as physically possible; if you expect not-required-but-cool-feature-1 to take an extra 2 hours to create, and you really think would add quality to the product without adding unnecessary bulk, then just add it to the 'post-launch to-do list'. You have a massive advantage creating a web-app — the ability to instantly add features after 'launch'. Don't waste it!

And to help with creating a minimum viable product, always do Test Driven Development. While this actually adds to the amount of code you have to write, generally you will get the app finished quicker, or at the very least, it'll help you stay on track.

Re:Ask HN: Coding Quickly; How? by zaius on Sunday May 03, 2009 @02:33AM (#590644)
Cutting the feature set is by far the best way to speed up your launch time. And you'll get a huge amount of new perspective on what features are really necessary once the product is out there with people using it. So, take a good hard look at everything you think needs to be in v1, then cut that in half.