Desktop cleaning

Posted Sunday, August 10, 2008 at 21h02 in Personal

desktop_cleanMy desktop is like my room.  Usually I keep it pretty clean.  Then at some point a switch goes off, I suddenly don’t care anymore, and junk ends up all over the place– random media files, shortcuts, readme files to programs I don’t remember installing, etc..  I can tolerate this state for a while before I get fed up and go on a cleaning rage.  I’ve just now completed one such cycle, having spent a large part of the day cleaning up my desktop.

desktopIt’s funny how software preferences and opinions on sensible computer usage evolve over time.  For example, I used to think blogs were the most retarded idea and that “bloggers” were those who had failed at life.  Now look at me.  Pretty sad, huh?  Then there’s the view of Windows Media Player users as misguided souls who need to be shown the light (e.g. foobar2k–in right screenshot–, mplayerc, VLC, etc.), similar to the perception online bourgeoisie now have of people who still use IE.

But even software choices that used to reveal technical savvy are being corrupted.  My favorite text editor for a long time, UltraEdit, seems to be killing itself by becoming bloated with more and more useless features while failing to fix existing bugs.  Still, I prefer it over the alternatives like TextPad, Notepad++, etc, although not by much anymore.  My new love is AutoHotkey, which allows you to create macros and assign them to global hotkeys.  I can now automatically launch PuTTY, login, start a shell, and cd to my project directory with a single key, and I’ve also configured a macro to perform KDE-style moving and resizing of windows (ALT+leftclick anywhere in window to move it, ALT+rightclick to resize it).  How sweet is that?

PHP, quotes, and squiggly brackets

Posted Thursday, August 7, 2008 at 12h43 in Personal

I’m writing a web application that requires me to use PHP to output Javascript code, and one of my lines is the following:

echo “fund.Data={$ydata};\n”;

This caused a Javascript error, which didn’t make sense to me until I realized that the squiggly brackets weren’t being printed, so the output was actually:

echo “fund.Data=$ydata;\n”;

This was strange, because squiggly brackets aren’t the type of characters you normally escape in a double-quoted string.  However, if placed around a variable name, they apparently mean something special and aren’t printed.  So in the end, I just broke up the string:

echo “fund.Data={” . “$ydata};\n”;

And that worked fine.

You know you’re a geek when…

Posted Saturday, July 26, 2008 at 00h22 in Personal

… you see smiley faces in your regex expressions.

Blegh

Posted Sunday, July 20, 2008 at 05h44 in Personal

I’ve written 2,104 lines of PHP in the past 48 hours. It may not be the most efficient code, and there are a good number of comments in there, but for someone who’s not really a programmer, that’s still kind of a lot. And no, I don’t think writing tons of lines of code is an accomplishment, let alone a measure of coding ability. On a good day, you delete lines of code. So, basically, I’ve had a terrible past two days. :\

BTW, I’m not sure what they’re called, but the one-liner if/else statements (i.e. $a = ($b > $c) ? $b : $c) are a great space saver.

Cryptonomicon

Posted Sunday, July 6, 2008 at 11h43 in Personal

I just finished reading Cryptonomicon by Neal Stephenson, which I must say is one of the more enjoyable books I’ve read in a long time.  It revolves around cryptanalysis during the WWII era and various top secret Axis codes concerning a German-Japanese conspiracy.  With three major story lines developing in parallel– one from the POV of an insanely brilliant American codebreaker (personal friend of Alan Turing), another with a US marine involved in numerous highly secretive and dangerous missions, and a third with a present day silicon valley entrepreneur who stumbles across the aforementioned top secret codes from WWII– there’s plenty of interesting plot developments and suspense to go around.

While Cryptonomicon has all the makings of a great high tech hacker thriller, there is one overall issue I had with the book.  Although the author apparently knows a great deal about cryptanalysis (he provides satisfying details regarding the theories and mathematics behind various code schemes), some parts of the book come across like a story about hackers written by a non-hacker.  For example, in one section, Randy Waterhouse– the modern day hacker– is tyring to anonymously wipe data from a server before the feds get to it.  So, according to the book, he types in:

telnet laundry.org

(Laundry.org is an anonymous proxy.) The author then goes on to say:

[Randy] logs onto laundry.org using ssh– “secure shell”– a way of further encrypting communications between two computers.

Then, when logged into laundry.org, Randy types:

telnet crypt.kk

Okay, so who in their right mind would use telnet for security-sensitive activity? And the fact that the book says he types “telnet server.tld” and then “logs onto server.tld using ssh” simply does not make any sense. Randy, or any hacker worth two cents, would instead have typed:

ssh laundry.org
ssh crypt.kk

There are other incidents in the book that remind you, if you actually do work in some of the high tech fields discussed in the book, that this is written by someone outside said field. At least that was the case for me when it came down to topics on telecommunications and, to a lesser extent, “hacking” (I hate that term). That issue aside, however, this has got to be one of my favorite books in recent history– a worthy high tech intellectual thriller that makes The Da Vinci Code look like a third grade picture book.

Ether

Posted Thursday, June 12, 2008 at 10h46 in Personal

While reading about Galilean transformation and electromagnetism (as a prelude to the implications of the special theory of relativity on quantum mechanics, which I’m reviewing since I never did that well in my quantum mechanics class at Princeton), I learned something about ether that I didn’t know before. To me, ether was always either a classification for organic compounds, an item that restored manna to RPG characters, or an archaic word for “space.” Now, I just learned that ether was the name given by early physicists to the medium through which electromagnetic radiation was thought to propagate (just as sound, for example, propagates through air).

