Live data from Hacker News

Measuring the sloppiness of code

earendil.com

181–190 of 246 posts

Re: Measuring the sloppiness of code

#181
I was bit disappointed how few metrics the article mentioned. There are tons of code quality metrics that have been thought of over the last 40 years. We don’t have a good idea which ones are worth enforcing though. And we don’t know if the metrics that are good for humans are also good for LLMs

https://dekobon.github.io/big-code-analysis/metrics.html

https://dekobon.github.io/big-code-analysis/metrics-vcs.html

Re: Measuring the sloppiness of code

#182

Is coding "solved?" I've been using Fable and Grok to vibecode a library to improve text extraction for legal PDFs. (Which have things like line numbers in transcripts that messes up text extraction.) This is a simple, dumb problem that should be like killing a mouse with a nuke. But I got to "pretty good" with a few iterations of not looking at the code or design. The program works, pretty well. But the design and h…

Without knowing details of your approach, I would venture that your challenge is not with the coding per se but extracting structured data from PDFs. It’s a surprisingly hard problem because PDFs are optimized for preserving the visual structure and layout of the content for precise rendering and printing… NOT for preserving the logical structure of the data!

Which is why the best results these days for extracting structured data from PDFs is by having the model do it directly rather than writing code to do it. It literally takes that level of intelligence to be reliable at it.

A common approach is to provide the model with a template or structured schema describing the format you want the data in, and the PDF itself, and it should return a JSON with the appropriate values filled in. It won’t be 100% but probably higher than what you’re seeing now.

Re: Measuring the sloppiness of code

#183
post #98
post #75

Earlier quoted context omitted.

Nah, you're still blaming workers and not leadership. If leadership is okay with not training workers (something American corporations would do in the distant past) then it's not fair to continue to blame workers when leadership is clearly aware of the problem and would rather pocket the money than help workers. These companies pay management more than workers for a reason, if you can't even admit that they are to bl…

I do blame management for letting these people through the interview process and then not firing them. But that’s independent of the fact they exist. Training doesn’t solve every problem, the worst programmer I ever worked with that a PHD in computer science. Everything he made was horribly slow, wildlife overly complicated, and buggy. Worse he wouldn’t listen to anyone correcting his issues. He’d store numbers in th…

Let me throw a curve ball at you: do you accept the premise that most modern corporations are centrally planned economies under the rulership of monarchies, oligarchies, or general authoritarians? If so, do you think introducing democracy into the workplace would help alleviate issues you care about?

You do not like bad workers, management doesn't care. They pay bad workers the same as you, bad workers can get promotions the same as you, you will also get laid off with the bad workers as well; or maybe even worse, the bad workers get promoted into management themselves. How do you want things to change in such an environment?

You have no authority to do anything meaningful as a single worker, what if you were given a voice to actually make these claims and have other workers decide what to do based on your voice?

Workplace democracy seems like an interesting concept to explore if you truly want to create better environments with beneficial outcomes to all, not just the few:

https://en.wikipedia.org/wiki/Workplace_democracy

Or are you just trying to bash your co-workers so you become the next pick me?

Re: Measuring the sloppiness of code

#184
post #118
post #75

Earlier quoted context omitted.

Nah, you're still blaming workers and not leadership. If leadership is okay with not training workers (something American corporations would do in the distant past) then it's not fair to continue to blame workers when leadership is clearly aware of the problem and would rather pocket the money than help workers. These companies pay management more than workers for a reason, if you can't even admit that they are to bl…

I've only worked at companies with great leadership. This is in the Nordics with very strong worker protection. And yet most of my colleagues including myself have been pretty terrible and write dirty code. It's not a management issue and it's not anti-worker to acknowledge this fact.

Your great leadership doesn't seem to care, so either your management knows better than you or maybe you should push back on the notion that you worked with "great leadership."

Only poor leaders ignore their workers, which is what you seemed to have actually experience.

Re: Measuring the sloppiness of code

#185
post #20

Earlier quoted context omitted.

This was always due to pressures by management and the company environment, not the workers themselves. It's hard to blame the people writing code when they have to deal with nontechnical leadership that wants to have a feature factory or never given appropriate resources to solve problems. Blaming workers is always an excuse by poor management.

