Tuesday, September 21, 2010

Last Post Ever

Well, kind of.

I'm moving my blog into the newly renovated lekanwang.com. Over the next few days, I'm planning to consolidate my blog, the old lekanwang.com, and some of my photography and music web properties all in the same place. It should be exciting.

Hope you enjoy.

Sorry, Blogger, it was nice while it lasted.

Thursday, July 29, 2010

365 - The First Three Weeks

It has been three weeks and three days since I began my quest for a photo a day, for a year, and already, I have noticed how difficult it is to take a quality shot every day, especially when you often return from work after sunset. However, I have also started noticing all sorts of small details in my daily routine as I constantly search for interesting subjects and patterns of light for my daily photos. The way the light shines on the neighbors' hedges as I go for a run, the patterns of steel girders on a building in downtown Palo Alto, the way the sidewalk seems to subtly change shades depending on the color of reflected light from the buildings nearby--it's so easy now to get lost in a world of detail.

Here are my favorites from the first three weeks.

(Edit: the edges of a lot of these are cut off when viewed from the post. Click through to the album to see the full pictures.)









Sunday, July 18, 2010

365 Photos

A little over a week ago, I decided to start my attempt at taking an interesting photograph a day, for a year. It's a little frightening to commit to this, considering that I have never failed to renege on a majority of my summer plans, but I hope that by doing this, and announcing to everyone that I'm doing this, I will, (1) have an excuse to take my camera to even more places than I am already--yes, I know it's hard to believe, but it's possible; (2) hopefully improve my photography, and practice thinking about the three D's of photography: destination, determination, deliberation; and (3) quickly run out of the easy things to photograph--the cats, the housies, the flowers, Big Sur--and will start having to think about using more unique subjects.

Every once a while, I'll post the highlights here.

And all the pictures can always be found at http://lekan.smugmug.com/Photography/365/

Tuesday, July 6, 2010

Refound Love...for Microsoft's Command Prompt

Almost all Windows power users use the command prompt from time to time. cmd.exe can execute precision commands, browse, and filter very efficiently if used correctly. However, for Unix users, the command prompt is just plain weak, prompting many to install Cygwin.

But just today, I discovered that cmd.exe has some awesome keyboard shortcuts. They have again made the daily experience of using Microsoft's command prompt bearable again. Even interesting.

Here's a summary of my discoveries:
F2: Pastes whatever is in the cmd buffer up until the character you type next, and advances the cursor there.
F3: Pastes the rest of the buffer from the buffer's cursor.
F4: Deletes from the current cursor to the specified character you type next.
F5: Copies the buffer to the command line.
F7: Displays a reverse-sorted, selectable history of recent commands.
F8: Super useful tool that displays a list of all commands you've typed that have a similar beginning to your current command. I actually wish Unix had something similar.
F9: Choose a command to run (from the list in the F7 list). This one is really useful if you have a sequence of commands that you run over and over again. You could write a batch script, but with this shortcut, you could just use the same combination of F9-x over and over again, where x is the number of commands in your sequence.

Let me know if you know any others!

Friday, June 18, 2010

The % Operator in Java and C/C++

The % operator is colloquially called the mod or remainder operator, and most people assume that its behavior is the same in all languages. I mean, 8%5==3 in pretty much any language with a C-style syntax, including Java. But what if you have -8%3? Or, -8%-3? Or let's get really funky and what -8.03%-1.88 will be.

So here are the rules.
Both Java and C/C++ follow the ISO/IEC 1539:1991 standard, which maintains that (a/b)*b + a%b==a.

Hence, the % functions much more like a remainder operator than a modulus operator in mathematics. In addition, the ISO/IEC 1539:1991 standard states that quotients always round toward 0 when there are negative numbers invovled, which is why we sometimes end up with negative remainders.

The only difference between C/C++ and Java is that the % operator in Java accepts floats as arguments, while the C/C++ operator only accepts ints.

Friday, April 16, 2010

Circumhorizonal Arc?

It looks like a rainbow, but it's not. It looks to be a circumhorizontal arc showing its colors over Stanford and Palo Alto. Or it could be cloud iridescence. Any meteorological experts out there want to comment? In either case, this is beautiful, and a nice start to the day.

Sunday, February 28, 2010

Yeasayer - Odd Blood

I am so fascinated with new music. When I get old, I completely see myself as that weird, cheery, white-haired senior citizen at the end of the cul-de-sac in a house with a room lined full of mahogany bookshelves filled with "those old-fashioned CD things." And when people stop by that room, they would always ask me, "Have you really listened to all of those?" to which I would answer, "Yes, I've listened to them all, but most, I've realized, are pretty mediocre."

That's my real problem. The first time I listen to most albums, I try to keep an open mind, and for the vast majority of them, perhaps because of personal selection bias, I tend to like them. A few I can even say I love right from that first time. But, most of those albums wither after applying the infamous test of time.

Albums that I love right from the start, and can withstand over a month of heavy listening are truly rare, and generally stand a good chance of making one of my "ALL TIME BEST" spreadsheets. This Yeasayer album is one of them. I haven't been listening to an album this much since In Rainbows came out.

The album has that strange and classic Yeasayer experimental sound driving each track, but it is as if the synths and laptop loops and drum machines gained sentience and decided to all go party together in a back alley while trying to sing pop songs. After just listening to the album once while skiing at Mammoth, I already felt like I could and wanted to sing along to half the songs. They're totally infections, and inventive enough to keep any musically analytical mind fixated.

Get their album. Go see them live. (If you're in the Bay Area, they'll be at the Fillmore on April 17th.) Sit back, listen, and smile.