OMGWTFBBQHD

TechStuff No Comments

BBQ season is upon us yet again. We bought a grill from Melissa’s brother Mike as he was moving to Calgary and had no room for it. It was dirty as hell, but it was in good shape (and ours had seen better days). It was christened (yes, it was) on Sunday, but I’m definitely going to have to get used to it… Here’s the thing. I’m used to grills with charcoal (or ceramic) bricks in them. Our old BBQ had them. You heated it up, and thing stayed warm for a week. Most new grills don’t have bricks in them, and as such, they seem to lose their heat in a hurry (unless you rig some way to hang bricks on the deflectors inside the grill). As such, you need to leave the fire on high pretty much the entire time to keep things toasty in there, a design “feature” which suggests a conspiracy between grill manufacturers and propane companies to boost gas consumption. On the other hand, the design also suggests that flareups (and truly blackened steaks) might be a thing of the past, which may or may not be a good thing (I love me a good flareup, especially in the BBQ). Time will tell, but the much larger grilling surface will definitely lend itself well to parties.

We also got a new TV for the living room, a 32″ Samsung LCD from Costco. I had lots of extra cables lying around (HDMI, DVI, component, optical audio; how I got these I don’t know), so we got the TV pimped out with HD yesterday night, and the difference in picture quality is quite impressive. Eastlink has apparently come a long way with its HD offering, both in terms of the number of channels as well as the stability of its PVR boxes and its feeds, so I don’t mind dropping an extra $5 for that (I’m not bothering with the specialty HD channels for now). Some spare component cables allowed me to improve the picture quality of our DVD player as well, which serves me well on those nights where Emilia doesn’t go to sleep until 11:45PM. Like last night. Ugh.

I said BOOT, dammit!

TechStuff 1 Comment

Server’s been down the past few days, since my computer is old and cranky and needs a new set of spectacles to see where its kernel is.

Apparently, older BIOS machines couldn’t access a hard drive with more than 1023 cylinders (most modern hard drives have more; mine has 30401 I think). Usually, this isn’t an issue since the operating system takes care of everything once the drive has booted, as long as the stuff that actually boots the OS is within the first 1023 cylinders of the drive. Initially, everything was fine, but Ubuntu recently downloaded a new kernel (to some spot on the drive that was beyond the first 1023), and when it tried to boot with said kernel, I got an “Error 18: Selected cylinder exceeds maximum supported by BIOS”, and the computer refused to boot. (I had initially attributed this problem to a power outage we had that morning; little did I know that it would have happened the next time I tried to reboot anyway)

The solution to the problem was to create a new partition at the beginning of the drive, throw the boot images on there, and have the OS only reference this “boot partition” when booting. I’m pretty sketchy when it comes to partitioning (my drive only has the main partition, and a small swap partition), and the experiences that I’ve had with partitioning usually involved drives being wiped during the process. Fortunately, I came across some wonderful software called GParted (Gnome Partition Editor) that allowed me to re-partition my drive — get this — without affecting my data. Of course, the partitioning process (which involved resizing my main partition, moving it down the disk, creating a new partition at the front of the disk, then re-sizing the main partition again to fill up the remaining space) took approximately 17 hours of processing time.

After that, all I had to do (after booting with a boot disk; I used the GParted LiveCD) was mount the partition locally, copy the kernel image files over to this new partition, update /etc/fstab to recognize the new partition as /boot (and learning about device UUIDs in the process), and install grub to the MBR (this one had me for a while, since I was installing grub to the new boot partition instead of the MBR of the entire drive, and getting an Error 15 and crashing). Simple! (so simple I just HAD to drag the process out over two days)

Obviously, this post isn’t meant to be a walkthrough solution for this problem, so here are some references in case someone stumbled upon this and has a similar problem:

(and for those in my class that happen upon this site, the stuff I’m supposed to be marking was on my server)

Post-AJAX JavaScript calls

CodeStuff 4 Comments

Not too often I post development stuff here, but this is one that’s been bugging me for a few years. For those unfamiliar with it, AJAX is a web technique that involves using a JavaScript call to refresh part of a web page with new content instead of the entire page. The technique is intended to transfer “XML” data (hence the ‘X’ in AJAX), but most times people just use it to move raw HTML markup around. I’ve been wanting to embed JavaScript function calls in the content that I dynamically load on a page, but the AJAX loading technique does not execute any JavaScript in the HTML.

Read the rest…

My Music At Work

MusicStuff, TechStuff No Comments

I’m going to retire my collection of Metallica and G’n'R albums for a little while, and be re-introduced to a bit of variety for my listening pleasure. Fellow non-Americans, take note, as it was a sad day for many when Pandora went silent north of the border last year.

