Thursday, 29 August 2013

Android Developer Tools Essentials

Author: Mike Wolfson
Publisher: O'Reilly
ISBN: 978-1-449-32821-4
Format: E-Book


So, what does the book actually cover? Well, the clever tagline suggests everything from Android Studio to ZipAlign which is a pretty impressive claim. Unless of course, the reference there was for just those two tools in which case it's perhaps not so impressive! Fear not, you will be pleased to know that this book covers quite a bit of ground and, consequently, quite a lot of tools.

The following chapter list will give you an idea of what topics made it into the book with a very brief breakdown of each chapter to follow below.

  1. Getting Started
    Minimum Requirements
    Installing Java
    Installing the Android Software Development Kit
    Developing Without Eclipse
    Configuring a Device for Development
  2. Essential Tools
    SDK Manager
    Android Debug Bridge (ADB
  3. Configuring Devices and Emulators
    Using a Physical Device for Development
    Using an Emulator for Development
    Android Virtual Devices
    Advanced Emulator Configuration
  4. Using Devices and Emulators
    Using the Emulator
    File Explorer
    Developer Tools Application
  5. Developing with Eclipse
    Anatomy of the Eclipse Workspace
    Code Templates
    Properties Editors
    XML Formatter
    The Android Key
    Quick Outline for XML
    Other Essential Eclipse Shortcuts
    Refactor Menu
  6. Developing with Android Studio
    Installing Android Studio
    Anatomy of the Android Studio IDE
    The New Structure of an Android Project
    Creating New Android Components
    Layout Designer and Layout Preview
    Generating an APK
    Interacting with Maven and Gradle
    Version Control Integration
    Migrating from Eclipse
    Android Studio Tips and Tricks
  7. Testing Your Code
  8. Simulating Events
    Simulating Location and Routes
    Simulating Telephony Operations
    Changing Networking Parameters
    Using a Device with Sensor Emulation
    Advanced Sensor Testing
    Developer Options Menu
  9. Build Tools
    Compiling Your Code
    Packaging an APK for Release
    Building from the Command Line Using Ant
    Advanced Packaging Steps
    Gradle-Based Build Tools
    Using the Maven Tools
  10. Monitoring System Resources
    Memory Usage in Android
    Dalvik Debug Monitor Server (DDMS)
    Memory Analyzer Tool (MAT)
  11. Working with the User Interface
    Android Layout Basic Concepts
    Editing XML Files Directly
    Working with Graphics
  12. Using the Graphical Editor
    Generating Layouts Using the Graphical Layout Editor
    Outline View
    Properties Editor
    Configuration Chooser
  13. Optimizing the User Interface
    Introduction to UI Performance
    Hierarchy Viewer
    Fixing Problems Using Lint
    Application Exerciser Monkey
Chapter 1 aims to get your development environment up and running. To this end the author does an admirable job, ensuring the even the smallest of details is covered, such as setting parameters to ensure that the Java Compiler level is compliant with 1.6.  

Covering the fundamental tools for Android development, the second chapter deals with the SDK manager and ADB. The SDK manager is the tool that, unsurprisingly, manages the Android SDK, allowing the user to both update the SDK and add additional components. ADB is a powerful utility that enables you to interact with your emulator or connected device. While the author does not cover every aspect of the ADB utility he provides links to some of the more pertinent web resources that cover this vast topic.

Covering the pitfalls and benefits of physical test devices versus virtual devices in chapter 3, the author guides you through customs infighting both physical and virtual devices. Limitations and capabilities of both are discussed, allowing the user to make an informed decision.

While the creation of emulators was demonstrated in the previous chapter, this chapter employs them to demonstrate their use as an aid to testing your application . The author also takes care to point out best practices for reducing emulator load time and ensuring a consistent start state. File Explorer and Developer Tools Application are also introduced.

As most of your time is going to be spent developing in Eclipse, the fifth chapter delves into the properties of the Eclipse IDE and exposes some nice shortcuts and options for making your life a lot easier in bespoke application.

Chapter 6 covers the new Android Studio app. Although the book is new, this is already a little dated due to the frequency of the releases from Google of this application. The author pretty succinctly covers the Android Studio app life cycle and how to migrate from Eclipse, as well as including version control and some nifty hints and tips. 

Some of the intricacies of debugging for your Android app are addressed in this chapter, which covers the Logcat utility (with a pointer to ensure that you use ProGuard to remove logging statements during packaging), how to set your app to debug and set up debug points and how to configure and use the Lint static analysis tool.

In chapter 8 the testing challenges faced by various events is delved into. It's not possible to test for every location on the planet for example (unless of course you're superman in which case your time might be better spent saving the world instead of writing apps). As a result the author shows you how to simulate events such as location and routes, telephony operations and networking. The author also shows how you can use sensors on a physical device to interact with an emulator. Finally, the options in the developers options menu are explored with an explanation for most of the options provided.

