Earlier quoted context omitted.
Funny thing is, if you look at codebases of some opensource projects [1] doing complex and ambitious stuff, written by some real experienced engineers, you’ll see the common „dogmas” (don’t have long classes, don’t have long methods etc. etc.) are not obeyed. And yet, they shipped very complex and successful software. It’s almost as if these rules are mostly arbitrary and don’t really matter. [1] I’ve noticed that in…
It’s almost as if these rules are mostly arbitrary and don’t really matter. Definitely. I mean, some of them probably have some objective basis. But clearly some of them are indeed subjective and arbitrary. Take "long method names" for example... I believe method names should state what they do, and should be however long it takes to do that. To my way of thinking, making a method name shorter just for the sake of be…
Ask HN: How to learn best practices when you have no one to teach you?
121–130 of 209 posts
Re: Ask HN: How to learn best practices when you have no one to teach you?
#122"Best practices" is a bit of a red herring. Every company differs considerably, and online blogospher experts throw the term around as sort of a gatekeep-y way to keep the order ("What do you mean you don't know (arbitrary) best practices??!?!") The only way to learn best practices is to work at multiple companies / projects. For example, I worked at Intel, Lucent, Apple and DEC. Each one had significantly different…
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 thing 'just happens' is never clever it's just bad.
Do remember the process you use for a tiny team is different than google or facebook or a web dev sweatshop.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#123Been 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…
Why would one use SOAP over grpc in a new stack? Understandable in an old stack though.
Rest is gold.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#124"Best practices" is a bit of a red herring. Every company differs considerably, and online blogospher experts throw the term around as sort of a gatekeep-y way to keep the order ("What do you mean you don't know (arbitrary) best practices??!?!") The only way to learn best practices is to work at multiple companies / projects. For example, I worked at Intel, Lucent, Apple and DEC. Each one had significantly different…
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…
Re: Ask HN: How to learn best practices when you have no one to teach you?
#125Re: Ask HN: How to learn best practices when you have no one to teach you?
#126=> technological bias
As you are from Node/Express and Mongodb background the biggest risk is trying to become only better in these technologies. So you will only know how to make faster horses, how to train them for the best, but you will never learn car exists.
More than best practices, what makes a great developer valuable (especially in a position like you where other people in your company are less experienced than you) is your ability to see wider not deeper.
Try to challenge the status quo ? Why MongoDB? What kind of alternative do you have ? Same for Node + Express.
Doing so will force you to see where your tool shine and where it reach its limit. Doing so will permit you to know when you need to dig deeper on "how to use better this tool", and when to step back and "wait a minute, no amount of best-practices/knowledge will balance the fact that MongoDB is just no the right tool here"
So read a lot, but also from people that are not from your community (and to be honest HN is a good starter on getting different point of view)
The other important things is about perspective, it's not because a googler/guy from netflix wrote about how they needed to split the code in microservices, or needed to implement $design-pattern-with-a-very-cool-name that it does apply to you.
Especially looking to the size of your dev team, I think the worst things that could happen to you in your journey of trying to be a "better developer" is to try to be use too complex tools and too complex developments techniques
these articles explains better what I mean:
https://programmingisterrible.com/post/139222674273/write-co... https://medium.com/@rdsubhas/10-modern-software-engineering-...
Being able to stop your fellow developers from writing too smart code will be even more valuable for the companies you will work for. And at the end of the day, that what will define if you are a good software developer for your boss.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#127Reach outside your company. Genuine appeals for focused help are rarely dismissed. You don't need to know almost everything (and derive what you don't from first principles), that is unreasonable. You do need to have a network of folks you can ask help or feedback from. Being on a small team without much support will force either very fast growth or failure, and your ability to be intellectually honest (is this true…
I'm having trouble imagining how to do this. What does it look like? Emailing a friend at another company to ask for code review?
Not so much mailing out code reviews, but sharing design ideas, approaches, etc. Former coworkers you are still friends with, open source collaborators you have become close to, etc all work.
Basically, build and maintain relationships with people who have good judgement. Help them out, ask for help yourself.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#128Earlier 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'?
Idiomatic is more neutral and means basically just do it the way everyone else tends to. The real advantage to that is you generally avoid pitfalls and annoying other coders.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#129Earlier quoted context omitted.
'idiomatic' vs 'best practices'?
My inner Northcote Parkinson sort of triggers on 'best practices'. Best tends to imply that all the other ways to skin the cat are 'bad.' Which is likely objectively untrue. Idiomatic is more neutral and means basically just do it the way everyone else tends to. The real advantage to that is you generally avoid pitfalls and annoying other coders.
How to learn idioms when you have no one to teach you?
Re: Ask HN: How to learn best practices when you have no one to teach you?
#130"This is the feature I worked on, I chose this approach, any suggestions?"