Fun with Electronics

TechStuff No Comments

We finally got a wireless router this weekend, as Melissa had been complaining that she felt ’shackled’ to the couch and coffee table for her internet (our house is wired with CAT5; we had a cable running from the jack behind the TV, across the living room floor). The web server is now just a web/mail/file server and media centre, as opposed to a web/mail/file server/media centre and firewall. I’m sure its feelings won’t be too hurt. We’re going to use the Wii’s wireless capability as well (we’d bought a wired-LAN dongle for it a while back), so that means fewer wires back there, but the server and my PC will continue to be wired, mainly because they don’t have wireless cards, and also because the infrastructure is all there.

I also got a chance to play Super Smash Bros. Brawl last night with Dan and Owen… Of course, given how we played, I think it should have been called “Super MASH Bros. Brawl”, mainly because we generally had no idea what we were doing, we just mashed on the buttons and hoped that we won. I think it was a fun game… It definitely has some strange stages, and LOTS of characters to play, and it’s very colourful, but if the players get too far away from each other, everything gets tiny, especially on that Island level where the fight stage flies around all the time. All in all, a neat game, and I’d bet it’d be more fun if I’d known what I was doing. :)

KnoppMyth and apt-get upgrade don’t mix

TechStuff 3 Comments

So I managed to mess up my OS enough on Saturday morning that it made my computer virtually unbootable. I guess that’s what you get when you want your machine to stay “current”.

I’m viewing this as a blessing in diguise, though… I’d long been looking for a reason to upgrade KnoppMyth (my current operating system, a blend of Knoppix and MythTV) for a while, mainly because the version I had was pretty old. However, instead of going with the latest version of KnoppMyth, I decided to give Mythbuntu a whirl. So far, so good… The setup was relatively painless, the GUI is much slicker (partly because it detected my TV’s natural resolution of 1280×768), and most of my websites are back up and running the way they were before (with the exception of the poker page… For some reason, I think the mysql “create temporary table” functionality has been changed since I last upgraded MySQL, which now makes it look like Boylan’s the king with 21 weeks played, while Owen has played 912 games and is only in second place). I’ve also signed up to SchedulesDirect, which gives me much sharper TV listings (albeit at a non-free price. At least it’s only $20 a year).

I haven’t come across any downsides to using this system over KnoppMyth yet, other than it’s going to take a while to restore all of the data files I had. The big advantage? Upgradability! apt-get and I can play once again!

How hard is it to find decent help these days?

TechStuff No Comments

My work is hiring again; we’re looking for someone with a few years of Java, PHP, and web development experience; Linux server administration and project management experience are definitely considered assets. In case this position seems as though it’s just “another web dev position”, I assure you, it’s not… The system we’re devising will consist of some complex data analysis modules that should be more than a challenge for any seasoned programmer. If you know anyone who’s looking for a challenging position in an established (albeit small) company, send an email w/ resume and cover letter to support@tenchek.com . For more information on our company, visit our current website at www.tenchek.com.

Optimizing PHP code

CodeStuff No Comments

40 tips to optimize PHP code. As a PHP coder, I must say that this is quite impressive, and that it’s going to change how I approach the PHP hackoding that I do at work. w00t.

“In-the-wild”-ophobia?

CodeStuff 1 Comment

Is there a term for the fear of software that you wrote crashing spectacularly on a client’s machine even though it works fine in every situation you could fathom in testing? If there isn’t, then there should be, because I have it, and I’m sure that I’m not alone.

Asshole-Driven Development

CodeStuff, FunnyStuff 1 Comment

Here is a blog post on the latest in the trend of programming methodologies that take a more, ahem, *realistic* view at corporate and software development culture. While I may be guilty of some of these, all I ask is to work with people who know what they’re doing, and whose code I can trust (without having to second-guess/proofread). Good help is hard to find…

A Dirty Apache Hack

CodeStuff No Comments

We’re in the middle of trying to deploy a Java applet at work. So as to not use the deprecated “applet” tag, we’ve taken to using the “object” and “embed” tags for launching the applet in both FireFox and IE. Only problem is that our site uses client certificates for user authentication, and Apache doesn’t realize that the certificate that was used to log in to the site should be good enough for the applet. Techy stuff to follow…

Read the rest…

DSN-less Microsoft Text Driver

CodeStuff 3 Comments

I spent a large amount of time at work yesterday trying to create a DSN-less ODBC connection in Java to some .csv (comma-separated values) files. Since I couldn’t find documentation that solved all of my problems, I’m going to post my solution here. Non-programmers can stop reading now.

Read the rest…

Fun with Java

