Throw off the dust covers!

Well it’s been a long time since I’ve been here.  After a quick update it all looks very shiny again.  What happened to 2013!?  Mostly full of work, friends, and reading in the ruins of Aberystwyth castle.

Since the last post in 2012, I have moved from Aberystwyth to Frome in Somerset.  I no longer work with ERTMS, or indeed on the railway at all, for the last month and a half I have been an employee at Ntegra where I have been working with one of their clients to configure many virtual machines running Red Hat Enterprise Linux.

All of the ERTMS stuff seemed quite secret, and so bespoke at the moment that few people would find the ins and outs interesting.  Now I’m back working with computers, I hope to post here more - mainly with things I’ve learnt so I have an easy place to come back to, but hopefully others will find such information useful.

How many railway sleepers are there in the UK?

A few of weeks ago, I was sitting in a local café with my good friend Adam Blackburn.  I can’t quite recall how we got onto the topic, but Adam turned to me and asked “How many sleepers are there in the UK?”, not being able to tell him, he decided it would be my ‘homework’.  We laughed about it a bit, and somewhat forgot about it, but I was left pondering.  A couple of weeks later, questioning a couple of people at work, and using my Google-fu I was able to give Adam an answer.

My first source was a colleague, a man who has been working on the railway for many years.  He had no idea when I asked him, but helpfully said that in one chain there were roughly 22-23 timber sleepers.  So, with there being 80 chains to one mile, all I multiplied 22.5 by 80, with the result of 1,800 sleepers per mile. My second source was the Office of Rail Regulation.  They publish a Current National Rail Trends yearbook (downloadable here).  During the period 2010-2011, it claimed that there was 15,777km of track open to both passenger and freight traffic, this equates to roughly 9,803 miles of track. Armed with these figures, I multiplied 9,803 miles by 1,800 sleepers per mile to give me an approximation of 17,645,400 sleepers on open railway in the UK. I presented my findings to the surprised but seemingly impressed Adam last Thursday, stressing that it is only an approximation, it doesn’t cover sidings, depots, etc. it also assumes that all terrain is the same, that all the sleepers are made of the same material, and that they have all been installed 100% accurately.

A surprising fun research exercise, it was good to get Googling for answers to seemingly impossible questions!

Looking forward at iOS hardware

Over the last five years the iPhone has gone through numerous designs, both physical design and hardware design.  Here is a quick look at the specs of each iDevice (Note that the iPhone CPUs are underclocked):

[table id=5 /]

So, what can we draw from that?  My guess is that we need to establish whether the iPad or the iPhone is Apple’s lead device.  Although the iPhone was launched first, it has recently been revealed that the iPad was conceived earlier.  Also, since the iPad launch in 2010, it has set the way for the hardware specs of the iPhone later that year.

I think with the launch of The New iPad we will see a New iPhone.  My estimation is that this years iPhone will drop numbering in the name and it’s specs will possibly be as follows:

[table id=6 /]

I think we’ll see a switch to the iPhone leading the hardware specs.  The last iPad/iPhone release was around seven months apart, making the tech inside the iPhone 4S roughly seven months old, if they flip the leader then that would make the iPad have five month old tech.  I would certainly be disappointed if The New iPhone gets an Apple A5X chip. So what other fun things might be included in The New iPhone?  Contactless communications?  I’m not sure we’ll contactless payments, but something like programmable RFID might be an interesting partner to iOS 6s Passbook feature.  Perhaps enhanced position hardware for mapping features?  Who knows…

So, when could we see this new iPhone?

[table id=7 /]

NOTE: This post was originally written in late July.  This is being published before the Apple Special Event today (12/09/12) where it is widely rumoured that the New iPhone will be launched.

Looking forward at Mac hardware

Last month at WWDC, Apple announced a new MacBook: The MacBook Pro with Retina display.  Specs can be found in my WWDC 2012 post or on the Apple Specs page.  But what could we broadly expect Apple’s behaviour on future Mac hardware design to be?

