A quick redesign, and new link behaviour

I’ve done a quick redesign of this blog. There are very few visually discernible changes unless you were paying attention, but I did develop a WordPress plugin along the way (perhaps not “develop” as much as “become really surprised by ending up with”).

Mainly, I’ve changed my link posts to behave more like they do at [Daring Fireball](http://daringfireball.net) – now, clicking on article titles in link posts (on the blog and in the RSS reader) will bring you straight to the linked item (this post isn’t one; take a look at the [homepage](http://yjsoon.com) for examples). RSS feeds will indicate these items with “Link” in front, and also include an extra footer with the link again and the page permalink.

If you’d like to try some of this on your own WordPress site, I’ve done up a quick [WordPress plugin](http://github.com/yjsoon/df-style-linked-list_wordpress-plugin) (which, keep in mind, adjusts your RSS feeds only), adapted from [Jonathan Penn’s original WordPress linked list plugin](http://github.com/jonathanpenn/wordpress-linked-list-plugin) (via [Shawn Blanc](http://shawnblanc.net/2009/08/wp-linked-list-plugin/)).

To use, download the plugin ([direct download link](http://github.com/yjsoon/df-style-linked-list_wordpress-plugin/archives/master)), put it in your plugins folder, and then activate it. When posting, you just need to define a custom field in WordPress called “linked_list_url”, which will be the link that your post goes to in your RSS feed, and it’ll behave like a link post.

A quick note, though – the plugin’s behaviour is much closer to DF’s RSS feed, in that it adds a ★ glyph for the permalink at the end of your post item, and also adds the glyph in front of your non-link post titles. Just remember, this affects your blog’s RSS feed only, so you’d have to adjust the look of these link posts on your blog yourself. You can do that by editing the template and making use of the built-in functions.

I’ll add in an option to change the glyph and toggle some of these behaviours in a future version, which I might then submit to the plugin directory. For now, it’s available on a MIT license, so do whatever you’d like with it.

More to come if I continue to procrastinate on real work.

Don’t Panic

I’ve had an iPad for about three weeks now (thanks to two Kevins for bringing back the iPad and case).

photo 1.PNG

I’ve noticed that, despite the [69 million reviews](http://www.google.com/search?client=safari&rls=en&q=ipad+review&ie=UTF-8&oe=UTF-8) already out there, anyone who gets hold of one feels the need to write about his initial thoughts on the device. Ick! Such self-absorbed twats!

Anyway, my initial thoughts on the device:

* It’s been great for reading a variety of things on. I’ve been plowing through articles on Instapaper, PDFs on GoodReader, and books on iBooks.
* Other apps – NewsRack for RSS, Twitterrific for Twitter, SimpleNote for note-taking, ArtStudio for finger-painting, NYT and BBC for news, PenUltimate for quick sketches. So far so good. All these apps are very distracting when I want to settle down and read, though. (Multitasking in OS 4 will probably destroy my attention span for good.)
* GoodReader could do with an icon that doesn’t remind me of the eye of Sauron.
* Hasn’t replaced my laptop yet. However, doesn’t burn my lap when watching videos in bed. (To convert, erm, non-iTunes TV and movie content, I bought [iFlicks](http://www.iflicksapp.com/), which converts videos into iTunes-compatible formats, downloads cover art and fills in episode info.)
* One complaint, I guess – the iPad’s screen could do with greater pixel density. I keep noticing jaggies while reading text.

Summary: love it. As Stephen Fry wrote in his [giddy TIME review](http://www.time.com/time/business/article/0,8599,1976935,00.html), the iPad is truly the closest thing to the Hitchhikers’ Guide to the Galaxy humankind has devised. Douglas Adams would have been proud.

(Wallpaper from talented Apple designer [Louie Mantia](http://mantia.me/wallpaper).)

Fixing iPhone sync error 13019

I tried syncing my iPhone yesterday, and got an “unable to sync, error 13019” error message.

Some quick googling landed me on this Apple support page (Error 13019 during sync), which recommended de-selecting syncing voice memos and trying to sync again. If that failed (yup), de-select syncing music to try again (failed). Then videos, podcasts, etc. until a successful sync could be performed. All of this failed, so the page recommended I “attempt to sync an empty iTunes music library to the device while logged in as a new admin user”. Ugh! No!

What eventually worked for me: looking through the Voice Memos app, finding 8 of the same voice memo, deleting them all then syncing. Hmph.

The good, and the mind-numbingly depressing

First, the good:

Picture 1.png

Designer Jon Hicks’ From Design to Deployment, a 50-minute, 100-slide presentation (downloadable slides at the link, unfortunately no video) on building an entire site (seen here: Cheesophile) from the ground up. Lots and lots of pertinent information about web design packed into some of the most concise and high-impact slides that I could spend hours marvelling at. Most of it is stuff I wish someone had neatly summarised for me years ago, but I definitely picked up some good pointers too, e.g. IE6 debuggery* using hasLayout, an old-browser friendly basic CSS file, and the skipLinks feature. Great stuff.

Then, the depressing:

So the team and I are building a pseudo-content management system for my workplace (as previously mentioned). With the limited amount of time we have, we’ve been unable to develop a full-fledged system (no rich text editor, no role management, limited input/output flexibility, among other things), though the plan is to launch the bloody site as soon as possible, then figure things out on the back-end as and when the need arises.

There was some discussion over email about what our ideal CMS would be like, and Akmal linked us to Swiiit — a local CMS solution that seems promisingly feature-rich. I took a look.

Home.jpg

Arrgh! The pain! I begin rant.

  • The site itself uses table-based layouts. Not a good sign.
  • Uploading files looks like it *requires* ActiveX, so it’s not cross-platform compatible.
  • They’re running on Commontown, which I’ve heard quite a few nasty remarks about from colleagues who’ve used it. All I know is that among the South Cluster sites they’ve created, none have DOCTYPEs.
  • They have some truly terrible copywriting, and can’t even decide between spelling American (“humanization”) or British (“customisable”).
  • The copywriters leave spaces before punctuation marks — unforgivable in its own right, but I suspect that could be a feature of the system. I’m not sure which is worse.
  • A choice quote: “Did you know ??? Swiiit is so efficient that it can handle uploads at the wink of an eye ? This is due to a robust back end engine which fuels its hunger.” It fuels its hunger! But only on Windows browsers.
  • There’s a “test” link on the (rather unintuitively laid-out) menu right now.
  • Hint: When you can’t get the domain you want (swiit.com has been squatted on since 2004, these guys registered swiiit in 2006), adding another vowel really doesn’t make your webpage any easier to find.
  • For that matter, the top-level domain, swiiit.com, doesn’t even bring visitors to their actual page right now, instead bringing users this excellent error message: [pagetree error: Domain ‘swiiit.com’ and owner mismatch (Page ID:374 owner:7 domain:)]
  • Also amusing: Take a look at the stock photo on the swiiit.com homepage, then at the IPTV World Forum Asia homepage (thanks Steven for that one).

How do these guys even survive? I wouldn’t be so annoyed by some amateur web company that looks like it’ll die off on its own, but they happily trumpet their golden ticket on their front page:

Swiiit is awarded the Ministry of Education’s bulk tender “The Provision of Development and Maintenance Services for School Websites” (August 2007). We will endeavour to provide the best services to the schools who are included in this tender and will strive to increase their productivity and communications through the use of Swiiit portals.

Arrrgh! (And not just for the questionable grammar.)

In my last few months in a position to make or influence IT decisions at work, I’ve come across quite a few truly hideous systems that have been brought in. Some were purchased by previous decision-makers, others were pushed down by the Ministry of Education, and some (I’m ashamed to say) I had a part in approving, tacitly or otherwise. Nobody really knows that most of these vendors are offering some truly horrendous products until it’s too late, and teachers and education administrators just aren’t the sort who bother to go around identifying something better (or if they do, they just aren’t able to convince their bosses that the last $20,000 purchase was wasted).

It saddens me that this is happening, but I guess the fact that there’s so much crap lying around the local education scene means there’s a good opportunity for people — especially those who know what schools want — to deliver these needs effectively.

Something to think about for the next 2 years and 4 months until the bond is up, I guess.

* I’m pretty sure “debuggery” is not the word I’m looking for here.

Firebugging work

I’ve been quite unnecessarily pleased with myself today, and this is why:

Yesterday was the last day for us to enter our students’ grades into the school’s results management system. As usual, I procrastinated badly, and ended up finishing my marking only at around 12.10am. I figured our programmer guy would give us some leeway and only disallow mark entries the next morning, right? After all, the school administrators aren’t going to print the result slips at 1am, and that’s the only reason they had a deadline in the first place.

Wrong.

Suck it, disabled update button!

Stumped, I thought I’d have to email my boss and explain how busy I’d been (which I guess I have… but I really could have finished marking sooner) and ask for an extension, and with her approval, I could then request for programmer dude to open the system up for me. This is the point at which I noticed this icon sitting in the bottom right corner of my Firefox window:

RPMS - Raffles Institution Pupil Management System (Enhanced)-1.jpg

Firebug!

With live HTML editing!

Open debugging window, enter inspect mode, delete “disabed=’true'”!

Update successfully!

Bwa ha ha!

Yeah, it’s rather childish, but I don’t often get to apply ridiculous hacks in my line of work, so this felt pretty epic. I heart Firebug.

Fame and Fortune with Bond Counter

About half a year ago, to celebrate the halfway point of my scholarship bond, I wrote a simple Facebook application called Bond Counter. The program simply plonks a countdown on one’s profile page that describes how long more one has left in indentured servitude, probably to some Singaporean government body (and, optionally, how much money is left in that bond).

An excerpt from an article (PDF) talking about scholarship bonds from today’s edition of “My Paper”, a local daily publication:

There’s even an application on Facebook which tracks the number of days one has left to serve out.

Yes! Fame and fortune! Someone buy out my app, with all its 500 users!

The new Javascript countdown timer

I got a couple of requests for a version of the bond countdown timer that’d work with Blogger or any other non-self-hosted blogging system.

Here it is, with comments and all too. See, two years of teaching programming style haven’t gone down the drain. Much.

<script type=""text/javascript">

function formatAsMoney(mnt) {
    mnt -= 0;
    mnt = (Math.round(mnt*100))/100;
    return (mnt == Math.floor(mnt)) ? mnt + '.00'
              : ( (mnt*10 == Math.floor(mnt*10)) ?
                       mnt + '0' : mnt);
} // from http://www.rgagnon.com/jsdetails/js-0076.html

/*

Simple script that writes out a line of text with how many days
of bond left to go, and how much it's worth right now if paid up.
E.g. "1870 days and $496250.40 left to go". Extremely
depressing.

Variables to change:

enddate:
The end date of the bond, assuming a full (4/6/8-year) bond.

enddate_discount:
The end date of the bond assuming it's completed. Applies only
to those who serve full-time NS and have half of that counted
towards the bond (usually 10 months), or teachers whose NIE term
isn't counted unless they complete the bond.

startdate:
First day of work.

bond:
Bond value with interest and LD. Assumes a linear depreciation
of an already-compounded bond value with liquidated damages.
The amount signed on the contract can be used as a rough estimate.

OPTIONAL -- nowdate:
Change to a date in the future e.g.
nowdate = new Date("June 20, 2009");
to see how much to pay at that point of time.

*/

var enddate = new Date("June 20, 2011");
var enddate_discount = new Date("August 20, 2010");
// Uncomment this following line if end date is fixed:
// enddate_discount = enddate;
var startdate = new Date("June 20, 2005");
var bond = 500000;

var nowdate = new Date();
ms1 = enddate_discount - nowdate;
days = Math.floor(ms1 / 86400000); // from millisecs to days

document.write(days);
document.write(" days and ");

total = enddate - startdate;
ms2 = enddate - nowdate;
rem = formatAsMoney(ms2 / total * bond);

document.write("$");
document.write(rem);
document.write(" left to go");

</script>

To use, copy and paste the entire section into anywhere you want the words "x days and $y left to go" to show up, making sure to customise the variables for your own situation — bond value and the start and end dates. If there’s an error, let me know by email or on the comments.

Enjoy 🙂

upgrade complete

After an afternoon of fiddling with MySQL export functions and a mess of CSS, I’ve finally managed to upgrade this site to use WordPress. It’s quite the improvement over b2, which should be no surprise since it’s a follow-up version of the program.

Pretty smooth transition thanks to this site‘s instructions. Though one of the lines — DROP TABLE wp_settings — wasn’t applicable to my install (WP1.2). Took it out and everything else worked perfectly in the import. (Edit: To the author at wild-mind.net: Much appreciated for the help, and also in pointing out a textarea problem which went unnoticed on my Firefox browser)

Except there was still the resultant mess of incompatible CSS which took me a couple of hours to sort out into the site’s present incarnation. There are even three flavours of syndication available for the site now — RSS, RSS 2.0 and ATOM. My geekmind boggles.

Uh, in case none of that made sense, comments are back up so you can complain about it.