Live data from Hacker News

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

dmitrybrant.com

321–330 of 343 posts

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

#321

Earlier quoted context omitted.

I think you can do this already. If you do not know the underlying concepts, or have no idea about how you have to architecture your project and so forth, then you will have problems with LLMs. So I think many if not most people who have problems with LLMs, it is most likely due to their lack of knowledge and/or their expectation that you can just simply write two sentences and it will figure out what you want and ho…

The thing is, is it slower to code with LLMs if you already have the knowledge? I think it is so. Coding is formal. There’s usually one correct way to tell the computer to do something (all the alternatives are equivalent through abstraction or transposition). The other ways are what we called bugs and there’s an infinty of them. The programming language eliminates some (incorrect syntax) while the type system get ri…

> is it slower to code with LLMs if you already have the knowledge? I think it is so.

In my case it is not slower, so it works for me. I cannot speak for others.

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

#322

Earlier quoted context omitted.

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

I'm the person you replied to. I've been developing software for >30 years now. In this case I have domain knowledge, architecture knowledge, experience with the type of systems we're building, but not the language (it's an odd situation). I'm using an LLM to avoid the weeks/months of getting up to speed with Ruby myself, and it appears to be working. To address your comments about PRs: without the LLM I would be sub…

> I'm the person you replied to. I've been developing software for >30 years now.

As a s/w engineer with 30+ years of experience, I assume you agree that in order to become proficient in a programming language one must go through the process of learning its syntax and idioms. Yet when you say:

  I'm using an LLM to avoid the weeks/months of getting up
  to speed with Ruby myself, and it appears to be working.
This contradicts my understanding of what you originally stated:

  ... I don't need to learn Ruby to write acceptable-level code [0]

  [0] acceptable-level as defined by the rest of the team
Regarding:

  To address your comments about PRs: without the LLM I
  would be submitting shitty PRs with lots of basic Ruby
  mistakes.
IMHO, this is how s/w engineers learn quickest assuming an environment which supports an open learning process. There are no shortcuts to achieving understanding.

Maybe we just have very different opinions on the learning process and/or maybe I lack the context required to understand your situation. In any event, best of luck in your endeavours.

EDIT:

For some reason I cannot reply to your reply to this message in order to share this resource:

  Why’s (Poignant) Guide to Ruby[0]
I found it a very entertaining read and one of the best language tutorials I have ever found. Hopefully you find it as useful as well.

0 - https://poignant.guide/book/chapter-1.html

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

#323

Earlier quoted context omitted.

I'm the person you replied to. I've been developing software for >30 years now. In this case I have domain knowledge, architecture knowledge, experience with the type of systems we're building, but not the language (it's an odd situation). I'm using an LLM to avoid the weeks/months of getting up to speed with Ruby myself, and it appears to be working. To address your comments about PRs: without the LLM I would be sub…

> I'm the person you replied to. I've been developing software for >30 years now. As a s/w engineer with 30+ years of experience, I assume you agree that in order to become proficient in a programming language one must go through the process of learning its syntax and idioms. Yet when you say: I'm using an LLM to avoid the weeks/months of getting up to speed with Ruby myself, and it appears to be working. This contra…

Thanks, yeah, it's interesting. We're not through the whole project, so it may still mess up ;) But so far so good.

I think the key point here is that I'm not trying to learn Ruby. We're trying to get a single project done in Ruby. I'm the best person to do the project, Ruby is the best language to do it in, but I don't know Ruby.

If I was trying to learn Ruby, this is not the way I'd do it, and I'd go up the learning curve as normal, writing all those shitty PRs and making all the mistakes as normal. As you say, there are no shortcuts to achieving understanding.

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

#324

Earlier quoted context omitted.

> I'm the person you replied to. I've been developing software for >30 years now. As a s/w engineer with 30+ years of experience, I assume you agree that in order to become proficient in a programming language one must go through the process of learning its syntax and idioms. Yet when you say: I'm using an LLM to avoid the weeks/months of getting up to speed with Ruby myself, and it appears to be working. This contra…

Thanks, yeah, it's interesting. We're not through the whole project, so it may still mess up ;) But so far so good. I think the key point here is that I'm not trying to learn Ruby. We're trying to get a single project done in Ruby. I'm the best person to do the project, Ruby is the best language to do it in, but I don't know Ruby. If I was trying to learn Ruby, this is not the way I'd do it, and I'd go up the learnin…

And the plot thickens... :-)

Now I can reply to your message (can't say why I couldn't before, so moving on).

Below is the added content in the event you were unaware of the previous message edit. In addition are three other resource links which may be beneficial to your project. The last one, nokogiri[3], is least likely to be applicable in general but is simply too cool to omit.

  Why’s (Poignant) Guide to Ruby[0]
