Thursday, July 31, 2008

Unix 0, 1, and 2 Redirection

What does “> /dev/null 2>&1″ mean?

"There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.

Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one [of them] explicitly, you’re talking about STDOUT. (emphasis added)

Given that context, you can see the command above is redirecting standard output into /dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket), then redirecting standard error into standard output (you have to put an & in front of the destination when you do this).

The short explanation, therefore, is “all output from this command should be shoved into a black hole.” That’s one good way to make a program be really quiet!"

Tuesday, July 29, 2008

Today is my one year anniversary working for Towers Perrin.

Wednesday, July 16, 2008

Oracle Dates and Times

http://infolab.stanford.edu/~ullman/fcdb/oracle/or-time.html

Friday, July 11, 2008

every morning should start like this...

Earlier this morning, with coffee in hand and cats at my feet...

So I re-connected with my senior year AP English Lit teacher Laura Nicosia via none other than a recent obsession with twitter! Best use of those 140 characters as yet. She has a blog that chronicles her foray into web 2.0 technologies, which is great because its nice to be alongside aspiring female nerds fervently indulging their inner-technophiles.

Wednesday, July 2, 2008

Nerdapalooza!

I thought of doing this a few days ago knowing it will totally help, in the same way that PConrad's CISC474 Wiki was an amazing way to house ass-sucking computer science-y quirkage, but from time to time (i.e. hopefully on a daily basis) I will probably post cryptic completely nondescript jargon and pictures to help me remember things I learn while I'm doing work ranging anywhere from the workings of computer languages, database management, development and debugging environments, and whatever else I feel like.

These posts are strictly my own musings and a personal attempt to increase my knowledge base. I'll be using "pseudocode" (actual code that I'll give preposterous pseudonyms, which is different from real pseudocode) in any examples or in any screenshots, and which will in no way be used for personal or commercial gain beyond that. Therein. Henceforth.

My first post will be about executing SQL commands from inside java. I also want to subsequent-post about C# function delegates, callback functions, oh and a bunch of weird stuff about Visual Studio, just off the top of my head, and indeed, the list will ever be increasing.

Tuesday, July 1, 2008

zen habits

Lessons in Productivity from Ralph Waldo Emerson
...
3. Keep moving

“Ah!” said a brave painter to me, thinking on these things, “if a man has failed, you will find he has dreamed instead of working. There is no way to success in our art, but to take off your coat, grind paint, and work like a digger on the railroad, all day and every day.”

Emerson understood that it is human nature to “lapse . . . quickly into flesh and sleep.” Nature is constantly pulling us toward the path of least resistance. To battle this natural tendency for laziness, Emerson stressed that we must “use all the exalters that will bring us into . . . a productive state.” For Emerson, the most effective tonic for laziness was work.

Emerson knew that once motivation dies it is hard to resuscitate. He kept his motivation alive by constantly working. When times were difficult and ideas didn’t come to him, Emerson continued to work knowing that inspiration would come soon. In a letter to an acquaintance, Emerson compared the mind to a pear-tree that goes through a season of bareness only to suddenly burst forth in fruitful growth. However, the farmer must continue to prune and graft even during these moments of sterility in order to reap the harvest.