Human Birdwing Hoax

The Internets are abuzz with news of an amazing new form of flight, the first ever human bird-like flight. It certainly looks convincing at first glance; there’s a website, a youtube profile, a facebook profile, and what looks like a genuine video:

The clever thing about this hoax is that they say all the right things – they mention using Turnigy motors, large 5000mAh LiPo batteries, an Android phone for control, a Wiimote for the accelerometer etc. They even show their acceleration measuring software in action. They also go as far as building a motors box, which drives a pair of carbon arms, onto which the wings are mounted.

From a technical viewpoint, it looks like a longshot but definitely plausible.

But then you watch the video, and it all falls apart. There is clear fakery there. If you look closely at the takeoff, between 35 and 42 seconds, and watch the guy’s legs, you cam see that there is no way this is real.

Once you start looking, there are lots of other problems. Why is the camera so far away from the takeoff? Why do the support guys run away, rather than run behind? Why are there car tyre tracks following the flightpath? Why do the wings not look loaded, instead flapping around?

Verdict: this is definitely a hoax.

Posted in Uncategorized | Leave a comment

Acer Aspire One Happy 2 – great hardware, terrible OS choice

My old netbook, an HP Mini 2140 died at the young age of 18 months (motherboard failure). Rather than go for another HP, I decided to buy an Acer Aspire One Happy 2 (Atom N570 1.66GHz).

It’s a very nice little machine. The screen is bright and crisp, the keyboard feels lovely, and the touchpad is well positioned and has good sensitivity.

But there’s a snag. The only OS option is Windows 7. A base install of Windows 7 uses around 680Mb of RAM. Given that this netbook comes with 1GB, this is really a terrible choice of OS for this machine. Run just a couple of applications, say Skype and Firefox, and you’ve used all all the RAM and are into disk caching.

My first thought was to put Xubuntu on it. It’s very lightweight, and would work great on the 1.66GHz Atom processor. The base install uses under 100MB RAM.

But a bit of reading around the subject revealed a number of driver issues. Getting the webcam, microphone and (less important) card reader to work under Linux is far from easy. So I decided to install Windows XP Pro instead.

The install went very well, and the base installation ran at around 90MB of RAM, which is perfect. Finding suitable drivers for all the hardware took a while, as Acer don’t supply XP drivers for this netbook. But after a couple of hours of searching on the various manufacturer’s sites, all of the drivers were in.

I now have a very nice little netbook running XP, with working webcam, microphone etc. Memory usage with Skype & Firefox running sits at around 350-400MB, leaving plenty of headroom for running a few other applications. As an added bonus, performance is a lot snappier than it was under Windows 7.

Regardless of whether you love or hate Windows 7, it really is not suitable for hardware of this spec. It’s wrong of manufacturers (Acer) to bundle it with a netbook which has 1GB of RAM. This ‘out of the box’ configuration is not realty usable – the OS is fine, but as soon as you run a couple of basic applications, it becomes unusably slow.

Posted in Hardware | Leave a comment

BMW develop laser headlights

BMW have developed laser headlights. The blue laser diode based lights (probably 445nm) use the lasers to pump a phosphor, producing white light (like in a white LED). The efficiency of laser diodes is quite a lot higher than that of LEDs.

http://www.bmwcca.org/node/3141

http://www.premiumautoshow.com/2014-bmw-i8-laser-lights.html

 

 

Posted in Lasers & LEDs | Tagged | Leave a comment

The Linux Desktop: A Conspiracy to Kill Off Linux?

There was a time when Linux was strictly for the enthusiast. Installing it was hard work, and getting your peripherals to work on it could take weeks of research.

Then things started to change. A few distributions put a lot of effort into producing a highly polished, ‘just works’ product. A product that truly rivals the mainstream Windows or MacOS desktop in user-friendlies. At the forefront of this were Canonical, who made huge leaps in Linux user experience with Ubuntu.

They were helped in this by huge improvements in window managers. As far as I am concerned, Linux for the masses came of age with the release of Ubuntu Dapper Drake, with the beautifully polished GNOME 2.14 as the default window manager. It was at that point that I was happy to install Linux on my mother’s PC, knowing that it will work just fine and not require hours of phone support.

Things were looking pretty good between that point and 2010. Ubuntu continued to release ever more polished versions of their distribution, with GNOME as the default window manager. If you didn’t like GNOME, you always had the option of KDE. There was even a fully packaged form (Kubuntu) of the distro, so you didn’t need to do any extra work.

Then things started going wrong. Badly wrong. An early hint of trouble to come was the release of KDE 4.0 in 2008. KDE 3.0 was never my favourite, but it was a reasonable window manager which didn’t get in the way too much. KDE 4.0 on the other hand took ‘getting in the way’ to a whole new level. I won’t bother to go into the details, after all this is old news (over 3 years old). It’s all been said before. The upshot is that KDE 4.0 is just not an option for most users.

Ok, so we’d lost KDE, but we still had GNOME, right? You can rely on GNOME, right?? Sadly not so. Gnome 3.0 was released in April 2011. And it sucks. It is just plain awful. It removes almost everything that’s good about GNOME 2.0, and replaces it with the worst bits of KDE 4.0 and Windows Vista.

It is so bad, in fact, that Canonical almost immediately announced that they would not be using it in future releases of Ubuntu. Instead, they will use Unity. Ok, it’s not that simple – Unity does have better support for touch screens and smaller screens, so that’s a big part of the decision. But I bet the fact that GNOME 3.0 sucks also played a big part.

Unity is very young, and does have great potential. But in its current form, as a desktop (as opposed to say netbook) window manager, it sucks. It has too many limitations, and not enough flexibility to configure it how you want.

So where does this leave us? It leaves us without a good, current version window manager. Sure, you can always install GNOME 2.0 on whatever desktop you run. But the default window manager matters a great deal when it comes to non-techies.

Why is this happening? Is this a conspiracy to kill off Linux on the desktop?

Posted in Linux, Rant, Uncategorized | Leave a comment

1964 Modem in action

Posted in Uncategorized, Vintage Tech | Leave a comment

HTML5 Playground

Below are my favourite picks of new HTML5 features. Bear in mind that not all of these features are supported in all browsers yet. If one of them isn’t working, try viewing the page in the latest version of Opera, Firefox and Chrome. Between those three, you should be able to see all the features working.

HTML5 Media

HTML5 Video

Embed videos in web pages just as easily as you embed images. Ogg, MP4 and WebM are supported (but browser support is patchy).

HTML5 Audio

Embed audio the same way as video. Ogg, MP3 and Wav are supported (but again broswer support is patchy).

HTML5 Canvas

This is so cool. Draw stuff using Javascript. The possibilities are endless.

HTML5 Inputs

HTML5 defines a number of new input types which make life easier for the developer.

Email Input

When the form is submitted, the input is validated. if it isn’t an email address, an error is displayed.

Email:
  

URL Input

When the form is submitted, the input is validated. if it isn’t a URL, an error is displayed.

URL:
  

Number Input

You can define a min and max, set to 1 and 10 in this example, and you can define a step value. When the form is submitted, the input is validated. if it isn’t a number, an error is displayed.

Number:
  

Range Input

Like the number input (above), but presented as a slider.

Value:
  

Date Input

A Date Picker input, with no Javascript.

Date:
  

Colour Input

A Colour Picker input, with no Javascript.

Colour:
  

HTML5 Attributes

There are some really neat new attributes in HTML5.

List Attribute

Bind a list of values to an input, allowing the user to pick from the list or enter their own value.

Search Engine:

  

Pattern Attribute

This is one of my favourites. Pattern matching for validation, without Javascript. Magic. You define a regular experession against which the input is validated. The input below will only accept valid UK postcodes.

Postcode:
  

Required Attribute

This enforces an input as required, the form can’t be submitted with the field empty.

Username:
  
Posted in HTML5 | Tagged | Leave a comment

Variables in MySQL

Variables in current versions of MySQL are not case sensitive, however in versions older that MySQL 5.0, there are case sensitive so take this into account when working on older code.

MySQL 4.0

set @x = 1;  set @X = 2;

select @x;

@x

1

MySQL 5.0

set @x = 1;  set @X = 2;

select @x;

@x

2

Posted in MySQL Queries | Tagged , | Leave a comment

Transactions

Transactions allow multiple used to update data in a database without interfering with each other and causing inconsistencies in the data.

ACID

  • Atomicity
  • Consistency
  • Isolation
  • Durability
Posted in Database Development | Tagged , | Leave a comment

Log Files – The key to understanding your server

Knowing how to read and understand log files is the key to understanding your Linux server. Here’s a rundown of the most important log files on Ubuntu.

System Logs
System logs deal primarily with the functioning of the Ubuntu system, not necessarily with additional applications added by users. Examples include authorization mechanisms, system daemons, system messages, and the all-encompassing system log itself, syslog.

Authorization Log
The Authorization Log tracks usage of authorization systems, the mechanisms for authorizing users which prompt for user passwords, such as the Pluggable Authentication Module (PAM) system, the sudo command, remote logins to sshd and so on. The Authorization Log file may be accessed at /var/log/auth.log. This log is useful for learning about user logins and usage of the sudo command.

Use grep to cut down on the volume. For example, to see only information in the Authorization Log pertaining to sshd logins, use this:

grep sshd /var/log/auth.log | less

Daemon Log
A daemon is a program that runs in the background, generally without human intervention, performing some operation important to the proper running of your system. The daemon log at /var/log/daemon.log and contains information about running system and application daemons such as the Gnome Display Manager daemon gdm, the Bluetooth HCI daemon hcid, or the MySQL database daemon mysqld. This can help you trouble-shoot problems with a particular daemon.

Again, use grep to find specific information, plugging in the name of the daemon you’re interested in.

Debug Log
The debug log at /var/log/debug and provides detailed debug messages from the Ubuntu system and applications which log to syslogd at the DEBUG level.

Kernel Log
The kernel log at /var/log/kern.log provides a detailed log of messages from the Ubuntu Linux kernel. These messages may prove useful for trouble-shooting a new or custom-built kernel, for example.

Kernel Ring Buffer
The kernel ring buffer is not really a log file per se, but rather an area in the running kernel you can query for kernel bootup messages via the dmesg utility. To see the messages, use this:

dmesg | less

Or to search for lines that mention the Plug & Play system, for example, use grep like this:

dmesg | grep pnp | less

By default, the system initialization script /etc/init.d/bootmisc.sh sends all bootup messages to the file /var/log/dmesg as well. You can view and search this file the usual way.

Messages Log
The messages log contains informational messages from applications, and system facilities, and is available at /var/log/messages. This log is useful for examining message output from applications, and system facilities which log to the syslog / sysklog daemon at the INFO level.

System Log
The system log typically contains the greatest deal of information by default about your Ubuntu system. It is located at /var/log/syslog, and may contain information other logs do not. Consult the System Log when you can’t locate the desired log information in another log.

Application Logs
Many applications also create logs in /var/log. If you list the contents of your /var/log subdirectory, you will see familiar names, such as /var/log/apache2 representing the logs for the Apache 2 web server, or /var/log/samba, which contains the logs for the Samba server. This section of the guide introduces some specific examples of application logs, and information contained within them.

Apache HTTP Server Logs
The default installation for Apache2 on Ubuntu creates a log subdirectory: /var/log/apache2. Within this subdirectory are two log files with two distinct purposes:

/var/log/apache2/access.log – records of every page served and every file loaded by the web server.

/var/log/apache2/error.log – records of all error conditions reported by the HTTP server

By default, every time Apache accesses a file or page, the access logs record the IP address, time and date, browser identification string, HTTP result code and the text of the actual query, which will generally be a GET for a page view. Look at the Apache documentation for a complete rundown; quite a lot can be gleaned from this file, and indeed many statistical packages exist that perform analyses of these logs.

Also, every time any error occurs, Apache adds a line to the error log. If you run PHP with error and warning messages disabled, this can be your only way to identify bugs.

CUPS Print System Logs
The Common Unix Printing System (CUPS) uses the default log file /var/log/cups/error_log to store informational and error messages. If you need to solve a printing issue in Ubuntu, this log may be a good place to start.

