Linux on a Fujitsu-Siemens Esprimo Mobile V5535 Laptop

I have previously blogged about difficulties with Linux and the Fujitsu-Siemens V5535 laptop. This is now an old laptop, and hardware support is now a lot better in Linux.

I have recently installed Lunux Mint.

Everything works following a default installation, without the need for any custom configuration.

Javascript and Mobile

Periodically my phone gets *really* hot and my battery drains quickly.

I have wasted a tremendous amount of time troubleshooting. I’ve cleared RAM, killed background tasks and uninstalled lots of apps.

It seems that the problem is Javascript. The browser appears so closely integrated into the OS that it cannot be closed (it simply pushes into the background) and any looping Javascript on a webpage continues running which drains my battery and creates heat. Not all sites using Javascript cause this problem.

Web designers put a great deal of effort building sites that respond to the size and resolution of device screens. Javascript is one of the tools used to achieve this objective. Since this means flattening my battery I am considering turning off Javascript altogether.

Optimising a site for mobile should include design decisions other than simple display and usability considerations, such as methods that preserve the battery of the device…

If anyone has any good ideas or examples of best practice they would like to share, please leave a comment.

The Importance of a Strong Password

Introduction

Whenever I get into a discussion about the importance of strong passwords, the response I am invariably “challenged” with generally goes as follows:

I am an obscure and unimportant individual. I am not famous. I do not have any political connections. I do not hold any sensitive information online. I am not a hackers high-value target, and therefore I am probably safe.

Here, I will take a moment to discuss how a password works at the “server-side”, and consider a way an attack might be performed. We will find that a single individual is often not directly targeted, but becomes a default victim if a weak password is implemented.

How A Password Is Stored… The Secure Hash!”

Many people probably imagine that when we select a password, the string of text is saved in some sort of flat file or database entry, and that when we “log in” the text we enter is compared to whatever password the server registered against the username.

Back in the early days of the web, this is exactly how things worked.

If you stop and think about it, this is a very bad idea. An attacker could break into the server over the network and steal a list of passwords. Alternatively, someone with legitimate access to the server (such as a system administrator) could simply copy the file and take the passwords home.

Fortunately, passwords are no longer kept in plaintext. (Plaintext is text that has not been subject to any cryptographic cleverness. Ciphertext is the opposite of plaintext.) A cryptographic “hash” is generated from the password and this is then stored. A good hash algorithm cannot be reversed, so you can’t work out what the original password is.

An example of a cryptographic hash is the MD5 algorithm. This is no longer the best algorithm to use when security is important. Better hashes exist, such as those in the SHA-2 family. I will use MD5 as an example because readers probably use MD5 to verify internet downloads (if they are sensible enough to take the time to do so).

So What Happens To Passwords On A Server

Suppose you sign up for a new email account (or web host, or forum profile etc), and you decide to use the password “London2012″ (A REALLY BAD PASSWORD!).

Your new password is sent to the web server. The server then generates a hash. If MD5 is being used (it shouldn’t!) the string “London2012″ will give us the following hash:

95c01f7cb1212eaac5866ff184f05751

The server then stores this hash for future logins.

When you next login and send your password, the server works out the hash for your password, and then compares it against the hash that it has on file. If the two hashes match, then the server concludes that the correct password was entered and you are allowed to login.

Remember that a good cryptographic hash cannot be reversed. We cannot calculate the password from the hash. This means that if the password file is stolen then it is still difficult for someone to log into your account.

So Why All This Strong Password Nonsense?

Suppose a file containing password hashes is stolen from a server. This file might well contain the hashes of several million passwords.

Since this file is so big, we can be confident that someone, somewhere, has “London2012″ as a password. We could calculate the cryptographic hash for “London2012″ (95c01f7cb1212eaac5866ff184f05751) since the hash algorithm is not a secret, and then search the file for this hash. We then find which username has this password and the account is now broken.

A modest desktop computer could calculate a hash and search a password file very quickly. If a list of commonly used passwords is available then hundreds of thousands of passwords could be checked in a few minutes. The operation could be further optimised by the use of rainbow tables. To make matters worse, cloud based services make high performance computing resources available at a modest cost. More simply, the password hashes could be leaked on the internet and breaking the passwords becomes a community effort.

Herein lies the problem. It does not matter how insignificant you are, if you have a weak pasword you are rapidly picked out from the crowd. An attacker does not always target specific people. It is often weak passwords that are targetted.

We often hear stories on the news of peoples passwords being stolen and published on the internet, this is precisely how this happens. The victims in these instances are ordinary people that do not stand out.

If you find out in the news that a service you use has been compromised, change your password. Thousands of people all over the world could be trying to break into your email.

Strong passwords are important. Don’t argue with me, because I won’t bother arguing with you. I’ll nod politely, and maybe even agree so that the conversation moves along to other matters. You are responsible for your own data…

Aquarium Water Chemistry and Reverse Osmosis.

For most people, the water from the kitchen tap is mostly OK for a typical fish tank. However, water quality can vary greatly, even within the same county. This is one of the advantages of finding an experienced aquarist in your area – for most people this will be a local dealer. They will advise on the suitability of your local water. Note that most shops keep fish in local water, so that the water chemistry matches that of the average customer. This is why it is so important to acclimatise fish to a new environment. The water in the tank could be very different to that in the transport bag.

Tap water usually contains additives to maintain cleanliness of the water for drinking. This usually means traces of chlorine or flourides and are harmful to fish. If tap water is used, a product to render these substances inert should be added.

Water from the hot tap SHOULD NOT BE USED. The hot water tank is often made of copper which is particulaly toxic. Simply use cold water, and add it slowly.

Reverse Osmosis water (often called RO water) is water with all minerals and other impurities removed. It is sold by most aquarists, or is made at home by hard-core enthusiasts (the equipment to make RO water can be expensive). Minerals must be added before it is put in the aquarium: water that is totally devoid of minerals can quickly kill fish.

RO water is useful because it is less likely to contain trace toxins (such as heavy metals or chlorides) and formulating the necessary mineral additives provides an opportunity to precisely control parameters such as pH, KH and GH, so that water chemistry can be targeted towards particular fish species.

Aquatic plant enthusiasts use RO water because low hardness water can be fertilised with a greater concentration of carbon dioxide without becoming toxic for fish.

The Good Old Days…

When Canonical moved Ubuntu to the Unity interface I was not a happy Linux user, and I was not alone…

I would have been happy to spend some time learning this new interface (after all, I encourage Windows users to keep an open mind), but I found a few of the early quirks too painful. I took the opportunity to play with some other desktop environments, and found myself installing Fedora in the process. It was about time that I learned a little bit more about Red Hat type systems, and I’d heard that the Fedora installer made disk encryption nice and easy which is helpful because I travel with my computer. I eventually settled on the XFCE desktop: I found the interface to be clean and back to basics.

Today I decided to pull an old laptop out of the back of a cupboard. After booting into single user mode to reset my password, my machine presented me with…. Ubuntu 7.04, “Feisty Fawn” !

This old machine is being left to crawl through its upgrade cycle. I’m going to have a play with the latest Ubuntu, and then I’m going to reformat and install Gentoo. Everyone knows that when you’ve compiled Gentoo you gain super-powers.

I still think Ubuntu is a brilliant operating system. It is bright and colourful to appeal to kids, friendly for the noobs, educational for computer enthusiasts and it provides the tools needed by those who dabble with technical computing.

Samsung Galaxy Note

I have just received my new Samsung Galaxy Note (this is my first post using this device).

Whilst browsing through the settings I am unable to find an option to enable NFC (Near Field Communication). Uses for NFC include contactless payment using your phone (not something I would be experimenting with).

The wikipedia page for this device confirms that NFC is a feature, as does the website of my provider.

Has anyone in the UK received a Galaxy Note with NFC? This may not be included in the UK version…

Newtons Laws Of Motion

Isaac Newton

Isaac Newton

Isaac Newton was a physicist, astronomer and mathematician. Newton is remembered for his work in mechanics, optics, astronomy, mathematics and his famous description of gravity. Mechanics is the study of things that are moving. Newton’s mechanics offered the first explanation of Kepler’s laws (Kepler didn’t say why the planets move the way they do, he described their movement mathematically).

