Live data from Hacker News

Go ahead, write the “stupid” code

spikepuppet.io

31–40 of 157 posts

Re: Go ahead, write the “stupid” code

#31
post #26
post #4

I'm working on in-kernel ext3/4fs journalling support for NetBSD. The code is hot garbage but I love it because of the learning journey it's taken me on: about working in a kernel, about filesystems, etc. I'm gonna clean it up massively once I've figured out how to make the support complete, and even then I expect to be raked over the coals by the NetBSD devs for my code quality. On top of that there's the fact that…

Ext4 is most certainly still in use and not a toy. Its trusted. It takes a lot for folks to adopt a new file system. I worked on a research topic in grad school and learned about holes in files, and how data isn’t removed until the last fd is closed. I use that systems knowledge in my job weekly. A tip. Kernel development can be lonely, share what you are working on and find others.

he said netbsd - there I would expect ext4 to be considered a toy even though it is used a lot in linux land. Different worlds.

Re: Go ahead, write the “stupid” code

#32

>>> When I finished school in 2010 (yep, along time ago now), I wanted to go try and make it as a musician. I figured if punk bands could just learn on the job, I could too. But my mum insisted that I needed to do something, just in case. Amusing coincidence. I also wanted to be a rock star, or at least a successful working musician. My mom also talked me out of it. Her argument was: If there's no way to learn it in…

Luckily you can still pursue being a musician without all the pressure of having to be successful. On this road, one day you are free to declare your own success to yourself

Indeed. On the other hand, I also know my limitations, since roughly half the people I play with are pro's with music degrees. And I'm still trying to improve.

I'm inspired by the quote from Pablo Casals when he was in his 90s. They asked him why he still needed to practice, and he said: "Because I'm finally beginning to see some improvement."

Re: Go ahead, write the “stupid” code

#33

Earlier quoted context omitted.

I think the people who think there is no stupid code don't actually ever witness truly bad code. The worst code that they come across is, at worst, below average. And since that's the worst they see, it gets mentally defined as bad.

That’s a charitable interpretation. The other more pessimistic one is that they only see stupid code, which cannot be made any stupider.

I think that's basically an impossibility, unless the only code they look at is from people who have 5 minutes of coding experience and attempt to get working code from vibes (without the LLM). Even suggesting this makes me think you haven't even seen truly stupid code.

I'm talking code from people with no programming experience, trying to contribute to open-source mod projects by pattern matching words they see in the file. They see the keyword static a lot, so they just put static on random things.

Re: Go ahead, write the “stupid” code

#34

The Kernighan law says debugging code is twice as hard as creating it. Therefore, if you push yourself to the limit of your abilities to create the most clever code you can, you won't be able to debug it.

It applies to LLM code, but if you take the law at face value, it's a very damaging one. Cleverness should be used to make your code easier to verify, not harder.

He said it with a very specific idea in mind, and like most of software engineering "laws", if you know enough to know when to apply it, you don't need the law.

Re: Go ahead, write the “stupid” code

#35

>>> When I finished school in 2010 (yep, along time ago now), I wanted to go try and make it as a musician. I figured if punk bands could just learn on the job, I could too. But my mum insisted that I needed to do something, just in case. Amusing coincidence. I also wanted to be a rock star, or at least a successful working musician. My mom also talked me out of it. Her argument was: If there's no way to learn it in…

Really still kicking myself for not majoring in robotics in school. I wanted to program, so I studied computer engineering but hadn't really absorbed that much in classes. But I will likely never have access to all the robotics stuff my school had, nor the guided learnings.

Never too late to try stuff out of course, but very little beats structured higher ed education in relatively small classes (think there was only about 24 people in the robotics major?)_

Re: Go ahead, write the “stupid” code

#38

>>> When I finished school in 2010 (yep, along time ago now), I wanted to go try and make it as a musician. I figured if punk bands could just learn on the job, I could too. But my mum insisted that I needed to do something, just in case. Amusing coincidence. I also wanted to be a rock star, or at least a successful working musician. My mom also talked me out of it. Her argument was: If there's no way to learn it in…

Luckily you can still pursue being a musician without all the pressure of having to be successful. On this road, one day you are free to declare your own success to yourself

Maybe if the internet and piracy hadn't fucked artists over, they could have made decent money as a musician selling their work without having to be a major-label superstar. Alas, we do not live in that timeline.

Re: Go ahead, write the “stupid” code

#40
post #5

I'm reminded of the quantity vs. quality groups in a photography class: https://sebastianhetman.com/why-quantity-matters/ Do stuff, and you learn stuff. Go play.

While I generally agree with the conclusion of that, I think it might be a bit too naive.

The quantity group has a trivial way to "hack" the metric. I can just sit there snapping photos of everything. I could just set up a camera to automatically snap photos all day and night. To be honest, if I'm not doing this at a stationary wall there's probably a good chance I get a good photo since even a tiny probability can be an expected result given enough samples.

But I think the real magic ingredient comes from the explanation

  > The group never worried about the quality of their work, so they spent time experimenting with lighting, composition, and such.
The way I read this is "The quantity group felt assured in their grade, so used the time to be creative and without pressure." But I think if you modified the experiment so that you'd grade students on a curve and in proportion to the number of photos they took then the results might differ. Their grade might not feel secure as it could take just one person to communicate that they're just snapping photos all day as fast as they can. In this setting I think you'd have even less ability to explore and experiment than the quality group.

I do think the message is right though and I think this is the right strategy in any creative or primarily mental endeavor (including coding). The more the process depends on creativity the more time needs to be allocated to this type of exploration and freedom. I think in jobs like research that this should be the basis for how they are structured and effectively you should mostly remove evaluation metrics and embrace the fundamentally ad hoc nature. In things like coding I think you need more of a mix and the right mix depends highly on the actual objectives. But I wanted to make the above distinction because I think it is important if we're trying to figure out what those objectives are.

Post reply on HN