Andrew Aitken - Blog

Suzuki Violin Book One

I realise this isn’t computer related, but I figured I might be inclined to blog more if I didn’t just limit it to programming subjects.

I bought a violin about 2 years ago and found a local teacher to get lessons once a week. Since then, my teacher moved to Sweden to have a baby but we continued the lessons on Skype after she had had the baby. From the very begginning I’ve been working my way through the Suzuki Violin Book 1 and more recently, the ABRSM Grade 1 Book.

I’ve finally reached the last song in the Suzuki book, Gavotte (that’s not me), which is going well and I am really happy I have reached the level I am at. I do have a tendency to get bored of things and give up, but I think having a teacher with weekly lessons and hearing my self play more complex peices has kept me going.

I’ve also decided to do the ABRSM level 1 exam, so I have been learning the songs in that book too. My exam is in the process of being booked and should be before the end of March!

I have been thinking about upgrading my bow & violin, but the prices goes up quite steeply from beginner. I would like to go to the violin shop and try a couple of better ones, but I don’t know if I’m good enough to notice a difference and I’m slightly worried I would notice a difference and end up wanting to buy it there and then.

Read more →

Getting parts of a Uri

One thing that keeps coming up, but not enough for me to actually remember what I learnt last time, is how to get different parts of a request Uri

So I made a little console app that outputs the different parts from two example Uris.

Behold

Uri Properties:

Using          : https://www.example.com/folder/page.aspx?query=1&sample=2#anchor
AbsolutePath   : /folder/page.aspx
AbsoluteUri    : https://www.example.com/folder/page.aspx?query=1&sample=2#anchor
Authority      : www.example.com
DnsSafeHost    : www.example.com
Fragment       : #anchor
Host           : www.example.com
HostNameType   : Dns
IsAbsoluteUri  : True
IsDefaultPort  : True
IsFile         : False
IsLoopback     : False
IsUnc          : False
LocalPath      : /folder/page.aspx
OriginalString : https://www.example.com/folder/page.aspx?query=1&sample=2#anchor
PathAndQuery   : /folder/page.aspx?query=1&sample=2
Port           : 443
Query          : ?query=1&sample=2
Scheme         : https
Segments       : /, folder/, page.aspx
UserEscaped    : False
UserInfo       :

Using          : http://www.example.com/folder
AbsolutePath   : /folder
AbsoluteUri    : http://www.example.com/folder
Authority      : www.example.com
DnsSafeHost    : www.example.com
Fragment       :
Host           : www.example.com
HostNameType   : Dns
IsAbsoluteUri  : True
IsDefaultPort  : True
IsFile         : False
IsLoopback     : False
IsUnc          : False
LocalPath      : /folder
OriginalString : http://www.example.com/folder
PathAndQuery   : /folder
Port           : 80
Query          :
Scheme         : http
Segments       : /, folder
UserEscaped    : False
UserInfo       :

Uri.GetLeftPart(UriPartial part)

Using                : https://www.example.com/folder/page.aspx?query=1&sample=2#anchor
UriPartial.Authority : https://www.example.com
UriPartial.Path      : https://www.example.com/folder/page.aspx
UriPartial.Query     : https://www.example.com/folder/page.aspx?query=1&sample=2
UriPartial.Scheme    : https://

Using                : http://www.example.com/folder
UriPartial.Authority : http://www.example.com
UriPartial.Path      : http://www.example.com/folder
UriPartial.Query     : http://www.example.com/folder
UriPartial.Scheme    : http://
Read more →

Warning - ExtensionAttribute is defined in multiple assemblies

I’ve noticed a warning in Visual Studio in a few projects where it gives me the following warning after building,

The predefined type "System.Runtime.CompilerServices.ExtensionAttribute" is defined in multiple assemblies in the global alias

I don’t like leaving warnings in my build but I didn’t have time to look into it until today. This handy tip from Remco te Wierik led me to the root of the issue. The .net Lucene contrib nuget package contains a reference Lucene.Net.FastVectorHighlighter which defines an ExtensionAttribute class in the System.Runtime.CompilerServices namespace.

Updating the assembly reference alias from “global” to a custom one, fixed the warning.

Read more →

Shooting Film

