Archive for March, 2005


No subqueries on DreamHost either

Tuesday, March 29th, 2005

So MySQL can’t cope with subqueries. Something simple like:

select * from competitions 
  where id in (select competition_id from scores where user_id = 1)

From what I’ve read the 4.1.x series should be able to do this. The version on my account claims to be 4.1.8 but the version the server is running is 4.0.23. But it must be pretty new because even the stable version in Gentoo is only 4.0.28. How on Earth did this database get to be so popular?!?! Simple basic things that PostgreSQL has been doing for ages are only getting into MySQL, it’s really beginning to piss me off.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit No subqueries on DreamHost either digg.com digg it!  |  reddit reddit!

Cancelling your TypePad account is scary

Saturday, March 26th, 2005

TypePad is pretty aggressive if you cancel your account. They immediately delete everything and give you no refund for the remaining period. Thankfully I was only on the monthly subscription. I also did an export, grabbed the atom feed and stylesheet before cancelling. There’s no going back now!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Cancelling your TypePad account is scary digg.com digg it!  |  reddit reddit!

Fixed the permalinks

Saturday, March 26th, 2005

I fixed the old TypePad permalinks. Rather than trying to get the permalink structure in WordPress to match TypePad, I put together some htaccess Rewrite and Redirect rules. Since I only have nine posts on TypePad I just hardcoded them, e.g.:

Redirect 301 /programming/index.html http://blog.milesbarr.com/category/programming/
Redirect 301 /programming/ http://blog.milesbarr.com/category/programming/

RewriteRule ^2005/02/ruby_on_rails.html /2005/02/ruby-on-rails/ [redirect=permanent,last]

I tried just doing redirects for the posts but it kept appending the filename to the new URL, which WordPress’ RewriteRules would translate into URL parameters, which do a search and you just get a ‘No matching posts found page’. The rewrites work fine and send back a 301 so hopefully URLs will get updated automatically. The archive by date pages have the same URL so I didn’t have to do anything for them.

Next stage, try to replicate the old theme in WordPress.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Fixed the permalinks digg.com digg it!  |  reddit reddit!

Changed to WordPress

Saturday, March 26th, 2005

DreamHost offers a one-click install of WordPress, so I figured I might as well try it out. The setup was straightforward and it imported all my old posts from TypePad. This does mean all my permalinks are broken, hopefully this doesn’t affect too many sites. The other annoyance is that most WordPress themes are ugly! I finally decided on Steam, but I think I’ll keep looking. It’s perhaps too simple for my eye.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Changed to WordPress digg.com digg it!  |  reddit reddit!

At least Ruby makes things easy

Wednesday, March 23rd, 2005
def before_destroy 
    scores.each { |x| x.destroy }
end

A lot easier than deleting related objects in Java!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit At least Ruby makes things easy digg.com digg it!  |  reddit reddit!

I want PostgreSQL back!

Wednesday, March 23rd, 2005

DreamHost doesn’t support PostgreSQL. That’s fine, a lot of people use MySQL, so it can’t be that bad. But by default MySQL doesn’t support foreign keys, you need to enable InnoDB for that. And surprise, surprise DreamHost doesn’t current support InnoDB. So instead of a few carefully placed ‘ON DELETE CASCADE’s, I have to manually delete all related objects in my Ruby code. What a PITA, bring back PostgreSQL!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit I want PostgreSQL back! digg.com digg it!  |  reddit reddit!

Installing Ruby on Rails on DreamHost

Tuesday, March 22nd, 2005

After initially deciding to try TextDrive I eventually opted for DreamHost because it looks like they are going to offer better long term stability. But DreamHost doesn’t support Rails natively, and aren’t planning to until it gets into Debian’s stable release, so sometime in 2010. But it’s a pretty flexible host so you can run your own software. I came across this guide for installing Rails on DreamHost:

http://www.numberporn.com/archives/000118.php

