Live data from Hacker News

The Stupid Programmer Manifesto

hasen.substack.com

131–140 of 239 posts

Re: The Stupid Programmer Manifesto

#131

Sigh. I hope this is satire. Or this person is only referring to their personal projects. Otherwise, I agree with their premise and suggest they find a different career. HTTP Verbs? You really can't get more basic. At least you could try to wrap your brain around the idea that GET reads and POST writes. Not using SQL? Okay. You're spending a lot of time and effort hand-rolling your own shitty database. The combinatio…

I'm okay with it until the database. For http verb, I'm onboard with just using POST for everything. The database is one area that you need more care. Even if just SQLite, storage persists and especially if this is for a company, needs to persist past you.

Unless there's a compelling reason...like a use case for caching (your server or an intermediate) or high volume (POSTs are larger requests), POST for everything is a good default.

Re: The Stupid Programmer Manifesto

#132
post #101
post #26

Earlier quoted context omitted.

Yeah, I really can't tell if it's satire. Especially things like this: > I’m not smart enough to figure out how to transform data between different layers of the system, so I just don’t. I use the same represetnation in the UI layer and the storage layer. OK, well then you might need to gather a little more work experience and meet the repercussions of decisions like this one. Or maybe the OP is a contractor and neve…

That's a particularly weird one in light of starting out with "I only use statically typed languages", because it's basically trivial in a statically typed language. You have "type UIData", "type StorageData", and functions/methods to convert back and forth between them. Those functions/methods may need additional parameters, which will be documented by the mere act of calling for them in the function signature. You…

But, _what_ is the point of using a different layout/structure for storage vs the UI layer?

Remember I'm a 0.5x developer. If I have to write code to transform data for every kind of entity/object I need to store and have a UI to view and edit, that's way too much. I'm already very slow. No need to slow me down further by telling me I have to write so much extra code that does no useful work.

Re: The Stupid Programmer Manifesto

#134

Sigh. I hope this is satire. Or this person is only referring to their personal projects. Otherwise, I agree with their premise and suggest they find a different career. HTTP Verbs? You really can't get more basic. At least you could try to wrap your brain around the idea that GET reads and POST writes. Not using SQL? Okay. You're spending a lot of time and effort hand-rolling your own shitty database. The combinatio…

Yeah I really hope this is exclusive to personal throwaway projects. Otherwise such thinking can land you and your potential users/clients in very hot water. A belief like avoiding SQL because is too complicated indicates to me you're incapable of handling data appropriately. Again, totally OK if you're smart enough to understand that you're not going to be using user data anyways maybe saving a theme variable here and there. But none of that is indicated in the article, and is why I'm so confused why the comments ITT are supportive.

Re: The Stupid Programmer Manifesto

#135

Earlier quoted context omitted.

I'm guessing they are thinking of a scenario where SELECT * FROM User_Details gets sent directly to the front end. So even if all you are displaying is the users name or initials you would still be sending things like SSN and credit card number to the front end

Sanitizing your inputs is a string issue not a data structure issue. Sanitizing your inputs has been known about for literally almost half a century that should just be default for developers at this point.

>Sanitizing your inputs has been known about for literally almost half a century that should just be default for developers at this point.

Except if you're a "stupid programmer", in which such defaults are irrelevant to you. In such cases, one can only hope they're relying on tooling that sanitizes as much as possible for them.

Re: The Stupid Programmer Manifesto

#136
post #47
post #35

Honestly, the truly 'smart' programmer isn't someone who does or doesn't use a bunch of techniques or best practices, it's the one who can look at the situation and do what's right for that particular project/job. Most of the things in this post could be the right answer if the project is a weekend side project that's going to get a few hundred views a month, or a website for a small business. Bob's Restaurant doesn'…

Well, they do what's right according to how they learned, which may only be a local 'right' and not a global 'right'. There's so many ways to put things together that you can make it work in a lot of different ways. It becomes more art than engineering or science. Then whether your peers accept whether it was the right thing is up to their preferences too. All that comes down to the large variety of training everyone…

