Archive for the ‘Uncategorized’ Category

Leaving Flickr, Joining SimpleGeo

Monday, August 2nd, 2010

Flickr has been a wonderful experience, as has Yahoo! as a whole. Some time soon I’ll write a longer, more thoughtful blogpost about it.

For now, I’ll just say that I’m sad to be leaving an amazing team, but excited about a fresh start with another group of brilliant people.

ishmael: A UI for mk-query-digest

Sunday, April 4th, 2010
screenshot
(queries obscured)

UPDATE: Richard is far more clever and is generally on a roll with naming projects recently, so he suggested that the name should be “Ishmael” in honor of one of the world’s most famous whale hunters.

I’m not feeling very creative, so my latest project is exactly what its name implies: mk-query-digest-ui is a simple UI on top of the data that mk-query-digest produces. The project was born of me and Tim Denike, the Flickr DBA, spending hours and hours staring at the the tool’s plaintext output while hunting for whale queries to optimize. Now that I think about it, I should have called it “Whale Hunter.”

The UI simply lets you sort the queries in the report by a few useful characteristics and facilitates more convenient access to data that is useful during the optimization process. As we keep using it, we’ll keep adding features.

I made it a point to work on this tool in my spare time so that I could release it without the normal ass-ache associated with open-sourcing something at a big company. Thus, the code is on github: http://github.com/mihasya/ishmael. Patches and feature requests are welcome.

Enjoy!

Kibera OSM Tiles on Flickr Maps

Thursday, April 1st, 2010

Kibera on Flickr I’m not going to be able to make it to where 2.0, but I was there in spirit. I distracted a few other Flickr employees and made Aaron hold my hand like a small child while we pulled down new OSM tiles for Nairobi and put them up on the Flickr map in time for Mikel’s talk about the Map Kibera Project.

You can read the Flickr blog post about it here.

You can go see the map on Flickr here.

You can find out way more about the Map Kibera project here.

Enjoy!

2010: One More Than 2009

Saturday, January 2nd, 2010

This seems like a good time to reflect and take stock.

One year ago, I was building internal tools at Yahoo! and starting to toy around with Django on the side. I was working on Yourmuni, which was later presented at the January 2009 Django SF Meetup. I was about to start working on a sizable side project (having met the founder at said meetup).

Today, I’m working at Flickr, inching ever so close to a launch of the aforementioned side project, working on an iPhone app, and toying around with all sorts of exciting stuff. Things feel very different. This is the first time that I actually CAN believe that a year had passed, because a lot of things have happened. I changed jobs, learning a ton and growing a whole lot as an engineer in the process; I took down Flickr, all by my self; I finally visited France after having been the only French major in my class not to have done so; we moved – it was the first time I painted a place; I got my US citizenship; my brother got married; I met a whole ton of awesome people, though I feel like I’ve fallen out of touch with more; I got my first real DSLR camera (thanks, Alexa!) I submitted minor patches to a couple open-source projects, gave some small presentations, and submitted my first proposal for a talk at a conference – fingers crossed!

I feel good about 2010, and hope that it will be even more eventful and crazy.

Happy new year, everyone!

Awesome quotation from the MySQL Performance Blog

Thursday, November 12th, 2009
“No matter how much you want it to fit, some things may not work (like the Godfather 3).”

http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/

Cluelessness, expressed in under 140 characters

Tuesday, October 20th, 2009

ORLY?!

In other news, this is post #100 on this blog.

Bye Bye, Internets!

Saturday, March 14th, 2009

I’m leaving for France tomorrow. I’m not taking my laptop, I won’t be using data on my phone (AT&T international data rates are something else), and I won’t be checking my email.

If you need to reach me, shoot me an email and I will get back to you promptly – on or after March 22nd :)

yourmuni now has instant stop lookup

Wednesday, January 28th, 2009

