Getting Started with Bluetooth Low Energy by Kevin Townsend et al; O’Reilly Media


Getting Started with Bluetooth Low Energy, Tools and Techniques for Low-Power Networking

Bluetooth LE, or Bluetooth Smart as it is officially known, has generated a lot of interest for all the good reasons. Getting Started with Bluetooth Low Energy by Kevin Townsend et al is a solid guide to the topic, along with other good books such as Bluetooth Low Energy: The Developer’s Handbook.

The book begins by discussing the key characteristics, limitations, and use cases of Bluetooth LE technology, in chapter 1. The following four chapters take a deep dive into the protocols that comprise Bluetooth LE, beginning with an overview in Chapter 2. Chapter 3 delves into the Generic Attribute Profile or GAP (advertising and connections). Chapter 4 delves into Generic Attribute Profile or GATT (services and characteristics).

Makers need to select hardware to leverage Bluetooth LE. It may come in the form of a module that you program to act as a peripheral, or a USB dongle that you may plug into a USB host. Chapter 5 discusses several such options. Chapters 6 and 7 delve into debugging and design tools that aid developers during development and troubleshooting.

Chapter 8 shows how to leverage Bluetooth LE on Android using the Bluetooth Application Accelerator library from the Bluetooth SIG. You’ll learn how to establish connection and communicate with a remote device. Chapter 9 delves into Bluetooth LE programming on iOS by demonstrating several practical applications.

Chapter 10, the concluding chapter, shows how to leverage Bluetooth LE on embedded devices. It uses a hardware module introduced in chapter 5, in conjunction with ARM’s mbed platform, to build a peripheral that can be used with Android and iOS devices.

All source code shown in the book can be forked from the author’s GitHub repo. The text has occasional spelling mistakes that don’t affect readability.

I’d like to thank O’Reilly Media for providing an e-book for review.

Learning Android by Marko Gargenta and Masumi Nakamura; O’Reilly Media


Learning Android is a relatively short book that leads you through building a real-world application. It is a book for beginners to Android who want to start building end-to-end applications now. It does not cover server-side programming, or cloud programming as we’re increasingly apt to call it, but reuses existing services developed by the authors.

The books starts with an overview of Android in Chapter 1, with topics such as its history and marketshare. That chapter is followed by a review of Java programming in Chapter 2, which I read because I have been away from Java programming a while.

Chapter 3 provides an overview of Android’s architecture. I wasn’t aware of the Binder RPC mechanism, that the Bionic libc was implemented to avoid L-GPL licensing restriction of glibc, nor that Dalvik is a register based Java virtual machine named after a village in Iceland.

Chapter 4 contains instructions on downloading and installing Java and the Android SDK. The book uses Eclipse IDE in all how-to discussions but does mention Android Studio. Chapter 5 dives into the main building blocks available to developers such as Activities, Intents, Services, Content Providers, Broadcast Receivers, and Application context. The remaining chapters thoroughly explore these building blocks as you build an application called Yamba.

You get introduced to the Yamba application in Chapter 6. Chapter 7 builds the main user interface using Activities. It also discusses performing tasks in the background using AsyncTask. Chapter 8 delves into composing UI using Fragments. Chapter 9 delves into managing preferences stored in the filesystem. Chapter 10 discusses a background service to refresh data obtained over the internet. Chapter 11 discusses SQLite database and content providers to manage and provide data. Chapter 12 delves into list views and adapters to present large amounts of data efficiently. It also discusses building a landscape version of the Yamba app.

Chapter 13 delves into receiving intents using broadcast receivers to periodically refresh data over the internet and to notify the user. Chapter 14 discusses creating a Widget for the app, that can be placed on the home screen. Chapter 15 delves into accessing data over the internet using HTTP. Chapter 16, the final chapter, shows you how to create live wallpapers and handle user interactions using handlers.

