Category Archives: Hardware and Technology

Quora Answer: Which career is more fun, networking or programming?

I originally wrote this as an answer to a question on Quora.

Full question:

“Say networking is a blanket, for IT, systems administration, and network security. We’ll say programming is basically web app development. Can anyone with experience in either of these fields give some pros and cons about what they do and do not like?

I have basic knowledge in web development and none in networking, but I have recently taken a liking to getting involved with network security, and I think I would like systems administration more than programming so I am curious as to your opinions.”

I’ve done both, and still do both.

I almost always prefer building software, but there are almost no days where it’s easy. The big draw for me is that it’s creative work and is a form of artistic expression, more in the way that literature is than painting. I also find that my level of enjoyment is inversely proportional to the number of people involved in the process.

Both paths rely on having a great deal of knowledge. While you can look up specifics, having enough background to understand the specifics takes a lot of  learning and experience. Once you know the material well, networking and system administration are usually easier and less stressful, requiring a lot of thoroughness, attention to detail, and keeping track of things.

Both rely on having a set of tools that you rely heavily on. In software, it’s your IDE, debugging tools, libraries, frameworks. In systems it’s a set of utilities, commands, scanning tools, or even hardware tools.

What I dislike about what you put in the umbrella of “networking” is that if you’re good at it, it can get to be pretty boring. When systems are running well, you’ve earned your pay, but it’s when things are breaking that it gets most interesting. And stressful. And you get the least recognition for your efforts. Though ages ago I was an MCSE and worked with Microsoft products regularly, I’ve grown into being a Linux bigot and can’t stand working with non-open-source systems. Luckily I’m in a position where I don’t have to, but you may not have a say in what things you end up working with.  Same goes for programming, really.

One place where it gets interesting is when you combine the two, and that’s what I refer to as DevOps. It’s system administration AND programming. This involves working with tools that create and configure servers, deploy things, set up security, and perform all sorts of IT administration tasks, but instead of being done by a team of 20 IT staff, they can be done by one person. Things like Chef, Puppet, Vagrant, Salt Stack, Ansible, Fabric, Capistrano, and Nagios are popular and worth exploring.

It’s a lot harder to find a “sane” work environment in programming. Almost nobody who hasn’t done it appreciates how incredibly difficult it can be. Douglas Crockford said that “computer programs are the most complex things Humans make”. Being able to manage an environment like that where people aren’t just cogs in a machine takes a special kind of person, and unspecial managers abound. Lots of little things can add up to make a chaotic and stressful environment. It’s often more “interesting” in product companies, but those are a small part of programming. Most programming is writing “boring business apps”, like order entry systems, sales report generators, accounting tools, and other business-specific pieces. It’s no less challenging, but often less stressful and more stable than building software products. The challenges are just different, and one’s not better than the other. I’m a product person, you may not be.

Before making a decision, I’d recommend exploring the world of DevOps first. Not only is it a growing trend and career path, it’ll give you a taste of the administration side of things and you may fall in love with it. Or you may like every part except for the programming and go full IT.

Overclocking The HP Touchpad For Cryptocurrency

I mention in my September 9th post that I was able to get a Bitcoin/Litecoin mining daemon (cpuminer) running scrypt calculations on the HP Touchpad.

Because a device like that is one of the worst possible things you could use to generate cryptocurrency, I’ve left it running as a dedicated Litecoin mining machine since then. It’s generated nearly a quarter of a cent worth of imaginary money in the past week.

This is a Touchpad with the stock kernel at 1.2 GHz:

[2013-09-09 01:37:27] thread 0: 43849 hashes, 0.74 khash/s
[2013-09-09 01:37:46] thread 1: 46406 hashes, 0.77 khash/s
[2013-09-09 01:38:28] thread 0: 44242 hashes, 0.74 khash/s
[2013-09-09 01:38:46] thread 1: 46395 hashes, 0.77 khash/s
[2013-09-09 01:41:33] thread 1: 23011 hashes, 0.38 khash/s
[2013-09-09 01:41:39] thread 0: 25365 hashes, 0.38 khash/s

The drop to half rate is because the CPU is throttled to half speed when the device goes idle. I’ve heard that you can overclock a Touchpad, but have never looked into it because it’s been fast enough for me.

Here’s a blog post that details how to tweak your Touchpad for performance:

http://jasonnash.com/2011/09/05/tweaking-that-new-hp-touchpad-you-just-got/

This is the Touchpad with the stock webOS Internals “uberkernel” (no settings changed):

[2013-09-09 03:23:58] thread 0: 13388 hashes, 0.30 khash/s
[2013-09-09 03:23:58] thread 1: 13363 hashes, 0.30 khash/s
[2013-09-09 03:25:27] thread 1: 18193 hashes, 0.20 khash/s
[2013-09-09 03:25:27] thread 0: 18232 hashes, 0.20 khash/s
[2013-09-09 03:26:00] thread 1: 12187 hashes, 0.37 khash/s
[2013-09-09 03:26:00] thread 0: 12208 hashes, 0.37 khash/s

That’s worrisome, shouldn’t it be faster? It seems that the stock install optimizes for power savings rather than speed.

With the UberKernel set to OnDemandTcl 1512 (1.512 GHz):

[2013-09-09 03:31:22] thread 1: 57473 hashes, 0.95 khash/s
[2013-09-09 03:31:23] thread 0: 50465 hashes, 0.87 khash/s
[2013-09-09 03:32:20] thread 1: 56374 hashes, 0.98 khash/s
[2013-09-09 03:32:20] thread 0: 51996 hashes, 0.91 khash/s

That’s right, 1.8 khash per second! Blazing fast! You may also notice that it’s bursting as high as 0.98 khash per core…

OK, here goes. I’m probably going to melt my pad, but 1 khash per CPU is within my reach. Could you imagine a 2 khash tablet? Dang, that’d be nosebleed-worthy.

[2013-09-09 03:45:44] thread 1: 67142 hashes, 1.11 khash/s
[2013-09-09 03:46:42] thread 0: 62675 hashes, 1.06 khash/s
[2013-09-09 03:46:43] thread 1: 66417 hashes, 1.11 khash/s
[2013-09-09 03:47:17] thread 0: 37319 hashes, 1.06 khash/s
[2013-09-09 03:47:17] accepted: 2/2 (100.00%), 2.17 khash/s (yay!!!)

Yay indeed. I did it! A kilohash per core per second! 2150 hashes! Victory!

I also tried mining Bitcoin with cpuminer on the HP Touchpad using SHA256 calculations, and the power was considerable there, too:

[2013-09-10 01:20:15] thread 0: 40506764 hashes, 762.24 khash/s
[2013-09-10 01:20:16] thread 1: 47714636 hashes, 789.13 khash/s
[2013-09-10 01:20:58] thread 1: 33848421 hashes, 800.30 khash/s
[2013-09-10 01:20:58] thread 0: 32404380 hashes, 759.41 khash/s

That’s right, more than a three quarters of a megahash! That’s a BTC generating /machine/.

I don’t think this is something I should try to sustain, though. The CPU made it as high as 32 degrees C, in a room that was 24 degrees C at the time.

I’m going to be rich! Wait, you mean I only earned a thousandth of a cent during this experiment? Oh well, there goes my dream of a Touchpad mining farm…. creating a penny worth of imaginary money for each dollar of electricity is something you probably can’t make up on volume.

Parallel Programming and Cryptocurrencies

Lately I’ve been spending a lot of brain cycles learning parallel programming tools and APIs. These are tools that let you write code to run on your video card (GPU) and/or multiple CPU cores at once. I’ve learned the basics of NVIDIA CUDA, OpenCL, OpenMP, and C++ AMP over the past few weeks. They’re neat things to know, but I’m not really sure what I’d use them for since most of the applications are scientific computing and math-intensive things and that’s not something I’ve ever really focused on.

One of the most useless things that GPUs are used for is mining bitcoins and litecoins. They’re a virtual currency that is created by using math to turn lots of electricity into coins that are worth anywhere from slightly less to a lot less than you paid for the electricity. This imaginary currency will gradually disappear as governments obliterate the exchanges that you can trade them on. They’re doing that because alternative currencies are a threat to them – they’re hard to tax, easy to launder, and undermine the authority of a central bank. These are all generally good things unless you’re a government. Bitcoins and litecoin wallets and exchanges are also frequently hacked/robbed, but nobody knows yet whether those thieving hackers are government-sponsored.

Now that I’ve made it clear that cryptocurrencies are dumb, one thing they are great for is exploring and learning about the capabilities of different hardware and parallel computing APIs. There are plenty of open source mining programs that use CUDA, OpenCL, or CPU-based hash calculations, and you can run a miner on almost anything. If you want to waste electricity, you’ve got options.

I have a wide range of hardware at home and have benchmarked quite a few things. Here are the speeds of various bits of hardware in Litecoin kilohashes per second:

460 hashes/sec – Asus EEE 701 PC with 630 MHz single-core Celeron processor.
1500 hashes/sec – HP Touchpad Tablet with 1.2 GHz dual-core ARM processor.
6200 hashes/sec – Compaq laptop with Core 2 Duo T8100 processor.
13650 hashes/sec – NVIDIA Geforce GT 610 512MB PCI video card.
27400 hashes/sec – NVIDIA Geforce GT 650M 2GB laptop video card.
37000 hashes/sec – AMD Phenom II 1100T six-core processor.
41000 hashes/sec – MSI laptop with i7-3920XM quad-core processor.
52000 hashes/sec – NVIDIA Geforce 640 1GB PCI-E video card.
NULL hashes/sec – ATI Radeon HD 6870 1GB PCI-E video card.

I don’t have much ATI graphics hardware, and for good reason, because one thing is still true – there is *ALWAYS* something broken in their drivers, and in the case of my 6870, OpenCL doesn’t work right on it, so it’s pretty much a brick for this experiment.

The most interesting bit was getting a litecoin miner running on my HP Touchpad. There is a miner daemon called “Pooler’s CPUMiner” that can be compiled for ARM. It almost compiled with the TouchPad SDK, but it required some adjustments to library settings and compile flags to get it to work. After a bit of tinkering I got it to run on the device at a blistering 1510 hashes per second. When the device’s screen is off the CPU runs at half speed, so with the screen off it gets 760 hashes per second. Because I know the masses will be clamoring for a TouchPad binary, I’ve posted it on Github: https://github.com/Xangis/cpuminer

This was an interesting experiment and I’ve managed to generate nearly 10 cents in imaginary money. It only took just over $1 of electricity to get there.

Stop Bothering Me About Updates

First there was Windows Update. Not a big deal, it only nagged once a week at most, and you could easily turn it off if it became too annoying.

Then Adobe Update. It’s a damn document viewer, why should it need to be updated if I’m having no trouble viewing documents?

Then Flash. Java. iTunes. Web browsers. Updates for Linux, for MacOS. Even my phone goes on and on about updating itself. Every asshole program seems to have a need to whine about updates. Look, I don’t care. I know that as soon as I install an update you’re just going to start bugging me about the next update. Shut up and update yourself if you feel you must, but don’t bother me about it. Blah blah security blah blah. I don’t care. Unless a program isn’t working right for me I neither need nor need to know about updates. I don’t care how insecure my text editor is. It’s for editing text. It’s not like I store bars of gold in the damn thing.

I do not need to be nagged about a thousand stupid little programs every time I start a computer (no matter the OS). Just shut up and go away.

WPF Is A Dealbreaker

I spent some time working on the client, only to find that the Windows Presentation Foundation doesn’t support right-click events.  That’s a deal-breaker because I need right-click support.  How could a GUI toolkit not support something so basic?

So, the wxWidgets-based client is being resurrected.  That’s good, because it was further along.  The big problem was that I couldn’t easily support scrollback with the SDL integration.  Well, since then I’ve figured out how I’d make that work.

In case you’ve forgotten or are not aware, THIS was how far along the wxWidgets-based Basternae client was last time we looked at it.

If It Ain’t Broke Don’t Upgrade It

I hate software “upgrades” and updates. They invariably break something that I didn’t want to be broken. I’ve learned the hard way time and time again that switching to a newer version of something is a bad idea if the new version hasn’t added a feature I desperately need.

So the rule here is:
If it ain’t broke don’t upgrade it.

… because something important *will* break.

A New Laptop

I’ve been meaning to get a laptop for a while.  One might say that I don’t need another laptop.  After all, I do have five already.

Of course, all five of these have bad hard drives.  The newest one is seven years old.  One has a blown motherboard.  One lacks a power supply.  One has a dead keyboard.

So maybe it’s time for a new one.

Newegg.com had a sale on one I couldn’t resist — a Gateway T-6345U Pentium T3400 2.16GHz dual core system with 2GB of RAM and 250 GB hard drive for $399 (normally $549).  Since it’s pretty much the same spec as an $800 machine I was considering, it was a no-brainer.  I’ve always thought you had to have no brains to buy Gateway, so in this case it was a done deal.

Believe it or not, the hardware doesn’t actually suck.  You get a lot for 400 bucks.

It shipped with Vista Home Premium.  Resizing the partition to make room for Ubuntu Linux was a bit of a pain — I couldn’t squeeze more than 110GB out of the Vista partiton in the resize, and that was with page files and snapshots turned off and a good solid defrag.  And, of course, after all that ridiculous junk that gets bundled with a new PC was removed.  Why do they even try to sell people Earthlink dialup?

After trying to install Ubuntu 8.04 and totally botching the partition job (it boots, but can’t login because home directories can’t exist — Whoops!), I’ve thrown in the towel on 8.04 and will be installing 9.04 after it finishes downloading (at a blazing 25kb a second — why do I have this 4 meg high-speed connection again?)

Eventually I’ll have the sucker set up for dual booting Vista and Ubuntu and not long after that, set up for developing Basternae 3 and all of the other web miscellany that I’ve been working on (Django, ASP.NET MVC, etc.)

Upgrading to Vista Ultimate

I hate updating software.  Many years of painful upgrade experiences have taught me not to upgrade a piece of software unless it’s horribly broken or lacks the ability to get anything done.

That’s why I was dreadfully, terribly afraid of upgrading from Windows XP to Vista on my home desktop.  Sure I’ve been running Vista since summer 2007 at work, but I don’t do much other than software development on my work PC.

Knowing full well that a clean install is the only safe way to go and that Windows always needs more RAM, I picked up a new hard drive and an extra gigabyte of RAM (memory sure is cheap these days!)  It also doesn’t help that I was running an original Windows XP Pro install from late 2001 (which has gone through half a dozen hardware upgrades on the same install).  It was tired and in need of a clean slate.

The install was remarkably, stunningly painless.  There were all sorts of things that just worked without the installer wizard having to ask me dumb questions.  It was so smooth — even to the point that it auto-capitalized the registration key while I was typing so I didn’t have to worry about whether I had caps lock on.

I almost wish I had something bad to say, but nothing went wrong and everything worked.  This is nothing like setting up an NT 4.0 system, which had a way of running differently every time you installed it on the exact same hardware configuration.

The folks who fear Vista, think it’s broken or too evil to use:  They’re idiots.  It works, and it works better than any Microsoft OS yet.  If you have the hardware to run it you probably ought to.  Now that it’s SP1 and most software developers have worked out their compatibility glitches it’s mature enough to use regularly.

My only complaints:  Folder views defaulting to music (it’s a folder full of DLLs you idiot, show me the size, date, and version — not artist, album, and rating!); kind of annoying navigating in Windows Explorer (it’s an extra click or two to get where I’m going); the folks at Winamp still haven’t gotten their act together for Vista (crash, crash, crash!)