Categories
Uncategorized

Turning 20 This Year: Ren and Stimpy’s “Royal Canadian Kilted Yaksmen Anthem”

yaksmen

In March 1993, the Royal Canadian Kilted Yaksmen episode of Ren and Stimpy was aired, giving Canada its fourth national anthem (after O Canada, the old Hockey Night in Canada theme, and Stompin’ Tom Connor’s The Hockey Song).

Categories
Uncategorized

How to Mine Bitcoins for Fun and (Probably Very Little) Profit

gollum with a bitcoinThanks to the recent coverage of Bitcoin in the media, a number of non-technical friends have asked me “Hey, dude, you’re in computers…can you show me how to make my own Bitcoins with my home computer?” Since you can never really leave technical evangelism once you’ve gone into it, I couldn’t resist fulfilling their requests. In this article, I’ll talk a little bit about Bitcoin, show you how you can mine them on any old Windows machine you’ve got sitting around at home, and give you an idea of how much — or perhaps more accurately, how little — you can hope to make.

Before I begin, let me give you this quick graphic summary of mining Bitcoins on a typical home computer:

the dream the reality

Bitcoin: A Quick Summary

The Phantom Maker

mystery man

If you have an interest in computer science, cryptography, mathematics or academic papers — or some combination thereof — let me point you to Bitcoin: A Peer-to-Peer Electronic Cash System, the paper published by “Satoshi Nakamoto”, the creator of Bitcoin. While it explains the general idea behind Bitcoin, it’s not intended for the non-technical reader who wants a little backgrounder before minting electronic ducats in the comfort of his or her own home.

I put the name “Satoshi Nakamoto” in quotes because it’s a pseudonym for the person or persons who designed and created the original Bitcoin software. It’s one of those stranger-than-fiction occurrences: this electronic currency was conceived and first put together by a mysterious cryptographer (or group of cryptographers) who maintains a veil of Keyser Soze-like obscurity. Stranger still is the fact that after creating Bitcoin, making some modifications and sharing the technical information behind it, he vanished, with his final known involvement having taken place sometime in 2010. Before disappearing altogether, he set up Gavin Andresen as the caretaker of the Bitcoin source code repository as well as the Bitcoin alert key, which can be used to send an “alert” message to the entire network of Bitcoin programs. Even stranger is that Andresen says that he’s never met “Nakamoto” nor does he know his identity; all their conversation was via email and other textual communication.

The Math Works

math

This raises the question: “Why should we trust this shadowy character?” The answer is simple: we don’t have to. If there’s anything that needs to be put to the test, it’s the math behind Bitcoin, and it’s been proven to work. The math behind Bitcoin is such that transactions don’t need a trusted third party, such as a government, a bank, credit card company, Paypal or similar intermediary to transfer Bitcoins: just a payer and a payee. It harnesses the network all computers running Bitcoin software, none of which are controlled by some central authority, to create Bitcoins in a way so that they cannot be counterfeited. It also puts some hard limits on the rate of Bitcoin production as well as a maximum number of Bitcoins that can ever be created to prevent inflation (or worse, Zimbabwe-style hyperinflation).

What Bitcoins are Made Of

bitcoin diagram

Bitcoins are made up of digital signatures. Digital signatures are math operations that you can perform on data that you send to prove the following:

  • Authenticity: the data was created by a specific sender.
  • Non-repudiability: the data is confirmed to have been sent by a specific sender in such a way that the sender cannot deny having sent the data.
  • Integrity: that the data was not altered in transit.

When you give a Bitcoin to someone else, you (or more accurately, the software doing the transfer) sign the Bitcoin with the digital signature of your Bitcoin wallet, which is software designed to hold Bitcoins and make Bitcoin transactions possible. As a result, each Bitcoin carries within it a little ledger listing its transaction history.

Bitcoin’s Ledger: The Blockchain

ledger

As Bitcoin transactions take place, they are broadcast to the network — a network made up of every computer on the internet running Bitcoin software — whose job is to maintain the blockchain, the digital ledger containing the record of all confirmed Bitcoin transactions, ever. The blockchain is kept in chronological order and certified as not-messed-with through cryptography. In fact, there are a few clever tricks built in so that altering a ledger entry in the blockchain invalidates all subsequent entries.

Mining

mining

