Tuesday 29 December 2009

When the power goes out...

A little while ago, one of my friends text me because the power had gone out in her building. She was wondering whether the power was out where I was. Fortunately for me, the power was just fine.

So I thought to myself, "I've got the power of the Internet to look into these things!" Off to Google, and it turns out it's pretty hard to find out about recent power outages. What came up was lots and lots of old news about previous outages that were already fixed. Now I'm pretty good with my Google-fu, so maybe it was just a minor outage and thus less (or no) news.

However, I did manage to find this little page. It's a map with the location of power outages and repairs in regions covered by HydroOne, the power distribution company for Ontario. Now this is how important services should be run. The information is available easily, and quickly. In fact, it's got its own link right on the front page. The one problem is, if you follow the blue line, you'll see that Toronto is excluded. That's because we have our own local power supply company here, Toronto Hydro. So I can't find out about my friend's problem from HydroOne.

What can I find on Toronto Hydro's website? Absolutely nothing. Well, actually, what I found was a lot of stuff I don't want. There are many pages about things I might be interested in if I were a customer. But the most important information, the availability of the service, is not there. It would be great if the power never went out, but let's face it, even with perfect equipment, someone's going to go drive into a transformer or something that's going to disrupt service. The closest thing I could find about service reliability on Toronto Hydro's site is to "Report a Streetlight out". While a broken streetlight is unsafe in certain locations, wouldn't the power being out be even worse? I guess they just figure that if the power's out in your area, you won't be able to look up the fact that the power's out or when it's going to be fixed.

Saturday 26 December 2009

Christmas Trees

So, I have this mini Christmas tree, with some fibre optics, that pulses red and white. A while back, it stopped working and I planned to fix it, but never got around to it. Until now!

I managed to cobble together a simple circuit based on a 555 timer. Here's a shot of the test on the breadboard. Basically, it's the 555 in astable mode, with a couple capacitors to smooth out the transitions.

The test had reds, but I put alternating red and yellow on the final circuit because yellow looked pretty good. Each side has a different size capacitor because it just pulses better that way. I managed to put this together on a little board. The wires on the right go to the LEDs.

With a little knife-work, I managed to size it up right. The wires are a little stiff, but a bit of jiggling got them in there.

Saturday 28 November 2009

SELinux Re-labelling

So yesterday, I downgraded from ext4 to ext3. I think I forgot to set SELinux to permissive, so a couple things ended up wrong. I re-labelled everything. This is what it looked like:

Now, there are a few things wrong there. First, the text really doesn't doesn't fit in. I think this is because KMS sets up the blue background, but isn't quite connected to the virtual console nicely. There's always work going on there, but it's not quite right yet. It's always getting better though.

The second thing, you might not notice at first. But if you look between the first paragraph and the lines of stars, then you'll notice some random characters. Those were typed by me. You see, nothing happens between printing the first two lines and the first asterisk. I think I read somewhere that each one corresponds to a few thousand files, but it took so long, I almost thought something had frozen. Fortunately, I let it continue and it finished correctly. But I really think there should be a better indication of activity in between asterisks.

Friday 27 November 2009

Downgrading ext4 to ext3

So, a little while ago, I replaced Gentoo with Fedora 11 on my laptop. The laptop is a little older and prone to overheating when compiling, so I didn't see the value in using Gentoo there. And I never quite figured out the cross-compile for my desktop since it was AMD64->x86.

I ran into one very annoying problem, and that was with ext4. Every so often, any disk I/O would just stop. I could no longer load programs, and if anything attempted to write a file, it would freeze (technically, it would enter the "uninterruptible" state and get stuck). I found a few kernel OOPS in the log, and reported those with the Fedora tool for that, but it didn't seem like it happened for many people.

In any case, the real problem is that I had to force a reboot, and ext4 would always lose something. Sometimes it was some just-created data that could be replaced, and other times, the whole file system seemed messed up. Random libraries would crash or fail to load because they were corrupted. It was quite annoying.

So, I've been looking for a way to 'downgrade' to ext3. I've used ext3 for a long time on my desktop, and also on the laptop with Gentoo, and never ran into anything quite so bad. The only problem was no-one seemed to have a guide to go to ext 3. The best I could find is to create a new partition and copy files there. Unfortunately, I didn't have enough free space to get that done. (Re-partitioning is not that hard since Fedora uses LVM.)

After much searching, I have managed to find a solution. Fsarchiver provides an easy way to back up a complete file system. Once you have that backup, you can recreate it using a different file system format without losing any of the metadata (assuming the new one supports it all). Also, because it uses compression, I was able to fit what I needed onto a USB stick, and restore from there.

I used the Fedora 11 LiveCD (on the same USB stick I used for the backup) to do all of this. Fortunately, fsarchiver is provided in a Fedora package that can be installed from the default repositories. I'm doing this from memory, but it should go something like this (I'll only show the fsarchiver bits):

yum install fsarchiver
fsarchiver savefs /media/live/rootfs.fsa /dev/mapper/lvm_name
<re-format partition>
fsarchiver restfs /media/live/rootfs.fsa id=0,dest=/dev/mapper/lvm_name,mkfs=ext3

Friday 21 August 2009

Voice & Video

Sooo, Pidgin supports voice and video now.

It's only on XMPP (aka Google Talk), and only on Linux, but hopefully that will change soon. I hear it's a real pain to get all the farsight/gstreamer dependencies compiled for Windows right now.

And here's hoping we can get MSN support soon, too. I'm not too sure how well farsight supports it though.

Friday 24 July 2009

Moving Out...

Of the office, I mean.

