Monday, November 05, 2007

Using oDesk as a buyer: the other side of the coin

So, I recently created an oDesk Buyer's account -- I wanted someone to redesign the front-end of a website. I don't have the time, skills, or aesthetics sense to do it myself as quickly as I want, and so like all great Americans, I'm willing to throw money at the problem until it goes away. =D

I chose oDesk because I'm comfortable with how it works from the provider's point of view. There's a few downsides to having both types of accounts (they're not tied together Single Sign On style): you can't use the same email address you use as a provider, although if you're using gmail you can use an address like mymail+odesk@gmail.com and it'll work.

Signing up was pretty easy -- took me about a minute, 30 seconds of which was trying to figure out whether it was a + or a - in the trick I just described above.

Lots of candidates, but I've noticed some providers just spray and pray -- not reading the cover letter is a good example of this, but inviting a provider to an interview and then having them cancel a day later due to them trying to "maintain their job application quota" is kinda like, "omg wtf?"

I've narrowed it down to about 3 providers -- I know for sure I'll pick one of them, so I wish I could close or hide the job entry so new applicants can't waste their time applying to it.

Also, interestingly, one of the provider's emails went straight to gmail's spam box. The weird thing is, nothing in the email seems like it would have marked it as spam.

Anyway, so far so good. It's kind of a pain working at oDesk + buying from oDesk, since I keep having to sign out of one account and into another, but, besides that, big thumbs up, yo.

Thursday, November 01, 2007

Scratch-Scratch.

Just saw ScratchBack featured in this TechCrunch post. I just wanted to check it out, but it only took about 1 minute from account creation to having a fully-fledged widget! Not one to waste'em, I slapped one into my dashboard.

I doubt I'll get any tips, but ScratchBack seems like a nice way for more high profile bloggers to earn a little extra income on the side.

Thursday, October 25, 2007

Chumby - they're still doing that?

A couple of years ago I saw a device, somewhere, somehow -- some kind of digital wifi toy called a 'Chumby.' It was essentially a very small appliance that could display a variety of Flash-based widgets via wifi. Don't know what I'm talking about? Take a look at your Vista / Google Desktop Sidebar, and imagine those widgets being displayed on an LCD screen next to your bed.

Better yet, click on the link to visit their homepage - currently they've got a "live demo" up and a picture is worth a 1,000 words.

