Julian Kay

How I like to Study

stargazing

After taking a 4 year break from studying, I decided to ease myself in gently by studying a subject with which I was already fairly familiar. I opted to go for Galaxies, Stars and Planets, a short course with the Open University that has helped me formalise many of the concepts I have learned through being a member of The York Astronomical Society.

Location

My location of choice is the JB Morrell Library at the University of York. I’ve frequented the library since I worked at the Science Park in 2008. Back then, I was studying mathematics and I loved how studious the atmosphere was. Since then, the library has been refurbished making it even easier to get access to things like power sockets.

uni-library

I do actually have a favourite spot on the second floor which has a nice view and isn’t very far away from the toilets and recycling facilities. There is also a chilled water fountain nearby – but if water isn’t strong enough the Café is just downstairs. (Which is great for my Fitbit floors goal!)

The Morrell Library is located on the Heslington West campus. It is only a short walk to get to the largest plastic bottomed lake in Europe (fans of QI will understand the reference). I have found that it is a lovely place to walk around, and it gives me some exercise and fresh air when taking a break from studying.

bridge

Equipment

The course I’m currently studying centres around one key text book, which is supplied to me as part of the material sent by The Open University. It’s also available online in PDF and epub formats. The latter of which can be used (via conversion) with the Kindle.

large-scale-universe

My Kindle has been the main way I have read the study material while working on the course, and it’s obviously a lot easier to carry than the larger study book. I also keep a copy of the PDF versions on my Surface Pro 2 just in case I need to look at the diagrams in colour.

The Surface Pro is also great for the online elements, including watching videos provided by the Open University, which accompany the course.

einstein

I decided to use a Moleskine notebook to work through the activities and make notes. It actually ended up being larger than I needed, so I think the type of notebook I use will be something I look into changing, for the next course.

Because all the equipment I use is so small, everything fits in my Knomo bag without any problems. In previous years I had been carrying around a large backpack which contained more books, a larger computer and a calculator or two. Keeping things light and simple means I have less to carry with me when I study, helping make the whole experience more enjoyable.

dark-matter

Software and Services

When I started the course back in May, I set about doing a lot of the meta-work up front. This meant that I could just rely on these things moving forward.

  1. I downloaded all the images, videos, and other materials from the OU website and put them on my OneDrive, setting them to always be available offline on my Surface Pro
  2. I made a list of all the work that would be required in the study plan and put it all into OneNote as a task list
  3. I put the milestones and study dates for the whole course into my Outlook calendar
  4. I set up the Aladdin Sky Atlas software using IKVM.NET on my Surface, so that I didn’t need Java
  5. I converted the study book from epub into the Kindle format, and stored PDF versions for the Surface

When actually working on the activities and reading the material, I’ve also used Windows Calculator, Bing Wikipedia, Periodic Table and Star Chart. These applications have helped me do mathematics, look up further reading, and – very importantly – visualise the solar system using 3D graphics.

sun-diameter

hydrogen

The extra programs that the Surface Pro provided where not required for the course, but certainly helped.

Mindset

I decided that I only wanted to study at my study location, which means I go there once a week, every week and make no compromises about that. If a friend suggests doing something on one of these days, I’ve just had to be firm and say no.

surface-library

But doing it this way has really suited me, as it gets me away from a home full of distractions and into a productive environment with other people wanting to get things done. The motivation of wanting to progress my work has been enough to keep me going.

I may have found it a lot easier on this course because it’s a subject I already understand more than the average person, so I’ll be really interested to see how well I fare when I pick a new subject next year.

While I’m not ruling out taking time off again, I’m certainly planning to continue my mindset of life-long learning for the foreseeable future. I’m sure the way I like to study will only improve over time.

String Hashing in F#

I recently wrote a small program to convert some strings into a ‘unique enough‘ hash which could be used as a short reference.

Whenever I’m trying to come up with an idea of how to handle these kinds of functions, I tend to turn to my favourite language, F#. This allows me to do rapid prototyping in a very functional way.

