I enjoy constantly striving to become a more productive programmer without sacrificing quality. At my current level of experience and skill, what is helping me improve the most right now, is learning to think of writing code in terms of writing languages. You are not stuck with the language you are programming in. If you wish a certain function or class existed as part of the language, write it yourself! Every function, class, method, and variable you create, becomes part of the language in that they affect what is considered valid code and how your code will behave. Write each new language feature as low level and general purpose as it can make sense to be. That way it can be useful in the largest number of places possible. The more low level and complex your language features are, the more important it is to have thorough unit tests for them. If you think of the lowest level language features you write as being part of the language you are coding in, you can then write code in that language. Except now it is your language, designed to facilitate your preferred coding style and the problems you are solving. In a sense, you will be writing language layers, with each layer being its own language. Higher layers are then written in the language of the layers below it. Only the higher level layers should be coupled to details that are implementation specific to the software you are writing. In this way, the longer you code in a given language, the more productive you will become. You can even carry over most of your code from one project to the next, or perhaps release the lower levels as a library that you can then reuse on future projects. When it makes writing and reading the code in a given context easier for yourself, don't be afraid to bend the language to your will in ways that dramatically change the expected rules of the underlying language. This does not mean not caring about readability. Find the perfect balance that maximizes readability, writability, and editability for yourself. You will eventually become so productive that you can replace an entire team of programmers!
You will have a sense you are doing it correctly when the lower layers are so general and useful that you seem to constantly want to utilize them. The higher level languages should be very domain specific. The very top layer, written in these internal domain specific languages, should express a massive amount of complex functionality with a very small amount of expressive, readable code. Editing code in that layer should be a breeze. When it is not, this is a clue the underlying languages should be improved. In fact, any time you have a difficult time elegantly and simply getting code to do what you want, this may indicate your next step is to make changes at a lower layer.
Member for 8 years, 6 months
4 profile views
Last seen May 1 at 21:05