Pretty cute! But, I was honestly surprised to find the website still up. I first heard of the Chumby about two years ago (rough guess -- can't remember) and they still haven't started selling them to the public. Even now, they've got a live demo up to entice people, but there's no ETA on a release date -- just a big orange "contact me when they're available!" button in the upper right corner.

The Chumby to me seems like an impulse buy -- another gadget to play with. I would have bought one then, if they were available, and I would have bought one just now, if they were available, but they're not, and by the time they are I probably won't, because the idea will have lost its shine. (The urge to buy one just now was much, much less than what it was when I first heard of the Chumby).

Even stranger, though, is that their website looks like they're pitching the device hard. They've got a "store," their sidebar is pitching new and updated widgets... they even have a link to activate the Chumby they're not even selling to the public yet. Kind of surreal. Is this some kind of clique-only thing?

*shrugs*

Either way, I'm bored talking about it now. See you when I see you.

Wednesday, October 17, 2007

By the way:

When I started working on my anonymous blogging platform / site / delicious sandwich, I switched in the middle of development from using Aptana to NetBeans 6. It wasn't supposed to be a permanent switch - more of a "feel out the waters" of a new IDE, but it worked very well despite its hungry-hungry hippo's approach to memory usage. Some obvious bugs -- Subversion commit message dialog barfs if you try to use quotation marks (" "), uses jRuby by default for its interpretor... but aside from that, very good user experience.

Thursday, October 11, 2007

My first public Rails site!

It's been awhile since I blogged about anything technical, so I thought I'd talk about a site I just prototyped.

It's a Rails-driven site. Top to bottom, its a pretty simple design, but I went through a lot (a LOT) of iterations before I found a design (front/back) that I found acceptable. Thankfully, Rails made this very easy. Ruby is as straight-forward as it can get, and so is the Rails framework. C#/ASP.NET feels a little wooden and artificial now, in comparison.

Speaking of C#/ASP.NET, I didn't really miss it when developing FearlessBlogging. I didn't have a moment where I thought "damn it, this would be easier in C#" or, "How come ASP.NET provides this but Rails doesn't?!"

Then again, the site I ended up deploying as pretty simple. I cut back on a lot of cool-sounding features that really weren't all that useful.

Oh, man, deployment was FUN.

Learning Capistrano before-hand was not. There seriously, seriously needs to be an updated Capistrano 2.0 tutorial for Rails.

I managed to hodge-podge it together from a bunch of incomplete Capistrano 2.0 blog posts and inferring some stuff from Capistrano 1.x, but still, was not the most pleasant of experiences.

After I got everything setup and stuff I could deploy the site with just a "cap deploy:cold" and it worked like a dream. I've updated the site several times since then and its always gone flawlessly. Using XP Pro, SP2, and no bugs reared up, so that was a relief.

Other than that, great experience: A++++, would work with again!

Yeah, I'm a dork.

Tuesday, October 02, 2007

Attack of the killer corporations.

(rant inbound - profanity - watch your six!)

This is a special blog post: it goes out to the McKibbon Hotel Group, Special Masters McMotherfucker, and anyone else who had a hand in trying to steal my parent's real estate.


First, let me address you old douchebags at the McKibbon Group, or the McKibbon Hotel Group, or whatever you merry band of motherfuckers go by.


For the purpose of exposition, I'm going to drop a backstory on the reader that is almost epic in its absurdity.


About six months ago, you greedy bastards appeared on my farther's door-step with a contract and a check for $7,000 dollars. You wanted a thin slice of property in Savannah that was easily worth a quarter of a million dollars – that's $250k, of which you were offering him, what, 1/35th?


Now, my father is old; he's a 60-something war vet who dodged every bullet but the ones hidden in every pack of cigarettes the government gave him. However, being old, black, and with emphysema doesn't make him stupid or desperate, which is what I'm sure you were banking on.


That DOES makes you racist, by the way.


However, being equally old and stubborn, you cranky douchebags came back with an offer he couldn't refuse -- $9,000! A generous, $2,000 increase! I'm sure one of you was wringing your old, crinkled hands as you cackled “LOL BLACK PEOPLE,” right?


Move forward.


First, you hit him with a lawsuit, because, apparently unwilling to pay market-value for property like every other self-respecting business on the planet, you were going to try and fucking STEAL IT FROM MY OLD INFIRMED FATHER.


Of course, after his lawyer (yes, he had one of those, as I'm sure you were VERY surprised to find out) hit you up with his response, you immediately tried to settle. A little better this time -- $103k, only 1/3th market value this time (property value only goes up with time!). Closer, but after all the hassle they put my father through, he wasn't willing to go a dollar lower than what it was worth – market value, not tax value.


I'll admit the next fuck-up was his lawyers fault – you wanted to use Special Masters McMotherfucker, and his lawyer, after consulting several other lawyers, then pouring over Special masters McMotherfucker's history, saw no reason to argue against it. That should have been her first clue something was wrong, but she seems like the naïve “this lawsuit is bullshit so there's nothing to worry about” type, so I don't blame her too much.


The ruling was in your favor – Special Masters McMotherfucker performed his task beautifully, recommending you be awarded the property with 1 legally vague reason padded by 2 bullshit made-up-on-the-spot arguments (arguing for things that aren't even required by law) that completely blew my father's lawyer's mind. Like I said, she's a bit naïve. Combine that with a judge that apparently rubber-stamps anything that comes across her desk, and you've got a slam dunk!


Yes, clearly he put a lot of thought into that judgment. I can't prove it, but I know what you did there, Special Masters McMotherfucker, I know.


Of course, they're appealing the decision – trying to take it out of the McKibbon Hotel Group's area of influence and somewhere impartial, which is good.


But, no matter what happens – win, lose, or settlement – this blog post is going to be on the Internet. Every time someone googles “McKibbon Hotel Group” or “McKibbin Hotel Group” or however you spell your awful company name, this blog post is going to come up. People are going to read all about how you tried to fuck over my parents, and it's going to leave a bad mental imprint in their minds.


It's going to be a testament to you thieving motherfuckers, and it's going to last forever.


Oh, and PS:


Go fuck yourselves.

Saturday, September 29, 2007

Rails plugin: optional parameters for partial views

Just "published" my very first Ruby on Rails plugin today.

Been using it in a personal project of mine for awhile.

Basically, its optional parameters for partial views, to make it a bit more clean.

==View.rhtml==
render :partial => 'post', :locals => { :post => @post}, :opts => { :show_comments => true }

==_post.rhtml==
<% if opts.with_default(:show_comments, false) %>
Yadda yadda
<% end %>

Not much code, but its a simple idiom I found myself repeating (a lot) so I wrapped it up into a plugin.

linkage:
Arron's rails plugins

Tuesday, September 25, 2007

Amazon Mp3: DRM-free music - I just popped my mp3 consumer cherry

Amazon MP3: DRM-free music. That means it works on any mp3 player. I approve!

Prices are competitive with iTunes.

Launched today. Lots of good music (my opinion, YMMV).

This is the first time I've actually bought an mp3 - I grabbed an MC Lars single, Hipster Girl.

I've never really been willing to buy an mp3 before because of the hassles dealing with the DRM if I wanted to back it up or anything (I go through more computers and MP3 players than I'm comfortable with), but since it was DRM-free grabbing some MC Lars tracks was obvious.

The experience was really good - the Amazon MP3 downloader was optional, but I wanted to give it a try anyway, and it was a really smooth downlolad, install, and launch.

Think I'll go back and grab some more tracks later on today, after I'm finished working. Amazon Mp3's prices are that sweet-spot where its just cheap enough to be a convenient way of grabbing mp3s. The DRM-free bit is what sealed the deal, because there's no way I'm dealing with that kind of hassle for more than 5 minutes.

Tuesday, September 18, 2007

An hour with CodeGear's 3rdRail product

I've been waiting for this one to come out -- sort of. It's been on my periphery, but I hadn't kept up with it until I got an email in my inbox touting the release.

First impression: weird name. Not very Google friendly, either.

Second impression: Looks like Aptana / RadRails. A lot. Mostly because they're based on Eclipse, but still.

So, I downloaded it about two hours ago, got it set up and everything -- they ask you to register for a trial key, but the software apparently will run for 5 days without a trial key.

I managed to slough through the whole 21 minute web video of 3rdRail in action before-hand. A lot of impressive stuff, but a few telling signs when the narrator quickly pages away from 3rdRail's RHTML editor. There's a good reason for that: the RHTML editor, like RadRails by default, is really quite awful. More on that later.

So, I've got the IDE cracked open in front of me. All Rails IDEs can handle the newbish "create project from scratch" scenario, so I ignored that completely and went straight to File --> Import. They're clearly expecting this: there's a wizard for importing an existing Rails project into 3rdRail with a few clicks.

On the initial run you've got to set up your Ruby interpretor, which should have been a straight-forward process (check c:\ruby\ first please, sheesh), but wasn't. Setting up the Ruby interpretor also required me to set up the "Interpreter system libraries," which it should have been able to parse from the Ruby installation directory, but didn't, so whatever, k-thx. It doesn't tell you exactly what it means by that, either, so I just picked some random directory and hit 'OK.'

I went back to check on it a few minutes later and the system libraries grid was filled with all the correct values -- apparently auto-detected after I clicked on the 'OK' button. Whatever.

The project import process is dog-slow: apparently 3rdRails does something "special," and by "special" I mean they need to consume about 100MB and waste 5 minutes before making the project available.

The IDE is pretty impressive at first glance: they've got a Rails-centric view of the project, where everything is neatly tucked away; you've got "layouts" (all your layouts), "models" (all your models), etc. Kind've like the raw folder structure, except inside, say, Models, you can drill down into a particular model and get all sorts of good information, like a model's attributes, the model's members, its associations and aggregations, too.

When you jump into a model / class, on the right pane there's an "inbound" and "outbound" section. Outbound shows what attributes / models / etc this model references, and inbound shows what attributes / models / etc in this model is referenced externally. When it worked (once), it worked great.

Unfortunately, this feature appears to be very buggy -- I've got a perfectly valid production site running on Rails. The 3rdRails kept vomiting up the most basic error of all: "java.lang.NullPointerException."

People!

People!

Check your freakin' nullables.

I get the error every time I "click through" source code, which makes it pretty hard to use the IDE.

On the upside, code completion is pretty good.

On the downside again, RHTML editing is crap.

No joke: you've basically got templates for common Rails idioms, but that's it. It's no good -- I gotta keep my head in HTML as much as I have to keep it in Ruby, so what they're giving me is just half the tools. But, surprisingly, 3rdRail's CSS editor is actually OK. Not sure what's up with that.

Aptana's RadRails ships with two editors for HTML: the default (god awful) RHTML, but also the most delicious HTML editor I've ever used in a free product. Change the default editor for .RHTML files to Aptana's, and you're kickin' ass and taking names. The CSS editor is, as well, pretty sweet. I would totally recommend stealing their HTML editor and integrating it into 3rdRail instead of what they're using right now. Take Aptana's CSS editor too, while you're at it.

Overall, it stacks up pretty fairly against Aptana, except for one problem: price.

$299.99?

Too much.

I would pay maybe $59.99, $69.99 for this software. It'd be a different answer if Aptana / RadRails wasn't available, and it is, and that's the problem - aside from Code Completion, Aptana has most of 3rdRail's touted features, all for the wonderful price of "free." That pushes Aptana into the "good enough" category for most developers, of which I am one.

Anyway, that's it. If anything interesting crops up before the trial times out, I'll probably blog about it in furious rage.

Back to hacking.

linkage:
3rdRail
Aptana

Friday, September 14, 2007

Blocking OpenID providers?

Oh, geez. I just saw this HILARIOUS nugget on someone's blog as I was surfing for information on OpenID (I'm implementing it for a website as a secondary login scheme).

This post is relatively meaningless; it's just some dude's vendetta against some other dude, so he blocks the guy's OpenID provider from using his blog. Whatever. The blog post is completely irrelevant because its all misshapen and skewed anyway, but thankfully that's not the important part.

The gold nugget, the priceless, sterling jewel of the post is in the comments section, where some commenters basically ask,

Isn't banning OpenID providers against the spirit of OpenID?


To which the author replies, verbatim,

How would the general users (i.e. non-geeks) know the particular provider/company is evil (which I believe is a good reason), unless they have problems using its services/products?


Thank God.

A moral authority for OpenID.

I mean, look, I can see blocking an OpenID provider for technical reasons like spam -- that day will eventually come -- but blocking one because you've got a beef, an arguably subjective beef at that, with the guy who runs the provider?

Man, come on, be serious. That is some serious high-school level drama there.

Even better, its not like people using the banned provider are going to be, "LULZ, MUST SWITCH PROVIDER."

Does he seriously, seriously think a "non-geek" is going to get another OpenID somewhere else, and now be using TWO OpenID providers? TWO? Now we're back to the whole problem of a different login for each site, because some motherfucker blocked another motherfucker, and started an iNuclearWinter.

At that point the value of having an OpenID (and actually USING it) quickly approaches 0, and we're back to jump again.

Thursday, September 13, 2007

WTF is with Windows Live?

I used to use Windows Live Writer on a semi-regular basis until they stopped updating it (publically) and its bugs / glitches became more and more of a chore to deal with every passing day.

But now it's been about a year, year and a half, and now I'm ready to give it a spin. I've got some things to write about on another casual blog I maintain, and I hate the web-based interface for writing on it, so I thought I'd give Windows Live Writer another spin.

So I go to download WLW (Windows Live Writer), but instead I get a generic Windows Live suite installer that insists on installing Windows Live Messenger (that I already have installed) and Windows Live Desktop Mail (that I already have installed).

All I wanted was the goddamn WLM software. Was that really so hard for Microsoft to do? There's no way to cancel any of the other items to keep them from installing; hell, the only things it prompts you for is, "Do you want to install our awful toolbar and equally bad bullshit homepage ? ? ?"

That aside, some of the Windows Live software is really useful, but I don't know why they even bothered with the ridiculous branding. None of the software interoperates in any way. In fact, I think the only thing they have in common besides the name is the toolbar flair.

Sometimes I wonder what it's like to work at Microsoft. From the outside looking it, it's as if the teams there can pretty much do whatever they want and the end result doesn't matter. Microsoft Max, a suite of software that doesn't work as a suite, Vista...

Well, that's it for now.

Thursday, September 06, 2007

Umbraco: Why, God, why?

Will someone please tell me what's the deal with everyone raving about this CMS?

I've spent about 6 hours with it and already I want to claw my eyes out.

I'm using 3.0 RC1 (the "recommended" version), and it's chock full of bugs that make the interface unusable with Firefox, and, thanks to good coding practices, about 2 crossbrowser UI bugs. How long has it been since you've seen a "modal dialog window," the unresizable kind, where form elements are actually out of view? Apparently not long enough, for Umbraco.

After surrendering to the inevitable and firing up IE7, I began to -- slowly very slowly -- enjoy Umbraco. You know, some rough edges aside, it's an OK CMS.

And then I tried to embed an image into a template.

Oh, yeah. I knew the programming gods had a grudge against me when I tried to perform one of the most simple tasks for a CMS and it failed miserably. Quickly, Google to the rescue! All over the web you find this: "well, you'll have to write an XSLT to get the image url and output an img tag, and then you just create a macro to call the XSLT and presto!"

No, my friends, no fucking PRESTO here. This is a CMS, the whole purpose of using one is so I don't have to hard-code shit everywhere. For some reason they let you pick out "Media" (images, files, etc) as a valid property type, but don't provide access, in templates, for you to grab the various attributes of the property, like, oh, I don't know, THE GODDAMN URL.

Seriously, why are you going to give me the ID of a JPG. What the fuck am I supposed to do with that? Really, what? How did you get to version 3.0 of a software product and decide that yes, that was a really, really good idea.

How does a CMS make it to version 3.0 like that? I'd like to say, "magic," but fuck all if magic explains why when I try to move a content node, the pop-up dialog closes but the content tree doesn't refresh.

I'm staring down the barrel of goddamn-what-the-fuck, and its name is "Umbraco 3.0"

But wait, there's more! Just when I thought it couldn't get any stupider: you can't turn off debugging on production mode.

Yeah, you heard me write (write, get it?!), you can't turn of debugging. A helpful work around includes doing some URL-rewriting if the user tries to hit the debug url, claims some page some where that conveniently isn't on the main Umbraco site.

In other words, Umbraco sucks.

This is all without including a ton of minor bitches I have, including:
  • the fact that the Rich HTML editor doesn't fucking Rich HTML,
  • something I like to call, "The Mystery of the Disappearing Quotation Marks" inside of the template editor (which, ironically, also sucks),
  • and what I tentatively refer to as, "An Awful User Interface: Are You Prepared?" when visiting the "Member's" section of Umbraco
What's funny was, the wizard for installing and setting up Umbraco was pretty decent. It's unfortunate that the rest of the CMS isn't as polished.

link juice:
Umbraco

Thursday, August 30, 2007

Dell Customer Support: at least they mean well.

Twice in the past two months my family has actually had to use Dell's customer support.

The first was for my HDTV -- the one I had was broken. It was a painless procedure; they verified my warranty was valid, overnighted me a replacement HDTV, and let me ship the old one back in the same box. Even was able to get DHL to pick up the heavy-ass box at my doorstep.

Good deal!

My mother recently ordered her two grandchildren mp3 players from Dell -- they were those new Creative Zen Stone, the Plus version. The mp3 players came to our house, first, then she mailed them off to the grandchildren with a birthday card, etc. However, after that, my mom decided to get them a Napster subscription so their mother, my sister, wouldn't go broke buying them music.

Except that the Stone mp3 players don't support subscription music.

So she rings up Napster and asks; they try to sell her on the pay-per-mp3 model. Then she rings up Dell, explains her situation; says she needs some MP3 players that support Napster's subscription music, that she needs them overnighted to the children so they arrive by their birthdays, and that she needs to return the other Mp3 players -- which are now located in Texas, a million miles away.

Dell is surprisingly helpful! The shipping is free; they'll overnight it to my sister to save time, and they even schedule a pick-up with UPS so that all my sister has to do is give the old mp3 players (in the box, with all accessories included) to some dude in a brown shorts when he comes to the door, and all will be well.

Well, unfortunately it didn't work out that way. The package arrived here, instead of in Texas (so now it'll get there late) and my dopey sister didn't have the packages ready to be picked up by the UPS guy.

