Category Archives: Computer Software

Information about computer software.

The Best Intro To Linux I Could Come Up With

I often need to explain to people what Linux is, but I couldn’t find any articles or videos that I think explain what it is sufficiently well. In an earlier blog post I lazily linked to a youtube video that explains how to install Linux mint, but now I’m going to explain it in more depth.

What is Linux?

The short answer is that Linux is an operating system kernel. Most people are unfamiliar with what an operating system is, much less a kernel. So let me explain. An operating system is merely a program, or series of programs that manages the hardware and software on your computer for you. When you download and install a program that program gets registered with the operating system, and when it runs it makes requests to the operating system to do things.

A kernel is just the core program of an operating system. You can’t use just a kernel on it’s own. You need other programs to run with it. There are many operating systems that use Linux. These are called “Linux distributions” You are probably already familiar with Microsoft Windows (which is an operating system), and you may have even used Mac OS X. Unfortunately Apple and Microsoft have created some widespread misconceptions about how operating systems work so let’s clear them up.

Microsoft does not sell computers. They do sell some hardware, but they are a software company first and foremost. Their main product is Microsoft Windows. Most places where you can get computers from sell computers from different various companies (Dell, Toshiba, etc) which have Microsoft Windows already installed. This has led many to believe that Windows is a part of the computer, rather than a program running on it.

Another misconception is the idea of “Mac Vs PC”. Apple released and advertisement campaign where they compared “Macs to PCs” which created the notion that there are only two options. It didn’t help that Apple’s Mac OS X operating system only likes to run on Macintosh computers, and that Apple doesn’t like anything else running on their machines.

Linux is a series of alternative operating systems. There are hundreds of Linux operating systems (AKA distributions, or distros), but the main ones for a beginner are Ubuntu and Linux Mint. Linux distros have the stereotype of being hard to use, so Ubuntu was made by a company called Canonical to be a user-friendly Linux distro; however they were recently accused by many of having lost touch with what their users want (the same old story every time, am I right?).

Thankfully the license that Linux distros are under encourage people to look at the code behind them, modify the code, and then give away the modified version for free, or for a price. The end user license agreements for Windows and Mac OS X say that you can’t do that. Linux’s license encourages that.

How do I get Linux?

Here are the home pages of some Linux distros:

Debian was thrown in there because that’s the one I use. Installing an operating system is different from installing other kinds of programs. You’ll need to download an ISO image, and then burn it to a DVD (like people did in the good old days), or a USB drive (many old computers don’t support this but all the modern ones do).

You might also want to back up all your files, have a Windows install disc, and also have defragmented your drive. The next step will be to reboot, but before we do let’s talk about a little bit of theory here. Your computer uses what’s called a BIOS (Basic Input Output System). When the computer starts it runs the POST (Power On Self Test) where it checks the hardware to make sure it’s not missing anything. At this point it will display the logo of the company that made your computer onto the screen very briefly (unless it’s been configured not to).

In the old days the BIOS would check different things on the computer to see what operating systems it could find. It would start with the DVD, and if there was no DVD then it went on to the hard drive (where Windows was preinstalled). If there was a DVD in the tray really ancient computers would try to run what’s on the DVD as an OS, and if it was actually just a movie on the disc it would give weird errors. Later ones would be smart enough to check if there was an OS on the disk.

Unfortunately, because everyone and their brother was using Windows anyways computer stores would reconfigure the BIOS to start with the hard drive, and only check the DVD tray, or USB drive second. This means that many of the users who have little ability to solve technical problems on their own will have a hard time installing Linux.

When the logo for the company that made the computer is displayed it will tell you to press a button to reconfigure the BIOS (usually F2), most of them will also tell you which button to press to choose which device to boot from (usually F12). Some users need guides that tell them exactly what to do step by step right down to which button to press, unfortunately there’s no universal way to install an OS. You’ll need to have some ability to solve technical problems on your own (though you won’t need very much).

Now we can reboot the computer with the USB stick still in (or the DVD still in the tray). Once we’ve selected the device to boot from Linux will be running and there will be a nice installer that you can follow. You can install Linux so that it’s a replacement for Windows, or you can set up your computer to ask you whether to use Windows or Linux when it starts up (this is called “dual booting”.) The installation process is very simple for Ubuntu and Linux Mint. Debian’s is more advanced, but I have no problem with it.