Until recently, Apple’s portable range have been mostly like other laptops.  Open them up by unscrewing screws and unclipping plastic clips.  Inside you’d find the battery, hard drive, optical drive, and logic board.  You could reasonably identify the CPU and RAM too.  This is true of the old PowerBooks and iBooks, as well as the white MacBooks and MacBook Pros. Apple’s desktop range was similar.  The Power Mac/Mac Pro are tower computers where you can see everything that most other computers have.  Even the Mac Mini looks familiar inside.

Nowadays Apple hardware is somewhat different.  Trying to get inside it is the first hurdle.  I guess it really started with the iPod, a device that was not a computer, merely an MP3 player.  The most obvious first example, though, was the MacBook Air. The Air has its RAM modules soldered onto the logic board, the battery is non-replaceable, it lacks an optical drive and many ports.  If you can get it open, the inside is quite alien, with the battery modules taking up a fair chunk of the machine.  The flash modules for storage aren’t in a conventional chassis, and the RAM modules could easily be missed amongst the other chips scattered about the logic board.  There is a lack of an optical drive and it is sparsely populated with ports. Looking at the new “The next generation MacBook Pro”, dubbed the Retina MacBook Pro,  Apple has acted using the same, integrated approach.  Everything that needs to be there is there, somewhere!

From its creation, the iMac has been an unconventional form factor (though you can definitely see the roots from the original Macintosh).  The current iMac squeezes an awful lot of power into a beautifully thin box.  Access to the RAM modules is through a small hatch in the bottom, access to the rest of the machine is through the screen which is fastened to the case using ultra strong magnets!  That said, once you are inside you can spy the optical drive, the hard drive, RAM modules, and so on.  The same is true of the Mac Mini.

I believe Apple are moving away from making computers, they have never liked too much hardware variation (not compared to the Windows market).  Apple want to create appliances.  Think about it, most people don’t mod your washing machine to go faster, or your oven to cook hotter, or attach LEDs to the inside of a fridge to make it look cool(er), these appliances are not usually maintained or repaired by their users, a person competent in the appliance will come and look at it.  Computers are similar, many people don’t mod them, many people require a helping hand to maintain and repair them.  Apple is catering for these people.  The people who don’t want to be bothered by hardware, who only care about how long their apps will run on the kit.  These are the people who buy Apple gear.

With that in mind, I expect that the Mac Mini, and probably the iMac will follow suit.  The MacMini will lose the swivel base and user upgradable RAM.  The hard drive will become flash storage which will be soldered onto the logic board for space saving reasons.  The same thing could happen with the iMac. While this would severely reduce user customisation, if Apple pitch upgrades at the right price, I don’t think it will be an issue.  People have lapped up the MacBook Air, and people will do the same with the new Retina MacBook Pro.

Moved!

Hello!  We’ve moved to the right a little…

The blog used to be at blog.hashbang0.com but because I got fed up with the hashbang0.com design and upkeep, WordPress will now be powering the main site.  Hopefully I’ve done everything right…There has already been a couple of hairy points, I’ve learnt that my backup script is broken, for example…

Has the transition to Intel gone "seamlessly"?

At WWDC 2006, Steve Jobs said the following about porting OS X to the Intel architecture > “Porting an operating system to an entirely different processer architecture is no easy task and our software team did a magnificent job of taking this on the PowerPC and turning it into this on Intel architecture.  So they made it look really easy and it’s gone seamlessly which has enabled this amazing transition to occur in 210 days, but under the hood and you all know, this was 86,000,000 lines of source code that was ported to run on an entirely different  architecture with zero hiccups.” But has the transition really gone that well?  I suppose at the time it had, but almost six years on what can be said?  Let’s take a quick look at the history of OS X on Intel.

At WWDC 2005 Jobs told us that each release of OS X had been compiled for the Intel architecture, he even had an iMac running Tiger on an Intel Pentium 4.