CodeStuff, SchoolStuff 1 Comment

At Saint Mary’s, C++ has been the de-facto language for Computing Science for the last several years. As a result, the students don’t get much exposure to other languages, like Java (although that’s changing this year, much to the chagrin of certain people in the department, myself included… I am of the opinion that Java as a “starter” language is a bit steep as it expects a lot from the developer, and it’s too easy for a beginner to to get caught in the trap of ignoring all exceptions and all that jazz. But I digress).

This semester, I’ve been tasked with teaching Object-Oriented Programming in Java. While we are spending a lot of time on things like proper OOP techniques and approaches, including (but not limited to) UML diagrams, design patterns, and all that goodness, we also spending time on some of the Java “basics”, like desiging classes, working with interfaces, fun with Swing and AWT, and of course, applets. This week’s recitation had them drawing googly-eyed happy faces, as above. Wheeeee!

Tenant Reporting Bureau

TechStuff No Comments

The company I work for, GateMaster Inc, is a consumer reporting agency. Specifically, we deal with the landlord industry, selling credit and tenancy information to landlords and property management companies of all sizes to help them protect their investments by screening prospective tenants. We operate across Canada, and we’re expanding rapidly. We pride ourselves on offering a product that is second-to-none, courteous and responsive customer service, very competitive pricing (with “freebie” deals for smaller landlords), data system integrity and security, easy-to-interpret credit report layouts, and automated access either via our website (www.tenchek.com) or via IVR (for people who don’t have phone access).

Why do I mention this? The other day, we were talking about our “internet presence”. We discovered that Google doesn’t look at HTML meta keywords when it crawls sites. Our main site pages really don’t convey what our company is about (we’re working on that one, though), so if you punched in “tenant reporting bureau”, “credit reporting agency”, “consumer reporting for landlords”, “credit reports”, “landlord forms”, “screening tenants”, or a myriad of other search terms, our site wouldn’t come up. We’re hoping to buy some advertising on Google (because it’s relatively cheap) to get our name out there, since keywords like “tenant reporting bureau”, “credit reporting agency”, “consumer reporting for landlords”, “credit reports”, “landlord forms”, “screening tenants” apparently don’t do anything anymore.

Oh yeah, if you’re reading this post because you found it through Google or some other search engine, our website is at www.tenchek.com, it should answer most of your questions about our service!

Teaching Recursion

CodeStuff, SchoolStuff 8 Comments

Last week I started teaching recursion to my students (for the unaware, I’m teaching a 2nd year engineering computer programming course at SMU; it’s similar in structure to the 2nd half of the 1st year course I usually teach). I’ve never tried to talk about recursion and recursive algorithms for more than one lecture, but this time I’ve gone over several sample algorithms (Towers of Hanoi, QuickSort, palindrome detection, prefix calculator, reversing a sequence of words). I just wonder if there’s a proper way to teach it… I’m sure there is, it’s just that I haven’t come up on it yet.

A little primer: a recursive algorithm is one where the solution involves applying the same algorithm to a reduced version of the problem set. Similarly, recursive functions are usually defined in terms of themselves, and thereby a recursive function will contain calls to itself. Recursive functions are elegant and easy to read, but they are usually complicated to come up with, and they are often more computationally intensive than their iterative counterparts. I have written a blog post about recursion, you can read it by following this link.

The main question is this, though: how do you get people to think recursively? When a problem is defined recursively, it’s not bad. Consider the Fibonacci number sequence. Computing Fibonacci numbers is easy: to get the next number in the sequence, you add the two previous numbers together (e.g., starting with 1 and 1, the sequence would be 1, 1, 2, 3, 5, 8, 13, 21, 34, …). The nth number in the Fibonacci number sequence can be computed by taking the sum of the n-1st and n-2nd Fibonacci numbers, given that the first two Fibonacci numbers are both 1. The Fibonacci number algorithm can thereby be written thusly:


int Fibonacci(int n)
{
  if (n == 1 || n == 2)
    return 1;
  else
    return (Fibonacci(n-1) + Fibonacci(n-2));
}

Ya dig? When I was learning this stuff, I just “got it” after a while, so obviously my profs didn’t know the silver bullet (if there is one). Bombarding them with examples is all well and good, but it only gets you so far. If you “get it”, what was it that did it for you?

Zune controversy?

TechStuff No Comments

It seems that Microsoft is going to some interesting lengths to generate interest in its new “iPod-killer”, the Zune.  Apparently it’s not all that great, so now it looks like they’ve taken to placing sexually-suggestive imagery here and there to generate an undeserved buzz.  The most famous of these placements is Installation Error Orgasm Screen.  This afternoon, I found this picture in an ad for the Zune that is also overtly sexually suggestive.  Is it just coincidence?  Or is Microsoft trying to get us talking about their product?  All I know is that buying a Zune isn’t going to spice up my life like that, so their suggestive ads have failed with this potetial customer.  I’ll save my money, thanks.