To keep up the pace, I wasn’t actually coding the app. Readers who did, have reported inconsistencies in the code. Look at the book’s errata page, and report any new problems you encounter. I thank O’Reilly Media for providing me an e-book for review.

Gifting e-books


Not all e-book retailers allow gifting. At work, we’re using gifting so that our centralized purchase department can pay for books and gift back to whoever requested the purchase.

Here’s a list of retailers that allow gifting:

  • amazon.com
  • smashwords.com
  • iTunes Store

The Linux Programming Interface by Michael Kerrisk; O’Reilly Media


The Linux Programming Interface is a very extensive tome on the ins and outs of the Linux (nay Unix) system programming interfaces, from the maintainer of the Linux man-pages project. The book covers everything from the a.out (assembler output) format to zombie processes.

At more than 1500 pages long, it is not a book to read from cover to cover. As each chapter is fairly self-contained and covers a single topic thoroughly, I recommend diving into the book every time a topic tickles your fancy.

You stand much to gain by reading about a topic in the book rather than only perusing man pages. For instance, the topic on processes shows where the environ global variable points to in a process’s memory layout, describes the environment list data structure, and presents an example showing how to access the environment variables. Much more than you get from “man environ” on the command line.

The book’s 64 chapters cover every Linux programming topic I can imagine. Its breadth does mean that it is shallow on some occasions. I have had need to use, and blogged about, TCP keepalive before, a topic that does not occur in the book. To its credit, it is peppered with references to other books and articles that cover a topic in depth.

Definitely a book I’ll dive into every time I need to use a Linux programming interface I have never used before. I thank O’Reilly media for providing me an e-book to review.

iOS 7 Programming Fundamentals by Matt Neuburg; O’Reilly Media


iOS 7 Programming Fundamentals, 4th Edition, is the successor to Programming iOS 6. It is a smaller tome, and a companion to Programming iOS 7 – scheduled to be released soon. As a new iOS developer, I found the book very useful to come to grips with Objective C, Foundation framework, Xcode, and UIKit. It does not cover programming topics such as multithreading, but more than makes up for that by covering newer topics such as blocks – frequently associated with asynchronous programming.

The book starts with a whirlwind introduction to C in chapter 1, where it refers frequently to the excellent C Programming Language (2nd edition) book. Objective C is covered extensively in chapters 2, 3, 4, and 5. The focus of these chapters is object-based programming, with topics such as creating classes, instantiating objects with alloc and init vs new, creating and calling methods, typecasting and the id type, blocks, subclassing and polymorphism, keywords self and super, class methods, instance variables and accessors, key-value coding, and properties. Automatic reference counting (ARC) is assumed throughout, but is covered in greater detail in a later chapter.

Chapters 6, 7, 8, and 9, cover Xcode editing environment, UI development using Interface Builder (NIB editor), accessing documentation and sample code, and project life cycle. By the end of chapter 9 you’ll be able to create a UIKit app, build it, run it in the simulator or a device, debug and unit test it, and prepare it for distribution. You’ll also know about the static analyzer, gauges, and instrumentation.

Chapters 10 and 11, cover Categories, Protocols, Cocoa Foundation framework classes, and event handling. Chapter 12 covers accessors, memory management with and without ARC, and debugging memory management problems using the memory gauge, static analyzer, and instruments (zombie template). Chapter 13 covers topics such as object visibility, notifications, key-value observing (KVO), and the model-view-controller (MVC) pattern.

The book is peppered with references to official documentation from Apple, useful tidbits of historical information such as the the meaning of the prefix NS (NeXTStep), and other technical advice. I now feel confident to commence my iOS development journey. I thank O’Reilly Media for providing an e-book for review.

Python Cookbook by David Beazley, Brian K. Jones; O’Reilly Media


Python Cookbook