Compared to what I've heard about Dell support, it was a pretty good experience.

Wednesday, August 29, 2007

I feel the need...

...to alert you to the fact that Blogger's rich HTML editor is by far the worst I've ever used.

I'm lazy, and you should be too!

(rant inbound)

I just saw this post in my RSS reader (not sure where it originated from). It's a little ditty about how lazy some developers are, and how the Pyro desktop project had to change from Bazaar to Subversion because people were unwilling to install the Bazaar command-line client.

Surprise!

No, seriously, SURPRISE!

I'm lazy, and you should be too, because we've both got shit to do.

I've got work, you've got work. I've got hobbies, you've got hobbies.

In the small amount of free time I've got, do you really think its realistic that I'll learn a new technology to possibly contribute to a project that I might find interesting? Getting interest in the project is a stretch, but you want me to devote time and energy to something else entirely (another version control system)?

Better yet, the guy harkens back to a time when you'd check something out of source control and the build would be broken. Harkens. Maybe I'm too young -- I'm only 24 -- but the very thought of trying to get contributors for a project that won't even build straight from source control is ridiculous. I don't find the concept of ME having to fix YOUR mess because you were too lazy to make sure it works fun or productive at all. That concept is not enamoring, no.

Then again, I'm a firm subscriber to keeping your broken shit in branches and making sure every check-in to trunk works de-facto.

