Tuesday, September 29, 2009

My presentations are on Scribd now

I uploaded the presentations I gave to the UNO ACM SIGPLAN group last semester to Scribd today. Here they are in all their embedded glory:

The second presentation isn't really worth all that much without the accompanying screencasty stuffs where I use the code generators and code just gets created on the fly. For that kind of presentation, look at railscasts, or the screencasts on rubyonrails.org, they're awesome.

Ruby Intro


Rails

Waow those are some big embed tags.

That's what she said.

Saturday, September 26, 2009

Well that was easy

Pointing my blogger site to an actual domain was really easy. Why didn't I do that earlier? I've owned jorgechao.org for like a year....

Time to do something with buildini.us....

Sunday, July 05, 2009

Testing blogging from the iPhone

If i go into edit HTML I can. But otherwise it's still fuxored.

Saturday, May 23, 2009

What do you want from me FOX Broadcasting?

So it seems that Terminator: The River Tam Sarah Conner Chronicles has been cancelled. No big surprise. I’ve read much better analysis of why the show was cancelled than I could ever hope to write, but its always the same reason these shows get cancelled: Ambitious, complex, no point of entry for new fans midseason. In short, all the things that make some television watchable. Fuck those hangers on that come in 7 weeks into a show because it came on after Idol and are CONFUSED.

Admittedly, I was part of the problem again when this show got cancelled. I didn’t watch until season 2, and even then to catch up I downloaded torrents up to what was available on Hulu, and watched the remaining 10 eps all legal and such. Even still, my Hulu viewership is a drop in the bucket to these vultures because Nielsen can’t even get their fucking web traffic numbers right.

I realized a long time ago that my viewer numbers weren’t being counted because my family wasn’t gullible enough to be a Nielsen family, so it didn’t matter if I watched or not. Shows would get cancelled based on the whimsy of the dumbasses that wonder why they get robocalls all the time (Hint: Nielsen) so why bother. Really, FOX News is consistently the most popular ‘news’ channel, but if you look at web traffic its quite the opposite:

http://www.editorandpublisher.com/eandp/news/article_display.jsp?vnu_content_id=1003963674

MSNBC #1 in March 2009 for unique visitors to their website. Quite a shift eh? Polar. Fucking. Opposites. What’s the cause of this discrepancy? Less and less people are watching things on conventional television and going to the web for their entertainment and news. The people that don’t? They still watch FOX News and American Idol and Survivor. In this television climate, NOT A SINGLE SHOW I WILL EVER LIKE WILL GET RENEWED.

I finally felt like my viewership could be tracked by a site like Hulu. Web traffic? Unique visitors? Websites already do that. How could Nielsen fuck something up like that?

Until this is resolved and people’s web traffic viewership is counted for what its worth, television is doomed to be the piece of shit it has always been. Dollhouse got renewed, but it’ll be cancelled next season. Guaranteed. Fringe however crappy and pseudo-sci-fi it was, it’ll get cancelled because it doesn’t have Idol as a lead in for next season. Lead-ins? Do I really want the success or failure of a show to be determined by a mouth-breather that watches TWO PLUS CONSECUTIVE HOURS OF TV A NIGHT?? Someone that doesn’t know how to work a DVR, or download torrents, or do something as easy as going to hulu fucking dot com for their content? No, and that’s why we’ve been saddled with garbage for too long.

Wow, I don’t even want to look at a word frequency chart for this post. Bombs all over the place, but I don’t know what else to say. I’ll leave you with these little nuggets of hope though:

http://popwatch.ew.com/popwatch/2009/05/is-it-time-for.html

http://www.variety.com/article/VR1118003924.html?categoryid=14&cs=1



Sunday, April 12, 2009

Crafty Gits

