Live data from Hacker News

Using Claude Code to modernize a 25-year-old kernel driver

dmitrybrant.com

241–250 of 343 posts

Re: Using Claude Code to modernize a 25-year-old kernel driver

#241
post #86

Earlier quoted context omitted.

This is the glaring fallacy! We are turning to unreliable stochastic agents to churn out boilerplate and do toil that should just be abstracted or automated away by fully deterministic, reliably correct programs. This is, prima facie, a degenerative and wasteful way to develop software.

Saying boilerplate shouldn’t exist is like saying we shouldn’t need nails or screws if we just designed furniture to be cut perfectly as one piece from the tree. The response is “I mean, sure, that’d be great, not sure how you’ll actually accomplish that though”.

You can design furniture without nails or screws. See https://en.m.wikipedia.org/wiki/Japanese_carpentry

Reason Japanese carpenters do or did that is that sea air + high humidity would absolutely rot anything with nail and screw.

No furniture is really designed from a single tree, though. They aren't massive enough.

I agree with overall sentiment. But the analogy is higly flawed. You can't compare physical things with software. Physical things are way more constrained while software is super abstract.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#242

> Be as specific as possible, making sure to use the domain-specific keywords for the task. If you don't have the technical understanding of a language or framework, there is going to be a lot of ambiguity in your prompts. This specificity gap leads the LLM to fill in those gaps for you, which may not be what you intended. And that's usually where bugs hide. I think this is the flip side to being a "force multiplier"

“I need a C class that has a constructor for a tuple” I would hope Claude would be like “Hold on man…”

I asked ChatGPT to make a system of macros that would generate a struct with given fields (for example: int a, bool b, char *c) and a function that would print the struct contents. Instead of refusing it started inventing recursive macros that were never going to work. It seems LLMs are especially bad with C macros.

If you have access to state-of-art coding assistants, try asking this. You can additionally add a requirement to generate a destructor function (that would free dynamically-allocated fields).

Re: Using Claude Code to modernize a 25-year-old kernel driver

#243

Earlier quoted context omitted.

Also I wanted to add that LLMs (at least free ones) are pretty dumb sometimes and do not notice obvious thing. For example, when writing tests they generate lot of duplicated code and do not move it into a helper function, or do not combine tests using parametrization. I have to do it manually every time. Do you prompt it to reduce duplicated code?

I can prompt anything but I would prefer it not to make obvious mistakes from the start.

"Use DRY coding". 3 words can solve this problem. Maybe put it in the parent prompt.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#244
post #237
post #236

I have used Gemeni and OpenAI models too but at this point - Sonnet is next level undisputed King. I was able to port a legacy thermal printer user mode driver from legacy convoluted JS to pure modern Typescript in two to three days at the end of which printer did work. Same caveats apply - I have decent understanding of both languages specifically various legacy JavaScript patterns for modularity to emulate other la…

Check swe-bench results but for C#. It’s literally pathetic how these things just memorize, not achieve any actual problem-solving https://arxiv.org/html/2506.12286v3

You've misunderstood the study that you linked. LLMs certainly memorize, and this can certainly skew benchmarks, but that's not all they do.

Anyone with experience with LLMs will have experienced their actual problem solving ability, which is often impressive.

You'd be better off learning to use them, than speculating without basis about why they won't work.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#246

Earlier quoted context omitted.

I don't even know why things like templating and inclusion are not just part of the core web stack (ideally declaratively with no JS). There should be no need for an external tool or build process or third-party framework.

Html is rendered document. It’s ok to write it if you only need one document, but it’s better to use an actual template language or some generators if you’re going to have the same layout and components for many pages. You’re asking to shift this job from the editor (you) to the viewer (the browser).

Maybe it was a "viewer" in the 90s. The viewer is not a viewer - it is a full fledged application runtime that has a developer environment and media stack, along with several miscellaneous runtimes. A standard template language and document inclusion feature is very small peanuts compared to that. A teeny house compared to the galaxy already built-in - with several planets worth of features being added yearly.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#247
post #11
post #3

A good case study. I have found these two to be good categories of win: > Use these tools as a massive force multiplier of your own skills. Claude definitely makes me more productive in frameworks I know well, where I can scan and pattern-match quickly on the boilerplate parts. > Use these tools for rapid onboarding onto new frameworks. I’m also more productive here, this is an enabler to explore new areas, and is al…

This is a good takeaway. I use Claude Code as my main approach for making changes to a codebase, and I’ve been doing so every day for months. I have a solid system I follow through trial and error, and overall it’s been a massive boon to my productivity and willingness to attempt larger experiments. One thing I love doing is developing a strong underlying data structure, schema, and internal API, then essentially hav…

Can you share more?

Re: Using Claude Code to modernize a 25-year-old kernel driver

#248

Earlier quoted context omitted.

Compilers also came a long way.

compilers are deterministic

barely so - in practice they display (local) chaotic behaviour.

And LLMs are deterministic too if you freeze the seed.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#249
post #237

Earlier quoted context omitted.

Check swe-bench results but for C#. It’s literally pathetic how these things just memorize, not achieve any actual problem-solving https://arxiv.org/html/2506.12286v3

You've misunderstood the study that you linked. LLMs certainly memorize, and this can certainly skew benchmarks, but that's not all they do. Anyone with experience with LLMs will have experienced their actual problem solving ability, which is often impressive. You'd be better off learning to use them, than speculating without basis about why they won't work.

What exactly did I misunderstand?

Also “learn to use them” feels you’re holding it wrong vibes.

See also

https://machinelearning.apple.com/research/illusion-of-think...

Re: Using Claude Code to modernize a 25-year-old kernel driver

#250

Earlier quoted context omitted.

>> Use these tools for rapid onboarding onto new frameworks. Also new languages - our team uses Ruby, and Ruby is easy to read, so I can skip learning the syntax and get the LLM to write the code. I have to make all the decisions, and guide it, but I don't need to learn Ruby to write acceptable-level code [0]. I get to be immediately productive in an unfamiliar environment, which is great. [0] acceptable-level as def…

>>> Use these tools for rapid onboarding onto new frameworks. > Also new languages - our team uses Ruby, and Ruby is easy to read, so I can skip learning the syntax and get the LLM to write the code. If Ruby is "easy to read" and assuming you know a similar programming language (such as Perl or Python), how difficult is it to learn Ruby and be able to write the code yourself? > ... but I don't need to learn Ruby to w…

> If Ruby is "easy to read" and assuming you know a similar programming language (such as Perl or Python), how difficult is it to learn Ruby and be able to write the code yourself?

Reading code doesn't mean you can write it, as any programmer will tell you.

If I want to know if a string in ruby begins with another string, is the method starts_with or start_with or startwith like python or is it like perl where I have to use some completely different method? I don't know, better google it.

But if I'm reading and see `str.start_with?("https://")` I know instantly what it's doing.

Post reply on HN