Oct 26 2009

Ubuntu!

Steve

For symmetry and completeness, I’ll talk a little bit about Ubuntu given that I recently wrote about Windows 7. Ubuntu is very nice! I’m very excited for the next version, 9.10, to come out. Three days from today!

03

I’m currently running the 64 bit version of Ubuntu 9.04 on my laptop (simultaneously with Windows XP and Windows 7). Here’s a screenshot:

Ubuntu904Screenshot

One great thing about Ubuntu is that it makes multiple desktops very easy. Windows 7 has quite a few handy tools to navigate around given your single desktop, more so than Ubuntu. Ubuntu, however, gives you multiple desktops:

MultiDesktop

‘Tis all for now!


Oct 23 2009

Windows 7

Steve

Cheers all,

As you may have heard, Microsoft released Windows 7 yesterday. Because MIT is awesome, IST (Information Services and Technology) had it ready for students to download for free and install the same day. So, taking advantage of this, I upgraded my Windows 7 RC partition to the full-on version, Windows 7 Enterprise. And I have to say, it seems pretty nice so far! Here’s a screenshot of my desktop:

Windows7Screenshot

Since I never had Vista, I can’t compare speeds. It does seem to be pretty quick though, it looks as though the OS might be pre-loading or caching certain commonly used programs.

The only hiccup I’ve found was that, immediately after installing, Windows 7 didn’t recognize my graphics card, so I didn’t have Windows Aero and my screen resolution was small. Windows later redirected me to download a graphics driver from nVidia’s website, which worked quite well.

Coming from Windows XP and Ubuntu, one feature I think that’s really cool is the Media Center. You can play music and have a pretty, moving display of your albums in full screen mode. I think it’s pretty knarley:

WindowsMediaCenter

Although it’s a bit early to say for sure, I think Windows 7 is going to be a success.

See you later!


Jul 16 2009

code monkey!

Steve

What have I been doing in my free time this summer? Being a code monkey! Yes, perhaps I’ve been failing quite spectacularly at staying away from my computer, like I mentioned in my last post. Oh well… I have been doing other non-computer stuff, too! Like biking more than I have in my life (16+ miles one day last week).

About a week ago I randomly remembered hearing a cool story about Google Darwinistically selecting the nerdiest and most passionate engineers to hire. Googling around, I found that the company put up a billboard that said “{first 10-digit prime found in consecutive digits of e}.com”. That’s all the billboard said; no reference whatsoever to google:

Google billboard

Most driver-by’s probably didn’t think twice about the sign. However, it turned out that, once solving the challenge and going to that website, there was a similar puzzle that lead to another website, which in turn was a Google hiring page that encouraged anyone brave, courageous, and geeky enough to find it to submit his/her resume to Google. Awesome sauce!

Having nothing better to do in my copious amounts of free time this summer, I decided to give it a shot and see if I could solve it. This turned out to be quite a fun problem, and in the process I ended up brushing up on my 6.042 and 6.006 from last year. Getting mad digits of e was easy thanks to the internet, and checking for primes wasn’t too bad either with the help of a good old Mathematician buddy, Fermat. Fermat’s primality test (http://en.wikipedia.org/wiki/Fermat_primality_test) is a relatively simple probablistic algorithm (compared at least to some other algorithms) that can tell if you a number is probably prime without actually factoring it. Pretty sweet, huh! It uses a lot of modular multiplication, which can be computed efficiently with some tricks from 6.042 and 6.006. My code wasn’t too long (34 lines), and it ran nice and fast, too. :-) Anyways, it turns out the answer is http://7427466391.com, which unfortunately doesn’t work anymore. But, it was still fun finding the answer!

That was my code monkey story of the day. More lately, a friend from high school CL introduced me to a fun, Scrabble-like card game called Quiddler:

http://www.setgame.com/quiddler/puzzle_frame.htm

For such a simple game, there’s actually quite a bit of strategy that one can employ. And it’s computationally intensive, great for a computer AI! I’ve started coding a Quiddler engine, and hopefully I’ll finish it someday and put it on the internet so people can play against it. That would be fun!


Jun 28 2009

On will-power and hardware issues

Steve

I’ve noticed that I tend to use my computer a lot… perhaps even a bit too much. I suppose that isn’t surprising given I’m a computer science major, but maybe I should start cutting down a bit. Typically, whenever I’m not sure what to do or I have a bit of free time, I find myself on auto-pilot, heading over to my computer. It’s just what I do, I guess. I end up surfing the internet, reading blogs, checking email, facebook, programming random stuff, using graphics software, etc. But it eats up  so much of my spare time!

Lately though, I’ve been on my computer less. For instance, I hardly used it at all yesterday, and it was great! I had so much free time, and the day seemed to last twice as long. I got so much stuff done. I wish I could say that this was a self-enforced victory of will power, but alas I cannot. The real reason why I wasn’t using my computer is because it has hardware issues, and I couldn’t really use my computer :-)

