Live data from Hacker News

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

dmitrybrant.com

91–100 of 343 posts

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

#92

> 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…”

Hm. That was interesting, so I ran it as prompt to Qwen3-Coder (which I run locally). It spat out a bunch of C functions together with a C struct and commented:

  This implementation provides:
  Generic Tuple Structure: A flexible tuple that can hold different types of elements (int, double, string, float)
  Constructor Function: tuple_create() initializes a new tuple with specified size
  Type-Safe Setters:
    tuple_set_int(), tuple_set_double(), tuple_set_string(), tuple_set_float()
  Type-Safe Getters:
    tuple_get_int(), tuple_get_double(), tuple_get_string(), tuple_get_float()
  Memory Management: Automatic memory allocation and deallocation
  Utility Functions:
   tuple_print() for displaying tuple contents
   tuple_destroy() for cleanup
Seems to be a common enough request to be present in the model's training data :D Even the code looked fine, apart from being a very naive and thus slow implementation.

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

#93

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…

are you advocating for not having code reviews...? Just straight force push to main?

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

#94

Earlier quoted context omitted.

> Why hasn't there been a minimal-boilerplate language and framework and programming environment? There are? For example, rails has had boilerplate generation commands for a couple of decades.

There's boilerplate in Rails too. We move the goal posts for what we define as boilerplate as we better explore and solve a class of problems.

What boilerplate is there in rails?

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

#95
post #30
post #11

Earlier quoted context omitted.

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…

This is more of a reflection of how our profession has not meaningfully advanced. OP talks about boilerplate. You talk about grunt work. We now have AI to do these things for us. But why do such things need to exist in the first place? Why hasn't there been a minimal-boilerplate language and framework and programming environment? Why haven't we collectively emphasized the creation of new tools to reduce boilerplate a…

We have been emphasizing on creating abstractions since forever. We now have several different hardware platforms, programming languages, OS's, a gazillion web frameworks, tons of databases, build tools, clustering frameworks and on and on and on. We havn't done so entirely collectively, but I don't think the amount of choice here reflects that we are stupid, but that rather that "one size doesn't fit all". Think about the endless debates and flame wars about the "best" of those abstractions. I'm sure that Skynet will end that discussion and come up with the one true and only abstraction needed ;)

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

#97
post #56

I was banned from an OpenSource project [1] recently because I suggested a bug fix. Their „code of conduct“ not only prevents PRs but also comments on issues with information that was retrieved by any AI tool or resource. Thinking about asking Claude to reimplement it from scratch in Rust… [1] https://codeberg.org/superseriousbusiness/gotosocial/src/bra...

/ Suddenly i saw this: //Update regarding corporate sponsors: we are open to sponsorship arrangements with organizations that align with our values; see the conditions below.// They should know that beggars cant be choosers.

That's not begging. That's a premptive rejection for people who think they can take control of the project through money.

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

#98
> so I loaded the module myself, and iteratively pasted the output of dmesg into Claude manually,

One of the things that has Claude as my goto option is its ability to start long-running processes, which it can read the output of to debug things.

There are a bunch of hacks you could have used here to skip the manual part, like piping dmesg to a local udp port and having Claude start a listener.

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

#99
post #93

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. 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…

are you advocating for not having code reviews...? Just straight force push to main?

> are you advocating for not having code reviews...? Just straight force push to main?

No, not at all.

What I was speaking about was if the person to whom I replied is not a s/w engineer, then perhaps a better contribution to their project would be to define requirements in the form of RSpec specifications (since Ruby is in use) and allow the engineering team to satisfy them as they determine appropriate.

I have seen product/project managers attempt to "contribute" to a development effort much like what was described. Usually there is a power dynamic such that engineers cannot overtly tell the manager(s), "you define the 'what' and we will define the 'how'." Instead, something like the PR flow described is grudgingly accepted and then worked around.

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

#100
post #30

Earlier quoted context omitted.

This is more of a reflection of how our profession has not meaningfully advanced. OP talks about boilerplate. You talk about grunt work. We now have AI to do these things for us. But why do such things need to exist in the first place? Why hasn't there been a minimal-boilerplate language and framework and programming environment? Why haven't we collectively emphasized the creation of new tools to reduce boilerplate a…

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.

Yes and its why AI fills me with impending doom: handing over the reigns to an AI that can deal with the bullshit for us means we will get stuck in a groundhog day scenario of waking up with the same shitty architecture for the foreseeable future. Automation is the opposite of plasticity.
Post reply on HN