Categories
Looking glass
Navigate/Search

Archive for October, 2006

Ubuntu 6.10 Edgy Eft Upgrade plus Compiz goodness on AIGLX

Saturday, October 28th, 2006

Geeks with not much to say talk about their tools. Here’s an eft:

Today, I talk about my experience upgrading the FREE Linux distribution Ubuntu from 6.06 LTS (Dapper Drake) to 6.10 (Edgy Eft). The leap (check this link out if you’re geeky like me) from 6.06 to 6.10 was hyped up to bring lotsa “cutting edge” updates to the distribution. This release happened on time, according to the schedule, on October 26th, unlike Fedora Core 6 which slipped a couple of times. So, hats off Canonical!

In any case, these distributions are maintained by volunteers and/or very little actual paid staff (probably paid peanuts… its about the passion man). Good stuff, somebody should hire them (or not, otherwise we wouldn’t have anybody to do the distro’s!).

Amongst the touted updates are Firefox 2.0, Xorg 7.1 (featuring AIGLX), Gnome 2.16.1, KDE 3.5.5 only to cite some. Pretty spiffy, isn’t it?

Well, apparently on the Internet, people have having trouble upgrading. I had the exact same problem people have described and I’m going to describe steps to take to resolve them.

Killing 2 birds with 1 stone, I’ll explain as well how to get you some Compiz eye-candy. Actually, Compiz is not just eye-candy; in addition to giving you a 3D accelerated desktop interface with wobbling windows (it sounds weird, but looks pretty cool) and other desktop effects, it is also very useful with regards to usability. It supports a bunch of neat features; here’s an expose copycat for instance:

Upgrade problems

Symptom:
1. You just upgraded Ubuntu 6.06 LTS by running

gksudo “update-manager -c -d”

2. You curse yourself because you left this running overnight without realizing you’d actually need to click a few times before everything is installed and set up.

3. You are greeted with the new “high-res” 1280×1024 splash screen, with the new web-2.0-ized Ubuntu logo.

4. Your X server does not want to start.

Cure:

Have you read the README’s and whatnot when you were installing video drivers? I’m not sure about Nvidia drivers, but FGLRX, ATI’s (or should I say ATI/AMD. The red has been replaced by an ugly green… isn’t green Nvidia’s colour?) proprietary drivers have certain dependencies on the current kernel version you have installed.

First, you need to remove anything that’s related to those drivers. If you’re using FGLRX, especially if you made your own .deb packages then installed them, you’re gonna have to remove them.

Reboot, go in recovery mode and run:

dpkg -r xorg-driver-fglrx fglrx-control

Note that if you made .deb packages the package names might be a bit different.

Now if you have 2 choices, either to install the latest version of FGLRX or use the open source drivers. I recommend the second option because you’ll gain AIGLX support which will allow you to get some Compiz or Beryl goodness.

For option 1, simply do:

apt-get install fglrx fglrx-control

To use the open source drivers with 3D rendering, you need to re-install the openGL libraries. Do:

apt-get install –reinstall libgl1-mesa

I highly recommend this guide, which I find can be really useful.

Getting Some Eye-Poppin’ Candy

Rotating cube

Now that you’ve installed/re-installed the open source drivers (or beta drivers if you’re an Nvidiot), head over to gandalfn’s Compiz-AIGLX-on-Edgy page for guidance. And follow the instructions.

Fudge around with your /etc/X11/xorg.conf and after multiple edit/restart X server/reboot cycles, you’ll get it up and running. If you’re that far, I don’t think you’ll need any guidance… trust me =) You would’ve abandoned long ago.

Congratulations! You’re running Ubuntu 6.10 with Compiz on AIGLX!

Here are things to ponder before upgrading:

  1. Its gonna take you some time.
  2. You’re going to have to mess with your xorg.conf, which can be some pretty messy affair if you don’t know what you’re doing.
  3. Dual monitor support? Fuhgetdhaboutit! X-server is pretty anal about dual monitor setups, at least for ATI people. FGLRX made that a little bit easier, with BigDesktop support and all… but with open source drivers you’re quite at a loss.

