Revenge of the Russians

Pretty much every pdf file that is linked to from this website I downloaded from Library Genesis.

Please go here for your “free education”. And don’t take out any ridiculous student loans. or vote for the Democrats.

If I was more organized then I would link to a page telling you how to download the pdf file yourself. Rather than linking to the actual file. But I’m not that organized.

If you would like to sue me for copyright violation, then you probably can. But it would be a huge waste of time for everybody. Especially you.

If you send me a politely worded email then I will remove the offending pdf. Simples.

How to speak “Russian”.

Basic Arithmetic

If you can’t do basic arithmetic, then it doesn’t matter how “good looking” you are – you are going to be at a major disadvantage for the rest of your life.

There are 10 types of people in the world. Those who understand binary and those who don’t.

Which one are you?

Here is a very basic tutorial on how to turn decimals into binary and vice-versa. Make sure you understand it. This is primary school stuff.

The other skill that you were supposed to learn in primary school – but apparently nobody did – is how to add fractions. Can you tell me what a half plus a third is?

Is it more than one? Or less than one? If you are not sure then watch the video below.

Whenever you are solving any kind of basic arithmetical problem, you should always estimate the answer before trying to find the exact answer.

Knowing how to calculate percentages in your head also won’t kill you. And might even save you some money.

If you can’t do this, then you have to pay the stupid tax. For the rest of your life.

You would surprised how many people try to enrol in University level math classes without knowing how to perform basic arithmetic. But it is actually not that hard.

If you need tutoring on any of these subjects, then my rates are $100 per hour. Melbourne CBD.

My style of teaching is harsh but fair. I will just make you do examples over and over and over again. Until you get it right.

Models of Computation

Do not try to understand this post until you have mastered Basic Arithmetic. And by “mastered” I mean that you can do it in your sleep.

There are two basic models of computation. The first is called the Turing Machine.

The second one is the Lambda Calculus.

I actually learned about all this stuff from the book “Godel, Esher, Bach” by Douglas Hofstadter. This is quite a “thick” book. But if you truly want to “grok” computers, and what they are all about. Then it is highly recommended.

Quantum Computing

This probably deserves it’s own post. The “take home” message is that it doesn’t exist. There is no such thing as “Quantum Computing”.

The “phone book” example that is usually given to explain “Quantum speed up” is just plain wrong. And the reason is simple: You have to transpose the Unitary matrix corresponding to the “Oracle”. And that is O(n) not O(1). Yeah. Embaressing.

It is all a big funding scam. Same as “String Theory” and “Climate Change”.

Everybody knows this to be the case. Some mathematician choose to take the money anyway. So they can stay in “Science”. While others choose to work in the banking sector instead. Where they can make even more money. Both sides believe themselves to be “morally superior”.

From this day forward, my allegiances in the String Wars will be open for sale to the highest bidder. Like a cynical arms merchant, I will offer my computational-complexity and humor services to both sides, and publicly espouse the views of whichever side seems more interested in buying them at the moment. Fly me to an exotic enough location, put me up in a swank enough hotel, and the number of spacetime dimensions can be anything you want it to be: 4, 10, 11, or even 172.9+3πi.

Someday, perhaps, a dramatic new experimental finding or theoretical breakthrough will change the situation vis-à-vis string theory and its competitors. Until then, I shall answer to no quantum-gravity research program, but rather seek to profit from them all.

Scott Aaronson.

“It is absolutely impossible for me to hide how intensely I despise people like Scott Aaronson … He’s the ultimate example of a complete moral breakdown of a scientist. It is astonishing that the situation became so bad that the people are not only corrupt and dishonest but they proudly announce this fact on their blogs…” — Luboš Motl.

Get used to it – that’s all I can say. Also. Try to have a sense of humour.

How to Install Ubuntu

You get a lot of “Street Cred” on the interwebs if you run Linux on your home computer. Nobody will take you seriously in the “Geektopia” if you are still running Windows. The latest version of Mac already run on a Unix based operating system.

Tools required:

  • Laptop
  • Internet Connection
  • USB stick
  • Brain

Tools not required:

  • Penis

Let me just re-iterate this point. You do not need to stick your dick into anything in order to install Ubuntu on your laptop.

If it is getting hard and uncomfortable, then just relieve yourself with your hand. And wipe yourself off with a hankerchief. Everybody does it. No big deal.

First a few “basic concepts” before we begin.

All modern computers are based on the “Von-Neumann Architecture“.

Once upon a time there were also LISP machines. But that time has passed. According to the “Church-Turing Thesis” it is all the same shit anyway. You can easily “simulate” a LISP machine on any modern computer.

That was already a lot of infomation. Basically a first year “theoretical computer science” course in one paragraph. It is not so important right now. But you can re-visit this infomation later.

If you enjoy this sort of thing then the “classic” introduction to the subject is Godel, Escher, Bach. This is a super geeky book.

Moving right along. Software architecture is basically designed like an onion.

The physical hardware of your computer can only understand binary. But humans do not speak binary.

Many many thousands of years ago, software engineers used to program in Assembly Language.

But eventually they got sick of that, because it was too tedius. And the C-programming language was born. People still actually use C. Especially for games programming. The Linux Kernel is written in C.

The way that a human accesses the Linux Kernel is through The Shell.

This is the biggest difference between Linux and Windows. You can’t just point and click on things. You actually have to type in the commands that you want executed. So learn how to touch type.

Richard Stallman wrote the C-compiler. That is why he is considered to be a god by the Hacker community in general. He also wrote the GNU toolchain.

Linus Travolds wrote the original Linux Kernel. He is more like The Pope, I guess. Slightly more accessible than god.

The final thing that you need to understand is what a “file system” is. Everything in Linux is a file. Including the Linux Kernel which is stored in the \boot directory. When your computer turns on it goes through a very specific boot sequence.

The “boot loader” these days is called GRUB. I still remember when it was called LILO. I am old enough to have seen and touched some punchcards. But I never programmed with them. You can probably find them in a museum somewhere.

Anyway, the bootloader is not a file. It is written directly onto the boot-sector. The bootloader is not actually part of Linux. It just helps your computer to find the Linux Kernel. Otherwise your computer won’t know where it is. And won’t be able to turn itself on.

There is also a very minimal “hardware” operating system called the BIOS which is built in physically to your computer. It is not even on the hard-drive. But on its own separate chip on the motherboard.

This is important because you can tell the BIOS to boot from a USB stick instead of from your hard-drive. This is how you install a new operating system onto your computer.

Exactly how you enter the BIOS depends on the physical hardware of your computer. But it always involves restarting the computer and pressing some combination of SHIFT, ALT, CTRL and a function key (F1, F2, F3, ….. , F12) before the “Windows screen” splashes onto the monitor.

This is the simplest and easiest way to hack into somebody else’s computer if you have physical access to it. Don’t do this if you are over 18. This is illegal for adults. But not for children.

So, now we are finally ready to install Ubuntu. Start by downloading the ISO file here. Make sure that you remember where Windows saved this file. Probably in the Downloads directory.

This ISO file contains more than just the Linux Kernel. It contains the entire Ubuntu Distribution. If you are a crazy person then you can download a much smaller version of Linux. And spend some time understanding how all the different pieces fit together.

Anyway, you can’t just “drag and drop” the ISO file onto your USB stick. Because this is a “bootable” file. You need to “burn” it directly on to the USB. Not “save” it as a file inside the existing file system on the USB stick. This will over-write and destroy any data which was previously saved as a file on the USB stick.

You are going to need a special piece of software to do this. There are many choices here, and it doesn’t matter in the slightest which one you use.

Just choose one. Download it. Install it using the “Windows Install Wizard”. Now follow the instructions to burn the ISO image that you downloaded earlier to the USB stick. Done!

That was actually the hardest part. Almost. Second hardest part.

You need to know the “make and model” of your laptop. Mine is “Dell Inspiron”. So I type “Dell Inspiron BIOS” into google and it tells me that the “magic key combination” to enter the BIOS for my computer is “F2”. Yours will obviously be different.

Restart your computer, with the USB stick plugged in. And press the “magic key combination” a couple of times before the “Windows Splash Screen” shows up. You should now be in the BIOS.

You cannot use the mouse while you are in the BIOS. You must “scroll around” using the keyboard arrows keys.

Firstly scroll over to the “Boot sequence” menu, and tell the BIOS that you want to boot from USB. Now scroll down to “Save and Exit”. And that’s pretty much it!

Your laptop will boot into the “Ubuntu Installer Wizard”.

The final step is to just follow the instructions on the screen. Which is just pointing and clicking on things and saying “Yes” to pretty much every suggestion. You will need your “wi-fi password”. So make sure you have that handy.

After you have finished installing Ubuntu, don’t forget to pull out the Ubuntu stick before you reboot into your brand new Ubuntu installation.

Contratulations. You are now a Linux Chick!

At the risk of offending feminists, both alive and dead. I would recommend choosing a “male” nickname to use on tech-related forums. Nobody can possibly know your gender online. And if you use a female nickname then half the internet will fall in love with you. Which is annoying.

Build your own Website

You don’t really need to know how the TCP/IP protocol works. All you need to know is that each computer on the internet has a unique IP address.

Unfortunately this address changes over time. Kind of like how people move house sometimes. The address changes, but it is still the same person. If you want to send mail to that person then you need to know their new address.

A Domain Name Server (DNS) keeps track of where everybody is currently living. For example, if you type “” into this website. It will tell you the current IP address of the server which is “hosting” this website.

The internet works on a client-server model. There are two main types of server that you need to worry about. They are SMTP servers (used for email) and HTTP servers (used for websites).

Your web-browser is a “client”. So is your inbox. Your home computer is connected to the “world wide web” and “the email system” via an Internet Service Provider (ISP).

It is important to understand that “the internet” is much larger than the “world wide web”. Email, for example, goes through it’s own separate protocol. As does IRC and various online games.

Financial infomation is transfered between banks over the internet using SWIFT. It is not particularly secure. But if you get caught trying to hack this network then you will go to jail for a very, very long time.

The “IP address” of your home computer is most likely on a subnet. This is annoying, because it means that you can’t just run a server on your home computer. You have to “host” your website on somebody else’s server.

I am currently “hosting” with They give you a basic PHP/SQL setup, with optional wordpress installation.

WordPress is an “application” which is written ontop of PHP/SQL. If you are not a “computer person” then I would recommend taking the wordpress option. It is not expensive at all. And there is a 24/7 customer service help line who are very polite and friendly.

You can also register your domain name with And get two free email addresses. If you already have a domain name registered elsewhere then you can easily transfer it.

WordPress is very intuitive to use. If you can figure out how to use Microsoft Word then you should be able to figure out how to use WordPress. There are a million different tutorials online.

No coding experience is required at all. And you certainly don’t need a computer science degree. You just need the ability to follow simple instructions and click on things.

You also need a credit card – to pay for the hosting and domain name registration. But don’t worry. It is a lot cheaper than getting professional photos done.

One last thing. Backup your work. Always. Backup. Your. Work.

How to backup wordpress

I have a “local” version of my website running on my laptop. It actually took me several hours to set this up. And I’ve already forgotten how to do it. But here are the main steps.

  • Install Apache
  • Install PHP
  • Install MySQL
  • Install WordPress
  • Fuck around trying to configure things for hours and get frustrated because it doesn’t work.
  • Read a bunch of online tutorials and message boards
  • Install a whole bunch of other crap which should have already been installed. Including a bunch of cryptography development packages. Why?
  • Do the “happy dance” because wordpress finally works on my laptop
  • Try to download and install a plugin on my local version of wordpress [All-in-one-migration wordpress]
  • Fuck around configuring the permissions on various directories.
  • Install the same plugin on my remote version of wordpress
  • Use the plugin to export my wordpress blog to a file
  • Modify some config files to change the maximum upload size of a file.
  • Import the file which I exported earlier.
  • Done!

Moral of the Story: This was not a “beginners activity” and wordpress still has a long way to go before it is actually usable by regular human beings.

If you want me to create a wordpress blog for you (under a Domain name that you own). Then install Ubuntu on your laptop and set up the backup system. I’ll do it for $500.

Page Rank

Once upon a time, before there was Javascript and YouTube. People just used to make their home pages using plain HTML. There weren’t even really any images.

For Geek Eyes Only

Suppose there are a thousand users of the internet – all of them high energy particle physicists. Each user has their own homepage. Each homepage contains some text, and some links to the homepages of their friends.

You can imagine this as a directed graph. Each node is a user with a homepage. And each arrow is a hyperlink between homepages.

This information can also be represented by an “adjacency matrix“. The entry in row 2 and column 4 of the matrix is the number of links going from the home page of user 2 to the homepage of user 4.

The “astute reader” will observe that if if we multiply the above matrix with itself five times, then the entry in row 2 and column 4 of the result will be the number of ways you can get from vertex 2 to vertex 4 in five steps. Magic.

While we are on the subject of matrix multiplication, the “double angle formulas” from trigonometry fall straight out of the multiplication of rotation matrices.

Isn’t that clever? Now you are an expert on matrix multiplication. Go and make yourself a cup of tea before reading the rest of this article.

What we need to imagine now is that a user starts at their own homepage. Then randomly clicks on a link to go to another page. Then randomly clicks on a link to go to another page. Then clicks on a link to go to another page. Etc….

This is not quite a Markov chain. To get the “transition matrix” from the “adjancy matrix” we need to divide each row by the sum of all the elments in that row.

The number in the row 2 and column 4 of the “transition matrix” tells us the probability that our random “web surfer” will click on the link from node 2 to node 4. Check it on the example.

We let this “random walk” go on for a long time, and are interested in what proportion of time our random “web surfer” spends on each page.

To be more precise, we are interested in the “probability” that our random “web surfer” will be on any given page – after being giver a sufficient amount of time to wander around. This is known as the Stationary Distribution.

[Probably some kind of “ergodicity assumption” is required here]

It is also known as the Perron-Frobenius Eigenvector.

Calculating this eigenvector for a gazillion by gazillion matrix is a non-trivial problem. But that is how the Google PageRank algorithm works.

Or at least how it used to work, before Google became “politically correct” and started “blacklisting” websites that it does not approve of.

The “moral of the story” is that to improve your SEO you need “incoming links”. More importantly you need incoming links from “popular” pages.

Even links from relatively “unknown” sites can help. As can links between pages within your own site.