Anyway, back to the point of my rant, if it had one: unless the technology in question is so amazingly awesome you were going to pick it up sooner or later anyway, why should you have to bother? It's not my idea of fun, to be honest.

I've had very little free time to myself this year, so when I decided to pick up a new web development language/framework, I wanted something I could actually use without having to pick up a bunch of extra baggage along the way -- that's why I chose Rails instead of, say, Seaside or whatever that clusterfuck of parenthesis is. Rails, and Ruby, being the extremely straight-forward beasts they are, were a perfect fit: no extra bullshit to set things up, no extra bullshit to get started. You hit the ground running and it feels good.

If I can't hit the ground running with a OSS project, I'm not interested in contributing to it.

PS,

I always wanted to end a blog post like that!

Monday, August 13, 2007

Rails, Rails, and oh, what's that, Rails?

I can't stress this enough: Rails is _awesome_.

Recently I've been doing a lot of development in it and everything just works -- and when it doesn't, finding out where and how is infinitely easier than doing the same with ASP.NET.

Of course there are a few features from ASP.NET 2.0 I find missing in Rails -- the nested master-pages concept is one of them -- but not enough to keep me away.

The biggest thing I find lacking is of course a decent IDE. I've actually used quite a few: Aptana, Komodo, jEdit w/ Ruby plugins, SapphireOnSteel, etc.