Of course, as the Michelson-Morley experiment would later show, electromagnetic waves are indeed capable of propagating without a propagation medium.1 This in turn allowed Einstein to develop his special theory of relativity as we know it today. So, the “ether” coined by those early physicists was nothing more than an imaginary construct created to help people of that time understand electromagnetic phenomena. Fascinating, isn’t it?

1The Michelson-Morley experiment didn’t explicitly disprove the existence of ether. It did, however, show that light travels at the same speed in perpendicular directions, which, assuming ether did exist, wouldn’t be possible unless the ether frame moved in synch with the Earth’s rotation, which would be a preposterous claim. (They believed the ether frame was rooted either in the solar system’s center of mass or in the center of the universe.) It was Einstein who later used these experimental results to assert that there is no ether frame, which means the velocity of light is only relative to the observer’s own frame, which would then result in the famous concept of a “constant speed of light, c.” Einstein then used this idea to arrive at his famous postulate:

The laws of electromagnetic phenomena, as well as the laws of mechanics, are the same in all inertial frames of reference, despite the fact that these frames move with respect to each other. Consequently, all inertial frames are completely equivalent for all phenomena.

This was an incredibly bold statement at the time, because it meant that Maxwell’s equations and Galilean transformations could not both be correct (one of them had to be wrong). Even bolder, Einstein chose to modify the Galileon transformation, which in turn meant that he was challenging the fundamental equations of Newtonian physics!

Running for a Cure?

Posted Monday, May 12, 2008 at 20h05 in Personal

This past weekend I was in Philly visiting Ted and Jane, and it happened to be the same weekend as the “Komen Race for the Cure” event which raises money for breast cancer research, so I joined them in registering and participating in the 5 km run. Since there were about 15,000 people, unless you were at the front of the pack, it was difficult to get any speed, so we basically jogged along at a leisurely pace for 30 minutes.

I had a good time at the Race for the Cure, and while I whole heartedly support breast cancer research, I still don’t understand why people tie this– or any cause for that matter– with a running event. The idea of associating a foot race with cancer research and having people shout stuff like, “Go, go, race for that cure!” along the street just sounds silly to me, no matter how noble or worthy the cause. To me, it’d make just as much sense to have “Game for the Cure” or “Cook for the Cure” or “Check Email for the Cure” events; or better yet, just have people donate money and not ask them to do anything else. If someone wants to go for a run after they donate money, more power to them.

I’m Back

Posted Saturday, May 10, 2008 at 14h27 in Personal

For a while lately my eyes had been unclouded to the truth that blogging is vain and fruitless. That moment of clarity has passed, and now I’m back!

In all truthfulness, I do believe blogging has some value. It provides a sounding board for ideas and rants, and due to some strange psychological reason, unloading my thoughts, or at least a certain subset of them, onto a public webpage accessible by billions of people (with actual readership likely numbering in the low single digits) gives me a sense of relieved gratification. I see it as ‘talking to yourself in public’ taken into the 21st century. Add to this the fact that I’m posting this on my phone while on a train from New York to Philly, and I can almost convince myself that this is all somehow “cool.”

Anyway, what prompted this post is that I was just reading an article in the WSJ on recent job slashes in the financial sector and came across this quote

“[An attorney] filed an arbitration claim this week on behalf of a former mortgage backed securities salesman at Merrill Lynch & Co. Despite having his best year ever, the salesman’s pay plummeted to about $190,000 from $1.2 million. ‘He couldn’t make enough money to feed his family.’”

Poor guy.

Status update

Posted Wednesday, January 23, 2008 at 00h34 in Personal

So, last weekend I was at the Manna alumni retreat and stayed over at Jane and Ted’s for the weekend (Jenn was there too), drove from Philly back to work Monday morning, went up to the city the next day (tonight) to have dinner at Kellari Taverna (Hellenic cuisine, 44th between 5th and 6th) and listen to Tchaikovsky and Bernstein at Carnegie Hall with Suanne from California, and am now posting this from my phone on the train back to my place where I plan to do laundry and pack before I leave for Taiwan and Japan in 5 hours.

Hanging out in the city

Posted Friday, January 18, 2008 at 12h00 in Personal

I took the train into the city last Saturday to grab dinner with Jeff, Jamie, Gabby, John, Dan, Josh, and Jung at Sake Bar Hagi on 49th street between 6th and 7th. The dishes were small but reasonably priced and very tasty. We only had one order of sashimi (yellowtail), which was fresh though a bit more red than I was accustomed to. The rest of the dishes were also delicious, including the soft shell crab and a number of noodle dishes. I highly recommend the place.

After dinner, we met up with Joyce at Third Floor Cafe in K-town (corner of 32nd and 5th), which has a very loungy feel with good music and decent drinks and food. I liked the ambiance, although it was pretty loud and it’s easy to lose your voice trying to talk above the music. My hearing must be pretty bad, because I kept having to ask people to repeat their words even when they were screaming into my ear.

I ended up staying over at Jeff’s place even though I hadn’t planned on it, and the next morning we went to Redeemer (Tim Keller spoke on Job and how to deal with hardships; it was good). Afterwards we– Jeff, Jamie, Dan, Christine, Jimmy, Erin, and her boyfriend (I forget his name)– had lunch at Fig & Olive on Lex between 62nd and 63rd. I had poached eggs on some kind of freshly baked bread, which was better than I expected. Their seafood salad also looked good.