Wednesday, August 20, 2008

Java on Xubuntu

In my last post, I mentioned my plans of doing my own Xubuntu installation. So far, time does not allow it. That will have to wait. However, that shouldn't stop me from talking about Xubuntu. My interaction with it has been quite minimal but so far, I'm satisfied with what it can do.

It already includes the Sun Java Runtime Environment (JRE) 6 in the basic installation. That means, one can easily run Java applications on it. If you're a programmer, or one who's learning to be one, installing Java Development Kit (JDK) 6 is very easy (I did it just a few minutes ago.). It's done via Synaptic, hence, all you have to do is point and click, and Synaptic downloads and installs automatically. No terminal-based hassles whatsoever.

Immediately after installing the JDK, I also tried installing Netbeans IDE 6.0.1, again via Synaptic. Still was a success. However, I might have been asking too much from an operating that was running on 1.5 GHz and 256 MB of RAM. Netbeans was quite slow on running the larger applications. The smaller ones ran decently enough. Nevertheless, I still think Xubuntu rocks! With this new discovery, I'm sure we'll still be seeing more of our "old" PCs in the distant future. So, if you want to try and salvage your older PCs, I suggest you try Xubuntu on them.

For those who are not familiar with Synaptic, here are the steps I took to install Netbeans. The intention is to show you how easy it is.

1) Run Synaptic: Applications > System > Synaptic Package Manager
You will then see this:

2) Assuming you're not sure that Netbeans or whatever application you want is included in Synaptic, you might want to search first: Click on the Search button, type Netbeans in the Search box, then click on the Search button.


3) If Netbeans (or your desired app) is included in Synaptic, you'll see it in a list:



4) Right-click on Netbeans (or your desired app) and click on Mark for Installation. The icon beside Netbeans will change like this:

5) Click on Apply. Then click on the next Apply button.


You'll then see this:


You'll know you're installation is successful if you see this:

That's it. Enjoy!

Saturday, August 16, 2008

Physics in Biology (Part II): Torque and Back Aches

(This is the 1st post in what I hope would be the start of a long series that would allow readers to appreciate the relevance of physics in biology, nursing, and other related fields.)

A lot of people suffer from back aches and you're probably even one of them. While most of us already know that it usually has something to do with posture, what few of us know is that it usually also has something to do with too much torque. i.e., wrong posture is just too much torque in the wrong places.

So first of all, what is torque?

Let me put it this way. There's a reason why doorknobs are placed opposite to the hinges - it is where we can apply maximum torque about the hinges.

Ah, so torque is dependent on the distances from the pivot points (the hinges in this case)? Yes. In most books it's called the moment arm. There are other factors that torque is dependent on. In our door example, we know that we can swing the door faster if we apply a large enough push on the position of the doorknob. We also know that the push is most efficient if we push perpendicular to the door.

Let us sum up what we have learned so far from the door example. Torque has something to do with three physical quantities:
  1. the applied force - the amount of push we exert on the door;
  2. the distance from the pivot (the hinges) to the point where the force acts; and
  3. the angle between the force and the line that represents this distance
We can combine 2 and 3 to define a new term: the moment arm. i.e., the perpendicular distance of the force from the pivot point. Hence, maximum torque is obtained when we make the applied force and the moment arm as large as possible.

Ok. Enough of doors and lets get down to our business of back aches.

Imagine tilting your upper body forward. As you do that, there are two (2) main forces acting on your upper body. The first one is the weight of your body. You know it's there because it takes a lot of effort for you to stay in that position, and most of that effort goes to countering this force. The second one is the force of the back muscles that keep you from toppling over. Without this force, the weight force would easily rotate your body forward. By the way, when you're in this position, the pivot point is somewhere in the position of the hips.

Ah, so the weight of your upper body (let's call this Fw) produces a torque that strives to rotate your upper body forward. Simultaneously, the force of the back muscles (let's call this Fm) produces a torque that rotates your upper body backward. This is to keep your upper body in equilibrium, keeping you in that position.

To simplify our discussion, let us assume that the distances of both forces from the pivot are equal and we will call them L. Would this also mean that the two forces are therefore equal? Not quite. The more we bend forward, the angle between Fw and L increases. So, while Fw and L don't increase, the torque due to Fw (because of the increasing angle) does! Now, what about the back muscles? First of all, it is easy to imagine that the angle between Fm and L is quite small compared to the angle between Fw and L, and this doesn't change!... or at least not as much as the other angle. So if this angle and L doesn't change, then to keep your upper body in equilibrium, Fm has to increase. Now, since the angle between Fm and L is very small compared to the angle between Fw and L, we could just imagine that Fm should be very large compared to Fw in order to maintain equilibrium.

Let us now imagine that we are standing upright. When we do this, the angles that we have been talking about would now be zero. Hence, while Fw and Fm may still exist, the torque that they produce would now be zero.

(to be continued)

Monday, August 11, 2008

