11 May, 2011

How to highlight searched text using sed

$ echo "foo color bar" | sed -e "s/color/\x1b[7m&\x1b[0m/"

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.

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.

13 March, 2010

simplicity Vs minimalism

simplicity = No complexity or Less complexity
minimalism = All but necessary

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.

09 March, 2009

White sauce in McVeggie Burger is

Mayonnaise.

Avoid the use of default argument

because it makes your code difficult to understand and maintain.

14 July, 2008

Importance of deadlines

Deadlines make your goals become reality.

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.

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.]

24 February, 2008

Hope[less] strategy

Hope is not a strategy.

15 December, 2007

Idea to generate Ideas

In case you are short of ideas, try idea generator.

13 December, 2007

If something doesn't work

If something doesn't work for you, you're probably doing it wrong.

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) :)

27 October, 2007

Eight principles

The eight irresistible principles of fun: http://www.eightprinciples.com/

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.