Compiling your code and preparing your APK for release is the name of the game here. The author shows you to compile and sign your code as you prepare for release. Code optimization and obfuscation is also covered by way of a more detailed look at the ProGuard tool that was touched upon in Chapter 7. Zipalign is also covered as well as how to get to grips with Gradle-based builds and the Maven tools.

Chapter 10 introduces the necessary toolsets for monitoring system resources in Android, namely memory usage via the DDM,  utilising the wanalyser, thread tool, heap tool and trace view tool,  as well as showing how to install and use the Memory Analyser Tool (MAT).

At the heart of any application is its UI. Chapter 11 describes how to create layouts to define the UI, discussing and illustrating important concepts such as Views and ViewGroups and their relationship. The author also discusses resources and their advantages, how to create XML files via templates and how to edit them manually and working with graphics.

Having covered manually editing layout files in chapter 11 the author now examines generating layouts via the Graphical Layout Editor.

This final chapter covers poorly performing UI by firstly discussing how Android draws views and how this subsequently affects UI performance. The author goes on to explain the use of hierarchy viewer tools to analyse your UI and the use of monkey to generate random events to test your application.

General Impressions

This is quite an impressive book and the author clearly has extensive knowledge of this subject matter and has done a great job in imparting that knowledge to his target audience. The book is generally well laid out with ample screenshots to illustrate key points, lots of notes to warn you of potential pitfalls and enough hyperlinks to related topics to keep even the most click-happy readers satisfied (and more importantly they add value to an already impressive book). My only slight complaints with this book however were the use of URL shorteners for the hyperlinks and the order of the chapters could have been optimised - although that's subjective. I should point out that I have no personal issue with URL shorteners, they just get blocked on some networks, especially corporate ones, and while all the links were current having the full URL can help you track down were the site has relocated a topic or at least let you look at it in the Google cache. These minor points aside it's a top-notch book and I hope that as Android continues to mature the author will review and update as appropriate.


If getting the most out of both your development environment and Android application is important to you, and it should be if you're a developer, then pick up a copy of this book. It's that simple. 


With such good content, and a very reasonable price tag of $12.99, I can't give this title less than 5/5.

Thanks for reading!


Next review will be Learning SQL, 2nd edition

Wednesday, 21 August 2013

Beginning Android 4 Application Development

Author: Wei-Meng Lee
Publisher: Wrox
ISBN: 978-1-118-19954-1
Format: Paperback


So, what does the book actually cover? Well, quite a lot as it so happens. I was particularly impressed that the author covered topics such as geocoding and reverse geocoding, which at the time was somewhat difficult to find good examples of. As well as how to get going with developing for Android 4, the author also covers how to publish your application once it's complete - from digitally signing it to publishing it on the app market, so pretty much all the basics are covered.