The pressures from management and the company environment are not always a bad thing. It really depends on whether the pressures are coming from a logical business perspective or whether they are just coming from stupidity or ignorance. In a business environment, taking a long time to ship great code can mean that the company goes out of business, and then the software developers have a lot of great code and no incom…

I'm sorry but pressuring workers over this stuff is frankly disgusting and I reject you for your anti-worker + anti-human sentiment.

What sort of human looks at a group of people and goes "it would be really nice if we made people miserable."

Absolutely disgusting.

Re: Measuring the sloppiness of code

#186
post #98

Earlier quoted context omitted.

I do blame management for letting these people through the interview process and then not firing them. But that’s independent of the fact they exist. Training doesn’t solve every problem, the worst programmer I ever worked with that a PHD in computer science. Everything he made was horribly slow, wildlife overly complicated, and buggy. Worse he wouldn’t listen to anyone correcting his issues. He’d store numbers in th…

Let me throw a curve ball at you: do you accept the premise that most modern corporations are centrally planned economies under the rulership of monarchies, oligarchies, or general authoritarians? If so, do you think introducing democracy into the workplace would help alleviate issues you care about? You do not like bad workers, management doesn't care. They pay bad workers the same as you, bad workers can get promot…

> do you accept the premise that most modern corporations are centrally planned economies under the rulership of monarchies, oligarchies, or general authoritarians?

No stock owners are ultimately in control of public companies. That doesn’t fit any of the models you just described.

Similarly companies are not independent of government control which inherently separates them from management systems associated with governments. A CEO is limited by the law in ways that a dictator isn’t.

Re: Measuring the sloppiness of code

#187

Does anybody actually know whether there's a limit to the complexity LLMs are capable of dealing with in a codebase? It's very obvious that they don't write code that is suitable for people to understand it (and it's gonna get worse and worse the more RL is used to train these models), but if there isn't a point at which LLMs also struggle due to the complexity they introduce, then I'm not sure it really matters anym…

That kind of complexity is combinatorial so "a 4x4 doesn't stop you getting stuck, it just means you get stuck further from help."

Re: Measuring the sloppiness of code

#188
post #182

Is coding "solved?" I've been using Fable and Grok to vibecode a library to improve text extraction for legal PDFs. (Which have things like line numbers in transcripts that messes up text extraction.) This is a simple, dumb problem that should be like killing a mouse with a nuke. But I got to "pretty good" with a few iterations of not looking at the code or design. The program works, pretty well. But the design and h…

Without knowing details of your approach, I would venture that your challenge is not with the coding per se but extracting structured data from PDFs. It’s a surprisingly hard problem because PDFs are optimized for preserving the visual structure and layout of the content for precise rendering and printing… NOT for preserving the logical structure of the data! Which is why the best results these days for extracting st…

The use case is basically the same ones where a programmer would use grep on source files, and it’s too slow to run the model on it directly for the same reasons.

Existing tools do text extraction (pdftotext) but not that great when there’s internal numbering and stuff like that. It has to be a heuristic approach, and it won’t be perfect. But it’s an interesting data point that the model isn’t able to figure out the best heuristic itself. Or even make incremental progress towards one after a certain point.

Re: Measuring the sloppiness of code

#189

Does anybody actually know whether there's a limit to the complexity LLMs are capable of dealing with in a codebase? It's very obvious that they don't write code that is suitable for people to understand it (and it's gonna get worse and worse the more RL is used to train these models), but if there isn't a point at which LLMs also struggle due to the complexity they introduce, then I'm not sure it really matters anym…

first you’d need to define how to define/measure the complexity of code when it comes to this case.

Re: Measuring the sloppiness of code

#190
post #83

Coding is not just the program running in memory, its also the process of distributing the mental model of understanding among the team. If humans increasingly are kept out of coding, then who holds the mental model? If AI holds the mental model, by definition human prompts will be over lossy channel. This is true without AI too. Software quality is directly dependent on good devs that translate from business/PM spea…

Who says anyone needs to hold a mental model?

Imho a better way of thinking about it is in terms of views - you can have an unimaginably complex codebase that nobody reads in full, but either agents or humans receive views/perspectives on that codebase.

Before LLMs we couldn’t have built tools that would deliver such views, now we can.

Post reply on HN