> It becomes more art than engineering or science.

The opposite.

> All that comes down to the large variety of training everyone in the field gets, from university to youtube tutorials.

A big problem is that a lot of the youtube/bootcamp ecosystem focusses on "teaching what they do at the FAANG" to lure people into thinking they could get a job there by enrolling/buying whatever training they are selling. And then these people repeat what they have been told are "the best practices".

Proper engineering degree teaches about gathering requirement and analyzing the problem space to understand what really needs to be done.

Re: The Stupid Programmer Manifesto

#137
I wonder if it's not that he's not smart enough, but that he doesn't enjoy it. Personally, I loathe developing on the web stack. I find it tedious and boring, and as a result, I do it poorly. Not because I'm not smart enough, but because I dislike it.

All that means is that sort of programming isn't for me. It doesn't mean I'm a terrible programmer.

Re: The Stupid Programmer Manifesto

#138
post #47

Earlier quoted context omitted.

Well, they do what's right according to how they learned, which may only be a local 'right' and not a global 'right'. There's so many ways to put things together that you can make it work in a lot of different ways. It becomes more art than engineering or science. Then whether your peers accept whether it was the right thing is up to their preferences too. All that comes down to the large variety of training everyone…

> It becomes more art than engineering or science. The opposite. > All that comes down to the large variety of training everyone in the field gets, from university to youtube tutorials. A big problem is that a lot of the youtube/bootcamp ecosystem focusses on "teaching what they do at the FAANG" to lure people into thinking they could get a job there by enrolling/buying whatever training they are selling. And then th…

> Proper engineering degree teaches about gathering requirement and analyzing the problem space to understand what really needs to be done.

This. I don't even think you have to bring a degree into it, honestly. This is just at the heart of all engineering (software or otherwise).

Re: The Stupid Programmer Manifesto

#139

Earlier quoted context omitted.

I'm okay with it until the database. For http verb, I'm onboard with just using POST for everything. The database is one area that you need more care. Even if just SQLite, storage persists and especially if this is for a company, needs to persist past you.

Unless there's a compelling reason...like a use case for caching (your server or an intermediate) or high volume (POSTs are larger requests), POST for everything is a good default.

[dead]

Re: The Stupid Programmer Manifesto

#140
post #3

I can't tell if this is an honest call to keep things simple, or if it's meant to ridicule that idea. Because I strongly, deeply agree with some of these points, and am absolutely horrified by some of the others.

OP here.

I was working on a feature for a webapp that I thought should be doable in a day, but I spent roughly a week on it. When I was done with it, I looked back and thought: wait, why did this take me the whole week? I couldn't come up with a satisfying answer.

So I just decided to accept that I'm not that productive. Maybe there are things I can do to improve my speed of implementing features, but for the time being, this is my speed.

I was going to make a writeup about coming to terms with that.

But somehow as I was writing (originally on Twitter) I linked it in my head to the way I hate modern dev culture: the docker and the webpack, etc. Programming is already hard, why make it 10x harder with all the tools that require complex configurations, etc?

I remember raising this point on HN and other places with other developers, and that there was always push back from people who swear by these tools.

So it clicked in my head: I hate these tools because I'm already slow as it is and I can't take it when these complexities slow me down even further.

Then as I spent more time thinking about the content, I thought this a manifesto worthy content.

But in terms of the points mentioned: I'm dead serious about all of them. Although what I actually mean might not be obvious from first glance.

When I said I write objects as-is, it appears that most people in this thread thought I'm writing individual files. This is not what I'm doing. I'm using a B-Tree backed key-value store and doing binary serialization. I also have a scheme where I make use of the properties of B-Trees to make indexing/querying possible. I have a whole write up about this topic: https://hasen.substack.com/p/indexing-querying-boltdb

For using HTTP as a medium for RPC, I also have a writeup: https://hasen.substack.com/p/automagic-go-typescript-interfa...

These alternative techniques took time for me to develop, so you could say that it would have been faster for me to just use postgres/docker/aws etc (the standard stack). But this is my point: I really am too stupid to learn them.

Post reply on HN