Below is the prototype version of this hashing program:

open System
open System.Text
open System.Security.Cryptography

let encode (alpha:string, number:int) =

    let b = alpha.Length

    let rec enc (s:string, n:int) =
        match n with
        | x when x <= 0 -> s
        | _ -> enc (s + alpha.[n % b].ToString(), n / b)

    match number with
    | 0 -> alpha.[0].ToString()
    | _ -> enc ("", number)

let md5Int (input:string) =

    let clean (str:string) =
        str.ToLowerInvariant()
           .Trim()

    let computeHash (str:string) =
        let bytes = Encoding.Unicode.GetBytes(str)
        use crypto = new MD5CryptoServiceProvider()
        crypto.ComputeHash(bytes)

    let convert (bytes:byte[]) =
        let i = BitConverter.ToInt32(bytes, 0)
        Math.Abs(i)

    convert (computeHash (clean input))

let hash (input:string) =

    let a = "ABCDFGHJKLMNPQRSTVWXYZ0123456789"
    let i = md5Int input

    encode(a, i)

Once I have this program created, it’s very easy to use in F# Interactive like so:

> hash "Here is a test string!";;
val it : string = "1W2ALLB"
> hash "The hash is much smaller, which is great.";;
val it : string = "5DAF5T"
>

Full Moon in May 2014

Last night I went out with my Canon SLR to take some nice photos of the moon, but when I got out I discovered my battery was almost flat – and I didn’t manage to get a good shot. But to make up for it, here’s a picture taken with my Lumia 920.

Full Moon in May 2014

Watching Gravity on Xbox Video

I don’t own any movies on DVD or Blu-ray. None at all. I gave up on DVD at the same time I stopped buying CDs, and I have never been interested in getting myself a Blu-ray player for movies either.

Most of the movies I watch are on Netflix, but once in a while a new movie comes along that I want to watch as soon as I can. In previous years there weren’t any decent (legal) ways to do this, but these days there are a number of options for getting movies online.

As a happy user of Xbox Music, I thought I’d give Xbox Video a try.

Xbox Video

Xbox Video is a streaming video service that lets you either rent or purchase movies, and watch them directly on your Xbox, Windows device or in a web browser.

The only video I’ve purchased on Xbox Video previously was Mean Girls – but that’s a 10 year old movie and didn’t include any of the fancy extras you get with SmartGlass.

When Gravity became available I purchased the HD version for £14.99. Because it’s purchased, rather than rented, I can watch it as many times as I want, including the SmartGlass extras.

Gravity

In Gravity, Dr. Ryan Stone is a mission specialist on a Space Shuttle mission to Hubble, when an accident causes the rest of the crew to perish.

In a slightly unrealistic-but-more-realistic-than-most-movies turn of events she finds herself at the International Space Station, then to a Chinese Space Station in an attempt to get back home.

SmartGlass on Windows Phone

Through Xbox SmartGlass you get access to special content – which I believe is also included on the Blu-ray release. I have the option of accessing the extras through either my Windows Phone, or my Surface tablet. There are also apps available for both iOS and Android too, but I don’t have either of those devices.

My favourite part of the extra content was actually the video short, however I couldn’t get it to play full screen for some reason. Bit of a shame.

Xbox SmartGlass

In “Aningaaq”, we see the other end of the radio conversation that Stone has while in the Russian space craft. Aninqaaq, a fisherman in Greenland, is also dealing with death in his own way. This time we are provided with a translation for his side of the conversation, which is a great little extra to the movie.

Overall the Xbox SmartGlass experience was good, and more interesting when I watched the movie for the second time. I don’t think I’ve ever purchased a movie specifically for the extras before, and I’m not going to start – but it’s a good little bonus.

Gravity

Running JAR applications on Windows without installing the Java Virtual Machine

As part of my Open University course, I’m required to use a piece of open source software called Aladin Sky Atlas. This is maintained by Centre de données astronomiques de Strasbourg.