I found it a very entertaining read and one of the best language tutorials I have ever found. Hopefully you find it as useful as well.

0 - https://poignant.guide/book/chapter-1.html

1 - https://www.rubyguides.com/2018/07/rspec-tutorial/

2 - https://github.com/cucumber/cucumber-ruby

3 - https://nokogiri.org/

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

#325
post #310

Earlier quoted context omitted.

You have to keep guard at each step to notice the inconsistencies and call your tutor's mistakes out though, or you'll inevitably learn some garbage. This is a use case that certainly "feels" like it's boosting your learning (it sure does to me), but I'd like to read an actual study on whether it really does before reaching any conclusions. It seems to me that LLMs help the most at the initial step of getting into so…

You overestimate hallucinations in known settings. If you ask to show source code, it‘s easy to check the sources (of a framework, language, local code)

No I don't. I have used Claude, ChatGPT and Gemini in many "known settings" while working during the last few weeks to test whether their output would be helpful. Topics included many things - Bayer image processing, color science, QML and Plasma plugins, GPS, GTK3->4 porting, USB PD, PDF data structures, ALSA configs... All of them hallucinated (which is hardly surprising, that's just what they do). Sometimes it was enough to ask it to verify its claims on the Web, but Gemini Pro once refused to get corrected, stubbornly claiming that the correct answer was "a common misconception" even when confronted with sources claiming otherwise :)

I was already knowledgeable enough in these topics to catch these, but some were dangerously subtle. Really, the only way to use LLMs to actually learn anything beyond trivial is to actively question everything it prints out and never move forward until you actually grasp the thing and can verify it. It still feels helpful to me to use it this way, but it's hard to tell how it compares to learning from a good and trustworthy resource in terms of efficiency. It's hard to unlearn something and try to learn it again another way to compare ;P

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

#326

Earlier quoted context omitted.

> 2. We will not accept changes (code or otherwise) created with the aid of "AI" tooling. "AI" models are trained at the expense of underpaid workers filtering inputs of abhorrent content, and does not respect the owners of input content. Ethically, it sucks. Do you disagree with some part of the statement regarding "AI" in their CoC? Do you think there's a fault in their logic, or do you yourself personally just not…

Setting aside the categories of art and literature, training LLMs on FOSS software seems aligned with the spirit, if not the letter, of the licenses. It does nothing to fix the issues of unpaid FOSS labor, though, but that was a problem well before the recent rise of LLMs.

The "spirit" of FOSS licences the various sorts of ideas that lead to the GNU project and the FSF in the 80s, and all that user-freedom-fighting heritage.

I think even critics of the GNU project and the FSF would have to admit that as historically accurate. I can only presume, then, that your comment is based on a lack of awareness of the history of FOSS licencing.

Perhaps a read of this would be a good start:

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

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

#327
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 fantastic summary of how LLMs can be used in general. I have found chatgpt/gemini to be useful in following scenarios 1. ELI5 with examples on any technical paper. This summarises papers and explains to me in a way i can understand. 2. At my work, we have to make a lot of proposals, so I have a project created where I put public documents that I can share for proposals and then share the Statement of Work, and it creates a technical document in my format which is about 70% right. I can add/modify the remaining 30% 3. > Use these tools as a massive force multiplier of your own skills. - This is massive when I want to start a new code base. I spend so much time in my head architecting that tools like these help create a boiler plate and structure. 4. Many times, I have stupid ideas but not enough time to waste coding those stupid ideas. The tools help me right terrible codes for my stupid ideas!! :)

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

#328
post #141

I've used Claude Code in the past month to do development on CoMaps [1] using the 20 USD/month plan. I've been able to do things that I would not have the competence for otherwise, as I do not have a formal software engineering background and my main expertise is writing python data processing scripts. E.g., yesterday I fixed a bug [2] by having Claude compare the CarPlay and iOS search implementations. It did at fir…

How are you using Claude Code with the $20/mo plan? Aren't you still paying the API prices on top of the $20/mo?

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

#329
post #141

I've used Claude Code in the past month to do development on CoMaps [1] using the 20 USD/month plan. I've been able to do things that I would not have the competence for otherwise, as I do not have a formal software engineering background and my main expertise is writing python data processing scripts. E.g., yesterday I fixed a bug [2] by having Claude compare the CarPlay and iOS search implementations. It did at fir…

How are you using Claude Code with the $20/mo plan? Aren't you still paying the API prices on top of the $20/mo?

They allow limited use on the $20 plan last I knew.

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

#330
post #241
post #86

Earlier quoted context omitted.

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

I can and will compare them, analogies don’t need to be perfect so long as they get a point across. That’s why they’re analogies, not direct perfect comparisons.

I very much enjoy the Japanese carpentry styles that exist though, off topic but very cool.

Post reply on HN