Monday, January 04, 2010

Ubuntu makes you a software snob.

(update: some dude addresses my concerns about GetDeb here.)

Seriously.

After having used Ubuntu on both my netbook for almost a year now, it's turned me into a total software snob.

For instance, right now, at this very moment, I'm not installing Songbird. Now, there are plenty of ways to get Songbird on my netbook. But none of them are good enough.

Why?

There are no official debs. There are no official repositories. If you download Songbird from the official site, all you get is an archive. Which is fine if you want to unpack it by hand, fiddle with making a desktop short-cut and a menu entry by hand, as well as spending the time to find an OK-looking Songbird icon for the aforementioned short-cuts.

What? Excuse me?

Seriously, those are the two things that instantly came to mind when I realized that Songbird's official download was a freakin' archive file.

The fact that it wasn't available in the Ubuntu repositories wasn't all that bad: there's lots of software out there not in it, simply because there's so much software out there, period. But they don't even have their own official repository? Is Songbird so good that I'm supposed to do the download-and-extract dance every time a new release comes out?

Shit, I don't even do that with most Windows software -- I've got this copy of PowerArchiver that's almost 3 years old. I get an update alert every time I open it, but I'm not going out of my way to download and install a new copy of it. Sheesh.

There's GetDeb, but I'm not using it yet. I've got questions that the GetDeb site doesn't have answers for: who runs it? What releases do they package? Are program authors involved in any way? Are the programs modified before they land in the repository? As an issue of trust, I'm more willing to add repositories like Banshee's official PPA to Software Sources over a third-party I know nothing about.

So, yeah. No Songbird for me.

I know that in the time I've written this blog post I probably could have struggled to get Songbird integrated with Ubuntu properly... but that would still leave me with the issue of updating by hand. Something I consider especially annoying in an environment as advanced as Ubuntu.

On the upside, Songbird screenshots were pretty to look at, though.

Saturday, December 05, 2009

Rails source control: to check in db/schema.rb or not? ... Don't do it.

UPDATE:

Ignore everything below. A lot has changed since this blog post was written, and there are better / easier ways to sync up your schema.rb now than their were in 2009. And when in doubt, just run `rake db:schema:dump` when you get merge conflicts.

ORIGINAL:

The only argument for checking in schema.rb is that it's "faster."

Yeah, OK, whatever.

Don't check it into source control. It just leads to local development problems in the future, and possible production problems if you don't have CI, because cap deploy:migrations is going to run Rails migrations that might be broken because everyone primed the database using rake db:schema:load instead of rake db:migrations. Oh boy, does that sound like fun to you? Because it doesn't sound like fun to me.

Local development problems: consider Git, where everyone's got multiple branches. Someone's done some work in master, checked in their changed db/schema.rb. But oops, you've done some migration work too, and so now your db/schema.rb conflicts with the master db/schema.rb, and how do you end up resolving it? By nuking db/schema.rb and then running the new migrations to regenerate the file.

Which is an extra, unnecessary step because db/schema.rb is in source control.

Hurray.

Let's just keep db/schema.rb out of source control and save the 5 minutes.

Friday, October 09, 2009

How to hose a Rubygems in one simple step.

So, I had the unfortunate mispleasure of having to quickly solve The Mystery of the Hosed Rubygems Installation after installing 1 gem.

Apparently, the problem was with that gem's .gemspec file, in which the following line:

s.require_paths = %q{"lib"}

was the culprit. That one little caused the entire rubygems system to fail -- require failed, the `gem` command failed; basically everything related to Rubygems failed in one spectacular burst of flame.

The solution of course was to change it to

s.require_paths = ["lib"]

The problem being, Rubygems expects Gem::Specification#require_paths to always be an array, and, not bothering to check otherwise, tries to call Array#join. Apparently exceptions raised when parsing a gem's specification aren't caught anywhere in the system, so it hoses the whole thing top to bottom.

Saturday, August 29, 2009

jQuery.Form and its AJAX file upload gotchas.

Hit a few "gotcha, motherfucker!" moments with jQuery.Form while doing AJAX file uploads:

  • If you return an HTTP error, don't return any text (such as error details) -- it'll be interpreted as a successful call and won't handle your error callback.
  • If you return an HTTP error, don't reply on xhr.status from the error callback -- it'll be an unhelpful 0 for some reason.

Alternatives suck: returning an error code and checking to see what kind of data got returned from the call (is it an 'error' object or a model object?).

Wednesday, June 10, 2009

Argh, ShareThis!

Despite it's importance, this problem with ShareThis is almost totally undocumented: if you run your webserver locally and access it via "localhost"then the ShareThis widget won't work. You have to access it by an IP instead (127.0.0.1).

So if you get "SHARETHIS is null," "SHARETHIS is undefined," or "SHARETHIS is not defined," instead of spending an hour and a half pulling your hair out, just breathe deep and remember, there are still people out there who put all their code in a monotholic try/catch and fail silently.

Thursday, April 23, 2009

Arron on...

Arron Washington on Twitter.

Arron Washington on a mostly abandoned identi.ca account.

Arron Washington on a definitely abandoned Plurk account.

I seem to be turning into one of those people that collect social networks like rare Indian coins.

Friday, April 03, 2009

Busy busy!

Good Lord, I've been busy all month long and it's only getting worse.

Hell, I totally forgot that I had yet to do my taxes until I got some kind of automated email reminder today.

Have. Got. To. Keep. Going!

Wednesday, April 01, 2009

How much did I make from oDesk in 2008?

I recently tweeted that I made most of last year's income from oDesk.com.

Well, according to my accounting, from oDesk alone I made just shy of $40,000 last year.

That's pretty good, considering I took a short break, and when I got back into the swing of things I decided to only work about 20/hrs a week (sometimes more, depending on client need). It helps that I get more things done in 20hrs/wk than some people do for 40hrs/wk, though. :)

Obviously I could have made way more.

But besides being a valuable income stream, oDesk has given me something much more valuable than that: freedom. Freedom to work my own hours, sure, but more importantly, freedom to do what I want. And what I've always wanted to do is be an author. Yes, that's right, Mr. Computer Programmer wants to be Mr. Writer.

Since I started freelancing, I've never really had the time until recently to unlock all the thoughts bouncing around in my head and unleash them on the world. When I was in college, there were huge gaps between classes that I filled with anime, video games, writing and code. But when I started freelancing, an incessant nagging in the back of my head ('money! money! money!') kept driving me to spend all my free time thinking about work, working on work.

My free time became a narrow slot that I could only fill with one thing. Should I play a video game? Read a book, watch an anime, rent a DVD or write? My free time was so thin I felt like I'd cut myself if I wasn't careful with how I used it.

When a long term contract on oDesk ended in 2008, I was between jobs with nothing much to do. So I wrote a little as I browsed for jobs; I had enough in my savings account to skate by for months without work, if I wanted. I went back and revisited old works, frowned at how bad they were and toyed with them in my spare time. I kept peeking at job openings, but my A-game was absent when trying to land a few big, "easy" jobs.

Then I realized something: with my skills and expertises, I didn't have to spend every waking moment working. After all, people always need something done. 

So I said to myself, "Why not split my time between writing and work?"

So I did.

Because with oDesk, I could, and with oDesk, it was simple: apply to jobs that would take less than 20 hours a week. That's it. There are thousands of those jobs on oDesk -- maybe even tens of thousands. When one job ended, there was no mad scramble looking for new work. The market place there is huge. If you have talent then you've got a job waiting there for you. And me? I've got it up to HERE, baby. I made a hand symbol just now; you know, the hand at the neck thing to convey how much of IT I've got.

So, thanks to oDesk I can continue to spend time making kick-ass web stuff for clients, and use the rest to pull out my hair out over my insecurities about my writing or smashing my head against the wall because of writer's block or whatever weird thing it is that week that makes me think that every word spilled from my fingertips is crap.

But hey, that's freedom for you.

Thursday, March 26, 2009

Legal retainers: you never know how valuable they are until you have to use them.

To quote the title, "Legal retainers: you never know how valuable they are until you have to use them."

Seriously. For an LLC, it's much more cheaper and efficient then lugging around an attorney who just chills out all day until he has to write up a contract of some kind.

Tuesday, March 24, 2009

Slow going in the fjord of his mind.

If you look at my Spiced Incese Warehouse post below you'll notice that it has a few comments, probably by the owner or a shill perhaps. 

There are some deleted ones: two were posting someone's phone #, address, etc, and two that were just pure spam. Well, not pure spam. If you've been around the 'net long enough you'll occasionally find people who are essentially being paid by the hour to 'attack' a site in an attempt to render it unusuable. It never works, of course, but it's still kinda funny to watch.

Anyway, it's a classic case of not knowing how the Internet works. By commenting repeatedly and shilling in an attempt to sweep whatever under the covers, I don't think he's realized that he's raising the popularity of the articles in question. The blog post, for instance, fell off the front page for awhile, then suddenly found itself ranked 4th or 5th for the search term "spiced incense warehouse." It'll probably outrank his site in a few days if he keeps up the pressure -- I'm not sure if that's good or bad. Good in the sense that it would be hilarious, primarily because he did it to himself, and bad because then my blog post turns into one of those little battlegrounds where everyone with a keyboard converges and argues -- same thing happened with my 'oDesk vs RentACoder' review, which I won't link to since its mostly obsolete and I haven't tried RentACoder in forever.

Plus, I think he underestimates the intelligence of his potential customers. I showed some non-tech friends the original blog post and the comments, and they totally lol'd their eyes out (or so they assured me).

So, it made my ask myself, you know, what exactly is going on in this guy's mind? Is there some part in the back that tells him that making a fool of himself is the best course of action? Or, does he think he's not making a fool of himself at all?

I sat down and thought about it for awhile -- I had just finished playing two crappy rounds of Halo Wars and didn't have much else to do until She Who Is Unknown returned, so, you know, why not? After a bit I came to the conclusion that he's one of those types who gets red in the face and acts irrationally without thinking. That probably explains the sudden quiet-time that occured while I was waiting to be served (which apparently isn't going to happen).  I've never worked a salaried job in my life, so I've never had the great misfortune to be exposed to those kinds of people, but I've read about them and of course I've had the usual antecdotal "you wouldn't BELIEVE what this bossy motherfucker did today!" story from friends.

On the plus side, his annoying behavior spurred me to change the way pages are cached on FearlessBlogging, which is neither fearless nor, technically, blogging. I actually had an entirely different concept for the site, but then realized it would be redundant and more-or-less worthless in the grand scheme of things.

The caching changes I made were to localize all of my caching logic in a cache sweeper. Oh god, I know what you're thinking, and no. Caching was implemented initially as a *very* quick (talking, 15 minutes) hack, which involved a lot of cut-and-pasting of code everywhere. Things got messy fast, and as a result somewhere along the lines, during a random site upgrade / bugfix, I broke the admin panel. I could mark posts as disabled, but particular portions of the cache wouldn't refresh, so they'd show up in the sidebar but still be unviewable. Yeah. Stupid, I know.

I also re-learned one important thing that I forgot: Never. Use. Page. Caching. In Rails. Ever. That shit causes boatloads of problems. Page-level caching in Rails is the goddamn devil. And there's no easy way to clean the cache, either, except to "manually" remove the files, as far as I know.

The moral of the story?

That stories don't have to have morals to be stories.

(oooh, yes I did just go there).

Thursday, March 19, 2009

Hotmail login doesn't do HTTPS by default. ^.^?!

So, I almost never use my Hotmail or Y!Mail accounts anymore.

Too much spam, obviously.

So, today, I did my monthly email check. Nothing but spam in the both of them.

But I did notice something funny.

Logging into Yahoo! Mail took me to an SSL protected page, where-as logging into Hotmail took me to a regular HTTP page.

Now, I was extra concious of where I was on the web because this morning my Mom got scammed; she followed one of those 'reset your password' emails and lost a couple hundred dollars from her Paypal account.

So I gave her a 20 minute lecture (again) on not following those links. Frankly, she got off real lucky -- as far as I know he only took money from her account, and not a lot at that. The scammer could have done way worse.

So, after my high-and-mighty lecture, I notice that Hotmail doesn't do HTTPS by default. I totally lawl'd.

I've become used to seeing the SSL certificate in the browser bar as a way of verifying I'm where I meant to be, even though that's not exactly what it means. So I found Hotmail's lack of security on the login landing page very... unusual.

That's the end of this blog post!

Sunday, March 15, 2009

Games I've been playing.

About a week ago, I purchased both Halo Wars and Tom Clancy's HAWX.

I purchased HAWX, an action-intense fighter-pilot game, because when I played the demo level, "Glass Hammer," I immediately thought back to Ace Combat 6 and, of course, Garuda team. I nabbed Halo Wars because the first two demo levels were OK and I thought it'd be an average RTS game I could stomach.

As it turns out, my expectations were completely fucked: Tom Clancy's HAWX was a total chore to get through once, and gut-wrenchingly boring the 2nd time around on "Elite." CO-OP mode is a little better: the missions are harder, and if everyone is playing on Elite mode some missions can be pretty fun (as long as everyone is playing with a headset). However, the game is full of more misses than missiles in the air (ha hah, why does a fighter plan have 82 missiles?!-style joke!). 

The storyline is a total mess, from its incredibly implausible premise, to its jerky storytelling method of hopping around the entire planet (planet meaning the United States and Tokyo). I'm going to get some hate for me ripping on the storyline while loving Ace Combat 6, but there's a big difference here, I'd like to think, and that is that Ace Combat 6 goes full-throttle into fantasy land, with its giant flying fortresses and city-sized rail-guns. HAWX clearly went for a super-realistic takes-place-in-the-near-future feel, going for a gritty story of nuclear threats with the overarching theme of capitalism taken to the extreme. Unfortunately the actual execution of the story is bullshit. Yes, bullshit. Go watch a friend play it if you really want to experience the roller-coaster of suck for yourself.

The game itself suffers from weapon-itus, meaning there are a ton of starter planes you use once, because the mission forces you to, and then never again; missions that DEMAND you bring a free-fall bomb, even though you can just as easily use multi-target air-to-ground missiles to do the same thing; missions that are incredibly easy but gimmicking -- one in particular involves having to aim your plane at a radar signal while flying through radar net gaps so large you could drive a fleet of trucks through, yet somehow bomber planes can't manage that themselves.

Oh, and then there's: bad scripting (I've inadvertantly broken several levels by destroying all the enemies before I was supposed to insert eye-roll here), bad dialogue (THE NUCLEAR MISSILE WILL GO OFF IN MINUTES CRENSHAW!!!!!!, WE HAVE ONLY MINUTES UNTIL THE INVASION ARRIVES CRENSHAW!!!!, BACKUP WILL BE HERE IN ONLY MINUTES CRENSHAW !!!, MY HOT POCKET WILL BE FINISHED IN ONLY MINUTES, CRENSHAW!!!), and an extremely annoying AWACs who announces EVERYTHING to you. If you miss with a rocket pod attack -- even one rocket -- you get to hear, "You missed the target!" even though that's on my fucking HUD and I clearly knew that by the lack of exploding enemies on the ground.

Did I mention the super anti-climatic finale levels? One of which is really just an interactive epilogue and a total waste of 10 minutes?

Ugh. Anyway.

As it turns out, the best mission of the game was the one in the demo: Glass Hammer.

Now, Halo Wars...

Halo Wars!

I'm no fanboy, and I wasn't even sure this was going to be a good game, since the first two levels are pretty much a snore-fest, but right after that the action and pacing starts to pick up. The controls are quick to learn, the gameplay challenging but not "goddamn cheating-computer!"-challenging, and the game itself is just genuinely fun. The cut-scenes are just long enough to tell a bit of story but not so long that you get bored watching them.

Even losing a mission and having to restart from the beginning is a pleasant experience: overall missions are about 30 minutes long, and the gameplay and strategies you can use are varied enough that it is actually kind of fun to lose, since it means you can try another technique. 

There's built-in CO-OP for all the levels, I think. Haven't gotten there yet -- just finished the campaign, but I'll definitely have to try... there's no way I'm going to save the citizens of Arcadia City all by myself.

The story is fairly solid, told with ingame communications and cut-scenes, typical gaming fair. There's nothing particularly epic about the story; it's just there to support the gameplay, which it does very nicely. There are a few unexplained WTFs at the end which I won't mention because of spoilers.

Multiplayer can be hit or miss, depending on the mode. 1v1 is good, 2v2 or 3v3 can either be excellent or horrible. This is entirely dependent on the people you're playing with: I got a good team going my first few games, so we stuck together and decimated the enemy with good teamwork and communication. The next matches a few days later ended terribly. Players not communicating, some of them not even really playing "right" (new players, clearly). As this is an RTS, there's no solution to an AFK or non-responsive team-mate: you're going to lose, plan and simple. 2v2 lessens the odds of you having a doofus on your team, but doesn't quite have the huge epic battles that 3v3 brings to your door.

Still, multiplayer can be pretty sweet when it's all workin' right.

All in all, a very enjoyable game.

* * *

Also, have you ever wondered what would happen if a Blue Whale ate you?

Don't. It's a weird thought to have.

Friday, February 20, 2009

Oooh, Discover pisses me off.

I applied for a Discover debt consolidation loan about two weeks ago after reading one of their pre-qualified pamphlets that you get in the mail. "You're a winner now!" sorta bullshit. The only reason I went for it is because the rates were actually really nice in comparison to most of the crap I get in the mail. I've recently had some dental surgery that I've put on my credit cards and they've been gathering interest like dust bunnies ever since, so this seemed like a good way to consolidate both cards.