I’m taking a class this semester called System Programming Concepts (UNO course number CSCI 2467). The class is ostensibly supposed to be about system programming, duh. It varies how much C programming, csh scripting, awk and sed using, grepping and generally UNIXy stuff is taught depending on the teacher and his disposition. I happened to have it with the lead Bioinformatics prof at UNO currently, Dr. Stephen Winters-Hilt. He’s a brilliant brilliant fellow, and his research in Bioinformatics has made him quite familiar with Perl. So, in this class, we’ve learned some basic UNIX commands, some C (all classic recursively solved problems) some csh scripting, but the real kicker is the amount of Perl we’ve had to learn. It turns out that Perl is super fast because of things like the built in hash primitive and the fact that most of the Perl that people write utilizes precompiled C to make things go faster. Forgetting the fact that your entire program looks like a big regular expression, its pretty neat, and the first problem he gave us on our midterm showed me that I should never trust search in text editors, not grep, or ctrl-f or /string (vi search). They’re all lousy. Here was his problem.

Given a virus genome, construct a Perl script that finds and counts all one base occurrences (a,c,t,g), 2 base occurrences(aa,ac,at,ag,ca,cc,ct,cg, etc.) all the way to 15 base occurrences (1 billion possible occurrences 1,073,741,824 or 4^15).

Once parsing the entire file into a single string and shoving it into an array (1 char per index) the next step is to start searching. His suggestion was to use the wonderful Perl hash primitive to track counts of bases seen thusly:

$my_hash{aatgcgtta}++

I don’t know about you, but I think that’s pretty damned hot. Sexy even. Incrementing the key of a hash so that its value is effectively the counter. NOT TO MENTION, if the key doesn’t exist, in Perl it creates the key, and sets the value to 1. Counters have never seemed so badass.

I’m not going to post my solution, in case someone taking the class stumbles upon this website (not likely) but I will say this: The problem is meant to screw with your brain. Like all good CS assignments, there is a catch that will frustrate you for days to teach you some kind of lesson.

Once I finished my solution to work for 1-base to 15-base cases, I decided to look in the text file itself to see if I was on the right track. I took one of the 3-base occurrences that my output claimed occurred 38 times. I started grepping around in vim and counting by hand. I counted less than 38. Panic-stricken, I thought that my algorithm for constructing strings was totally busted and I had to turn it in incomplete.

The following week I revisited my algorithm because it has to be redone in C and Python now. While looking at it I decided to look at the 15-base case. There was a single base that occurred twice in the 7500 character string, but grepping in the file showed only one occurrence. Perplexed I started at a long string of a’s, c’s, t’s, and g’s for a few hours and discovered that there WERE two occurrences of the string described by my algorithm. The strings overlapped. For example the base:

tttaattaggtttaa

occurs twice in the sequence below. The problem is that the second occurrence is contained in the first.

tttaattaggtttaattaggtttaatttgatgtt
tttaattaggtttaattaggtttaatttgatgtt

See for yourself. Grep, ctrl-f, /search_term WHATEVER, will not find a second string in a search if the second string is partly composed of the first string. Testing my program by using time honored means of text editor search only served to confuse the shit out of me. I don’t know if the lesson to be learned was that you can’t always trust tools provided to you, no matter how old, but that’s certainly what I took from that assignment.

Monday, March 23, 2009

Zealotry

So I posted a lengthy response to a Computerworld.com news item/blog post about a Steve Ballmer comment about the '$500 Apple Fashion Tax.' I took umbrage and concocted this:

Here's the link for the story. I don't know why it rankled me so but here was my response, printed on my own blog for when it gets lost in the sea of pro Mac fanboyism. I can't believe I didn't put 'FIRST POST' on it. That would have been flamebait.


In the interest of full disclosure: I have a Mac laptop for work/mobile screwing off and a PC running Vista for gaming. I am a firm believer in the right tools for the right job, and I wouldn't be caught dead with a desktop I couldn't upgrade myself (iMac). Also, I think I may like vi better than emacs. Still not sure though.

With that said...

1997 called and it wants its argument back. The standard, demeaning concession 'oh they're great for video/recording music' is so hackneyed and tired. Its like saying the only place one sees a large collection of Mac laptops are on the campuses of expensive art colleges. Have you ever covered RailsConf in your lengthy tenure as a journalist/computer enthusiast?

