Phasing out the Blog (Saturday, May 2, 2020)

Long time readers may have noticed that updates here are very infrequent. I really haven't updated the blog regularly since the advent of social media. To that end, I've taken down all the "personal" entries, and left only the technical notes and entries that are still occasionally referenced by search engines. As I try to fully transition to more modern servers, having less content to migrate will make that much easier. The diary blogging era was fun while it lasted!

—Brian (05/02/2020 9:22 PM)

Announcing www.brianziman.com 3.0! (Sunday, March 10, 2019)

I did it! I have a new professional web site, and it's live: www.brianziman.com. I've migrated the other server from lighttpd to nginx, and instead of antique php, the new system is using jetty. It's almost like I've dragged myself into 2019! With a little bit more work, hopefully I'll be able to get the rest of my online world into the current century.

—Brian (03/10/2019 9:11 PM)

The Relationship Between Testers and Developers (Thursday, October 24, 2013)

My good friend, former colleague, and expert software tester, Lena Houser, recently compiled her take on the relationship between testers and developers, drawing from interviews with developers, including me, on traits they'd like to see in software testers.

Personally, I love testers, and as a developer, it is my mission in life to make their job as easy as possible. I never understood how developers could become defensive when a tester finds a problem. If it doesn't work the way the tester expects, then it probably won't work the way the end user expects, either! The biggest challenge is probably poorly specified requirements - the developer had one way of thinking about it and implemented it that way, while the tester had a different interpretation and wanted it to work another way. As all developers and testers know, getting good requirements is a luxury that few actually get. So it is important that developers and testers work together as a team, rather than as adversaries. It's the only way to produce good software, and it goes a long way to preserving sanity, too.

Lena's post goes over some of the other key qualities in the tester/developer relationship, with ideas from a variety of industry veterans.

—Brian (10/24/2013 8:05 AM)

IT206 005 Object Oriented Programming - GMU Spring 2012 (Friday, January 13, 2012)

(Updated 1/20/2012) It's that time of year again. GMU has finally put my name up on PatriotWeb, assigned to this class, and the Google queries are starting to roll in.

I will be teaching Section 005 of IT206, Object Oriented Techniques for IT Problem Solving, which meets at the Fairfax campus on Tuesdays and Thursdays from 7:20 PM to 8:35 PM in Innovation Hall Room 207. In order to take Section 005, you must also be enrolled in lab section 205, which meets in Innovation Hall 334 on Tuesday evenings immediately after the lecture. The lab instructor for this section is Kiran Thati, who will be assisted by Kruthika Kunduru. I will also be teaching an online section of IT206, Section DL3, for which you must also enroll in lab section 2D3. Kruthika will be the lab instructor for the online sections. The online section will be asynchronous, using recorded lectures that students will watch on their own time. Online students will be expected to attend the midterm exam and final exam in person. You must have earned a C or better in IT106 to enroll in this class, although I understand that some students are transfers and will have a different, but equivalent, course that meets this requirement.

I have found that students very rarely come to fixed, scheduled office hours, even when they really should. Because of that, I generally tell students that office hours are by appointment — if you need to meet with me, please let me know, and I will make myself available. The most convenient time for me would probably be after class on Thursday evenings. More details will follow.

This class will use Deitel's "Java, How to Program" text book, which you will hopefully already own from IT106. I think the department currently encourages the "Late Objects" version, with the red cover, but it has the same content as the blue cover version, with the chapters in a different order. Please remember that I did not choose this book.

IT206 is the middle course in the Applied IT Department's programming sequence, and the last course required for all AIT majors. The course will introduce Object Oriented Programming techniques, and builds heavily on the material from the first course. Programming courses are not like courses in other disciplines where the material is largely independent from one to the next. In this course, you have to understand each topic before you can successfully move on to the next one. The best way to become a good programmer is to write an awful lot of code. If the only time you ever write any code is during your lab section, you will probably find this course very challenging.

This course can be challenging for anyone, so I highly encourage you to ask questions as often as possible, and keep asking until you are sure you understand. Feel free to contact me by sending e-mail to bziman@gmu.edu. Any message not sent from your GMU account and with "IT206" in the subject line will probably be eaten by my spam filter.

All material for IT206 will be posted on the course section of the MyMason Portal.

—Brian (01/13/2012 10:24 AM)

IT 306 001 Data Structures - GMU Fall 2010 (Wednesday, July 21, 2010)