Once it’s installing it will probably take a while to run, so let’s go over the advantages of Linux. Linux is far more secure than Windows is. You’ll still run into technical problems with Linux, but security won’t be one of them. There’s no need for antivirus software for Linux. Linux is also much faster, and can run on much older hardware.

Unfortunately many of the programs you use on Windows will not run on Linux without WINE. WINE allows Linux to run Windows programs, but it eliminates some of the security Linux has. Thankfully most programs for Windows have Linux alternatives which are very compatible with the Windows versions.

Something you might want for Linux is this: The Linux Command Line By William Shotts

With that you’ll be able to solve technical problems, and automate daily tasks in ways that will make you wonder how you ever managed without it.

How I Made A Wheely Robot.

So far I’ve had a policy of only making updates when I’ve completed a project, but instead I’m going to post an update of a project that’s still in progress since it would take so long to finish. Introducing: the wheely robot.
20160515_220806
Note that I’m not exactly the best photographer yet, but at least you can figure out that it’s a robot.

So what does it do? Well so far I’ve been working on it as a sort of experiment on how to program robots.
A problem that I’ve run into before with earlier attempts at building robots was that I might tell the robot to move forward some distance (like for example: one meter), and it would move forward, but if something was in the way, or its wheels didn’t get as much traction as it thought it was getting then it would stop too soon, and not realize that it hadn’t actually reached the goal.

The problem at its core was that the earlier robots weren’t aware of the kinds of the fact that when they try to do something, that thing might not have actually gotten done because of some kind of obstacle. That’s where the fancier kinds of programming come into play.

The first fancy programming trick is what’s called a “PID controller”. The idea is pretty simple: the robot tells its wheels to move forward at speed x, and there are sensors at the wheels that tell the robot how fast its wheels are ACTUALLY moving, and then that data goes to the computer which uses an algorithm known as the “PID controller” that adjusts to any variations in speed.

More info here:

This is a pretty simple way to adapt to problems, my robot uses wheel encoders to figure out where the wheels are, and they aren’t a very good way to get sensor feedback which is why I’m working on getting more sensors for it.

I’ve also added multiple computers onto it. One handles sensor data since there will be so many sensors on the robot in the future, and one controls everything. The two communicate via i2c. With fancier programming techniques I could someday get it to use behavior-based robotics to go around obstacles (more info here, and here).

I’m also keeping a github repo for it here which will hopefully have some useful info (note: I’ve made changes to it recently which I haven’t tested). I’ve also setup an amazon wish-list here that has (almost) all the parts I used (it as of this writing doesn’t contain the screws that I used to screw everything in).

I’m hoping to someday make this go throughout my apartment and pick up things off the floor for me before a vacuum robot goes through.

How to hide secret messages in an image.

If you haven’t seen it yet: here‘s a little challenge I put together on my twitter page to see if people can find the
secret message in a pair of pictures. If you want to try cracking it then don’t read further because I’m about to tell the secret to it.

Here‘s a video about hiding secret messages within pictures that explains the basic idea, and here is the tutorial I followed to hide the image (and how to extract it).

The trick is to set the last bit of every pixel to one of the bits for the hidden message. Most people wouldn’t
notice because flipping the last bit of a pixel only changes its color value by one, and most people won’t notice such a small color change, especially for a picture with a lot of color noise.

The advantage to this method is that it works in Gimp (and possibly Photoshop, I haven’t tested it), but you can only insert non-encrypted images.

Finally here is the link to the answer.

A tutorial on Maxima

I’ve recently found out about a programming language called “Maxima”.

Maxima is a computer algebra system, which means that it can do algebra (as well as many other kinds of Math) for you. Here is a tutorial on how to use it.

Note that I admittedly haven’t read the tutorial as I already know how to use Maxima, but the tutorial is on its sourceforge page so I’m just going to trust it.

How to Stop Man in the Middle Attacks Part 3

You may have heard of something called a “trusted third party” before while using a web browser. This is usually used in reference to security certificates. This might seem confusing at first but it’s actually very simple.

The situation:
Alice and Bob have come up with a nearly fool proof way to stop people from eavesdropping on them. The last thing they need to do is get Alice’s public key to Bob through Mallory without Mallory modifying the key or replacing it.

To do this they use Trent. Trent has started his own business of securely transmitting public keys for people.

The idea is that everyone already has Trent’s public key. Alice simply needs to securely send her public key over to Trent and he’ll sign it with his public key and send it out to anyone who asks for it. This way Bob doesn’t need to have Alice’s public key ahead of time just to be able to create an encrypted connection with her.