alan
Alan Porter is a mobile application developer, a nerd, a father, and a friend. He is really into gadgets and open source software, and he has spent most of his career making these two things work -- sometimes together. These days, you'll usually find him tinkering with his iPhone. He lives in NC with his lovely Malaysian wife and his two daughters.
Home page: http://alanporter.com
Posts by alan
Happy @1234567890
0Computers usually tell time by counting the number of seconds since a certain “epoch” time. Then, before displaying the time to you, they do all of the crazy math that defines days of the year and leap years, and even time zones daylight savings time. On Linux systems, the “epoch” is midnight on January 1st, 1970.
At any time, you can tell how many seconds have passed since the epoch by typing:
date +%s
Tonight, at 6:31:30 pm local time, we reached a magic moment when the date was exactly 1234567890 seconds since epoch.
I took this opportunity to show the kids how computers keep track of the time, and to explain time zones (even though they are comfortable with the fact that is it morning in Malaysia when it’s evening here, they did not know about time zones). At the magic moment, we took time out from our pizza supper to watch the time change on my laptop.
WFH: Working From Home
2Tekelec has had an official “work from home” policy for a while now, but I have never taken advantage of it until now. I had dialed in to kick off builds or to check email, but I never tried working an entire day at home.
I decided that I should try it out, just to see if it would work for me. Depending on what you’re working on, and on the infrastructure at your office, working at home can either be a wonderful productivity tool, or it can be an exercise in frustration.
At my previous job, I could carry my entire development and test environment around on a laptop. I could do my work in isolation, even without a network connection. The only time I needed to connect to our office VPN was when I needed to check my source code into our code library.
The same is not true at Tekelec. We have a carefully set-up development environment in a lab — with source code living on one machine, builds taking place an other machines, and testing taking place on even more machines. In fact, the PC on my desk is only used to access these servers. Similarly, when working from home, my PC does not need any special software installed, since it is only used as a screen. I use a software package called “NX” to remotely log in to the PC in my office.
I think the day worked out OK. Here’s some lessons that I learned:
- A few days beforehand, I need to block off the day in my calendar (to prevent people from trying to schedule meetings while I planning to be out).
- The desk in my home office is OK, but I could use a better chair.
- In the mid-morning, I get a glare from the bedroom window. In the late afternoon, I get a bright sun spot across my monitor from the office window. I might want to turn my desk.
- My monitor at home is finer pitch than the one at work, so fonts look small.
- NX is a great tool for remotely logging in to my desktop PC… much better than VNC.
- At first, I ran into some glitches with NX mapping my keyboard keys incorrectly.
- My normal lunchtime came and went without me even noticing.
- The cafeteria at work has a lot more choices than my fridge.
- The bathrooms are cleaner at work than they are at home. (!!)
- When I return to the office the next day, I need to remember to bring my books back with me.
All in all, I think it went OK. I think I’ll try to incorporate regular WFH days into my work schedule.
Over the Top
0This week, the Ringling Brothers and Barnum & Bailey Circus is in Raleigh, and we took the girls to go see it on opening night.
The show was, as they claimed in one of their songs, “Over the Top”… wild animals, motorcycles, jugglers and acrobats, and plenty of people with no fear of heights.
The Greatest Show on Earth? Possibly. It was certainly worth the (discounted opening night) ticket price.
GnuCash for Windows
2When I started a consulting company in 2006, I decided to use GnuCash for my business books, since I was already familiar with it from home use. It is very well-suited for business accounting, since it uses standard accounting terminology and double entry. When it was time to prepare my corporate taxes, I called my dad (an accountant) to explain basic business accounting to me… closing out the books for the year, and all that jazz. I really wanted to share my GnuCash file with him, but that was not possible, since he uses Windows.
Today, I discovered that GnuCash has been ported to Windows (since version 2.2.0 in August of 2007). This is HUGE. With the whole “interoperability” stumbling block out the way, small businesses have one more reason to use open source software like GnuCash and Linux. I imagine that soon, if not already, business owners will be able to send their GnuCash data files directly to their accountants, just like they do today with their QuickBooks files.
Today, in preparation for March 15th (tax day for corporations), I installed GnuCash on my dad’s Windows PC, and he took a look at my books.
GnuCash, FTW!
I do have one question, though. During the installation, the GnuCash installer mentioned something about “Installing Windows firewall rules.” That scares me a little. If you know why it does this, leave a comment below.
Snow-bama
0Today was dominated by two events.
Locally, we woke up to find the ground covered with three inches of snow. Our girls have not experienced too many snow days… the few times it has snowed in recent years, we only got a light dusting. This time, we had enough to enjoy a snowball fight and some disc sledding in our back yard.
On a national scale, we enjoyed watching President Obama’s inauguration (and equally as important, the orderly end of the Bush regime). Our new president had some powerful words to mark the event. For me, the most memorable line of his speech was: “As for our common defense, we reject as false the choice between our safety and our ideals.” I welcome our new president, and I look forward to participating in a new America.
Nerds of a feather
0My first exposure to computers was in 1981, when my neighbor “Howdy” (Howard) Petree showed me his family’s TRS-80 Color Computer. His dad gave me some sage advice: “do whatever you want to… you’re not going to break it”. I wrote a simple game called “Al-Zap”, which led the player through a series of scenarios, each followed by three choices: “(1) Eat it, (2) Shoot it, (3) Run away”. I kept the program on three hand-written pages on a note pad, and I manually re-entered it when I wanted to work on it some more.
My interest in computers continued, but I could not go bug Howdy every time I had the urge to tinker. That’s when my friend Greg Reid told me that the public library in downtown Winston-Salem had a lab with four Apple II computers. So my early years of computing were primarily spent hacking on the Apple II’s. Eventually, my dad bought one for our family.
The rest, as they say, is history.
This week, Jeff Mercer from the Triangle Linux User Group offered a working Apple II computer to whoever would come and take it off of his hands. I took Jeff’s offer, and I hooked the old computer up so I could show the girls what “old school” computing was like.
Audrey and I did a little bit of tinkering with Applesoft BASIC, and then I gave her an assignment: to print out a multiplication table. She worked on her FOR/NEXT loops, and soon she had a very nice looking 10×10 table of numbers.
I am very proud of her accomplishment, and even more proud that she took such an interest in her daddy’s past.
Let the music play!
0My friend Tim told me about a music service called “Pandora“, which is an internet radio station that runs in a flash applet in a web browser. You can suggest songs or artists, and vote songs up or down. It uses the the Music Genome Project to categorize music, and to add similar music to your playlists. It’s a pretty cool project.
However, I encountered problems when I ran it on my Asus Eee PC 900. Pandora seems to run fine by itself, but it pauses and skips if you are browsing in another window. I think it has to do with a combination of Firefox’s “AwesomeBar” and the Eee PC’s flash disk.
The Awesomebar is Firefox3’s new address bar that searches for matches among your bookmarks and the titles and URL’s from every web site you have visited recently. Since the Eee PC uses a solid state flash disk, disk writes are pretty slow. So when you are browsing, every time open a new page, Firefox 3 writes some stuff to its sqlite database of user history. It then calls fflush(), which flushes all writes (not just its own) to the disk. During this time, all browser activity halts until the writes are complete. Other applications keep running fine, but the browser rendering stops — often “graying out”, turning back-and-white until it starts responding again. The problem is, flash applets also pause, and that includes Pandora.
I considered a few solutions:
- Run the Pandora applet in a different browser, and use Firefox for browsing.
- Run the Pandora applet in a stand-alone flash player.
- Run the Pandora applet on my server, while I browse on the Eee PC.
- Run a different application for audio, like “audacious” (an xmms clone).
Combining a couple of these ideas, I wondered if I could run some sort of console-based streaming audio application on my server. It would be cool to hook up some speakers to bender and listen to internet radio.
It turns out that mplayer will do just that. For example:
mplayer http://wunc.org/about/listen.pls
And now we’re listening to our local NPR station!
Note – you’ll also want to install a utility to set the volume. I use alsamixer.
Of course, this does not solve the original problem of Pandora pausing. And there seems to be quite a frenzy on the Firefox bug tracker about flushing the history database.
But streaming audio from a headless server is a pretty neat idea, and one that may become a permanent fixture in my home office.
Just a sec…
0As we are all counting down to welcome in 2009, we should be reminded to wait just a second, to stop wishing our lives away.
At 7pm Eastern time (midnight UTC), the official international time-keeping standards body inserted a “leap second” into the normal stream of ordinary seconds.
This is done periodically to keep our standard clocks (UTC) in sync with “mean solar time”, which is based on the Earth’s position and rotation. If we did not do that, then Earth-related events such as midnight and noon would gradually shift to different times of the day (likewise, without leap days, the equinoxes and solstices would gradually shift through the year).
At home, I could witness this historic event in the logs of my Linux-based server, bender.
Dec 31 18:59:59 Clock: inserting leap second 23:59:60 UTC
How did YOU spend YOUR leap second?
Comments?
10My friend Tanner suggested that I am short-selling myself by not allowing others to add comments to my blog.
Since I started this blog as an experiment to familiarize myself with different types of content management software, it never occurred to me to open it up (in fact, I was surprised that anyone actually read it at all). My initial installation was “locked down” to reduce the potential avenues for spam.
So today, I turned on comments. It required a little bit of SQL tinkering to enable comments on past posts… I hope I did not mess anything up.
Let us know what you think.
In the dark
0The power was out at work this morning. We have massive generators to keep the labs powered, but the offices were in the dark. The whole building was filled with the beeping of dying UPS’s.
USB on VirtualBox (non-OSE)
0I spent most of Sunday trying to get a USB device to work under Windows XP, running inside of VirtualBox OSE on an Ubuntu host. I found lots of how-to’s, mostly involving permissions on /dev/bus/usb and /proc/bus/usb, and also comments about /etc/fstab. However, the part that was not inherently obvious was that VirtualBox OSE (the “Open Source Edition”) does not support USB. However, the non-OSE version does.
Again, VirtualBox OSE does not support USB.
So I downloaded the non-OSE version (actually, on Ubuntu, you can simply add a line to your apt sources file and use the normal apt tools to install it). Within minutes, my USB devices showed up. From what I understand, you do still need to make sure to mount /dev/bus/usb.
root@kimono:~$ grep vbox /etc/group vboxusers:x:125:alan root@kimono:~$ grep usb /etc/fstab none /proc/bus/usb usbfs devgid=125,devmode=664 0 0 root@kimono:~$ mount | grep usb none on /proc/bus/usb type usbfs (rw,devgid=125,devmode=666) root@kimono:~$