Howdy!

Welcome to my blog where I write about software development, cycling, and other random nonsense. This is not the only place I write, you can find more words I typed on the Buoyant Data blog, Scribd tech blog, and GitHub.

Urlenco.de: Mono, Lighttpd, and PostgreSQL.

During the nigh 12 hour break I had between regular work over Thanksgiving, I spent about four hours writing a little utility that I wanted to use instead of TinyURL, and found a fantastic domain name for it too: Urlenco.de. I also wanted to use the opportunity to explore using Npgsql, the .NET connector for PostgreSQL, which was a very pleasant experience after using the MySQL .NET connector (part of the pleasant experience was using PostgreSQL itself, of course). Another new thing to explore was the FastCGI support for Mono/ASP.NET, I'll be sure to jot down my experiences with Mono's FastCGI support in a later post since my brain is too fried to talk about it coherently in detail.

The most important part of the entire project was further refining my rapid-development process for Mono and ASP.NET so I can do quick little projects like this and push them to a live webserver in a matter of hours instead of days (of time I don't have). This mostly consists of boiler-plate project templates for some basic database code, page templates, and a NAnt build script that facilitates the building and testing of the site using xsp2 on localhost. Nothing spectacular, just having a toolkit of necessities to take from one project to the next, especially when time is at such a premium, is a minor but important difference from how I work now as opposed to how I used to work (when I had expendable time).

One of my favorite parts of the entire Urlenco.de project was setting up a Urlenco.de API for both encoding (tiny'ing) and decoding (untiny'ing) URLs to and from Urlenco.de, all in under 10 minutes after a suggestion from my friend Dennis at Palantir. After another suggestion, I also wrote a Urlenco.de stats page using the

Missed Spain :(

I hope everybody enjoyed their stay this past week in Madrid for the Mono Summit 2007.

Unfortunately, it's been too hectic a month to take the week off and go to Madrid, so I'm incredibly jealous of all of you. Grumble.

I'm in ur office earnin ur salry

Read more →

iChatAgent leaks in Leopard

I really don't have much that I can say about this, I came into the office after leaving my Mac on (as per usual) for about 12 hours and found that I was out of space on my startup disk, out of all available system memory, and things were crashing left and right.

What the fuck right?

Well, after I recovered the system enough to pop open "Activity Monitor" I found the exact culprit.

Memory Leak


Read more →

Turning Famousosity Up To 11.

Sergio, one of our talented web monkeys, sent an email out today that started with "OMFGBBQ!"

As it turns out, Sergio is a much more religious reader of Penny Arcade than the rest of us (a public shaming and revocation of some geek cards is in order) since he was the first to notice this:


Click to view the image fullsize



Hell yes.


As a side note, I have Sergio to thank for the sweet drag-and-drop interface on the Top Friends edit page and now for bringing some Gabe and Tycho love to our attention.
Read more →

Facebook Flyers Make My Eyes Bleed.

As part of what consists of my day/night/weekend job, developing Facebook applications like Top Friends, I spent a lot of time on Facebook (mostly losing games of Scrabulous to other developers). Since I spend anywhere between 20 and 30 hours a day on Facebook, I see a lot of Facebook's ads, and in particular, Facebook's "Flyers".

The concept at it's most basic level is a novel one, allow posting a flyer, similar to stapling a "Free Couch" flyer to a bulletin board, except on Facebook. In practice however, they suck. They suck bad. Really bad. I have a much higher respect for advertisers that can come up with ads that are either intriguing, or at the very least, not absolutely painful to see.

Over the past week I've been quietly taking screenshots of the absolutely worst Flyers that I've seen that have brought me close to sending a flaming bag of poo down to Palo Alto. Think about the lame kind of spam you get in your inbox, that's about the level that Facebook's Flyers seem to be, except I can't fix it with aggressive spamassasin rules.









Isn't this supposed to be targeted? These all seem to target single, stupid, bi-curious, poor, gullible, and desperate people, and I'm pretty sure I only fall in, at most, three of those categories.

Seriously, what the fuck.

Read more →

"Why are you awesome?" meet Mono

When I originally wrote the Facebook demo application "Why are you awesome?" I wrote it in PHP4 in about 3 hours and hated myself for every one of those miserable 180 minutes. Since then however, I've been slowly and methodically working on a new, JSON-based, Facebook client library (Mono.Facebook.Platform) specifically to bring together some of the aspects of pyfacebook, the PHP client, and the Facebook Toolkit that I like (implementation progress can be found in the NOTES). After getting some of the key Facebook calls implemented to support "Why are you awesome?" I figured I might as well give it a whirl and see if a "real" application would work on top of the library (it does).

Thus far, all that were needed as far as library calls were:
  • feed.publishActionOfUser
  • notifications.send
  • fql.query
  • profile.setFBML


A couple of the things I've found thus far in my work have been, that writing a library that you have to use forces you to think about what you add and what you remove a lot more and focus on simplicity and extensibility; secondly, JSON is much faster, meaning I can do things with the Mono.Facebook.Platform library that I couldn't with the XML-based PHP4/5 library. Operations like fetching the user IDs of all 700 friends of mine complete in a timely fashion under the JSON library, whereas they typically timeout with the XML-based libraries.


The Mono.Facebook.Platform library isn't even alpha, it's in negative greek letters right now, there's not enough of the API implemented, and it doesn't handle errors very well at all, so don't use it. When it's finished however, I intend to support over 90% of the Facebook calls, and offer it up as a faster, viable option, for ASP.NET developers on Windows and on Mono.

Of course if you want to check out "Why are you awesome?", head on over to the application page and install it.
Read more →

Bug Number Seven

One of my favorite Facebookers, Ari Steinberg, just resolved bug #7 in Facebook's bugzilla.

LIMIT, OFFSET, and ORDER BY are all implemented.
docs at http://developers.facebook.com/documentation.php?v=1.0&doc=fql are updated. enjoy guys, and let me know if there are any problems with it. tyler, don't go too crazy with it...keep in mind that order by in particular can be an expensive operation (but do try it out - when used in the appropriate ways it could lead to a savings)


When used correctly, LIMIT, OFFSET and ORDER BY can really make writing application-level code much easier, because you're offloading a lot more onto Facebook. For example, instead of fetching an entire list of people (presumably friends) and then sorting by their name, you can perform a query like:
SELECT uid,name FROM user WHERE uid IN (SELECT uid1 FROM friend WHERE uid2 = $UID) ORDER BY name

This query will fetch an alphabetically sorted list of $UID's friends along with their uid, preventing any sorting you might need to do.

Make sure you check the FQL documentation for which "columns" are keyed such that you perform the most optimal queries possible. Of course, you should already make sure you're selecting as often as possible on keyed "columns" in FQL, but when you're offloading large amounts of sorting onto Facebook's API servers, it becomes more important to form optimal queries to make sure that you can fetch data from Facebook as fast as possible and render your application's pages.

Another fun query that becomes more fun with ORDER BY is fetching events for a particular user:
SELECT eid, name FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid = $UID) ORDER BY name

This of course is using ORDER BY on the event.name "column" which is not keyed so it will theoretically perform slower than the example above, but it's far less likely that a user will have thousands of events versus thousands of friends, so the real-world performance hit will be negligible.



As as side note, Ari was on stage with me at Graphing Social, helping me give the Facebook App Development 101 workshop a few weeks ago. You can regularly find him cruising through bugzilla and every so often on the #facebook channel on Freenode.
Read more →

Building Mono on Leopard

I figured I'd write up a guide to building Mono from Subversion in preparation of the upcoming 1.2.6 release, on a site I've neglected since I set it up, mononews.org (I hope to get back to writing tutorials and "newsy" stuff with the 1.2.6 release).

Anyways, if you've got Leopard installed, Geoff Norton did a great job in helping me track down the remaining Leopard/i386 bugs earlier today, so now you can build and run Mono relatively easily from Subversion on your fancy smancy new OS.

Building Mono on Leopard
Read more →

A note to my Graphing Social "students"

I figured I'd inform anybody that attended my Facebook App Development 101 workshop at Graphing Social, that I have finally deleted the workshop test accounts that were located at workshop.monkeypox.org.

I have made a backup of the database that we used to play around with the "Why are you awesome?" source code, and I have also backed up the files, so in case you forgot to get your modified files drop me a line and I'll fish your data out.


Read more →

Your order has been completed

Yesterday while shopping around for a new cell plan I figured it'd be a good time to get a new phone as well. The cell phone I currently have is the only cell phone I've ever owned, I believe the model is an LG Piezza-shit.

After browsing around Cingular's site, I found a good deal on a Blackberry Pearl and decided I really want to be tethered to my email more than I am now. Not that I ever had any free time to begin with, but I'm a sucker, I liked the placebo effect; that's all over now, I'm getting a Blackberry.



I'm fucked




Read more →

Silicon Valley Gangstas

Last night I attended the "Hip Hop Live" show at the Mezzanine here in San Francisco, and it was nothing short of absolutely amazing. As some of my coworkers know, I'm a huge hip-hop fan, but primarily dirty-south rap, so going to a show by three East Coast rappers was different. The show started with Brother Ali, who I've maintained for the month leading up to the show is "one of the most insightful rappers you'll see." Following Brother Ali, the venerable Ghostface Killah and his crew took the stage, dedicating a song to ODB (Old Dirty Bastard) as well as paying homage to some of the other Wu-Tang Clan members. The final act of the show was Rakim, another powerhouse act, who did some songs off his new record but also some "oldies" from the early nineties like "Don't Sweat The Technique."

In general, you missed a hell of a show. I wish I could describe it a bit better but between raising my fist in the air or making the Wu-Tang symbol with both hands, I lost track of it all and let myself become overpowered by the music.

At the very least, I recommend checking out Brother Ali, I think you'll be hearing a lot more from him over the next couple years. This is one of his more controversial songs, "Uncle Sam Goddamn." Enjoy.
Read more →

On Investing

Every month since coming to work at Slide I've been putting away some money into a low-yield savings account, the modern financial equivalent of hiding money in the mattress. The more I've been thinking about this, the more I've been wanting to change this, start investing and the likes, putting my money to work (I don't get a break, why should it!). The biggest obstacle however is that, as a young man in the 21st century, I haven't the slightest clue what to do here. It takes grown men their entire lives to really get a handle on such large volatile systems such as the stock market, what hope do I have to do anything but piss my money away?