I'm currently using Aptana a lot right now -- it feels really good to me. All of the important Rails features are exposed via the user interface, all Rake tasks have a description in the Rake panel for instance, and it supports debugging Mongrel and WEBrick servers via the debug-mode UI.

One thing that makes me kind of uncomfortable is the lack of any good intellisense -- typically I find myself paging back to Firefox for Ruby documentation. I'm used to "exploring" an API via Visual Studio / SharpDevelop's excellent intellisense features.

I don't need anything super special or super accurate, but it would make things a lot easier.

Aptana's "RHTML" editor sucks, by the way -- change it so that "RHTML" files are opened in Aptana's HTML editor instead, you'll thank me for it later. Do the same for "RJS" javascript files as well.

Really, the IDE just needs some polish (a bit rough around the edges, colorization occasionally fucks up when you're editing Ruby files) and it'll be a strong free offering in the IDE space, for whatever my word's worth.

Regarding Komodo, I gave it a few tries but I really wasn't feeling it. It sort of feels like the Ruby on Rails support has been tacked on to the IDE; a bunch of macros tacked onto the UI to run tasks, for instance.

Ruby in Steel felt a bit similar. It has great colorization support and its intellisense actually seems pretty accurate (the fact that it has it at all? SUGOI!). There's debugging support but, uh, I think everyone does that by now. The extent of its Rails integration seems to be one toolbar with a few sparse options, and some panels. I uninstalled the 30 day trial right after the "Rake" panel started appearing when I cracked open C# projects.

Ruby in Steel seemed to generate its own files -- database.yml, for instance, wasn't populated with the typical rails new app comments and etc. Oh, and it required me to input some database information before I could even create a project -- what the fuck? Annoying.

Aptana just feels like a right fit, even though work on its Ruby on Rails stuff seems to be going abysmally slow. We'll see what other commercial offerings start popping up in the future, and then you'll see me post something like this again -- but with much, much more bitching. ;)