Easy, right? I'm pre-approved, right? Oh, I bet you know where this is going.

This is the first time since I've become self-employed that I actually got a rejection letter from a bank / credit card company. And the reasons, GOD THE REASONS, it's like someone accidently stamped 'UNAPPROVED' instead of 'APPROVED' and made up some reasons in a panic.

One of them was "excessive number of non installement/finance inquiries" which is the apparent result of Discover keep checking my credit report way too often, since this is the first time in about 9 months I've actually signed up for something credit / finance related.

I also got "too many revolving accounts," and "utilization on revolving accounts too high," which is fantastic, since I only have 3 credit cards; 1 card empty, and the other 2 with, together, a grand total of... $8,000. (dental surgery is _expensive_ when you don't have insurance).

By the way, I have a credit score of 700. I've been told that's not awful.

All together, car note included, I have about $15,000 worth of debt, maybe a little more (netflix + fastfood addiction). Man, you know the economy is in the shitter when a bank considers that too much debt.

Monday, February 16, 2009

When will Mobile Browsers be the new Mobile API?

As a forward, let me talk about the Palm Pre for a few minutes. Alternatively, you can just read that article I just linked to then skip a couple paragraphs.

The Palm Pre is heralded by some as the second coming of Palm. What makes this phone stand out the most is the fact that its operating system is essentially a web-browser that talks to the hardware underneath. It's user interface is HTML/CSS/JavaScript, built on standards blah blah blah. The thrust of it means that writing a Palm Pre app is as simple (or complex) as writing a webpage. For regular end users, this is probably meaningless; all that matters is that the phone looks good and moves quickly. For developers, however, it opens up a new realm of app-developing whup-ass. By making web-apps easier to create, the Palm Pre is enabling developers to make more apps with better quality for less investment.

Pretty much every developer, and several people who have no idea what they're doing, has a good grasp of HTML/CSS/JavaScript. This means that anyone can immediately dip their feet into Palm Pre and start developing. Ease of development is what made the Web explode, and the same potential is lying in wait for the Palm Pre.

So, when will Mobile Browsers be the new Mobile API?

The Palm Pre is very much a step in that direction: you talk to the Palm Pre OS using its JavaScript libraries, and you markup the application's user interface using HTML/CSS. There's only one catch: the application has to be installed first.

Why?

Why can't I, Arron Washington, Destroyer of Worlds and Small Celestial Bodies, visit http://maps.example.com, be prompted by the phone ("Hey Mr. World Smasher, this website would like to access your phone's GPS!"), and then have all the tight integration you would come to expect with an application on any website the Web cares to offer?

Imagine the potential awesomeness of that, being able to access a phone's features via JavaScript in a regular web page. You go to Google Maps Mobile, it asks for GPS access, you grant it, and voila': a whole new subset of features are available just for you, without having to download the app and update it every time a new release comes out.

With this kind of available integration, anyone can make their website "mobile enhanced" just by calling the phone's custom JavaScript libraries. With simple (DEAD SIMPLE) JavaScript integration, something as simple as a coupon site could deliver location-aware opportunities (sales in progress, 30% off!, etc) without having to make an application for every popular phone. Just point your browser at the site, authorize and it's there, all magically delicious 'n' shiznit.

Now, some privacy nuts will tell you, "Hey man, what happens if I enable a site to use my GPS to find my location? That's an invasion of my privacy!" I'll tell those folks, don't get in a boat with cannibals.

I think with the Palm Pre we're inching just a little bit closer to that. The whole awesome website-phone integration thing, not the boat full of cannibals thing.

Saturday, January 31, 2009

can_has_assets? A new Rails plugin for requiring stylesheets and javascript in views.

I sat down and scratched an itch I've had ever since I started developing Rails plugins: finding a way to require javascript / stylesheets on a per-view basis.

There's Needy Controllers, but that operates in your controllers, and me, being me, wanted to require the CSS and JS from the view, since I'm already hooked on the whole
<%= title "hello world" %>
in views idiom. (view-specific logic in views, basically)

So, I built can_has_assets as a way to scratch my itch. The master branch is currently acting as stable, and since the plugin is so simple, it probably won't be updated very often (or at all). Feel free to push if you do something interesting with it though.

Anyway, straight from the README:


CanHasAssets
============

can_has_assets is a super-simple way of requiring stylesheets and javascript files
from within views. It also supports inserting snippets of CSS and Javascript into
a page only once. Snippet support should really only be used for rapid prototyping,
though. :)

Installation
------------

script/plugin install git://github.com/radicaled/can_has_assets.git

Notes
-----

can_has_* will include a file or snippet only once -- it is safe to call these
methods multiple times, where-ever required.

Alternatives
------------

If you're looking for more control, consider Needy Controllers by Michael Bleigh:

http://github.com/mbleigh/needy-controllers/tree


Example
=======

In your layout:

<%= stylesheet_link_tag :can_has_assets %>
<%= javascript_include_tag :can_has_assets %>

In your views:

CSS
---
<% can_has_css 'css_file' %>

<% can_has_css :sample_snippet do %>
.item {
/* some fake example css here */
}

Javascript
----------
<% can_has_js 'js_file' %>

<% can_has_js :sample_snippet do %>
function helloWorld() {
alert("Hello, world!");
}
<% end %>

Thursday, January 29, 2009

Discipline + Git = good awesome funtime!

(inflammatory rant about some Git users follows)

Git is awesome. If you haven't tried it yet, you should use it for your next non-critical project. Even if you're trapped using Subversion at work, the git-svn bridge will get you by and no one will be the wiser.

Just remember one very, very important thing: Git is not The End All.

I say this because I've noticed that some people, after migrating to Git (or Github), completely lose all discipline.

No branches.

No tags.

For these people, there is nothing but The Master Branch (dramatic thunderstrike!). There is no stable or unstable; there is only the master branch and its whimsical nature. Will the project work today? Will it work tomorrow? Did it even work yesterday? Who knows.

Here's a hint that you've gone horribly awry: if people need to track down the latest "stable" commit you made to the master branch by checking the timestamp on your announcement via Twitter about it, then you've royally fucked up and need to re-evaluate.

Rant over, as abruptly as it began.

Tuesday, January 27, 2009

Tag Aliases: get them, people.

This has been on my mind ever since I made this identi.ca notice:

# vs # -- AKA, "Why Tag Aliases are needed in every tagging system."


You'll notice that Rails and RubyOnRails are two seperate tags -- even though they both reference the same topic. This almost inevitably comes up when you're dealing with a tagging system where individuals supply the tags in question. Is it #sn or #socialnetworking? #rails or #rubyonrails?

The first time I saw tag aliases in the wild, they were on an imageboard for porn. Yes, all innovations have their roots in porn. Porn is the great innovator! All hail porn!

Tag aliases evolved out of necessity in the world of web 2.0 pornography: when dealing with certain topics, say fetishes for example, there are often two ways to reference the same topic: the technical nomenclamature, and the common name. So, what do you tag it under? Both, of course. Under the hood, the system tags these tag aliases together and presents one uniform tag, which can the technical tag, the common-name tag, or both (for usability).

As I've demonstrated, tag aliases are useful for more than porn. When you're dealing with microblogging, for instance, do you want to use a short name, for space, or a long name, for usability / readability? Without tag aliases the community really has to decide on one or the other. With tag aliases, it's just a matter of personal preference -- you may not want to use the shorter version of a tag if you have a readership unfamiliar with the topic at hand, for example.

So why the hell do I only see tag aliases on random pr0n imageboards and not where they're needed in other portions of the web 2.0 space? It might be a matter of mechanics. Who gets to decide what tags are aliased, where? Is it a Wiki-like system, or a trust-based system like StackOverflow?

...

...

...

That is all.

Mozilla Ubiquity: Metacritic Script

I developed this rarely used script to search Metacritic way back when, as my first Ubiquity script. Ever since I got it working I just kinda left it there. It's a total hack and it'll break when they change the way the page renders, but you, dear viewer, might find it useful.

Yes, Mozilla Ubiquity does rock. However, having no API to your site does not rock. It is the exact opposite of rock, in fact!


function __searchMetaCritic(pblock, searchText) {
jQuery.get("http://www.metacritic.com/search/process?sb=0&tfs=all&ty=3&x=0&y=0&ts=" + escape(searchText),
function(response) {
var resultsREGXP = /\[0-9]\.(.*)\<\/p\>/gmi;
var results = response.match(resultsREGXP);
found = true;

if (results == null) {
var msg = 'No results for "${what}"';
var subs = {what: searchText};

pblock.innerHTML = CmdUtils.renderTemplate( msg, subs );
return;
}
var tempElement = CmdUtils.getHiddenWindow().document.createElementNS("http://www.w3.org/1999/xhtml", "div");

tempElement.innerHtml = '<link href="http://www.metacritic.com/general.css" rel="stylesheet" type="text/css">';
tempElement.innerHtml = tempElement.innerHtml + results.join('');

var msg = 'Searching for "${what}"
${results}';
var subs = {what: searchText, results: tempElement.innerHtml};

pblock.innerHTML = CmdUtils.renderTemplate( msg, subs );
});

}