Tiger became publicly available for Intel Macs in January 2006 with the release of the MacBook Pro and the first Intel iMacs. Tiger on the PowerPC (PPC) supported the Classic environment, which ran apps designed for OS 9 and also included the Motorola 68K emulator.  So Tiger on PPC supported apps which were ages old. On Intel, Tiger supported Rosetta, a translator allowing PPC apps to run on Intel Macs. Tiger supported PPC Macs from the G3 to the G5, machines that were around 7 years old as of 2006.

Leopard supported G4 and G5 Macs (above 867MHz) and Intel Macs.  Leopard lost support for the Classic environment on PPC apps, losing support for a plethora of apps created over a number of years.

Snow Leopard stopped support for the PowerPC but still had Rosetta built in, most PPC apps still worked, though a few had some oddities.

In 2011 Apple released Lion.  Lion dropped support for 32-bit Intel Macs and no longer included Rosetta.  All of the PPC apps that hadn’t been ported to Intel were lost.

Any app whose developer has abandoned it on some download site may well never run again…

So, while I am sitting here now on my 2011 iMac running the latest developer build of Mountain Lion, I can say that I am still running OS X.  Many of the OS X features still exist.  Apps classically available to OS X can also be run.  But what about other apps, such as Adobe Freehand, have been left in the cold, not being able to be run on modern Macs.

Apple have been ruthless in the past;  stripping away the original Mac OS codebase for one based on NeXTSTEP, swapping the floppy drive for a CD/DVD writer, getting rid of the optical drive altogether. But all through these changes they have kept the ability to run old software, tools that people use everyday.  With the transition to Intel, Apple threw away so much, and what they kept seems to have been too much to maintain.

Out with the old and in with the new.  It doesn’t really affect me, I occasionally come across a PowerPC only app, but nothing show stopping.  It does go to show how ruthless Apple can be, with everything, even software.

Bootnote: This is an old post that I’ve tidied up a bit, the thread was somewhat lost in the time between when I first thought of it and now.

WWDC 2012

Late as always, Apple’s 23rd WWDC kicked off almost a month ago after selling out in just 1h43m!  This years event kicked off with Siri warming up the crown and GarageBand on an iPad  playing a sting after each joke. Apple touted some interesting facts about the App Store

  • 400+ million accounts
  • 650,000+ apps
  • 225,000+ iPad specific apps
  • 30+ billion app downloads
  • $5+ billion handed out to developers We were then launched into the Mac half of the event…

 MacBook Air

Keeping the same design as the last generation, the new Air gets updated CPU, RAM and graphics, better IO to the SSD, and USB 3.

[table id=2 /]

It should be noted that whereas some manufactures are installing separate USB2 and USB3 ports, Apple has integrated the two into one physical port.

MacBook Pro

****The ‘Pro has similar updates as the Air.

[table id=3 /]

The New MacBook Pro

The New MacBook Pro shows us the direction that Apple are going to take with its products.  It’s just as much about what is has as what it hasn’t… Dubbed The MacBook Pro with Retina Display, this beauty has a 2880x1800 display, at normal viewing distances the naked eye cannot distinguish one pixel from another.

This ‘Pro doesn’t have an optical drive, or a spinning hard drive.  It has soldered RAM modules.  There isn’t a FireWire or Ethernet port… Its biggest asset is the Retina display, but it also boasts a new thinner design, just a little thicker than the Air.  It has a newly designed thermal system too, bringing air through gills in the side of the laptop using asymmetrical finned fans to reduce perceived noise levels.

The Retina display packs a whopping 5,184,000 pixels onto the 15.4” screen.  It has more pixels than an HD TV.  There are so many pixels that the preview window in Final Cut Pro displays HD video!

[table id=4 /]

OS X Mountain Lion

Apple also announced Mountain Lion, the eighth major release of OS X.  The company was quick to note that in nine months 40% of OS X users are currently running OS X Lion, Windows 7 has achieved the same percentage in 26 months.  They also announced 66m OS X users, triple that of five years ago!

