Archive for April, 2006

Colin’s Crazy Train Set

So Colin and I started playing around with a train set that he brought back with him after Christmas. By the time that I got involved he already had a basic layout going with DC locomotives and even a tunnel. Pretty cool stuff all around. That is until he found pictures of people building spirals on the Internet.

So, we began thinking about how to pull off a cool spiral, how high to make it, what grade we could actually use (the angle of the track), etc. Before the night was up we had all sorts of grandiose plans … many of which we knew were completely unrealistic. But what good are plans if they aren’t grand? Long story short (and I do mean long), we came up with a plan to use rectangles cut out of plywood, stacked end to end, in a circle slowly climbing skyward (the thickness of the plywood gave us just about the right grade). Once done it was to stand just over three feet tall. (picture)

Construction started out really slow as we were not real sure how we wanted to do certain things, but we did know that we wanted it built in two halves so that it could fit through the doorway. By the time we got to the second half we were flying through it. It took us a few weeks to get it all together, then our attention shifted to the rest of the layout. We had three feet of vertical space to use if we wanted (what good is a spiral if it doesn’t go anywhere?), so we settled on two additional levels. Level 1 (the main level) is 4′X8′, level 2 is roughly 4′X3′, and level 3 is roughly 3′X3′. Levels two and three are accessible only via the spiral and they will only have a single loop, but there will be plenty of space for us to build small buildings and industry on the layout.

Not only were we interested in the layout itself, but we were also really interested in controlling the trains as much as possible. Neither of us had ever dealt with any model trains other than the standard DC locomotives, so all of our planning was based around them. We, again, had grand plans for an elaborate control system so that more than one train could be run on the layout at once. Colin was doing a little research online towards that goal when he stumbled across a control system for model trains called DCC. It already implemented far more than we could ever have hoped to do ourselves, and in a much more elegant manner.

Unfortunately, the DCC system is really only designed to handle the locomotives (there are accessory decoders, but who wants to pay that much for stupid accessories like switches) so we again had to do some designing. This time, however, we called in some support. I asked Chuck Cox if he would be willing to take a look at what we had and offer suggestions. Man, that was the right idea! Chuck got us moving in what I believe will be a great direction. When we progress a little more on this, I’ll let you know how it’s going (there will be plenty of documentation eventually).

Until later, go read something else.

Comments

Work Happenings

What say you to an update about work stuff first? No? Too bad, read another post then (more will be coming soon that aren’t work related). Sometimes it is hard for me to really step back and see just how much stuff has changed over, say, the last six months. We are in the middle of yet another web registration window. It seems that one just barely closes, and then bam, another one opens up. The real trick this time is that they decided to do summer school registration online and at the same time as fall 2006 registration. Until this time around we had only done one semester at a time. Until this time around I had no idea how badly multi-semester registration could really screw up my code. Until this time around … argh! Eh, whatever, I’m still in the process of correcting all the little problems that showed up as a result of this. The problems are almost all related to money, but aren’t they always?

More interesting things are going on, like the reason I’m in the office at 4:00 AM today. Ok, so it isn’t that much more interesting as I’m here because I couldn’t sleep and just happened to crank out some pretty nice work (if I must say so myself). Specifically, we have been having performance issues with the Web Payment stuff (pay your student account online, etc). The problems came at the very end of the process when we actually process the credit card info, send out some emails, and log all the pertinent data in the database. The user would click the submit button that began the process, then depending on how impatient they are, would wait around for up to 45 seconds while the page loaded. The really impatient ones would really screw the process up by leaving the page early. I know, I know, that shouldn’t affect anything other than what they see, but it did. Since I was in the office tonight, I decided to take some action.

We had been talking about putting some logging in place to record how long various parts of the process took to run (so we’d know where to work on things if they were in our control). So, I dropped some logging in on the testing site. Wow! The places I thought we were having issues were actually the ones performing the best. It turned out that sending the emails out was the slowest part of the whole thing, and we send quite a few emails (payment notifications, error messages, receipts, etc). So it was time to look into optimizing that section. I was using a nice cpan module (yes, this is all in Perl … oh why wouldn’t they let me use PHP!?!) that made sending the emails pretty easy, it just didn’t make it fast. Since we have Sendmail installed on this machine I figured why not pass the email off to Sendmail and let it worry about everything else. Huge speed increase! Sending a single email went from taking around seven (ya, 7) seconds down to under a single second. Makes all the difference in the world.

I have been doing a little more than just programming lately. We purchased a wiki for use here in IT called Confluence. It’s pretty nice, even though it is built on Java. Since I was the only one in the department who had any real wiki experience, the project was given to me! I was able to con talk Tech Services into giving me a machine for the wiki on which I have installed Gentoo. It’s sitting back in “DC3″ (a rack in the shop area, not a proper Data Center at all) just humming away right now. The software gave me a few problems at first. We can use our Active Directory server for authentication and group memberships, so that’s really nice, but the version of Confluence that we started with was really, really slow when I turned on AD authentication. A couple of weeks later (the wiki wasn’t really being used yet, still in testing) a new version came out that contained a ton of LDAP/AD enhancements. Those enhancements brought the speed back up to where it should be. I’m just glad it wasn’t my poor sysadmin skills that was causing the problem. So anyways, the wiki is now being used a little … and soon it will be the next big thing!

The big news around here right now are the office renovations. They are doing everything possible to fit more people in the limited space that we currently have. The problem is that we just keep growing and have no place to put any of the new hires. The construction should begin pretty soon now that the permits seem to have been properly obtained from the city. We shall see, and so will you since I’m going to try and take some pictures as the process evolves.

Look for additional posts soon that will cover the non-work related happenings around these parts.

Comments