Skip to main content

Posts

Problem installing AWS CLI

It never feels like a good start when you're trying to start out with something and the install fails with an obscure error! I was just trying to install the Amazon CLI following the instructions at https://aws.amazon.com/cli/ and ran into the following error when running 'pip install awscli': Collecting awscli Could not find a version that satisfies the requirement awscli (from versions: ) No matching distribution found for awscli I appeared to have a correct version of Python installed (v2.7) and checking "PIP -v" indicated that 9.0.1 was installed. That all seemed to tick the required boxes but digging around a little more I did see that some people had had issues with various versions of PIP so I found / ran the following to upgrade to the latest vesion: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py This installed v9.0.3 of PIP which burst into life when I re-ran 'pip install awscli' and everything seems to be ok. Like…
Recent posts

The 'Rewrite' vs the 'Refactor'

Sometimes you will come across a codebase / application that looks in such a mess or so old that the only option is to do a full rewrite. The code is horrible and out of date, it's using an old version of a language / framework and everyone has forgotten how it works. Everyone agrees, it will be much faster to just throw it away and start again.This seems to be how so many software projects start. Over my career I know that I've been heard to say those very things myself. It's seductive, we all love a nice green field project and the big rewrite is the easiest way to turn a boring, difficult brown field project into something everyone wants to work on.The hard truth is that I can only think of one (smallish) rewrite that I've worked on that could be classed as success and that company is no longer around (but I don't think the two things were related). More often than not, after we've finished the project (late, normally very late) our first thoughts are &…

Starting out with Kotlin and Android Architecture Components

Just recently I've been to a few talks about Kotlin and been reading up about Android Architectural Components. I've also had an idea for a really basic app playing around in my mind for a while, so it seems a perfect opportunity to kill two birds with one stone. I've already had a play with LiveData / ViewModel, updating the Big Nerd Ranch Quiz, which went really well.For this project I'm also going to look at using Room for the database access and Dagger for dependency injection. Should be interesting.

Humanitarian Toolbox Codeathon - 20th January 2018

Firstly, I'm a bit late to the party with my blog article, both Steve (the event organiser) and Dave / Dan (a couple of the attendees) have written great articles that can be found here:Steve GordonDave MateerDan ClarkeSo back to my story regarding the event. I first heard about the codeathon from Steve via the .NET South East Meetup, which he also organises. Steve's a prolific contributor to the HTBox Allready project and I'd been wanting to have a go since hearing him do a quick talk at a Brighton ALT.NET show and tell session. Having not contributed to any open source projects, I must admit that it all seemed a little overwhelming. Even looking through the open issue list on GitHub, it seemed hard to find a starting point.So one evening after signing up to the codeathon, armed with the install documentation, I started my Humanitarian Toolbox journey. I found these instructions really well written / easy to follow, I was up and running surprisingly quickly. I did run …

Coaching at Brighton Code Bar

Last week I finally got around to coaching at Brighton Code Bar, something I've been meaning to do for at least a year or so now (and apologies for taking so long).If, like me, you've been considering this but have worried about what you can contribute, then please just volunteer and don't worry. The sessions are really well organised and the students either looking for help with following the tutorials or feedback / advice with their own projects. The organisers make sure that every student is matched to a coach with relevant experience / confidence to be able to help. For my first session I was helping someone just starting out with Javascript, take a look at the Javascript first lesson. If that looks too scary there are usually students also looking for help starting out with HTML (this is the first HTML tutorial).Personally, I'm looking forward to helping out with a few more sessions (I've signed up to coach at the session this Tuesday) following the tuto…

iOS Dynamic Type

On iOS devices within accessibility section of general settings you can change the text size, making it (much) larger or smaller. I hadn't come across this before, but to get your application to work with the user's settings you use 'Dynamic Type'. These are "UIFontTextStyle" elements which will automatically size around the user's text size setting. The settings available and their relative sizes are:Large Title - 44ptTitle 1 - 38ptTitle 2 - 34ptTitle 3 - 31ptHeadline - 28ptBody - 28ptCallout - 26ptSubhead - 25ptFootnote - 23ptCaption 1 - 22ptCaption 2 - 20ptThese values can be set in "Text Stye" for relevant elements, in xCode click the 'T' for the font and select desired style from the list.Note: if you want your page to automatically resize existing elements if the user changes the text size whilst your app is open you can override 'awakeFromNib()' and set '.adjustsFontForContentSizeCategory' to 'true' for…