Breaking instanceof in Javascript

That’s right, this afternoon I figured out how to break instanceof in Javascript. Since I don’t use it often, I figured it worked just like it does in PHP. Basically it does, with one major caveat. Mozilla’s javascript reference gives this definition of the instanceof operator: Use instanceof when you need to confirm the type of an object at runtime. For example, when catching exceptions, you can branch to different exception-handling code depending on the type of exception thrown. »

4am

Since college, last night was the first night I can remember being up at 4 am and not wanting to be. I have been working hard on the next version of webmail which is going into beta very soon, so I haven’t had much spare time, especially to blog. During the development of this version of Webmail, I realized what could be my greatest flaw, or my greatest asset depending on who you ask. »

MythTV 0.20 and Ubuntu Edgy Eft

Since MythTV is one of my favorite hobby projects, I figured I should start blogging about it. I started building my Myth box over the summer of 2006 with MythTV 0.19 and Ubuntu Dapper Drake. Since Dapper had no built in package support for MythTV, everything had to be compiled, including MythTV, IVTV, and LIRC. Edgy Eft has a MythTV package and it makes installing a lot easier. The newest release of MythTV, 0.20, has many new features over 0.19, but only one stands out to me. »

iPod v1.2.1 and Ubuntu

I have had an iPod for a little over a year, and never updated the software. Since I run Ubuntu on all my computers, without Wine, I rarely log onto my Windows partition. So, a couple days ago, I decided to update my iPod software from 1.0 to 1.2.1. All did not go as planned. When I loaded up Amarok after updating my iPod, I received this message: Media Device: failed to create lockfile on iPod mounted at /media/ipod: Read-only file system After a lot of Googling, I found nothing related to my error. »

PHP References

I recently found this while going through PHP’s online documentation: Do not use return-by-reference to increase performance, the engine is smart enough to optimize this on its own. Only return references when you have a valid technical reason to do it! So, the question becomes, what is a valid technical reason to use references? Objects are already passed and returned by reference, so using references for them is a waste. In the last couple years of PHP coding, I have only found one good use for references: public function getNextLine(&$str){ .... »

Pandora

A few months ago, one of my friends told me to check out Pandora Internet Radio. Since then, I have rarely listened to any other internet radio services. A few years ago I tried out Yahoo’s music service and was fairly impressed but it wasn’t very good at recommending music I like. Pandora, on the other hand, is great at it. Pandora is based on the Music Genome Project, and I have no idea what that is. »

Dell's day of reckoning

When I wanted a laptop for school a couple years ago, I came to the sad realization that I couldn’t buy one that didn’t have Microsoft Windows and 500 other pre-installed programs. I quickly reformatted to Linux. Today, Dell and Microsoft are realizing there are many others out there like me. Since Dell started its Ideastorm website they finally must acknowledge that people hate not having a choice. The number one idea is “Pre-installed Linux.” Wow! »

Brian Hartsock on #Linux,

Active Record

One of my favorite design patterns is the Active Record pattern. For those of you who haven’t heard of it, this pattern abstracts database access to a very simplistic level. I first starting playing with my own implementations a couple years ago, but it wasn’t until I used Ruby on Rails that I first saw a fully functional implementation. At Webmail.us, I have decided to use my side-project hours to work on my own version of the active record pattern. »

SSHFS

I recently discovered SSHFS, or SSH filesytem, and I haven’t used Samba or NFS for my Linux sharing needs since. It has all the features of Samba and NFS, without all the headaches. To install on Ubuntu, just: apt-get install sshfs usermod -a -G fuse username and to mount a filesystem: sshfs username@remote_machine:remote_dir local_dir You may be wondering why I have become such an advocate for SSHFS overnight. Here are the biggest benefits I see: Encryption Reliability User mounting without any root privileges No Gnome keyring to manage Samba password (I hate Gnome keyring) NO SERVER SETUP Unfortunately, there are a few downsides to using this remote filesystem utility. »

Brian Hartsock on #Linux,

First Post

Well, like so many others around me, I have decided to start a blog for a few reasons. First, I feel left out especially after I heard my friend Sola, who is quite computer illiterate, had a blog. Second, I have a problem with forgetting things, especially work/programming related. With a blog, I can easily document my thoughts and search through them once my brain has long forgotten. Lastly, I hope that a few people may enjoy reading my rants, thoughts, and anything else I decide to write about. »

Brian Hartsock