Oct 012010
 

The Stanford-Oregon game day is almost upon us!

Let’s go Stanford!

A few articles to get the blood flowing and occupy some time while you wait anxiously for 5PM:

Sep 282010
 

Or, excuse me. They’ve rebranded as “Aol.” Casing matters.

This is confusing. I know that Aol is trying to reposition itself as a content provider for the new social web, but this seems like a major integration problem with the culture clash between TechCrunch which exudes Silicon Valley, and Aol, which is, well, Aol. However, if the purchase price really is only $25 million, that’s a bargain for the brand.

Maybe this is why Aol leased out the new building by my house.

Taking bets on how long Arrington stays on.

Sep 262010
 

The Five Ghosts Cover Art

When Stars performed at the Independent in San Francisco back in June, they played through all of The Five Ghosts, which was at that time, unreleased. The whole album was a bit of a throwback to an earlier version of Stars when they were much more of an atmospheric electronic band with soaring melodies. This song exemplifies that feel.

Pictures of the concert after the jump.

Listen:
I Died So I Could Haunt You - Stars


Purchase: CD/mp3
Continue reading »

Sep 222010
 

Album: Eyelid Movies
Year: 2010

Eyelid Movies Cover Art

Cover -- Eyelid Movies

A few nights ago, Phantogram opened for Ra Ra Riot in a Syracuse, NY show, a show I would have loved to attend. Phantogram shares some connections with Ra Ra Riot, both having a melancholy sound, and signed under the venerable Barsuk Records. Their sound is a tripped up dream-electro-pop; M83 stripped bare to a piercing, pounding, entrancing core.

Make sure you listen to this with good bass.

Listen:
Mouthful of Diamonds - Phantogram

Sep 212010
 

For a long time, I’ve resisted moving my web site to a CMS or blogging platform because I wanted to maximize customizability of my site, and also to practice my web dev skills. However, as time went on, I was finding myself reinventing the wheel with increasing frequency, and creating actual content with decreasing frequency, and eventually, updating the site became a chore necessitating far more time than should be needed. Hence, I have switched over to WordPress, with a customized Suffusion theme.  My old Blogger blog and my old lekanwang.com site have been merged here.

In the next few days, I will finish moving the content over to this site. Then, things should start to get exciting…

Jul 292010
 

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.)
Night Scene from a Footbridge
Bee macro

The New Pornographers

Jul 182010
 

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/

Jul 072010
 

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!
Jun 182010
 

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.