Wednesday, March 31, 2010

Classification algorithms, the easy way

Weka is a wonderful, wonderful tool.

Nokogiri: DOM vs XPATH...

... FIGHT!

In the one corner: The object-oriented approach to selecting certain child nodes,
 node.children.filter( "criteria" )


In the other corner: XPath,
 node.xpath( "criteria" )


Who will be the champion?

It's a knockout! XPath just wipes the floor with its opponent!

Lucid OSCAR

Getting Oscar to run on Ubuntu Lucid is not a terribly arduous task. For the most part you can follow this guide, with some modifications of course:

* Don't install Tomcat from the Ubuntu repos. You'll only find Tomcat 6, and it's too much of a hassle to get Oscar to run on that (for now - word is in the Oscar scene that they'll release a new official version around June, and I'll bet you dollars on a dime that it will support the new Ubuntu LTS out of the box). For now, just grab Tomcat 5.5 off of the Apache site, and follow any run-of-the-mill installation guide for it.

* Just go with Ubuntu's default-jdk.

* If you're comfortable with Ubuntu's upstart you don't need to restart the machine, just (re)start the necessary services.

* Don't use the Oscar snapshot referenced in the guide. You may use the Oscar snapshot referenced in the guide, but do not use the pre-archived (09.06) snapshot on the Oscar download page. The MySQL scripts of that version are broken. I've had no problem with the bleeding-edge CVS snapshot. Sometimes the bleeding-edge CVS snapshot breaks, but it works most of the time.
** When running the MySQL script with the bleeding-edge CVS snapshot, where the guide instructs you to just enter the password instead of ****** you need to enter both the username and password, i.e.
./createdatabase_on.sh root <mysql_rootpassword> oscar_mcmaster 

* The SSL certificate line probably won't work for you. I haven't played much with it yet, but until you change it you won't be able to log into Oscar. The oscar.war file contain its own oscar_mcmaster.properties file which WILL override the oscar.properties in your Tomcat directory. For the most part that is no huge problem, except that it also overrides the MySQL password that you set, thus making you unable to log in. You can either set the MySQL password to be the same as the original one in the oscar.properties file (BAD idea), or you can change the oscar.properties file BEFORE running ant.

Tuesday, March 23, 2010

Lenovo G550 wireless with Ubuntul Lucid beta

Forget about it. Kernel 2.6.32 is borked with regards to the compat drivers. 2.6.34 has compat built in, so you can use the ubuntu-supplied b43 drivers, but the firmware is still (pardon my French) fucked up. Save yourself a lot of headaches and just get yourself a nice USB wireless card using a Ralink rt73 chipset. They run for $15 these days and work just peachy.

The G550 has a bcm4315 chipset (4312 rev01). It is a royal pain in the neck to work with.

First of all, forget the default drivers.

Second, forget the automatically-suggested non-free drivers.

So, what DO you do? Well, you visit linuxwireless.org and install the 'bleeding edge' compat-wireless drivers (Search the page for those words). Installation is fairly straightforward, just download, untar, and follow the README.

THEN you go to the b43 firmware page and follow the instructions for the 'LP-PHY' cards (again, search for the quoted text). Do NOT use the Ubuntu guides, they won't get you the correct firmware.

Finally, you update initramfs with `sudo update-initramfs -vuk all'.

Friday, March 19, 2010

Epiphany

Epanaphora = Continuity.

Wednesday, March 17, 2010

OSCAR (not the grouch)

Interested in getting OSCAR up and running? Skip the VM image - it's corrupted. Good luck with the .ISO installer - It does not like rebooting. So what is one to do in such cases? Why of course, go and roll your own installation. Wish me luck... It's going to be a long night.

Monday, March 8, 2010

Ruby and XML

Working with Ruby and XML can be a hassle if you use the default parser, REXML. Fortunately there is Nokogiri, a feature-rich XML and HTML parser with good performance and a significantly better API (albeit lacking in documentation). It is not a strict DOM parser, but it is SAX, SAX2 and XPath compliant, and can handle DOM-like work fairly decently so that you won't feel too much like a fish out of water if that is what you are comfortable with.

Bell Canada Lies

When I receive a telemarketing call, a sensible service representative will apologize, put me on the list, advise me that it may take X days for it to take effect, and we're both happy and go our way. Not so with Bell.

See, Bell Canada service representatives will turn a deaf ear to your requests to be put on their do not call list, claim to know that you are a customer of [major rival company] (which you are not), constantly drone on about how their service is better than what they think you currently have, and hang up on you when you ask them if they understood your words. Rinse and repeat every two weeks.

Bell Canada is a hive of scum and villainy, they will lie to your face about their services, and they engage in uncompetitive business practices (such as naming their copper DSL service 'Fibe' -- Which is awfully close to 'fiber' and will confuse customers who are not savvy in tech matters).

Bell Canada's own support representatives are constantly pushed to sell Bell services when a customer calls in with a support question. Actually helping their customer is not valued, only average handling time and amount of services sold. Bell's own policies promote service mediocrity, and their call centers have a horrible turnover rate.