The program itself is actually pretty cool – it’s an interactive sky atlas, which allows you to view astronomical images along with information from the SIMBAD database and other sources.

The only problem with this program is that it uses Java, something I tend to avoid whenever possible. Installing Java on my Surface Pro 2 would mean I’d have more critical patches to install than I already do, and would open me up to a whole new attack vector. It’s not something I’d want to run on a tablet computer either.

(ノಠ益ಠ)ノ “Eww, Java!”

I originally tried using Hyper-V with a virtual machine running CentOS. This is a nice clean way of having ‘nothing running’ until it’s actually needed, but it’s quite an overhead to run a whole Linux operating system just to host a single app. Especially when battery life is a concern.

When searching around for a solution, I stumbled upon a really cool project that I’d never seen before. The IKVM.NET project includes a number of components for Java & .NET interoperability, but for this task I’m mostly interested in the Java Virtual Machine implementation.

By downloading the Windows binary of IKVM.NET, I’ve been able to run the application on my Windows 8.1 machine without requiring the JVM (or any other software) to be installed at all. This is a pretty fantastic achievement.

First I put the binaries into my apps folder (similar to my Vim setup), then I set up an alias to the executable using PowerShell.

# There's usually much more than this in my profile!
$SCRIPTSPATH  =  "C:\Users\Julian\Scripts"

Set-Alias ikvm   "$SCRIPTSPATH\Apps\ikvm\ikvm.exe"
Set-Alias ikvmc  "$SCRIPTSPATH\Apps\ikvm\ikvmc.exe"

# ikvmc.exe is cool too! have a look

After creating an alias in PowerShell I can just run it whenever I need.

PS> ikvm -jar aladin.jar

Obviously you could always set up a Windows Shortcut that does a similar thing, but that’s boring. Using PowerShell really suites me, as I often run applications this way.

Aladin Sky Atlas running on Windows without Java installed

The software doesn’t exactly look pretty, but these open source projects rarely do. Sometimes it looks like text hasn’t rendered as expected, but overall I’m really impressed.

If you’re looking to run JAR applications on Windows, without the Java Virtual Machine, then have a look at The IKVM.NET – it might work for your apps too.

Using Windows Reading List

When Windows 8.1 came out it included an application called Windows Reading List, which used the Share functionality of Windows to bookmark articles which can be read later.

Any application that shares the right kind of information can be used with Reading List, but the applications I use most often are Internet Explorer, Flipboard and the Bing applications.

Reading List

When you share an article to Reading List it asks you which category to use. I have set myself up with categories for software development resources, health and fitness information and general inspiration for life and work.

Adding articles on either Windows or Windows Phone will use your Microsoft account to synchronise automatically. This is completely seamless in both applications – meaning there are no options to configure these settings at all. I’m quite happy with this, but I know that some power users would prefer the option to choose how the information is synchronised with their computers.

Reading List and Internet Explorer in Reading Mode

When you use the application on Windows, clicking on one of the articles will open up another window next to the snapped reading list. I love this feature, and it really goes to show the strengths of multitasking with the modern interface in Windows.

Doing the same on the phone just opens Internet Explorer, the related application, or prompts you to search the store if you pick something that is incompatible. For example the Bing Wikipedia app isn’t currently available on Windows Phone, so clicking articles from this app prompt you to search the store.

Reading List for Windows Phone

The addition of the Windows Phone version of this application has really increased its use for me, however it’s obvious uses are diminished when used with older versions of Windows.

At work I use Windows 7 for my development machine, and there’s no way I can share interesting links found here with my Reading List. While I’m not expecting Microsoft to create a desktop app, a simple bookmarklet or browser extension would certainly do the job for collecting new articles to be read later.

Hi, Cortana!

Cortana in Halo

