News for hackers. Stuff that matters.
Re:Web apps built with Ruby on Rails by correlator on Friday January 10, 2025 @11:36AM (#42657183)
This is a great point. I often ask LLMs which coding language they are most proficient in, and Python is the most typical response. This has makes me want to write more Python.
Re:Web apps built with Ruby on Rails by hansvm on Friday January 10, 2025 @11:50AM (#42657326)
Keep in mind, LLMs can't introspect. They integrate your prompt with their training data.

If Python is an extremely popular programming language people like to write about using (it is), you'll expect a lot of people to state that Python is their most proficient language and for that to make its way into the training data. When you ask the LLM, you'll get Python as an answer some fraction of the time and other languages some other fraction.

Those answers are orthogonal to how good the LLM actually is though. In the training data, you'd like a sufficiently robust sample of code (which Python should have) without most of the code being terrible (which Python doesn't have in the wild).

Mind you, IME they do better with Python than very new languages, and they do better with Python tooling than whatever maven build garbage you might have to deal with, but that's faint praise.

Re:Web apps built with Ruby on Rails by bb88 on Friday January 10, 2025 @11:51AM (#42657335)
I use MS Copilot in python and it's really good. Particularly at writing unit test cases.

Unit tests are a major win for LLMs.

Re:Web apps built with Ruby on Rails by holdenweb on Sunday January 12, 2025 @06:58AM (#42672934)
Does it understand pytest, do you happen to know by any chance?
Re:Web apps built with Ruby on Rails by bb88 on Sunday January 12, 2025 @10:25PM (#42679770)
It does indeed.

It seems to understand the way you want your unit tests written. So if you have a particular style, it's best to write one or two tests in your style, then it will use that same style when it starts writing tests.

You can do prompts like "I need unit tests for the exceptions that are raised in the SuchAndSuch.function()", and it will do it -- particularly if you have a unit test already written similar to what you'd like.