Live data from Hacker News

How I build software quickly

evanhahn.com

31–40 of 215 posts

Re: How I build software quickly

#31

> It can reveal “unknown unknowns”. Often, prototypes uncover things I couldn’t have anticipated. This is the exact opposite of my experience. Every time I am playing around with something, I feel like I'm experiencing all of its good and none of its bad ... a honeymoon phase if you will. It's not until I need to cover edge cases and prevent all invalid state and display helpful error messages to the user, and elimin…

Yes. I wanted to warn about a rough draft being too rough. There are corners one shouldn't cut because this is where the actual problems are. I guess that rally pilots do their recon at a sustained pace, otherwise they might not realize that e.g. the bump there before the corner is vicious.

Re: How I build software quickly

#32

I've found that a "rough draft" is pretty hard to maintain as a "draft," when you have a typical tech manager. Instead, it becomes "final ship" code. I tend to write ship code from the start, but do so, in a manner that allows a lot of flexibility. I've learned to write "ship everywhere," even my test harnesses tend to be fairly robust, ship-Quality apps. A big part of that, is very high-Quality modules. There's alwa…

Tangent, is it a Swift thing to have "* ################################################################## / comment markers ?

It becomes quickly very visually dominant in the source code:

> / ###################################################################################################################################### / // MARK: - PUBLIC BASE CLASS OVERRIDES - / ###################################################################################################################################### */

Re: How I build software quickly

#33
post #4

An important dimension that is not really touched upon in the article is development speed over time. This will decrease with time, project and team size. Minimising the reduction rate may require doing things things that slow down immediate development for the sake of longer term velocity. Some examples would be test, documentation, decision logs, Agile ceremonies etc. Some omissions during initial development may h…

Even as a solo developer, I can swear by decision logs, test and documentation, in that order. I personally keep a "lab notebook" instead of a "decision log" which chronicles the design in real-time, which forms basis of the tests and documentation. Presence of a lab notebook allows me to write better documentation faster, even if I start late, and tests allow me to verify that the design doesn't drift over time. Sta…

Right, an important part of keeping in mind other future developers working on your codebase. You 6 months later is that other developer once the immediate context is gone from your head. :)

Re: How I build software quickly

#34
post #29

Earlier quoted context omitted.

I also like Django a lot. I can get a working project up and running trivially fast. In my day job I work with Go and while it's fine, I end up writing 10x more code for simple API endpoints and as soon as you add query parameters for filtering, pagination, etc. etc. it gets even longer. Adding a permissions model on top does similar. Of course there's a big performance difference but largely the DB queries dominate…

oh that's interesting. Is that due to missing libraries in Go? That could be a nice open source project if so.

There's an almost pathological resistance to using anything that might be described as a 'framework' in the Go community in the name of 'simplicity'.

I find such a blanket opinion to be unhelpful, what's fine for writing microservices is less good for bootstrapping a whole SaaS app and I think that people get in a bit too much of an ideological tizz about it all.

Re: How I build software quickly

#35
post #25

I actually try to build it "well" in the first pass, even for prototyping. I'm not gonna say I succeed but at least I try. This doesn't mean writing tests for everything, and sometimes it means not writing tests at all, but it means that I do my best to make code "testable". It shouldn't take more time to do this, though: if you're making more classes to make it testable, you're already messing it up. This also doesn…

I personally find that doing it well in the first pass slows me down and also ends up in worse overall designs.

But I am also pretty disciplined on the 2nd pass in correcting all of the hacks and rewriting everything that should be rewritten.

There are two problems I have with trying to do it right the first time:

- It's hard to know the intricacies of the requirements upfront without actually implementing the thing, which results in designing an architecture with imperfect knowledge

- It's easy to get stuck in analysis paralysis

FWIW I am a huge fan of John Ousterhout. It may be my all time favorite book on software design.

Re: How I build software quickly

#36

In recent years, I have learned how to build sufficiently robust systems fast. Here are some things I have learned: * Learn one tool well. It is often better to use a tool that you know really well than something that on the surface seems to be more appropriate for the problem. For extremely large number of real-life problems, Django hits the sweet spot. Several times I have started a project thinking that maybe Djan…

I feel like Django has the largest RoI of any framework out there

Re: How I build software quickly

#37

Earlier quoted context omitted.

Even as a solo developer, I can swear by decision logs, test and documentation, in that order. I personally keep a "lab notebook" instead of a "decision log" which chronicles the design in real-time, which forms basis of the tests and documentation. Presence of a lab notebook allows me to write better documentation faster, even if I start late, and tests allow me to verify that the design doesn't drift over time. Sta…

Right, an important part of keeping in mind other future developers working on your codebase. You 6 months later is that other developer once the immediate context is gone from your head. :)

That's very true. I like to word this a little differently:

> Six months ago, only I and God knew how this code worked. Now, only God knows. :)

Re: How I build software quickly

#38
This is very familiar. Rough draft, some manual execution often wrapped in a unit test executor, or even written in a different scripting language just to verify the idea. This often helped me to show that we don't even want to build the thing, because it won't work the way people want it to.

The part about distraction in code feels also very real. I am really prone to "clean up things", then realize I'm getting into a rabbit hole and my change grows to a size that my mates won't be happy reviewing. These endeavors often end with complete discard to get back on track and keep the main thing small and focused - frequent small local commits help a lot here. Sometimes I manage to salvage something and publish in a different PR when time allows it.

Business mostly wants the result fast and does not understand tradeoffs in code until the debt hits the size of a mountain that makes even trivial changes painfully slow. But it's about balance, which might be different on different projects.

Small, focused, simple changes definitely help. Although, people are not always good at slicing a larger solution into smaller chunks. I sometimes see commits that ship completely unused code unrelated to anything with a comment that this will be part of some future work...then prio shifts, people come and go, and a year later we have to throw out all of that, because it does not apply to the current state and no one knows anymore what was the plan with that.

Re: How I build software quickly

#40
post #29

Earlier quoted context omitted.

oh that's interesting. Is that due to missing libraries in Go? That could be a nice open source project if so.

There's an almost pathological resistance to using anything that might be described as a 'framework' in the Go community in the name of 'simplicity'. I find such a blanket opinion to be unhelpful, what's fine for writing microservices is less good for bootstrapping a whole SaaS app and I think that people get in a bit too much of an ideological tizz about it all.

I don't think anyone would advise to do everything from scratch all the time.

It's mostly about libraries vs opinionated frameworks.

No one in their right mind would say: just use the standard library but I've seen it online. That discourse is not helping.

I think people get this miscontrued on both sides.

A set of reusable, composable libraries would be the right balance in Go. So not really a "framework" either.

I think that reflects better the actual preferred stance.

Post reply on HN