The following chapter list will give you an idea of what topics made it into the book with a very brief breakdown of each chapter.

  1. Getting Started With Android Programming
    What Is Android?
    Obtaining The Required Tools
    Creating Your First Android Application
  2. Activities, Fragments and Intents
    Understanding Activities
    Linking Activities Using Intents
  3. Getting To Know The Android User Interface
    Understanding The Components Of A Screen
    Adapting To Display Orientation
    Managing Changes To Screen Orientation
    Utilizing The Action Bar
    Creating The User Interface Programmatically
    Listening For UI Notifications
  4. Designing Your User Interface With Views
    Using Basic Views
    Using Picker Views
    Using List Views To Display Long Lists
    Understanding Specialised Fragments
  5. Displaying Pictures And Menus With Views
    Using Image Views To Display Pictures
    Using Menus With Views
    Some Additional Views
  6. Data Persistence
    Saving And Loading User Preferences
    Persisting Data To Files
    Creating And Using Databases
  7. Content Providers
    Sharing Data In Android
    Using Content Providers
    Creating Your Own Content Providers
    Using The Content Provider
  8. Messaging
    SMS Messaging
    Sending E-mail
  9. Location-Based Services
    Displaying Maps
    Getting Location Data
    Monitoring A Location
    Project - Building A Location Tracer
  10. Networking
    Consuming Web Services Using HTTP
    Consuming JSON Services
    Sockets Programming
  11. Developing Android Services
    Creating Your Own Services
    Establishing Communication Between A Service And An Activity
    Binding Activities To Services
    Understanding Threading
  12. Publishing Android Applications
    Preparing for Publishing
    Deploying APK Files
  • Appendix A: Using Eclipse For Android Development
    Getting Around in Eclipse
    Debugging Your Application
  • Appendix B: Using the Android Emulator
    Uses Of The Android Emulator
    Creating Snapshots
    SD Card Emulation
    Emulating Devices With Different Screen Sizes
    Emulating Physical Capabilities
    Sending SMS Messages To The Emulator
    Making Phone Calls
    Transferring Files Into And Out Of The Emulator
    Resetting The Emulator 
  • Appendix C: Answers To Exercises

General Impressions

I initially found this book whilst browsing through my local bookshop here in Dublin on a rare day off from work. The book was one of the first that I had found that dealt with the then new Android 4 SDK and initial glance seemed to be different enough, and helpful enough, to warrant a purchase.