CmdUtils.CreateCommand({
name: "metacritic",
takes: {"what": noun_arb_text},
preview: function(pblock, what) {
__searchMetaCritic(pblock, what.text);
var msg = 'Searching for "${what}"';
var subs = {what: what.text};

pblock.innerHTML = CmdUtils.renderTemplate( msg, subs );

},
execute: function(what) { __searchMetaCritic(what); }
});

Saturday, January 24, 2009

My moment of revenge against L4D exploiters. :)

Left 4 Dead is Valve's newest zombie survival horror game. Everyone loves it. People that don't are lying and really zombies in meatmasks.

Anyway, the game's got some issues due to its physics engine -- the most notable issue is in the Versus mode where it's possibly for enemy zombies to intentionally block paths, making it impossible for the zombie survivors to move forward. It's an exploit, and beyond that it's a stupid thing to do.

So today I had the great fortune of joining a team that was blocking the sewer hole on No Mercy 2 like a buncha douches... except, just as I was about to leave, I spawned as the car-throwing Tank right next to my exploiting team-mates.

I'll let you figure out what happened next. >:)

Monday, January 19, 2009

I don't want to talk to you if I need to sign up for something new to do it.

I've been getting real lazy about communicating with people on the Web. There are some things I just don't do anymore, for no other reason than I just don't have the patience.

Like, take this post from the OpenMicroBlogging mailing list. It's about OMB Spec 0.2. When I read it, I instantly had questions about #3, HTML-rendered notice content. A: what the hell does that mean, and B: won't that lock-in OMB consumers to a particular implementation of @ replies and # tags?

Yet, I just can't bring myself to sign up for the mailing list to ask. I don't want to mess with another account on another site for something so trivial. I just don't have it in me anymore. I've even started designing my own small sites to accept OpenID or whatever else I can get my hands on to avoid making a unique account for myself.

I guess I'm all username/password'd out.

As for OMB -- no link, can't find a portal site for it -- my interest is easy integration of microblogging into client sites. In my mind, if a client breeds a community site, integrate microblogging as a communication stream, and expose it via OMB so they can "reach out" as a community into the Web. It's still a big foggy in my mental about it. For now I've just been watching its progress in case a relevant scenario pops up.

Friday, January 16, 2009

Monetizing Yahoo! BOSS.

This isn't a post about how to make money using Yahoo! BOSS; rather, it's just a link to the current policy of monetizing Yahoo! BOSS through third-party methods (Google Adsense, basically). I'm posting it mostly because I looked for this information for a long time when I had the opportunity to use BOSS, but couldn't find it, so had to opt for a customized site search instead.

Excerpted from this post about third-party monetization with Yahoo! BOSS:

Our current policy is, while we do not prevent you from implementing a third party monetization method in conjunction with your use of BOSS, we may at any time require you, for example, to implement and display Yahoo!'s Sponsored Search (or similar) advertising offering instead of a third party's. Alternatively, we are considering the option to pay a fee based on your use of the service; in this case, we would anticipate permitting the continued use of monetization methods from third parties.
Basically, Yahoo! reserves the right to fuck you up: any time, any place.

For small niche-like sites this is probably OK; they wouldn't bother trying to get any cheddar from you. If you run something moderately successful powered by BOSS you might have problems in the future.

I don't have a problem with having to display YPN ads or whatever. The real problem is not being able to support third-party monetization efforts. For instance, if you're running a site that makes good bread with CPA ads / Amazon affiliate links, removing those and replacing them with lesser YPN ads is a kick in your junk. What do you do then? Try to manage direct sales?

Something to think about.

Friday, January 09, 2009

The Microsoft Tag site...

...doesn't work in Firefox.

Even though it's powered by Silverlight, which means it should function identically in anything that runs Silverlight.

Seriously.

Visit http://www.microsoft.com/tag/ and try to click on 'Get it for your phone' or 'Make a tag' -- it Just Doesn't Work.

That is such a cold, cold burn.

Tuesday, January 06, 2009

Need design ideas? Surf Wordpress blogs.

I'm a terrible designer. As one of those people who can't close their eyes and imagine with clarity The Perfect Design, I'm forced to rely on other people who don't suck at makin' things pretty and useable.

One of the best resources I've found so far are Wordpress blogs. Some Wordpress blogs have the most ridiculously beautiful themes you will ever find. For instance, following a link from Hacker News got me to some dude's post about "Encouraged Commentary." Excellent ideas aside, the first thing that struck me was that his blog was freakin' beautiful. I mean, look at it. It is aesthetically pleasing and functional, to boot. Hell, look at what he does to images -- they're faded out until you roll over one, at which point the image becomes crisp and the caption pops up.

Another resource is the official Wordpress Themes site. Some gems hidden away in there.

I'm not saying steal these themes or anything -- far from it. But they can provide a jumping off point for the uncreative types to work with. For a certain site, I started with a pretty nice Wordpress theme and then modified it so much it looked nothing like the original... but without the original, I wouldn't have gotten even half as far as I did. It helps that most of the themes on the Wordpress site are liscensed liberally, even though I don't actually look at the underlying CSS. I actually cherry pick certain parts of the designs and incorporate them into one OK-looking site.

It provides enough momentum to get me going, at least.

Sinatra made me go ROOOOAARRRR.

So I wanted to give Sinatra a try today because I had to throw up, quite literally, a one-one dynamic webapp. No tests, no helpers, nothing -- just the one page with some Ruby-powered bits on the backend. The only reason I wanted Sinatra was because I wasn't in the mood to do a massive svn check-in of a vendored rails with the project.

So, sudo gem install sinatra and we're off to the races, right? Wrong. After about 10 minutes of debugging I realize that the Sinatra gem, a) doesn't work with the latest Rack (0.9), and b) seems to be updated infrequently judging by some blog posts I've read. They recommend grabbing Sinatra from github, but there's no stable Git branch available. I don't know if they're using the master branch as the stable branch or what. Doesn't matter, because I don't know what revision of Sinatra works with what copy of Rack. >:(

So I do the next best thing, which is to downgrade Rack to 0.4, which is what the Sinatra gem requires.

Which works. For a bit, until I need to serve up a static html file. I guess that functionality isn't in the Sinatra gem. Some blogs mention how to use the 'public/' directory, which I tried, and failed miserably at; I'm assuming that functionality is somewhere in the github version of Sinatra and not in the gem.

Right around that point I gave up and just cracked out a full-blown Rails project. I copied the logic over, had it up and running in about 7 minutes, which was a stark contrast to the ~2/hrs I spent trying to get Sinatra working.

Lesson?

Next time, just use the latest edge version of Sinatra and hope there are no bugs in it.

This time, I'll just waste two minutes watching the '...'s go by.

Friday, January 02, 2009

My Dirty Programming Secret #424

I develop Ruby on Rails...

...using Ubuntu...

...inside of a virtual machine.

Wednesday, December 31, 2008

Preoptimization in real life.

So yesterday I went down to my local Subway (we actually have 2, but I don't go to one of them because it's a pain traffic-wise), and got in line. I had plenty of time to decide what I wanted; about two minutes since the small family in front of me was taking their time.

No sweat, even though I picked out what I wanted in about 10 seconds.

I spent the rest of the time thinking about how to phrase the sentence,

"I want a foot-long Subway Club on wheat."

But then I thought to myself, "If I say I want a foot long wheat Subway Club," she'll be able to get the sub bread before I finish speaking. Then I realized that, although that sentence is understandable, it is not very "correct." Would she understand immediately, or would it introduce a further delay in my sub making adventure? On the other hand, even if she did understand it immediately, would she even be able to react in time before I finished the sentence? Was the optimization even worth it?

I totally wasn't paying attention by then, so when she said "What do you want?" I kinda jerked in place and replied,

"Uh, a subway club. On wheat. Foot long wheat."

Tuesday, December 30, 2008

Importing OpenOffice files into Google Documents: Don't.

OR: what to do when Google Docs screws up your formatting (see end)
Seriously, don't do it.

First of all, the file upload size is much too small -- there's some ridiculously small cap, like 500kb. I got a document here, 1.1MB -- all text -- that just can't be imported. So now I got some documents in Google Docs, some documents out.

Secondly, and most importantly, Google Docs totally fucks up imported styles. Witness:

Now dude, I love me some Google Docs, but that just isn't fun. The only way to fix it, as far as I can tell, is to just "rewrite" those particular lines all over again. But I've got an entire document full of them and it ain't pretty business.

If I could do it all over again I'd just do a massive C/P job, which seems to preserve the formatting.

Still, it's not enough to make me give up Google Documents, which is excellent. I just hope they keep better backups than I do.

UPDATE:

I've cleverly deduced that for some parts of the document, Google Docs doesn't have a font set -- eg, you click into a paragraph and the 'font' drop-down is empty. If you select all of the document contents and set the font to something like Veranda for the whole document, it seems to correct the graphical glitches. Of course now the document doesn't look quite right, and it's still missing the linebreaks that the original document had, but at least now it's readable -- and, editable.

Saturday, December 27, 2008

Flex file uploads: no custom HTTP headers for you!

Stubbed my toe on this recently.

For some reason (unexplained, and it seems unlikely that this is an actual security issue) you can't have custom HTTP headers for file uploads in Flex 3.2 (possibly Flash as a whole). They state it in the documentation, to their credit, but it's more of an aside, tucked away at the end of an irrelevant paragraph, than a big red "HEY WE JUST CHOPPED OUT SOME FUNCTIONALITY YOU'D NORMALLY EXPECT TO BE THERE" warning.

For half a minute I thought I was in ruby and said to myself, "I'll just override this and inject the custom headers myself," then I realized where I was and went "D'oh!"

Monday, December 22, 2008

Aptana: Changing Ruby Interpreter on a per-project basis?

Anyone know of a way to change the Ruby Interpreter in Aptana for each individual project?

I've been wanting to give it another test drive and see how the latest version compares, but for the life of me I couldn't make this one simple thing happen. I've got multiple projects in both Ruby and jRuby, so not being able to easily switch is a big big pain.

I got as far as the "build path" bits, but I couldn't make those dance the way I wanted so I gave up and went back to NetBeans 6.5. Which works perfectly, but I'm not a fan of the default directory structure. If you use the "files" view instead of "projects" you lose a lot of functionality. :/

EDIT: "why not post on the Aptana forums?"

Because I forgot my username and password. And you can't get your password without supplying your username for some fucked up reason. So, basically I'm locked out of the forums. :)