I assume you've never developed a piece of code in your life, only written about computers in enthusiast fashion for the past 20 years. If you had you'd see the difference in a heartbeat.

Let me put it to you this way. When I began work at an insurance company doing software development they gave me a corporate issue Dell and let me spend my time configuring it. While I was doing that, for 10 hours on my first day of work, I opened up my personal Mac, and started doing development through progress bars, one click installers and constant restarts.

Even if the things you say about price comparison are true today, that zealots are paying $500 for a logo. In that case, lets say I'm a software consultant, and not a paid corporate schlep. If I was billing the typical rate of $150 an hour, the 8 hours I just wasted getting my box ready for real live, big boy development would have COST me $700.

Finally, try building out one of Dell's professional Precision workstations, do all the upgrades to get it to the price of the base model Mac Pro and see what you come up with. I end up with $100 more, and I didn't even include antivirus software. Dell won't let me link the customized model, otherwise I would have. When the Mac Pro first came out I did the same comparison with the 8 core Mac Pro (when that was the base model) and the Dell ended up being $1300 more at the time.

The individual components when customizing on the Apple website scale more cheaply than Dell in most cases, but I guess that would have been too much work to actually look.

I may have drank the Mac kool-aid sir, but looking at your curriculum vitae, it looks like you sold your soul to Gates and Ballmer long before I even took sides on this most ridiculous of arguments.

Ugh. I can't believe I wasted that much time concocting that reply. I didn't even go into the TCO arguments that are always bandied around. It just struck me as old and outdated the arguments he was using, and to buy the party line from Ballmer himself is pretty damn stupid.

Its like they say "Winning an argument on the internet is like winning the Special Olympics. Even if you win you're still retarded." Ooh, what did I just say? Am I going to have to issue an apology like Obama now?

Monday, March 16, 2009

Ruby on Rails on Mac (AGAIN)

I've set up RoR on my Mac about three times in the past month. I decided to buy a new hard drive for my old MBP. How old? One of the first ones off the boat (February 2006). I only bought it right after it came out because someone stole my old iBook out of my FEMA trailer and I needed a development box quickly. It worked well for a while but I decided to install a new HD because I was worried the old one might give up the ghost on me soon. So with installing Leopard on my MBP, installing the new HDD and now buying my new hotness, the LATE 2008 MACBOOK PRO, I've had to configure a new box for Rails development so many time you'd think I could do it with my eyes closed.

Not that I despise it, the installation is a snap, but there are always a few things I seem to forget, so here they are in the hopes that someone googling around might find it useful (and I know where to look!).

As my friend Luis suggests, the first thing you should do is preserve the Rubygems that come with your computer by setting GEM_PATH to their original location. Follow the link, its crucial in my opinion.

If you are forced to do development using MySQL, you have to do a few things because Leopard comes with PostgreSQL support only. There are two options for this. Download the MySQL 5 package from mysql.com (get the x86-64 version if you have the new hotness), or follow these excellent instructions on hivelogic for how to do it the command line way. Either way is fine, the former gives you a MySQL prefpane that you can use to start and stop the server, the latter gives you some knowledge of what's going on behind the scenes of your MySQL installation, as well as lets you upgrade it whenever there is a new binary rather than waiting for someone to package it up for you.

Installing the MySQL gem seems to be goofy as hell, you usually can't just do

sudo gem install mysql

so what I do is

\m/ sudo su

\m/ ARCHFLAGS='-arch x86_64' gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Be sure to change ARCHFLAGS to suit your fancy i386 for 32-bit for example.

Finally, JRuby. You can now use Macports to install JRuby which is awesome.

\m/ sudo port install jruby

You still need to set JAVA_HOME after you do this. In ~/.*your_favorite_shell*_profile add

export JAVA_HOME='/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home'