The dollar is unfortunately weak right now but I feel that it will turn around soon, so it seems like an ideal time to start investing in a few select stocks. I figured that I would pitch my plan, and see what reactions it got before I started to actually put money down.

The Plan

Please point out as many flaws in my logic as possible, I want to be as prepared as possible before money leaves my bank account(s).

Overview

The "inspiration" for how I want to invest comes from some development methodologies that have started to crop out in various places out of the desire to increase productivity and squeeze the most bang for their buck of developer time (such as SCRUM). "The Plan" will follow a similar "flow" as it will be oriented around a planning period, an investment period (the sprint) and the analysis period (basically me crying because I lost all my money). I think that allowing for a cycle of around 7 months for "the plan" should be adequate enough to maximize returns while maintaining a good diverse portfolio. Some of the very few stocks I follow seem to perform well for a 6-10 month period before somebody either does something stupid or a product line fails, etc. Catching this wave is important, as is getting off at the right time, this concept is nothing new, but will probably be the hardest rule to follow from "the plan."

Step One: Research

The entire first month of "the plan" I intend to spend on research, not full-time, but on my weekends and free time. This part of "the plan" should allow me to scour the internet reading up as much as possible on candidate stocks, charting their progress over the first month and getting familiar with those leading the business and their ability to do so. Investing in lines on a bar graph is not what I want to do, I don't think, given my experience with investing, I will be able to analyze a company's potential just by looking at numbers. This phase is definitely going to be the most interesting and educational about the market and will help me figure out whether this is really a good idea or not.