"The Chrome."

That's what my mother's started calling The Internet ever sinced I set her up with a copy of Chrome.

She says, "Hey, have you been on The Chrome? Why don't you put The Chrome on dad's laptop, too?"

She misses one feature: auto-fill for forms. She found a toolbar somewhere that did it all by herself, and now she really mimsses it.

That and Hotmail support. She is not happy she has to go back to using "the blue one" for Hotmail.

Thursday, December 18, 2008

ThoughtBot Shoulda -- It Whups the RSpec's ass.

Anyone remember that?!

Heh, heh. Yeah, back when people used WinAMP... I guess they still might. I switched to WMP (gawd, I know), but then to Songbird when it finally stopped sucking (still sucks a little, to be honest).

Anyway, for newer Rails projects, I've completely replaced RSpec with Shoulda. It's nice, clean, readable, doesn't add anything extra to the Rails folder hierarchy, and best of all, it is filled with sweet-as-hell macros that take a lot of pressure off'a my tired fingers.

For non-Rails projects (I do those too!), they offer a gem, but I haven't used it yet.

It seems like every day that something exciting and awesome happens in the Ruby / Rails area, and everyone moves up to the next big thing... but I think that's because the next big thing is better than the thing you happen to be using at the moment.

Wednesday, December 17, 2008

SaaS RailsKit: I've hit my first WTF, and I don't think it will be my last.

(an hour in)

WTF #1: the way the database is boot-strapped.
WTF #2: "accounts.full_domain" -- ?! Yay for adding, requiring, and building code around things that not every SaaS app is going to need!
WTF #3: rdoc, motherfuckers. Get some.

Update:

Ugh. This thing was clearly modelled around 37signal-style SaaS. I can probably use most of it and just use dummy values to satisfy the bits that won't be used, but still.

Tuesday, December 16, 2008

"She's dead, Jim."

Awhile ago if you had asked me about free, super-easy Rails hosting, I would have blown your mind by mentioning Heroku -- cloud-based Rails hosting. FREE cloud-based Rails hosting.

Lately, though, I'm not so sure.

Check out the Heroku Google Group. There are a lot of complaints there, and no one from Heroku is talking. Seeing "my website has been down for 4 days," and then seeing another say "mine too" without any response from the Heroku team is enough to put you on edge. But, maybe these issues are getting handled, and they back-and-forth just isn't taking place on the group. If so, maybe Heroku should think about having their own ticket system or something in place, because as it stands now, all the unaswered complaints are casting a bad light on the service as a whole.

All that considered, if you're looking for an extremely easy way to deploy a trivial little app, Heroku might be for you. I've got my own VPS, but lord knows using Heroku would be a lot easier... but I'll wait until they come out of beta for that.

Monday, December 15, 2008

Using jQuery with Dojo?

Can someone come up with a really good reason for me not to use jQuery with Dojo?

Because the way I see it, jquery + jquery-ui is pretty fantastic, so throwing in dojo when I need something a bit more powerful (dojox.gfx anyone?) seems like it could be a good fit.

Dojo seems to keep their stuff locked tight in the "dojo" namespace, so I don't see any collisions happening, but I've given it just a glance.

Saturday, December 13, 2008

Rails Plugin developers: *PLEASE* don't use Prototype's $() syntax in your plugins!

One of the very first things I like to do when starting a project from scratch in Rails is to throw out Prototype and bring in jQuery via jRails. Look, I love me some Rails, but I hate me some Prototype -- it's like someone spilled their goddamn Java over my sparkling Ruby somehow.

Not cool, man.

Anyway, the thrust of this post is about not using Prototype's shorthand syntax when developing plugins that include UI elements. I name no names, but a few plugins take for granted that you'll be using Prototype throughout your project, and so use $() with reckless abandon. That's fine and all except when you're not using Prototype everywhere, and are trying to use jQuery's sweet ass $() shorthand instead.

I realize that jQuery comes with a no-conflict mode for situations like this, but it'd be cooler if plugins kept themselves as abstract as possible, or just stuck to Rails Javascript generating code instead.

Thursday, December 11, 2008

Feeling stuck? Self-loathing? Shoe-gazing?

Think life can't get any worse?

Have a good read through the Black Hat SEO forum.

If you're in a REALLY bad mood, time-travel back to the last time Google nuked a swatch of spammers from their index and read through the complete hysterical narrative.

I mean, I was feeling pretty crappy earlier, but when you read about some guy about to go homeless because Dreamhost busted their account for spamming, well, you know, it puts things in perspective.

I guess if you're a sadist you'll enjoy the fact that most of these people spend 2-3x the effort making 1/3rd the money most people make doing a regular job, but whatever.

Wednesday, December 10, 2008

Flex / Adobe AIR == Ninja / Pirate

I didn't know, until I downloaded Tour De Flex, just how badass this technology was.

Browsing through the sample demos, I realized you could really build a regular desktop application using these technologies. I mean, I've hammered-out plenty of C# applications that could have easily been Flex + Adobe AIR applications if they had been around back then.

And the install badges for AIR applications? It is, literally, out of this world. I haven't seen an install system look and feel so fluid since 3-4 years ago when I was looking at mockups of web-based Linux package installers (Autopackage?).

The big "killer" is the lack of a freely available IDE. Since Flex's MXML can be done by hand, and ActionScript is basically Javascript with a few nice add-ons, you don't really need anything advanced -- a nice text editor can do wonders. But since Flex has to be combiled into a SWF, it makes web-style development harder: kiss the iterative "code, refresh page, repeat" process goodbye.

Still, all in all, it looks like a pretty solid set of technologies, and the development process is fairly similar to web design / programming. Could be an extremely valuable asset to pick up in the future.

Tuesday, December 09, 2008

zomg, are you sure?

Recently heard during development of an API:

"we don't need error codes" (paraphrased).

Thursday, December 04, 2008

Fun experiences with JavaFX.

UPDATE: Yes, I updated to Java 6 Update 10 after #1.

Had a peek at some JavaFX demos earlier -- have been evaluating XUL, Flash, and Silverlight lately, looking for a good, free, easy to target platform for enriching some sites. You know, giving them some *umph*. You know, a richer experience for those who can afford it (someone cue rimshot!).

Here's how JavaFX played out:

  1. Crashed the browser when I visited a JavaFX applet running an older version of Java (1.6 update 7). The *WHOLE* browser. All of it. Thanks, Sun.
  2. Viewing the demos on javafx.com, they all repeatedly bitched about needing to use an "older" version of Java. Hit cancel, dialog pops up again -- FOREVER.
  3. Jarring, incredibly annoying browser-wide freeze for about 6 seconds while Java sloughed itself into memory.
So far, typical Java.

After I got the JavaFX demos up-and-running, they looked OK, but the demos aren't really reassuring.

