Live data from Hacker News

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

news.ycombinator.com

71–80 of 209 posts

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

#71

1. Make lots of mistakes. 2. Experience pain in the form of late, buggy software and angry clients. 3. Read books and work on side projects. (Martin Fowler’s were my favorite). 4. Repeat for 5-10 years with hopefully ever-decreasing amounts of 1 and 2. You probably think I'm kidding...

That really doesn’t help. How do you know that what you are doing is a “mistake” if it works?

10K line UserManager classes “work”.

That’s how you get the “expert beginner”.

https://daedtech.com/how-developers-stop-learning-rise-of-th...

The only feedback you get as a sole developer are your compiler and errors in production. You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeLogManager.

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

#72
Create an iterative loop with three major steps in it:

1. Consume external knowledge by reading books, watching videos, taking classes, etc.

2. Apply the new knowledge, plus your intrinsic store of knowledge to whatever problem you're working on.

3. Note mistakes, lessons learned, synthesis of ideas between "new" and "old" knowledge, etc. Update your bank of intrinsic knowledge.

Lather, rinse, repeat.

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

#73

1. Make lots of mistakes. 2. Experience pain in the form of late, buggy software and angry clients. 3. Read books and work on side projects. (Martin Fowler’s were my favorite). 4. Repeat for 5-10 years with hopefully ever-decreasing amounts of 1 and 2. You probably think I'm kidding...

1. Make lots of mistakes.

It's all about hundreds of cost/benefit trade-offs in a particular context. There will be trade-offs between short, medium, and long term goals and issues. There will be trade-offs between the developers, management, sales, and the users. Try to find as many compromises as possible which are synergistic.

When it comes to hiring and otherwise interacting with other coders, you will even make compromises with the developer community!

4. Repeat for 5-10 years

At least. Always be learning from your mistakes. Be skeptical of yourself and your own model of reality. You should be actively looking for your biases and misunderstandings. Try to understand where the contrarians are coming from. If they have a point, it just might be valuable.

Be wary of dogmatism.

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

#74

1. Make lots of mistakes. 2. Experience pain in the form of late, buggy software and angry clients. 3. Read books and work on side projects. (Martin Fowler’s were my favorite). 4. Repeat for 5-10 years with hopefully ever-decreasing amounts of 1 and 2. You probably think I'm kidding...

That really doesn’t help. How do you know that what you are doing is a “mistake” if it works? 10K line UserManager classes “work”. That’s how you get the “expert beginner”. https://daedtech.com/how-developers-stop-learning-rise-of-th... The only feedback you get as a sole developer are your compiler and errors in production. You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeL…

How do you know that what you are doing is a “mistake” if it works?

Reading. Plenty of books, blog posts, and forum posts point out that you shouldn't have "10 KLOC UserManager classes".

The thing is, one has to figure out how to integrate "book learning" AND real world experience, so that they're constantly synthesizing a newer, better understanding.

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

#75
Conferences.

Meetups.

Hackathons.

Reading books (google for "best software books" and you'll find some lists).

Hanging out in online communities whether general (like HN) or language/tech specific.

Read articles.

Follow interesting people/companies on twitter.

Blog about your work.

All of the above can help, but you need to pick what works and is fun so you can stick with it.

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

#76

1. Make lots of mistakes. 2. Experience pain in the form of late, buggy software and angry clients. 3. Read books and work on side projects. (Martin Fowler’s were my favorite). 4. Repeat for 5-10 years with hopefully ever-decreasing amounts of 1 and 2. You probably think I'm kidding...

That really doesn’t help. How do you know that what you are doing is a “mistake” if it works? 10K line UserManager classes “work”. That’s how you get the “expert beginner”. https://daedtech.com/how-developers-stop-learning-rise-of-th... The only feedback you get as a sole developer are your compiler and errors in production. You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeL…

That really doesn’t help. How do you know that what you are doing is a “mistake” if it works?

Keep looking at it and ask if you are doing something redundantly.

The only feedback you get as a sole developer are your compiler and errors in production.

False. There's plenty of resources online. There's plenty of code to read online. There's plenty of potential critics online.

You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeLogManager.

Unless you've read the Internet. There are plenty of database and log utilities out there.

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

#77
Some practical things that have helped me, by no means an expert:

1. Practice writing new project's from scratch. not so much todo apps but challenge yourself e.g. I wrote my own function as a service engine

The main point of the exercise is to show: - Best practice is contextual, so first you need context ;) - Think about the big picture and all the pieces to get there - Repetition. It will help you improve your development flow and process, and become better at your craft

You can borrow design/implementation ideas from current projects that you're familiar with or use a design pattern you found on a blog etc. it will help you recognize when certain practices are the "best".

2. Rewrite this code continually. Is there a better way? more concise? faster? easier to test? It seems there's many ways to do the same thing. Which one is best depends on the situation.

3. Optimize last. No seriously. If I could count, the amount of times I've thrown away code because I optimized to early...

tl;dr best practice needs context. This requires big picture thinking. Learn to recognize contexts and the best practices are alot clearer

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

#78
post #36

Earlier quoted context omitted.

Hopefully. A friend of mine once said "So do you have ten years of experience, or do you have one year of experience ten times?"

I've heard this old saw a million times, or maybe once a year for a million years, but what does it really mean? Nobody seems to be able to describe to me a developer with one year of experience ten times. What does this look like in practice?

What does this look like in practice?

My interpretation of that has always been something like "repeating the same actions over and over again, but never importing any new knowledge from outside" where "outside knowledge" means books, classes, blog posts, videos, meetups, etc. So you can "learn" to just keep doing the same thing incrementally better by just doing it the way way for 10 years, but to make significant changes, you need whole new models, thoughts, and ways of seeing things.

Now sometimes you may make a big leap purely off introspection, applying logic, empirical experimentation, etc., but that would - IMO - be an exception for most people.

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

#79

Earlier quoted context omitted.

That really doesn’t help. How do you know that what you are doing is a “mistake” if it works? 10K line UserManager classes “work”. That’s how you get the “expert beginner”. https://daedtech.com/how-developers-stop-learning-rise-of-th... The only feedback you get as a sole developer are your compiler and errors in production. You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeL…

How do you know that what you are doing is a “mistake” if it works? Reading. Plenty of books, blog posts, and forum posts point out that you shouldn't have "10 KLOC UserManager classes". The thing is, one has to figure out how to integrate "book learning" AND real world experience, so that they're constantly synthesizing a newer, better understanding.

Yes. I would also include reading other more-experienced developers' code in bullet point #3. Pick a well-respected project from a language you're looking to get better at, and dive in.

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

#80
Human evolution at single person scale :)

The key here is your journey to get experience. Every time you try something, you will be using your past knowledge. To speedup things you should learn from others' mistakes _too_, but don't forget to learn from yours.

Just my 2 cents.

PS: Good luck!

Post reply on HN