Live data from Hacker News

Ask HN: How to learn best practices when you have no one to teach you?

news.ycombinator.com

201–209 of 209 posts

Re: Ask HN: How to learn best practices when you have no one to teach you?

#201

Earlier quoted context omitted.

Not crazy at all. Problem is YouTube only goes to 2x

Highly recommended: Video Speed Controller. Firefox: https://addons.mozilla.org/en-US/firefox/addon/videospeed/ Chrome: https://chrome.google.com/webstore/detail/video-speed-contro...

I like this one more:

Firefox: https://addons.mozilla.org/en-US/firefox/addon/enhancer-for-...

Because there are other options like switching off one tab when you start video in another tab, overlay if you scroll down, default quality (I have to be on 144p because of bandwidth constraints)

Re: Ask HN: How to learn best practices when you have no one to teach you?

#202

I did a quick control-f "read" and almost everyone is telling you to read books or articles about best practices. That might be useful once as a highlevel overview when getting started on a topic, but my personal advice is to only do that briefly. You'll get the most bang for your buck READING CODE. There is no better way to improve as a developer than reading good code. Reading articles and books will teach you thin…

How do you learn to read code without guidance and without getting lost? How do you keep your thoughts organized? At each step, how do you confidently decide where to go next? ——— I’d like you to take as given that I’m reasonably intelligent — I graduated from MIT and have been working as a software engineer for 6 years. Yet when I sit down to read https://github.com/cypress-io/cypress or https://github.com/webpack/w…

Well, I can definitely say I'm not an expert at it. Theoretically you might have more experience than me. But my job has me reading lots of open source code to try to learn about poorly documented APIs, so I've been kind of forced into it.

For me, I just try to follow the data and logic flow from beginning to where I want to do things. Though if I see something like a "strategy" pattern I ignore it unless I really need to know how it works; same goes for other code branches that seem unimportant to the greater program. You absolutely should use something like an IDE where you can move around quickly and get neat features like jumping to a class definition, find usages, etc. in case you get lost. It definitely takes time and isn't something you can just sit down and do for 8 hours straight. I generally can only look at code for 90 minutes before my eyes start glazing over and I need to take a break.

Re: Ask HN: How to learn best practices when you have no one to teach you?

#203
Use Google scholar to find papers on API design. Here's one https://ai.google/research/pubs/pub32713.pdf

Here's many more papers http://www.cs.cmu.edu/~NatProg/apiusability.html and here https://sites.google.com/site/apiusability/resources

Check 'cited by' to find more papers

Re: Ask HN: How to learn best practices when you have no one to teach you?

#204
post #168

Earlier quoted context omitted.

I'll second that a lot of 'best practices' is cargo cult like gate keeping. Just learn how to write idiomatic code in whatever language / framework you are using. At least the approaches are good enough. And other OCD/Autistic programmers won't lose their shit when they see it. Do try to write code in an active AKA explicit way. Whne you read the code it should be obvious what it's trying to do. Code where the right…

Please don't use autistic or OCD as slurs.

Is it being used a slur? It's a fundamental characteristic of those types of people.

Re: Ask HN: How to learn best practices when you have no one to teach you?

#205
post #103

All of these responses are missing a huge point here: If you're a solo developer, stick to _standards_. There are standards for how something should be implemented (like REST), there are standards to how things should be written (like PEP8 for Python), etc. Follow those standards as close as you possibly can. Ultimately, you'll find issues with them -- that's great! Perhaps you'll even find a more clear way of doing…

I massively disagree with this, as the other part said a lot of standards don't make any sense. REST always seemed very suspect to me, and Facebook with some of the best developers in the works basically threw it straight out of the window with graphql, seeming to validate the scepticism. Html also has complicated standards about elements which everyone ignores with divs everywhere. There seem to be a lot of nonsense…

The reason you massively disagree with it is the reason why OP should try and do it. Nothing better than learning from the mistakes of others.

Re: Ask HN: How to learn best practices when you have no one to teach you?

#206
post #61
post #51

Earlier quoted context omitted.

This is interesting to me. Would you have any other book recommendations in this vein?

Effortless Mastery , by Kenny Werner. The Music Lesson , by Victor Wooten. Both of these are about music, but are really about mastery. Shop Class as Soulcraft , by Matthew B. Crawford. This is a much more philosophical/academic argument that skilled manual labor is both intellectually and morally superior to most office work - you're shaping reality, rather than shaping yourself. I happily lump the craft of software…

Thanks for the recommendations, I've added these to my book list! In exchange, have you seen this [1] report about excellence in competitive swimmers? The lifetime of a swimmer is short and outcomes vary wildly, from local swim meets all the way to the Olympics. It's a great case study on the differences at each level. There should be copies on sci-hub or other online summaries.

I also liked Mastery by George Leonard [2] - it's a little booklet about mastery with the same kinds of generalisable takeaways, drawing on his experience as an Aikido practitioner.

[1] https://www.jstor.org/stable/202063?seq=1#page_scan_tab_cont...

[2] https://www.goodreads.com/book/show/81940.Mastery

Re: Ask HN: How to learn best practices when you have no one to teach you?

#207
post #187

Earlier quoted context omitted.

How do you learn to read code without guidance and without getting lost? How do you keep your thoughts organized? At each step, how do you confidently decide where to go next? ——— I’d like you to take as given that I’m reasonably intelligent — I graduated from MIT and have been working as a software engineer for 6 years. Yet when I sit down to read https://github.com/cypress-io/cypress or https://github.com/webpack/w…

I've spend my career reading code. I find it particularly difficult without guidance. I would recommend using some old school technology (pen/pencil and blank paper) and draw diagrams, write down every question and observation, notes. Others may recommend using some digital tool, but be mindful how much energy you spend organising your thoughts, drawing with a digital tool. If your goal is to understand a software, t…

> I would recommend using some old school technology (pen/pencil and blank paper) and draw diagrams, write down every question and observation, notes.

I have found paper and pencil to work best for my brain trying to manage attention while doing many tasks, so I take this to heart. That said, I think there is probably a tool I can use to be significantly more effective in organizing my thoughts—but probably one made of paper and pencil in the genre of the bullet journal.

If anyone knows of any techniques of organizing notes like this, I’d be grateful for some names that I can google. For now, I’m going to try experimenting with various ways of using flashcards (ALA record cards).

Re: Ask HN: How to learn best practices when you have no one to teach you?

#208
I would start with the book 'Practices of an Agile Developer: Working in the Real World'.

That is not to go against other advice in this thread about watching videos, reading other books, making lots of mistakes, and so on. And it's also not to imply that there is a single 'best practice', either.

But what this book gives you is a load of solid places to start, on many different subjects that are important for developers. Subjects like issue-tracking, code style, how to learn and stay up-to-date, tests, infrastructure, resilience, working in a team, sharing knowledge, and so on.

It doesn't relate to any particular language or architecture. And it has some great tips for the situation you describe, where you are trying to do a good job in the context of a team that doesn't have any clearly defined practices.

I'd buy the paperback, not an eBook, and scribble in every margin. When you've read it, carry it with you and dip in and out.

Once you have read this, then a lot of other sources of material will make a lot more sense. Some of them might contain better ideas than those in this book, which is fine; the great thing about reading this book is that you'll be in a good position to evaluate other ideas.

Post reply on HN