and you should be fine. BUT, to install rjb (Ruby Java Bridge) it often gives you a grammatically awful error message, "JAVA_HOME not setted" despite it BEING SETTED. So I usually just export JAVA_HOME directly in my terminal session so that it has an easier time finding that shell variable.

I think that's everything that needs to be done to a Leopard box to do RoR development with a MySQL database and JRuby. I may have missed something, I wrote this at the end of the workday.

Saturday, March 14, 2009

Blizzard Downloader Full Client

This is more to remind myself than anyone else out there (my two readers) but here's the link to the universal WoW Full Client Downloader. I always seem to have trouble finding this link, and after sitting through patches to 3.0 for a day straight (you know how it be) I find this. Sigh.

I tried to run the client with just Burning Crusade installed, then the client reminded me that my account was fully upgraded and provided this awesome link
I don't have to deal with the tyranny of disks ever again. Huzzah.

Monday, February 23, 2009

Hulu + Content Distributors


I spent a few hours last night fooling around with an application called boxee, which allows users to have a single point of entry into a wealth of online content via a sleek interface, as well as watching Dollhouse, the new show from Joss Whedon, on Hulu. I was actually driven to use boxee after I found out that it no longer allowed a feed from Hulu after their content providers told them to make the service inaccessible to Hulu.

The thing that attracted me to boxee was its intent to gather all of the streaming web content and put it in one place, controllable via Apple Remote or likewise. AppleTV or FrontRow for the web. It doesn’t do away with the ad supported nature of these services, and it shouldn’t. I’ve made peace with the fact that I can watch streaming web content if I sit patiently through a 30 second ad (I typically just -tab to a browser and turn my sound off but whatever). The terrible thing about these websites run by various content providers is that you have to navigate their awful interfaces in order to get at your content. And they’re all DIFFERENT. Like credit card machines at the grocery store. boxee to the rescue.

Until recently. The creators of Hulu were asked by their content providers to change their service so it wasn’t available to boxee users anymore. What has ensued is the typical cat and mouse game of hackers trying to get around the hacks that the service providers had to put into their pristine software to appease the suits.

Why did they do this? I’ve read many accounts of people making ‘boxee boxes,’ computers (Mac Minis, small form factor Linux boxes) whose sole purpose is to hook into an entertainment center and provide this amazing web content on the big screen. Also, this software runs on Xbox game consoles (hence the name) which are already hooked into entertainment centers, I don’t think this makes the content providers nervous, but it makes the cable providers nervous. They are well aware that they are a dying breed in this age of instant gratification. For example, when I went to MCBIOS this weekend I had TWO 30+ inch flatscreen televisions in my room and what did I do? I watched an episode of 30 Rock (on Hulu) on my 15 inch laptop screen. The TV had no digital cable menu, they merely left me a bookmark on the nightstand that indicated the channels. How quaint. Once I saw that I turned off the TV and put my laptop on the bed to watch me some instant, legal, ad supported Alec Baldwin. I have no interest in channel surfing and I’m not the only one.

This is the future of content distribution, and cable companies and content providers need to learn that its either this or piracy. Dollhouse is a good example.

Joss Whedon couldn’t catch a break with Firefly. It was brilliant, but not enough Nielsen Families watched the show or something so the show crashed and burned. I think Joss has learned his lesson, as evidenced with Dr. Horrible’s Sing-a-long Blog. Hulu has already given a shout out to their viewers asking them to interact with Mr. Whedon, generating juice for the show. When Firefly tanked, the fans had to get vocal to get a movie created that wrapped up the story sufficiently. I hope that services like Hulu will tell the tale of the success or failure of this new show. I didn’t watch the premiere of Dollhouse, don’t even know when it comes on, but I cast my vote and caught up with the show at 1AM last night, at my leisure.

Websites can track site hits, how many times a particular show was streamed, and to what markets, and producers (money-lenders) can see all of this in black and white and see the true numbers of people watching these shows. Hell, they can even see the pulse episode to episode from the vocal minority right there in the comments. I imagine a world where twitter #hashtags are polled as a zeitgeist of public response. If only TV and film executives were listening.