Archive for the 'Miscellaneous' Category

Traffic Sources

February 5th, 2008 by peasleer

I’ve had this blog going for a while now, and am definitely starting to notice trends from the sources of visitors I receive.

  • Traffic that originates from google results in users that spend a decent amount of time reading about what they were searching for. They rarely comment, and rarely come back.
  • People that visit via RSS are likely to comment and spend a good amount of time reading about the article, as they are usually my friends, family, and people who occasionally appreciate what I share.
  • Traffic originating from news portals where my articles have been posted generate the highest quality traffic. The users are interested in the topic, have some amount of experience with it, and leave great comments. I really like these visitors, especially the ones that come from debian-news, tuxmachines, and fsdaily.
  • Visitors coming from Digg are, in general, /idiots./ They have little knowledge about the post they are reading about, which is fine - I post so others can learn from my experiences. What is not fine however is when they leave comments with viewpoints that make no sense or are based on snap judgments from reading a third of an article.
  • Stumbleupon users rarely stay on the site for more than a second, but when they do, they too leave decent comments. I’m guessing this is because they only stop to read what interests them, so the user who spends time reading a post is a user who likes the topic already.

The quality of my readers seems to be dependent on the domain of the topic. Visitors from within the topic’s domain are of higher quality, and I really do appreciate them. Visitors coming from more mainstream locations, and I’m generalizing here because I only have experience with Digg, are of lesser quality. I guess it is the same as in anywhere - people that seek you out are more likely to have a genuine appreciation for what they can take from communicating with you, while people who are fed what you have to say are more likely to troll or ignore you.

Tags: , ,

Off the Hook

January 27th, 2008 by peasleer

2600 runs a weekly radio show Off the Hook. I pull it down via RSS (high-definition link) and listen to it in the car when I can, and recommend the show to anyone interested in privacy and security.

The reason I’m bringing it up is because my friend Drew Stephens has been posting transcripts with links to more information for the major topics. It is great for providing supplementary information, and is definitely worth checking out if you miss a show.

Kudos, Drew!

Raw Image to VMDK… the Easy Way

January 7th, 2008 by peasleer

In my last post I chronicled the time consuming process of converting an image produced using the Unix dd utility to a vmware VMDK virtual disk. The process does work, but VMWare will only load it if the image contains a master boot record that still contains the appropriate information when removed from the rest of the system. Additionally, I think it is appropriate to mention again how terribly slow it is. We can circumvent these problems with Live View for Windows, a program developed for forensic work by Carnegie Mellon University.

The process for creating the image with dd is the same as last time, IE, by doing something along the lines of:


dd if=/dev/hdc3 of=/mnt/external/diskImage/XPSP2.img bs=1024

Once that image is generated and you are back in Windows, simply launch the Live View utility and… the rest is pretty self explanatory. Once the dd image is generated, the Live View program takes only a couple minutes to create the new vmdk, configure the virtual machine, and launch it. Sweet, sweet efficiency!

Converting a Physical Disk to a VMWare Virtual Disk

January 5th, 2008 by peasleer

[Update: there is an alternative method here. It has better success and is more reliable for partitions that reside in the second or later primary partition positions. It is also a more user friendly.]

I have a Windows XP SP2 installation that I use for work, while my current personal OS of choice is Windows Vista. I only work weekends, so rebooting wasn’t too bothersome initially. Over time it has become more and more of a chore, as I can’t easily switch from one development environment to another without rebooting. I decided it was time to make my work installation a virtual machine.

I had some additional complications that made the process a little non-standard. I originally tried using VMWare’s converter tool, but it would fail at 97% of the creation of the disk. I then tried using a Windows port of the Unix utility ‘dd’ to create a raw image of the disk, but because the Windows volume manager was accessing the disk, dd would give me access errors. Additionally, the VMWare converter doesn’t support converting from a raw image (…grr…), so Qemu’s qemu-img tool would have to be used to convert the raw image to a disk in VMWare’s vmdk format.

The steps to reach our goal aren’t too complicated, and can be replicated by others easily. To do it, I used:

  • VMWare Workstation
  • A Linux installation or LiveCD (I used my existing Debian installation, but something like Knoppix would work fine)
  • Qemu
  • NTFS-3G (if you plan on writing out to an NTFS partition from Linux, as I did)

I started by booting into my Linux install. Linux only mounts the disks it uses (hint hint, Microsoft) so we can access all sectors of the partition to make a dump of the disk with dd. I first had to mount the partition where I wanted the output file to reside, which uses NTFS:

ntfs-3g /dev/sdb1 /mnt/external

Next, create the image. I did this with the following (substitute your device/partition and output file):

dd if=/dev/hdc3 of=/mnt/external/diskImage/XPSP2.img bs=1024

When that finishes, the file specified with the ‘of’ option in dd will contain a block-by-block exact copy of your partition. However, it is in a raw format - we need it in a format VMWare can read. This is where Qemu comes in. Qemu is distributed with qemu-img, a tool used for creating, manipulating, and converting images. Specifically, our goal is to use qemu-img’s convert functionality to convert from a raw image format to the vmdk format. This is accomplished with:

qemu-img convert -f raw /mnt/external/diskImage/XPSP2.img -O vmdk /mnt/external/diskImage/XPSP2.vmdk

Be prepared to wait. For a 40gb image, this process took roughly 12 hours. Since qemu-img provides no status as to how far it has come, I kept tabs on it just by monitoring the filesize of the output image. This is entirely unnecessary, but if you want to do the same, just open a new terminal and type the following:

while [1 -gt 0 ]; do du -hs /mnt/external/diskImage/XPSP2.vmdk; sleep 10; clear; done

This will just print out the size of the file on your screen so you can watch it grow. Alternatively, Roberte provided a tip in the comments that suggested using the “watch” command. Either will work:

watch ‘ls -lh /mnt/external/diskImage/XPSP.vmdk’

When the process is completed, boot back into Windows (or if you are using Linux as the host, stay put) and create a virtual machine around your new disk image. Don’t forget to remove the original img created with dd, it is a huge waste of disk space :)

[Notes]

  1. This process is really only feasible if you have a lot of disk space. At worst, the disk requirements are greater than 2*P, where P is the partition size of the virtual machine you wish to create. However, qemu-img only writes out actual data, not empty sectors, so your output image will be the size of the used space in the input image. For my conversion, I used over 40gb (input)+15gb (output) of disk space, which was reclaimed with the deletion of the output of dd, and resizing another partition to use the old physical installation’s space.
  2. qemu-img doesn’t support stream input, which is why we can’t pipe dd’s output directly into qemu-img convert. This would have reduced the disk requirements to only the size of the vmdk image, and sped up the process substantially. Bug the Qemu developers to implement this feature :)

IT Filter

December 16th, 2007 by peasleer

Along with the common acceptance of ‘lolspeak’ as a method of legitimate communication, IT websites are a scourge of the Internet.

I really enjoy reading their articles, I do. You can gauge an author’s technical competence by how well they describe the concepts they are covering, so I play a little game. I first read the article, taking note of all the areas they introduce then gloss over (exposing their lack of knowledge). For each occurrence, I tally a point on an invisible scrap of paper in my head. At the end, I read the author’s credentials. You’ll generally find that the number of points tallied equals the number of times ‘expert,’ ‘authority,’ and ’specialized’ appear in their biography, with any points left over being assigned to each of their degrees and certifications.

If I ever write for a website or paper, you know what my biography is going to say?

“Robert Peaslee is an author. If you have no idea how to verify whether everything he writes is made up, you probably shouldn’t be reading his articles.”

PS,

We need a firefox plugin to filter IT websites.

Tags: ,

Jargon

December 9th, 2007 by peasleer

Different fields provide entire vocabularies to make communicating ideas specific to that field easier. The necessity of the words these languages use is variable. Guess which language we’ll be using for examples?

Necessary: abbreviations like TCP, NTFS, SDK… etcetera. You don’t want to say the full thing every time it comes up in conversation.

Justifiable: OO, RTFM, and any file format used to describe a data entity (exe, jpeg, etc). It gets weird hearing “oh oh” (OO) when talking to a peer, but probably because I always think of Office Space when the abbreviation graces my ears.

Unjustifiable: Any word that has been bastardized and is now being applied in the war on the English language. Flikr, Digg, and Writely are all included. Maybe not jargon, but I hear them way too much to go ignored.

Management: Any of the above terms used inappropriately.

Jargon: use responsibly.

Reform in Education

August 15th, 2007 by peasleer

If only educators were required to see this (~20 minute) TED presentation before being given the minds of our students. Sir Ken Robinson focuses on creativity in the arts throughout this talk, but any programmer knows the benefit of being able to think creatively when writing code.

Sir Ken Robinson - Do Schools Kill Creativity? (via TED)

On Being Happy

May 25th, 2007 by peasleer

My latest co-op has been an interesting one.

I’m working for SAIC down at their Chantilly, VA location but live in Columbia, MD. This results in a 112 mile daily commute through agonizingly slow traffic along the DC beltway (up to 3 hours in one direction when there is a bad accident). Add the long commute to an intern’s hourly wage slowly being strangled by the cost of rent ($500 monthly), food (~$200 monthly), and increasing gas prices (~$300 monthly) compounded by living 2,500 miles from my nearest family member and one can find themselves feeling overwhelmed.

There are however factors that make it bearable, even rewarding, and I hope that sharing them will help someone in a similar position:

First, I know this is temporary. I have committed to this situation for six months, and the amount I am learning about the professional world is invaluable. (For example, guess who is going to avoid a long commute if at all possible in the future? That’s right, yours truly. It just isn’t worth it.)

Second, I’m making connections in a very job-hot sector. Washington DC has got to be the easiest location to get a job at any level if you just know a couple people. Everyone here is so interconnected that just throwing out an e-mail to a friend or old manager is bound to net you a reply of a job opening in their company or one of the other agencies they routinely interact with. Managers talk, and are always looking for talented people.

