Signing Off

Recently, I was doing research online to select a new telescope. This has since been purchased, but I am still being bombarded by adverts for telescopes. Clearing my cookies has helped, but my browsing history appears to be linked to my IP address and browser request header. I find this to be a continuing source of annoyance.

In the last half of 2013, marketers have started to push facial recognition technology to target adverts at passers by.

At the moment, these systems are limited to the identification of age and gender. However, the technology certainly exists to uniquely identify individuals if sufficient data is available. This data has already been compiled in the form of profile photos and photo-tagging. Due to the potential profits that can be made, I imagine it is only a matter of time until facial data is made available to marketing firms. When this happens, I will consider it an intrusion, and I do not wish to participate.

Therefore, I have decided to delete my social media accounts.

I consider myself very lucky, since my friends will use phone/text/email to get in touch or organise gatherings. Perhaps this is a feature of my demographic…

Aquarium Substrate

The substrate of an aquarium is the gravel at the bottom of the tank. The choice of substrate is important. Things to consider are:

  • Colour: The colour of the substrate changes how some species of fish or invertebrate behave. The popular cherry shrimp changes colour depending on the colour of the gravel.
  • Particle size: If the particles are too small then oxygen does not penetrate the medium quite as effectively. This encourages anaerobic bacteria which may introduce toxins and bad smells to the aquarium water. If the particles are too big then fish waste and decaying plant matter may be buried too easily and decay.
  • Chemistry: Some materials may have an impact on water chemistry by hardening or softening the water or changing pH, which may or may not be desirable. Other materials may act as an ion exchange resin and reduce unwanted heavy metals introduced into the water by food or tank equipment. Peat is often used to beneficially change water chemistry and mimic some natural environments.
  • Texture: A substrate that has sharp surfaces may damage bottom dwelling animals such as catfish or frogs, and may also cause damage to plant roots.
  • Density: If the substrate is too buoyant then it will be difficult to place plants without a weight around the stem or a plant pot.

 

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!