Link Juice:
Aptana
Komodo
jEdit, jEdit Ruby Stuff
Ruby in Steel

Saturday, July 21, 2007

StreamReader: annoying design decisions in the .NET framework

You would be surprised the simple things that people forget to include in APIs that make using them very annoying.

Here's an example: StreamReader. Intelligently, StreamReader buffers, for performance reasons, input from the stream, so while you may only call ReadBlock() for 14 characters, StreamReader has read ahead 50 characters.

That's great and all, except they forgot to *support their own features*.

The most obvious problem is seeking: they didn't add buffer-aware seeking functions to StreamReader itself. So you have to dig around the underlying BaseStream to make the magic happen. Except that StreamReader doesn't actually check the current position of the base stream before it reads from its buffer.

So, when you try to seek on BaseStream, and then do a read, StreamReader happily (and very blindly) reads from its invalid buffer, thus fucking your shit up.

Apparently someone, somewhere, was vaguely aware of this, and provided "DiscardBufferedData()" -- one call to this and the buffer is emptied, so reading from StreamReader will pull the fresh data instead of the old data.

Except DiscardBufferedData() doesn't update the underlying stream's position. Oops!

So while you think you've read 540 bytes and the stream should be at 540, its actually at 560, because StreamReader buffered an extra 20 bytes for performance.

No big deal, though, right? We'll just see how much data was in the StreamReader buffer, and seek backwards that amount.

Or, we would, if DiscardBufferedData() had been designed properly so the discarded buffer size was the return value.

No biggie, we'll just check out the BufferSize property that the developers decided wasn't worth including as a class member. Shoot.