In any case, for people trying to get a good dual monitor setup with at least 1 CRT (running non eye-bleeding refresh rates), with X-server 7.1, open-source ATI drivers and Compiz, I pity thy fool! If you’re successful, I’d be interested in getting your xorg.conf! I gave up the 2nd monitor for now as well as the Logitech G5 buttons & tilt wheel.
Here’s mine: xorg.conf

Nvidia using people I heard over the forums have an easier time with a pretty nifty configuration utility. Oh I envy you. I threw away days of my life cumulatively, setting this up!
Have fun and good luck!

Internet in the 21st Century

Wednesday, October 18th, 2006

Today I swung by my alma mater to attend a lecture hosted by Vint Cerf, without whom we wouldn’t be surfing the Internet today, entitled “Internet in the 21st Century“. An illustrious figure indeed, and very well spoken as well, Vint is currently the Chief Internet Evangelist and vice president over at Google. A title like that is wicked cool I reckon… evangelising the Internet…

The father of the internet evangelising

With such a prestigious speaker, the room was obviously packed; a computer science junkie gala of sorts. Notably, amongst the crowd was Steve Bourne, whom I shook hands with without realizing it was THE Steve Bourne. Phew, what an honor. In any case, the topic of the day was about the Internet and what better person to talk about it other than the man dubbed “the father of the internet”?

Computer Science?

As one of the first topics, Vint brought up a series of points in view of “uncovering the science in Computer Science”. I found this to be rather amusing, because after taking a few psychology & phsyics courses in university, I was also wondering where the “science” in CS came from! A “science” gets its name from the application of the scientific method; i.e. the best way to establish that something is a fact is by predicting a result through a hypothesis, and proving it by a defined and consistently repeatable procedure. Computer Science (CS), on the other hand encompasses more than the factual and predictable data; in CS, one of the things we learn is how to prove that we cannot predict that a computer program will halt. Ironic indeed! Like mathematics, CS is largely dependent on proofs rather than empirical evidence.

The design of the Internet

The next topic was about the historics of the Internet. Vint explained good software engineering decisions taken in the beginning, such as the layered design and low coupling between those layers was at the base of TCP/IP. Such thoughts burgeoned while working on the ARPANET. He also went over the ignorant nature of packets, which I have mentioned in a previous post presumptiously called “The unified theory… of bits and bytes over the internet & law” (written under the influence I must admit!). As he went on talking about the profound impact upon regulations, and how current ones aren’t very well prepared for the current EXPLOSION (purportedly a factor of 20 from 1997!) of internet use; I could sense a tint of network neutrality hippiness (yes hippiness). Very nice indeed to hear first hand such an important figure speaking out on this topic.

The next topics were about the shortcomings and downfalls of the initial design; such as security, mobility and persistence. Mobile IP’s, authentication, encryption, sensor networks and other solutions (or rather stand-ins before solid solutions are implemented) were discussed. An interesting observation on his part is that most security problems are a matter of configuration; as there is no way to verify configurations. A very tough problem indeed, in view of our current quasi-total dependence on configuration.

The state of the Internet nowadays (without buzz words)

Somebody explained Web 2.0 without using the buzz word! Hurray! Rather, he used the catch-all term “User Oriented Paradigms”, composed of the notions of:

  1. Self Service
  2. Announce-Share, Collaborate
  3. Search, discover, transact

Vint explained the premises of Google Adsense as well (without mentioning the name of it), explaining that the democratization of the Internet makes contextual advertising even more powerful. Taking another stab at network neutrality, he went on to say that Amazon, Google, eBay amongst others could never have started without that basic premise of network neutrality. He reiterated the observation that the new Internet is on the verge of significantly altering anything from regulations to social behavior and evidently business.

On another topic, Vint explained that these shenanigans are changing information management significantly. Geolocational indexing is becoming more and more in demand and time indexing is becoming harder to achieve. He postulates that information decay may be akin to tooth decay; i.e. requiring some brushing everyday.

Things to be (In managementese: Moving forward)

About the future of science & engineering in general, he predicts that a boom in interest, similar to the Sputnik chain of events, is looming, having as primary vehicle global warming. Interesting problems will need to be solved and predicted, causing a hypothetical raise in interest in Computer Science. Since the dot-crash enrollment in this field is at a low, and keeps dipping.

