Readit News logoReadit News
rudiksz commented on Ask HN: What career will you switch to when AI replaces developers?    · Posted by u/DGAP
rudiksz · 4 months ago
AI code fixer.
rudiksz commented on Ask HN: What career will you switch to when AI replaces developers?    · Posted by u/DGAP
alecsm · 4 months ago
The 10 lines of code I write daily will be written by AI and I'll keep doing all the other work.
rudiksz · 4 months ago
"All the other work" being "fixing the code written by AI".
rudiksz commented on Goravel: A Go framework inspired by Laravel   goravel.dev... · Posted by u/cgg1
charlie0 · 6 months ago
You're missing the entire point of frameworks like Spring and Laravel. They are there to remove the power of choice and thereby actually create clarity and maintain speed over a long period of time.

What happens with the "I'll build everything from scratch" apps is they are oftentimes not easy to understand, different patterns end up being used, 3rd party packages get slapped on ad-hoc and over time it just becomes a frankenstein. Much better to start with a hard set of rails that follow a set of conventions you just have to learn once.

The whole "I can move faster" without a framework is just an illusion that appears at the beginning of building an app. It will quickly disappear as more devs and complex code features are requested.

rudiksz · 6 months ago
The whole "I can move faster" with a framework is also just an illusion that appears at the beginning of building an app. It will quickly disappear as more devs who do all have a different idea about how the framework should be used put their hands on it and as more complex code features are requested that the framework does not support.
rudiksz commented on How I program with LLMs   crawshaw.io/blog/programm... · Posted by u/stpn
HappMacDonald · 8 months ago
I'd ask things like "which LLM are you using", and "what language or APIs are you asking it to write for".

For the standard answers of "GPT-4 or above", "claude sonnet or haiku", or models of similar power and well known languages like Python, Javascript, Java, or C and assuming no particularly niche or unheard of APIs or project contexts the failure rate of 4-5 line of code scripts in my experience is less than 1%.

rudiksz · 8 months ago
It's mostly Go, some Python, and I'm not asking anything niche. I'm asking for basic utility functions that I could implement in 10-20 lines of code. There's something broken every single time and I spend more time debugging the generated code than actually writing it out.

I'm pretty sure everybody measures "failure rate" differently and grossly exaggerate the success rate. There's a lot of suggestions below about "tweaking", but if I have to "tweak" generated code in any way then that is a failure for me. So the failure rate of generated code is about 99%.

rudiksz commented on How I program with LLMs   crawshaw.io/blog/programm... · Posted by u/stpn
antirez · 8 months ago
I have also many years of programming experience and find myself strongly "accelerated" by LLMs when writing code. But, if you think at it, it makes sense that many seasoned programmers are using LLMs better. LLMs are a helpful tool, but also a hard-to-use tool, and in general it's fair to think that better programmers can do a better use of some assistant (human or otherwise): better understanding its strengths, identifying faster the good and bad output, providing better guidance to correct the approach...

Other than that, what correlates more strongly with the ability to use LLMs effectively is, I believe, language skills: the ability to describe problems very clearly. LLMs reply quality changes very significantly with the quality of the prompt. Experienced programmers that can also communicate effectively provide the model with many design hints, details where to focus, ..., basically escaping many local minima immediately.

rudiksz · 8 months ago
> "seasoned programmers are using LLMs better".

I do not remember a single instance when code provided to me by an LLM worked at all. Even if I ask something small that cand be done in 4-5 lines of code is always broken.

From a fellow "seasoned" programmer to another: how the hell do you write the prompts to get back correct working code?

rudiksz commented on Show HN: I'm learning Go and built a scraper. How can I improve it?    · Posted by u/itzami
rudiksz · 8 months ago
As far as style is concerned:

1) try to use "for := range" loops instead of the traditional for

2) "var result [4]string" - really seems like this wants to be a struct with a couple of fields.

  type result struct {
    id    string
    name  string
    brand string
    price string
  }
Makes code more self documenting:

  result.id = product
  result.name = e.ChildText("h3 a")
  result.brand = " "
  result.price = e.ChildText("span.value")
3) you could introduce a "store" struct with fields like "separator", "name", "baseProductUrl", and a "Visit" method. This would entirely eliminate the need for lines 63-73, which are static code in a for loop and a performance/code smell.

3b) The "visitStore" method does a switch on "store", but it is in a hot loop. This is a good candidate for micro-optimisation-is-the-root-of-all-evil debates later down the road. It's better to avoid those, and there's a number of simple solutions here to prevent that "constant check" in the hot loop.

4) Using defer in for loops is always a red flag. While it is technically correct, it's very likely not what you want here. Imagine that you have 10k products to visit, for 10 stores. The file for the first store will be flushed and closed only after your main function exists (your entire program in this case). What you would want is to open a file, visit all products, flush the writes and close the file handle, and only then move on to the next store. In other words, the lines 76-98 (the body of your main for loop) should be a separate function so your "defer"s happen when a loop iteration terminates, and not when the "main" function exists.

rudiksz commented on Carlsen quits World Rapid and Blitz championship after dress code disagreement   chess.com/news/view/2024-... · Posted by u/throwup238
conception · 8 months ago
Dress-codes can be about more than morality. In a game of intense concentration having distracting clothing could be a distraction. It’s not like every professional sport doesn’t have a dress code.
rudiksz · 8 months ago
Yes, a resourceful chess player could gain an upper hand over any opponent who might have a jeans fetish. And we can't have that, can we.
rudiksz commented on Union types ('enum types') would be complicated in Go   utcc.utoronto.ca/~cks/spa... · Posted by u/misonic
mrgriffin · 9 months ago
> doesn't run against the grain of the entire language

Not an expert, but my gut says maybe it runs against zero values? As in, "what's the zero value for a non-nullable reference?" Maybe the answer is something like "you can only use this type for parameters", but that seems very limiting.

rudiksz · 9 months ago
Half of the language is already non-nullable and is accomplished by allowing for zero values. Non pointer variables are guaranteed to be never nil.

What is missing is the ability to have pointer variables and have the compiler ensure that it will be never nil. I believe this was a design choice, not some technical limitation.

rudiksz commented on Marko: An HTML-Based Language   markojs.com... · Posted by u/anileated
classified · 3 years ago
That's not what they said.
rudiksz · 3 years ago
That's pretty much what they said. Most programmers don't work on "personal websites" at their workplace, as strange as that might sound.

u/rudiksz

KarmaCake day21January 31, 2023View Original