Programming Concurrency on the JVM – #java #programming #bookreview

Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors
By Venkat Subramaniam
(Pragmatic Bookshelf, paperback, list price $35.00)

“Faster!”

That’s the word pressuring many programmers today as modern multicore hardware makes it possible to perform numerous actions simultaneously.

“A concurrent program may download multiple files while performing computations and updating the database,” notes the author of this well-written introduction to programming concurrency on the Java Virtual Machine (JVM).

So speed increasingly is of the essence, but so is improving how well (and quickly) applications respond to users. 

In Programming Concurrency on the JVM, the focus is on introducing Java programmers to “three separate concurrency solutions—the modern Java JDK [Java Development Kit] concurrency model, the Software Transactional Model (STM), and the actor-based concurrency model.” And the goal is to help programmers learn the advantages and disadvantages of each and make the right choices for their applications.

The author states that “[t]here are three ways to avoid problems when writing concurrent programs:

  • Synchronize properly.
  • Don’t share state.
  • Don’t mutate state.”

He explains that “[i]f we use the modern JDK currency API [application programming interface], we’ll have to put in significant effort to synchronize properly. STM makes synchronization implicit and greatly reduces the changes of error. The actor-based model, on the other hand, helps us avoid shared state. Avoiding mutable state is the secret weapon to winning concurrency battles.”

Programming Concurrency on the JVM is adequately illustrated and divided into five parts: Strategies for Concurrency, Modern Java/JDK Concurrency, Software Transactional Memory, Actor-Based Concurrency, and an epilogue focusing on making the right choices.

The book, the author stresses, is not for Java newcomers. It is for “experienced Java programmers who are interested in learning how to manage and make use of concurrency on the JVM, using languages such as Java Clojure, Groovy, JRuby, and Scala.”

Most of the code examples are in Java, but he includes some examples in Clojure, Groovy, JRuby, and Scala, as well. And he has made extra effort “to keep the syntactical nuances and the language-specific idioms to a minimum.”

He adds: “Programming concurrency is hard, yet the benefits it provides make all the troubles worthwhile.”

Si Dunn

QuickBooks 2012: The Missing Manual – Solid Focus on Pro Edition – #bookreview

QuickBooks 2012: The Missing Manual
By Bonnie Biafore
(O’Reilly, paperback, list price $34.99; Kindle, list price, $27.99)

 In late September, Intuit released the 2012 versions of its popular QuickBooks financial software. Just a month later, O’Reilly Media was hot on Intuit’s heels with QuickBooks 2012: The Missing Manual, a new entry in O’Reilly’s popular “The book that should have been in the box®” series.

Written by veteran author and project management consultant Bonnie Biafore, this new guidebook provides clear, well-illustrated, step-by-step instructions on how to use the Windows edition of QuickBooks 2012 Pro, the most popular version of Intuit’s product, particularly in small businesses.

The 734-page book also gives some basic how-to information and advice on accounting – enough to get you past some confusing stumbling blocks as you set up a business and its accounts, but not enough to substitute for real training in accounting and keeping books.

“QuickBooks isn’t hard to learn,” the author says. “Many of the features that you’re familiar with from other programs work just the same way in QuickBooks—windows, dialog boxes, drop-down lists, and keyboard shortcuts, to name a few. And with each new version, Intuit has added enhancements and new features to make your workflow smoother and faster. The challenge is knowing what to do according to accounting rules, and how to do it in QuickBooks.”

Two words of caution: This book does not cover non-USA versions of QuickBooks 2012 Pro. And, the author points out, “QuickBooks for Mac differs significantly from the Windows version, and unfortunately you won’t find help with the Mac version of the program in this book.”

QuickBooks 2012: The Missing Manual is divided into five parts containing a total of 26 chapters and two appendices.

Part One covers “Getting Started.” It starts with “Creating a Company File” and “Getting Around in QuickBooks” and advances to setting up accounts, customers, jobs, vendors, items, lists, and managing QuickBooks files.

Part Two’s focus is “Bookkeeping,” and its chapters covers everything from tracking mileage to paying for expenses, invoicing, managing accounts receivable, generating financial statements and performing end-of-year tasks.

“Managing Your Business” is the focus of Part Three. The chapters cover managing inventory, budgeting and planning, and working with reports.

“QuickBooks Power” is the title of Part Four. It covers using QuickBooks with online banking services, configuring preferences in QuickBooks to fit your company, integrating QuickBooks with other programs (Excel integration has been improved in QB 2012), customizing QuickBooks, and keeping QuickBooks data secure.

Part Five contains two appendices: “Installing QuickBooks” and “Help, Support, and Other Resources.”

The book does not contain a CD, but it provides a link where “every single Web address, practice file, and piece of downloadable software mentioned In this book is available….”

QuickBooks 2012 Pro, according to the author, “is the workhorse edition” of a software package that is available “in a gamut of editions, offering options for organizations at both ends of the small-business spectrum.”

Her book is good enough that it can help you get a small business set up and off the ground while you are learning the QuickBooks 2012 Pro. But if you don’t have some solid background in bookkeeping and accounting, do not try to rely on the software alone to save you. Get the training any way you can, as soon as you can. And then, once you can afford it, hire good people to help you with the bookkeeping and accounting, while you focus on the bigger picture, using QuickBooks 2012’s budgeting, planning, forecast, report, contact synchronization, lead tracking, and to-do list features.

One other caution: QuickBooks has a specialized edition specifically for nonprofit organizations. It is more expensive than the Pro package. So some people try to save money and use the Pro package to manage a small nonprofit. But there can be confusions involving some of the terminology, transactions and reports. In this book, Bonnie Biafore provides “notes and tips about tracking nonprofit finances with QuickBooks Pro (or plain QuickBooks Premier)” and modifying the program’s standard reports to meet government requirements.

By the way, QuickBooks 2012: The Missing Manual can be used to learn features in earlier versions of QuickBooks. Of course, doing so and seeing what’s missing may convince you to upgrade.

Si Dunn

Head First HTML5 Programming – #javascript #html5 #programming #bookreview

Head First HTML5 Programming: Building Web Apps with JavaScript
By Eric Freeman and Elisabeth Robson
(O’Reilly, list price $49.99, paperback)

This is not your father’s turgid programming textbook.

Indeed, even if you are not interested whatsoever in messing around with JavaScript and learning how to be an HTML5 programmer, you may still enjoy reading this book and studying how it is put together.

Head First HTML5 Programming is a fun and entertaining mixture of graphics, text and coding examples. But, more than that, this “multi-sensory learning experience” has been put together “[u]sing the latest research in cognitive science and learning theory….”

How often have you heard someone say a computer programming book is “fun and entertaining”?

Yes, Head First HTML5 Programming is still a how-to book, and it is one that focuses on creating web apps using JavaScript — not exactly a fertile field for comedy.

But the book promises “to start by going from zero to HTML5 in 3.8 pages (flat)” — and delivers. By the third page, you begin using a whimsical “HTML5-O-Matic” to update standard HTML to HTML5. And by the bottom of the fourth page, you are “officially certified to upgrade any HTML to HTML5.”  (It takes just three steps and a bonus round to get there, by the way.)

Even the book’s table of contents is zany, amusing and informative, with funny graphics and snarky summaries of what you will find in each chapter and appendix. 

And don’t be intimidated by this book’s physical size. It has 574 pages, but it presents information in small, manageable chunks, surrounded by eye-pleasing white space and lots of illustrations that will make you grin or chuckle even as you learn something new.

By the way, you don’t have to know JavaScript to use this book. The first few chapters provide  an excellent and palatable JavaScript overview.

However, if you think you are serious about becoming an HTML5 programmer but don’t yet have any experience in  HTML markup and CSS  (cascading style sheets), the two writers recommend that you tackle one other book first: Head First HTML with CSS & XHTML (list price, $39.99 paperback. There is also a Kindle edition.)  

Whether you know HTML, CSS and JavaScript or not, however, you should plan on doing the book’s exercises. Cutting “class” is not an option with this book. “Some of (the exercises) are to help with memory, some are for understanding, and some will help you apply what you’ve learned,” the writers point out.

They add: “Most reference books don’t have retention and recall as a goal, but this book is about learning, so you’ll see some of the same concepts come up more than once.”

The software and hardware requirements for writing HTML5 and JavaScript code are minimal: “[Y]ou need a text editor, a browser, and, sometimes, a web server (it can be locally hosted on your personal desktop).”

They recommend that you use more than one browser while learning HTML5 and JavaScript. And, to use some HTML5 features and JavaScript APIs, you will have to “serve files from a real web server rather than loading a file….” But they explain how to do this.

Head First HTML5 Programming advertises that it will promises to help “load HTML5 and JavaScript straight into your brain,” and it seems to start doing that right after you open its pages — as long as you keep an open mind about using a programming book that is actually enjoyable and fun to read while it instructs.