The future of the Internet lies in space. A project called InterPlaNet (IPN) is in the works to attempt to solve the problems of communication over astronomical (literally!) distances. Because of the huge delays, variations of distance and signal strength, TCP/IP does not hold up very well in those applications. Fortunately, due to the layered architecture, TCP/IP can be used in smaller scales and another layer can be used to handle inter planetary communications, using a mechanism similar to messaging. This is being tested in environments with similar constraints, such as in the military, and in Sameland. Interestingly, this attempts solves the mobility and persistence problems cited before as well as solving the latency issues.

Epilogue

In the end, my opinion is that this lecture was very entertaining. It was quite an honor to hear THE man talk, in the company of other distinguished computer scientists. Thanks Elliot (our head honcho @ Tucows) for introducing Glenn (my co-worker) and myself to both Vint and Steve. Others, be there next time!

10 ways to spend more time “coding” with friends

Tuesday, October 3rd, 2006

For the uninitiated:

Q) Have you ever wondered what a software developer REALLY does?

A) Sit in front of the monitor confused. (or cursing… or both)

A while ago, I read an article about how developers spend their time. What Jeff Atwood postulates is that developers spend MUCH more time understanding code rather than typing in new stuff. I have to agree, with some colourful comments:

Its inevitable; the moment we do a linebreak, chances are that line is code is going to be modified in a near future. Better yet, the amount of time spend on doing so is small compared to the amount of time reading and understanding it! And this is your own code! Imagine how its like working with 5 people, or worse… 10?

Since we humans enjoy the company of each other, how about a little guide on how to spend more time code-staring together:

  1. Do not comment your code. We are all Rockstar Programmers. The code speaks for itself, extreme L337n355. Actually I heard that is an actual Perl feature… not supporting multi-line comments and all. Straight from somebody who truly appreciates Perl: “Don’t use multi-line comments. If you have a piece of code that requires a multi-line comment, rewrite it so it doesn’t need to many lines of comment”. Genius!
  2. Do not use version control. Its bad, its got 666 hidden somewhere in the source as a pre-proc directive. As an added bonus, when we overwrite files entirely, we just obliliterate it! BOOM, gone.
  3. If you must use version control, take every opportunity to break the build. Its fun to update and find out that something you need to use is broken, especially if its not yours.
  4. Do NOT use a debugger. Instead, use good ‘ol print-screen debugging. (heh, Here’s Linus Torvalds in an article called im-a-bastard-speech). For more fun, use print-screen debugging in concurrent programs or even better, when print-screen debugging is affecting the memory so that the behavior of your code changes.
  5. Do NOT use already made functions, like for example in the libraries. I mean come on… where’s the fun if we use something that has been around for years and proven to function properly? Let’s rewrite atoi() and use it… its useful for interviews anyway.
  6. Always copy and paste code! Typos that get in, stuff that isn’t relevant in the current context, the more, the merrier.
  7. Do not design or architect your code. Planning is for the weak puh! The ad-hoc way of programming is more fun, just like writing essays and gets quicker results! Design patterns? Get OUT of here! We are smart people, we do not need to use what thousands of lesser geeks have been using to improve their architectures.
  8. Run away if you have to practice Test-Driven development. Similar to version control, it has its origin in the worship of pagan lords; the temptation to have PRECISE requirements at coding time or to have HUGE time savings in the long term in terms of debugging can be hard to resist, but those are all evil.
  9. Hack up all your classes together and don’t use helper functions. High cohesion and low coupling are to be avoided like the plague! Why have multiple files? Multiple classes? No way! Oh and let’s group classes together, sorting them by alphabetical order, the code is neater that way.
  10. Hate process, even more so when you’re in a multi-person team. Project plans, Software Specifications, Software Architectures and Test plans are for wussies. Who the hell needs UML? You can draw pictures that nobody will understand an hour later. That way you look smart, you keep your plans secret and thus your job forever and you look smart.

The list can be much longer than this, but 10 is a nice number plus I’d have to write more as opposed to reading code.

For people who actually want to improve themselves, check out Software Carpentry, authored by Greg Wilson. It contains a series of lectures, including a section on the software development process.