Here we are all packed up and ready to go. Instead of the old CRT, I'm only taking the Dell TV/monitor that I had lying around. I still haven't found a power supply for it, but I hope to pick one up in the extra refuse that we're not taking with us.


Update: And here we are in the new location:

It's a little bit smaller, I think. If you notice, now we've got fancy IP phones. What sucks is I brought that Dell TV/monitor instead of a CRT, only finding a power supply now. And it doesn't work! Ah well, instead, I borrowed the LCD from the other PEY student. And some of you might recognize that calendar there...

Monday 11 May 2009

Mother's Day for Engineers

So, in case you were wondering, when it's Mother's Day, engineers don't give gifts; they fix things!

In this case, we have a 5-CD changer that was starting to have problems. Now sure, you might say that a computer would be able to save all the music from those CDs and more. But if you know engineers (or at least, myself), then you know we'd never throw away something that can still be salvaged (or at least kept for parts).

The problem was that the audio seemed to cut out every once in a while. It turns out that something was wrong with the output jacks. I tried fiddling with them to make the connections tighter, but it didn't seem to work. Some of you may remember the troubles I had to go through to get cables to stay connected in such a way that the sound didn't cut out when you were over.

So, obviously, the best solution is to open it up and fix it! The circuit board with the jack is in the bottom left of the left image, with a closeup on the right. The other circuit board sure looks empty though.

With a little fiddling of the restraints, the connector board comes out pretty easily. A few minutes of desoldering later, and out come the jacks. If you recall, I made a post about Kycon recently. They sent me some nice red and white gold-plated RCA jacks, perfect for replacing these (not that that's a coincidence). Here we have the new and the old next to each other. Aren't the new ones all nice and shiny?

If you look closely, you'll notice that the plastic casing is shaped slightly differently in the new ones. The old had a little hook, while the new are just little stubs. Unfortunately, the gaps are also a little smaller. That required a little bit of sanding on the circuit board to fit.

Anyway, with a little elbow grease, and some more soldering, I had them right back in. The connection wasn't that great any more though (probably need to tone down the iron), so I added a couple jumper wires for the relevant paths. Fortunately, the sound quality did not suffer because of it (at least to my ears and with the sound system we have).

And that gives us this nice little board with shiny new gold-plated jacks. The plastic on the jumpers got a little melty, but that helped me to position them in a good place. Anyway, after putting it back together, I tried it out on the surround system and it sounded great. So, back upstairs it went, and that makes one nice present done.

Tuesday 5 May 2009

Kycon, Inc

Just going to take a post to mention this company. In case you didn't know, some electronics suppliers like to send out samples for the "publicity", in the hopes that you'll remember their product and use it in your next big project.

Anyway, these guys were pretty great. I put in a request on Sunday for a couple connectors. To leave it cheap, I asked for regular ground shipping. But in Canada, they don't seem to offer that, so they automatically upgraded to some kind of two-night express shipping for free! So I got the parts in less than two days, and they seem pretty good quality. Yep, so this post is just my way to make some publicity for them.

Now, what did I get this for? Well, that's a different post...

Edit: I just noticed a couple connectors on our test boards are Kycon, too.

Saturday 18 April 2009

GTK+ 3.0 for Pidgin

A little while ago, grim posted a link about preparations for GTK+ 3.0. I started a bit of work on it in a separate branch.

So far, it hasn't been too much trouble. I managed to fix single includes in the main branch, and all deprecated functions in libpurple core too. Finch was super-easy and required almost no work. What was left was the Pidgin UI.

The main Pidgin UI required a bit more work. Replacing GtkOptionMenu with GtkComboBox was pretty simple, just a couple preprocessor checks needed. Using GtkTooltip instead of GtkTooltips was also pretty painless, but there's still one matter left. The headline text that goes in the buddy list for mail notification used to do a hack with the tooltip to colour it correctly. At the moment, it ends up grey because I'm not sure how to get it working.

There are still a couple big changes left. I still really don't know how to write UI Manager stuff, and it's hard to find good examples. It only has to be done twice, for the buddy list and for the conversation window, but I'm not sure how much that really means. Fortunately, we are not heavily GNOME dependant, so that's probably the biggest change.

Sunday 22 March 2009

Skule Nite 0T9

Yes, another year for Skule Nite... And again, quite fun as usual.

The big acts were mostly all based on Disney movie songs. Though I'm not too sure where the last few were from. But no matter, "Google Man" was still a great skit. The "Lord of the ECF" were great, and the bits on 24 were funny, too. At first, I didn't really like the Obama skit (probably because I didn't recognize the song), but the 4 Years skit was a spot on parody of 4 Minutes.

But of course, the best part of the show was the Vision Quest with the great blacklighting effects. People totally freaked out when that stick-man started moving (I kind of figured it would happen, though). They definitely managed to top last year's blacklight sketch. This part alone was worth the admission. ;)

You know, I saw they were filming it; I wonder what they actual do with that.

So yep, definitely another great year. But I do have one question: where is the EngSci club hiding that jacuzzi?

Saturday 28 February 2009

Nothing's Happening!

Here, I mean... As some people have mentioned, "tomorrow" should have happened a loonnngggg time ago. I probably won't talk about the AGO, though. You should have gone when it was free!

Anyway, there's been some interesting things going on. A few months of working at this new company. Which as I guessed, is ending up not all that different. I might write a little bit more about that later. (I'm not promising any more tomorrows, though!)

Christmas/New Year's vacation was quite good. I'm sure most of you know already, but I went on a vacation to Goa. It was wayyy too short at ~2.5 weeks, and that made it jam-packed with things to do. But all in all, it was pretty fun.

Anyway, hope to get back to writing here a bit more often...