Step Two: Invest and Track

With my set of stocks for this cycle chosen in Step One, now it's time to actually invest. I'm not certain whether going through a broker, e*trade or another online firm will be the right way to do it, but I'm open to suggestions. Pending the research I would do beforehand, that would gauge how much money and where I would invest. Once money is invested however, it's hands-off until the end of the sprint of 6 months. Every week I intend on watching the stocks, following the companies and what they're doing to, and doing basic incremental metrics on how well everything is performing. This should be the fun part of the entire cycle, partially since it's the least work, but it will also allow me to learn the most about how the market works in contrast to world events.

Step Three: Extraction and Analysis

Regardless of how well they're performing, what goes up must go down, after the 6 month sprint from Step Two, sell! Once all the money is out of the selected stocks, it'll be time to really analyze how well everything performed. Ideally finding which sectors are doing well, what influenced the stock prices, what the company did during the sprint and how well the market as a whole did during the sprint. Pending the success of the first cycle of investment in this fashion, this step will lead nicely into another cycle's "step one" and allow for rapid iteration on fine tuning my investment savvy and give me a chance to try out investment in a variety of different businesses and markets.

In general I haven't decided how much money I want to start putting into the stock market nor have I decided on when I want to start, but I've been pondering this plan for almost a month now and would love to get feedback from anybody that's tried their hand at investing, etc. Because the first cycle will be an experiment I will most likely be noting my progress here. If anybody wants to join, let me know! It could be fun to "pick your teams" like fantasy football (I can't believe this exists) except with actual money and (hopefully) actual returns.
Read more →

