Category Archives: Technical Scripter

How does Duff’s Device work?

Duff’s device is a trick to express loop unrolling directly in C or C++ without extra code to treat the leftover partial loop.The trick is to use a switch statement where all but one of the cases labels are in the middle of a while loop. Further, all cases fall through to the end of… Read More »

Automatic Resource Management in Java

Java provides a feature to make the code more robust and to cut down the lines of code. This feature is known as Automatic Resource Management(ARM) using try-with-resources from Java 7 onwards. The try-with-resources statement is a try statement that declares one or more resources. This statement ensures that each resource is closed at the… Read More »

Some time-saving tips for Linux Users

Are you making most out of the Linux? There are lots of helpful features which appears to be time saving Tips and Tricks for many of Linux Users. Sometimes these time saving Tips and Tricks become the need. They help you to get productive with the same set of commands yet with enhanced functionality. Here… Read More »

Hygienic Macros : An Introduction

We are all familiar with the working of macros in languages like C. There are certain situations in which macro expansions can lead to undesirable results because of accidental capture of identifiers. For example: The code is actually equivalent to: Output: x = 4, y = 9 The variable a declared in the scope of… Read More »

Some useful Linux Hacks

Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer’s hardware. For the purposes of this page, we use the term “Linux” to refer to… Read More »

When sudo insults you!!

An interesting sudo feature is the ability to insult you (not literally) when you type a wrong password and it has some really funny phrases to insult you. You can define sudoers insults option or several others in the file below. It is set under defaults entries section. Start by opening the file /etc/sudoers using below… Read More »