Archive for the 'Geekiness' Category

The good, and the mind-numbingly depressing

Monday, April 21st, 2008

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

Wednesday, April 9th, 2008

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

Wednesday, March 12th, 2008

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!

Breaking the NIE practicum webpage

Saturday, January 28th, 2006

The NIE Practicum Office website has this nasty piece of incompatible JavaScript that renders the page unusable in any browser but Internet Explorer. Essentially it’s a JS DOM trick that shows and hides blocks of information below sub-headings, but implemented wrongly at the “checking for browser compatibility” level, so all browsers but IE get the wrong scripts to run.

To solve this problem, I wrote fixpracticum.user.js: a Firefox script for use with GreaseMonkey that enables the hidden blocks’ visibility by default. After I wrote that, I was all pleased with myself and was about to write something similar (CSS-based) to fix the problem in Safari, but I noticed that if one just disabled JavaScript when viewing the site, that worked just fine too, i.e. (pun unintentional), the hidden blocks are visible by default.*

Oh well. Whatever works.

* This is because the webpage doesn’t use a separate stylesheet to hide them, instead running some JS code to inject the “visibility:hidden” and “display:none” styles into the code upon loading the webpage. Oddness.

Tags:

WordPress 2.0 FeedBurner plugin issues

Saturday, January 7th, 2006

I’ve been using Steve Smith’s WordPress Feedburner Plugin to send my feeds over to FeedBurner — it’s a simple mod_rewrite strategy that first rewrites a local feed into some secret random address, which you point FeedBurner’s aggregator at, and then sends all feed traffic from here to FeedBurner’s resultant page.

Only thing is, WordPress 2.0 seems to have mucked something up with their new permalink rewrite engine, resulting in an odd error: The secret random feed address gives a 404 error in FeedBurner (and FeedValidator), but shows the feed fine in web browsers. This apparently only occurs when one has set WordPress to deliver custom permalinks (e.g. site/archive/date/title, as opposed to site/index.php?p=5). Explanation, from an outdated FeedBurner support page:

The issue works this way because browsers are supposed to render the Error Document that is sent when a requested URL is not found; in this case, the Error Document itself will be the feed. But with web service systems, there is no benefit to rendring this file (as it is not a feed) so most of the systems (including ours) stop processing at the 404 error report.

Here are the solutions I’ve found so far from the plugin page comments (after searching for over an hour): Switch back to default permalinks in the WordPress options, or edit .htaccess manually, changing /wp-rss2.php [QSA,L] to /wp-rss2.php [QSA,R,L]. From what I know about mod_rewrite (not very much), the R stands for “redirect to new URL”… but that’s all I know. Anyway, I’ve adopted the latter solution, which is preferable because I don’t have to ruin my established permalink structure.

Hope that helps someone trying to find an answer to this issue.

Flock theme for Firefox

Saturday, December 3rd, 2005

While we’re on the whole theming business, but I thought I’d point to this: Flofox - Flock theme for Firefox [UNEASYsilence]. Makes Firefox look like the (interesting, and much prettier, but for me not currently worth running without a compatible SessionSaver extension) Flock browser.

The theme does look a bit odd on my Linux box though (running Firefox 1.5) — the favicons in the tab bar look a bit stretched. To fix this, simply edit your userChrome.css file and add the following lines to the end:

.tab-icon {
padding-top: 1px !important;
padding-bottom: 3px !important;
}

Looks fine for me now. Your mileage may vary, and all that — edit the padding amounts as necessary.

Tiger theme for del.icio.us

Wednesday, November 30th, 2005

I’ve been working on a skin/theme for my favourite online bookmarker, del.icio.us. It’s based off of something the brilliant Jon Hicks did a while back (though I can’t find his original post now), and essentially preserves the layout of the site while giving it a less plain look reminiscent of Safari’s RSS view header.

Delscreenshot

The CSS file is downloadable here.

To use in Safari, use some kind of site alteration plugin like SafariStand or PithHelmet, and select “custom CSS file” for del.icio.us, then point it to the downloaded file.

To use in Firefox (untested!), try loading it in greasemonkey. I’ve hacked together a quick user.js script with the above CSS (adpated from here), but I’ve been unable to get greasemonkey working with Firefox 1.5 on my Mac, so I’m not sure if it works.

Note: The CSS links to the background image tiger stripe (again, based off of Hicks’ work) that’s hosted on my own server, which you might want to download and put on your own server in case mine goes down (or to adjust for height).

Your mileage may vary, and all that. Let me know if there’s anything worth fixing.

Tags: , ,

The bond counter: Peanut version

Monday, July 25th, 2005

Inspired by the whole NKF saga and mrbrown’s very amusing last entry in SNE108, I’ve rewritten the bond countdown timer to give the amount payable in peanuts (locally defined currency, where one peanut == S$600,000).


<script type=""text/javascript">

function formatAsPeanuts(mnt) {
mnt -= 0;
mnt = (Math.round(mnt*1000000))/1000000;
return mnt;
} // modified from http://www.rgagnon.com/jsdetails/js-0076.html

/*

BOND COUNTER: PEANUT VERSION

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 0.82241 peanuts 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).

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;
bond = bond / 600000; // convert to peanuts

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

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

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

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

</script>

Technorati Tags: