Managing Large Software Projects

by Hans F. on Aug 27, 2009

Have you ever wondered how teams of computer programmers create large-scale programs successfully without hindering other people’s work? There are rather simple tools that keep track of versions of code being developed. This is known as version control, and one popular version control software is Subversion. There are several features in version control software that help keep track of changes as code evolves, as well as instances where more than one person works on a particular component of a project.

There are three main components to version control: branches, tags, and the trunk. The trunk can be thought of the main sector of a software project: most of the development work stems from the trunk. Tags are for special milestones in a project. Branches are what they sound like: they branch off from the trunk like a tree. All versions of each file in the project, old and new, are stored in what is known as a repository, with version numbers denoting how old a particular revision is.

There are many ways to utilize the branch-tag-trunk combination, but here’s an example. Say you have a team of software engineers working on a project. The trunk would be where known good code lives – code that isn’t broken nor has bugs. When someone wants to modify the code in the trunk (perhaps to make enhancements or add features), they would create a branch in the project and do their work in the branch. After they are done making code modifications in their branch, they would merge their branch back into the trunk. Most of the time, version control software is smart enough to figure out which parts of a particular file were modified, and incorporate those changes when two versions of the same file are merged together. Merging can also occur when two or more people modify one file at the same time, and later on decide to commit their individual changes to the repository. This way, you can have teams of more than one person working on particular parts of a project without the hassle of figuring out who changed what when combining everyone’s contributions into one – that’s what the version control software is there for.

A simple diagram showing how version control works.

A simple diagram showing how version control works.

Continuing with the above example, let’s imagine a major milestone for the project has been attained (perhaps Version 1.0 of the software is complete and ready for release). The code would then be tagged as a tag, and would sit as that particular tagged version in the repository. This is an example of how all three components of version control software is used, and hopefully this article sheds some light onto the underworkings of large-scale software projects.

(Image from Wikipedia)

Circuits from the Mechanical Perspective

by Kevin C. on Aug 26, 2009

One of the biggest differences between electrical engineering and mechanical engineering is the intuition that is developed for the physics. As a mechanical engineer, I fare better by dealing with what I can see (usually on a length-scale of a meter or so). Electrical engineers, at least when it comes to electric circuits, can only deal with components to help them understand what is going on. They use voltmeters to measure potential energy; they use ammeters to measure electric current.

What do mechanical engineers do? Well, we look and carry a big meter stick (kind of).

When I first started dealing with electric circuits, I had trouble intuiting what a capacitor did or what an inductor was.

I came up with the following menomic. Imagine a tall slope, with a height H at one end. Then, imagine there is a stream of water running down that slope. Take the stream of water to be analogous to electric current, and the height H to be the cause a potential difference between the top of the slope and the bottom of the slope (remember your physics equation that mechanical potential energy = mass x acceleration of gravity x height).

Then, in basic circuits, we get that resistors are similar to a paddle wheel in the path of the downward flowing stream. Both absorb energy from the electric current or flow of water, and converts the current from electrical energy to light or heat (typically) in the basic circuit.

Capacitors are like storage tanks that is mounted on the side of the slope. Like a tank, the capacitor starts to get “filled,” or “charged,” but once the water source goes out, the capacitor “tank” starts to deplete and continue the water flow downstream of the capacitor “tank.” (Keep in mind, these are approximate analogies, and not actually the case. While a capacitor does release energy and acts like an energy source after the original energy source is removed, the current is reversed. Clearly, water does not easily flow up-hill. There’s something wrong with this analogy, but it works, to a point.) So the way a capacitor in a circuit is to basically store electrical energy.

Finally, an inductor is, fundamentally, a coil of wire around a permanent magnet. We can think of this like a weighted paddle flywheel (like in the resistor case, but this time, it does not actually lose energy). In a circuit, an inductor is capable of smoothing out any spike in current. Analogously, a weighted flywheel would maintain the spinning of the paddle even if there is a sudden spike in the water current.

Maybe this’ll help you get a more physical grasp on the invisiblity of electric circuits. It’s closely analogous, but they are hardly dependable once we move on to more advanced circuits. It’s a start!

Twitter Weekly Digest for 2009-08-21

by Twitter on Aug 21, 2009
  • World's First Carbon Positive City in China
    http://bit.ly/hnNRr #
  • RT @TIME: Can geoengineering help slow global warming? | http://su.pr/1moIXm #
  • Flat screen movies would be a boring experience compared to this. An interactive dome theater with 3D sound experience:http://bit.ly/e3dyE #
  • Pesticides in organic foods are a no no. Fortunately we have things like rosemary, thyme, cloves and mint =) : http://bit.ly/mZWzS #