Mountain Lion is packed with over 200 new features of which Apple demoed eight.

  • iCloud

    • 125m users since October 2011
    • Fully integrated with Mountain Lion
    • Several apps use iCloud:

    • Messages

    • Reminders

    • Notes

    • Plus many more

    • Documents in the Cloud for OS X and iOS - Edit on one device and see live updates on the other!

  • Notification Centre

    • Banners for quick notifications
    • Alerts for important notifications
    • Do Not Disturb switch for when you dont want to be disturbed

    • Automagically set when giving a presentation!

  • Dictation

    • Talk to type
    • Siri-like interface
    • Works in any text area - MS Word, Wordpress, Facebook, etc.
  • Systemwide sharing

    • Much like the iOS “Share to…” integration
  • Safari

    • Currently featuring the fastest JavaScript engine
    • Chrome-like unified search/URL field
    • iCloud tabs - Tabs across multiple devices
  • Power Nap

    • Keeps your MacBook (Air/Pro) up to date while it sleeps
    • Up-to-date iCloud
    • Time Machine backups
  • AirPlay Mirroring to Apple TV!

  • Game Centre Mountain Lion boasts 1,700 new APIs for developers to use.  It will be available via the Mac App Store in July for just £13.99 and will upgrade all of your, compatible, personal Macs running Snow Leopard or Lion.

iOS 6

Apple’s last announcement was iOS 6.  iOS is currently running on over 365m devices, and 80% of those devices are running the latest release (iOS 5).  Apple took a jibe at Android where is noted that only around 7% of its install base is running the latest version.  Apple also gave us a quick insight into some push notification stats, on average Apple pushes 7b notifications a day! And by WWDC had pushed over 1.5 trillion notifications to iOS devices!

Packed with over 200 new features, Apple demoed just a few.

  • Siri

    • Eight months old
    • Learning new skills

    • Sports (e.g. player cards)

    • Restaurants (e.g. ratings)

    • Movies (e.g. reviews)

    • Launch apps!

    • ‘Eyes Free’

    • Working with a number of car manufacturers

    • Single button to interact with Siri on steering wheel

    • No need to take eyes off the road

    • Even more languages

    • Worldwide local search

    • Available on the New iPad

  • Facebook integration - e.g. ‘like’ stuff on App Store

  • If you get a call at an inconvenient time, e.g. a meeting, you can now slide up the lock screen to send a predefined SMS (e.g. “I’ll call back soon”), you can also set a reminder  so that when you leave the area you are currently situated your iPhone will remind you to call the person back.

  • Do Not Disturb (same as OS X)

    • Filter what calls come through

    • Repeated calls from non-approved numbers will come through as it may be an emergency.

  • FaceTime

    • Current WiFi only restriction to be lifted
    • Unified Apple ID and phone number (to better integrate FaceTime for Mac, iPhone, iPod, iPad)
  • Mobile Safari

    • iCloud tabs - start where you left off when you left your desk
    • Offline reading list
    • Easy photo uploading
    • ‘Smart Apps’

    • If you are on a company website that also has an iOS app, a notification will slide down with a link to the App Store.

    • If you install the app then the website owner can pass the app data so the app can start up with the same information you were looking at on the website

    • Fullscreen mode in landscape

  • PhotoStream

    • Shared streams

    • Choose photos and friends to create a stream album

    • Allows commenting

    • Available in iPhoto, Aperture, website, AppleTV

  • Mail

    • VIP inbox for urgent mail
    • Flagged messages inbox
    • Insert photos and videos from Mail!
    • Open password protected (some) documents
    • Pull to refresh
  • Passbook

    • Think of all the passes you might have

    • Airport boarding pass

    • Movie tickets

    • Store cards

    • Electronic versions in one place

    • Location based notifications

    • Place pass on the lock screen for easy access

    • Updatable

    • Update the balance on a store card

    • Update the gate number on a boarding pass

  • Guided Access

    • Fine grained parental controls
    • Disable controls in any app
    • Single app mode

    • Exams

    • Guided tours (do they already use this in the Apple Stores!?)

    • Menus in swanky cafés?

  • Maps

    • Local search
    • Traffic news
    • Turn-by-turn navigation

    • Powered by TomTom

    • Active on the lock screen

    • Siri integrated

    • Fly Over 3D model view