You may have heard that nVidia is in some trouble for producing a large number of faulty graphics cards that have found their way into various Dell, Apple, and HP computers. To make a long story short, my laptop happens to be one of the ill-crossed models to receive a faulty chip. My computer worked fine at first when I got it two years ago, but lately it’s been dying due to video card-related issues. At first it was manageable, but the problem has since become much worse, to the point where my computer has been at times completely unusable and unreliable (especially it seems, before psets have been due). My computer is also overheating a lot…  at one point, I measured my computer’s internal temperature to be 91 degrees celsius… yes, nearly hot enough to boil water!! Computer’s aren’t meant to be that toasty inside.

Enough was enough, so I called up Dell last week to tell them what was going on, and that I suspected I had a faulty graphics chip. Sure enough I was right; my computer was affected. Luckily Dell is handling the situation well, and will be replacing my motherboard next week, so the problem should be fixed.

I’m excited that my computer’s finally going to be in working order again, but in another sense that probably means I’ll be using my computer too often again … My forced vacation from computers is now ending, so I’ll actually have to use my will power to avoid letting this little computation device eat up all of my spare time :-)


Jun 14 2009

Flying machine

Steve

I’ve been awe-inspired for as long as I can remember with things that can fly. I was thinking about perhaps building some sort of model RC aircraft this summer because I think it would be really cool. As I googled around, I found this amazing video. A guy from Canada constructed a model RC airplane with a built-in wireless video camera that can move left/right and up/down. The best part, however, is that this camera motion is controlled by a gyroscope mounted to the pilot’s visor; So when the pilot moves his/her head up, the camera moves up as well, etc. It feels like you’re in the plane, check it out:

I would love to build something like this, but it might be difficult for these reasons:

  • It’s probably very expensive. RC planes alone aren’t particularly cheap, and a wireless, color, high resolution radio camera almost certainly isn’t cheap!
  • The radio video range might not be that great, so that you could lose video (or worse, control of the aircraft) if you fly it too far away. So, you can’t fly long-range missions with the plane

I’ve been trying to think of ways to solve these problems (at least the radio issue). I have an interesting idea; instead of using radio controls to fly the plane, it would be cool to consider leveraging our pre-existing internet and cell-phone network infrastructure. In other words, if we could beam control signals and retrieve video from the plane over the cell-phone network, a plane could fly for much farther. In fact, assuming the plane doesn’t fly into any drop-out zones (which would probably be less of an issue since plane’s are high in the area above obstacles anyways), the plane could potentially go ad infinitum (or at least until the batteries run out :-) )!

Implementing this could be tricky, however. Cell-phones are not designed to transmit arbitrary data (such as flight commands and video data) over the network; they’re designed for low-bandwidth, compressed audio. Hacking a cell phone to get this to work would be tricky, and it may not even be possible due to bandwidth limitations since video typically takes up a lot of space. Another idea I thought of however, would be to make use of relatively newer technologies, such as 3G. First of all, 3G purports to have a much higher bandwidth than a regular cellphone, making the possibility of transmitting video possible. And cellphone carriers let cellphone’s connect to the internet with 3G. Some newer netbooks come equipped with 3G, and can communicate over 3G networks to the internet (requiring a service plan, of course) anywhere there is a cellphone tower nearby.