More personality than Google Now and more personal than Siri. Cortana is Microsoft’s personal assistant, providing a natural language interface to Windows Phone 8.1. Even though Cortana is not available in the UK yet, I switched my regional settings to US to enable her.

If you don’t know already, Cortana takes her name from the AI computer in the Halo series of video games, published by Microsoft Studios for the Xbox. In the Halo universe, she assists Master Chief throughout their adventures – getting emotionally attached along the way.

Hi, Jules!

Today’s Cortana shares the same name, voice and some of the attitude, though the primary focus is for her to be a loyal employee. The development team went out and interviewed real personal assistants – the ones who look after calendars and communications for business executives. The aim was to build a personal assistant who is able to anticipate the needs of their boss – the user – before they know what they need.

Cortana Tile Animation

While Cortana doesn’t share the same visual appearance of her namesake, the abstract appearance is probably one of the smartest moves the development team could have made. Using animations to give emotion, Cortana will look pleased to see you when you load her up, as well as looking thoughtful when processing requests. It’s my understanding this will be expanded and improved upon as time goes on, allowing her to look sad when your favourite sports team has just lost a match.

“remind me to go running when I get home”

The speech recognition is really good, though you don’t have to speak to her every time you want her to do something. You can type in an instruction in the same way you would speak it “remind me to go running when I get home” and she’ll silently confirm that she understood your intentions. This is a great feature, and I can see a lot of potential for this text based interaction. If I can switch to Cortana while writing code and just type a request without taking my hands off the keyboard – I’d be very happy. (PowerShell module anyone?)

Go running when you get home

Reminders through Cortana are very powerful for me in many ways. I use my Office 365 calendar all the time – and Cortana can interact with that by creating and managing appointments, but she can also create what I like to call ‘disposable reminders’ which are essentially one-off reminders that are based on time or location.

The places Cortana knows are powered by the Bing Maps service, something I’ve already been using for years. From day-one I had the benefit of Cortana already knowing about the dozens of places around the world I’d previously marked as favourites.

Bing Maps for Windows 8.1

Cortana now lets me to go one step further by giving these places a nickname. This allows me to say things like “remind me to pick up eggs when I go to the shop” and she’ll know I mean my village shop.

If I want to be a little less specific, I can say “remind me to pick up eggs when I go to Tesco” and Cortana will ask me “which Tesco?” and I can reply “Any”. This is great for when you are traveling or staying away from home and just want to use any store. She’ll also tell you which one is closest, naturally.

Bing Maps for Windows Phone 8.1

Travel can also be tracked by Cortana, though I haven’t had the opportunity to try it yet. It’s my understanding that she can track flights as well as provide useful information like weather and currency exchange rates for your local destinations.

Cortana Diagram

Already I have gotten used to having Cortana around. For example, I often use my Surface in bed with a stylus. This lets me write down my thoughts in OneNote. When I’m using a pen like this in a full screen experience – I don’t want to switch the search app, bring up the on-screen keyboard, or type in a query to get results. I can just pick up my nearby phone and speak a query like “how large is mars” or “how old is Patrick Stewart”

Cortana Bing Search

Answers to queries like these are also powered by Bing – my search engine of choice. However she does get stumped at some things. For example, when I asked her the current phase of the moon, she didn’t know the answer.

Things will no doubt get better though, and I already think she’s become a valuable asset to me in the pursuit of getting things done, and being productive.

Hi, Cortana! I hope we can be friends.

Wacom Bamboo Stylus for Surface Pro

Wacom Bamboo

I have enjoyed using pen input for Windows since my first Tablet PC. Using a pen allows you to draw and make notes using ink, as well as be more precise with the cursor when required. Personally I find the pen that comes with the Surface Pro 2 to be quite agreeable… but I do know that people generally complain about a couple of points.

The first is that you clip the pen on the side where the charging port is – this is a bit like an after thought, but when space is a premium – it’s not a surprise.

The second is that it’s a bit light and plasticky for a £25 pen.