As luck would have it, I will be teaching another class for the Fall semester. This time around, it's IT 306 - Program Design and Data Structures, the three credit sequel to IT 108. Really, it's the sequel to IT 206, but this will be the first semester that IT 206 has been offered, so no one has taken it yet, so that's where that comes from. The course meets at the Prince William campus in Bull Run Hall, room 247, on Tuesdays from 4:30 PM to 7:10 PM, and I will hold office hours by appointment after class in the adjunct faculty closet on the first floor.

The text book for this class is Deitel's Java, How to Program, which is a bit of a monster, so hopefully you've got bags with wheels. Your TA will be Minu Hariharan.

This is going to be a programming intensive class, where you will be writing an awful lot of Java. It's probably going to take me a while to get all the materials for the semester put together, but I hope to have everything done in advance of the start of the semester, next month. In the meantime, if you need to contact me, please send e-mail to bziman@gmu.edu. Any message not sent from your GMU account and with "IT306" in the subject line will probably be eaten by my spam filter.

All of the material for this class will be posted on the GMU Blackboard site, as it becomes available.

—Brian (07/21/2010 3:09 PM)

IT 108 001 GMU Spring 2010 Wrap Up (Thursday, May 20, 2010)

Okay, so I'm a little behind on my updates, but I figured I'd better write up my thoughts on IT108 now that the semester is over. My first goal for the semester was to motivate my students, and keep them interested in programming, even if they find it challenging, and aren't sure how it could possibly be of any use to them. Well, out of the thirty students originally enrolled, only a handful dropped the class, and twenty-one students made it all the way through to the end. And most of those showed up to every class. From what I hear, that's a lot better than the average for this class.

What wasn't better than the average were the grades. Only six students passed the class, and that's mostly due to the dismal performance everyone had on the exams. While many students made huge improvements on their programming assignments as the semester went on, the results on the final exam were every bit as dismal as the results on the midterm. Despite the improvements that students made on their programming throughout the semester, their performance on the exams indicates that they really didn't have a firm grasp of what they were doing — you can write a program without understanding how it works. Next semester, I need to work harder to make sure students are understanding, as well as just doing. I think that's going to mean walking through many more examples, and having more practice assignments that resemble the sort of questions the students can expect to see on the exams.

I think one of the reasons the students had trouble, was because I dumped a lot of really heavy theory on the class at the beginning, and I think I need to start with much simpler assignments. On the other hand, the students had tremendous difficulty with even basic problem solving — a skill that all college students should have. I fear many of my students would be unable to coherently explain the steps for solving a problem, even if it didn't involve Java.

Another major problem the students had throughout the semester was meeting the required formatting for their submissions. The design diagrams and Java programs have a specific required format. It should make it easier for them to write, as there are fewer variables — it's like the difference between short answer and multiple choice. When you just have to choose from a handful of operations, and assemble them in the correct order, that should be a lot easier than coming up with your own operations. But the students just couldn't get the hang of it. I gave them a ton of code, but they couldn't recognize the pattern and get the indentation and formatting the same. I don't see how anyone can expect to do well when they won't do the simple stuff.

Of course it's not entirely their fault — there's just too much crammed into one class, and the department recognizes that, and starting in the Fall, they're breaking the programming requirement into two classes: IT106 and IT206. Of course this doesn't really help my students. The students who did not pass have two choices. They can either re-take IT108, in which case the grade for their second attempt will replace this attempt in their GPA; or they can change to the new catalog year and take IT106 and IT206, which would be better for their learning, but worse for their GPA and add yet another semester to their program of study.

So here's my advice. If you averaged better than 80% on the programs and project, then you should probably re-take IT108, and you'll have a much easier time at it. For you, taking IT106 would probably be a waste of time, since you probably already have a good grasp of all the material that will be covered there.

If you did not achieve at least 80% on the programs and project, then you're pretty much going to be starting from scratch either way. Only two of the students who were re-taking IT108 passed on their second attempt. If you aren't at least somewhat confident in your ability to do the projects from the class, you would probably benefit from switching to the two-course track.

If you're not sure what to do, and want advice specific to your case, or if you have Java questions, or IT questions, or really anything, please feel free to contact me. I really appreciate the encouragement and positive feedback I received from the class all semester. It's good to know that I'm making a positive contribution. Now all I need to do is get the pass rate up!

—Brian (05/20/2010 6:50 PM)

IT 108 001 Programming Fundamentals - GMU Spring 2010 (Tuesday, December 22, 2009)

I will be teaching IT 108 Section 001, Programming Fundamentals, for the Applied Information Technology department at George Mason University in the Spring semester of 2010. I've noticed that a number of students have been trying to find out who I am, since my name was added to the course. At some point, all students will have access to Blackboard, where the syllabus and other course materials will be posted. These materials are not yet available, but I hope to have them up well before the start of the semester. The university is also having difficulty provisioning my GMU e-mail account, so right now, there is no good way to contact me for course-related issues. I'm posting this message as a courtesy for students who are like me, and have to know as much as possible in advance. In general, I will not be posting course-related information or material to this site during the semester. Enjoy your winter holiday!