Si Dunn

Revolution in the Valley: How the Mac Was Made (2nd Revised Edition) – #bookreview #macintosh

Revolution in the Valley: The Insanely Great Story of How the Mac Was Made
By Andy Hertzfeld
(O’Reilly Media, list price $24.99, paperback)

My wife swears by her Mac. I, however, just swear at it when I am forced to use it.

I have been using anything-but-Apple computers since the early 1980s, starting with a Sinclair ZX80 and moving up through a ragged assortment of Trash-80s, Osbornes,  Kaypros, PC-XTs, PC-ATs, and PCs that run Windows 7.

During a short semi-career in specialized hardware and software development, I tested programs that ran exclusively on machines running Windows. So I have that bias.

Nonetheless, Andy Hertzfeld’s book, Revolution in the Valley: The Insanely Great Story of How the Mac Was Made, is fascinating and entertaining reading, even for those of us who have avoided Apple computers and sometimes still bristle at the smug, superior attitudes exhibited by many Macintosh users. (Don’t tell my wife I said that.)

Hertzfeld was one of the main authors of the Macintosh system software, including the User Interface Toolbox and many of the Mac’s original desk accessories. He later joined Google and is one of the primary creators of Google +.

Originally published in 2004, Revolution in the Valley recently has been brought back into print again by O’Reilly Media as a second revised edition.

The book is drawn mainly from Hertzfeld’s adventures, misadventures, reflections and perspectives. But it is not All Hertzfeld All the Time. Refreshingly, it also includes stories written by “other key original Mac team members”—Steve Capps, Donn Denman, Bruce Horn and Susan Kare.

Their stories recount the chaotically creative and frequently high-pressured race to design and deliver “an easy-to-use, low-cost, consumer-oriented computer…featuring a revolutionary graphical user interface (GUI).”

Hertzfeld and his co-contributors focus on “the development of the original Macintosh computer, from its inception in the summer of 1979, through its triumphant introduction in January 1984, until May 31, 1985, when Steve Jobs was forced off the Macintosh team.

Revolution in the Valley is divided into five parts and follows a somewhat chronological path. However, it makes frequent and refreshing use of short anecdotes that are easy and enjoyable to read, no matter what your computer bias might be. It also has a nice assortment of photographs, drawings, screenshots and other illustrations from the development period.

Speaking (again) of smug attitudes, one amusing incident in the book involves the Macintosh team’s April 1981 encounter at a computer show with Adam Osborne, creator of the Osborne 1, “a low-cost, one-piece, portable computer complete with a suite of bundled applications.”

According to Hertzfeld: “As Macintosh elitists, we were suitably grossed out by the character-based CP/M applications, which seemed especially clumsy on the tiny, scrolling screen.” When Osborne realized he was talking to the Macintosh development team, he told them his Osborne 1 would outsell the Apple II “by a factor of 10” and added that they should “tell Steve Jobs that the Osborne 1 is going to outsell the Apple II and the Macintosh combined!”

When Steve Jobs heard what Adam Osborne had said, he called the founder of the Osborne Computer Company and left two messages. The first message was simple and basic, that Osborne was “an asshole.” Jobs’ second message was: “Tell him the Macintosh is so good that he’s probably going to buy a few for his children even though it put his company out of business.”

And the rest, of course, is computer history.

Revolution in the Valley has drawn strong praise from Steve Wozniak, who co-founded Apple with Steve Jobs in 1976.

“It’s chilling to recall how this cast of young and inexperienced people who cared more than anything about doing great things created what is perhaps the key technology of our lives,” he notes in the book’s foreword. “ Their own words and images take me back to those rare days when the rules of innovation were guided by internal rewards, and not by money.”

Si Dunn

Here’s the book scaring me this Halloween: America the Vulnerable – #bookreview #data #security

Subtitled “Inside the New Threat Matrix of Digital Espionage, Crime, and Warfare,” America the Vulnerable is written by Joel Brenner, former inspector general at the National Security Agency.

Brenner has recent experience at the highest levels in national intelligence, counterintelligence and data security. And he has studied firsthand many of the threats and attacks against our national, corporate and personal interests.

“During my tenure in government,” he writes, “I came to understand how steeply new technology has tipped the balance in favor of those–from freelance hackers to Russian mobsters to terrorists to states like China and Iran–who want to learn the secrets we keep, whether for national, corporate, or personal security.” He adds: “The truth I saw was brutal and intense: Electronic thieves are stripping us blind.”

