Hacker News new | ask | show | jobs
by soganess 23 days ago
Since we out here doing ad hominems: if you don't think the code you wrote a few months ago is shit, you're already cooked, and judging by that comment, I'm betting you're crispy.

Even the best code I've ever written rots, not because it changes but because I get better. Now... I know thinking out of the box is hard... but one can get better a lot of different ways, and call me an optimist, but I'm betting folks can get better at producing tool-assisted code, too. Assuming how we do it now is how it will be forever is silly.

We're in the middle of figuring out the next level of mediated engineering. You-know-what or get off the pot, but stop pretending being a dinosaur is still in vogue. It's gauche, and trust me, we've seen it all before...

... back in my day we didn't have that fancy IDE autocomplete; we memorized every function in a library. IDEs?! ... Back in my day we didn't even have debuggers; we just knew how the code worked. Pish posh, back in my day the compiler didn't even produce error messages that made sense. Compilers? The faux luxury of it all! Back in my day, if you actually cared about your code, you wrote the assembly by hand.

1 comments

The code I write is pretty good, and it stays good throughout the years because it was already good. If you're frequently finding month old code to be shit, your code is just shit to begin with.
Or .. you are working in an unstable environment. If the system you take as a base changes frequently(like the web), your code becomes bad, outdated code, no matter how shiny it was before. But if it was good, migration and maintaining it is easier.
React is 13 years old
So?

Are you implying I should have switched to react 13 years ago, when it was just another framework who come and go?

And then my experience would have been stable?

(I kind of doubt it, when my unstable web experience was caused by changes into how canvas works, webrtc, indexeddb, webgl, webgpu. I don't make simple UI's)

Or well, just that "let" was introduced makes all my beautiful old code with only "var" bad code by modern standards.

"let" is 11 years old.

My point is that the web is not really an unstable platform anymore, it's just something people say that used to be true. Also using var and other superceded constructions doesn't make the code bad; that's not what bad code is. I think you know this.

I think I know that different people have different metrics what bad code is.

My main metric is, if it is readable. So yes, I also don't consider my old code with var bad. But other people do.