Update! My GMU e-mail account has finally been fixed, so please direct any course related correspondence to bziman@gmu.edu. Any message not sent from your GMU account and with "IT108-001" in the subject line will probably be eaten by my spam filter.

—Brian (12/22/2009 6:28 AM)

swisspig.net 2.0 (Tuesday, October 21, 2008)

After a great deal of stress, I appear to have successfully transitioned from the old server to the new server. This will be my first post on the new server, so we will see if it sticks. I've got all sorts of exciting stuff that I should write about, with regard to the transition. Here are some highlights:

  • I have abandoned JVDS in favor of Slicehost, which gives me four times the memory, and immediately technical support.
  • I have decided to switch from Debian to Ubuntu Server 8.04, which means that I am now 100% on Ubuntu for all systems that I manage. I'm hoping that this will allow me to use the most up-to-date software, and still get security updates. One of the goals of this transition was to totally (or at least mostly) eliminate custom compiled packages. As of now, all of the servers that are open to the network are standard packages.
  • I gave up on thttpd, and have switched over to lighttpd which lets me do HTTP and HTTPS from one server, and has proper support for PHP and FastCGI, instead of having to hack it together.
  • I also used this as an opportunity to fix all of the ultra-crappy mistakes I made when learning PHP, and the site is now more or less portable.
  • As nearly as I can tell, all of my other applications transitioned without incident.
  • I had considered moving from Exim to PostFix for e-mail... but after a good deal of research, I realized that I'd done my homework right the first time, and that Exim is the way to go.

So everything is up, and we will see what happens. At least now I have a platform on which I can build, for the foreseeable future. There are still a number of updates that need to be made, but I think I've done all the damage I can do for one evening.

—Brian (10/21/2008 9:45 PM)

Synergy for Media Center Remote Control (Saturday, September 6, 2008)

Some time ago, I purchased a Vista system to use with my 50 inch television as a sort of "media center" computer. The real trick is being able to use it without a connected mouse and keyboard. Now, I use a laptop in my living room for work and entertainment, and I planned to use that as a sort of "remote control". Trying to control Vista remotely from a laptop running Ubuntu Linux isn't as hard as you might think. I initially set it up to use VNC, which worked great for controlling the system, but was painful for any sort of graphical program — which is sort of the whole point of the media center — playing movies and video games. So I knew that VNC wasn't going to be a long term solution.

So after much research, I discovered Synergy, an open source utility that when set up, allows me to use one keyboard and mouse for multiple systems. It's really nifty. I've got my laptop, and I am using it normally, but if I move the mouse off the right side of the screen, it appears on the TV, and suddenly, all of my mouse and keyboard commands are going to the Vista system. And it works. Flawlessly. Between Linux and Vista. It's really quite impressive. As a result, I was able to watch a video using the media center, while working away on my laptop, and whenever I needed to control the video, I just mouse over, click a control, as easy and as seamless as if I was just running with two displays on one computer. Except I'm controlling two computers. And apparently the software will support any number of systems. That's really slick. So if you find that you have more than one computer, each with its own display, and you don't want to have to deal with a KVM or any other fancy solution, Synergy is the way to go.

—Brian (09/06/2008 4:26 PM)

Wrong Default TimeZone in Java on Red Hat Linux (Friday, June 20, 2008)

While I have the fortune of running Ubuntu and Debian at home, I have the misfortune of working with Red Hat (Fedora Core 9, specifically) at the office. Today, I spent the afternoon fighting Java, which insisted that the time was an hour earlier than reality. I found a solution.

So here's the environment. My computer lives in Eastern Daylight Time (UTC-04:00 at this time of year). Obviously, when Daylight Saving Time is not in effect, we're five hours behind UTC. My system is "properly" configured, with the time zone set to "America/New_York". My test program looks like this:

Listing:

import java.util.*;
public class Test {
    public static void main(String args[]) throws Exception {
        System.err.println("Default TZ="+TimeZone.getDefault());
        System.err.println("Now="+new Date());
    }
}

Output:

$ date
Fri Jun 20 17:17:09 EDT 2008

$ java Test
Default TZ=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,
dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Now=Fri Jun 20 16:17:09 GMT-05:00 2008