My new favorite chuckle

Whenever discussing possible Facebook applications or some of the concepts involved in bringing a product into Facebook, I invariably hear a lot of:
"we want to do X because we've found college students respond well to Y"
or
"college students [on Facebook] will love Z"



Now, I don't mean to be too picky but there's a couple of problems with this:
  • Over 50% of Facebook is not in college
  • Just how old do I look to you?*

Seriously now.





* I dropped out of college earlier this year, after winter semester

Read more →

Any Unemployed .NET Developers in NYC?

Last week at the Widget Summit speakers dinner I met an executive from DoubleClick, you know, that gigantic ad company that recently got acquired by Google, Inc. While talking about some of the difficulties in developing scalable web products I brought up some of my history in terms of developing .NET web applications and of course, Mono (at least I think that's how we got on the topic).

As it turns out, DoubleClick is really pushing to modernize their internal infrastructure on the .NET platform and really needs some smart folks either willing to move to New York City, or that already live there. If you're looking, feel free to contact me at tyler@monkeypox.org and I'll put you in touch, or hit up their careers page.

If you go to work at DoubleClick, I think you can technically get away with saying you work for Google. You'll also be able to say you are working on truly scalable .NET, which is something I really only think Windows Live and Myspace* developers can say currently.

Of course, if you're on the west-coast or lean more towards Python, Slide is always hiring.



* As it turns out, Myspace runs one of the largest .NET sites on the internet, and lays claim to the largest SQL Server installation on the entire planet.
Read more →

Widget Summit Slides

I recently got off stage at Widget Summit and figured I'd better post my slides before I get back to the grind at Slide.

Unfortunately given some of the restraints on my personal and professional time, I couldn't come up with an entirely new presentation for this event but some of the concepts I've talked about at previous presentations and talks could be brought into this presentation. The audience here at Widget Summit was slightly different than previous talks so I needed to modify and remove some of the more developer-targeted content as it simply wasn't pertinent to this audience.

In general I think the talk went reasonably well, with the sole exception of running about 10 minutes short of the allotted time because I talked too fast. It did however give me the opportunity to answer plenty of questions. I hope my slides are more informative than I think they will be by themselves, since I didn't have any presenter notes and was speaking impromptu almost the entire time. Enjoy?

Facebook for Widgeteers (PDF)
Read more →

Speaking at Widget Summit

This upcoming tuesday (October 16th) I'll be speaking on Facebook Development to what will presumably be an audience of "widgeteers" (as I'll call them).
According to Wikipedia, a web widget is "a portable chunk of code that can be installed and executed within any separate HTML-based web page by an end user without requiring additional compilation."

Following this definition, most of Slide's products are "widgets" per se, but our Facebook applications don't necessarily fall under this category of "web things," as they are in a category unto themselves by integrating into the Facebook Platform whenever and wherever possible.

I'll be speaking on some of the differences between normal "widget" development on the web in contrast to Facebook "apps." As the session page notes, I'll be covering some of the topics like:
  • Walk-through the functionality of a basic Facebook application.
  • A brief explanation of Facebook networks including cities, colleges, companies, and groups of friends.
  • The benefits of Facebook markup over a fully-hosted solution.
  • Enabling important integration points such as user dashboard, user profile, and social news feed.
  • When to use requests and alerts, and the proper etiquette for these interactions.
I'm really looking forward to talking in a slightly different capacity than usual, as "my usual audience" is developers who are really interested in Facebook application development at other venues like at Graphing Social, the Facebook Developer Garage: Palo Alto and other mini-conferences, hackathons, and meetups. At Widget Summit I'll be speaking about a bit higher-level concepts, indirectly related to development, to an audience of product managers, entrepreneurs and folks generally interested in how to get in on the Facebook Platform.

Widget Summit will be at the Mission Bay Conference Center at UCSF is located at 1675 Owens Street, just off the 280 freeway in San Francisco (directions). I'm really looking forward to the event, if you can make it out today, our fearless leader Max Levchin will be giving a keynote of sorts this morning at 10 a.m. which should definitely be insightful and entertaining to say the least. I'll be there tuesday to speak, so if you can make it, come for both days!
Read more →