I’ve been interested in photography ever since I found my Dad’s old Praktica SLR. I was quite young at the time and would spend ages playing with it, turning the dials and noticing the shutter staying open that little bit longer. I didn’t have a clue what it all meant, but that just made it all the more fascinating.

It was almost 20 years later when a friend at work brought in his Canon DSLR. That sparked the interest again and I finally got my own DSLR, a Canon 500D. I played around with it for a while before realising I still had a lot to learn. I practiced using my camera in manual mode, learnt how the histogram worked and read some books on composition. But I still felt like I could do better.

Somewhere along the line I found out about fully manual, mechanical SLR cameras from the 80’s and 90’s. I decided to get one to force myself to work in manual mode and I ended up getting a Pentax MX with a 50mm f1.7 lens. I also booked myself on a course, at a local gallery Street Level Photo works, where I learned how to develop black and white film and make my own prints using an enlarger.

Pentax MX The Pentax MX - By Kinnerton - Wikimedia

The Pentax MX has a built in light meter to help get your exposure right, but it’s up to you to change the shutter speed and aperture (ISO isn’t a variable once you’ve put the film in the camera).

Hope Street, Glasgow Hope Street, Glasgow - Pentax MX - Ilford HP5 Plus 400

The first thing I noticed was the 50mm lens was much wider than the 50mm on my DSLR. The Canon 500D has a crop sensor which means you lose quite a bit of the frame compared to a normal 35mm camera. I loved being able to get more in the frame at a natural focal length, it also meant I had to get much closer if I wanted to fill the frame.

If your photographs aren’t good enough, you’re not close enough. - Robert Capa

I got my first roll of film developed by Ilford and was really happy with some of the results. After that I went on the course at Street Level and learned to develop the film myself. Working in a darkroom is strangely relaxing, it’s usually really quiet and the time just flies past.

Drinking Drinking - Pentax MX - Ilford HP5 Plus 400

I loved using this camera, unfortunately the shutter now tends to stick at lower shutter speeds, even after a service from a local repair shop.

Not knowing what shots you have until you get them developed adds a little bit of excitement when you see the negatives for the first time. Obviously that’s not very good if you are trying to get an important shot, but when taking photos for fun, I found it helped me focus more on taking the shot and to try and make sure I got it right first time.

Shooting film is considered a bit of a hipster thing to do now, but I really enjoy the process and I think understanding where photography came from can really help you appreciate where it is now. That’s not to say I don’t use my digital camera anymore, it certainly has it’s advantages, but I enjoy having the choice.

Paris Mark during work trip to Paris - Canon 500D

Playing

When I got into film I discovered the “just for fun” side of photography, where goal wasn’t necessarily to take a great picture but to do it in a different or interesting way. My first venture into this was when I bought a Holga medium format camera and a Holga wide angle pinhole camera. The pinhole photos have an interesting look with their infinite depth of field and massive vignetting.

Pinhole View from my old flat - Holga 120 WPC

After a few rolls of medium format had been through my Holga, I modified it to take 35mm film. This has the cool effect of exposing the film sprocket holes and includes them in the photo. The focus through the cheap lens of the Holga 120 GN isn’t great, but that’s not the point.

Old Fountain Old fountain - Holga 120 GN - using 35mm film

Read more →

Deploying my blog with Travis

I was curious about having my blog deployed whenever I push a commit, so after a bit of googling I found this handy tutorial by Mathieu Leplatre.

There were a few differences, I am using the GitHub user pages, where he was using a project page, so my blog output needs to sit on the master branch and not gh-pages.

I’ll just show what I had to do differently, so here is my .travis.yml file. I had a few issues with it, but nothing YAML lint and Travis WebLint couldn’t sort out.

language: python
python: 2.7
env:
  global:
    secure: "my-encrypted-token (truncated for size)"
branches:
  only:
    - source
install:
  - "pip install -r requirements.txt"
script:
  - "make publish github"

And my modified Makefile

github: publish
    cp .travis.yml output/
    ghp-import -b master $(OUTPUTDIR)
    @git push -fq https://${GH_TOKEN}@github.com/$(TRAVIS_REPO_SLUG).git master > /dev/null

Key differences are the -b master parameter passed to ghp-import which tells it to update the master branch. I also copy my .travis.yml file to the output as it tells Travis only to build the source branch and I don’t want it trying to rake my html.

You can see it all on my GitHub page.

Read more →