Sunday 14 June 2015

Android Studio up and running

My standard development environment for native Android development has been Vim and Ant.

Today I finally took the plunge and got started with Android Studio (AS).

I ported in ZipZipBooks, which is my mobile record keeping application for HMRC with a view to giving at a bit of a refresh. Didn't take too long to get it up and running on AS.

Key issues:

  1. The code for the existing project is in a Mercrurial repository. My first attempt to import the project, I went down the "Check out the project from version control" route, and chose Mercurial. Unfortunately this did not play niceley with Gradle. Instead, I found that I could instead start with the "Import Project" route. That allowed AS to convert my Ant build to Gradle.
  2. Adding library dependencies for which this answer was very helpful;
  3. I might need to get a faster/bigger/hotter/noisier laptop.
  4. Running on Windows 8, there was no need to update any drivers for the physical Android devices on which I performed testing.

Saturday 13 June 2015

Reading vs Doing

I was greatly enjoying reading this article on coding when I got to the section on Django and decided that maybe I should get back to my own Django project.


Django High Level Mind Map

Mind maps really suit my way of organizing knowledge.

Here is a link to pdf of my high-level Django mind map.

Django High Level Mind Map

Enjoy.

Friday 12 June 2015

The Monty Hall Problem

The Monty Hall problem is great fun.

Here's how I rationalise it.

There are three doors. I have to choose one. The chance that the door I pick is the correct one is one in three. The chance that one of the other doors is correct is two in three.

Stop right there.

Now ask yourself the question - is Monty Hall running around behind the doors possibly changing the location of the prize? Nope. The prize doesn't move. It's exactly behind the same door as it was when the puzzle started.

So no matter what happens, my chances of winning with the door I first chose was and remains one in three.

And remember that means there is a two in three chance that the prize is behind one or other of the doors I didn't choose.

Which means that before he opens one of the two doors I didn't choose it's 50/50 which door has the two in three chance of being correct. After Monty opens one of the doors that 50/50 uncertainty disappears.

Which means the two in three chance of being correct now applies to the one remaining closed door I didn't originally choose.

Since a two in three chance of being right is better than a one in three chance of being right, I should change my initial decision.








Thursday 11 June 2015

Programming is bad for your health

I've just been reading this article on why sitting still is bad for you and, if I read it right, standing still is not much better .

It is hardly news. We were designed to be active. But it is always uncomfortable to have the abstract awareness of harm condensed to actual damage vectors.

I've tried for years to get going the Pomodoro principle - but my concentration span doesn't seem to like the short 25 minute periodicity.

Time to make more effort perhaps.

GitHub Profile

Because a number of third party services seem to believe that you cannot possibly be a serious programmer unless you have an account on GitHub, I have had to create one.

But my shiny new GitHub profile is only a cypher to direct anyone who passes by to my public repositories on Bitbucket .