Productivity is not limited to software engineering. The most of productivity hacks and many great articles and answers you may find on Medium or Quora already, mostly, in the business, entrepreneurship, success, life lesson sections.
I will try to give a short personal vision on how productivity is different in the software engineering:
First let's take a look on what is an "efficient software" or Software quality and especially ISO 9126 from the Wikipedia.
Here is a full table of Characteristics and Subcharacteristics for the ISO 9126-1 Quality Model
An efficient software engineer, obviously, is a sr. software engineer (How do you define a Senior developer?) who is able to build a functional, reliable, usable, maintainable, efficient, portable software.
To do so and boost your productivity my recommendations are:
- First plan, before doing any actions and real coding, please, just take a paper and a pencil;
- Always start small;
- No abstractions, frameworks. Add additional layer later only when it will be really necessary and a problem could be solved that way;
- Never think about microperfomance and optimization at the beginning. You first need data and real working production application to optimize, otherwise there is nothing to optimize. "Just do it" - Nike moto;
- Follow general software engineering principles, best practices in OOP and functional programming like pure functions and SOLID principles,
- Write maximum simple code, many small pure functions and components which can be easily re-used, extended without changing the original;
- If a function or a method has > 20 lines of code, think what you should change;
- If your file has more then 400 lines, think how you could divide it into smaller files;
- Make sure all the dependencies and components are loose coupled. Always ask yourself can you replace X component or a service in a whole project easily without breaking anything?
- Always invest a bit of time into refactoring each component and whole architecture;
- Always add short clear comments. Best documentation is good written and commented code;
- It's ok to have long variable and function/method names, find a balance between long and easily understandable names;
- Being a good software writer means being a good writer. Learn about writing, write articles, practice good writing and clean language;
- Write and keep up-to-date with your team a project documentation - how to install, commit, test, build, server requirements, which technologies are used, etc;
- Learn about personal, time management, track your time, what you spend on like social network browsing;
- Keep your workspace clean and organize your process - what you should do today, tomorrow. I am using Trello and stickers on my desk for many personal notes and to-dos;
- Learn your tools very, very well, like hotkeys in your OS and IDE. Do you know how to open terminal/cmd as admin/root in 1s or how to open a file you previously worked with?
- Keep searching for packages, tools, libraries which could save your time in the future.
- Contribute to open source projects you use. Found a bug? Send a pull request (PR) on GItHub and do not make changes in the node_modules/vendor folder.
Key to productivity is in your organization and discipline.