If we run with the blockchain-as-ledger metaphor a little longer, we can think of it as being made up of pages, which we call blocks. Just as you’d first check invoices, receipts and other proof as you write entries in a paper ledger until they filled the page, the Bitcoin network confirms transactions by performing some serious number-crunching, and confirmed transactions are encoded into a block. Once a block is created — a process we call mining — it is added to the blockchain, which is then shared throughout the network.

In order to provide an incentive for mining — again, that’s the process of confirming transactions and recording them in blocks — creating a block also creates a transaction that rewards the miner (the software that does the mining process) with a predetermined number of Bitcoins for doing so. Mining takes a lot of number-crunching — enough to max out the processors on a computer — and there’s an associated cost in electricity, ensuring that Bitcoins aren’t “free money”.

Miners in the Bitcoin network all work on trying to be the first one to complete the number-crunching required to add the next block to the blockchain. The first miner to complete the block asks the other miners to double-check its work, and if they say it’s good, the block gets added to the block chain and the miner is rewarded with Bitcoins. Then they compete to be the first to complete the next block, and so on.

Every 4 years, this reward paid to a miner for creating a block is halved. When the network started, the reward for creating a block and adding it to the blockchain was 50 Bitcoins; it was reduced to 25 in November 2012, and in four years, it will be reduced to 12.5. Coupled with a built-in mechanism for automatically adjusting the difficulty of the number-crunching process and the ever-growing blockchain and Bitcoins (both of which grow with each transaction), this reduction of the reward ensures that it will become harder and harder to make Bitcoins as time goes by. Eventually, this path of diminishing returns will hit the point where it would take infinitely large computing resources to make an infinitely small amount of Bitcoin, creating a practical maximum of 21 million Bitcoins in the year 2140. It also helps to counter the increases in computer power over time.

Mining Rigs and Pools

bitcoin fpga mining rig.jpg

The “Icarus” mining rig. Click to see a bigger picture of the beast.

The Bitcoin system is set up so that it’s much easy to make Bitcoins at the start (back in 2008) but increasingly difficult over time. The days when a miner running on a home computer could hope to be the first one to complete a block and reap the Bitcoin rewards are long gone. Hardcore Bitcoiners have been in an arms race over the past four years, building computers whose sole purpose is to mine. One such rig is one pictured above; it harnesses the power of 41 Field-Programmable Gate Arrays (FPGAs), which are processor chips that can be programmed at the circuitry level. FPGAs have since been surpassed by even faster chips called ASICs — Application-Specific Integrated Circuits — processor chips designed from the ground up for mining.

If you haven’t the money nor the inclination to build such a rig, there’s a more practical alternative: running a miner on your computer as part of a Bitcoin mining pool. Like Star Trek’s Borg, a mining pool is a collective of individual miners working together in a common cause — in this case, acting as a single miner, trying to be the first to generate the next block. The pool divides the number-crunching work among the participating miners, assigning work according to the power of the computer running each miner. If the pool is successful in being the first one to generate the next block, it collects the Bitcoin reward, paying each participating miner a proportionate amount. The more your miner contributed to the calculations, the larger a share it will get paid.

Enough Introduction, Let’s Make Some Bitcoins!

For this how-to, you’ll need a few things:

  • A Windows computer. It could be Windows XP, Vista, 7 or 8. I’m focusing solely on Windows computers because they’re everywhere — chances are, you know of one that’s gathering dust somewhere — and because it offers the simplest setup process for a miner.
  • An internet connection. The Bitcoin system functions only because it’s a network of computers working together.
  • Electricity. If you live in a place where the power’s included in your rent, you’re ahead of the game!
  • Patience. Lots of it.

I’ve made these instructions as simple as I could, but if you get stuck somewhere, let me know in the comments.

Step 1: Set Up Your Wallet

Blockchain is an online Bitcoin wallet service, and it’s quite easy to set up. Point your browser at blockchain.info and you’ll see this:

23

Click the Start A New Wallet button and you’ll get taken to the registration page:

24

Click the image to see it at full size.

You’ll need to provide an alias — a easy-to-remember name that you can use to access your wallet without having to remember some complex identifier. Blockchain will generate a less easy-to-remember identifier for your wallet. Either one can be used to log into your wallet once you’re registered.

You’ll also have to come up with a password for your wallet. Make it reasonably complex: Blockchain will reject passwords less than 10 characters long, and you should use a mix of letters (upper- and lowercase), numbers and punctuation characters.

Once you’ve provided the info and entered the captcha (the “type the letters and numbers you see in this picture” thingy), click Continue. You’ll see this:

25

Click the image to see it at full size.

