News for hackers. Stuff that matters.
Re:Negative Two-Thousand Lines of Code by ifellover on Thursday June 26, 2025 @01:49AM (#44384528)
I’m a hobby programmer and lucky enough to script a lot of things at work. I consider myself fairly adept at some parts of programming, but comments like these make it so clear to me that I have an absolutely massive universe of unknowns that I’m not sure I have enough of a lifetime left to learn about.
Re:Negative Two-Thousand Lines of Code by PaulRobinson on Thursday June 26, 2025 @03:12AM (#44384974)
Read some good books on data structures and algorithms, and you'll be catching up with this sort of comment in no time. And then realise there will always be a universe of unknowns to you. :-) Good luck, and keep going.
Re:Negative Two-Thousand Lines of Code by fuzztester on Thursday June 26, 2025 @04:21AM (#44385334)
zen comment :)

uncatchable, so I won't even try.

Re:Negative Two-Thousand Lines of Code by HenryBemis on Thursday June 26, 2025 @07:07AM (#44386177)
do try (so you get the joy of 'small' wins), also do know that it's untouchable (so you don't despair when you don't master quantum mechanics in one lifetime)

:)

Re:Negative Two-Thousand Lines of Code by fuzztester on Friday June 27, 2025 @06:09PM (#44400721)
oh, i only meant that rhetorically.

no worries.

Re:Negative Two-Thousand Lines of Code by rangerelf on Thursday June 26, 2025 @11:41AM (#44388478)
The more you know, the more you know you don't know.
Re:Negative Two-Thousand Lines of Code by fuzztester on Thursday July 03, 2025 @05:08AM (#44453092)
right.

it's "you [don't] know" all the way down.

Re:Negative Two-Thousand Lines of Code by dev0p on Thursday June 26, 2025 @04:21AM (#44385333)
I've been coding for a living for 10 years and that comment threw me for a loop as well. Gotta get to studying some graph theory I guess?
Re:Negative Two-Thousand Lines of Code by neilv on Thursday June 26, 2025 @05:35AM (#44385697)
You could've figured out this one with basic familiarity with how graphs are represented, constructed, and navigated, and just working through it.

One way to often arrive at it is to just draw some graphs, on paper/whiteboard, and manually step through examples, pointing with your finger/pen, drawing changes, and sometimes drawing a table. You'll get a better idea of what has to happen, and what the opportunities are.

This sounds "Then draw the rest of the owl," but it can work, once you get immersed.

Then code it up. And when you spot a clever opportunity, and find the right language to document your solution, it can sound like a brilliant insight that you could just pull out of the air, because you are so knowledgeable and smart in general. When you actually had to work through that specific problem, to the point you understood it, like Feynman would want you to.

I think Feynman would tell us to work through problems. And that Feynman would really f-ing hate Leetcode performance art interviews (like he was dismayed when he found students who'd rote-memorize the things to say). Don't let Leetcode asshattery make you think you're "not good at" algorithms.

Re:Negative Two-Thousand Lines of Code by bironran on Thursday June 26, 2025 @03:45PM (#44390614)
I despise leetcode interviews. These days, with coding LLMs, I see them as even less relevant than they were before.

Yet, you ask someone "how do you build an efficient LFU" and get blank stares (I just LOVE the memcache solution of regions and probabilistic promotion/demotion).

Re:Negative Two-Thousand Lines of Code by marksbrown on Saturday June 28, 2025 @06:47AM (#44403724)
Funnily enough, a common idea! What would Feynman do? | Fabulous adventures in coding https://share.google/iSEhAqL9NhAstSlRE
Re:Negative Two-Thousand Lines of Code by amake on Thursday June 26, 2025 @05:44AM (#44385739)
(More than?) half of the difficulty comes from the vocabulary. It’s very much a shibboleth—learn to talk the talk and people will assume you are a genius who walks the walk.
Re:Negative Two-Thousand Lines of Code by bironran on Thursday June 26, 2025 @04:04PM (#44390764)
That! It took me a while to start. My education of graph theory wasn't much better than your average college grad. But I found that fascinating and started reading. I was also very lucky to have had two great mentors - my TL and the product's architect, the former helped me to expend my understanding of the field.
Re:Negative Two-Thousand Lines of Code by Cthulhu_ on Thursday June 26, 2025 @08:15AM (#44386666)
I want to believe a lot of these algorithms will "come to you" if you're ever in a similar situation; only later will you learn that they have a name, or there's books written about it, etc.

But a lot is opportunity. Like, I had the opportunity to work on an old PHP backend, 500ms - 1 second response times (thanks in part to it writing everything to a giant XML string which was then parsed and converted to a JSON blob before being sent back over the line). Simply rewriting it in naive / best practices Go changed response times to 10 ms. In hindsight the project was far too big to rewrite on my own and I should have spent six months to a year trying to optimize and refactor it, but, hindsight.

Re:Negative Two-Thousand Lines of Code by geon on Thursday June 26, 2025 @11:45AM (#44388521)
Yes. I invented the Trie data structure when I was 19. It was very exciting finding out it had a name, and it was indeed considered a good fit for my use case.
Re:Negative Two-Thousand Lines of Code by tired-chimp on Thursday June 26, 2025 @01:02PM (#44389189)
Thats so funny, I had the exact same experience. And when I was 16 I "invented" csv's because I was too lazy to setup SQL for my discord bot. I like to think I've gotten better at searching for the correct solution to things rather than just jumping in with my best guess.
Re:Negative Two-Thousand Lines of Code by bhaak on Thursday June 26, 2025 @02:01PM (#44389734)
LLMs are pretty good at providing names and search terms for very vague prompts.

Although that's also often an invitation for hallucinations so you have to be even more careful than usual.

Re:Negative Two-Thousand Lines of Code by mikepurvis on Thursday June 26, 2025 @03:45PM (#44390615)
I was just going to say the same— LLMs are great for giving a name to a described concept, architecture, or phenomenon. And I would argue that hallucinations don't actually much matter for this usage as you're going to turn around and google the name anyway, once you've been told it.
Re:Negative Two-Thousand Lines of Code by nomel on Monday June 30, 2025 @07:48PM (#44429144)
This is my experience, and my favorite way to learn: go in blindly. I think it forces a deeper understanding of the topic, and really helps things "stick". I assume it's related to the massive dumps of dopamine that come from the "Eureka!" moments.

I've "invented" all sorts of old patents, all sorts of algorithms, including the PID algorithm. I think it helped form a very practically useful "intuition".

But, I've noticed that some people are passionately against this type of self exploration.

Re:Negative Two-Thousand Lines of Code by weaksauce on Thursday June 26, 2025 @11:06AM (#44388151)
it’s just graph theory nomenclature. if you study an intro to graph algorithms it would get you most of the way there.
Re:Negative Two-Thousand Lines of Code by meistertigran on Thursday June 26, 2025 @04:10PM (#44390810)
A lot if it is just technical jargon. Which doesn't mean it's bad, one has to have a way to talk about things, but the underlying logic, I've found, is usually graspable for most people.

It's the difference between hearing a lecture from a "bad" professor in Uni and watching a lecture video by Feynman, where he tries to get rid of scientific terms, when explaining things in simple terms to the public.

As long as you get a definition for your terms, things are manageable.