Archive for the ‘personal’ Category

Goddammit

June 7th, 2011

jerk-outlet
My (still pretty new) apartment is mostly awesome, with one notable flaw. The pictured outlet (above) is the only source of 220v for the air conditioner. The air conditioner’s bent power cable was apparently designed to occlude the lower, regular outlet, which is the only one controlled by the light switch. The sadistic electricians who wired this building have effectively forced me to choose between having either sub-triple-digit temperatures or convenient, wall-switch-controlled light.

I chose the AC. If I want to be able to see at night, I have to walk all the way across the room and actually turn on a lamp, like a Neanderthal.

On the other hand, there’s a colony of prairie dogs living like a mile down the bike path. So, big picture, everything’s actually awesome.

art+design, bitching, ill-conceived plans, moaning, personal | No Comments »

Abandoned Yugoslav Monuments

May 23rd, 2011

spomenik

A few decades ago, the Yugoslav government commissioned a series of huge sculpture/monuments to be built at a few historic locations. They’ve since been abandoned, so the Balkans are now scattered with what look like the relics of an ancient and completely alien civilization.

Also, on a personal note, I’m spending the summer in Boulder, CO, interning with the lovely people at Foraker Labs! So, you know, FYI. You should probably visit — Boulder is just incredibly awesome and I have a remarkably comfortable floor moderately comfortable futon.

architecture, art+design, history, personal | No Comments »

Python Closures

December 18th, 2010

I don’t exactly make my passionate, sexy-times love affair with Lisp a secret. Imperative languages have their strengths, but every time I have to give up my functional programming perks a little part of me cries.

I’ve recently started seriously digging into Python, though, and I think it’s going to be the Imperative Language That Makes Me Cry The Least. It’s got the holy higher-level trinity of map, reduce, and filter, syntactically-sugary list comprehensions, lambda expressions, and it even uses ** as the exponentiation operator, as God and Fortran intended.1 It also has closures, which are magic if you haven’t seen them before, so I’m going to yammer on about them for a bit.

To be fair, I’m probably not the best person in the world to tell you about lexical closures. You really want Wikipedia. In brief, though, a closure is a function that can access and change state in the environment in which it was defined. Kinda like object-oriented programming without the objects: the way methods can access private data is kind of analogous. Let’s just look at an example: 2

def makePowerFn (power):
     def powerFn (base):
         return base ** power
     return powerFn

cube = makePowerFn (3)
print map (cube, [1, 2, 3, 4, 5])

Executing the above code applies our cube function to every item in the list and prints out [1, 8, 27, 64, 125].3 Neat, right? The magic part is that cube was effectively able to access power because it was defined within the enclosing lexical scope.

The concept of closures is pretty deeply embedded in serious-business functional languages like Haskell and the various dialects of Lisp,4 but lots of relatively modern mostly-imperative languages like Ruby and JavaScript have adopted them, too. I seem to recall that there’s been a ongoing attempt to get closures into Java, but I’m not going to hold my breath.

Anyway, closures! Now you know!

1 Python still can’t make metaprogramming trivial the way Lisp does, though. But I guess we can’t have everything. =P
2 Example adapted from defmacro’s rather nice functional programming discussion (near the bottom).
3 Notice how I got to use both map and ** in there? Awww, yeah.
4 “Haskell and the Lisps” would be an awesome band name, you guys.

computer science, personal | 1 Comment »

15 Authors

October 27th, 2010

I was just tagged by a meme on Facebook. You may be aware of my boundless enthusiasm for memes but less-than-boundless enthusiasm for Facebook, so here we are.

Don’t take too long to think about it. Fifteen authors (poets included) who’ve influenced you and will always stick with you. List the first fifteen you can recall in no more than fifteen minutes.

Memes like this are sort of doomed to end up as exercises in personal branding, but let’s go anyway:

  • Jorge Luis Borges
  • Douglas Hofstadter
  • Italo Calvino
  • Carl Sagan
  • Bertrand Russell
  • R. Buckminster Fuller
  • David Foster Wallace
  • Rainer Maria Rilke
  • Lao Tzu
  • Jules Verne
  • H.D. Thoreau
  • Aldous Huxley
  • Kurt Vonnegut
  • Arthur C. Clarke
  • Donald Norman

books, memes, personal | No Comments »

Thanks, Mom

October 26th, 2010

There once was a man named Bertold
Who drank beer when the weather grew cold
As he reached for his cup…
“NEEEEVER GONNA GIVE YOU UP!!!”
Oh, snap! You just got limerickrolled!

My mother just sent me this. WHAT IS WRONG WITH MY GENES

personal | 1 Comment »

A Freudian Slip, Perhaps

September 17th, 2010

42-15354198

Through a series of strange events, this afternoon I found myself at a job fair catering to MBA and Finance students. Let’s not dwell on how this came about, and let’s especially skip the uncomfortable part about being the only person in jeans and sneakers in a business formal conference hall. Errors were made. While I was there, though, I took a look around.

There was a good cross-section of government and consulting companies. The Treasury and State departments were there. So were Ernst & Young, Capitol One, IBM, Deloitte, Legg Mason, and PricewaterhouseCoopers. Each of these booths was surrounded by sweaty students in business suits carrying resumes.

At one of the booths there was a large banner advertising for entry-level hedge fund associates. Current public opinion being what it is, there was no one clustering around the table to interview. This meant that their selection of swag was on full display.

Gentle reader, I cannot make this up. They had a big bowl of squeezable stress balls, each painted like the globe.

To be fair, I recognize that hedge funds are useful in the financial world, and if I ever end up as part of a successful start-up I guess it’ll be nice to have people wildly buying up our stock in bulk at the IPO. I’m sure that the vast majority of people involved in hedge funds are perfectly decent human beings who probably believe that their work is having a positive net impact on the world. Being neither an economist nor a financial analyst I’m not really in a position to intelligently argue with them on that last point.

But these guys have got to know how they’re perceived right now. Maybe tempting prospective employees with tiny worlds you can crush in your fist isn’t the best image to be projecting.

To prove that this actually happened, I went up to the booth, feigned an interest in algorithmic trading, and got my own little stress globe. It has the company logo branded across the North Pacific.

economics, ill-conceived plans, personal | No Comments »

Hoody-hoo!

March 11th, 2010

college_of_william_and_mary

So apart from sheer laziness (and the fact that it’s spring break, so I’ve been reading like a book a day, which is awesome) there’s no particular reason that I haven’t been posting for the last couple weeks. I’ve intended to write some stuff about the ways in which English is different in Montreal, or about a certain Dutch artist that builds mechanical animals, and I’m still going to, but that’s kinda been overshadowed by the fact that I HAVE A FUTURE NOW SINCE I JUST GOT INTO GRAD SCHOOL WOOOOO. Specifically, the MS in Computer Science at William & Mary. No news yet on funding/assistantships, though that should be coming in a few weeks, and I still need to wait for any other offers, but damn.   Before long, one way or another, I’ll actually have a place in the fabric of society again.

Assuming they didn’t make some sort of clerical error; I’m sure I’ll be neurotically obsessing over that possibility for the next two years.

computer science, personal | 5 Comments »