And many APIs for developers to get their hands on. iOS 6 will be available on the iPhone 3GS and higher, the iPad 2 and higher, and the fourth generation iPod Touch.

That summed up WWDC 2012.  Time Cook came to the stage to wish everyone a great week and closed the keynote.

Receive iMessages on multiple devices

If you have an iPhone and an iPad or a Mac running Messages.app you may have noticed that messages don’t seem to appear across devices, or that you have multiple conversations for someone.

Think of email, you have one email address (e.g. anon@hashbang0.com) and if someone emails that address, you can receive the email on multiple devices (e.g. iPhone, iPad, and Mac) so long as you’ve registered that email address with the device. iMessages are the same.  You can add email addresses to iMessages and when someone sends an iMessage to that email address, you’ll see it on every device it’s registered to.

Setting this up is really easy:

  1. Open Settings
  2. Tap Messages
  3. Scroll down and tap Receive At
  4. Tap Add Another Email
  5. Type new email address
  6. Verify the email address
  7. Off you go! Once you have verified the address you can send and receive iMessages form and to the email address and the phone number!

Adding Emoji (smilies) to the iPhone

Adding colourful emoticons (or smilies) to texts, emails, and messages can help to liven things up a bit.  Unfortunately the Emoji keyboard isn’t accessible by default, but this post will show you how to enable it!

  1. Open Settings
  2. Tap General
  3. Scroll down to Keyboard
  4. Inside Keyboard you will find the International Keyboards menu, where you can add more keyboards
  5. Tap Add New Keyboard
  6. Scroll down and tap on Emoji (the list is alphabetical)
  7. Close Settings and open Notes
  8. Create a new note
  9. Tap the ‘world’ key, between the 123 key and the space bar
  10. Enjoy the plethora of emoticons! There are five categories of emoticons, each having three to seven pages of emoji goodness!

Sandboxing

Back in 2010 I complete my dissertation.  The idea for my diss came to me while sitting in Starbucks in Camberley sometime during my time at Sun Microsystems, probably early 2009.  The idea was quickly jotted on the back of a Starbucks serviette.

Applications crash and can take down a system, if we could virtualise the application and separate it from the system then it couldn’t bring it down.  This was the subject of my diss and I mostly implemented it using OpenSolaris Zones.

The idea was more than that though, I thought that files should also be chopped up and placed into separate areas (at the time I was thinking separate ZFS file systems).  Separating files into types would mean that one could limit what information applications could get hold of (why would an image editor need access to word documents, for example?). Here’s an image to somewhat illustrate my point:

Now, back in 2010 I used the phrase “Virtual Application Environments”.  Today I feel quite silly, as everyone simply calls it “sandboxing”, Wikipedia has this to say about sandboxing: > a sandbox is a security mechanism for separating running programs. My diss somewhat successfully implemented sandboxed applications, but these apps had access to the whole of the current users home directory, so obviously didn’t implement the second part of the idea…

What is interesting is that this is sort of how the iPhone works, in so much as there are documents, photos, movies, music, and the user only really sees these through specific apps - so the Photo app doesn’t view documents, and the iTunes app doesn’t view photos, etc…And now a similar thing is happening on the MAc with the Mac App Store.

A short while after I had this idea in Starbucks, I began to think about how users could use a thin client (like a Sun Ray) and access sandboxed apps, running inside virtualised machines, running a variety of operating systems, all being able to access segregated file systems for different file types.

Let’s have a think about that.  A thin client connects to a main server, this server can then connect to other systems (virtual or otherwise) and run apps from those systems.  Apps on the remote systems are sandboxed for security and stability.  All the while the user thinks that they are using a regular computer.

Now I’m very excited!  OnLive have released a product called OnLive Desktop.  It allows you to access a MS Windows 7 instance from a tablet, right over the web.  So we begin to see this thin client (iPad) access a remote system (Win 7) to run apps.  All we need now is for the Win 7 instance to be able to run a multitude of Linux and OS X apps (by somehow forwarding the app from the Linux/Mac system to the Windows system (something like X11 forwarding)) and my idea would have become a reality!