Unfortunately, it already appears to be out of date, and the last Apache configuration doesn’t work with the current version of Rails. But that’s just a minor blip because each request reloaded the entire Rails framework, so I doubt it would have been usable.

I decided to give up trying to get it to run inside Apache and just use the WEBrick server that comes bundled with Rails. First startup the server (from the root of your Rails application):

nohup script/server -e production &> log/WEBrick.log &

At this point you should exit your ssh session then relogin because if the ssh session times out it’ll take WEBrick with it, but exiting means nohup will keep it alive.

The next step is to get Apache to forward to WEBrick. In the ‘.htaccess’ file in your web directory, enter:

RewriteEngine On
RewriteCond   %{SERVER_PORT}  ^80$
RewriteRule ^(.*)$ http://www.yourhomename.com:WEBRICK_PORT/$1 [L]

Replacing yourhomename and WEBRICK_PORT with the actual values. This makes Apache redirect all requests to WEBrick. The only annoying thing is it displays the port number in the rewritten URL. This is fine for toy applications, but not good enough for production applications. In theory replacing [L] with [P] is supposed to mask this by making Apache act as a proxy, but it returns a 404 instead. Everything I learnt about Apache configuration I learnt in the past hour, so there’s a good chance I’m doing something wrong.

But anyway that gets your Rails app running on your DreamHost account, which is a definite step forward.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Installing Ruby on Rails on DreamHost digg.com digg it!  |  reddit reddit!

Static typing isn’t so bad

Thursday, March 17th, 2005

So I’ve spent the past week or so putting together a simple Rails application. For the most part I’m impressed, but it’s clear it only 0.10 for a reason. I developed the app using PostgreSQL, which has a native boolean type (non standard of course), which ActiveRecord translates nicely. My web host does not have PostgreSQL installed, but the more popular MySQL.

So I installed MySQL locally and ported things over. It’s things like setting up users and permissions that bugged me the most because Google couldn’t turn up anything useful. The actual port was trivial, things like changing serial to MySQL’s auto increment thing. That is until I found MySQL doesn’t have a native boolean type, it’s just an alias for TINYINT(1). And no matter what this ticket says, they aren’t recognized properly as booleans by ActiveRecord and are treated like ints. So where before the framework did things like translating a checkbox’s default value of ‘on’ to true, I now had a bunch of silent failures.

This is where static typing is nice. It would tell me that ‘on’ is a string and not the boolean value TRUE. Things like ‘if @user.enabled then’ would fail because enabled is an int not a bool. But instead it just runs with incorrect behaviour. Thankfully there weren’t that many things I had to track down.

So this round goes to static typing. Eventually I’ll start seeing an upside to dynamic typing, but at the moment the years of Java programming still make me want to declare every little thing.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Static typing isn’t so bad digg.com digg it!  |  reddit reddit!