Of course, this isn't an insurmountable problem: you just have to keep tabs, manually, on where the stream position *SHOULD BE*, and then do your seeking calculations with those numbers in mind.

But, being able to work-around it isn't the problem: the fact that you *HAVE* to work around it is the big annoyance here. It's a "WTF PLZ" that shouldn't even be in the framework, much less having survived three iterations of .NET RTM.

There was a time where I would have sent that up as a feature request, but every time I visit Connect I see a whole bunch of feedback issues with the same replies from "Microsoft": "we can't fix this in time for X,Y,Z, but we'll keep an eye on it for future releases (not really)!"

I think I'll actually do it this time, though.

I'm a bit curious to see if or how they'll dodge it.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=288567

Thursday, July 12, 2007

Convert FLV's from YouTube into audio-only mp3 files.

Took me awhile to figure out how to make VLC do this right due to its clunky UI, but whatever.

You'll find this useful if, like me, you want to take a particularly long YouTube file with you on the go but you need it to play on your mp3 player as audio only (space concerns, the video on your media player sucks, whatever).

For your enjoyment:

You'll need:

  • VLC Media Player
  • Some way to grab FLV files -- I recommend VideoDownloader since that's the easiest way to get the FLV from a site like YouTube -- what's up with the VideoDownloader URL? I don't really know.
Download, and install VLC Media Player, and make sure it doesn't mess with your file associations.

Now, by default, VLC Media Player will attempt to always encode the video of an FLV and there's no way to change this behavior via the GUI, which is stupid, so we have to work around it using the command line -- don't worry, its really easy.

Make a new short-cut to the VLC Media Player by copying the short-cut on your desktop or if you're savvy navigating to %Program Files%\VideoLan\VLC\vlc.exe and right clicking + 'create new shortcut.'
Next, edit the short-cut. In the "Target" field, outside -- OUTSIDE -- of the quotations that contain the path to the VLC Media Player, type in "--no-video" (no quotation marks), save the short-cut, then rename the short-cut to "VLC Media Player -- No Audio" so you don't get it confused with the fully functional version.

Download a FLV and open it in VLC Media Player to make sure that everything's working. You should hear audio but see no video -- if so, you're a winner. If not, start over from step 1 and try again.

Now, open your FLV in VLC Media Player once you're ready to rock and roll -- either drag and drop it onto the VLC Player or open it via File --> Quick Open.

Click File --> "Wizard"

Select "Transcode / Save File" then click Next.

Select an Existing Playlist Item, select the FLV you just started playing, and click Next.

Check "Transcode Audio" and from the drop down list select "MP3" -- don't mess with the "bit-rate" option, even though I'm sure you want to. Click Next.

Select "RAW" on this screen and select "Next" again.

Click browse, enter a file name -- don't forget the .mp3 extension, that is IMPORTANT because VLC Media Player won't do this for you -- and click "Finish."

The VLC GUI will seem like its playing a file called "Streaming...", that's the transcoding process, don't touch the player at all until its finished. Yeah, I know it looks stupid. But, it works.

Your new mp3 file has been created. Congrats!

Sunday, June 03, 2007

Developer to Microsoft: WTF?

Profanity inbound: be careful.
(information gleaned from various blog posts -- hell, it might just be plain old _wrong_)