Newtonian (or Classical) mechanics is the first topic studied by a student physicist. It provides us with our first introduction to mathematics (particularly calculus) as a practical tool, and remains a useful description of nature throughout our careers.

There are many equations used when analysing the interaction of moving bodies, but with a little ingenuity they can all be derived from Newton’s three laws of motion.

Newton’s Laws of Motion

Newton’s First Law

Every body will remain in a state of rest or constant velocity unless acted on by a force

When a physicist talks about a body, he/she means a lump of matter that can be taken as one object. Footballs and bullets are bodies. Two bodies stuck together with Blu-Tack count as a single body. A body at rest is sitting still and not doing anything interesting. A body with a constant velocity is moving at a constant speed in a straight line.

This means:

  • A football sits still unless you kick it (duh!).
  • After a football has been kicked it ‘wants’ to travels in a straight line at a constant speed, but it doesn’t because air resistance slows it down and the earths gravity pulls the trajectory into an ellipse.

Newton’s Second Law

The rate of change of velocity is directly proportional to the force applied and occurs in the same direction.

This is expressed as:

F=ma

The terms in this equation are:

F = The force applied.

m = The mass of the body.

a = The acceleration (rate of change of velocity) of the body.

Since the acceleration is equal to the rate of change of velocity we can also write this equation as:

F=\frac{d}{dt}(mv)

This equation tells us that the harder you push the harder a body accelerates.

Newton’s Third Law

For every action there is a reaction, that is both equal and opposite.

This law is often misunderstood, but is really very simple. When something applies a force, it itself experiences the same force (that causes an acceleration in the opposite direction).

This can be experimentally tested by punching a brick wall. Your fist applies a force on the wall. The wall applies the same size force to your fist (in the opposite direction). This is why it huts if you punch the wall.

Kepler’s Laws Of Planetary Motion

Johanes Kepler

Johanes Kepler

Johannes Kepler analysed the astronomical observations of Tycho Brahe. Tycho is remembered as being the most skilled observational astronomers of his time, but never

managed to describe his results mathematically. Kepler was a highly skilled mathematician, and it is said that he easily recognised the elliptical nature of the planetary orbits. This is not a trivial matter, given that the earth is also a moving object.

Kepler proposed three ‘laws’ of planetary motion. Modern astronomical observation shows that the paths of the planets are slightly disturbed by the gravitation of other nearby planets and by the effects of General Relativity. Otherwise, Kepler’s laws are still found to hold true.

Kepler’s Three Laws

Law 1

The orbital paths of the planets are shaped as ellipses. The Sun is located at one focus of the ellipse.

An ellipse is a very precisely defined geometric object. Mathematically, the shape is defined by:

r=\frac{a(1-\epsilon^2)}{1+\epsilon\cos\theta}

The terms in this equation are:

r = the distance from the Sun.
a = the semi-major axis (half the length of the long side of the ellipse).
\epsilon = the eccentricity of the ellipse (how “squashed” the shape is).
\theta = the angular distance traveled around the Sun.

This formula allows us to describe and predict the path of a moving planet. Some planetary orbits are more elliptic than others; some may be very (but not quite) circular. An ellipse has two foci (singular focus – these are a bit like the centre of a circle).

Law 2

The imaginary line between the Sun and the planet sweeps out equal areas in equal amounts of time.

This simply means that when the planet is close to the sun, it moves much faster than when it is further away. This may seem obvious, but this is in fact a very precise statement which allows us to calculate how quickly a planet will be moving at another point in its orbital path.

Law 3

The square of the orbital period is directly proportional to the semi-major axis cubed.

This is written mathematically:

p^2=a^3

Where:

p = the orbital period (the time in Earth years to complete one orbit.
a = in this context, the average distance from the Sun in AU.  The Earth is 1 AU from the Sun.

Notice that what seems to be a complicated statement is expressed very simply in the technical language of mathematics. When you read a science book, the equations are there to make things more simple. Don’t be scared of them.

This formula allows us to calculate how long a year is on another planet after we have measured how far away it is. Alternatively, we can time how long it takes a planet to return to its starting position, and calculate how far away it it from the sun. This is an example of how physics is amazing – you can measure the orbital time of a planet using a watch, and calculate how hot it is for the people that live there!

Happy Calculating!

Aquarium Filtration

A number of filtration methods exist.

Under-gravel filtration used to be the most popular and is very effective. This type of filtration draws oxygenated water through the gravel which sustains a colony of bacteria. The bacteria process waste products in the water. The water can be circulated using either a water pump or a lift tube and air pump. This method is very effective for tanks where water currents may cause a problem, such as a tank used to raise fry.

Under-gravel filtration has been mostly replaced by various types of power filter. These contain various permutations of sponge (or filter wool), filter carbon and pellets.

The sponge type media removes particulate debris from the water, and when used correctly can maintain a bacteria colony. Filter carbon (or “activated carbon”) absorbs various chemical traces from the water, and must be removed when any type of medication is added to the water. Pellets provide a media for a bacteria colony to occupy, which process various wastes – some bacteria species process ammonia (a fish waste) to produce nitrite, another species process nitrite to produce nitrate. Nitrate is the least toxic to fish, and is typically removed by plants to use as food, or can be removed by partial water changes.

By Ilmari Karonen, released into the public domain

Power filters are generally easier to clean than under-gravel filters, but have the disadvantage of moving parts. Care must be taken when configuring the outlet of power filters, which often have high flow rates that are troublesome for some species of fish.

Your aquarist will be able to help you select a filter appropriate for your tank size. He/she will also probably recommend a power filter, since these are generally the most effective.

If using a filter that uses bacterial action (which will almost certainly be the case), bacteria will need to be introduced to the tank before the fish. Traditionally, a small amount of food would be placed in the tank with no fish, which would decay to “kick-start” the filter. These bacteria can now be purchased in bottles, and I recommend this approach.

Since a sponge may also house bacteria, it should be cleaned in a way that will not destroy the colony. Only clean one sponge in any given maintenance period. If the filter only has one sponge, consider cutting it in half with a pair of scissors. This will make sure bacteria will always be present. Clean the sponge by rinsing it it aquarium temperature water (this is most easily done using the waste water during a partial water change).

Only use a sponge provided by your aquarist dealer. Some types of domestic sponge contain chemicals that may be harmful to fish, others may release micro glass fibers into the water.

Note that filter output can be used to keep water circulating past a heat – keeping the temperature even across the tank.

Whichever solution is adopted, a UV water steriliser needs consideration. These compliment (not replace) filtration. Once only common in garden ponds, small units for the aquarium are becoming inexpensive, and resemble a power filter. These kill any micro-algae suspended in the water (keeping the water clear), and arrest the spread of disease. I consider my UV steriliser indispensable.

Aquarium Lighting

Aquarium lighting can be installed to enhance the growth of plants, or for simple aesthetics.

Fluorescent tubes are currently the preferable choice, as they generate little heat and do not cause temperature gradients across the aquarium. This type of lighting also consumes the least energy.

Speak to your local aquarist for help selecting a suitable of tube. Some have a specially formulated chemistry to produce a spectrum that promotes plant growth. Others have a ‘flat’ spectrum to pick out the colours of fish, making them appear brighter. Tubes exist that replicate the spectrum of moonlight, encouraging nocturnal species to appear at daytime.

Aquarium grade fluorescent tubes are generally brighter than other domestic tubes. This is to compensate for light absorption in the water.

A fluorescent tube is installed in the lid of the aquarium. The lighting effect is more effective if the light is install at the front, since shadows are cast away from the observer.

Plants need 8 to 10 hours of light a day (the length of a day in the tropics). Any more is likely to cause the growth of water algae.

The installation of a reflector behind the tube can increase the amount of incident light (tin foil can also be used, but I prefer to avoid introducing areas where condensation can gather)

Tropical Aquarium

By Wing of the Chinese Wikipedia Project, released into the public domain.

 
Get Adobe Flash player