Google Search Inside of Facebook

A couple of days ago I found out that you could get Google results in JSON while poking around for simple JSON APIs that I could use for miscellaneous hacks.

I was thinking of all the fun things I could do with search results, and finally settled today on the most ridiculous one possible, searching from within Facebook. About an hour's worth of PHP5 later, I present Search!, another ridiculous example application.

Unlike my previous "Why are you awesome?" demonstration application, Search! doesn't really integrate into Facebook nearly as much. Search! doesn't post to the profile, send notifications, or do much more than provide an easy means of sharing search links via your "Posted Items" or sending them along in a message to a friend on Facebook.

Searching with Search!


Sharing search results



I can make no claims to this being a "good" application by any means, I just really felt the need to write something ridiculous, and this is what came out. The source code can be considered public domain, but I would appreciate attribution if you spread this super-mega-awesome code.

Install Search! | Search! Source Code

Read more →

Remix 07 Boston Wrap-up

Earlier this week, following CommunityNext and Graphing Social I was lucky enough to have been asked out to Boston for Remix 07 Boston. After receiving the necessary flack from my co-workers at Slide (primarily a Python/Linux shop), I boarded a plane late Sunday night to arrive extremely early on Monday morning (6a.m. isn't my best hour).

Upon arrival to the Hyatt Regency Cambridge, I found out that I had access to the Media Room, which allowed me to recharge my laptop and plug into a hard-wired connection such that I was able to write up a few blog posts from the conference itself. Having such access also allowed me to work on some sample Silverlight applications that I'll write up over the weekend covering Silverlight and IronPython.

While I enjoyed the sessions, such as Miguel's session on Moonlight and Mono and another session on the DLR and dynamic languages, what I enjoyed most was the ability to pick the brains of some of the folks there. Specifically guys like Aaron Brethorst, who works a lot on Microsoft Popfly's interface among other things, who let me question just about everything under the sun with regards to Popfly while still maintaining that I really like the application and its potential.

I also really enjoyed meeting up with Miguel and his crew at Novell (Aaron Bockover and Michael Hutchinson) after Miguel was kind enough to take me to a late lunch and then show me around Novell's Boston office. I also think Miguel successfully guilted me into contributing more code that I've been putting off for so long, like my Mono.Nat NAT-PMP code, Mono.Facebook.Platform, and some patches for System.Web.Script.Serialization; all of which I have neglected in the difficult search for a good night's rest, or the perfect ping-pong serve against co-workers.

I still look and feel mostly dead from exhaustion, but not dead enough not to continue pounding away on everybody's favorite Facebook app, or working on some of the other really cool things that we work on here at Slide (bubble text!). In the valley, everybody knows who Slide is now, everybody knows what's going on with Facebook, and an extremely small subset of people that matter know who I am; but on the east coast, far fewer understand what's going on right now on "that college social network, right?"

Miguel said he doesn't install Facebook applications citing the near-complete opacity of the security and data-storage policy to the end-user, but maybe now that he's met me, and knows who's behind it, he'll install Top Friends and I'll finally be able to claim that Miguel uses something that I wrote, instead of the usual case of vice versa.

Note to self: Travel back to Boston, soon.
Read more →

Miguel de Icaza's Remix 07 Boston Keynote Address

Before I leave Boston, I had to make sure of one more thing, that my fellow Mono bretheren got to see what I got to see, Miguel's keynote. Thanks to lots of hard encoding and video preparation done by G. Andrew Duthie and his crew from Microsoft's Media Room at Remix 07 Boston, the videos from the keynote have already been posted in their entirety to Channel 9.

Unfortunately they didn't clip the videos on a per-speaker basis, so you'll probably want to fast-forward in the video to about the 11 minute marker to watch our fearless leader question the manhood of 400 Microsoft developers as I had previously mentioned. Talking with Miguel after the fact he mentioned that some of his more witty quips were mostly due to him worrying about things breaking on stage and going impromptu with some of the things he was talking about. Overall though I think Miguel did a great job exhibiting Moonlight and the Gnome desktop in general, so I hope you enjoy the video (again, fast-forward to the 11 minute marker).

Watch Miguel on stage at Remix 07 Boston (direct link)
(Download VLC to watch on Linux/Mac OS X)
Read more →