Live data from Hacker News

The Stupid Programmer Manifesto

hasen.substack.com

101–110 of 239 posts

Re: The Stupid Programmer Manifesto

#101
post #26
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.

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 take the right type in the right place and the language does the rest, basically. Statically-typed languages are so good at this that even refactoring it after the fact is trivial; potentially tedious and lengthy, but generally trivial. You just create the new type you need, put it in one place in the code where it belongs, then start compiling the code and fixing the errors it flags. Repeat until you've converted all uses of the old type to the new type or performed the correct conversion. It'll probably just work the next time you run it. You don't anything even remotely as strong as Haskell to have an "It Just Works when I compile it" moment.

In dynamically-typed languages this is a nightmare, and this is one of the significant reasons I've stopped using them. Finding a bug six months to six years later from some attempt at this and finding a place that used the old type incorrectly when it was getting the new type, or because the programmer thought they were getting one but in fact got the other, or my favorite, the code is actually called with both types and nobody noticed until way too late... it's just something I've had enough of.

Re: The Stupid Programmer Manifesto

#102

This post is the programmer equivalent of teenage girls posting photos of themselves captioned with "I'm so ugly" to farm praise from their friends. I have come to dislike this growing trend that celebrates mediocrity and failure. Posting proudly that you are stupid, terrible and incompetent seems to result in applause and high praise. Why? Why is that a good thing? I hope this was intended to be a parody.

>I have come to dislike this growing trend that celebrates mediocrity and failure. That's not what this is. It's a sarcastic critique of techniques the author thinks don't justify their weight. It's a comment on the cognitive load required by the plethora of complex "best practices" that often goes without questioning. The multi-repo microservices thing really hit home for me. I only recently had to deal with this, a…

The problem is people aren't sure this is sarcastic. I've heard people say shit like this.

It reads very much like "I don't like learning new things" rants I see from time to time.

They've found one way they like doing things and stopped. They don't know how difficult any of the stuff they are talking about is. They just know it's something they don't want to learn.

Re: The Stupid Programmer Manifesto

#103

Earlier quoted context omitted.

How would you host the Bob’s Restaurant website?

You'd hit up GoDaddy for hosting and FTP your webpage files to it. And it'd work just as well as other website.

Yeah, this would be the way. This hypothetical restaurant would probably only need the following pages:

- Home page - About Us - Menu - [Maybe 1 or 2 info pages] - A contact page (with or without a form)

That's something that can be easily done with static HTML and CSS, and hosted on just about any random shared hosting service you can imagine. Assuming it doesn't become a major viral hit, it'd probably use a couple of megabytes of space on the hard drive and under a hundred megs of bandwidth.

Maybe up that number a tiny bit if Bob decides he wants to run a blog on the domain and you decide to just do the whole thing in WordPress or Drupal or whatever else.

Either way, a site that small could be built like its 1980 and it'd be perfectly fine.

Re: The Stupid Programmer Manifesto

#104

Earlier quoted context omitted.

And they'll also run into major liability issues when they leak customer credit card information, SSN, or something similar because they have a single class that represents the table in the database and they use it in both the frontend and backend.

how does the "structure" of the data have anything to do with leaking information? Seems like data protection occurs way lower in the stack like https and encryption at rest.

Data protection also happens at a much lower level. If you're running your binary blob on a server with no firewall you will be hammered with constant root hacks. https and REST encryption will be irrelevant.

Even worse, you may be running a mail server on the same machine.

Re: The Stupid Programmer Manifesto

#105
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'…

How would you host the Bob’s Restaurant website?

I never used them, but Neocities seem well worth of consideration for simple sites.

https://neocities.org/

Re: The Stupid Programmer Manifesto

#106
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'…

Yeah, I read this post as a dig at "cargo cult" programmers who read up on google-scale programming and best practice and unthinkingly apply those constructs to their own Bob's-Restaurant-scale task at hand where they are often at best an unneeded time and complexity overhead.

I've worked in a number of projects where they decided to move to microservices for reasons they wish they had, while not fully understanding microservices or applying basic litmus tests to where to split off services.

So we ended up with great puzzles like how to link an order service with an inventory service to check if there's enough inventory to fulfill an order, all through a central event bus. Then of course the order service has to update the inventory if the order is confirmed. But of course, the order service also has to talk to the pricing service, and since the price of products varies by day, they'd have to remember the price at the time the order was made. Whose responsibility is that? No idea, that's someone else's service.

Re: The Stupid Programmer Manifesto

#107

> I’m not smart enough to figure out docker confiuration, so instead I compile my web application into a self contained statically linked binary executable file. Good luck getting that to run in different environments because static or not, nearly every executable has dependencies. > I’m not smart enough to figure out cloud services and auto scaling groups, so I just upload my static binary file using scp to a linux…

> Good luck getting that to run in different environments because static or not, nearly every executable has dependencies. Maybe he's using nix to parameterize his builds with the system architecture, but left it out because it didn't fit his idea for a blog post.

No. I'm too stupid to even understand what that means.

Re: The Stupid Programmer Manifesto

#108
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'…

That last point is key. I’m a fan of SaaS solutions but I also wonder if more organizations could unlock more value by just having a 1x programmer (with well defined _objectives_) on staff.

Re: The Stupid Programmer Manifesto

#109

Earlier quoted context omitted.

how does the "structure" of the data have anything to do with leaking information? Seems like data protection occurs way lower in the stack like https and encryption at rest.

Because of things like mass assignment or IDOR, or injection attacks, presumably. Handing data from the user (untrusted input) directly to the backend unchanged is going to in 99.9999999% of cases also mean it's unchecked. "I'm not smart enough to bother sanitizing my input, or to learn about stuff that's someone else's job like security" would fit right into this "manifesto".

Sanitizing data is string based not data structure based though.

Re: The Stupid Programmer Manifesto

#110

Earlier quoted context omitted.

how does the "structure" of the data have anything to do with leaking information? Seems like data protection occurs way lower in the stack like https and encryption at rest.

Data protection also happens at a much lower level. If you're running your binary blob on a server with no firewall you will be hammered with constant root hacks. https and REST encryption will be irrelevant. Even worse, you may be running a mail server on the same machine.

> hammered with constant root hacks.

That happens to every server exposed to the internet.

Unless there is a targeted ddos event its usually on the level of a query or two per second AT MOST or so.

Its something most people don't worry about because theres no way around it.

If you need ddos protection you put the server behind cloudflare or something like it.

Its totally fine to raw dog the internet without a firewall in my opinion if the server only has a single web server that you keep updated and sanitize your inputs.

Running other services on the same server without a firewall becomes horrible though youre right. lol

Post reply on HN