XUL's a good'un, but that's only for Firefox browsers. However, for an intranet setting, XUL would win out completely. Some Firefox plugins are freaking *awesome* -- and they're all pure XUL + Javascript.

The whole javascript + svg + css + etc combo is in theory great but in reality minor browser differences are a big 'go fuck yourself.'

Silverlight actually looks really good in the respect that it can be driven by JS and written with plain XML, but it's a downer, same as XUL, for people not running Windows and IE7. Yeah, they say there's Mac and Firefox support, but I haven't found a good sample that works aside from Netflix's Instant Viewing (that only ran in Firefox, by the way).

Wednesday, December 03, 2008

Google Friend Connect vs Facebook Connect

Which should you use?
VS MODE

Google Friend Connect is really just a handful of widgets that let viewers have a "presence" on your site. Basically, within these widgets, Google / Yahoo users can talk to each other, discuss articles on the site, share pictures, etc, etc.

This is the solution you want if you're looking to add a "no touch" social networking angle to your site: you just drop in the widget code where you want it to appear, and off you go. The sites using Google Friend Connect right now are pretty lackluster looking; the best integration you'll find is Billboard for The People. This is programming-free social networking at its laziest.

Facebook Connect on the other hand, is for people who really want to dig in deep and have a much more fluid integration story. TechCrunch (see this story) is doing it right -- you can connect your Facebook account to TechCrunch, and never have to enter your name / email / website ever again. You even get the option of publishing your comment to your profile, if you feel it's good enough. There's probably oodles more they could do, but I'm not much of a man for oodles, so I'll pretend I never said that.

Since TechCrunch can perform deep integration using Facebook Connect, when you leave a comment as a Facebook user, the end result is fluid: the only difference anonymous comments and authenticated comments is the Facebook profile picture that shows up. It's got a funny blue 'F' in the lower right corner. Can't miss it.

SHORTER VS

Use Google Friend Connect if you've got a blog or regular static website and just want to slap on some pretty regular social networking features.

Use Facebook Connect if you need or want much better integration with your current site flow.

C'mon, Firefox, what's the deal?

Look, Firefox, I love you, man, but I've been using Chrome recently and the way you compare in speed is just BS.

I mean, I only had two tabs open and you were using 400MB -- WTF?

And, I closed you about 2 minutes ago, and only now has the firefox.exe actually gone away -- although it was fun watching the "memory countdown" so to speak.

Seriously, bro, if Chrome offered even a sliver of the add-ons you did, I might be using it on a more permanent basis.

Thursday, November 20, 2008

Testing file uploads in Rails.

zomg, there are like no Google hits for this. This or 'test file upload in rails.' Whatever. Same deal.

I was doing it "the hard way" earlier, until I stumbled across this while looking for something else entirely...

# fixture_file_upload uses /fixtures as its base directory
post :foo_bar, :file => fixture_file_upload('/files/test_file.txt', 'text/plain', :binary)
Automatically does the multipart stuff, so you can add in extra normal parameters (:user_id => 1, etc).

Wednesday, November 19, 2008

Damn, sometimes I hate software.

I burned like four hours tonight because, when upgrading to Ubuntu 8.10 through VirtualBox, I had somehow hosed my graphics. I mean, really hosed. Imagine someone cuts your monitor into puzzle-shaped pieces, then scatters the pieces everywhere, but somehow the thing still works When you glide your mouse to the edge of a puzzle piece, it suddenly appears on the opposite side of the screen.

Yeah.

That kinda hosed.

The problem was, things were only borked in Ubuntu -- terminal worked fine. So I rage for awhile, make sure I'm running the latest version of VirtualBox, blow away my xorg.conf file repeatedly until I'm sure that's not the problem -- even circumnavigate the globe via the jigsawed Ubuntu to re-install the VirtualBox guest additions, because I totally forgot how to mount cdroms via the command line. >:(

The culprit?

As it turns out, something caught my eye on the settings screen -- the number "9."

"Video memory: 9."

Thinking about it for a moment, I quickly created a new, blank virtual machine to inspect its default settings: identical, except for one area. "Video memory: 8."

Yeah. Guess what started working again once I modified my Ubuntu virtual machine's video memory to 8 megs instead of 9?

It's no surprise my Googling was fraught with much peril and little treasure. I bet practically nobody modifies the video memory setting, much less modifying it to an uneven number. Why does VirtualBox that let you put in uneven values for memory, anyway? Seems like a booby-trap waiting to happen.

I had a backup of the virtual machine from earlier this morning (a literal backup), but damn, I had spent almost 2 hours upgrading Ubuntu to 8.10, and a part of me just didn't want to let it go.

Well, I caught my white whale for this week.

Wednesday, November 12, 2008

Left 4 Dead: Get It Now.

Seriously. Left 4 Dead. Get it now. GET IT RIGHT NOW.

Do you remember, a long time ago, playing games that were fun even when you were losing?

Imagine playing a game like that with 3 other people, with randomized levels so nobody can memorize the pattern and just blow through them without a struggle.

Grab the demo if you still need to be convinced. It's only got one chapter, but I played it for like 6 hours straight. There were enough changes each play through to make it an incredible experience.

Left 4 Dead -- xbox 360
Left 4 Dead -- PC

Sorry ps3 people, ain't no party for you.

Also, it's like 6 bucks off right now, so I'd pull the trigger and use the left-over cash to buy yourself a happy meal or something.

Monday, November 10, 2008

"odesk test answers?" Are you serious?

I just noticed that %5 of my blog visits are for the keywords "odesk test answers" and "odesk + rails + test."

What the hell, man? If you can't pass any of those tests without cheating, I think you need a bit of work to do.

Friday, November 07, 2008

Fable 2 vs Fallout 3: it's all about the choices, baby.

(contains affiliate links.)

Today I just finished Fable II (Fable 2). It's a fantasy adventure where you mold your Hero; good or evil, pure or corrupt -- your morality affects your standing, while your purity affects your physical appearance. At first it seems exciting, the concept of being able to mold your Hero, and through them, the world around you. The game is about choice: do good, do evil, the world shaped through your selfless sacrifices or diabolical deeds.

You're given a lot of choices to make -- some of them drastically alter the world of Albion. If you've played Fable I (Fable 1), you've probably gathered by now that there's an event in the game where a lot of time passes. This time-lapse let's you really get the breadth and weight of your actions. There's only one small problem: you don't really seem to care.

First, the changes that come about from your choices aren't really all that surprising: good intentions, good results. There's no subtly here, and maybe that's intentional, in the sense that Fable II is trying to weave a "traditional" fairy tale where good is good and evil is evil. That's OK.

The second problem is more grievous: you just don't care. For the life of me, I just wasn't able to care about the choices I was forced to make during the game. At first, I played the game as a noble hero, because I was fresh and inspired. Then there came a point where I was simply playing the good guy so that if I played through the game again, as the most dastardly villain the world has ever known, there would at least be fresh results.

In the end, I felt as if I was just sloughing through the game to finish it: I rushed through all good/evil quests, skipping from town-to-town rather than walking there, all so that I could get to the last main event. I'm a completionist in the sense that I wanted to see all the "good" choices, even though most of them were pretty obvious.

Adding insult to injury, after I started the last main event, something happened that immediately made me care, for the first time, about what was going on, and I began to anticipate the next time I would be able to make a "choice." ... Except you're not able to make a choice. You have absolutely no control, and it is maddening, because at that moment, it was all I could think about. It was incredibly frustrating. You'll know what I'm talking about if you've just beaten the game, and if you haven't, you'll know it when you see it.

Anyway, shortly after that, the short fight that followed, and the very anti-climatic ending that was the finale', I was done. I recall reading about new quests that can only be completed once you're done with the main plot, but I just don't care enough about the experience any more to bother. I'll play through it again, of course, 6 months from now or maybe more, for the achievements if nothing else, but it's not something I'm feeling excited about, so I set it aside the minute I was done with it and popped in Fallout 3.

And God, what a difference.

Fallout 3 is a post-apocalyptic RPG by the makers of Oblivion, which was a generic medieval RPG. Unlike Oblivion, however, Fallout 3 is fun. =D

There are choices to be made in Fallout 3, just like Fable II; this game too revolves around the concept of influencing the world around you by your actions, but the choices you make here are more immediate, meaningful, and by no stretch of the word, fun as hell.


During the first hour, the game's introduction, you're introduced to a few characters: the love interest, the leader, the crazy bastard, the friend, the mysterious main plot... you know, the typical stuff. The characters are recognizable and easily related to, you may even get attached if you take your time.

Anyway, as they're setting up the plot, The Friend gets murdered by The Crazy Bastard, by the order of The Leader. You're told this, confidentially, by The Love Interest, who is the daughter of The Leader. She of course says there's nothing you can do, you gotta escape now, before it's too late!

