4 ms·
- Read code and emulate the style of code that you find good. In code reviews, pay attention to the comments you get from people you admire and want to learn fr
by rmk 6y ago
- Read code and emulate the style of code that you find good. In code reviews, pay attention to the comments you get from people you admire and want to learn from in your team. Likewise, perform code review on others' code, and offer constructive suggestions, preferably in the form of concrete examples.
If you work at a large company, read code from subsystems that do not directly touch. Read code written by teams that are admired, and code written by teams that are reviled, and try to figure out why they are so, from their work: the code.
- Develop a good style in the language you program in. Learn its idioms. For instance, if you write Java, there is a book by Joshua Block (Effective Java?); for JavaScript, JS the Good Parts; for Go, The Go Programming Language; for C++, there is the Google C++ style guide, and so on; for Python, try to read and emulate code or advice by Raymond Hettinger/Alex Martelli etc.
- Read most/all of your language's standard library (the documentation and usage examples) APIs, and when performing any programming task, ask yourself: do I really need to add a dependency on this egg/jar/gem/whatever, or can I accomplish this task using the standard library? You will be surprised by the answer quite often. Python, Go and Java all have extremely good standard libraries and documentation (the latter has some iffy parts that are to be avoided, but this advice holds in general).
- Write library code. Lots of it, with a focus on safety (the user should not get any nasty surprises when using your library in a standard way), developing the right level of abstraction, reusability and extensibility, and most important, testability. Volunteer to write Unit Tests for portions of code that aren't covered by adequate Unit Tests at your work. Most people consider this drudgery and will applaud you. By noticing the flaws of your programs, you will get a chance to fix them and you'll get better.
- Hoserogan 6y agoIs there any resources that you can recommend me follow? Should I do projects ?