top | item 44384528

(no title)

ifellover | 8 months ago

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.

discuss

order

Cthulhu_|8 months ago

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.

nomel|8 months ago

This is my experience, and my favorite way to learn: go in blindly, look things up when you get stuck/run out of ideas. 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.

geon|8 months ago

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.

PaulRobinson|8 months ago

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.

fuzztester|8 months ago

zen comment :)

uncatchable, so I won't even try.

amake|8 months ago

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

bironran|8 months ago

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.

meistertigran|8 months ago

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.

dev0p|8 months ago

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?

weaksauce|8 months ago

it’s just graph theory nomenclature. if you study an intro to graph algorithms it would get you most of the way there.

neilv|8 months ago

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.

bironran|8 months ago

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