[0] https://www.oreilly.com/library/view/clean-code/978013608323...
Clean Code: A Handbook of Agile Software Craftsmanship [0] is a great book on writing and reading code.
Similarly, Clean Architecture: A Craftsman's Guide to Software Structure and Design [1] is, no surprise, a book on organizing and architecting software.
Designing Data-Intensive Applications [2] may be overkill for your situation, but it's a good read to get an idea about how large scale applications function.
The Architecture of Open Source Applications [3] is a fantastic free resource that walks through how many applications are built. As another comment mentioned, reading code and understanding how other programs are built are great ways to build your "how to do things" repertoire.
Finally, I'd also recommend taking some classes. I started as a self-taught developer, but I've since taken classes both in-person and online that have been a tremendous help. There are many available for free online, and if in-person classes work better for you (motivation, support, resources, etc), definitely go that route. They're a fantastic way to grow.
[0]: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma...
[1]: https://www.amazon.com/Clean-Architecture-Craftsmans-Softwar...
[2]: https://www.amazon.com/Designing-Data-Intensive-Applications...
Robert C. Martin, Clean code: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma...
Vaughn Vernon, various: https://vaughnvernon.co/?page_id=168
Steve McConnell, Code Complete: https://www.amazon.com/Code-Complete-Practical-Handbook-Cons... 2
Clean coder: https://cleancoders.com/ videos
Hunt and Thomas, The Pragmatic Programmer: https://www.amazon.com/Pragmatic-Programmer-Journeyman-Maste...
Hitchhiker's Guide to Python: https://docs.python-guide.org/
Dustin Boswell The Art of Readable Code: https://www.amazon.com/Art-Readable-Code-Practical-Technique...
John Ousterhout, A Philosophy of Software Design: https://www.amazon.com/Philosophy-Software-Design-John-Ouste... This one looks particularly interesting, thanks AlexCoventry!
Kent Beck, Test Driven Development: https://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/...
Dan Bader, Python Tricks: The Book: https://dbader.org/
Ian Sommerville, Software Engineering: https://www.amazon.com/Software-Engineering-10th-Ian-Sommerv...
Svilen Dobrev, various: http://www.svilendobrev.com/rabota/
The suggested reading for that course is a book that blew my mind when I first saw it as an undergrad: Clean Code by Robert Cecil Martin. I believe the examples are all Java, but the lessons are applicable to any language. Stuff like naming your variables more carefully than you name your children.
https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma...
- behind any given reason, there is a complex network of real reasons. You don't need to second-guess any decision/order/suggestion, but it helps understanding.
- most user stories / user requests are raw diamonds waiting to be polished. ("What do they really want me to solve")
Essential reading list:
- Clean Coder and Clean Code https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma... https://www.amazon.com/Clean-Coder-Conduct-Professional-Prog...
- Test Driven Development by Kent Beck https://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/...
and clean coder https://www.amazon.com/exec/obidos/ASIN/0137081073/metafilte...
If you follow the (admittedly pretty extreme) advice in these books you will be in the top 10% at least.
http://www.amazon.com/Working-Effectively-Legacy-Michael-Fea...
Clean code:
http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
Uncle Bob in particular (the author of Clean Code[0], The Clean Coder[1], and the Clean Coders videos[2]) is a lot like Wozniak.
[0] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
[1] http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...
You cannot sit and review each commit, the best you can do is to make them care about code.
[1] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
[1] - http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
[2] - http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...
Want to steadily improve on non-production code? Try codewars.com: you're asked to solve 5-30min coding exercises and after can immediately browse the solutions of your peers. The short feedback loop helps you understand how you could've improved while the code is still fresh in your head.
[1] http://www.osnews.com/story/19266/WTFs_m
[2] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
As someone who once read the Sun Java Style Coding [1] (which at a quick glance, appears to be a super set of the Google style guidelines) standard years ago and found it exciting and very helpful material, I unfortunately did not get such a kick skimming through this. Perhaps it's because after having read Clean Code [2], I feel that there is much missing that can lend itself to better code.
[1] http://www.oracle.com/technetwork/java/javase/documentation/...
[2] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
Books such as "Code Complete"[1] and "Clean Code"[2] should help you with that transition.
[1] http://www.amazon.com/Code-Complete-Practical-Handbook-Const...
[2] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
I highly recommend this book: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman... as it changed my life when it comes to software development. I have a real problem with commenting everywhere as most of the time you'll find a lot of public String getName() with like a comment of //Gets the name, uh, durr its name is get name! If you create concise methods with one general purpose you can create very readable code. Definitely check the book out, it is a very good read.
Comments often tend to explain the same thing as the code exactly does and what you see w/o looking at the comment. Also, they tend to be forgotten - if someone changes the code, he/she often doesn't change the comment. As a result, you'll have an outdated comment which can confuse you.
I recommend "Clean Code"[1] for more info on this subject. Beside other chapters, there's a chapter about what's a good and what's a bad comment.
[1]: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
I'd recommend these books, mixed with some searching around for best practices for whatever specific framework/language/toolkit you are writing code with.
Clean Code
http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
Refactoring to Patterns
http://www.amazon.com/Refactoring-Patterns-Joshua-Kerievsky/...
http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
1) Read books.
With 4-5 years of experience, you already have a good intuition for "good" and "bad" code. Still, it doesn't hurt to learn more about it. There are a lot of good books on this subject.
The first is "Clean Code", by Robert C. Martin. It's the first book I read on this subject, and I learned a lot. Note that the book uses Java in the examples, but I think the ideas would apply to most other languages.
Its author, Uncle Bob ( http://en.wikipedia.org/wiki/Robert_Cecil_Martin ) has long been a proponent of writing clean, beautiful code. He recently did an interview for Xebia: http://blog.xebia.fr/2011/05/25/interview-avec-robert-martin... (French blog, but the interview is in English). In it, he advises:
"Well there are a number of books that talk about writing code well. Kent Beck wrote a book called “Implementation Patterns” very recently. It’s an excellent book all about software craftsmanship. The pragmatic programmers wrote a wonderful book in 2000 called “The pragmatic programmer”, again a wonderful book. Chad Fowler wrote a book call the “Passionate Programmer”. Again the book is about doing everything well. I wrote a book recently called “Clean Code” which is very specific about particular things you can do with your code to do it well. So there is a tremendous number of resources that are available for people who are interested in doing software craftsmanship well."
Out of those, disregard "The passionate Programmer". It's an okay book, but its focus is on building a good programmer career, not on code.
"Implementation Patterns" by Kent Beck is a great book with a lot of best practices when writing * Java * code. Less useful if you use another language.
"The pragmatic programmer" is a good book on software craftsmanship. I'm personally half-way through. There is a lot of good advice in it, but I often find myself thinking it's "common-sense". Maybe because I've already been exposed to most of the ideas by reading blogs? Still, it's a great book, with a lot of best practices. It's main focus is not code, though, so you might want to start with other books if your focus is on writing good code.
To these books, I'd add "Code Complete (2nd Edition)" (language-agnostic) and "Effective Java 2nd Edition" if you use Java.
Summary:
If you use Java, read:
- Clean Code - http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 - Effective Java 2nd Edition - http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683 - Implementation Patterns - http://www.amazon.com/Implementation-Patterns-Kent-Beck/dp/0321413091 - Code Complete / Pragmatic Programmer If you use another language, read: - Clean Code - http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 - Code Complete - http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670 - Pragmatic Programmer - http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X Other people might chime in with suggestions for other languages?2) Practice.
Implement what you learned in the books. Keep improving.
3) Read other people's code.
Read good open source code. Not all code is good code. Ask around for OSS projects with good code in your language.
If you use Java, start with:
- Google Guava - http://code.google.com/p/guava-libraries/ - Google Guice - http://code.google.com/p/google-guice/ - Spring Framework - http://www.springsource.org/ 4) Practice.5) Practice.
[1] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
A few classics that focus on improving "general code style" would be:
- "Clean Code" (https://www.oreilly.com/library/view/clean-code-a/9780136083...)
- "The Pragmatic Programmer" (https://pragprog.com/titles/tpp20/the-pragmatic-programmer-2...)
EDIT: Since you are talking about coding like at a top company, one book that has been sitting on my shelf for a while, but I haven't gotten around to reading yet is "Software Engineering at Google: Lessons Learned from Programming Over Time" (https://learning.oreilly.com/library/view/software-engineeri...)