Saturday, November 30, 2013

Books I've Read This Week

Remote: Office Not Required by Jason Fried and David Heinemeier Hansson is a good book for folks who are looking to take the leaving into working remotely. As someone who worked remotely for 3+ years I didn't find anything in the book that I would disagree with. Unfortunately, I also didn't find anything in it that would convince you boss to let you telecommute. So if you are looking for a book to feed your confirmation bias this is it but you may want to just get it from the library.
Raising Steam by Terry Pratchett is the latest book in the always hilarious Discworld series. This time around the main protagonists are Moist von Lipwig as he has been tasked by Lord Vetinari to take charge of this new fangled steam engine that has been brought to Ankh-Morpork.

The book gives Pratchett the opportunity to look back on how the invention and subsequent rollout of steam engine powered railroad. He's able to show how the discovery of this new technology brings people closer together by reducing the physical impediments that were once in place to separate the different races. You can draw a parallel with our own world where the internet is connecting people all over the place.

Sadly, this is not Pratchett's best effort. There is a long period in the middle where not too much happens and it could have probably been edited away. As well I'm not quite sure who the antagonist was in the novel. Certainly there was some conflict between the Grags and the rest of the dwarves but that didn't seem to gel quite right for me.

Although, I did enjoy the novel. Like most of Pratchett's books there are laugh out loud moments and I really thought the bit where the main steam engine was compared to a goddess of the earth as it embodied all four elements coal = earth, steam = water/air and fire to burn the coal and generate the steam from the water. 

Monday, November 25, 2013

Doctor Who Speculation on the 13th Doctor and Beyond

First off if you haven't watched the 50th anniversary special that aired this past Saturday don't read this post as it will spoil major plot points.

Alright, if you are still reading then you must want to hear this. An established part of Dr Who cannon is that Gallifreyan's can regenerate their bodies 12 times which effectively gives them 13 bodies in total. A fact which has been confirmed by Steven Moffat. This was a plot device originally dreamed up in 60's in order to allow the second Doctor, Patrick Troughton, to replace the first played by William Hartnell.

Looking back the following actors have played the Doctor:
  1. William Hartnell
  2. Patrick Troughton
  3. Jon Pertwee
  4. Tom Baker
  5. Peter Davison
  6. Colin Baker
  7. Sylvester McCoy
  8. Paul McGann
  9. Christopher Eccleston
  10. David Tennant
  11. Matt Smith
But as we now know there was a Doctor between McGann and Eccleston, the War Doctor played by John Hurt. Plus it has already been announced that Matt Smith is leaving the show and Peter Capaldi will be taking over. So the list actually looks like:
  1. William Hartnell
  2. Patrick Troughton
  3. Jon Pertwee
  4. Tom Baker
  5. Peter Davison
  6. Colin Baker
  7. Sylvester McCoy
  8. Paul McGann
  9. John Hurt
  10. Christopher Eccleston
  11. David Tennant
  12. Matt Smith
  13. Peter Capaldi
Oh no, we're at 13 Doctor's now. That must mean that Peter Capaldi will be the last actor to ever play the Doctor. Well of course not, they are going to keep making this show until it stops being profitable. During the 50th anniversary show we see John Hurt's Doctor beginning his regeneration but we never see him fully transforming into Christopher Eccleston. Perhaps this is because Christopher Eccleston was unable or unwilling to participate in the special or maybe it's something a little more timey wimey.

Since we had three Doctor's in the same time and space and they were actively messing around with their own timeline (yes, I know they hand wavey explained this away) I'm surmising that an alternative timeline has been created. Now when Doctor number 9 regenerates he doesn't become Christopher Eccleston but instead Peter Capaldi. This means that Capaldi could be Doctor number 10 and they've been able to stave off the question of a 13th Doctor for at least 3 more actors. 

8) Paul McGann
9) John Hurt
10) Peter Capaldi
11) ?
12) ??
13) ???

But wait, what about Matt Smith's Doctor what happens to him? Well, I believe that he is the 13th Doctor. You see David Tennant actually regenerated twice. Once in Journey's End and then again in his last show The End of Time. So that would make his list:

8) Paul McGann
9) John Hurt
10) Christopher Eccleston
11) David Tennant
12) David Tennant
13) Matt Smith

So in closing you probably had to be a real Whovian in order to read this post to the end but I believe we'll see a reboot of the Doctor Who franchise with Peter Capaldi stepping in as the new 10th Doctor and Eccleston, Tennant and Smith's Doctors being relegated to an alternative time line.

Sunday, November 24, 2013

Books I've Read This Week

The Shambling Guide to New York City by Mur Lafferty is a witty book that I quite enjoyed reading. The premise is an out of work writer ends up working for a small publishing company that is populated by vampires, zombies, death goddesses, etc. Initially Zoe is a skeptical of the varicosity of her co-workers claims but she is soon thrown head first into the monstrous underbelly of NYC. An innocent mistake from her previous job comes back to make trouble for her as well.
Fortunately, The Milk by Neil Gaiman is a book I'm very much looking forward to re-reading with my daughter. In it a father pops out to get milk for his kids breakfast cereal and he takes a very long time. When he gets back he regales his kids with a tale of dinosaurs, pirates, aliens and vampires.

It seem to me to be exactly the sort of story a father would come up with. It actually reminds me of the time my daughter was worried about dragons setting our house on fire to which I quickly replied that she didn't need to worry as we had dragon scale shingles on the house and obviously dragon scale shingles are impervious to dragon fire as it would be silly for a dragon not to be immune to their own breath. Well that story worked as she went to sleep. It wasn't until a few years later where I had to dance around that when we were getting our roof re-shingled.

Three Things That Tripped Me Up This Week

I've had a pretty productive week at work but here are three things that tripped me up this week. I'm putting them down in blog post format so that I'll remember them and maybe they'll help you as well.

1) Concurrent Modification Exception

So I was working on some code where I needed to loop through a collection of users and remove one when it meets a certain criteria. Which I coded up as:

        List users = um.getUsers();
        
        for (User user : users) {
            if (user.isAnAss()) {
                users.remove(user);
            }            
        }

Do you see the problem? No, neither did I as I wasn't thinking and luckily enough for most of my test runs the user who isAnAss was at the end of the List so the exception wasn't throw. When the isAnAss user was in the middle of the list BOOM! ConcurrentModificationException.

To get around this problem I ended up doing an old school iteration through the list.

        List users = um.getUsers();
        
        User user = null;
        for (int i = 0; i < users.size(); i++) {
            user = users.get(i);
            if (user.isAnAss()) {
                users.remove(user);
            }            
        }

2) Relative Layouts in Android are Slow for Complex Layout

I've been working on a lot of complex layouts for an Android app I'm working on and I was using the RelativeLayout judiciously. One of my dialogs was taking quite awhile to load and doing some profiling I determined it to be the measure method for the RelativeLayout was being called many, many times. Switching to a LinearLayout helped reduce these calls.

Romain Guy recently posted a slide deck on how RelativeLayout's are getting better in Android 4.4 and here is a video or Romain and Adam Powell talking about writing custom Android views.




3) Android's Handling of Images Sucks

It just sucks so hard. I was doing some performance tuning of one of our dialogs and found that about 90% of the time it was taking before being show was loading the three images it was using. Cache those images folks, doesn't matter how small they are.

Monday, November 18, 2013

Books I Read This Week

Year Zero by Rob Reid is a hilarious look at the recording industry and our insane patent and copyright laws through the lens of alien visitors to our fair planet. The elevator pitch is such, apparently aliens have been listening to our radio and TV broadcasts illegally since the 70's and have racked up so much in fines that the combined wealth of the entire universe is not enough to pay off the debt. Their solution is to blow up the Earth to avoid paying the fine. Now it is up to low level entertainment lawyer, Nick Carter (no not the Backstreet Boy) to save the world along with two alien reality TV stars.

I really enjoyed this book. It is a super funny work of satire.

Wait, is that it? Don't I usually put up two book reviews every week? Well yeah, I do but...well Attack on Titan is all I can say. I got super hooked on that anime this week and it has been eating up all of my spare leisure time. It's not even like I can watch it while doing something else as it is English sub-titles only. 

Monday, November 11, 2013

Jawbone Up Review

So I purchased the Jawbone UP back in July and I think I've had it long enough to have an informed opinion about the band and that would be, it's not quite ready for prime time. If I had the opportunity to do it all over again I wouldn't purchase the UP instead I'd be talking hard look at the Fitbit Force.

While the UP does a good job of tracking physical activity and sleep it has a number of deficiencies that keep me from recommending it. First there is no wireless sync option. Originally, I didn't think that it would bother me but it has become cumbersome to sync the band by plugging the band into my phone's headphone jack but it's become a PITA. Second, there is no external display where you can check your daily activity progress or see what time it is. Third, there is no website for you to track your progress everything has to be done via the phone interface.

Finally, charging is problematic. In order to charge the band you need to connect it's head phone jack connector to a special cable that connects to a USB port. Also, the battery sometimes will not take a charge, I'm on my second band since July and a friend of mine is in the same boat.

All in all, I love the idea of life tracking I just don't think this is the product for me.

Sunday, November 10, 2013

Book I Read This Week

Wool Omnibus Edition by Hugh Howey is the indie publishing darling series that started off as Kindle singles and has been collected into this omnibus format. The book is split into 5 parts which are more like novella's because, well, that's how they were written. The first story acts a lot like world building giving you an introduction to the Silo in which it appears the remnants of humanity live.

The whole thing has a post-apocalyptic vibe and it is hard to talk about without giving away some big secrets in the book. I really enjoyed the read and would recommend it to anyone who loves sci-fi.
Fullmetal Alchemist, Vol. 27 is the final volume of the long running anime series. Will the Elric brothers be able to stop the murderous "father" from sacrificing an entire country so he can achieve godhood. The Elric brother together with all of their allies they've met during the series band together in a final climatic battle against "father".

I was really impressed with the growth of the Elric brothers in the series. What kicked everything off was their attempt to bring their mother back to life but because of the alchemic principle of equivalent exchange they ended up sacrificing part of their bodies without truly bringing the dead back to life. They originally started by somewhat selfishly trying to restore their own bodies only to realize how much they care for other people and their country. 

Monday, November 4, 2013

Books I've Read Last Week

Whispers Under Ground is the third book in the Rivers of London series by Ben Aaronovitch. Once again we are hanging out with police constable and apprentice wizard Peter Grant. His new case is trying to find out who murdered the son of an American politician, of course, the FBI gets involved as well. His case takes him into the London subway system.

While all this is going on Peter is trying to figure out who the "Faceless Man" is with Inspector Nightingale.
Broken Homes is the fourth book in the Rivers of London series by Ben Aaronovitch. We are back with Grant and Nightingale once again but this time we spend a lot more time trying to figure out who the "Faceless Man" is while working a case at a London housing project.

I'm really, really enjoying this magical detective series but now I have not more left to read. Bwahahah. If you like Butcher's Dresden Files than this one is for you. I'm purposely trying not to say much about them as I'm four books into the series and I figure most of you will be starting with book one.