Third, the commute is completely handled by your mindset. At first I was frustrated, tense, and bored just sitting in my car every day. Then I purchased an FM transmitter for my MP3 player and things changed. Now, while I wouldn’t say I look forward to my commute, I don’t dread it either. Audio books, lectures in various subjects from respected professors, and stretching my brain to extend my comprehension of German now occupy my time. It is actually kind of relaxing, and the time passes pretty quickly now. (Just remember to pack a water bottle and snacks! :) )

Fourth, I am recouping my gas costs by working overtime. I come in and leave early most days, but Thursdays and Fridays have the worst traffic by far, so I stay for two or three hours after my normal leaving time and work through the traffic. This time is my most productive because the weekend is close and no one is around, and getting paid 1.5x my hourly wage for these couple of hours really help when paying at the pump.

Fifth and most importantly, a lifestyle change. Specifically, I now make better use of my free time and balance the amount of time allocated to different activities. Number one on this list is spending time with my girlfriend. Being gone for 12 hours out of a day results in missing out on a lot of shared time, so I make it a point to use my two to four hours of daily free time to do things with her. Lately, we’ve been eating dinner, walking the dog, and either jogging around a loop nearby or to the library to get more books to keep moving. Then we wrap things up with back rubs and watching an episode of whatever TV show we are in the mood of before going to bed. It is amazing! If you aren’t spending quality time with your family and loved ones, you are missing out on something huge. Number two but equally important has been an attitude adjustment from my old style of skeptical and negative to skeptical and positive. Just giving people the benefit of the doubt and being a nicer person has made me feel a lot better about myself and my situation. It seriously has made me a happier person in general. Number three is personal enrichment. While you always feel busy and overworked, I’m learning that when you look back on yourself you can’t believe how much free time you had and wasted. I’m stopping that cycle and using my free time now to read more, spend more time outside enjoying the sun, and enjoy the company of others - because honestly the thing that has made me the most happy with my life is by making myself happy. It works.

Transition

March 27th, 2007 by peasleer

I’ve decided to take a couple quarters off of school and accept a position at SAIC, and my new ISP doesn’t appreciate it’s users hosting services. Because of this, I’m moving to wordpress’s free blog hosting service. Everything transitioned smoothly except the files - expect all the links to be broken for a while as I move and update things.

Regular postings will return soon!

My Time With Facebook

December 17th, 2006 by peasleer

Being one of the millions of Facebook users, I was pretty happy to hear that they opened up a restricted API for those interested in developing applications that interact with it. I found myself with a few hours one weekend, and came up with a simple application using the API to check if you have any Facebook messages. Normally I wouldn’t post a task like this because it was rather trivial, but I decided to anyway because I did it in what I think is a cool way.

First, the actual code to check the messages is written in PHP and hosted on my web server. It will refresh every five seconds and check if you have new messages, displaying an icon to open a new browser window to check the messages. It can be seen here. Notice that I’m much better at writing code than designing interfaces ;) If you are interested, I’m using the official Facebook PHP5 client as a base for the web portion of the application. Full source is here.

The second part of the final application is a program written in C#. It is a small window that fits the dimensions of the used part of that page, using the maximize button to switch between the messages pane and the login pane when required. Internet Explorer is embedded in the application to do the rendering, but is stripped down in terms of navigation and context menu usage. It is still possible to navigate outside of the intended area, but this is a limitation on how Facebook designed it’s login page. The source of the application can be obtained here (zip format) and the executable itself can be obtained here (zip format). The source was built using Visual Studio 2005 - you should be able to build it without complication.

But enough of the program specifics.

Web applications are nice for developers. They develop the application in one place, and the changes are immediate to all users of the software. Feature and security updates are completely transparent, and best of all, the users don’t have to worry about them. Developer liability goes down because users aren’t running around with out of date and possibly insecure versions of their application, and users are happy because they always have the latest version of the software - a win-win situation. Even better, developers don’t have to concern themselves with deciding which operating systems or platforms to develop their primary application for because it is all online. This opens the application to a huge market of people. On the down side, web applications aren’t as accessible to as many people. Most people understand how to click an icon and use a program, it takes a higher level of acceptance to understand, for example, that their web browser could be used to replace Excel. The obvious solution to this problem is what is exemplified in the small application I’ve written to do an overall meaningless task. Embedding a browser in an application allows developers to have a binary executable that the masses are comfortable with that navigates solely to a web application that the developers prefer to maintain. With proper design, the web application can be made to always look good within the client executable, and following some rules of development will prevent people escaping to other sites from within the application. Everyone is happy.

I might expand on the idea later. There are other ways this would be useful, and some other ideas I’d like to tack to the list of supporting reasons for this concept. We’ll see :) It should also be noted that these thoughts originally came out of talking with the very intelligent Mike Manzano in my time working as his intern at Topia Technologies. See Mike, I *was* listening!