Powered by Twitter Tools.

Conduction vs. Convection

by Hans F. on Aug 20, 2009

When it comes to heat transfer science, two main types are conduction and convection. Heat transfer via conduction can occur in substance of any phase (solid, liquid, or gas), but is mostly seen in solids. On the other hand, convective heat transfer occurs only in fluids (liquids and gases). Both types of heat transfer are caused by molecule movement in the substance of interest.

In most cases, conductive heat transfer happens more rapidly than convective heat transfer. That is, heat transfer through solid materials is more profound than that in liquids or gases. You’ve probably experienced this in your everyday lives, knowing that we can “sense” heat transfer when we feel warm or cold ourselves. The heat or cold that we feel is known as heat flux, which is heat transfer per unit area. Therefore, in most cases if we have a metallic object and a roomful of air at the same temperature, touching the metallic object will feel warmer (be careful of burns!) than simply standing in the room and absorbing the ambient temperature.

Wear gloves when touching hot metal surfaces!

Wear gloves when touching hot metal surfaces!

Why does this happen? Intuitively, solids are denser than liquids and gases, meaning the molecules in solids are more closely-packed. This means that it is easier for heat to be transferred from molecule to molecule in solids, which would explain why heat transfers faster in solids.

When designing an apparatus for heat transfer purposes, one must consider two things: cost and effectiveness. Natural convection (such as with air) is relatively inexpensive because air is everywhere, but it isn’t as effective as using a metallic solid for heat transfer purposes. However, metals can be expensive. Therefore, some form of middle-ground is often desireable. This can be seen in computers, where fins conduct heat away from, say, a processor, and a fan blows the heat away in a process called forced convection.

(Image from WellBake)

Making Things Clear: Contact Lenses

by Adrian B. on Aug 18, 2009

There have not been many things designed to be as functional and and convenient as contact lenses, especially for those that need them. Those that use them can attribute to that. However, it definitely seems stunning that mankind has created a device small enough to place ONTO OUR EYE (specifically the cornea) which makes things instantly clear to those who have blurry vision. If we compare the most related such device, namely glasses, we find an alternative which is in turn relatively quite bulky, fragile, and less comfortable. So how is it that we have such an “elegant” solution to what seems to be a rather complex problem. The magic here lies in refraction.

The main goal of the contact lens (or glasses for that matter) is to simply bend light, or refract light, differently that our eye normally does. For someone with good vision, light enters the person’s eye where the lens, which is actually several layers of transparent cells, inside of the eye bend this light so it is well focused for the all-important receptor at the back of the eye, the retina. For people with poor vision, this light is progressively more and more poorly focused as eyesight gets worse and worse. We can liken this to the effect of a magnifying glass. Clearly we can place the magnifying glass at an optimal point between ourselves and the object we want to view, and the object will be magnified and very detailed. A slight disturbance in this distance ratio causes the image to lose focus, or refractive error, essentially allowing you to see what a person with not so perfect vision sees.

Now, let’s say that in our system we move toward magnifying glass a few centimeters. And lets assume that our eye can be considered the “retina,” since we’re working on a large scale here. The goal here is to place another lens in front of the magnifying glass to get that image to be focused again for this new location of the magnifying glass. And that, on a simple level, is the job of our contact lens.

That’s the technical. The practical is shown well in this image:

Where the lines meet is the focal point. The top and bottom images show where they are off

Where the lines meet is the focal point.

Optimally, we want the light to focus as in the center photo. However, due to different shapes in the eye (this is caused mainly through genetics, NOT sitting with your nose stuck to the TV for a long period of time. The latter has no effect on your vision, contrary to what seems to be popular belief.) the retina is not where the lens’ focal point is. It is as if in our system described above we moved toward or away from the “magnifying glass”, which in this case is the lens inside of our eye. To fix this, we place a contact lens on our cornea, or wear glasses in order to pass light through the eyes inner lens in a way such that the focal point will be on the retina of the eye.

That’s all there really is to it. For those still interested, The following links are rather interesting:

http://www.enotes.com/how-products-encyclopedia/contact-lens

- This link has a particularly interesting history section. Contacts have been around for about a hundred years, though back then, they were made with actual glass and supposedly, “To fit these early lenses, an impression had to be made of the patient’s eyeball”. Ouch.

http://www.youtube.com/watch?v=62tha1Kxa2c

- This link is a video that explains how contact lenses are made. Really thorough, and supposedly the actual process to make a contact lens takes only 15 minutes. Pretty short considering its a pretty complicated process, and everything needs to be perfectly done.

Image from : Vision Associates