It would be awesome to build this! Here’s a system architecture for what I’m thinking:

Flight Idea

Basically in a nutshell, a human “pilot” sits at the computer, who sends flight commands and views the flight video (in real time). These commands and video travel over the internet, targeting a netbook mounted on the plane. The netbook can control the plane, and is also connected to a video camera (some netbooks even have webcams built in). Both the computer control station and the netbook controlling the plane are in constant communication with a computer server. The computer control station talks to the server via the internet; the netbook talks to the server via some sort of high-speed cellphone network, such as 3G, which in turn acts as a gateway to the internet.

Some advantages to this design:

  • Allows the plane to fly just about anywhere, because cell phone coverage is widespread
  • Allows for long-distance flights
  • Uses pre-existing infrastructure (internet, cellphone towers) instead of relying on ad-hoc RF communication
  • Since the netbook is a computer, it is completely programmable. It runs Windows or Linux. So, you can get it to do basically whatever you want, and to transmit whatever data you want.
    • A second board can be connected via serial or USB to the netbook, and this board can actuate motors on the plane (such as aeilerons, etc.) to control the flight. Complete “fly by wire”
    • Since the netbook is completley programmable, it can be made to deal with certain error conditions. For example, what happens if the wireless signal disappears? The plane can have an automated program to turn around or something, so that way  it can get back in range. Very basic flight control can be implemented into the netbook
    • Using a computer instead of a cellphone is a better infrastructure choice, and makes making changes down the road much easier.
  • Power is not too much of an issue, since netbooks have built-in batteries, and USB buses are powered from this
  • Many netbooks already have built-in 3G cards and webcams for recording video
  • No complicated cell phone hacking required
  • It’s cool!

Some disadvantages to this design:

  • Although it isn’t prohibitively expensive, it isn’t cheap either. At about the time of this writing, a cheap netbook with a 2 year service plan goes for about $200-$250
  • It involves better hardware than a simple RF receiver. So if something does go wrong and the plane crashes, you’ve lost more than you would have without such a system
  • Possible wireless dead-zones. Although this may not be as much of an issue, since there are less obstacles and a better line-of-sight to cellphone towers when flying high up in the air
  • Wireless bandwidth supposedly goes down with increasing speeds. Hopefully it would still be okay in a fast-moving plane; this would need to be researched.

I think it would be awesome to build this! Since it’s complicated, multi-disciplinary, and could be expensive , it would be best as a team project in my opinion (especially when the team gets external funding!). Hmm… perhaps I should suggest this as a Next-Make project for next year?

Any thoughts on the design, or anything else for that matter?


May 29 2009

More fun with graphics

Steve

In my last post, I talked about Windows Live Writer, which has a number of neat features for inserting images into posts, such as adding reflections, polaroid-style borders, etc. This was all pretty nice, but with some of the features, I had to do annoying little things to get the software to do what I wanted. For example, I had to manually disable hyperlinks to online web albums that the software automatically created (and I didn’t want). Additionally, the program didn’t give a lot of advanced controls; it appears to be designed for ease of use (although in all fairness the software usually did a great job without all the complicated knobs and twiddles).

I wanted to see if I could make pretty graphics like this on my own, with more control, and in a relatively easy manner. Luckily, I’ve been using a great, open-source (free!) image editing program called GIMP (GNU Image Manipulation Program). I’d highly recommend it! In addition to having a lot of great features comparable to Adobe Photoshop (without the price tag), it’s also highly extendable. GIMP allows people to write plugins in the scheme programming language (!). This makes it easy to do pretty neat stuff that might otherwise take longer if you were to use the more elemental features of GIMP. For example,  I downloaded three plugins today; one for rounding the edges of a picture, another for adding reflections, and a third for adding polaroid-style borders to pictures.