As you can see, it reports the non-DST version, because it's really just guessing. And it is also off by an hour. After reviewing a ton of literature and discussion online, the most commonly accepted work-around for this issue is to specify the TZ environment variable, which should be totally unnecessary. But it works:

Output:

$ date
Jun 20 17:22:04 EDT 2008

$ TZ="America/New_York" java Test
Default TZ=sun.util.calendar.ZoneInfo[id="America/New_York",offset=-18
000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=ja
va.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings
=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDa
y=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMo
nth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
Now=Fri Jun 20 17:22:04 GMT-04:00 2008

But I was not satisfied by this... if the OS is properly configured, and Java is anything better than brain-dead, it should work. So I pulled out my trusty "strace" tool, for following system calls. You have to remember to use the "-f" parameter, so that it actually digs down into the useful child processes that get spawned.

What I ended up finding was that it was trying to open the file $JRE_HOME/lib/zi/America/New York. Looking in that directory, I found a file named New_York — with an underscore, instead of a space. Now, I'm not sure where it is getting a time zone name with a space instead of an underscore, but the solution was immediately obvious to me. Create a symbolic link to the underscore version using a name with a space:

Output:

$ su -
Password:

# cd $JRE_HOME/lib/zi/America

# ln -s New_York New York

# logout

$ date
Fri Jun 20 17:31:17 EDT 2008

$ java Test
Default TZ=sun.util.calendar.ZoneInfo[id="America/New York",offset=-18
000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=ja
va.util.SimpleTimeZone[id=America/New York,offset=-18000000,dstSavings
=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDa
y=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMo
nth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
Now=Fri Jun 20 17:31:10 GMT-04:00 2008

I have to wonder if this only shows up for people with a space in their time zone name, like America/Los_Angeles and America/New_York. If that's the case, making that symbolic link might be the best solution for you, as it doesn't rely on system configuration. I hope this is useful for other folks, so they don't have to bash their heads against the wall for hours like I have. Good luck!

—Brian (06/20/2008 3:35 PM)

Mounting VMWare VMDK Disk Without VMWare (Friday, September 7, 2007)

So I decided to upgrade my computer from the old and no longer supported Ubuntu 5.10 (Breezy Badger) to Ubuntu 7.04 (Feisty Fawn), and among the issues this caused, I found myself completely unable to use my old installation of VMWare. VMWare has always been rather cumbersome, and I'm looking for alternatives. The real trick is saving all the data that was stored in my virtual machines.

In looking for a way to rescue my data, I found many references to vmware-mount.pl, a utility provided by VMWare that requires you to have a working, licensed copy of VMWare. Of course, if you have that, you don't need the utility.

It turns out, that a VMDK file is actually just a raw disk image (much like /dev/hda, for example. You can't mount it directly, because it's a disk image, not a partition image. So what you need to do is figure out the offset of the partitions within the disk image.

Following the instructions of Jason Boxman, I used "fdisk -l -u -C 592 image.vmdk" to find the partition table, which showed (in my case) that sectors were 512 bytes, and that the first (and only) partition on the disk has an offset of 63 sectors, or 32,256 bytes.

Using that information, we can mount the partition with "mount -o loop,offset=32256 -t ntfs image.vmdk /mnt".

I don't think it's a good idea to try to use the image like this if you're planning on also using it in VMWare. If you want to be safe, then make sure to mount the image with the read-only option (ro).

—Brian (09/07/2007 1:53 PM)

Error in Lord of the Rings Printing (Wednesday, May 9, 2007)

For what must be the millionth time, I am once again reading The Lord of the Rings, by J.R.R. Tolkien. While I own and have read many different editions, the edition I'm currently reading is the hard-cover Single Volume Edition with Alan Lee's artwork on the dust jacket and a reminder about the "upcoming" New Line films (ISBN 0-7394-0955-7). I've read this edition (of which I own two copies) a number of times, and for the first time, I have noticed a mistake. Not a factual gaffe, nor even a spelling error. But rather an entire missing line of text. Is it a bad sign that I have enough of a 1,000+ page book memorized, that I notice missing lines? Given the vast number of people obsessed with The Lord of the Rings (some even more so than I am), it is likely that Houghton Mifflin is already aware of the error. Nevertheless, I felt obligated to write them, just in case. To them, I wrote:

On page 49 of the One Volume Edition of The Lord of the Rings, when Gandalf translates the inscription on the Ring, this edition has:

"...But this in the Common Tongue is what is said, close enough:

One Ring to bring them all and in the darkness bind them.

It is only two lines of a verse long known in Elven-lore..."

However, the block quote is missing the first of the two mentioned lines: "One Ring to rule them all, One Ring to find them". It was only upon my dozenth or so reading that I noticed the mistake, and I double checked with several other editions of the book, just to be sure, and all the others do print both lines.

While I already own two copies of this edition, I suppose I will have to purchase another if this correction finds its way into the next printing.

—Brian (05/09/2007 3:11 PM)

The Beauty of a Lisp Quicksort (Thursday, March 30, 2006)

I have discovered the definition of beauty... last night during a hideous exam for Advanced AI, we were instructed to port a very concise, elegant (if rather inefficient) version of Quicksort from a bizarre obscure programming language called Haskell into a similarly concise, elegant (if rather inefficient) version in Lisp. What I presented for my answer on the exam was good, but I have since come up with a thing of beauty. Quicksort in just a few lines of lisp... it may not be the most efficient, but it has to be the most concise. And it is also the first time in my life, that I have been able to reproduce Quicksort from memory. And here it is:

(defun quicksort (lis) (if (null lis) nil
  (let* ((x (car lis)) (r (cdr lis)) (fn (lambda (a) (< a x))))
    (append (quicksort (remove-if-not fn r)) (list x)
      (quicksort (remove-if fn r))))))

—Brian (03/30/2006 9:57 AM)

NCIS Location Woes (Tuesday, January 17, 2006)

Okay, so I'm watching NCIS, and I'm just dying, because it's supposed to take place here in the DC metro area, but it's just funny how they change the the geography of the region to make it more suitable. Last season, there was an episode that supposedly took place at Bull Run Park (or maybe Manassas National Battlefield, depending on what side of Bull Run they were on), but the geography was completely wrong — the vegetation, the terrain... I mean, I live by Bull Run Park, and it was just wrong.

So in tonight's episode, they're analyzing a map to see where their victim had gone. So they're talking about "Braddock Mall", which of course does not really exist. Then they're talking about it being on Ox Rd, and they show a map. "Braddock Mall" is located where George Mason University's campus is. But they've neatly covered over it for the show. And then they have localized the sound of driving over railroad tracks, so they show another map where they went over the tracks... it's been labeled Ox Rd, but it's actually Roberts Parkway near Premier Court (where Capital Gymnastics is).

Finally, they cut to another shot where Ox Rd "ends" in this luxury community. Of course, Ox Rd ends when it hits Route 1 on the other side of Interstate 95 in Woodbridge. But they've neatly drawn over that map too, so it ends in Burke, south of Fairfax County Parkway, near Little Ox Rd. The funny thing is that the name of the community is improbable for the region, and the roads in that community are straight and at weird angles to each other. Except there's not a straight road in all of Burke — even ones like Premier Court which are all three hundred feet long are curved!

Anyway, interesting stuff to feed my map addiction.

—Brian (01/17/2006 7:55 PM)

TCP Wrappers Issues (Saturday, July 30, 2005)

Well, it's time for another technical public service announcement. Like many people, I'm trying to limit spam on my system, and for the most part I'm quite successful. I use (among other things) exim in combination with TCP wrappers. Recently, I discovered the twist option for hosts.allow, and was hoping to use that to send back a message to probable spammers with a URL for my Terms of Use page.

Unfortunately, when I tried this I got the following message in my log, and nothing on the SMTP output:

Jul 30 14:53:50 fire exim: warning: /etc/hosts.allow, line 28: twist_option: dup: Bad file descriptor

So I did some poking around the net, and around the exim and TCP Wrappers source code, and found that there is no useful info on the Web, but that there is a little in the source code.

The reason this is happening in my case, is that I'm running exim as a stand alone daemon (and not from inetd), using the built in TCP Wrappers support (i.e. it's compiled with USE_TCP_WRAPPERS). It turns out that the hosts_ctl() function does not include the file descriptor and is only capable of telling the caller yes or no, but not returning anything to the client. Since the file descriptor is not passed in, when TCP Wrappers tries to redirect the output from your shell script, it is unable to, and hence the warning.

It turns out that hosts_ctl() is just a simple wrapper for the hosts_access() function, which is substantially more complex. I thought it might be sufficient modify smtp_in.c so that the file descriptor is passed along to the TCP Wrappers function, however that does not seem to work for whatever reason.

So for now, it appears that if you want to use the twist functionality with exim, that you need to run exim from inetd. Joy.

—Brian (07/30/2005 1:48 PM)

First Post! (Wednesday, March 17, 2004)

Welcome to swisspig.net! Now that I've got all the important stuff up, and running, I guess it's time to add content. This is going to be a trick for me, because while I have lots of content, I have next to no design ability. But I'm sure I'll figure it out, if you'll just bear with me!

—Brian (03/17/2004 2:14 PM)