Everything from Social Security numbers to technological secrets that cost billions to develop are being taken — stolen from military and corporate data networks and individual computers, possibly including yours.

His book will leave you wide-eyed and wondering who is surreptitiously poking around inside your computer right at this moment and what they are taking or “borrowing” for sinister purposes.

 Likely the Chinese and the Iranians and Russian mobsters and others, including hackers, are in there or have been there recently.

And Brenner explains how you may be unknowingly helping them find and transfer sensitive and vital information, even when you do something seemingly innocuous as plugging in a thumb drive to your laptop.

You won’t need to watch any monster movies to get scared this Halloween. Brenner’s book or its Kindle version can give you a very serious case of chills and frights. 

Si Dunn

CoffeeScript: Accelerated JavaScript Development – #bookreview #programming

CoffeeScript: Accelerated JavaScript Development
By Trevor Burnham
(Pragmatic Bookshelf, $29.00, paperback)

JavaScript was thrown together in 10 days and “was never meant to be the most important programming language in the world,” says Trevor Burnham, a web developer and founder of DataBraid, a startup focused on “developing data analysis and visualization tools.”

Yet, JavaScript was “understood by all major browsers,” despite their numerous differences, and it quickly became the “lingua franca of the Web,” he says in his well-written new book.

JavaScript also became a headache for many programmers struggling to learn it well enough to provide support and develop new applications.

“JavaScript is vast…[and] offers many of the best features of functional languages while retaining the feel of an imperative language,” Burnham notes. “This subtle power is one of the reasons that JavaScript tends to confound newcomers: functions can be passed around as arguments and returned from other functions; objects can be passed around as arguments and returned from other functions; objects can have new methods added at any time; in short, functions are first-class objects.”

Unfortunately, “JavaScript doesn’t have a standard interpreter,” he adds. “Instead, hundreds of browsers and server-side frameworks run JavaScript in their own way. Debugging cross-platform inconsistencies is a huge pain.”

Enter CoffeeScript, first released on Christmas Day, 2009 as “JavaScript’s less ostentatious kid brother.”

Coding in CoffeeScript requires fewer characters and fewer lines. And “the compiler tries its best to generate JavaScript Lint-compliant output, which is a great filter for common human errors and nonstandard idioms,” Burnham writes.

Another benefit: “CoffeeScript code and JavaScript code can interact freely,” he notes.

His book, aimed at CoffeeScript newcomers, assumes you have at least a little knowledge of JavaScript. But you don’t have to be a JavaScript Ninja, he assures.

He starts at the classic “Hello, world” level of CoffeeScript, including installing the CoffeeScript compiler, deciding which text editors are best, and learning how to write and debug simple CoffeeScript code.

From there, he moves quickly into showing you how to put CoffeeScript to work and develop a simple multiplayer game.

There are several different ways to run CoffeeScript, and there are different requirements, depending on whether your machine is Mac, Windows or Linux. Burnham describes these in his text and in an appendix, and he gives links to more information.

He also shows how to use a browser-based compiler for developing his book’s example application. But he does not recommend using the browser-based compiler for production work.

His book has six chapters and four appendices:

  • Chapter 1 – Getting Started
  • Chapter 2 – Functions, Scope, and Context
  • Chapter 3 – Collections and Iteration
  • Chapter 4 – Modules and Classes
  • Chapter 5 – Web Interactivity with jQuery
  • Chapter 6 – Server-Side Apps with Node.js
  • A1 – Answers to Exercises
  • A2 – Ways of Running CoffeeScript
  • A3 – Cheat Sheet for JavaScripters
  • A4 – Bibliography

CoffeeScript: Accelerated JavaScript Development offers a focused blend of examples and exercises to help speed up basic competency with CoffeeScript. In learning how to build the multiplayer game application, you use CoffeeScript to write both the client (with jQuery) and the server (with Node.js).

Since CoffeeScript and JavaScript are intertwined, you also can gain a better understanding of JavaScript by learning to code in CoffeeScript, ” Burnham promises.

In a foreword to the book, CoffeeScript’s creator, Jeremy Ashkenas, hails Burnham’s work as “a gentle introduction to CoffeeScript led by an expert guide.”

It lives up to that good billing, with many short code examples and many short tutorials and exercises that can lead quickly to building both a working app and a working understanding of CoffeeScript.

Si Dunn

Privacy and Big Data – #bookreview #nonfiction

Privacy and Big Data
By Terence Craig and Mary E. Ludloff
(O’Reilly Media, $19.99, paperback; $16.99, Kindle)