After another successful hack session on the shuttle ride home, yourmuni now lets you just look up any given stop on the spot without creating a bookmark. Now you can has the best of both worlds all on one site. Up next is adding other regions/agencies covered by nextbus (easy, probably done by the end of this week while I ride the shuttle) and an API.

Site is at http://yourmuni.appspot.com

Latest code is at Github

Not Using Common Sense Considered Harmful

Friday, December 26th, 2008

I’m a little crosseyed from looking at code non-stop for the past few days, so I’ll take a minute to wax philosophical.

I’ve been seeing a few posts here and there that take a very dogmatic approach to things. Take any number of “Considered Harmful” posts, or the “You’re doing it wrong” post. The most recent example is “Comments Considered Harmful” at the PHP In Action blog. All of these posts invariably end up with the author beckpedaling either in the comments or in a subsequent blogpost.

Me, I find all this silly. It’s very obvious that the same set of “rules” won’t apply to every environment. While these sorts of posts tend to “stimulate” discussion, which Dagfinn actually claims as his goal, I definitely think there are better ways to achieve the same thing. I’m sure that a post titled “Making code more readable by modularization” with the exact same content would produce a much healthier, yet equally useful dialog.

The answer lies quite frequently in moderation.

Splitting out complex logic into smaller, well-named function helps, but no amount of modularization will help a developer revisiting my code a year later that performs a 6-fold union to determine what resources a user has permissions for based on multiple relationship paths. That shit is confusing even to me. Nor will an ORM be able to do this work for me, at least not efficiently.

Using a framework is nice, but if you’re in an environment where the stack has been hacked up and customized, they frequently won’t work or will produce unexpected behavior. Naturally, there’s always the performance issue. There is nothing wrong with writing your own “framework,” whatever that may mean to you, that suits your own specific needs.

A careful examination of a problem tends to lead to a good solution. There are very few right solutions.

Here’s my list of “You’re doing it wrong if:”

  • You don’t take the time to fully understand the problem you’re trying to solve
  • You don’t document the thought process in a centralized, well known location
  • You don’t discuss the problem with anybody
  • You discuss the problem with EVERYBODY, including people with their own agendas that have no interest in that particular problem
  • You don’t consider how future changes will affect your work
  • You aren’t aware of already-existing solutions  (I see SO much crappy code being written while there is a well supported solution already available, sometimes from within the company)
  • You refuse to give up the crappy half-written solution you’ve created in favor of a better one you’ve discovered, having already started – out of pride
  • You don’t take ANY pride in what you do, and commit crappy code “just to get it done”
  • You don’t write any unit tests – you know that something broke when a user notices it
  • You write a unit test for EVERYTHING – your build takes longer than it would take to manually execute every usecase, and you’ve likely missed deadlines
  • You don’t know enough about the tools available to pick the right ones
  • You don’t follow the development of tools within your stack (saw a lot of that with the PHP4->PHP5 transition)
  • You don’t ask for input from someone that knows more than you do
  • You throw the book at everything – “Gang of Four” etc. are all books, but I think it’s a waste of time to write double the code needed for something, just to say that it follows a certain pattern (this will likely be its own post sometime in the future)
  • You don’t learn from past mistakes or refuse to admit they were mistakes
  • You give up common sense in favor of dogmatic principles like “Comments are harmful” and “Never write your own framework”

At the end of the day, the last bullet can probably sum up this entire post: use your common sense, and you’ll probably be fine. Naturally, if you’re a moron and lack any semblance thereof, disregard everything I’ve written, find some polarizing views on some blogs, and cherish ‘em like they’re your last pair of clean underpants the day your girlfriend gets back into town.

My wordpress is more better now too!

Sunday, December 14th, 2008

Upgraded to 2.7, swapped for a very basic, unfinished theme. Just had to get rid of the orange-ish monstrosity I had up here before, obviously still working on it.

WordPress 2.7 very nice so far (using the QuickPress feature for this)