Live data from Hacker News

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

news.ycombinator.com

141–150 of 209 posts

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

#142
There are a lot of niche slack communities popping up. I've gotten a lot of great insight being a fly on the wall of a couple.

Other than that, just consume multiple sources of 'best practices' recommendations and see where they line up. Figure out what works by applying what you read and form your own opinion.

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

#143

Conference Youtube videos. They are a goldmine of useful tips and tricks. Go look for videos from the Node [1] and MongoDB [2] conferences and you will find tons of war stories and what is actually working for people. Using this option arguably connects you directly with some of the best people in the world who are actually using this stuff. ps. using the youtube 2x playback speed option can really help digest lots o…

I would say do not look to conference videos for how to write production quality code... Most talks at conferences are shallow and at worst just the blind leading the blind.

Be very careful, I've even seen people from places like Microsoft showing code at conferences that would fail even a decent code review process.

I think for this reason conferences are a complete waste of time. Talks are too short to go into anything approaching useful detail, and s spend an hour talking about pointless demo quality code.. Or the talkers arent experts in what they are talking about. Waste of time.

I would say the same for the majority of blogs. Most are garbage and it can be difficult to tell the code is garbage if you're a beginner. I dont know a single development blog worth reading...

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

#144

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…

'idiomatic' vs 'best practices'?

Thanks for that! "Idiomatic" is such a better word for describing what you actually want. "Best practices" implies that we know for sure that the practice will result in a better outcome. This is almost never true because programming is a very situational activity requiring a lot of judgement calls. If you turn off your brain and apply "best practices", the result is almost always horrific.

However, "idomatic" means writing in a way that other people are likely to be able to understand. That's a great goal! Often it's worth it to write code that isn't quite as good for the situation if it is more idiomatic. It's a judgement call still, but it's still important to know what is and isn't idiomatic so that you can make that judgement call.

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

#145
post #140

Earlier quoted context omitted.

They can mean very similar things so that the question could be: How to learn idioms when you have no one to teach you?

To which I think we land on the recommendation: seek good examples and mimic them. Trouble is finding them.

It is. I work in c# and if we take idiomatic to be how most devs write c#, then idiomatic c# is garbage.

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

#146
I'll follow the pattern here of expressing incredulity on the fact that my personal way of dealing with this is different from everybody else's ;-) Read code. Look around the internet for projects similar to what you are working on. Try to find and fix a bug or two in each. Concentrate on how you feel working on these unfamiliar projects. Was it straightforward to work on it? Was it fun to poke into? Did you feel straight jacketed in your approach? When you submitted the fixes, how was the reaction? Was it easy to get a positive reaction? Did people thank your for your contribution but then rewrite everything you did? Did they tell you that you didn't understand the issue and reject your contribution? These are all big clues on the success (or lack thereof) in the approach taken on those projects.

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

#147
post #143

Conference Youtube videos. They are a goldmine of useful tips and tricks. Go look for videos from the Node [1] and MongoDB [2] conferences and you will find tons of war stories and what is actually working for people. Using this option arguably connects you directly with some of the best people in the world who are actually using this stuff. ps. using the youtube 2x playback speed option can really help digest lots o…

I would say do not look to conference videos for how to write production quality code... Most talks at conferences are shallow and at worst just the blind leading the blind. Be very careful, I've even seen people from places like Microsoft showing code at conferences that would fail even a decent code review process. I think for this reason conferences are a complete waste of time. Talks are too short to go into anyt…

What was the last conference you attended and when?

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

#148
post #140

Earlier quoted context omitted.

They can mean very similar things so that the question could be: How to learn idioms when you have no one to teach you?

To which I think we land on the recommendation: seek good examples and mimic them. Trouble is finding them.

But the question still remains... how do you determine what "good examples" are?

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

#149
post #117

Been there, done that. Little story time: I co-founded a startup (as technical co-founder obviously) straight out of education, and never really had any mentor. 6 years later, I've certainly done lots of mistake, but no critical one, and I can count on one hand the mistakes that had important consequences. Now, here are what I think is the most important: experience, planning and critical thinking. Experience you gai…

> Or mostly about RPC? Might want to read up about SOAP. Why would one use SOAP over grpc in a new stack? Understandable in an old stack though. Rest is gold.

'Those who do not learn history are doomed to repeat it.'

Also, we don’t always get to choose the technologies of 3rd party providers with whom we are required to interface.

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

#150
post #143

Conference Youtube videos. They are a goldmine of useful tips and tricks. Go look for videos from the Node [1] and MongoDB [2] conferences and you will find tons of war stories and what is actually working for people. Using this option arguably connects you directly with some of the best people in the world who are actually using this stuff. ps. using the youtube 2x playback speed option can really help digest lots o…

I would say do not look to conference videos for how to write production quality code... Most talks at conferences are shallow and at worst just the blind leading the blind. Be very careful, I've even seen people from places like Microsoft showing code at conferences that would fail even a decent code review process. I think for this reason conferences are a complete waste of time. Talks are too short to go into anyt…

[deleted]
Post reply on HN