Worried about the safety of your personal data?

That genie, unfortunately is long out of the bottle—and very likely spread all over the planet now.

In Privacy and Big Data, authors Terence Craig and Mary E. Ludloff provide an eye-opening examination of “how the digital footprints we leave in our daily lives can be easily mashed up and, through expertise and technology, deliver startling accurate pictures of our behavior as well as increasingly accurate predictions of our future actions.”

Those digital pictures of who we are, who we vote for, what we buy and where we go can be worth a great deal of money and/or power to those who collect them. Indeed, they constitute “big data” and can be worth much more than gold, Craig and Ludloff contend.

“Far more is known today about us as individuals than ever before. How organizations, businesses, and government agencies use this information to track and predict our behavior is becoming one of the fundamental issues of the 21st century,” they state.

Privacy and Big Data is not a lengthy book, just 106 pages. Yet it packs plenty of punch in the form of useful, unsettling and sometimes surprising information, as well as thought-provoking examples, discussions and questions. The two writers – “executives from a growing startup in the big data and analytics industry” – draw upon extensive experience “deal[ing] with the issues of privacy every day as we support industries like financial services, retail, health care, and social media.”

Their well-written work is organized into five chapters and an appendix. Each chapter, meanwhile, has its own bibliography with links to additional materials and information.

Chapter 1, “The Perfect Storm,” looks at what has happened to privacy in the digital age and how we got to this point, starting with ARPANET (the “(Advanced Research Projects Agency Network”) in 1969, which later gave rise to the Internet. In the authors’ view: “There is a perfect storm brewing; a storm fueled by innovations that have altered how we talk and communicate with each other. Who could have predicted 20 years ago that the Internet would have an all-encompassing effect on our lives? Outside of sleeping, we are connected to the Web 24/7, using our laptops, phones, or iPads to check our email, read our favorite blogs, look for restaurants and jobs, read our friends’ Facebook walls, buy books, transfer money, get directions, tweet and foursquare our locations, and organize protests against dictatorships from anywhere in the world. Welcome to the digital age.”

Chapter 2, “The Right to Privacy in the Digital Age,” focuses on “what privacy encompasses, how our privacy norms have been shaped in the U.S. and abroad, the tension between privacy and other freedoms (or lack thereof), and how, for those of us who fully participate in all the digital age has to offer, it may very well be the end of privacy as we know it.”

Chapter 3, “The Regulators,” explores how the world has many geographical boundaries, from national borders down to city limits and even smaller demarcations, including individual agencies, departments and committees. Businesses large and small also operate within specific structural boundaries. Yet the Internet, the authors point out, recognizes no such limits. they examine “how…countries regulate the collection, use, and protection of their citizen’s personal information,” amid countless competing governmental and business agendas.

In Chapter 4, “The Players,” the authors warn: “Wherever you go, whatever you do, anywhere in this world, some ‘thing’ is tracking you. Your laptop, and other personal devices, like an iPad, Smartphone, or Blackberry, all play a role, and contribute to building a very detailed dossier of your likes, concerns, preferred airlines, favorite vacation spots, how much money you spend, political affiliations, who you’re friends with, the magazines you subscribe to, the make and model of the car you drive, the kinds of foods you buy, the list goes on.” The writers identify four broad categories of data grabbers and note that “while the[se] players are playing, consumer privacy continues to erode.” They discuss some specific things you can do to try to reduce your exposure. But, they caution, “What happens on the Internet stays on the Internet forever.”

Finally, in Chapter 5, “Making Sense of It All,” the authors pose several challenging questions and offer their views on possible answers. The questions include: “In the digital world we now inhabit, is privacy outmoded or even possible? Should we just get over it and move on? Should we embrace transparency and its many benefits and disadvantages? And if we do, or have it forced upon us, can we expect the same from our governments, our corporations, and powerful individuals? Will they be held to the same standard? If not, since information is power, what will our world look like?”

Two writers seldom agree on everything, and that is true in this book. In their Appendix titled “Afterword,” Craig and Ludloff state that they have tried to present a wide range of views on important questions, yet sometimes differ in their personal views regarding privacy and big data. They offer brief summaries of where they came from and how their viewpoints have been shaped by life events.

In a world where computers, phones, cars, cameras and many other household, work and public devices gather, store and disseminate data about us, this book can help readers think harder about what information — and freedoms — we may be giving up, willingly and unwittingly, in the name of convenience and connectivity.

Si Dunn

#