50% discount on my Packt Publishing Books!

KF6GPE50

Shameless plug — Packt is running a special for the three books I’ve written for them. If you’ve been thinking about Qt Creator or JavaScript Object Notation and haven’t taken the plunge, here’s a reason to do so! Follow one of the links below, and use the code ‘KF6GPE50’ at checkout for your discount!

JavaScript JSON Cookbook

Application Development with Qt Creator, 2nd Edition

Application Development with Qt Creator

Book Review: Audio Culture

In college, I took an electronic music class, which I absolutely loved. Recently, I’ve been dabbling more with electronic music again, and I thought I should at least return to some of the fundamentals I’d learned in school.

Man, do I wish Audio Culture: Readings in Modern Music (Amazon), edited by Christoph Cox and Daniel Warner, had been out in ’89 when I took that class. It’s an awesome collection of short essays (most are 3-4 pages; a few are more) written by musicians, philosophers, and others about the experimental music and sound art scene in the last century. First published in 2004, it’s been freshly reprinted in 2013, and is as valuable now as it would have been when it first came out.

It’s divided into two parts, “Theories” and “Practices”, and in each part are sections such as:

  • Music and its others: noise, sound, and silence.
  • Modes of listening.
  • Music in the age of electronic (re)production.
  • The open work.
  • Experimental musics.
  • Improvised musics.
  • Minimalisms
  • DJ culture
  • Electronic music and electronica.

The sections on minimalism and DJ culture really knocked my socks off, with essays by Steve Reich and Laszlo Moholy-Nagy, among others.

It’s a great book to dip in and out of, and includes an extensive discography. For a lot of the music the book mentions, you can find excepts or the whole pieces on YouTube and Spotify, which really engages you with the different ideas and thoughts around sound and music.

What I found really interesting, and what took me back to my college course, is that it covers the whole century’s thinking; it’s not just about house or techno or DJing or hiphop; there’s a lot of discussion of music concrete, early electronic music, and all of the experimentation that led us to where we are today.

My only regret is not having other people to discuss the book and discography with while reading it; if I had that course to do all over again, I’d hope that this would be a textbook for the course.

Book Review: Programming: Principles and Practice Using C++, 2nd Edition

I learned C++ the hard way: in the early 1990’s, the best reference was Ellis’s and Stroustrup’s The Annotated C++ Reference Manual. At the advice of a good friend, I bought a copy, read it cover to cover several times, and spent the next several years of my career banging my head against the wall in largely C-only development projects trying to get mindshare to do things in C++. As a result, I learned a lot of bad habits at first, and wasn’t always the first guy to pick up on then-new things like the Standard Template Library when it became available. Add my extensive experience with Qt, and my C++ experience is actually quite spotty — there’s definitely room for improvement.

As a result, I jumped at the chance to review Bjarne Stroustrup’s Programming: Principles and Practice Using C++, 2nd Edition (Amazon link). This is an entry-level textbook on programming in C++ for new software developers; its target is obviously an undergraduate class for computer science majors, rather than a reference for a seasoned software developer. (If you’re looking for C++ for the seasoned developer, check out Stroustrup’s The C++ Programming Language, 4th Edition.)

Programming: Principles and Practice using C++ is an excellent modern introduction to what it means to be a programmer, while teaching all of the essentials of C++ you’re likely to need for your first few years. It covers a lot — C++ syntax, data types, the basics of object-oriented design, generic programming through templates, testing, and many other topics. The book is chock-full of code, often showing the iterative nature of programming as Stroustrup lays out the requirements for a program, and then shows version after version that works towards meeting those requirements. It clearly demonstrates how good software developers should approach programming problems, and is as much a book about thinking about programming as it is a book about programming. Which is, I think, exactly what the neophyte needs.

Don’t look here for a lot of information about clever data structures or algorithms — and that’s a good thing. Stroustrup leverages the STL for that, and emphasizes something I think good programmers already have learned — the best code is usually the code you didn’t write. There’s short discussions about some algorithms, of course, as befits a book on programming, as well as the idea behind an algorithm. But, for example, instead of learning to program a red-black tree, Stroustrup points the reader towards the STL’s map, and leaves it at that.

It’s scrupulously up to date, too, covering relevant portions of the latest C++14 standard, as well as using C++11 everywhere — which is great, because most compilers are C++11 compliant anyway, and students should be able to compose and understand programs using the latest language features.

Refreshingly, the book includes not just a discussion of object-oriented programming through the classic example of graphical programming, but actually enables readers to do simple graphical programming through a library on top of FLTK. In discussing the design and implementation of the library, Stroustrup covers classic object-oriented programming, including decomposition, inheritance, and data hiding. While the example is old, Stroustrup’s coverage of it is refreshingly up to date and thorough,

The strongest parts of the book are probably on the topic of generic programming and testing: one of the multi-chapter examples is a re-implmentation of the std::vector class, including almost everything in the standard library. This is an excellent introduction to a number of topics, including API design, memory management, pointers, templates, and generic programming in general. A little later is an excellent chapter going over iterators, looking at iterators as a classic example in generic programming.

It speaks highly of the book that I learned a few things in my read of the book; in some cases it was clarifying the reason behind a lesson I learned in the school of hard knocks, which is great to see in an introductory book of this sort. It was also refreshing to see how programming is taught today, especially using a language as fundamental as C++ is in the industry. In hiring engineers, I worry about the large number of developers who start with Java and never really get back to the basics; Stroustrup covers the basics quite nicely (including a chapter on embedded systems programming) without writing a textbook that’s only about the basics.

I’d recommend this book strongly to anyone just starting out in software development, and with some caveats for developers who already have significant programming experience. I think there’s someone for everyone in it, although the high price means if you’re skilled at teaching yourself programming languages — or just want to brush up on C++11 and C++14 — this might not be the most affordable purchase, even if it is a great read. But as an introductory textbook, it’s hard to beat, giving you a firm start in the fundamentals of programming in today’s world.

Book Review: Responsive Mobile Design

When it comes to writing about food, some books marketed as cookbooks and really just catalogs of recipes, and other books are about food but have lots of recipes as well. Responsive Mobile Design (and at Amazon), by Phil Dutson, is a cookbook of the second sort, about responsive mobile design that has lots of recipes.

I never really did get the cookbook format for computer books; the few I’ve bought I’ve inevitably answer a few questions, but I never really read them cover to cover. Phil Dutson’s book is different — not only are there lots of clear examples and how-you-should-go-about-doing-this kinds of things, but there’s lots of information about responsive design, and modern design for the web in general. As such, it worked really well — Dutson introduces a topic, talks about it in very specific terms, and then looks at specific points that require closer attention with technical examples or pointers to frameworks. There are lots of examples, and lots of figures showing the output of the examples, so you can really see what he’s talking about.

The book begins with some general observations about web design and content, which though lightweight technically, are a welcome reminder that it’s all too possible to create a technically excellent site that wouldn’t interest anyone. From there, he moves on to discussing basic layout principles with grids, tables, and measurement, before getting into the details of media queries and typography. There’s a whole section (three chapters) on how to make multimedia responsive, and then five more chapters on the specifics of tuning the performance of mobile web site, looking at everything from server choices to optimizing JavaScript and measuring performance with modern browsers. Dutson provides a clear, engaging style throughout; I planned on pacing myself by reading a couple of chapters a night to let things sink in, and frequently moved on to a third or even fourth chapter before stopping.

I got a lot more out of the book than I expected, and I had pretty high hopes to begin with. If I had to name a fault of the book, it’s that I’m not sure how well it will age in some regards. Dutson is very good about discussing proposed standards and differences between browsers, which should hold up well. However, he often provides pointers to frameworks, and it’s not clear how many of these frameworks will be around or kept relevant in the two-to-four year lifespan of a printed book. On the other hand, having those pointers and a summary of what’s available is great — if you’re just getting started setting up a site, it’s nice to know the pros and cons of the various packages you can start with. So I think his decision was the right one, and it may mean a little more time with Bing or Google once the book’s been out for a while.

If you’re at all curious about what makes a modern web site tick, or if you’re presently engaged in working on responsive sites, this is definitely a book to have.

Book Review: Advanced Android Application Development…

(So, disclaimer first: I’ve been working with the publisher & authors of this book through every edition as a technical reviewer; I don’t get anything from the sale of the books, but I enjoy working with the publisher and the authors.)

So, I got my review copy of Advanced Android Application Development, fourth edition by Joseph Annuzi, Jr, Lauren Darcey, and Shane Conder last week, and all I can say is that this great book gets better with every edition.

There are a lot of Android books out there, and most of them churn through the same basic stuff about views, intents, and services, with a smattering of information about networking and databases thrown in for good measure. This is the book you turn to for what’s next: serious discussion about SQLite databases services, notifications, input methods, networking, telephony, and Google Services like maps, location, cloud messaging, in-app billing, and analytics. There’s even a whole section — multiple chapters — on graphics, both 2D and 3D graphics programming using Android’s support for graphics and OpenGL ES. Recently updated to its fourth edition, there’s even some coverage of Android Lollipop and Android Wear. And there’s plenty of review material about networking and web access, too.

The book has copious sample code; the text fortunately doesn’t just reprint listings and leave you to puzzle over what they do, but carefully chooses the pertinent bits and pieces of sample applications illustrating the proper way to use Android interfaces. The full sample code of the applications is available for download, just as you’d expect. In many cases the samples are good enough to adapt for your own work, although they occasionally elide much of the necessary error handling that a good mobile application would require.

It’s hard to find fault with this book: with excellent coverage of SQLite, Android’s notification system, input methods & accessibility, and internationalization. Written right when Android L and Android Gear were being unveiled, it’s a little short on details on those topics, but that’s to be expected — it’s still got more than many books on the market today.

If you’re doing Android development, I strongly recommend getting a copy of this book and at least leafing through the parts of it that are new to you; it’s my go-to reference for all things advanced in Android.

