Do Less, Be More: 8 Tips For A Lazy Developer from Redditors
Perhaps no surprise, that laziness from time to time becomes the force for progress. People are constantly developing new ways and methods of spending less time and energy on activities that are usually boring and time-consuming.
Developers are not the exception. Therefore, in this article we will discuss the most popular methods that are widely used by the developers for saving their time and energy.
This article is continually created and updated, and is written collaboratively by redditors.
1. Just Google it.
Of course, reading manuals and special documentation is essential thing, but it is much faster and easier to find the necessary information in the Internet. Use search engines, learing sources and some special web sites that are created for the purpose of answering developer’s questions (such as stackoverflow, or /r/learnprogramming subreddit). They can help you to find some new approaches and provide you with any information.
A helpful list of learning sources from softwaredev, redditor:
- http://www.dynamicdrive.com/ – this site can become your favourite source if you are getting started in web development. The have code you can just copy and paste
- http://tutsplus.com/ – Video courses;
- Absolute Java (5th Edition),
- Walter Savitch Kenrick Mock – e-book;
2. Reusing code.
The most common case of code reuse is program libraries. Libraries provide a common universal functionality covering the chosen subject area. Sometimes reusing code is a simple copy of some parts of code from one program to another. This is the one of the most low-level approach to code reuse.
For example, in PHP there are several functions that help developers to reuse the code. You choose the function depending on the code your are reusing. Two main functions are the following:
- include() and include_once()
- require() and require_once()
The first one – include() – includes the file you specified. The code in this file will be executed with a variable scope that is equal to the piont at which this function occured in the parent code. The include_once() function will check if the code from a file has already been included in the current script; if included, the function will not include it again.
The second function – require() – replaces itself with the contents of the given file at the time when the PHP engine is compiling your code (while include() function does it at the time when the PHP engine is executing your code). Use this function for more static elements.
kakarotsan: I’d say knowing and using libraries saves a lot of time. Rather than coding your own version of a sort or data structure, calling a library function is much faster and saves you from writing a heap of code.
3. Over-the-air build distribution.
OTA build distribution allows you to easily send your app to testers and update them with the new revisions for the purpose of further testing. Forget about emails with the builds attached. Forget about continuous disputes with testers – now it’s easy to manage all your revisions and notify them about the latest build. Try Ubertesters tool to see how it works.
Learn more on how the OTA build distribution works in the Wednesday post from Mary, the Ubertesters customer support specialist.
It is a plain and simple opportunity to reduce your effort and to increase your labor productivity.
4. Performance of automating repetitive tasks.
It is very important method since it allows to perform many routine and mundane operations with little or no user involvement and in such a way it saves a lot of time.
Take an advantage of a macro to automate your tasks. For manual script development perk11 recommends you to use:
- PowerShell scripts for Windows;
- Bash scripts for Unix;
Ultimape recommends you to use Python or Ruby for Unix.
How do you decide when to use Perl/Python/Ruby over Bash for a script? Take a look at the similar question at StackExchange.
You may also use the following free apps to make your script development more comfortable:
- AutoIT v3 – easy to follow app to script macros (freeware).
- Action(s) – Java applet, that enables you to graphically create step-by-step macros (free);
5. Writing of unit tests.
This method is widely used by the developers because of its rather significant advantages: it proves that your code is really working, makes possible the improvement of the design and demonstrates you certain progress. Plus unit tests can help you to reduce the number of bugs and in that way to save you from a headache in future.
Refactoring is the process of change in the inner structure of the program, not affecting its external behavior, aiming to simplify the understanding of its work.
On the other hand, as noted by redditor kakarotsan, refactoring is the opposite of lazy. It cleans up and optimizes the code, but in the end, it does the exact same thing that it did before you refactored. It makes future coding much easier, but refactoring is the last thing you want to do unless you have to, because you could break the code or introduce bugs that didn’t exist before.
7. Ability to think big.
Thinking big is a wonderful exercise for your brain. It helps you not only to save your time, but actually to achieve success in any activity.
This habit is especially useful for the developers since it helps to cope with tasks in hand much faster. Let’s see how it works.
Suppose that you have an issue and you should fix it as soon as it is possible. Try to think about a big picture. Is this just a bug that needs to be fixed or it is a sign of more serious issue? Will the solution of this issue help to avoid the occurrence of such problems in future? In other words, try to think over the while system and accomplish as many purposes as it is possible.
8. Stop reading “Top 10 posts” and start developing.
And finally. Quick advice on how to really save you time from testpoint: Stop reading “Top 10 posts” and start developing.
As you can see, these methods and tactics are very simple. Nevertheless, they can save a lot of time and energy and make developer’s life much easier.
Do you have your own methods? Feel free to contribute! Add your thoughts to our reddit post or leave your comments below. Thank you!