So, the saga of Jamie Cansdale's TestDriven.NET vs Microsoft pretty much hit its zenith with this post:
The license attached to their first letter was the one for "Visual Studio 2005 Standard and Academic Editions". It didn't matter that the license wasn't the Express SKU license because the wording is the same. What if it turns out that the reason I can't add buttons to Express SKU also applies to Visual Studio 2005? I would then be forced to take down TestDriven.NET entirely. What if it also means I can't use PopFly Explorer for Visual Studio Express? :-(

Typical check-mate move. I've actually followed the entire saga, even though I've been using VS2005 Standard; I knew that whoever at Microsoft running the operation against Jamie was having difficulty when they refused to name the clause that he was breaking; it was almost inconclusive when the argument suddenly shifted from "you're breaking the eula" to "you're destroying your business model" in a desperate attempt to create a rapport with him. That is not an avenue you explore when you've got the ability to move every Zig on your enemy -- talk about shifting goal posts!

Anyway, Microsoft's behavior up to this point had just been a gimmie: a clever coder had found something in the Visual Studio 2005 API that hadn't been removed from the Visual Studio Express editions and had used it to slip through the crack team of ninjas guarding the front gate, enabling a few very basic features on the way in... right?

Oh, wrong.

Oh, how GOD AWFUL WRONG I was.

Dan Fernandez wrote in a post made this post on Friday:
Some examples of these technical limitations are that there is no Macros IDE, there is no Add-In manager, and registered Add-In’s and Packages are not loaded at startup.
Let me normalize that for those in the audience whose bullshit detectors are broken:

"We removed the user interface for addins."

This is when I've realized that everything I've read about this situation was horribly, horribly wrong.

In a product distributed to MILLIONS OF PROGRAMMERS, they LEFT IN, excuse me, let me say that a little bit louder, they LEFT IN THE EXTENSIBILITY API.

This wasn't just a case of a clever hack that enabled some sparse functionality in the Express Edition products, this was a case of gross incompetence at Microsoft: they genuinely, sincerely thought that by removing the user interface they disabled access to Visual Studio's extensibility features. Somebody LOOKED AT IT, they EXAMINED IT, and then they gave it The Big Thumbs Up; a goddamn SEAL OF APPROVAL for a job well done. Right now, even as we speak, there's a "task issue" somewhere for the Express Edition products with a big green checkmark next to "Disable Visual Studio Extensibility API"

To be honest, when I read that part of his blog post my nuts almost fell off.

You know what that is?

You're developing the World's Greatest WebApp. It's a fucking, uh, I don't know, it brings the dead back to life. Now, somewhere during the development cycle, you add a link to the page that takes you to the Life or Death administrative page. I mean, you don't want anyone resurrecting Hitler or any of those douche-bags, right?

A few weeks later you're told to remove the functionality; you're going to host the administrative functions off-site so you can control who has access to it. Maybe you want to make the administrative panel a "for-pay" kind of deal. That's cool, right?

Now, if you're Microsoft, and you see "Disable admin interface" on your task list, what are you going to do?

Easy: you're going to go into a *.css file and set the link's style to display: none, and presto, problem solved.

Except the functionality still exists. People can find it browsing the HTML source, they can find it by guessing randomly; whatever the case, they can cut-and-paste the url into their browser and hit the administrative module without a damn thing to stop them.

Now, the worst part of this is, they (whoever is command and conquering the Visual Studio team) are saying that Jamie Cansdale is breaking a "technical limitation" of the Express products.

What the fuck? They left the functionality in the product. Their only technical limitations were:

  • Not allowing the user to the addin manager.
  • Not allowing addins to start-up using the addin registration "do-hicky" cuz it ain't there.
That's IT, that's the whole kit-fucking-kaboodle. The hell? They LEFT HIM a PUBLIC API. A PUBLIC, DOCUMENTED, UNRESTRICTED API.

It's a goddamn TREASURE, a hill of gold doubloons and jewel-encrusted chests strewn in the middle of a wasteland with a door -- just a door -- guarded by Steve Balmer and his bag of never-ending office chairs.

Sure, Steve will ward you off with some hard plastic to the face if you get too close to the door, but since Microsoft forgot to build a wall around its treasure, nothing stops you from avoiding Steve and his Door of Mystical Wonders entirely and just approaching from another angle.

The worst part? Nothing stopped Microsoft from just gutting the API or adding one single, simple line to the EULA that says, "You are not allowed to use the Extensibility API under any circumstances."

That's it. That's all it takes. Doing some goddamn work or paying your lawyers to do it for you.

"Oh shit, let's try and use this clause of the EULA that doesn't really apply because we were too fucking lazy to actually lock-down the extensibility API" is the worst, the absolute worst, you could ever do, because this is the Internet, it's 2007 and WE ARE WATCHING YOU IN REAL TIME.

And yet, because they are Microsoft, there is a very, very good chance that the next generation of Express Edition products will still have the API in place, the EULA won't have changed one word, and two years from now we'll be seeing this issue again because nothing will have changed.

Wednesday, May 16, 2007

Ruby on Rails.

I love it!

Seriously, I just got my first taste of RoR almost a week ago. It's an awesome framework -- I love the freshing 'it just works' mantra that it seems to be built on. Crafting an interactive website with Rails is _really, really easy_. The enforced MVC doesn't bother me much because it all flows together perfectly.

Only thing I wish for now is a robust IDE -- I'm using Aptana after having laughed off Komodo 4.0's lackluster attempts at a Rails IDE. I hear CodeGear is coming out with a good one, but the Komodo people called K4 'the first true Ruby on Rails IDE' so its probably not a good idea to judge a product by the marketing spin.

I have a project coming up that doesn't require any particular technology, so I think I'm going to give it a spin with RoR and see how it works when I have to use it for Serious Business. :)