Here’s an example picture I made demonstrating the rounded edges plugin and the reflection plugin, used sequentially. The reflection on top isn’t a plugin, it’s a semi-transparent white layer at an angle superimposed over the image.ShinyComputer

Here is a sample collage I made using GIMP. I used the polaroid-style border plugin, and the GIMP rotation tool.

PhotoCollage1

If you compare the above collage to the one that was auto-generated in Windows Live Writer in my previous post, you might agree that they look pretty similar. Although it did take a lot longer to make the above in GIMP (minutes rather than seconds in Windows Live Writer), I had more control. And it was fun making these pictures :-)

If you’re interested, I can point you to the GIMP plugins I used.


May 29 2009

Blogging software!

Steve

I’m testing a new blogging program. Instead of typing this post inside of WordPress, I’m using a program called Windows Live Writer, by Microsoft. It’s actually a pretty neat program… you can do a bunch of fancy, neat effects with them.

Check this out:

View Spring Boston Photos
(The above layout of photos was originally a link to a Microsoft Live Album. That was sort of annoying, so I just disabled the hyperlink)

Or this:

You can also add other knarley effects, like rounded edges or reflections (but unfortunately not both at the same time). It’s a pretty neat program! It integrates nicely with WordPress and tries to emulate your current theme as well. I’m pretty impressed with it.


Jan 24 2009

Windows 7 Beta!

Steve

I like computers. A lot. So, when I heard that Microsoft had publically released a beta version of Windows 7, the upcoming replacement to Windows Vista, I was very eager to try it!

First, I tried running Windows 7 Beta in a virtual machine on my computer, and it seemed to work fine, albeit fancy graphics (which I wouldn’t expect of any operating system running as a virtual machine). Microsoft recommends not installing Windows 7 as the main operating system on your computer (since it’s still in Beta and expected to have some bugs, and also since it expires in August!). So, I decided to install it on a fresh partition on my computer. After a bit of fighting with my hard-drive to get its primary and extended partitions set up properly, I was able to install Windows 7 on my computer. So, I now have a tri-boot system: Windows XP, Windows 7 Beta, and Ubuntu 8.04.

So far, Windows 7 seems pretty spiffy! It seems very quick and peppy, and the graphics are fantastic (although I admit it wasn’t easy getting Aero graphics enabled – nVidia hasn’t released great video card drivers yet for Windows 7). But once it’s up and running, it’s pretty nice and easy to use. There are some new window-management features (auto-tiling, transparent windows so you can the desktop, live window-preivews in the taskbar, etc.) that make it pretty fun to use. Here’s a screen shot of Windows 7 running on my system:

windows7

I have found a few minor glitchy things in Windows 7, but this is of course expected from a beta-release. I have a hunch that Microsoft is under a lot of pressure right now to churn out a high-quality operating system in the near future. After all, many people seem to dislike Vista due to bugginess (I haven’t really used Vista that much, so I can’t really comment too much on this), and also Macs are becoming overwhelmingly popular as well.

Windows 7 does seem to show a lot of promise so far, so I’ll bet it’ll be a good operating system!


Jan 24 2009

My PHP Class!

Steve

I know I haven’t blogged in a while (again), so here goes! I’ll finally write about some of the things that I said I’d write about in my last post, starting with a PHP class I taught a few weeks ago.

PHP is a really knarley web-programming language – it stands for “PHP: Hypertext Prepreocessor” (yes, a recursive acroynum!). On Tuesday, January 13th from 7:30 – 10:30 PM, I taught a caffeinated crash course in PHP through SIPB, a computer group on campus. By caffeinated, I’m not referring to actual beverages. Rather, this refers to the jam-packed nature of the course, as SIPB’s caffeinated crash courses tend to pack a gargantuous amount of information (such as an entire programming language) into a relatively short amount of time (just 3 hours).