There’s not much you can do about the first one complaint, but the Bamboo Stylus Feel is a good alternative if you want to have a premium pen-like feel.

Wacom Bamboo

As the price of the Bamboo Stylus feel had come down to less than £10, so I thought I’d try it out. If didn’t like it, at least I’d have a spare!

I haven’t had a chance to use it very long yet, but already I can tell that it is well worth the money. The build quality is very high, and it feels a lot more premium than the Surface Pen. The weight is good, and the length is slightly longer than the Surface Pen when you place the cap on the end, or shorter when you put it away.

Wacom Bamboo

It feels great on the screen – slightly softer and less slippery than the Surface Pen. The accuracy is also really good – I had no issues using it right away with the default calibration on the Surface Pro 2, without installing any extra software.

The button on the side (which lets you right-click) is totally flush with the barrel, so it’s a little hard to find by touch alone. There also isn’t an eraser on the other end, a feature which I really enjoy on the Surface Pen.

It’s worth noting that the packaging stated that it was for the Samsung Galaxy 10.1, but it worked on the Surface Pro 2 without any problems. Be sure to check that the one you get includes the ‘Wacom feel IT‘ technology. There’s also a Carbon version – if you’re interested.

This is going to be the stylus I carry around in my bag with me, but when I’m doing art work, I’ll have both handy.

Pros

  • Cheaper than the Surface Pen
  • Higher quality than the Surface Pen
  • Feels great when writing on the screen

Cons

  • No eraser on the end
  • Button is flush with the barrel

Will Neovim rock on Windows?

Gvim on Windows 8

I have been using Vim on Windows since I switched to 64-bit and edit.com stopped working. Originally I just used the console version inside of PowerShell or the standard command line. In the last three years I’ve been favouring Gvim as my go-to text editor for smaller scripts and utilities.

I know for a fact I’m not using everything Gvim or Vim has to offer, but I’m quite happy with the way it works. For example, I have line numbers turned off, but I can turn them on very easily using a quick :set nu.

Very powerful, very fast.

There are some things I absolutely hate though. For starters, what’s this horrible border on the inside of the window, and how can I make it disappear without hacking the whole application and recompiling it? This isn’t Windows 95.

Ugly Border

I’ve looked for some time but I haven’t found a solution. But hey, I found out that people can make it look pretty on Ubuntu (handy!)

Enter Neovim

Neovim promises to be a refactoring (and reimagining) of the Vim text editor using more modern techniques. The plan is to have the core Vim functionality moved into a new library, which will allow the interfaces to be separated out in a modular way.

The thing that got me really interested? When they mentioned Windows:

Modern GUIs written in high-level programming languages that integrate better with the operating system. We can have GUIs written using C#/WPF on Windows or Ruby/Cocoa on OS X, for example.

True they’re not saying they will write a GUI using C# & WPF, but someone can. And I like the sound of that. Of course, it’ll be open source – and I’ll be able to edit the XAML to have no borders at all, if I like.

Also, here’s hoping we get better PowerShell integration out of this too.

It could be huge.

So, will Neovim rock on Windows? I sure hope so.

Mars and The Moon in April 2014

Star Chart

When I was looking at my Star Chart application last week, I noticed that on the evening of the 14th of April Mars would nice and close to the Moon in Virgo. I set myself a reminder walk up my closest hill and take some snaps.

The Moon and Mars

With almost-full Moon this bright you can’t get both celestial objects in the same shot without either Mars being too dark, or the Moon being be too bright. I don’t think it matters in this photo though, you can clearly see Mars, Theta Virginis and Spica through the trees.

I think it all looks rather nice.

Glow of the City

While I was up there waiting for it to get dark I took a few more photos. Above you can see the glow of Leeds in the evening sky, and below you can see Jupiter in Gemini.

Summer Sky

Later on in the evening, my American friends were able to enjoy a nice lunar eclipse. Here’s a lovely photograph taken by Jon Philpott through his telescope.

Lunar Eclipse by Jon Philpott