Back online!

TechStuff No Comments

Well that took longer than expected. The server is finally back online (obviously) after having been down since Friday afternoon. I went out and bought a Hauppauge (pronounced hop-pog) PVR-350 TV tuner card, along with a shiny new 250GB hard drive, and am in the middle of turning my little server box into a mean PVRin’ machine. Which turned out to be no easy task.

Instead of slogging through a big dirty installation process, I opted to go with KnoppMyth. I partitioned the HD (leaving myself space for the websites and mail), and threw the thing on there. Of course, it crashed half-way through, and wouldn’t load X again, so I installed it again. I must have installed it around 20 times all told, and thankfully I shouldn’t have to anymore because I have an idea of how it all works.

There were two things stopping me from installing everything cleanly:

  • Instead of recognizing my Ethernet interfaces as eth0 and eth1, it changed their names to eth1 and eth2, which required me to change a few settings here and there
  • My machine REFUSES to boot with TV-out enabled. It is not capable of loading the ivtv-pb module on its own, and as a result, X fails to start. In order for me to be able to watch TV through the computer, I first have to boot the system with a regular X setup. Once I’m logged in, I have to exit MythTV, switch to root, run modprobe itvt-fb through an xterm window, change the link for my XF86Config-4 file to one that uses my TV, restart X by hitting Ctrl-Alt-Backspace, restoring the XF86Config-4 link (or else when it reboots nothing will happen), and re-run mythfrontend as the mythtv user. At this point, everything goes through the TV, and it works well.

It’s not completely set up yet… The display goes beyond the edge of the TV, my mythweb setup isn’t working, and I haven’t tested out zsnes yet, but I’m much farther along than I’ve been.

GateMaster is hiring

CodeStuff 2 Comments

If anyone reading this is a recent University graduate in CS, my work is looking for a Software Developer. There is an ad on Career Beacon (from August 29th); only diff is that we don’t give a hoot about C#, and that we’re looking for someone who also has Java experience.

Update: the link has been refreshed, and we’ve already started receiving applications. Send yours in today! (if you’re interested, that is) FYI, a well-organized resume and an relevant cover letter go a long way.  None of this “To Whom It May Concern”, or “Dear Sir/Madam”, or cookie cutter cover letters, I usually see through that in a second and regardless of whether or not you’re qualified, I toss it aside.

PVR

TechStuff 2 Comments

I’m itching to build myself a PVR. I’ve pretty much got most of the details worked out in my head… I’m going to be running the PVR on my server, a P3-1GHz running Debian Sarge. Since it’s not the beefiest machine, I’ll probably have to do hardware enc/dec, and most people are touting the virtues of the Hauppauge PVR-350 card (which does everything in hardware), which also means installing drivers and a more recent build of the Linux kernel. Video encoding also means hard drive space, so I’m going to have to replace my 40GB HDD with something a little more substantial, say, a 250GB drive or even 300+GB (just IDE though, my mobo doesn’t do sATA, and I don’t want to get a new one right yet). I also want to play old-school video games on it, which means zsnes and a few ROMs (already got the controllers~!). Most of this stuff isn’t a problem, just trying to find the best prices (online; AFAIK, nobody in Halifax stocks the PVR-350) and set it all up, which will be maddening, no doubt.

Ideally, I also want to set up a BitTorrent client on the box (for those shows that I miss, or just couldn’t otherwise get). In the interest of accessibility, the BT client has to have a web interface (so I can launch it and monitor it from wherever), but I don’t know if any Linux BT clients have web frontends. Any suggestions?

RIP PC

TechStuff 2 Comments

Yep, I’m pretty sure either my mobo or my CPU or something bought it last night, and now I’m without a main PC.  I was having this weird problem where my PC would reboot as I logged into Windows (I clicked on my name, it would try to load my profile, then it would reboot).  Last night, I tried to boot it and it wouldn’t anymore, wouldn’t even give me the BIOS screens and such.  I took down the server for aruond an hour to test my hard drive (still in good working order), otherwise I wouldn’t have been able to sleep last night.

I guess it’s time for a new box.  A new old box that is…  I’ll probably just go down to Brilliance and see if I can’t get me a P3-1GHz or something like that.  I don’t want to spend a lot of money on a new PC, mainly because I don’t have time to play games and such.

That and we still want to get a video camera.  Soon.  Yay expenses!

« Previous Entries