My PHP class went very well I think, and I was very happy that there was a good turn out at the event (I’d estimate around 30-40 ish people showed up). Here’s a picture of it:

cccphp2009

In case you’re interested in seeing some of the lecture slides/topics I covered in class, here is a link to the class website:

http://sipb-iap.scripts.mit.edu/2009/cccphp/

It was fun! This was my first time teaching a class, and I enjoyed it a lot. I do admit that I was nervous before class started, but after I got the hang of things, it turned out to be pretty fun!


Jan 5 2009

Steve’s Computer Adventures II

Steve

It seems that lately, my computer has been doing a lot of very scary things… frightful to the innocent user who doesn’t know how to revive Windows XP from a recovery CD after an update fails. And last night, frightful to the user who doesn’t know how to fix a failing boot-loader.

I use GRUB as my boot-loader on my computer. For those of you unfamiliar with the term, a boot-loader is a small piece of software that starts the process of “booting” your computer, or loading the operating system. The boot-loader is located on the first 512 bytes of a hard-drive, and this is the place that the computer “instinctively” knows to look when looking for an operating system. Different boot-loaders differ very much in terms of features and complexity, and as a result, some boot-loaders cannot fit in this small, 512 byte region on a hard-drive. To solve this problem, people have developed what are called multi-stage boot-loaders (GRUB being a great example). In a multi-stage bootloader, the first 512 bytes of code on the hard-drive are responsible not for starting the operating system, but instead for loading the rest of the boot-loader!

As I mentioned, I use GRUB as my boot-loader on my computer. The advantage of GRUB is that it allows me to have a dual boot system between Linux and Windows – GRUB is capable of starting either operating system, and it displays a nice pretty menu that lets me pick every time I turn my computer on. All of my GRUB configuration files, as well as the secondary stages of the boot-loader, are all located on one of my Linux partitions on my hard-drive.

So last night, while packing for my trip back to MIT, I decided to check my email.

Bad Idea!

When I turned my computer, I was immediately confronted with an ugly boot-loader error from GRUB: Could not load GRUB stage 1.5 (one of the secondary boot-loader stages). This really isn’t a good sign. If a boot-loader fails, you aren’t able to access the rest of your system. Although all of my files and settings could still have been in tact, I’d be useless to access them, since I could boot neither Linux nor Windows. Pretty scary, huh?

The best solution I could think of to get my PC working and happy again was to use an Ubuntu LiveCD. Since I just re-installed Ubuntu a few days ago (see other posts!), I had an 8.10 LiveCD quite handy. So, I popped the CD into my computer. Since computers check CD drives before hard-drives, Ubuntu 8.10 jauntily booted off of the LiveCD. From there, I noticed something strange: I couldn’t mount my root Linux partition! All of my program files and configuration files were on this parition, and it’s a bad sign if it can’t be mounted. Something must have corrupted this file system. GParted is a program designed for doing lots of administrative tasks on hard-drive, and I tried scanning and fixing the partition for errors. After this, I was able to mount the partition, but then all of my files on it were gone….??

Well, that explains why by boot-loader wasn’t working. If the secondary stages of the boot-loader and all of my configuration files were on an un-mountable partition, then my boot-loader wouldn’t be able to work! I was tired and it was late last night, and I didn’t feel like spending hours fixing my partition. So, I took the brute-force approach and just re-installed Ubuntu, which put back the default system files and created a working boot-loader. After this, everything worked fine.

I’m still kind of mystified as to why any of this happened… do you have any ideas about what could have corrupted my root Linux partition? The funny thing is, my computer was working fine earlier in the day, and I wasn’t even using Linux! I was using Windows, and the one thing I thought of that perhaps may have caused this is a program in Windows that reads ext3 files on other partitions. I was looking through my ext3 files earlier in the day from Windows, and perhaps this program corrupted my filesystem?

Who knows for sure… but thus ends another edition of Computer Adventures… for now! :-)