My HDDs with most uptime hours

I keep a few old HDDs around as scratch disks for installing random stuff. I realized a couple of them I’ve been using fairly regularly in my Mac Pro are pretty old, so took at look at the SMART stats (smartctl) to see how old they actually are, and what their stats and uptime actually are:

WD Caviar Blue 500GB – this drive came installed in my 2008 Mac Pro when I bought it used. I’ve no idea if it was an original disk in the machine or added later, but it’s still chugging along with no errors and over 3.7 years uptime:

32,830 uptime hours
0 read error rate
SMART health: PASSED

Hitachi Deskstar 3.5″ 7200rpm P7K500 250GB – I have 2 of these disks that I used in a Linux server as a RAID1 pair when I used to self host my website from home. Still no errors and over 5 years uptime so far:  

45,082 uptime hours
0 read error rate
SMART health: PASSED

I understand that both of these are on borrowed time and I don’t use these for anything critical, but it’s interesting to see how long some disks last. On the other end of the spectrum I’ve also had several disks fail within a year, and one (a Quantum Fireball I think) failed within a couple of weeks, but it’s interesting to compare the lifetimes and failures from a number of disks over time.

Learning Golang (part 1)

A few random notes from my initial attempts learning Golang.

Compile and run:

go run source.go

Build executable:

go build source.go

Structure:

//defines a module
package packagename

Package main defines a standalone executable:

package main

Import required packages:

import packagename

Semicolons are not required unless there’s more than one statement on a line

Functions:

func functionName() {
//code
{

Arguments passed to an app are accessible via the array os.Args. os.Args[0] contains the name of the app itself.

Ok, let’s try my first hello world in Eclipse with the Goclipse plugin installed:

import (
    "fmt"
)
func main(){   fmt.Println("hello!")
}

I get this error:

Ok, first lesson, a package is required, so added:

package main

Creating a Run As… config in Eclipse for my project and then attempting to Run again gave me this useful message:

Ok, so I moved my source into an app folder (/src/main) but this gave me additional errors. At this point I’ve errors about $GOPATH:

Looking through the Project properties, this dialog with this option adds the Project location into the required GOPATH:

Now my first app runs successfully!

Observations about common IT technologies in 1988-89

Sometime around 1988-1989 I did some part-time data entry work for an IT Recruitment Agency that my Dad worked for. Tucked away in some papers I found these two sheets listing a range of different programming languages and other in-demand software packages/systems at the time. From memory, I think this list was what I used to code each of the job applicants tech skills as they were entered into their recruitment CV/resume database.

List of programming languages and related products tracked as CV skills used by a recruitment agency, around 1988-1989

There’s many things interesting about this list from 30 years ago. The first that caught my attention is how many of the tech skills on this list are no longer in use today, and some I’ve never even heard of since.

The second point that’s interesting is how many technologies and languages we commonly use today are not even on this list, meaning they were developed and introduced at some point after 1989. Every web technology in common use today was introduced after this point – HTML, CSS, JavaScript and any of the various popular JavaScript libraries, all introduced at some point after 1989.

Even other popular languages and frameworks/platforms, Visual Basic, Java, .NET, Ruby, PHP … all introduced after 1989.

This reinforces the fact that commonly used IT technologies come and go pretty quick, and what’s common today can easily be replaced with something else tomorrow. If you’re planning to stay in IT for the long run (longer than a few years), be prepared to keep your skills up to date, stay flexible and adapt to change.

Installing RabbitMQ rpm on RHEL 5.11

Rough notes for installing RabbitMQ on RHEL5.11.

Install the EPEL repo (not sure if this is needed for the RPM install or not):

curl -O http://archives.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
yum update

Install the erlang dependency (from answer here):

wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
yum install erlang

Download the noarch version of RabbitMQ:

wget -O http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.1/rabbitmq-server-3.1.1-1.noarch.rpm

Note on my initial install of RHEL 5.11 I could’t wget or curl to any https based sites, as I’d get SSL connection/certificate errors. I downloaded the rpm on another machine and scp’d it up to my server.

Install the rpm:

rpm -i rabbitmq-server-3.1.1-1.noarch.rpm

Enable the admin console:

rabbitmq-plugins enable rabbitmq_management

Delete the default guest user:

rabbitmqctl delete_user guest

Create a new admin user and add to the admin group:

rabbitmqctl add_user newuserid password
rabbitmqctl set_user_tags admin administrator

Start/stop/restart the server:

/sbin/service rabbitmq-server start
/sbin/service rabbitmq-server stop
/sbin/service rabbitmq-server restart

Additional notes:

I tried the generic Linux version wouldn’t start up for me, it gave this error, so found a working RPM above instead:

{"init terminating in do_boot",{undef,[{rabbit_prelaunch,start,[]},{init,start_it,1},{init,start_em,1}]}}
init terminating in do_boot ()