So you're on the move, creeping through the underground vault trying to avoid The Leader and his goons, and you come across The Friend's corpse. And, shortly after, you also come across The Crazy Bastard and The Leader interrogating a frightened young lady. And here, the game gives you a choice: go inside the room, ignoring the fact that there are guards nearby looking for you and will hear any commotion, and make a mess.

So, being me and no one else, I charged into the room, and put two shots in the back of The Crazy Bastard's head before he could do anything. Then I aimed at The Leader, and... paused. Because, for a moment, I wasn't sure what to do. The game was actually going to let me kill him; I knew it the moment the targeting reticule went red. But I knew if I killed him I'd upset The Love Interest.

I realized at that moment the game gave me a very interesting, very personal choice: ruin my relationship with The Love Interest to avenge The Friend, or spare The Leader to spare The Love Interest. I had already killed The Crazy Bastard, but The Leader was complicit in his death. But I asked myself, "Do I really want to risk it? She might never forgive me if I do it."

So I let his old crazy ass run away.

There was no "good" or "evil" choice here. Picking one over the other had no apparent tangible benefits. It was all about how you felt about the situation. Did I want to satisfy the thirst for vengeance and turn The Leader inside out? Did I want to spare him, if only for the sake of The Love Interest, his daughter? Hell, I could've just smacked him around until he was unconcious, but could I resist not finishing him off?

I think, in my opinion, that's where Fable 2 failed and Fallout 3, so far, succeeds: the nature of the choice.

In Fable 2, there's a good choice, and an evil choice, and no matter which you pick, you get a reward of some kind: morality points, purity points, gold or weapons or loot up to your eyebrows.

But in Fallout 3, sometimes the choice has no benefit other than how it makes you feel.

And it makes you feel good.

Thursday, November 06, 2008

IE7 blows.

Sorry, just felt the need to reiterate the obvious since I've got something that works in every browser but IE again.

Yay, IE!

Tuesday, October 21, 2008

"Go dance with the angels old man!"

Ace Combat 6: Fires of Liberation is one of those classic games that make you scream "YES!" "NO!" "You motherfuckers, you'll pay for that!" at your TV. I can't help but get really into it, even after having it for almost a year now.




The story is cliche and the dialogue classically RPG-like in the way it is delivered.

But it's effin' GREAT, man.

Don't bother getting the flight stick, though. No other game uses it. Too expensive.

Saturday, October 18, 2008

Is your site OpenID enabled? If so, don't make me register.

I made my first comment on StackOverflow. It's a site for questions and answers for the developer community at large.

The only thing that compelled me to try (and succeed!) leaving a comment was their OpenID support: I am so done with creating a new user/pass for sites that I only bother with it if I feel I'll be using it a lot. Not so good for drive-by comments and contributions.

However, some OpenID enabled sites demand you register and create a user/pass for that site in addition. I understand why -- account recovery if your OpenID provider vanishes -- but in my mind that negates the the value add-in for OpenID. I wouldn't be using OpenID if I thought my provider was just going to ninja-vanish on me. If stackoverflow.com had done that to me, I probably would have left without bothering. It's just one comment after all, and I only visit the site once every few weeks, max.

Still, nice to know someone gets it.

Friday, October 17, 2008

Does Steve Gilmor come with subtitles?

Does Steve Gilmor come with subtitles?

http://www.techcrunchit.com/author/steve/

Seriously. Homeboy needs to take a deep, deep breather and burn his little black book of euphemisms 'cuz they just ain't working.

I think he's going for some kinda high-brow thing, but, uh, what comes out is generally unreadable.

Does he talk like that in real life?

Tuesday, October 14, 2008

Silverlight 2: still no webcam + mic support.

An alternative workaround that is frequently suggested is using Flash, and pushing the captured data to Silverlight.

In my mind, a better alternative: just use Flash.

Update:

Added bonus -- most Silverlight 2 demos don't work in Firefox, even though the plugin installs fine.

Update 2:

Fantastic -- one of the demos crashed the entire browser. Think I will be avoiding Silverlight for a few versions.

Tuesday, September 23, 2008

Ubiquity Command: urlencode

I just hacked up this quick Ubiquity command because I was cuttin' and pastin' URLs all over the place, and I needed some of them url encoded...

Ubiquity, by the way, is totally sweet.

Run "command editor" and paste the block of Javascript below somewhere in the text field.

That's all you need to do. It auto-saves.