And another book is out!

I’m excited to announce that my new book, Application Development with Qt Creator, is now available for sale at Packt and available for pre-order at Amazon!

I love Qt — it is one of the best frameworks I’ve ever worked with for any kind of development in C++. I was excited when Packt approached me to write a mini-guide on getting started with Qt Creator, Qt’s cross-platform IDE. As written, the book covers everything you need to know to get started using Qt Creator, from installing the IDE to compiling, editing, debugging, optimization, and localization. There’s also a chapter on using Qt for mobile development on Android.

This book is aimed at developers new to Qt and IDEs in general. If you’re just getting started programming, maybe studying on your own or taking a college course, you’ll want a copy.

A new book is out!

I am excited to say that as I write this, the new book I’ve written with Carmen Au is available. In Microsoft Mapping: Geospatial Development with Bing Maps and C#, Carmen and I give you a soup-to-nuts introduction to everything you need to know about applying Microsoft technologies for mapping and geospatial applications. We talk about the Bing Maps API, of course, in all its forms, but we also give you a whirlwind tour of Azure, including SQL Azure’s geospatial extensions, and Microsoft Power Map as well. I’ve worked with Carmen for almost three years now, and this collaboration with her is the one I’m most excited about.

I hope you’ll check it out!

First hike of spring!

I got out today for the first time since this winter for a real hike — not just a quick walk with the dog, but something that takes more than half an hour and is worth bringing the camera.

I went out to Fall Creek, down in Felton; there’s some nice history along the trail there. In the late 1800’s and early 1900’s, this valley’s economy was driven by lumber and lime — much of early San Francisco was constructed with resources drawn from here. Anyway, up the Fall Creek trail are the remnants of old lime kilns and a limestone quarry run by I.X.L. Lime Company.

Fall Creek

I started out to the lime kilns first; it’s about two kilometers from the parking lot up the South Fork of Fall Creek. The park was packed — I was hiking between a family taking visitors out and a bunch of families with small children.

Once at the lime kilns, I waited until the people had moved on and got some photos. The kilns are huge; they’d pile wood in the bottom and then the limestone over it, and it would apparently burn for days. It must have made an amazing amount of heat. Above the kilns you can see bits of the rail car system used to bring the limestone down to the kilns, although you have to look hard to find it.

Lime Kilns

Then I continued past the powder store and up the canyon to the barrel site, where the barrels for the lime were made. This is another couple kilometers from the site; I would assume — although I don’t know — that the primary reason for putting the cooperage where it was was because of the water power needed to run the sawmill, and the trees to cut for the wood for the barrels. There’s still a fair amount of old equipment, too.

Barrell Mills

Once there, I walked back along the North Fork of Fall Creek. Hiking along the creek is an interesting experience; the photos don’t really do it justice, but you’re usually sandwiched between canyon walls separated by tens of meters, with the trail sharing the bottom of the canyon with the creek. The creek’s eroded the base of the canyon and the trail quite a bit; there’s lots of places where you cross the creek, or have to trek up the canyon wall a few meters and back down because a shift in the creek has eroded the logical place for the trail.

I took quite a few photos, although none of them really capture the size of the trees or creek canyons. You can see them in my photo album.

Overall, a good day to be out!

Wait. Where have you been?

Well, gee, it’s been eight months without a post. If you were hoping for wisdom about Yesod, I’m really sorry that I let you down.

Shortly after starting the project, I learned that my day job at Nokia Research Center was going away — specifically, Nokia was closing the lab that I worked at, and I would be looking for another job.

Thanks to several supportive people — among them, my boss at Nokia and his boss — I landed fairly quickly on my feet with others I’d worked with before, at Microsoft, working in the division that’s responsible for a lot of cool things for Bing. It’s been a great transition, but it’s been like drinking from a firehose — I lived a very sheltered life, well away from a lot of mainstream Microsoft technologies (SQL Server, ASP.NET, and ASP.MVC, I’m looking at you!) and in addition to my regular work responsibilities in my new role, most of my learning cycles have been coming up to speed on the latest enhancements to C#, the various public and private frameworks I use in my new job, and so forth. Under the circumstances, something had to give, and Yesod was that something.

I’m sorry.

I’ve thought a few times about making this another Microsoft technology blog, but there are an awful lot of them, and I’m starting behind where many, many good bloggers are. About half of the epiphanies I’ve had about programming for the twenty-first century Microsoft platform would be old hat to most of you, and the rest probably don’t care — you’re probably still using Qt on Ubuntu or something like that.

At the same time, there’s been no work towards the next book, which was always the purpose of this blog — to cross-pollinate between what I did at work, what I wrote for you in print, forging a connection between the two. That’s not to say there aren’t more books coming at some point; in fact, I’m incubating a couple of ideas now. But they’re in the incubation stage, and publishers generally like freshly baked content, not content that’s been posted for free on the Internet first. (Can you blame them? I can’t.)

But stay tuned. More is coming; I’m just not quite sure what or when yet.