Archive for March, 2008

Checking processes in linux

Thursday, March 27th, 2008

ps -exf

Will show you all processes in a form of tree: parent processes and child processes aligned to the right. Here is sample output:

26633 pts/8    S      0:56  |   \_ /usr/local/java/jre/bin/exe/java -
26649 pts/8    S      0:00  |       \_ /usr/local/java/jre/bin/exe/ja
26650 pts/8    S      0:00  |           \_ /usr/local/java/jre/bin/ex
26651 pts/8    S      0:00  |           \_ /usr/local/java/jre/bin/ex
26652 pts/8    S      0:00  |           \_ /usr/local/java/jre/bin/ex
26655 pts/8    S      0:00  |           \_ /usr/local/java/jre/bin/ex
26656 pts/8    S      0:00  |           \_ /usr/local/java/jre/bin/ex

It is good to use this options with ps when viewing multi-threaded java applications running on linux. As java while running on Linux uses separate process for each thread (note, it depends on JVM and Thread library / implementation JVM is using, some implementations will show only main process for java app and threads will not be displayed as children processes ). You will see main process and children of that process (threads) structured as ASCII tree… Nice huh? :)

Best practices…

Wednesday, March 26th, 2008

“Premature optimization is the root of all evil”

- Professor Sir Charles Anthony Richard Hoare

“Test driven design can lead to emergent optimization and code that is readily optimizable.

If programmers develop test first, many of their upfront concerns about performance can be deferred.”

- Michael Feathers, Emergent Optimization in Test Driven Design

Helping setup yo momma’s PC remotely… :)

Tuesday, March 18th, 2008

I believe many of you had same prob when you need to help to check someone’s PC remotely. Say, I am usually helping my mom with her PC :) some of you could be helping your girlfriend… or anyone else…

Luckily there is online service called LogMeIn, what a wonderful thing! I’ve asked my mom to install it and was able to access her PC just by logging into LogMeIn website! This service comes in several flavours as Free, Pro, and several others. Free is absolutely enough to perform remote assistance and similar help! Good job LogMeIn! ;)

Rounding corners with Nifty Corners (just with CSS and Javascript)

Saturday, March 15th, 2008

Long ago saw this wonderful page/article (and recently rediscovered). It allows creating pages with rounded corners just by using CSS and Javascript and no rounding corners images.

Find full article here: Nifty Corners

Choosing colors palette

Friday, March 14th, 2008

Found this cool site. It allows you to search for color palette and does it by looking for key words you thinking of e.g. sun, beach, sky, night town, etc… Then it shows you list of photos with colors palette next to it. Pretty cool!

http://www.colorhunter.com/