Python Cookbook is an extensive tome of recipes for the Python 3 programmer. It is a perfect companion book for those migrating Python 2 code to Python 3. If you are stuck with Python 2, you may still find the second edition of the book for sale, but the recipes may be dated as they cover Python 2.4. It is not a beginners book. If you are looking for a beginners book, I recommend Learning Python by Mark Lutz.

A quick chapter summary follows.

Chapter 1 has recipes involving manipulation of built-in structures such as dictionaries and sequences. Usage of heapq module for implementing priority queues is demonstrated. Chapter 2 covers string and text manipulation, with extensive use of regular expressions. Chapter 3 has recipes for working with numbers, dates, and times. Usage of numpy module for matrix and linear algebra calculations is demonstrated.

Chapter 4 provides recipes for implementing iterators and generators. Chapter 5 covers File and I/O, including recipes for reading and writing compressed files, memory mapping binary files, and communicating with serial ports. Chapter 6 moves on to more advanced recipes for encoding and processing, such as reading and writing CSV, JSON, XML, Hex digits, and Base64.

Chapter 7 provides recipes for functions and closures. Chapter 8 provides recipes for classes and objects, such as creating managed attributes, lazily computed properties, and extending classes with mixins. It also covers common patterns such as state, and visitor. Chapter 9 digs deeper into metaprogramming. Chapter 10 has recipes for modules and packages, such as for splitting a module into multiple files using packages, and loading modules from another machine using import hooks.

Chapter 11 provides recipes for network and web programming. I didn’t know you could use ip_network objects to generate IP addresses and check for membership. It also covers event-driven I/O but does not introduce any new framework. Chapter 12 has recipes for concurrency. It discusses implementing concurrency using generators (coroutines), but doesn’t cover frameworks such as gevent, it does mention PEP 3156 that covers those.

Chapter 13 has recipes for writing utility scripts for system administration. Chapter 14 has recipes for unit testing, debugging, exception handling, and profiling. Chapter 15 wraps it up with recipes for extending Python using C.

I’ve added this book to my list of references to look into, before heading to Google. Source code listings use syntax highlighting, a nice touch that makes the code easier, and less boring, to read.

I thank O’Reilly media for providing the book for review.

Graph Databases by Ian Robinson, Jim Webber, Emil Eifrem; O’Reilly Media


Graph Databases

This books lays a solid foundation for understanding what Graph Databases are all about. Implementation details are all based on Neo4J, except for a fleeting reference to Twitter’s FlockDB when discussing scalability.

Chapters 1 and 2 provide an overview of Graph Databases, and compare them to Relational and NoSQL Databases. Appendix A provides a useful overview of different NoSQL databases.

Data modeling with Graph Databases is compared to relational databases in Chapter 3. It also discusses the creation of domain models using an example from the Systems Management domain, and Cypher to create and query the models. Cross-domain modeling and common modeling pitfalls are also discussed.

Chapter 4 discusses data modeling for Neo4J in further detail, and demonstrates when to use nodes or relationships. Neo4J can be embedded into applications or deployed in server mode, benefits of each mode are discussed. Test-driven data model development with ImpermanentGraphDatabase Java class is also discussed.

Chapter 5 provides common real-world use cases and examples. Domains covered in detail include social networking, authorization and access control, and geo/logistics.

Chapter 6 discusses native graph processing and storage, with topics such as index-free adjacency for better query performance, and programmatic access to Neo4J database provided by the Kernel, Core, and Traverser APIs. Non-functional characteristics such as transactions (ACID properties), recoverability, availability, scale (capacity; latency; throughput) are also discussed.

Graph algorithms such as depth- and breath-first search, Dijkstra’s algorithm, and A* algorithm are discussed in chapter 7. Analyses based on these algorithms, and techniques from graph theory and social sciences, can be used to gain new insights from a domain. Social graph properties such as Triadic Closures, Structural Balance, and Local Bridges can be used to gain new insights into a social network.

I found the book extremely useful to understand what Graph Databases are all about.

I thank O’Reilly Media for providing the book for review.