Live data from Hacker News

How I build software quickly

evanhahn.com

101–110 of 215 posts

Re: How I build software quickly

#101

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

Completely OT and apologies if rude, but you're Gary Numan the musician?

I love finding out when celebrities have talents elsewhere. And Wikipedia says you've had quite a bit of aviation experience as well.

Kinda makes my morning... lol

p.s. The inner city cynical kid in me is now required to throw in that I found Django disappointing even though every else seems to love it. Ok... identity restored... can now go back to shaking my fist at the sky as per usual...

Re: How I build software quickly

#102
post #40

Earlier quoted context omitted.

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…

> No one in their right mind would say: just use the standard library but I've seen it online.

Yes but...sometimes the proper level of abstraction is simply a good HTTP library. Where the API of your application is defined in terms of URLs, HTTP methods, status codes, etc., the http library from the Go standard library might be all you need (depending on other requirements, of course).

A real life example: I needed a simple proxy with well defined behavior. Writing it in Go as a web application that forwarded calls to another service based on simple logic only took a few pages of code in a single file.

Re: How I build software quickly

#103
post #40

Earlier quoted context omitted.

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…

It's always going to be more work with composable libraries since they don't 'flow'. Just picking one of the examples I gave, pagination - that requires (a) query param handling (b) passing the info down into your database query (c) returning the pagination info in the response. In Django (DRF), that's all built in, you can even set the default pagination for every endpoint with a single line in your settings.py and…

That's fine as long as you never need to deviate from the default behavior of the framework.

Re: How I build software quickly

#104
post #92

> For example, if you’re making a game for a 24-hour game jam, you probably don’t want to prioritize clean code. That would be a waste of time! Who really cares if your code is elegant and bug-free? Having worked on some 24-hour game jams and similar, I've found completely the opposite. It's when you're in a real hurry that you really can't afford bad code. Writing better code will make it easier to get it right, wil…

I agree.

I think it's a misconception that writing good code must take longer than writing bad code. At least if you want it to vaguely satisfy some requirements.

Re: How I build software quickly

#105
post #92

> For example, if you’re making a game for a 24-hour game jam, you probably don’t want to prioritize clean code. That would be a waste of time! Who really cares if your code is elegant and bug-free? Having worked on some 24-hour game jams and similar, I've found completely the opposite. It's when you're in a real hurry that you really can't afford bad code. Writing better code will make it easier to get it right, wil…

Well, you probably would disregard some fancy asset loader and instead just statically include some files instead.

Or if you need to do some pathing and your quickest solution is some breadth first search.

Perhaps it isn't "bad code", but still a bad solution that could quickly be implemented and be solved by a lot of computing power.

Of course you may use ready-to-use modules that provide such features as well..., but it may be prohibited by competion rules, I don't know...

Re: How I build software quickly

#106
post #57

I think scale matters quite a lot here. If you're building something yourself or in a small team, I absolutely agree with everything written in the post. In fact, I'd emphasize you should lean into this sort of quick and dirty development methodology in such a context, because this is the strength of small scale development. Done correctly it will have you running circles around larger operations. Bugs are almost alw…

This is the point at which u scale down. Nobody needs these huge systems but everyone for some reason wants them...

In that case your system is a legitimate candidate for Micro Services.

Services that can each be maintained by a small team, with a clean, understandable API, appropriate protections for data (both security and consistency) and easily predictable cost and behavior.

Then you can compose these services to get more complex functionality.

Re: How I build software quickly

#107
post #68
post #53

Earlier quoted context omitted.

Agree with almost everything, but Celery is pretty common in my Django projects. I don't like the complexity cost, but especially when using some PaaS for hosting, it's usually the least painful option. I kinda always start out thinking this time I'll manage without, and then I have a bunch of jobs triggered via HTTP calls running into timeouts. At that point it's either threads, cron jobs (tricky with PaaS) or Celer…

What Paas do you use? Pythonanywhere has an always on task feature or scheduled tasks where you can run command scripts.

Heroku, AWS Elastic Beanstalk (not a fan), Fly.io. With these, it always boils down to using their Celery/RabbitMQ offering. I also used Ofelia in the past, a simple Docker image for cron jobs, but quickly outgrew it.

Maybe I'm missing it, but I don't think any of these has a nice simple built-in feature.

Re: How I build software quickly

#108
post #48
post #44

> For example, if you’re making a game for a 24-hour game jam, you probably don’t want to prioritize clean code. That would be a waste of time! Who really cares if your code is elegant and bug-free? Hate to be an anecdote Andy here, but as someone who has done a lot of code review at (non-game) hackathons in the past (primarily to prevent cheating), the teams that performed the best were also usually the ones with th…

The gaming use case is what makes this apt advice. If you've got 24h to make a game and you're spending more than ~1h worrying about the source code cleanliness, I don't think it's gonna go well. Systems like UE blueprints showcase how pointless the pursuit of clean anything is when contrasted with the resulting product experiences.

If you're an experienced developer, writing clean code doesn't add any more time than writing shitty code. It's just ingrained habits of what makes for the best productivity.

Re: How I build software quickly

#109
Isn't the current layoff-heavy tech world the biggest threat to software quality and engineer productivity?

The perpetual looming threat of layoffs, the need to deliver wins ASAP, stifles creativity, punishes experimentation, and pushes people to burnout. It forces people into groupthink about topics like AI. Nobody can say the emperor has no clothes (emperor being leadership or the topic du-jour)

Forget LLM coding, solve this problem...

Re: How I build software quickly

#110
post #82

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…

Yes I really wish for something like Django for a statically typed language (maybe Spring? Haven't tried it). I'm writing a CRUD CLI ( https://github.com/bbkane/enventory/ ) partly to practice doing it in Go, and while I'm mostly happy with the resulting code, theres just a whole lot of it. At least it's simple enough that I can trust LLMs to ok jobs with detailed prompts (example: https://github.com/bbkane/enventory…

hello,

as always: imho. (!)

hmmm ... i think spring-boot combined with either java or kotlin is a very good alternative to django.

even so i wouldn't compare them directly, but static typing avoids a lot of problems.

idk ... for me personally one of djangos great features is its custom db-model and relative (!) painless db schema-migration.

for spring-boot i often went with the tool flyway for handling db-migration ...

just my 0.02€

Post reply on HN