Physics in Biology (Part I) Introduction

In this part of the planet, most students take up nursing. These students are arguably the busiest and studious in our university. Unfortunately, a lot of these students don't understand why Physics has to be included in their course's curriculum. I also get such queries from Biology majors. Unknown to many, there's a lot of physics going on in plants and animals; humans included. Because of this, I constantly strive to increase my knowledge in physiology and other related fields in order to satisfy the skeptical mind.

This series attempts to share what I have already learned and imparted to my students in the hope that readers may end up realizing the importance of physics in understanding the how's and why's in biology, nursing, medical and health sciences, and other related fields.

Here's a teaser to give you an idea on what to expect in my succeeding posts:

  • Do you know that the color of a peacock's tail is brown?
  • Why can't tall trees grow in very high altitudes?
  • In an aneurysm, the weakened area may rupture because of the SLOW blood speed in that area.
  • Understanding torque can help prevent back-aches.
  • How does the body prevent its temperature from exceeding critical levels?

These and much much more in upcoming posts.

If you prefer a more technical approach, I highly recommend http://physiology-physics.blogspot.com.

Wednesday, August 6, 2008

Xubuntu has landed

When I walked into the computer lab, I wondered why my colleague, Prof. Girasol, was in front of one of our oldest Pentium 4s (1.5 GHz and 256MB RAM). When he announced that he had just installed the latest version of Xubuntu (8.04 Hardy Heron), and that it was working like a charm, I couldn't resist trying it out. True enough, I was able to breeze through my favorite applications as if I was working on a faster PC. There was just one more thing I wanted to make sure: did it have or could we easily install Sun Java on it? A quick search on Synaptic put a smile on my face; it was there.

Trying out my own installation would have to wait. I have a few more busy days ahead of me. That's if I don't receive additional tasks before I can proceed with the installation. I'd have to install it in a dual-boot system that also housed a Fedora Core 5, so it might be a little tricky. Still, I'm looking forward to it. Hopefully, this would finally silence that griping student of mine who, well, unluckily got to be assigned to one of the lab's slowest workstations.

Hopefully, when you read my next post on Xubuntu, it'd be filled with steps on how I did a successful installation and not one filled with reasons why you shouldn't try it out.

If you can't wait for that next post, click here to go to the Xubuntu site.

Monday, August 4, 2008

Simulations as a Tool for Teaching Introductory Quantum Mechanics


Quantum Mechanics may not be everybody’s cup of tea, but today’s servings are laced with sweeteners that make a cup worth sipping.


Students always have a spot reserved in their attention span for graphics or visual representations. That’s why, IMHO, vector addition is best taught with the graphical (e.g. polygon and parallelogram) method as an introduction to the component method, or ray tracing as a prelude to the analytical methods in geometrical optics. The seemingly sophisticated image of quantum mechanics (QM) is no exception to this rule.


Allow me to elaborate. It is usually a given that introductory books on QM contain figures showing wave functions and probability distributions (ex: 1; 2); usually that of the particle in a box. Probably even earlier in the text of a typical modern physics book, in the discussion on uncertainty relations, figures can be found showing how a series of sinusoidal waves of different wavelengths , a.k.a. a Fourier Series, can make up a wave packet. These figures can easily be generated by simple programs which can even enable the student to change certain values to see how the graphs would look like when these changes are implemented. While practically any programming language that can support basic graphics can be used for this purpose, I will focus only on Java as the language of choice since this is what I am most familiar with. My next two articles deal with the type of figures that I just mentioned, so please do drop by again next week.


It might be straightforward to show the basic principle of a particular time-independent problem using either a single or a short series of figures for the wave function and the probability distribution. However, it wouldn’t be as easy if we wanted to talk about time-independent ones. This is clearly a job for simulations. Programs that show simulations of time-dependent wave functions can be more sophisticated to write but there are already existing applications that we can use. The best thing is that, they’re free. While there are definitely other sites that allow you to download similar applications, I recommend you start with http://www.compadre.org/osp/. It houses packages that combine computer simulations with tutorial materials and student worksheets. The simulations included in these packages are written in Java. Hence, one has to have the Java Virtual Machine (JVM) for the applications to run in his/her operating system.


Simulations temporarily take the math (and the burden of plotting) out of the equation and let you focus on the physics part of a particular problem. Consider the simple particle in a box problem. By changing values of n in the program, one can automatically see how the wave function and the probability distribution varies. Below are screenshots of the Free Particle Wave Packet Program, which shows how a wave packet evolves with time in the position and momentum space. Without having to go through a rigorous mathematical discussion, the user easily sees how the wave packet spreads in position space but remains constant in momentum space. Using simulations as a pedagogical tool allows the learner to experience the event and empowers him to make observations of his own. These observations can later be verified in his readings or mathematical derivations. Regardless of whether he interprets all his observations correctly, the point of the whole exercise is that the interest of the learner is captured and he is given the chance to “see” the event as it happens.