Filed under Operating Systems

I just discovered IRC

On Monday night I was trying hard to understand the nuances of processes and shared memory so that I could finish it early and move on to other things. I had been working on it since Friday afternoon and though I had gotten parts of it working (thanks to my professor), there was still some parts that were failing utterly. I read the man page and googled around (which quite often brought me back to the man page) and just as I was about to throw my hands up and wait to ask my professor again, I decided to ask on IRC.

I hopped on the C channel at Freenode and within minutes I had not only found out why program was misbehaving, but I also got two separate suggestions on how to fix it. I may have bent the rules a little bit, but I trust my professor will understand that I actually did learn something and not just steal code of the Internet. I still don’t really know how to implement one of the suggested fixes, but I implemented the other. The fix I didn’t understand is probably the cleaner of the too and I plan on asking my professor more about it.

I repeated the experience yesterday, but with JavaScript and the canvas element (while trying to use Processing.js). I did IRC in the past, but never really to solve problems. I went on channels (mostly #archlinux and #python on Freenode) mainly to interact with the community. Whenever I had problems, I generally googled my way to a solution. In some ways, asking on IRC could be considered the easier path: instead of searching for material, you simply go ask someone who knows. While that may be true to some extent, it’s certainly not what happens all the time. When asking the C question, the other channel members made it perfectly clear to me that I needed to go read more (which I totally agree with). They also helpfully pointed me to resources. IRC channels aren’t “cheatsheets” by any stretch of the imagination. I got the feeling, on both the C and Processing.js channels, that the people on them are very well-versed in what they do. They’re willing to help you, but only if you help yourself (some make this point more forcefully than others).

IRC is a good example of a way to learn Computer science (or at least programming) in a master-apprentice fashion. It’s different from learning from a tutorial or reading the man page. I hesitate to call it “teaching” because it’s more of a free form Q&A. Instead of having someone give you the information up front (a typical classroom setting) or going out and hunting it down yourself, you get to pick the brains of people who have already internalized the knowledge that you’re after. To get to it, you have to ask the right questions and that means knowing the problem well enough to figure out what questions are worth asking. And that requires some thought.

It’s not exactly master-apprentice because you aren’t learning under the tutelage of a single master. I think a more apt analogy would be spending some time at a monastery. You don’t have a very strong connection to the people there, but you share some things in common. You can go with a purpose or without one. But you will benefit more if you do have one. There are some basic rules, mostly concerning respect and etiquette. If you break them, you will be asked to leave and in extreme circumstances, removed. The experience you have is very much up to you and could leave with a profound sense of enlightenment and a strong desire to return and learn some more.

Ok, so I’m embellishing a bit and programmers aren’t really monks (except maybe if you’re Richard Stallman). IRC certainly isn’t solution to all questions and you could easily come away being more confused than when you started, but that could happen with a book or a normal class. IRC is another resource, but it’s a good one. No matter how good search technology may be or how well-written technical docs may be, sometimes it’s good to be able to be walked through problems by a human being. And yes, I do still have questions for my professor.

Tagged

Computing is still in the dark ages

Despite all the talk of Web 2.0 and the shiny multicore machines with their gigabytes of RAM and billions of cycles per second, I sometimes can’t help feel that we are still very much in the dark ages of computing. This time around my dark gloomy feelings have been brought about by this message to a mailing list which in turn was sparked off by the announcement of the Go Programming Language. As a computer user and a programmer I feel that the actual use of computers is far below their potential.

As the years go by, it seems like we keep on piling layer on top of layer while the results aren’t proportional to what we have to learn to get things done. Now, I’m not proposing that we all start writing down-to-the-metal code or force everyone to become a programmer, but things are starting to look like a mess. Web programming is an interesting development, but it adds yet another layer on top of the existing kernel, operating system, libraries and GUI toolkits. Add to that the fact all browsers are still a bit different from each other and you can start to understand why I’ve yet to make a serious foray into web programming.

But even without the web and the many formats and barely interoperating systems out there, there’s enough on the desktop to get you depressed. Start with the fact that there are currently three major operating systems out there and if you want to write a program that runs on all three of them, you don’t have an easy task. You either embrace three different toolkits and programming methodologies and maintain 3 very different codebases, or you use something like Java which works on all three, but screams non-native on each one. Even though there are languages like Python that run on all of three, it really puts me off that there is still no top-notch multiplatform GUI library. wxWidgets tries pretty hard, but if you look at the screenshots you can pretty easily that they don’t look quite right. It’s not very surprising that lots of smart developers are flocking to the web, where things in comparison are a lot smoother.

There is also the fact that programming languages, like all other pieces of major software, suck more than others. I still stand by what I said in my last post, that it’s an exciting time for language enthusiasts, but I also feel that there are some lessons we really need to learn. I’m starting to have concerns that there may not be any true general purpose language, simply because there are so many different types of problems to be solved. I think we need to start creating broader categories: a set of systems languages similar to C going in the direction of D and Go. A set of hyper-optimizing VM-based languages designed for long-running, parallel server applications (the current JVM is a good example). A set of languages for writing end-user apps that are significantly high-level, but are still compiled to pretty fast native code (maybe not C or even optimized VM fast, but better than todays Python or Ruby). I’m thinking Python in its Unladen Swallow incarnation might fill this gap.

As a programmer, the state of tools that we have to use is really quite depressing. Tools like Emacs and Vi are powerful and all, but let’s face it: we could really be having much more powerful IDE technology. We should be having full blown incremental compilation with autocompletion and support for rendering documentation for every major language out there. We should also have seamless version control with granularity down to the undo level. Every change I make should be saved and I should be able to visually browse all these changes, see what they are and restore to an older state (or commit them if I want to). We have the raw computing power needed to do all this, but yet we remain stuck doing mostly batch-style edit-compile-debug cycles and mucking around in plain text. Eclipse with its incremental compiler makes things much easier, but there’s so much more we could be using our machines for.

As a user, what irritates me is the amount of manual labor we still have to do on a daily basis. We still have to carefully name and place files so that we can file them later. I have to manually hit the save button (see version control bit above). Even with the Internet collaboration is a mess with most people throwing around emails with increasingly larger attachments. Add to that the fact that most email clients are pretty dumb pieces of software. Google Wave is a step in the right direction, if enough people get around to actually using it (and if it can integrate to some extent at least with the desktop). Also I think the web and the desktop need to be brought closer together. Ideally I would be able to sit down on any computer with a live Internet connection and have my full custom work environment (or at least the most important parts of it).

I’m fully aware that none of the things I’ve mentioned are trivial. In fact, they’re probably very hard projects that will take expert teams a good few years to complete. One day I would like to seriously work on some of the programmer-related issues, especially the IDE part. I love Emacs, but there are some parts of Eclipse I really like too. For the time being I’m going to have to make do with what I have, but I’ll be sure to keep an eye for interesting things and movements in the right direction.

Tagged , ,

The Chrome Wars have begun

I come to work this morning and the intertubes are shaking with Google’s latest announcement: the coming of it’s Linux-based, web-oriented operating system for netbooks: Google Chrome OS. You’ve probably already read a lot of the other posts about the Chrome OS and know something about how it works. It’s an operating system at the core, but more importantly its a platform tuned to running web apps. It’s a clear signal from Google to pretty much every other operating system maker out there, including Microsoft and Apple, but also the Linux distribution providers like Red Hat and Canonical. The message is simple and clear; move over OS makers, the browser is the new application platform.

Google Chrome as the operating system for web apps

Google Chrome as the operating system for web apps

Though the reactions from around the web are mostly positive, there are some articles that are raising real issues. ZDNet Australia criticizes Chrome OS on the grounds that it will further fragment the Linux community (who will be contributing the kernel of the new OS) and a better solution would have been to join with Ubuntu which already has pushed Linux to new heights. A prediction from The Next Web makes the claim that Chrome OS will be “the beginning of the end for Ubuntu & co” and the real battle will be between Apple and Google, leaving everyone else in the dust. There’s also concern about the fact that Google already has a operating system for the web: Android, even though it’s only for mobile devices (though it has been ported to x86). Personally, I feel that these criticisms and fears surrounding Chrome contain the more interesting food for thought.

Microsoft isnt beat yet (image from Engadget)

Microsoft isn't beat yet (image from Engadget)

Chrome OS is undoubtedly going to be interesting, both in terms of technology and in terms of the market forces that it will affect. Also certain is that Google is more clearly than ever taking a swipe at Microsoft. Even though Google may have become the most powerful player in  the web sphere, the desktop operating system stronghold was undoubtedly held by Microsoft. Even many of Google’s own applications (including Chrome) target Windows as the primary platform. Microsoft is still a force to be reckoned with. Windows 7 is shaping up well and they have a few tricks up their sleeve, including a new browser project: Gazelle and even a cloud-centered operating system called Midori in the works. They also have a powerful research wing which does some really interesting work and a very big budget (which is enough for them to sit things out for a few years while they make a better product). Whether or not they will actually do so is still questionable, but lets not write them off just yet.

And there is Apple. The last few years have seen Apple’s gradual re-rise to stardom starting with the beautiful new OS X and continuing today with it’s dominance of the online music store arena and the strength of the iPhone platform. Not many people seem interested in pitting Google against Apple, especially since Apple has stayed out of the mainstream operating system and netbook markets. However, when it comes to the internet, Apple has a considerable stake. The iPhone is as much a portable internet device as it is a phone. And though it has carefully stayed away from the low-cost netbook market, it’s unlikely that they’ll sit by while Google plays its hand in the portable computer market.

Apple may the best suited to withstand Google (from The Next Web)

Apple may the best suited to withstand Google (from The Next Web)

However Apple’s strength in the current situation probably stems directly from the closed, proprietary nature of it’s technology. Apple has a reputation for both creating and support great desktop apps. Good design has always been a hallmark of software running on a Mac and most web apps are still far for matching the polish that Apple has  to offer. The user experience offered by the complete OS X operating system by virtue of the way it can tie together information across different apps is still something that web applications (even suites like Google Apps) have not matched to a large extent. I agree with the Next Web post that Apple probably has the most chance of retaining its user base as Google begins it’s foray into the operating system arena. With the iPhone they’ve shown that they’re still capable of market-shaking innovation and that will probably help them survive the coming OS wars.

One more important player in this market is Linux. Thanks in no small measure to Canonical, desktop Linux has gained some ground in the last few years. However, it’s still holding a very small piece of the desktop market. It’s a valid concern that Google’s entry into the market might eat into the Linux market share. Though it’s certainly possible, I’m not quite sure if this will come to pass. A lot will depend on how easy it is to get things working on Chrome OS besides the browser and web apps. What new webapps have to offer will also be influential. I personally have never been very hopeful of Linux’s position on the consumer desktop. It’s great for hacker-types like me, but I’m still not fully convinced if I would recommend it for everybody. In my opinion, most Linux desktop apps still lack some amount of external polish. That being said, I wouldn’t recommend Vista either. I do think that OS X is the best OS for most users. I don’t see Chrome as contributing to the ‘fragmentation’ of the Linux distribution scene because I expect it to be very different from traditional distros, but in this case, only time will tell.

So what can we expect in the months to come before and after Chrome OS hits the markets? Undoubtedly Google’s announcement will cause the other big players in the field to sit up and take notice. I think this move might consider other companies, especially Microsoft to push out web-centric products sooner than they otherwise would have. Google is clearly looking to shake things up in the near future and it would be folly not to plan to do something about it. However, it’s also worth keeping in mind that Chrome OS is still some time away and there is a lot of work to be done — Chromium works on Linux, but only just.

yodaBefore we make and declarations about drastic change in the OS market, it would be prudent to wait and watch and see what Chrome OS actually looks like when it releases. There is also the fact that Google will have to get people to actually use it and that may be easier said than done (considering the fact that most netbooks run Windows XP). Of course, as the iPhone has shown, there is room in the market for a sleek new product if it is made right. I will be interested in seeing how Chrome OS turns out, but I certainly won’t be giving up my Linux laptop or my Mac Mini anytime soon. I wish Chrome OS luck and hope to see some good ideas being implemented. As Yoda would say, ‘Begun the Chrome Wars have’, I’m not ready to pick sides just yet.

Tagged , , , ,

Portable Ubuntu and dual monitors

I love dual monitors. Roughly half of the labs I spend my time in have dual monitors. The others don’t and hence I try not to spend much time in those. Unfortunately one of those single monitor labs is the only computer science Linux lab that we have, so by necessity I actually do need to spend a considerable amount of time there. And whenever I’m there I miss not having a second monitor.

If you’re not someone who hasn’t used dual monitors for a while, then it can be somewhat hard to understand how much easier two monitors make your life. Two monitors provide a very natural division of information that you need on your screen. One monitor contains reference information, this is stuff that you’re always looking at, but that you’re not actively interacting with. The other monitor contains whatever things that you are actively interacting with. For me as a programmer, one monitor generally contains API references in a browser (Chrome on Windows, Firefox on everything else). The other monitor contains my editor/IDE. Unfortunately I do most of my programming in the Linux lab which are all single monitor machines or on my laptop, which I rarely hook up to an external monitor.

There are a  lot of Windows dual-monitor machines available in other labs, but the only thing I like about Windows anymore is Google Chrome. Our Windows machines aren’t locked down, so students are allowed to install software as long as it isn’t something dangerous. I was considering installing some sort of X server on some of the machines. But I generally move about machines quite a bit and so I don’t want to be installing X servers on every machine I’m on.

My next thought was carrying around a bootable Linux USB drive and running off that. I was seriously considering doing that when I came across an interesting SourceForge project via Reddit which uses virtual machine technology to let you run Ubuntu like an application right in Windows. And yes, that was the answer to my problems. Last evening I downloaded the Portable Ubuntu image to a  lab machine and gave it a test run before moving it onto my 4GB USB drive.

My experience has been mostly positive so far. The Ubuntu installation is somewhat out of date (it’s the 8.04 version of it). But that really isn’t a problem for me. In fact, as it turns out, I haven’t really been using it as a full fledged Linux distribution. For the most part I use it as an interface to my college’s powerful Linux clusters.  I have pulled my personal Git repository to it, but for the most part I think I will be working directly off my college’s machines. The greatest benefit is that I can run normal Windows apps right alongside it. This means that I can have a bunch of terminals and Emacs open while at the same time having Google Chrome and some other Windows-specific software I need. The system really comes into its own with multiple monitors. It’s useful to think of one monitor as a Linux screen and the other as a Windows screen. I’ve only been using it for a day, but I’ve already found it a natural way to work.

As a final note, I would like to put out a little disclaimer: I’ve only used this on powerful machines. The lab computers are 3GHz Core 2 Duo machines with 3.5GB of RAM. Performance is quite acceptable and whatever is happening on the linux side doesn’t seem to be affect the Windows side at all. However, on a machine that is much slower or has significantly less RAM, things might be a good deal slower. If you’re stuck using a Windows machine but would rather use Linux, this is a great way to go if you have a fast enough machine.

Tagged , , ,

Window window on the wall

I realized today that I had forgotten a password and so for the first time this year I booted into Windows hoping that one of my browsers had saved the password. Unfortunately none of my browsers had and I have to find a way to reset it. But as I was sitting around for 5 whole minutes waiting for Vista to start up and become usable, I began to think about all the Windows operating systems that I’ve used over the past few years.

My school was rather behind times and so as late as 2000 we were still running really ancient machines with DOS and programming in some equally ancient version of BASIC. I can vaguely remember using a few times what I no wknow to be Windows 3.1. Yeah, we were that bad. Luckily, I don’t remember very much about those once a week computer classes. My family bought its first computer in late 2001. For some reason, we got stuck in Windows 98. I used 98 for a good few years. 98 was, well…. 98. It was buggy , hung rather often (and took everything I was doing with it), but with knowledge of anything better, I lived with it. I wasn’t the computer geek I am now and I can’t remember ever really digging under the hood. I did some superficial changes, the usual modding that any teenager does to their system, but it was never anything serious.

I never did like the way 98 looked and I thought the gray was really much too bland. It wasn’t until 2003 that I actually got my first taste of Windows XP. Of course, I knew that XP had been out for qutie a while, but it had never caught my fancy. Like I said, I wasn’t the computer geek yet. But once I did have my first taste of XP, I was hooked. Compared to 98, it looked amazing. It took quite some convincing to get my dad to let me actually install it and for a while we double booted with 98. It wasn’t until Windows 98 one day suddenly decided not to work that we moved over to XP full time.

I still think Windows XP was a really great operating system, perhaps Microsoft’s best to date. The user interface was kinda flat and somewhat gaudy by todays standards, but I think it was a good level of unobstrusive functionality. And most importantly it was actually stable for the most part. Of course, I did get bored of it for a while and then I started to try to make it look a like a Mac. My parents still run XP and they’ve kept the same install for about 3 years now. They aren’t power users by any standard, but XP is good enough for them. And that is XP’s greatest merit: in many ways it was just good enough.

I can’t say that I was really looking forward to Vista. By the time news of Vista spilled over on to the Internet, I was well on the way to becoming the open source lover that I am now. I was using linux a lot, not quite full time, but getting there. I played around with the early compositing and transparency technologies and was starting to learn more about the under-the-hood technologies that powered my machine. And I was never going to convince my parents to spend on the upgrades that would be necessary to actually run Vista.

In 2007 I moved to the US and bought my first laptop. With a dual  64-bit processor and a  gigabyte of RAM, vista was a real possibility. And there wasn’t much choice considering that’s what it came with. I did use Vista full time for about a month. But then I installed Linux and I’ve been a committed Linux user ever since. I can’t say I really like Vista, but I don’t exactly hate it. I actually do like the user interface mostly, though I do wish that it was less shiny and more opaque at times. But what I really dislike is how much of a resource hog it is. I takes a good 5 minutes to become really usable and God help you if you try launching programs before it’s finished getting its act together. There are probably ways to tweak to get it to run faster, but I just don’t like it enough to do anything about it.

It will be interesting to see the evolution of Windows 7. If I had a spare machine, I would have tried the Beta. I still don’t like all the transparency everywhere, but I hope the other improvements will be enough to outwiegh that. The integration with the web will also be something to keep an eye on. I would be really interested if they brought back some of the things that got shelved in Vista, particularly WinFS. That being said, I do really doubt that I will ever really go back to using Windows full time. Linux is my operating system of choice for any sort of programming work. For anything else, whether it be writing a paper, making a presentation or keeping my media organized, OS X meets all my needs. I might explore the new Windows when it does come out, but I don’t see much of chance for becoming a full time Windows user in the near future.

Tagged ,
Follow

Get every new post delivered to your Inbox.

Join 338 other followers