I was pleasantly surprised once I got home to find out that I was correct. The book delves into the usual pleasantries such as getting started with Android development before dealing with the juicier stuff. As it's an older book (by comparison) at this point, don't expect there to be any reference to the newer Android Studio (which admittedly is still considered to be 'Early Access' - but I'd bet money that Google will eventually drop Eclipse support once this product is well established and has useful things like all the necessary menus built) but there's a nice summary of how to set up the SDK, Eclipse and ADT to get the most unfamiliar of you up and running with Android development.

Once these pleasantries are out of the way the book dives into the basics of Android, starting with the ubiquitous Activity. Straight away the style of this book becomes evident, the author tells you "Here's what we're going to do", gives the code for it and then sums everything up in a nice post-mortem after the code has been presented. As each example and subsequent post-mortem progresses, the author builds upon each previous notion in a way that minimises repetition while maximizing learning and experience. As with any good book, at the end of each chapter you'll find a summary of what was covered in the chapter and what you ought to have learned.

So, all-in-all, pretty good right? Well, yes and no. The author does a pretty good job of covering the basics and for an amateur programmer or someone completely new to Android programming, it will probably be enough. I personally found myself wanting a little bit more in places, such as the section for sending / receiving SMS messages. Yes, he does cover these topics in Chapter 8 (Messaging) but there is no reference on how to interact with messages already on the device. I suspect this is not so much an oversight as the fact that Android provides no formal API for dealing with SMS/MMS messages that are stored already, and getting into how to do this involves a complexity a little too high for the average newcomer but it just seemed to be a cop out not to address it at all.

That gripe aside, this book does generally do an awesome job at what it set out to do - teach you how to get going with Android 4 Application Development.


As Android development books go this is a great place to start. You're helped to get up and running (only with Eclipse, this was written pre-Android studio) and gently introduced to the various core aspects of Android and what it means to program for it. Building upon what you've learned in each chapter, you'll be impressed with what you can do by the end of it. It doesn't answer all of the questions you'll have though and, while I suspect newcomers to programming for Android will find it to be a good reference for a while, you'll also find yourself more and more often looking for that little bit more. A reference book this it not though but, fear not, there are plenty of good references out there for you.


With the caveats of this book NOT being for professionals AND being a little dated now, I'd rate it 4.5/5 - you'll find it to be a great starting place and a natural stepping stone to bigger and bolder Android concepts and techniques.

Thanks for reading!


Next review will be the Android Programming Book: Android Developer Tools Essentials

Tuesday, 20 August 2013

Head First HTML with CSS and XHTML

Authors: Elisabeth Freeman & Eric Freeman
Publisher: O'Reilly
ISBN: 0-596-10197-X
Edition: First
Format: Paperback

Cover Page

General Impressions

One of my first books when learning HTML was this interesting title. Fear not, unlike my first swimming lesson, you won't be thrown in at the deep end entirely. This title, written using (allegedly) advanced techniques, offers a plethora of amusing annotations to make sure that you don't get too lost.

The basic premise of these techniques is that there are two ways to learn something - repetition, repetition, repetition, rep... well, you get the idea - or to make the topic more engaging, more interesting, to increase brain activity, to make more neurons fire and thus trick the brain into thinking that something is happening here that it should take note of. They accomplish this in a multitude of ways using different visual styles and techniques to engage the brain and, more importantly, by challenging the reader to apply what they have learned, further stimulating the brain. This is probably where I should add some fancy images and funny quotes and things to reinforce the point but ain't nobody got time for that.

As it stands, it's a pretty nice concept which I did find quite engaging and did lead me to retain quite a vast deal of it back in 2006 when I was working on a fairly page intensive help site for my employer. As such, if you're new to web technology and are looking for a good entry point into learning then you could do worse than to get hold of a copy of this book. If, however, you're a web guru looking for a reference book you may as well move on now, a point they make no effort to conceal in the beginning of their book.

Yes, you read correctly, 2006. This is when I first read this book so it goes without saying that as a first edition some of the standards will now have changed. I hope to get my hands on the second edition fairly soon at which point I'll also review it. I still, however, maintain that this is an excellent source for people looking to get started in HTML and CSS.


So, what does the book actually cover? Well, the more astute observers among you will have already guessed that the core of the book is HTML and CSS (you know, I probably should explain what those acronyms stand for but I think that the book does a far better job than I would). There is of course a little more to the book than that. The following chapter list will give you an idea of what topics made it into the book with a very brief synopsis of each chapter.
  1. The Language Of the Web
    Basic HTML and Style Introduction
  2. Meeting the 'HT' in HTML
    A little more advanced theory such as attributes
  3. Web Page Construction
    From sketch to Outline
  4. A Trip to Webville
    How to get a domain and publish your pages
  5. Meeting the Media
    Dealing with images
  6. Serious HTML
    Validating pages and adding metadata
  7. Putting the 'X' Into HTML
    What is XHTML and why use it?
  8. Adding A Little Style
    Getting started with Cascading Style Sheets
  9. Expanding Your Vocabulary
    More CSS
  10. Getting Intimate With Elements
    A closer look at the building blocks of a web page
  11. Advanced Web Construction
    Div and Span and serious construction
  12. Arranging Elements
    More Div and Span with multi-column layouts
  13. Getting Tabular
    Dealing with tables in HTML
  14. Getting Interactive
    Submitting data via forms
  15. The Top Ten Topics (We Didn't Cover)
    Some teasers of other topics


As you can see from the chapter list, and the general impressions, this is an excellent starting point for any aspiring web designer with little to no experience. It's a gentle learning curve and the authors present the lessons in an engaging and well thought manner with some humour, all combining to help the information be absorbed and retained. If, however, you're looking for a reference or more advanced lessons then this book is probably not for you.

While the authors rightly point out that this is a HTML book, they do touch on some items like FTP, Domain registration and so on but only to the extent of absolute need to know. There's a good chance that people entirely new to these technologies will need to find additional assistance in learning them. So for any wannabe web designers out there, I'd fully recommend this book if you've never touched a web page before. Perhaps the second edition will be a better choice as it's more up-to-date, if so I'll post a review when I get my hands on it and then link it here as an update.


With the caveats, as mentioned, of this book NOT being for professionals AND being a little dated now, I'd rate it 5/5 - you simply will pick up what they are trying to teach thanks to their engaging style

Thanks for reading!


Next review will be the Android Programming Book: Beginning Android 4 Development by Wei-Meng Lee

Sunday, 18 August 2013

Coming soon

Having amassed tech books over the years I've decided to post some reviews of them as they're not always reviewed fairly or at all (unlike books about vampires or wizards... ). So, watch this space while I start the word processor up and get cracking on my first reviews. Feedback and criticism welcomed but play nice!

First review will be Head First HTML with CSS and XHTML

Thanks for reading!