ati-tv software ABBYY FineReader 8.0 Professional Multilanguage
ipod nana software ABBYY FineReader 8.0 Professional Multilanguage
easy fax software ABBYY FineReader Professional Edition 9.0 with Djvu Addon
encoder coding software Ableton Live 6.0.9
analytical system software ACD Systems Combo Pack
employee scheduling software Acronis Disk Director Server 10.0
eraise fundraising software Acronis Disk Director Suite 10.0
openeye software Acronis Disk Editor v6.0.360
gateway limited software Acronis Drive Cleanser v6.0 Build 383
tungsten software download Acronis Migrate Easy Deluxe v1.0.0.43
physics software Acronis & Paragon Universal Boot CD USB 2009 1.0
avatar server software Acronis & Paragon Universal Boot CD USB 2009 1.0
imaging software driver Acronis & Paragon Universal Boot CD USB 2009 1.0
software raid performance Acronis PartitionExpert 2003
legislative trackinig software Acronis Privacy Expert Suite 7.0
software listings Acronis Privacy Expert Suite 7.0
art software program Acronis Recovery Expert Deluxe
adams software forms Acronis True Image 7.0
free reservations software Acronis True Image Echo Server for Windows 9.5
panda antiviruse software Acronis True Image Enterprise Server 9.1.3666
microsoft excel software Acronis True Image Home 11.0
tape duplication software Acronis True Image Workstation 9.1.3887
free dayplanner software ActionScript 3.0 in Flash CS3 Professional Essential Training
raft software ActiveState Komodo IDE 4.2.0
software crises ActiveState Perl Dev Kit Pro 7
jq-210 download software Adobe Acrobat 7 Professional for Mac
audit software tracking Adobe Acrobat 7 Professional for Mac
smartist software Adobe Acrobat 7.0 Professional
callender software Adobe Acrobat 7.0 Professional
currency conversion software Adobe Acrobat 8.0 Professional
n95 remove software Adobe Acrobat 8.0 Professional
anderson software internet Adobe Acrobat 8.0 Professional
genealogy publishing software Adobe Acrobat 8.0 Professional for Mac
article distribution software Adobe Acrobat 8.0 Professional for Mac
map maker software Adobe Acrobat 9 Pro Extended
decisionbar software Adobe Acrobat 9 Pro Extended
timekeeping system software Adobe Acrobat 9 Pro Extended
knowledge mapping software Adobe Acrobat V 6.0 Professional PC
writing style software Adobe Acrobat V 6.0 Professional PC
management product software Adobe After Effects 6.5 for Mac
military packaging software Adobe After Effects 6.5 for Mac
knockout software Adobe After Effects 6.5 for Mac
mantel test software Adobe After Effects 7.0 Standard
pst repair software Adobe After Effects 7.0 Standard
pcr software customers Adobe After Effects 7.0 Standard
loopholes software testing Adobe After Effects CS3
ebay software tools Adobe After Effects CS3
volleyball statistic software Adobe After Effects CS3
autoquote software Adobe Atmosphere 1.0
medical documentation software Adobe Audition 2.0
software distrubitor Adobe Audition 2.0
6600 software program Adobe Audition 3.0
buy financial software Adobe Contribute CS3
apartment purchasing software Adobe Contribute CS3
define software application Adobe Creative Suite 2 Premium for Mac
autocad software review Adobe Creative Suite 2 Premium for Mac
pctools software Adobe Creative Suite 2 Premium for Mac
webchat software Adobe Creative Suite 2 Premium for Windows
book software store Adobe Creative Suite 2 Premium for Windows
software remote access Adobe Creative Suite 2 Premium for Windows
aor scanner software Adobe Creative Suite 2 Premium for Windows
software design article Adobe Creative Suite 3 Design Premium for Mac
microstudio 4.001 software Adobe Creative Suite 3 Design Premium for Mac
netscape 8 software Adobe Creative Suite 3 Design Premium for Mac
biblesoft software update Adobe Creative Suite 3 Design Premium for Mac
linux frontbridge software Adobe Creative Suite 3 Design Premium for Mac
code repository software Adobe Creative Suite 3 Design Premium for Win
acceleration software program Adobe Creative Suite 3 Design Premium for Win
clinical database software Adobe Creative Suite 3 Design Premium for Win
midi studio software Adobe Creative Suite 3 Design Premium for Win
aqura software Adobe Creative Suite 3 Master Collection for Mac
ezdata software Adobe Creative Suite 3 Master Collection for Mac
brightstore backup software Adobe Creative Suite 3 Master Collection for Mac
tk20 software Adobe Creative Suite 3 Master Collection for Mac
sequence analysis software Adobe Creative Suite 3 Master Collection for Mac
deployable spy software Adobe Creative Suite 3 Master Collection for Win
dprofiler software Adobe Creative Suite 3 Master Collection for Win
atm switch software Adobe Creative Suite 3 Master Collection for Win
hyperion software operations Adobe Creative Suite 3 Master Collection for Win
voice synthesis software Adobe Creative Suite 3 Master Collection for Win
iomega ghost software Adobe Creative Suite 3 Master Collection for Win
ups calculation software Adobe Creative Suite for Mac
oracle software Adobe Creative Suite for Mac
discount cad software Adobe Creative Suite for Mac
audio software forum Adobe Creative Suite for Mac
architectural renovation software Adobe Creative Suite 3 Master Collection for Win + Microsoft Office 2007 Enterprise
iphone 1.0.2 software Adobe Dreamweaver CS3
edsoft software Adobe Dreamweaver CS3
swing analysis software Adobe Dreamweaver CS3 for Mac
flowsheet software Adobe Encore CS3
lunix old software Adobe Encore CS3
software download drums Adobe Encore CS3
ficiton software Adobe Encore DVD 2.0
ebay software bidding Adobe Encore DVD 2.0
src software incorporated Adobe Encore DVD 2.0
amateur radio software Adobe Fireworks CS3
coin collectors software Adobe Fireworks CS3 for Mac
software package Adobe Flash CS3 Professional
convention software Adobe Flash CS3 Professional
picture software free Adobe Flash CS3 Professional for Mac
software circuit design Adobe Flash CS3 Professional for Mac
lenticular software crack Adobe Flash CS4
journal software engineering Adobe Flash CS4
webpage editor software Adobe Flash CS4
airframe business software Adobe Flex v.3.0.2
delmia software Adobe Flex v.3.0.2
freehand graphics software Adobe Font Folio 11
northrop resume software Adobe Font Folio 11
diabetes software pdas Adobe FrameMaker 7.0
istante software inc Adobe FrameMaker 7.0
vigilance software Adobe FrameMaker 8.0
software kinder preschool Adobe FrameMaker 8.0
dex drive software Adobe FrameMaker 9.0
de elementos software Adobe FrameMaker 9.0
software inspections Adobe FrameMaker 9.0
free cdrw software Adobe GoLive CS V 7.0 PC
ftp p2p software Adobe GoLive CS V 7.0 PC
transmit software Adobe GoLive CS2
becker data software Adobe GoLive CS2
fta firmware software Adobe Illustrator CS V 11.0 PC
liquids marketing software Adobe Illustrator CS V 11.0 PC
motorola v-180 software Adobe Illustrator CS2
explore anywhere software Adobe Illustrator CS3
outsourcing software solution Adobe InDesign CS V 3.0 PC
wntipcfg software Adobe InDesign CS V 3.0 PC
opengl software program Adobe InDesign CS2
nokia 6102i software Adobe InDesign CS2
free coloring software Adobe InDesign CS3
opp blackjack software Adobe InDesign CS3
astronomie software free Adobe InDesign CS4
monitoring email software Adobe InDesign CS4
development proposal software Adobe InDesign CS4
software cpu underclocking Adobe PageMaker 7.0.1
feko software Adobe Photoshop Album V 2.0
educational software seattle Adobe Photoshop Album V 2.0
learning measurement software Adobe Photoshop CS for Mac
flir software Adobe Photoshop CS for Mac
gps tracks software Adobe Photoshop CS v.8.0
free donation software Adobe Photoshop CS v.8.0
software updating freeware Adobe Photoshop CS2 for Mac
mountbridge software Adobe Photoshop CS2 for Mac
scream software seismic Adobe Photoshop CS2 V 9.0
software requirements plan Adobe Photoshop CS2 V 9.0
mpeg4 slideshow software Adobe Photoshop CS2 V 9.0
french genealogy software Adobe Photoshop CS3: Enhancing Digital Photographs
free software imac Adobe Photoshop CS3: Enhancing Digital Photographs
graphics benchmarking software Adobe Photoshop CS3 Extended
firewall software features Adobe Photoshop CS3 Extended
automatic prayer software Adobe Photoshop CS3 Extended
pine software examples Adobe Photoshop CS3 Extended for Mac