Unlike many other systems, if you lose your Blockchain password, it’s gone forever, as are any Bitcoins in your wallet. There’s no “I forgot my password. Can you send it to me or let me reset it?” feature. Instead, Blockchain gives you a mnemonic made up of a set of words that you can use to recover your password. Copy it down and keep it in a safe place.

(By the way, don’t bother copying down the mnemonic in the picture above. I Photoshopped the screen capture I took and replace the mnemonic for my account with one I made up.)

Once you’ve done that, click Continue.

26

Click the image to see it at full size.

You’ll be taken to the login page pictured above. Note the two text fields, Identifier and PasswordIdentifier will be filled in with the official identifier for your wallet; copy it and keep it in a safe place. Enter your password in the Password field and click Open Wallet. You’ll be taken to your My Wallet page:

27

Click the image to see it at full size.

Congratulations! You now have a Bitcoin wallet, which you can use to store Bitcoins, receive Bitcoins and pay for goods and services. At some point, you’ll want to click on the Account Settings button to enter additional information for your wallet including your email address and mobile phone number, both of which are useful for things like recovering a lost wallet identifier and for payment notifications.

You’ll note that I’ve posted a Bitcoin address in the picture above. Unlike your identifier and password, your Bitcoin address isn’t used to log you into your wallet; it’s to let other people and systems know how to send money to your wallet. You want that to happen, so you’ll want to share your Bitcoin address.

In case you have some Bitcoins that you’d like to send to me for writing this guide, my Bitcoin address is 16sF2U11VbCPpfoo3Vqcfp6sepb6ZQichD. (Omit the period at the end.) Like Mother Teresa said, “Give until it hurts”.

Step 2: Set Up Your Mining Pool Account

BitcoinCZ — also known as “Slush’s Pool” — is a user-friendly mining pool, and like Coinbase, it’s easy to get set up there. Point your browser at mining.bitcoin.cz, and you’ll see this:

07

Click the image to see it at full size.

Click on Sign up HERE (near the upper right-hand corner of the screen), and you’ll get taken to the registration page:

08

Click the image to see it at full size.

You’ll need to provide a username that you’d like to use to log in, an email address where you can be contacted, and a password. As with the Blockchain password — heck, any password — use a reasonably complex one, mixing upper- and lowercase letters, numbers and punctuation characters. Once you’ve done that, click Register now! and you’ll see this:

09

Again, wait for a confirmation notice to arrive in your email. It should look something like this:

10

Click the activation link in your email, which will take you back to the BitcoinCZ Mining site, where you’ll see this:

11

Click the image to see it at full size.

Congratulations! You’re now in a mining pool, which means that you can now contribute to the work of processing the Bitcoin block chain and collect Bitcoins for your hard work. Or more accurately, your computer’s hard work.

Note that the system has provided you with a worker login and a worker password. These aren’t for you to log into the mining pool; it’s for your mining software to log in. Don’t worry about copying these now; you’ll see them again soon.

For now, click on the login in “Please login to continue”. You’ll see this:

12

Log in using the credentials for BitcoinCZ that you created earlier. You’ll be taken to your account page:

13

Click the image to see it at full size.

Remember the Bitcoin address you copied from the previous step? Paste it into the Bitcoin Address field and click the Save button. Now the mining pool knows which wallet to send Bitcoins to.

The page should now look something like this:

15

Click the image to see it at full size.

If you scroll farther down the page, you’ll see a section marked Workers. Right now, it should look something like the picture below:

14

Click the image to see it at full size.

This shows the activity of your mining software. Right now, there’s no activity, which means it’s time to take the next step. Make a note of the Login and Password in your Workers display, because you’ll need it for the next step…

Step 3: Set Up Your Miner

Bitcoin miner software is varying degrees of user-unfriendly. Once you’ve got it up and running, you’re not really supposed to interact with it, and it’s written with performance in mind. GUIMiner is the least unfriendly of the bunch, so I suggest you start with that. Point your browser to guiminer.org and you’ll see this:

16

Click on Download to download the GUIMiner package, which is a self-extracting archive. Once you’ve downloaded it, double-click it. You’ll see this dialog box, where you specify where you want the files extracted:

17

It will default to your Downloads folder, which is typically C:\Users\{your username here}\Downloads. For simplicity’s sake, change Downloads to Desktop, which will cause the GUIMiner folder, pictured below, to appear on your desktop:

18

Open the folder. You should see a list of files like this:

19

Double-click on the orange GUIMiner icon. That will launch GUIMiner, which should look something like this:

20

Make the following changes:

  • Server: Set this to slush’s pool (it may already be set to this). This is the name that BitcoinCZ used to go by, and specifies that your mining software will take part in the BitcoinCZ mining pool.
  • Username: Enter the Username from the Workers table from your BitcoinCZ Mining account page here.
  • Password: Enter the Password from the Workers table from your BitcoinCZ Mining account page here.
  • CPU Affinity: There will be as many checkboxes here as your computer’s processor has cores (as you can see, the computer I used for this demo has 2). Uncheck all but the one marked 0.

Once you’ve done this, click the Start mining! button. The Stopped indicator at the lower right-hand corner of the window should start showing numbers indicating the rate at which the mining software is performing calculations.

If you go back your BitcoinCZ Mining Account page, and scroll down to the Workers section, you can see if your miner has been assigned some work. If it has, the value in the Current Shares column will be a number other than zero:

21

Click the image to see it at full size.

Step 4: Wait. A Lot.

As time goes by, your miner will be assigned some work, and in exchange for that work, you’ll be awarded some Bitcoin. You can see how much Bitcoin by looking at this section of your Account page:

22

Click the image to see it at full size.

Here’s a quick explanation of these fields:

  • Send threshold: When your Total reward (see below) hits this value, it will be sent to your Bitcoin wallet, whose address you specified earlier. The default is 1, which means that when your miner has done enough work to earn 1 Bitcoin, 1 Bitcoin will be sent to your wallet. You can change this value to whatever you like. For kicks, my threshold value is set to 0.05, which I call a “Bitnickel”.
  • Estimated reward: BitcoinCZ’s pool divides the work it does on a block among all the miners participating in the pool. It apportions this work by assigning calculations of varying difficulty levels, depending on the power of the computer running each miner. The faster your computer, the more work will be assigned to it, which in turn means the bigger a share of the Bitcoin bounty for doing that work. Since it knows the difficulty level of the work it’s assigning to your miner, it can make an estimate of the amount of Bitcoin it will have earned by doing it. That’s what this value is.
  • Unconfirmed reward: If the pool wins the competition to be the first miner in the Bitcoin network to generate the block, this work needs to be confirmed by other computers in the network. Until the block has been confirmed by other computers, the Bitcoin earned for this work is considered unconfirmed. This value is your share of that unconfirmed reward.
  • Confirmed reward: Once the block is confirmed, the pool is awarded 25 Bitcoins for processing it. This is your share of that booty.

Calculating Your “Riches”

In the lower right-hand corner of GUIMiner, you’ll see a measure of how many hashes it’s number-crunching each second (if you’re not a programmer, just think of them this way: hashes are to data what fingerprints are to humans). In the screenshot below, the miner is crunching 7 million hashes a second.

hashes

The Account page on BitcoinCZ will also show the average hash-crunching rate that your computer has been doing over the past 10 rounds. That should give you a better idea of how you’ve been doing over the long run.

More is better: more hashes number-crunched per second means faster number-crunching, which makes it more likely that the pool will be the first to create a new block and collect Bitcoins as its reward.

If you know the hash-crunching rate, you can get an idea how much Bitcoin you’ll make over a given period of time with this Bitcoin mining profitability calculator. You only have to enter the following data:

  • Hash rate, in MHash (megahashes, or millions of hashes) per second.
  • Electricity rate, in US dollars per kilowatt hour. If you don’t pay for electricity, set this to 0.
  • Power consumption of your computer while running GUIMiner, in watts. You might want to use a Kill-A-Watt measuring device for this. If you don’t know, set this to whatever your computer’s power supply is rated at.
  • Time frame, in months.
  • Cost of mining hardware: The cost of your machine. I got mine a couple of years back through a Craigslist sale from a guy who was moving to Europe at a rate so low I’m treating this as 0.

The calculator will automatically fill in the other values from online sources.

Pictured above is my Bitcoin mining rig, an HP IQ526 Touchsmart computer. It’s no rocket and number-crunches at a mere 2 MHash/second. Factoring its effectively zero cost in hardware and absolutely zero cost in electricity, I can make 0.0001 BTC — one ten-thousandth of a Bitcoin — every 24 hours. At the current rate of USD$95.75 a Bitcoin, that’s about a penny a day, or about $4.30 in a year. My blogs make that through advertising on a bad day.

Still, it’s a fun experiment. Let me know about your Bitcoin experience in the comments!

Categories
Uncategorized

My OTHER Dream House

Suburban house with TIE fighter and R2-D2 in the driveway and an AT-AT in the front yard.

Click on the photo to see it at full size.

I’m certain there’s a “Hot Girls Room” in the back somewhere.

Categories
Uncategorized

Meanwhile, in North Korea…

Kim Jong Eun: "Prepare to launch!" / Girl with Diet Coke and Mentos: "Ok! Ready!"

Categories
Uncategorized

Turning 30 This Year: The “Violent Femmes” Album

violent femmes album cover

If you were into alt-rock in the early 1980s and looking for the perfect soundtrack for your teen angst, the Violent Femmes’ first (and best) album, Violent Femmes, was your best option. Songwriter and lead vocalist Gordon Gano wrote most of the songs on this album when he was still in high school in Milwaukee, which is probably why it rang true for so many of us when we first put it on our turntables or cassette players (they’re ancient music playback devices, kids).

Violent Femmes is a near-perfect album, featuring some solid songwriting, great instrument playing, and hey, Gordon Gano’s “so off it’s on” voice suits the material perfectly. It’s also a bit of an oddity, having gone gold (500,000 sold) a whole four years after its release, followed by going platinum (1 million sold) four years after that, all while never having broken into the Billboard charts, but garnering its success through play on indie, alt-rock and college radio, as well as word-of-mouth. During my days as a DJ at Crazy Go Nuts University’s Clark Hall Pub, all the crowd has to hear was the introductory “Day…after day…” from Add It Up, and there’d be a mad rush for the dance floor. Not bad for a song with only two chords!

Here, for your listening pleasure, is the Violent Femmes’ Violent Femmes. Enjoy!

Categories
Uncategorized

A Quiet Friday Night

As much as I like going out and carousing, I thought I’d spend a quiet Friday night at home. First, it was time to vacate the home office…

joey devilla's home office

…make a beeline for the bar…

joey devilla's bar

…hop on the “hobby” computer in the living room and noodle further on some side projects…

joey devilla's living room computer

…and maybe end the evening with another chapter of a good book. Possibly with the assistance of another run to the bar.

joey devilla's bookshelf

Categories
Uncategorized

Don’t Know Much About History…

Jay-Z’s recent rap, Open Letter, is a response to criticism by Florida Republican Congresswoman Ileana Ros-Lehtinen over his recent visit to Cuba:

Ros-Lehtinen learned that Jay-Z and his wife Beyonce spent their wedding anniversary in Cuba, contacted the U.S. Treasury Department, asking for an investigation. U.S. citizens can’t simply visit Cuba for tourism; they require clearance from the U.S. government for a “people-to-people licence” and declare that your visit is for something such as academic research, cultural exchange or journalism. It turned out that the couple had secured clearance under the “education” exception.

The American embargo against Cuba has existed in various forms since the revolution against Batista, first as arms embargo, then expanding to trade and travel after the Cuban Missile Crisis. We Canadians aren’t under such a restriction, and while I haven’t gone to Cuba, my friend and Crazy Go Nuts University schoolmate Chris Turner has, and he’s written about his experience there in an article in The Walrus titled On Tipping in Cuba (a worthwhile read, as Chris’ stuff usually is).

dana perino

Dana Perino, former White House Press Secretary during the Bush II administration turned FOX News talking head (as a number of Republican sloppy seconders are wont to do) recently showed her disapproval of Jay-Z’s Cuba trip with a painfully bad rap, much to the amusement of her decidedly funk-free co-hosts:

Perino’s criticism might carry more weight if we didn’t know this little fact about her: at a White House press conference in 2007, when she was asked if the U.S.’ missile defence strategy had an analogue to the Cuban Missile Crisis, she had to fake a reply, because she had no clue what the Cuban Missile Crisis was:

Shortly afterwards, in an appearance on NPR’s Wait Wait…Don’t Tell Me!, she told the full story:

“I was panicked a bit because I really don’t know about . . . the Cuban Missile Crisis,” she said. “It had to do with Cuba and missiles, I’m pretty sure.”

Luckily, she did the right by not worrying her pretty little head about it — she went to a man to clear things up for her. “I came home and I asked my husband,” she recalled. “I said, ‘Wasn’t that like the Bay of Pigs thing?’ And he said, ‘Oh, Dana.’ “

the stupid it burns

Oh, Dana indeed. This, Gentle Reader, is where “low-information voters” come from.