Another blog update
I’ve updated this blog again, using my latest Typo patches. It’s currently running Rails 0.13 (less then 2 days old), Typo SVN r280 (the most recent), and every change that I’ve submitted to the Typo Trac system. This includes:
- Per-article RSS feeds, so you can track comments and article changes via RSS.
- Fixed ‘comment’ link on the main index page; it now points to the
#commentanchor instead of the head of the article. - Configurable number of articles included in index pages and RSS feeds.
- Improved comments. This includes comment threading, per-comment subject lines, and optional email addresses.
- Better text filtering, so I can use SmartyPants-style quote fixing and use different filtering styles for comments and articles.
Blog upgrade: now running Typo with my patches
I just upgraded this blog. It was running the latest released version of Typo (version 2.0.6). It’s now running a development version of Typo from Typo’s Subversion tree, plus the patches that I posted here earlier.
One upshot of this is that threaded comments should now work. Feel free to play with them here. If you have any problems with them, then please send me mail. Thanks.
One other change is that comments are now formatted with Markdown, so it’s easy to use bold, italics, lists, and links. See the Markdown page for details; eventually I’ll add a blurb to the comment form explaining the simple stuff.
Typo is live
As of about 5 minutes ago, the Typo version of this blog is now live, and the old Movable Type version is disabled. All old URLs should still work–I spent quite a bit of time generating a list of redirects to send each old page to the correct URL in Typo.
I still have a lot of template work to do–this site looks really plain to me, and I’ve been meaning to redesign the site for a while now, anyway. That should happen over the next week or so. I’d also like to implement threaded comments in Typo. The display end of threaded comments looks trivial to implement, but I’m not so sure about the other end of things.
Update–Wow, Typo publishes new articles way faster then MT did. From clicking the ‘Publish’ button in Ecto to seeing the new article appear in NetNewsWire is only a couple seconds. MT 2.6 took around a minute before the article was ready. On the downside, categories in Ecto seem to be broken.
If anyone sees problems with the new site, either leave a comment here or send me mail. Thanks.
Typo, part 2
I’ve spent most of the evening playing with Typo, and I believe I’ve fixed all of the problems that I was seeing this morning. Most of the problems that I saw were caused by the import script; adding a bunch of ORDER BY clauses suddenly made it import items in the same order that they were originally created.
At this point, I’m nearly ready to make it live. I just have three issues left:
Typo doesn’t ask for email addresses for comments, even though there’s a spot in the DB for them. I’ve found that it’s a lot easier to respond to people when the can provide me with an email address, even if it’s never published.
Similarly, there’s no way for it to display *my* email address. This should just be a quick template hack.
Finally, I really dislike Typo’s default date format. Instead of providing an exact date, it says things like “Posted by Scott 672 days ago.” It looks cool for recent entries, but it’s pointless for anything more then a couple weeks old.
That’s pretty much it. Once those are done, I’ll make Typo my primary blog and start turning Movable Type off. If anyone’s interested, they can see my work-in-progress Typo blog, although I don’t guarantee that it’ll always be running.
Typo, part 1
My test installation of Typo is up and running. First impressions:
It’s easy to install, once you have Rails working. I’d never actually installed Rails on my home web server, so I had to do the whole install gems, install rails, hunt down dependancies bit. I had an early version of Active Record installed, and it was being loaded instead of the current version that comes with rails, so I had to hunt it down and kill it.
The MT-to-typo conversion script worked okay, once I fixed the MySQL-isms in it. Specifically, it assumed that it could access the MT database by using
databasename.tablename; that syntax gets you into different namespaces in Postgres, not different databases. I worked around it by copying the MT tables into the Typo database and then removing thedatabasename.part of the queries. It probably would have been easier to just passpublicas the database name, though.The script also assumes that all articles are formatted as HTML. Mine are (almost) all Markdown. To fix this, I had to install BlueCloth (
gem install bluecloth) and then rebuild all of the cached versions of each of my articles. There’s no obvious way to do this in the Typo UI, but Typo’s internals makes it easy. All I had to do was run the Railsscript/consolecommand and then runArticle.find_all.each { |article| article.text_filter='markdown'; article.save }. For the Ruby-phobic, this iterates through each Article in Typo’s DB, changing the formatting type and then saving the results back to the DB. Typo’s Article model hooks thesavemethod to verify that text format conversions are handled correctly, so that’s all I really had to do. Nice and simple.It’s kind of slow. I’m running Typo in debugging mode right now, and Rails is always slow in Debugging mode. I suspect that Typo will still be a bit pokey, even in production mode, though. I need to look into how it handles caching.
For some reason, not everything is sorted correctly. The ‘latest comments’ sidebar seems to be sorted randomly. This is probably an artifact of the conversion script–it looks like entity IDs aren’t in the same order as they were in MT, and that screws stuff up. That’s just a one-line fix to the conversion script.
Comments are listed newest-first. I’d rather have them appear in the order that they were written. This should be a one-line change.
The admin interface is sort of sparse. Rails makes it really easy to make calls directly into Typo’s API from the command-line, so I’m not too concerned with the lack of things to click on.
Somehow, some of the Article-Category associations were lost during the conversion. Most of them seem okay, but not all of them. This might take a bit of work to fix.
The categories list on the sidebar seems to be in ID order; it should be sorted by category name. This is easy to fix.
Nothing here looks fatally broken. I need to spend 15 minutes updating the conversion script and another few minutes fixing little issues with Typo, but the system seems to work well enough, at least on initial inspection. I’ll re-import the MT data again later today using the fixed conversion script, and then see what it takes to get it working with Apache in production mode. If that works out okay, then I’ll spend some time tweaking the CSS to make it look a bit more like my current site and then make it live.
Oh–one more thing–I need to have the conversion script save the old URLs from each entry to a file so I can write a bit redirect list that will point each MT article’s URL to the new Typo URL. I get too much traffic from Google to lose all of the links.
Movable Type upgrade, Part 2
Last night’s upgrade to Movable Type 3.17 went fairly well. The upgrade from 2.6 to 3.17 was trivial–it installed and ran without problems. I didn’t really expect that, but I wasn’t about to complain. Once I verified that 3.17 was working, I started the process of moving Movable Type from using the Berkeley DB onto PostgreSQL, and then things started breaking.
Movable Type, like most open-source software, was really designed to use MySQL, with Postgres support added later. I’ve found a lot of software that’s supposed to work with Postgres, but actually fails in a number of fundamental ways, simply because there are a number of MySQL-related assumptions lurking in the code, and no one actually tested the system against Postgres.
In Movable Type’s case, the BDB-to-SQL conversion script is able to create the right set of tables in Postgres, and it’s even able to populate the tables with all of the right data. Unfortunately, it fails to update the sequence counters for any of the tables, which causes new articles and comments to show up as ID #1. If you already have a #1, then posting new articles and comments will silently fail.
It took me most of an hour to track that back and figure out why new comments weren’t being posted. Then it took about 15 seconds to fix–just do a select max(comment_id) from mt_comment to determine the maximum comment ID, then do select setval('mt_comment_id',9999), replacing 9999 with the number from the previous select. Then repeat for every table in the DB.
So, once that was done, everything worked, right? Ha. I was now able to post new comments and articles, but they didn’t show up on my site. Hitting ‘rebuild’ didn’t actually rebuild anything. So what happened this time?
Ah, the conversion script failed to populate the template table, so MT didn’t know which pages to build. Fortunately, I keep all of my templates in text files, not in the DB, so it only took 15 minutes to re-enter all of the template data; once that was done I was able to add comments and articles without problems, and hitting ‘rebuild’ correctly rebuilt the whole site.
So, everything appears to be working now. On the plus side, comment posting is way faster–it used to take around 30 seconds from the time users hit ‘publish’ until the browser reloaded. Now it’s down to 5 seconds or so. Hopefully that’ll cut down on the spate of duplicate comments that I’ve seen, because people won’t be so tempted to keep hitting ‘publish’ every ten seconds until it works.
Now that that’s done, I’m going to move on to testing out Typo. I noticed that the MT-to-Typo conversion script has a couple obvious MySQL-isms in it, but the script is so short that it shouldn’t be hard to work around.
Upgrade to Movable Type 3.17
I’ve been promising to upgrade this blog to something more modern and interesting for over a year, and still haven’t done anything about it. I looked at Drupal for a while, but it just isn’t what I’m looking for.
So, for now, I’m going to upgrade from MT 2.6 (using BDB) to MT 3.17 (on Postgres). Then, once I have a bit of time, I’ll probably move to Typo, largely because it’s written in Ruby and looks easy to hack. It’s lacking a few things that I really wish I had (like threaded comments), but the code is so clean and simple that it shouldn’t take long to add them.
I’d jump straight to Typo, except that the MT-to-Typo conversion script requires MT 3.x to work. So I’m going to upgrade MT first, and then later this week play with Typo and see how it goes.
Once I start the MT upgrade, I expect everything here to break for a few hours. I don’t see an easy way around that, though.
90
I was looking at my web logs last night, and noticed that (as usual) I was seeing a lot of hits coming from Google searches, but a lot of them were from country-specific Googles like google.co.uk, not just google.com. So, out of curiosity, I spent a few minutes writing a couple little scripts so see just how many different Googles have sent traffic to my site over the last year or so. The answer?
*90*.
Yep, 90 different countries worth of Google, counting .com as a country. The full list is below the break.
Here’s the full list, including the most common search terms from each country:
| Rank | Country | Hits | Most common search terms |
|---|---|---|---|
| 1 | .com | 44492 | asterisk treo 650 ace mythtv 600 phone seattle pap2 tivo |
| 2 | Canada | 2869 | asterisk treo 650 mythtv pap2 600 to vs linksys sip |
| 3 | United Kingdom | 2341 | asterisk mythtv mpx200 treo review cisco x1a bluetooth infocus phone |
| 4 | Germany | 1562 | asterisk fax sip bluetooth spandsp cisco mythtv subversion webdav apache |
| 5 | Australia | 1107 | asterisk mythtv fax treo cisco config 650 review bluetooth to |
| 6 | Netherlands | 842 | asterisk mythtv mpx200 review cisco modem fax bluetooth treo sip |
| 7 | France | 817 | asterisk treo fax spandsp sip 650 modem smart bluetooth config |
| 8 | Italy | 674 | asterisk fax mpx200 bluetooth treo modem rxfax scottstuff spandsp to |
| 9 | Spain | 437 | asterisk mpx200 tablet review fax pc motorola modem mini linux |
| 10 | Sweden | 405 | asterisk mythtv sip review treo fax to tungsten linux dvg-1120 |
| 11 | Belgium | 335 | asterisk mythtv review cisco modem infocus x1a mpx200 tungsten fax |
| 12 | Denmark | 320 | asterisk pictures sip christmas bluetooth mythtv cisco review vancouver fax |
| 13 | Switzerland | 306 | asterisk treo mythtv fax config sip 650 subversion x1a infocus |
| 14 | India | 304 | asterisk to in for how treo linux sip 650 the |
| 15 | Brazil | 282 | asterisk modem pap2 linksys fax config sip tungsten example t4 |
| 16 | Poland | 250 | asterisk fax pap2 modem mpx200 linksys bluetooth sco.pl sip spandsp |
| 17 | New Zealand | 232 | asterisk cisco mythtv treo fax example modem call to 7912 |
| 18 | Singapore | 230 | treo asterisk 650 review mpx200 ace vs wifi to pc |
| 19 | Austria | 215 | asterisk fax cisco bluetooth call config forwarding modem spandsp infocus |
| 20 | Finland | 177 | asterisk mythtv mpx200 linux review dvd fax motorola bittorrent d2x |
| 21 | Russian Federation | 170 | asterisk mpx200 modem fax sip.conf linux voice for sip rxfax |
| 22 | Malaysia | 168 | asterisk mpx200 treo tungsten 650 digium fax review bluetooth to |
| 23 | Mexico | 164 | asterisk treo sip pap2 fax 650 example linksys and echo |
| 24 | Argentina | 145 | asterisk modem example pap2 linksys review ivr mpx200 cdr fax |
| 25 | Norway | 142 | asterisk mythtv modem sip cisco 7970 extensions.conf call voice example |
| 26 | Hungary | 130 | asterisk mpx200 review linux fax attribute config modem bluetooth motorola |
| 27 | Japan | 120 | asterisk treo flipstart mac spaceship one sd pictures palmos ruby |
| 28 | Taiwan | 117 | asterisk treo 650 ivr rxfax wifi one linux spaceship ace |
| 29 | Hong Kong | 109 | treo asterisk 650 vs 600 sip wifi canon bluetooth and |
| 30 | Ireland | 108 | asterisk mythtv with ireland pictures ruby balance a to scraping |
| 31 | Philippines | 100 | treo asterisk 650 600 vs ecs tablet pc and pap2 |
| 32 | Portugal | 97 | asterisk modem fax treo 650 bacula sip phone scottstuff example |
| 33 | Turkey | 94 | mpx200 asterisk review motorola call phone card pc linux pap2 |
| 34 | Greece | 92 | asterisk mpx200 modem call sip motorola bluetooth review dial and |
| 35 | South Africa | 89 | asterisk fax to mpx200 mythtv on analog email bluetooth extensions.conf |
| 36 | Thailand | 77 | asterisk config modem ecs treo 650 ez30 bluetooth tablet phone |
| 37 | Romania | 75 | asterisk cisco modem book linux pictures motorola for config example |
| 38 | Chile | 72 | asterisk fax tungsten modem t4 treo cdr 600 example |
| 39 | Korea, Republic of | 54 | asterisk treo review * flipstart 650 ace ruby linux fax |
| 40 | Pakistan | 47 | asterisk sip cisco exten fax in config for is s |
| 41 | Peru | 45 | asterisk fax linksys extensions.conf pap2 pbx in txfax friends album |
| 42 | Ukraine | 44 | asterisk download cisco sip spandsp modem fax sccp 7940 palmos |
| 43 | Israel | 43 | asterisk review t.38 treo sip 650 redial infocus calleridnum frys |
| 44 | Lithuania | 40 | asterisk bluetooth pictures easter txfax room pc amber levy.the bombs |
| 45 | Vietnam | 39 | asterisk config voicemail pictures story webdav apache easter subversion capacitor |
| 46 | Colombia | 37 | asterisk config treo ivr pbx voicemailmain mini pc sl-c3000 modem |
| 47 | Venezuela | 30 | asterisk innova flashlight echo voicemail database with on pap2 modem |
| 48 | Latvia | 27 | asterisk fax backups palm samples disc attribute 195 spam s.m.a.r.t |
| 49 | Dominican Republic | 25 | asterisk cisco 7940 pbx to html scraping with cheating scripts |
| 50 | Slovak Republic | 25 | asterisk easter pictures linux vlan phone xorp cisco spaceship history |
| 51 | Indonesia | 24 | 650 treo 600 router comparison vs ecs asterisk pictures cisco |
| 52 | United Arab Emirates | 17 | the of i speed treo mpx200 environment good importance working |
| 53 | Uruguay | 17 | asterisk modem codec nufone serial config mpx200 review example sdk |
| 54 | Luxembourg | 16 | asterisk fax push talk to powerbook pocketpc 2004 noc network |
| 55 | American Samoa | 16 | treo seattle 650 asterisk wifi ace importing berke sled extension |
| 56 | Malta | 16 | asterisk config bluetooth rxfax yours t5 pots extensions.conf review zapata.conf |
| 57 | Cote d’Ivoire | 11 | asterisk 2004 companies fax personal 82 numbers in config directory |
| 58 | El Salvador | 10 | asterisk bad t4 command script 600 pci a and siemens |
| 59 | Costa Rica | 9 | asterisk fax config ringtones 7912 in to how spandsp mythtv |
| 60 | Nicaragua | 9 | asterisk to voice virtual force download my add connection a |
| 61 | Kenya | 9 | cisco quagga vs asterisk nude usage g711ulaw cpu fax bytes |
| 62 | Ecuador | 8 | seattle mystery novels f8e461 antimatter media language one spaceship reader |
| 63 | Puerto Rico | 7 | 600 asterisk hardware sql via 2006 canon injections 20d 650 |
| 64 | Mauritius | 6 | asterisk keyboard files wav storing review mythmusic iax2 configuration mpx200 |
| 65 | Guatemala | 5 | nufone minitabletpc from canada absolutetimeout voip to how down wet11 |
| 66 | Saudi Arabia | 5 | photo wav ringtones vcard frame25 flipstart |
| 67 | Honduras | 5 | asterisk linksys pap2-na earpiece ivr bandwidth doesnt mpx200 forwarding call |
| 68 | Trinidad and Tobago | 5 | 600 failed spooling a stuff tape raid mac in 650 |
| 69 | Rwanda | 4 | asterisk echo free linux wan to router us building cancelation |
| 70 | Libyan Arab Jamahiriya | 4 | libyan network libya nic.ly hadi networking computer spider nassr |
| 71 | Jamaica | 3 | asterisk pbx baking bay company pap2-na fax linksys elliot |
| 72 | Bolivia | 3 | tecnomilton configuration asterisk raid how array resync |
| 73 | Cuba | 3 | asterisk dial number example outgoing pbx answersip cdrasterisk voip-info |
| 74 | Uganda | 3 | iax.conf score asterisk example filter upgrading maildrop |
| 75 | Azerbaijan | 3 | asterisk applications |
| 76 | Namibia | 3 | driver asterisk bluetooth channel ppp isp zaptel |
| 77 | Micronesia, Federal State of | 2 | notification raid-5 automatic type space movable email |
| 78 | Gibraltar | 2 | control nikon canon 100 vs pc car d2x |
| 79 | Antigua and Barbuda | 2 | treo 650 wifi |
| 80 | Paraguay | 2 | asterisk fax and faxing with |
| 81 | Fiji | 1 | wimax stories |
| 82 | Mongolia | 1 | asterisk extensions.conf sip.conf |
| 83 | Burundi | 1 | svn checkout |
| 84 | Kazakhstan | 1 | ldap cgp 1000 |
| 85 | Kyrgyzstan | 1 | smart prefailure attribute |
| 86 | Jersey | 1 | easter pictures |
| 87 | Greenland | 1 | a without line tivo series 1 phone setup |
| 88 | Liechtenstein | 1 | linux adapter voip using locked |
| 89 | Armenia | 1 | pap2 digits dial-plan linksys |
| 90 | Nepal | 1 | 2005 events autism japan |
More Google Wrongness
I’ve never really figured out why, but Google really likes me. Or, rather, it likes this blog. I keep showing up amazingly highly-ranked in common Google searches. Today’s example is treo wifi. In order, here are the top 10 results, out of 2.2 million possible matches:
- TreoCentral: No Treo WiFi
- TreoCentral: Treo 600 and WiFi?
- .:UNEASYsilence: Treo 650 WiFi
- PDA News: Treo 650 WiFi, Verizon announces XV6600, PalmOne…
- scottstuff: another WiFi solution for the Treo 650
- Slashdot: Enthusiast Hacks WiFi Into Treo 650
- CNet: Treo 650 Update WiFi-less
- Engadget: Add WiFi to your Treo 650! SD WiFi card drivers hacked
- Engadget: some random search page
- PalmInfocenter: HOWTO: Make that palmOne Treo 650 Even Better!
So, as I see this, Google sees me as a better source of information then Slashdot, CNet, Engadget, and PalmInfocenter? It can’t just be PageRank–from what I can see, I’m just a lowly PR5 this month, while Slashdot and CNet are PR9s, and Engadget is a PR6. It can’t be the number of links in Google’s database, because no one links to my Treo WiFi page. Can anyone explain how this works?
My first trackback blog spam
I received my first three pieces of trackback spam overnight. By blog receives tons of comment spam, most of which are blocked by MT-Blacklist, but I haven’t seen any trackback spam before, even though I’ve been expecting it for over a year. Since trackback is designed to be automated, it seems like it’d be easier to abuse then comment spam. Fortunately, a few relatively simple steps should help stop trackback spam. A quick verification step would probably stop most of it–if you hand me a trackback URL, and I go fetch it, is there a link to my page anywhere on the trackback page?
One quick-and-easy suggestion for stopping comment spam–add </a> to your blacklist. MT 2.6 allows HTML in comments, even though it’s not supposed to, and comment spammers always try to stick links in there. Since my comment page isn’t supposed to allow HTML anyway, this does a great job of blocking spam.