23 December, 2014
11 May, 2011
How to highlight searched text using sed
$ echo "foo color bar" | sed -e "s/color/\x1b[7m&\x1b[0m/"
at 2:41 AM
26 November, 2010
sed with single quotes vs double quotes
sed with single quote doesn't understand variable (like $<var_name>), it takes it literally. Use sed with double quotes if you intend to replace variable ($<var_name>) with its value (<var_value>). Actually, it is a shell requirement.
at 12:41 AM
18 August, 2010
You ain't gonna need it (YAGNI)
Always implement things when you actually need them, never when you just foresee that you need them.
at 2:50 AM
13 March, 2010
simplicity Vs minimalism
simplicity = No complexity or Less complexity
minimalism = All but necessary
at 7:03 AM
08 July, 2009
Do not complain
If you don't like something change it. If you can't change it change your attitude; don't complain.
at 10:35 PM
09 March, 2009
Avoid the use of default argument
because it makes your code difficult to understand and maintain.
at 2:21 AM
21 July, 2008
14 July, 2008
31 May, 2008
Parallelizing program: chdir - fork() vs threads
When you are parallelizing your program and your parallel tasks require to change directory (chdir()) then use fork() instead of threads (OR you would need to maintain locks in case of threads and might need to sacrifice some amount of parallelization). The current working directory is maintained per process and not per thread.
at 6:29 AM
26 May, 2008
23 April, 2008
22 April, 2008
Tabbed browsing
Do not misuse tabbed browsing. [You can probably waste bandwidth if you just open a bunch of links and never read those. This generally happens when you do a Google search and just keep opening too many search result links without looking at those you have already opened.]
at 11:33 AM
24 February, 2008
15 December, 2007
13 December, 2007
If something doesn't work
If something doesn't work for you, you're probably doing it wrong.
at 4:11 AM
03 December, 2007
The difference
There is a difference between knowing the path and walking the path.
BTW, yesterday I walked from Atta Market, Noida to Mayur Vihar phase I extension, New Delhi (Distance: 5Kms, Time: 1hr) :)
at 9:01 PM
27 October, 2007
Eight principles
The eight irresistible principles of fun: http://www.eightprinciples.com/
at 3:50 AM
21 October, 2007
Law of Industry?
My first Industry experience: You need to ask many questions to your juniors and answer many questions of your superiors. It's fun.
at 6:26 AM