Rootkit Hunter Log
The Rootkit Hunter utility (rkhunter) checks your Ubuntu system for backdoors, sniffers and rootkits, which are all signs of compromise of your system. The log rkhunter uses is located at /var/log/rkhunter.log.

Samba SMB Server Logs
The Server Message Block Protocol (SMB) server, Samba is popularly used for sharing files between your Ubuntu computer and other computers which support the SMB protocol. Samba keeps three distinct types of logs in the subdirectory /var/log/samba:

log.nmbd – messages related to Samba’s NETBIOS over IP functionality (the network stuff)

log.smbd – messages related to Samba’s SMB/CIFS functionality (the file and print sharing stuff)

log.[IP_ADDRESS] – messages related to requests for services from the IP address contained in the log file name, for example, log.192.168.1.1.

X11 Server Log
The default X11 Windowing Server in use with Ubuntu is the Xorg X11 server, and assuming your computer has only one display defined, it stores log messages in the file /var/log/Xorg.0.log. This log is helpful for diagnosing issues with your X11 environment.

Non-Human-Readable Logs
Some log files found in the /var/log subdirectory are designed to be readable by applications, not necessarily by humans. Some examples of such log files which appear in /var/log follow.

Login Failures Log
The login failures log located at /var/log/faillog is actually designed to be parsed and displayed by the faillog command. For example, to print recent login failures, use this:

faillog

Last Logins Log
The last logins log at /var/log/lastlog should not typically be parsed and examined by humans, but rather should be used in conjunction with the lastlog command. For example to see a listing of logins with the lastlog command, displayed one page per screen with the less command, use the following command:

lastlog | less

Login Records Log
The file /var/log/wtmp contains login records, but unlike /var/log/lastlog above, /var/log/wtmp is not used to show a list of recent logins, but is instead used by other utilities such as the who command to present a listed of currently logged in users. This command will show the users currently logged in to your machine:

who

 

For tips on accessing log files effectively, take a look at this post.

Source: Ubuntu Community Wiki. Released under the Creative Commons Attribution-ShareAlike 3.0 License.

Posted in Linux Admin | Leave a comment

Essential Log File Commands

Viewing & Editing a log file
The easiest editor to use from the console is nano, which is less powerful but also less complicated than vim or emacs. The command to edit a particular logfile /var/log/example.log using nano is:

nano example.log

Press Ctrl+X to exit. It will ask if you want to save your changes when you exit, but unless you run it with the sudo command the files won’t be writable. In general, you won’t want to save your changes to log files, of course.

Viewing Files
To simply look at a file, an editor is overkill. Use the less command, which pages through a file one screen at a time:

less example.log

You don’t need sudo to look at a file. Press h for help, or q to quit. The cursor keys and page up/down keys will work as expected, and the slash key (“/”) will do a case-sensitive search; the n key repeats the last search.

Viewing the Beginning of Files
To see the first ten lines of a file, use the head command:

head example.log

To see some other number of lines from the beginning of the file, add the -n switch, thus:

head -n 20 example.log

Viewing the End of Files
To see the final ten lines of a file, the analogous command is tail:

tail example.log

Again, the -n switch gives you control over how many lines it displays:

tail -n 20 example.log

Watching a Changing File
Also, the -f (“follow”) switch puts tail into a loop, constantly waiting for new additions to the file it’s displaying. This is useful for monitoring files that are being updated in real time:

tail -f example.log

Press Ctrl+C to quit the loop.

Searching Files
Because log files can be large and unwieldy, it helps to be able to focus. The grep command helps you strip out only the content you care about. To find all the lines in a file containing the word “system”, for example, use this:

grep “system” example.log

To find all the lines containing “system” at the beginning of the line, use this:

grep “^system” example.log

Note the caret symbol, a regular expression that matches only the start of a line. This is less useful for standard log files, which always start with a date and time, but it can be handy otherwise. Not all files have a standard format.

Any time the result of a grep is still too long, you can pipe it through less:

grep “system” example.log | less

 

Source: Ubuntu Community Wiki. Released under the Creative Commons Attribution-ShareAlike 3.0 License.

Posted in Linux Admin | Leave a comment