← Back to context

Comment by godelski

5 days ago

How do you know the code is right?

The program behaves as you want.

No, really - there is tons of potentially value-adding code that can be of throwaway quality just as long as it’s zero effort to write it.

Design explorations, refactorings, erc etc.

  • And how do you know it behaves like you want?

    This is a really hard problem when I write every line and have the whole call graph in my head. I have no clue how you think this gets easier by knowing less about the code

    • Tests pretty much. Not a silver bullet for everything, but works for many cases.

      Unless you're a 0.1% coder, your mental call graph can't handle every corner case perfectly anyway, so you need tests too.

      1 reply →

    • By using the program? Mind you this works only for _personal_ tools where it’s intuitively obvious when something is wrong.

      For example

      ”Please create a viewer for geojson where i can select individual feature polygons and then have button ’export’ that exports the selected features to a new geojson”

      1. You run it 2. It shows the json and visualizes selections 3. The exported subset looks good

      I have no idea how anyone could keep the callgraph of even a minimal gui application in their head. If you can then congratulations, not all of us can!

      2 replies →

    • how do you know what you want if you didn't write a test for it?

      I'm afraid what you want is often totally unclear until you start to use a program and realize that what you want is either what the program is doing, or it isn't and you change the program.

      MANY programs are made this way, I would argue all of them actually. Some of the behaviour of the program wasn't imagined by the person making it, yet it is inside the code... it is discovered, as bugs, as hidden features, etc.

      Why are programmers so obsessed that not knowing every part of the way a program runs means we can't use the program? I would argue you already don't, or you are writing programs that are so fundamentally trivial as to be useless anyway.

      LLM written code is just a new abstraction layer, like Python, C, Assembly and Machine Code before it... the prompts are now the code. Get over it.

      1 reply →

If customers don’t complain it must be working

  • You don't hear the complaints. That's different than no complaints. Trust me, they got them.

    I got plenty of complaints for Apple, Google, Netflix, and everyone else. Shit that can be fixed with just a fucking regex. Here's an example: my gf is duplicated in my Apple contacts. It can't find the duplicate, despite same name, nickname, phone number, email, and birthday. Which there's three entries on my calendar for her birthday. Guess what happened when I manually merged? She now has 4(!!!!!) entries!! How the fuck does that increase!

    Trust me, they complain, you just don't listen