CmdUtils.CreateCommand({
name: "urlencode",
takes: {"what": noun_arb_text},
preview: function(pblock, what) { pblock.innerHTML = CmdUtils.renderTemplate(escape(what.text)) },
execute: function(what) { CmdUtils.setSelection(escape(what.text)); }

Wednesday, September 17, 2008

Jaiku: still in beta. I blame GAE.

(this is a rambling rant about Jaiku and Google App Engine.)
(I'm probably totally, totally wrong.)
(but I like to hear myself talk.)
(er, type.)

If you've heard of Twitter, you've probably heard of Jaiku at some point in your life, then immediately forgot about it when you realized it was invite-only. Or maybe you did some begging for invites, then tried to invite your friends on to the service, only to realize you didn't have enough invites for them all.

Or maybe you were like me and just said, "fuck it, I'm not begging for invites."

Whatever.

Anyway, something -- I'm not sure what it was -- brought Jaiku to my attention again. This is the fourth time it's caught my eye: the first time was when it was announced as a serious, but closed, competitor to Twitter. The second time was when Google bought it, and the world was a twitter with sugary dreams of sweet sweet integration. That, of course, failed to happen, which was a major disappointment. The third time was... fuck, months ago, I think, when they announced their move over to Google App Engine. I'm sure your first thought on hearing that was, "finally, in a few months we'll see how Jaiku does in The Real World."

That, much to your overwhelming surprise I'm sure, also failed to happen.

Jaiku's development team just finished up the port to Google App Engine a month or two ago, according to an official blog post. Well, team? Maybe it's just one guy working really long hours: the public perception of Jaiku's slow development + lack of blog updates makes me wonder if any one person is at the helm of that bad boy, much less a team.

Anyway.

To celebrate this momentous occasion, they... uncapped invites.

Yes.

They uncapped invites. So now you can invite all your friends!

But you can't sign up for an account by your lonesome.

So, I'm going to hit you with a big WTF now: is GAE not scalable?

They did about 6-8 months of development porting Jaiku over to Google App Engine, and yet they're clearly not quite ready to unleash this thing on The Public At Large. Why not? What's the missing piece of the puzzle? Scalability? Wasn't Google App engine built for scalability?

I won't say that Compete is the Definitive Source for information, but take a look at this:



The numbers (you'll see'em if you click through the image) are:

jaiku.com: 98,106
appspot.com: 182,747

I'm going to move with the assumption that Jaiku is the single biggest GAE user. It's convienent for me to do so. (Am I wrong? Man, who knows. I think it's a safe assumption to make, but if you know otherwise let me know.)

So, looking at those paltry numbers (I'd have put Twitter on there, but it TOTALLY fucks up the graph) I have to ask, can GAE scale? I'm really grasping for a reason as to why Jaiku hasn't finally opened its doors for one and all yet. If you mention Jaiku you will inevitably be hit with a deluge of comments in the form of: "goddamn it, it's been X-months/years and they haven't added a single feature / fixed this outstanding bug / stopped sucking!" I think it's reasonable to extrapulate from that either they're "done" with the user experience, for now, or that it's hit the point of "good enough" and at the moment they're not really interested in fucking with it. I mean, it's not really reasonable, but I'm saying it is because I don't want to have to add a bunch of conditionals to every fucking sentance I make here.

They've been bought by Google. They've moved to Google technologies. They're ready, right? Why aren't they opening their doors and screaming "COME GET SOME!" to the Internet at large? Getting ready for a marketing push, maybe? Preparing some ninja-style corporate espionage against Twitter?

Or is the ultimate answer something much simpler? Maybe moving Jaiku over to Google App Engine -- the database-like bits of it, specifically -- has surfaced some critical flaws. Knowing this, they can't just throw open the doors, because the moment they do there will be the usual flood of users going, "Google product? Must have!" It'd be total embarrassment for Google to have the same kind of uptime problems Twitter suffered, you know, what with them being the mighty infallible Google and all.

Saying that GAE can't scale for Jaiku seems like a bit of a stretch, but the architecture of a messaging system (Twitter-like microblogging, etc) is very different from the architecture of a standard website; if you've been following the finally resolved up-and-down saga of Twitter then you're sure to know that by now. Different strokes, different folks, or something punny like that.

Now, we all know that Google's BigTable database (the same database that powers GAE sites) can scale, otherwise Google wouldn't exist as we know it. It scales quite nicely, actually, for it's problem domain. But does it scale well for Jaiku's problem domain: messaging?

Short version: Did Google try to shove the square peg into the round circle and leverage BigTable in a way that can't scale gracefully for Jaiku's messaging needs?

Well, I just got bored writing this, so now's a good time to kill this post:

KUNG-FU CHOP OF DEATH!

Sidenote: Blogger's rich editor totally blows. Someone replace this thing, STAT.

Friday, September 12, 2008

Capistrano + Git: fatal: 'origin': unable to chdir or not a git archive

Getting that error?

Short answer: you fucked up, then Capistrano fucked up right behind you.

SSH into your deploy target, go into shared, and then frag the shared_cache directory.

Then, cap deploy:cold.

Why?

It normally happens when you try to set your repository as a local filesystem path. Capistrano populates shared_cache with an empty Git repo, and then tries to pull in your repository, which it can't reach... but it doesn't frag shared_cache, so the next time Capistrano looks, it's there, and goes, "Hey, we've already built the repository cache, let's just call git fetch and update it!"

Good luck.

Capistrano + Git: Host key verification failed.

Getting 'Host Key verification' failed when you're trying to do this? You might be trying to deploy source in a Git repo, and the Git repo is accessed via SSH.

cap deploy:cold


Do this: ssh into your target machine (the one codes getting deployed on), and then ssh into the Git repo machine -- or just do a 'git clone' if that's not possible. Accept the key, and then you're golden.

Deploying Git over SSH (username, password) with Capistrano

This one bit me.

Hard.

If your Git repo is accessed via SSH using a username and password instead of a public key, you're probably having problems getting it to work. Notably, the password prompt isn't prompting you for your goddamn password.

Do this in your deploy file:

default_run_options[:pty] = true
set :scm_password, Proc.new { Capistrano::CLI.password_prompt "SCM Password: "}


Using Capistrano 2.5.

default_run_topions[:pty] will fuck up your output, but it's necessary for reasons I don't fully grasp and after about 3 hours don't care to.

Friday, August 22, 2008

map.resources + has_one + form_for = surprise, mofo!

If you've got a route like

map.resources :cars, :has_one => :driver


You're probably expecting to use form_for like this:

form_for([@car, @driver])


That won't work. It'll complain about not being able to find the function, 'car_drivers_path' instead of 'car_driver_path'

Fix:

form_for(@driver, :url => car_driver_path(@car))


Hopefully in Rails 2.1.1 this will be fixed using a different, less crazy syntax:

http://rails.lighthouseapp.com/projects/8994/tickets/461-fixed-polymorphic_url-to-be-able-to-handle-singleton-resources

That is all.

Friday, August 08, 2008

The Grind.

Back to working full time again. Let some bills pile up, and now it's time to ninja-fu my way out of them.

I'm angling for some more Rails-based jobs than ASP.NET jobs, which means a slight pay-hit until I can amass a treasure-trove of my RoR proficiencies.

Not that I don't have plenty already that many, but they're mostly firewalled / intranet style. Need some public, grade-A consumer-facing sites to make this happen.

Thursday, July 24, 2008

Winner!

Recently had to decide between Silverlight vs Flash for a project.

Silverlight pros:

* Fast.
* 2.0 would support IronRuby
* Easy
* Already have development tools

Flash & Flex pros:

* Installed everywhere.
* Tons of resources
* Lots of preexisting stuff I can look at.
* Similar to JavaScript

Since I already had the MS tools and Flex builder would have cost me some extra change, I was leaning to Silverlight -- until I found out it doesn't support Webcam / Audio!

When deciding on which major technology to use, always determine that all prospective contenders support your required features!

Wednesday, June 25, 2008

SproutCore?

I am thoroughly unimpressed with SproutCore, but this is only based on the very rough demo application they host.

I tend to judge a platform's ceiling by the farthest someone has taken it... so, any real life examples of SproutCore out there in the wild that don't suck?

Sunday, May 25, 2008

Google Gears vs Adobe AIR: the way I see it.

Google Gears: easily add offline support to WEB PAGES.

Good scenario: user browsing your site, internet connection drops, Google Gears can be used to save all the data until the connection is re-established and can be uploaded to the server. The website mostly functions as the user expects it to, with only minimal degradation of functionality.

Bad scenario: user is offline, using your site, and their browser crashes... as far as I understand it, there's no way for them to get back to the offline version of the website without being online. They're basically 'stuck' until they can re-establish a connection.

UPDATE: Google Gear's LocalServer works at a lower level than I thought, so you can actually hit the offline version of a website without actually having to visit the online version first.

Adobe AIR
: easily add value to existing web-sites with desktop application + integration.

Good scenario: user is browsing a site that lets him chat with other users. However, he has to restart his browser for some reason (FireFox 2 is being a memory-pig again, or he just installed a cool new add-in). He launches the Adobe AIR application that lets him continue chatting with his friends even as the browser is closed. He can also leave the application open to chat with his friends so he has one less browser window / tab to keep an eye on, get updates to his friend's statuses on his desktop, etc.

Bad scenario: user sees some exciting new features on your chat website, enjoys using them, but they haven't been added to the Adobe AIR application yet, since an Adobe AIR application is an application that requires updates, bug fixes, and new feature integration separate from your website.

That's how I see it, anyway.

Wednesday, May 21, 2008

Ugh. Amazon's POS MP3 downloader

Amazon's mp3 downloader crashed.

Again.

So far it's crashed every time I've bought an album.

And, every time, I have to email customer service, get them to reactivate the download, and then hope the Amazon MP3 player doesn't crash this time.

I think this is pretty much my last purchase from the Amazon MP3 store for a long, long time.

Thursday, May 08, 2008

undefined method 'time_zone=' error?

undefined method 'time_zone='

Got that error?

Run this in your console:

gem sources -r http://gems.rubyonrails.org/
That's for bleeding edge developer gems. It was probably put in your gem repository list when you upgraded to Rails 2.0 and then forgot about until now.

Saturday, May 03, 2008

ExtJS alternatives?

Now that there's a big kerfluffle about ExtJS, one question:

What are people using now? I've heard some people mention Dojo but also mention that it has really bad documentation.

Suggestions?

Wednesday, April 16, 2008

The opposite of sweet.

** RANT ON **
(if your a client of mine, wouldn't recommend reading this -- this could be about you!)

Ugh. Heading into "bitter client" territory again. Happens a lot, mostly because I'm the "guru" -- and you only hire a guru when you don't have one. If you have a company without gurus, you tend to have problems: a company I began working with had no Subversion or source control system at all (!). That changed pretty quickly due to necessity + there was no way I was going to do the "hey stop editing files on the ftp server so I can get your changes!" dance I've read about at TheDailyWTF. Not *even* if they were willing to pay for me to sit around and twiddle my thumbs.

Another more serious problem I just noticed was that they don't have any kind of QA system in place. Oooh, yeah, I had a cloud full of "?!?!" Metal Gear Solid-style over my head when I realized one of the designers was testing a product. Bug reports were sporadic, didn't include steps to reproduce, and some bugs were missed entirely (but I fixed those anyway). All the bugs tend to be pretty minor (formatting issues, form validations) because I've got a keen eye and typically kill the "big" bugs as I'm writing the code. But, nobody writes bug-free code. That's why you need QA -- a bunch of motherfuckers that try to wreck your shit, and when they do, can give you a very detailed process on how they did it.

You ever get told there's an "error?"

Yeah.

"Error."


(I've always wanted to use this image!)

Anyway, I can't blame them too much. It's the typical growing pains of a software company -- one that has been working on small projects for most of its lifetime, then deciding to branch out into mid-sized projects.

But.

One thing that seriously annoys me is how clients are handled. For awhile (I don't know if they still are) they were pretty hands off with clients, meaning they weren't pushed for solid answers, or made to walk through the entirety of the site, or whatever causes a client to, the day before the site goes into production, go, "hey, this is all wrong, what were you doing?!"

This only affects me because that shit rolls downhill, so all of the sudden it's "hey man SUPER EMERGENCY #24241, we have stuff to do that should have been done a week ago but the client never bothered t o peek at the site until just now and we didn't really want to press the issue but anyone now you have to GO GO GO GADGET RANGERS."

Man. I never dreamed I'd be making that many relatively untested changes to a system that was due to go into production the next day.

I should have introduced them to weekly cycles and feature freezes. If you make any significant changes, deployment to production is pushed back a cycle -- that's enough time for QA, and for the client to make more outrageous demands in the meantime. Make sure the customers know about it, so you can finger them as the delay when it happens (and it will).

Anyway, RANT / OVER.

Tuesday, April 01, 2008

Just remembered why I hate CSS.

Read this, immediately remembered why I hate the current state of CSS:

CSS Swag: Multi Column Lists

What's funny about that article is that the solutions get progressively worse the farther down you go, instead of better.

Sometimes I just want to grab Web browsers by the neck and scream, "PUT THE ELEMENT HERE, RIGHT HERE AND NO WHERE ELSE YOU JACKASS."