Getting .NET Results – 2 New Books from Microsoft – #programming #bookreview

Microsoft Press recently has released two new books for .NET programmers. One is for .NET newcomers, and the other definitely is not. That book has been written “to help existing Microsoft Visual Basic and Microsoft Visual C# developers understand collections in .NET.”

Here are short reviews of each book.

Easy Does It

Start Here! Fundamentals of Microsoft .NET Programming
By Rod Stephens
(Microsoft Press, paperback, list price $19.99; Kindle edition, list price $15.99)

This is a very good reference manual for anyone ready to take up .NET programming or ready to learn virtually any programming language.

Don’t be put off by the fact that the book starts out at the most basic of basic levels, defining different types of computers, just in case you don’t know a laptop from a mainframe. After that, it moves quickly into the world of programming.

You don’t need a computer, software, programming language tools or programming experience to learn from this book. Indeed, it mostly employs pseudo-code, illustrations and clear writing to explain each topic.

The idea here is to teach you “the basic concepts that drive all .NET-based languages” and to provide a reference book that you can refer back to when you are unsure about a particular term, concept, process or method.

For example, if you are now learning Microsoft Visual C# or Visual Basic, you might need to review the chapter on operators, to be sure you clearly understand what may happen if the wrong symbol is used and the correct order of precedence is not followed.

The 14 chapters of Fundamentals of Microsoft .NET Programming deal with subjects many programmers definitely should know:

  • Chapter 1, “Computer Hardware”
  • Chapter 2, “Multiprocessing”
  • Chapter 3, “Programming Environments”
  • Chapter 4, “Windows Program Components” – (Describes the visible pieces of a Windows program that a user sees and how to use them effectively as a programmer.)
  • Chapter 5, “Controls” – (Such as labels, text boxes, menus, sliders, scroll bars, etc.)
  • Chapter 6, “Variables”
  • Chapter 7, “Control Statements’” – (Using them to manage a program’s flow of execution.)
  • Chapter 8, “Operators”
  • Chapter 9, “Routines”
  • Chapter 10, “Object-Oriented Programming”
  • Chapter 11, “Development Techniques”
  • Chapter 12, “Globalization” – (Explains how to localize a program in Visual Studio so that it works in multiple places. Also looks at several localization issues.)
  • Chapter 13, “Data Storage”
  • Chapter 14, “.NET Libraries” – (Describes some of the most-useful libraries for writing .NET programs.)

You can read the 14 chapters in any order, jumping around “to suit your interests and needs,” the author adds.

That’s the hallmark of a good reference book.

#

Taking Up Collections

Developer’s Guide to Collections in Microsoft .NET
By Calvin Janes
(Microsoft Press, paperback, list price $34.99; Kindle edition, list price $23.99)

“This book,” the author cautions, “is not a .NET primer for beginners; it’s intended for developers already conversant with .NET and comfortable with either the C# or Visual Basic .NET language.”

Developer’s Guide to Collections in Microsoft .NET is heavy on how-to code examples and exercises, and all sample projects can be downloaded from a web page specified in the text. Many of the code examples conveniently are shown both in C# and Visual Basic.

The book is divided into 11 chapters that are grouped into four parts:

  • Part 1, Collection Basics
  • Part II, .NET Built-in Collections
  • Part III, Using Collections
  • Part IV, Using Collections with UI Controls

There is also a nicely detailed, 14-page index.

“The book is arranged so that developers who are new to collections can get started quickly, and those who are already familiar with collections can treat the book as a useful reference,” the author says.

He has included a helpful table titled “Finding Your Best Starting Point in This Book.” For example, if you are not new to .NET and want to learn how to query your collections with the Language Integrated Query (LINQ), the table advises: “Read through Chapter 7 in Part III.” That’s the “Introduction to LINQ” chapter.

The author says he wanted to create “a one-stop shop for anyone struggling with collections: from beginners to experts who just need a reference or a few pointers here and there.”

With this fine work, he has met that goal. Its 624 pages are packed with good how-to collections information, clearly explained and illustrated, from how to implement arrays and synchronize data across threads to how to use simple data binding to display collections in Windows Forms®, Windows Silverlight® and Windows Presentation Foundation®.

Si Dunn

Advertisements

A gift for the programmer who has everything? The Art of Readable Code – #programming #bookreview

The Art of Readable Code: Simple and Practical Techniques for Writing Better Code
By Dustin Boswell and Trevor Foucher
(O’Reilly, paperback, list price $34.99; Kindle edition, list price, $27.99)

The software world is full of bad code.

Code that was badly written; code that has been reworked — badly — by dozens of undisciplined programmers; code written in haste to patch or hide a problem; code written without comments that can help you decipher what the previous programmer was thinking — or not thinking; code written by people like me, who didn’t know much at all about programming but had to produce some emergency code anyway, because the real programmers were away on vacation.

The Art of Readable Code could be a very useful book to give the programmer in your life — whether he or she is new to computer programming or an open-minded mid-career professional looking to make some improvements in how they work.

The book focuses on “basic principles and practical techniques” that programmers can apply each time they begin a new coding project or find themselves patching an old one.

The authors present what they call their “Fundamental Theorem of Readability.” In their view: “Code should be written to minimize the time it would take for someone else to understand it.”

For example, “smaller” may not always be better. A one-line expression may be more understandable to other programmers if it is broken into two lines of code.

The 190-page book illustrates its concepts with examples of code from several different programming languages, including C++, Python, JavaScript, and Java. The authors add: “We’ve avoided any advanced language features, so even if you don’t know all these languages, it should still be easy to follow along. (In our experience, the concepts of readability are mostly language-independent, anyhow.)”

The Art of Readable Code has 15 chapters and an appendix and is structured in four parts:

  • Part 1: Surface Level  Improvements – (Naming, commenting and aesthetics that can be applied to every line of code)
  • Part 2: Simplifying Loops and Logic – (Refining loops, logic, and variables so they are easier to understand)
  • Part 3: Reorganizing Your Code – (Higher-level ways to organize large blocks of code and go after problems at the function level)
  • Part 4: Selected Topics – (Applying “easy to understand” to software testing and to a larger data structure coding example)

The authors state: “It’s a valuable skill to be able to explain an idea ‘in plain English….The same skill should be used when ‘presenting’ code to your reader. We take the view that source code is the primary way to explain what a program is doing. So the code should be written ‘in plain English.'”

The book itself is smoothly written and nicely illustrated, not only with cartoons but with some very clear code examples that can be quickly applied.

Si Dunn

Can ‘edumanga’ save us from our educational malaise? The Manga Guide to Biochemistry – #bookreview

The Manga Guide to Biochemistry
By Masaharu Takemura and Office Sawa, with illustrations by Kikuyaro
(No Starch Press, paperback, list price $24.95)

Biology and chemistry were never my top subjects, and my chances of becoming a biochemist are less than zero now, in this universe.

But even an old dog like me can learn a few biochemistry tricks with the help of manga, the smart, refreshing Japanese comic book alternative to turgid textbooks.

Indeed, many American high school and college students may now need all the manga they can get to help stem our worrisome national decline in science and mathematics scores. 

Since 2008, No Starch Press has been translating into English and publishing a series of Manga Guides originally from Japan. These offer entertaining comic introductions to tough subjects such as calculus, physics, molecular biology, and relativity.

The approach is known as “educational manga” or “edumanga,” and many U.S. educators, reviewers and media outlets are praising it as a fresh hope for getting young students interested in tough subjects critical to America’s future.

This new volume from No Starch Press, The Manga Guide to Biochemistry,  dives into its tricky topics in a very engaging way. The comic’s young protagonist, a girl named Kumi, unlocks many of the secrets of healthy eating and, along the way, learns some of the key science of biochemistry. By going on and off fad diets, she begins to understand how the body metabolizes carbohydrates, lipids, and alcohol, and how mitochondria produce ATP, and how DNA is transcribed into RNA.

Kumi is helped in her quest by her brainy friend Nemoto, by Nemoto’s biochemistry professor, Dr. Kurosaka, and by Robocat, a friendly endoscopic robot.

(Trust me, when you are being endoscoped, you want everyone and everything to be friendly.)

No Starch Press publisher William Pollock has reported that the “easily digestible” manga comic format is proving popular not only with “college and high school students tired of dry textbooks” but also grabbing the attention of “younger readers interested in learning real math and science.”

Says Pollock:  “The Manga Guides are great supplements to college-level courses, but we’ve also heard from parents whose nine- and ten-year-olds learned statistics and physics from these books. The story and comics almost hide the fact that readers are actually gaining solid technical knowledge.”

Not many comic books have kid characters dealing with topics such as the hyperbola of the Michaelis-Menten equation or the sigmoid curve of an allosteric enzyme. And not many comic books can help you  understand (if you don’t already know) the metabolism of substances such as carbohydrates, lipids, proteins, and alcohol.

Actually, it’s very hard to hide the biochemistry when brainy Nemoto is intoning: “And if just a base and a pentose bond (without a phosphate), the result is called a nucleoside.”

But that’s okay. As the book says: “Whether you’re an amateur scientist, a medical student, or just curious about how your body turns cupcakes into energy, The Manga Guide to Biochemistry is your guide to understanding the science of life.”

Or, at least, it’s your guide to appreciating a valiant effort to make biochemistry more exciting, challenging and  understandable to kids, young  adults — and even aging grownups who often avoided tough subjects in school and now want and need some understanding of what was missed.

Si Dunn

Mac Attack! Three new books for Macintosh users – #bookreview

No Starch Press and O’Reilly Media recently have released three new books aimed at Macintosh users.

One is for Mac newcomers. Another is for those who want to learn a lot more about the Mac OS X Lion operating system without having to read “tersely written” Apple help screens. And the third is for programmers who want “to build native Mac OS X applications with a sleek, developer-friendly  alternative to Objective-C….”

Taking it easy first…

Doing ‘Simple Projects’ with a Mac

My New Mac Lion Edition: Simple Projects to Get You Started
By Wallace Wang
(No Starch Press, paperback, list price $29.95 ; Kindle edition, list price $9.99)

If you are computer newbie or switching over from Windows or other operating systems, here is a good book to help you put your new Mac to work in a hurry.

My New Mac Lion Edition shows how to do practical stuff such as connecting to the Web, playing and burning CDs and DVDs, pulling digital photos off your camera so you can edit and share them, and working with the Mac’s security features.

Given today’s risky Internet and office computing environment, it might have been better to describe the security features much earlier in the book, well before the working-online chapters. But as a practical guide to learning and using the Mac’s key features, this 472-page how-to guide is written well and has plenty of illustrations and clear lists of steps. It even describes several ways to eject a stuck CD or DVD.

The 56 chapters are grouped into seven parts:

  • Part 1: Basic Training – Everything from using the mouse to opening apps.
  • Part 2: Wrangling Files and Folders – Finding files, storing files, sharing files.
  • Part 3: Making Life Easier – Shortcut commands, controls, updating software, saving and retrieving contact information, using appointment calendar, and typing in foreign languages.
  • Part 4: Playing Music and Movies – Playing audio CDs, ripping and burning audio CDs, playing a DVD, listening to online programs and free college lectures, and editing videos with iMovie.
  • Part 5: The Digital Shutterbug – Transferring, editing and displaying digital photographs.
  • Part 6: Surfing and Sharing on the Internet – Numerous things web and email, plus instant messaging with iChat.
  • Part 7: Maintaining Your Mac – Energy conservation, ejecting stuck CDs/DVDs, password protecting  your Mac, encrypting your data, and configuring your firewall.

The author, Wallace Wang, has written several best-selling computer books. He’s also an ongoing career as a standup comic.

More IS Better: What to Do with 50+ Programs and 250 New Features

Mac OS X Lion: The Missing Manual
By David Pogue
(O’Reilly, paperback, list price $34.99)

David Pogue created the popular Missing Manual series, and the New York Times technology columnist definitely knows how to put together a good how-to book.

His 909-page Mac OS X Lion: The Missing Manual is exactly what you need to become (over time and with diligent effort, of course) a Mac power user. It’s also what you need if you’d rather settle for being a well-informed user who likes having a handy source  for looking up information about a Mac feature or program.

In this book, you begin well beneath the “Hello, World!” level by learning to say “oh-ess-ten,” not “oh-ess-ex.” Once you master that, you get to move into “The New Lion Landscape,” where you are informed that “Apple’s overarching design philosophy in creating Mac OS X was: ‘Make it more like an iPad.'”

Then, you quickly learn how to use “Full Screen Mode, Safari” and “Full Screen Apps, Mission Control.” And, by the way, you are still officially in Chapter 0 at this point (that’s “zero,” not “oh”).

Pogue’s book is smoothly written. (You don’t, after all, just luck into writing for the Times.) It has a good array of screenshots and other illustrations. And it offers plenty of tips and notes amid the instructional paragraphs.

The book’s six parts (with seven chapters each) are focused as follows:

  • Part 1: The Mac OS X Desktop – “[C]overs everything you see on the screen when you turn on a Mac OS X computer….”
  • Part 2: Programs in Mac OS X – Describes “how to launch them, switch among them, swap data between them, use them to create and open files, and control them using the AppleScript and Automator automation tools.”
  • Part 3: The Components of Mac OS X – “[A]n item-by-item discussion of the individual software nuggets that make up this operating system–the 29 panels of System Preferences and the 50-some programs in your Applications and Utilities folders.”
  • Part 4: The Technologies of Mac OS X – “Networking, file sharing, and screen sharing…” plus “fonts, printing, graphics, handwriting recognition…sound, speech, movies…” and even some looks at how to use “Mac OS X’s Unix underpinnings.”
  • Part 5: Mac OS X Online – “[C]overs all of the Internet features of Mac OS X.” Everything from email to chatting to working in the cloud, and even “connecting to, and controlling, your Mac from across the wires — FTP, SSH, VPN, and so on.”
  • Part 6: Appendixes – These include a Windows-to-Mac dictionary (for Windows refugees), information on installing Mac OS X, troubleshooting information, and “a thorough master list of all the keyboard shortcuts and trackpad/mouse gestures in Lion.”

If you’re serious about using your Mac and weary of opening endless not-so-helpful help screens, you should seriously consider owning this book.

A Programmer’s Guide to MacRuby

MacRuby: The Definitive Guide
By Matt Aimonetti
(O’Reilly, paperback, list price $39.99; Kindle edition, list price $31.99)

“MacRuby,” the author says, “is Apple’s implementation of the Ruby programming language on top of the Objective-C technology stack.”

His book is a straightforward, no-nonsense guide intended to show developers how “to write native applications for the Cocoa environment using the popular Ruby syntax as well as the well-known and robust Objective-C and C libraries.”

He declares his work “neither a Ruby book nor a Cocoa book,” but states that “it should provide you with enough information to understand the MacRuby environment and create rich applications for the OS X platform.”

MacRuby: The Definitive Guide is segmented into two major parts. Part 1 (“MacRuby Overview”) introduces MacRuby, including what it is, how it’s installed, how it works, what you can do with it, and how it relates to what you already probably know. Part 2 (titled “MacRuby in Practice”)  “covers concrete examples of applications you might want to develop in MacRuby.”

Using short, concise code examples, Matt Aimonetti helps the reader dive straight into MacRuby, beginning at the classic “Hello, World!” entry point, with a little twist.

In just 35 lines of code, you learn how to build a graphical user interface (GUI) application that displays the words “MacRuby: The Definitive Guide” in a window with a button. The window shows “Hello World!” within a box, and your computer speaks “Hello, world!” when you click on the button.

The first eight chapters focus on topics such as: introduction, fundamentals, foundation, application kit, Xcode, core data, and getting deeper into the process of “developing complex apps.”

The topics of the final five chapters are: (1) creating an Address Book example; (2) creating an application that “uses the user’s geographical location and a location web service”; (3) using MacRuby in Objective-C projects; (4) using Objective-C code in MacRuby apps; and (5) using Ruby third-party libraries. 

Before reading this book and tackling the code, the author recommends having some programming experience and basic familiarity with object-oriented programming. You also should get a basic overview of the Ruby language by visiting its main website.

Si Dunn 

Droid X2: The Missing Manual – #droid #bookreview

Droid X2: The Missing Manual
By Preston Gralla
(O’Reilly, paperback, list price $19.99; Kindle edition, list price $9.99)

Got, getting or giving a Droid X2 smartphone?

Consider adding this useful how-to manual to the mix. Droid X2: The Missing Manual bills itself as “The book that should have been in the box.” But it’s likely much bigger than the phone’s box.

The 399-page manual, written by veteran technology writer Preston Gralla, is nicely structured, well-illustrated and chock full of information on using the Droid X2’s many features. The book is organized into six parts.

 Part 1 covers “Android Basics.” It gives a guided tour of features and shows how to make calls, do text messages, manage contacts, use Caller ID, make conference calls, and handle other tasks.

Part 2 focuses on “Camera, Pix, Music, and Video” and how you can use a Droid X2 to take photographs, play and manage music, and record, edit and view videos.

Part 3, “Maps, Apps, and Calendar,” shows “how to navigate using a GPS, to find any location in the world with maps, to find your own location on a map, to get weather and news, to use a great calendar app, and to synchronize that calendar with your Google calendar, or even an Outlook calendar,” Gralla writes.

Part 4, “Android Online,” discusses “everything you need to know about the Droid X2’s remarkable online talents.” This includes getting online over Verizon’s network or a wi-fi hotspot, using your Droid X2 as a portable G3 hotspot, checking email, surfing the Internet and downloading and using apps.

Part 5 covers “Advanced Topics,” including syncing and transferring files between a Droid X2 and a Mac or a PC, using your voice to control your Droid, and using your Droid at your workplace. Part 5 also includes a nice listing of Droid X2 settings.

Part 6, “Appendixes,” has three “reference chapters” showing how to activate a Droid X2, which accessories are available, and how to troubleshoot various issues.

This “Missing Manual” includes a link to a website where you can keep up with updates and changes to the Droid X2, plus corrections to the book.

Meanwhile, a “Missing CD” web page link provided in the book gives clickable links to the websites that are mentioned in the text.

Many new users of the Droid X2 likely will find this book helpful. So will experienced users who have mostly focused on voice calls and text messages and now want to master some of their smartphone’s other features. 

Si Dunn

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

The Perfect Photo: 71 Tips from the Top – A compact, effective how-to guide – #photography #bookreview

The Perfect Photo: 71 Tips from the Top
By Elin Rantakrans and Tobias Hagberg
(Rocky Nook, paperback, list price $19.95 ; Kindle, list price $9.99) 

I used to teach beginning photography classes from books that were much bigger and thicker than this one, yet not as clear, succinct and inspiring in the areas of composition, lighting and editing.

The Perfect Photo: 71 Tips from the Top keeps its promise to show readers “the short and direct path to better photography.” It is a fine blend of good images and straightforward tips that can you can put to use quickly and effectively.

But the first thing you won’t do while following this book is start snapping pictures. The first two chapters’ tips focus on helping you decide what types of images you want to take (portraits, landscapes, wildlife, sports, etc.), selecting the right equipment to meet those desires, and learning to use the adjustments and features on your camera and lenses.

 In Chapter 3, “Capturing the Best Light,” you learn how work with different types of natural light, and in Chapter 4, nearly halfway through the 128-page book, you finally get to the elements of composition, such as perspective, using details, and telling a story.

Chapter 5 is titled “Impressive Landscapes,” and it does give some good tips and photographic examples. But inexplicably, it also contains instructions on, and examples of, how to get close enough to photograph insects and animals.

Chapter 6 is a good, concise tutorial on lighting and shooting individual and group portraits.

Chapter 7 covers capturing motion or the sense of motion using fast or slow shutter speeds and available light or flash.

Chapter 8, “Effective Use of Flash,” deals with topics such as bounce flash and avoiding red eye, plus using flash to minimize shadows in a daylight shot.

Chapter 9, “Starting Out in the Digital Darkroom,” gives a brief tutorial on how to back up, edit, enhance and store digital photographs and how to reduce picture file size for emailing.

The Perfect Photo will not transform you into the next Ansel Adams or Henri Cartier-Bresson. But, if you are still at the “smiley snaps” stage of digital photography, it is an excellent starting guide.

It can show you what you need to know – and what you need to have — to create better, more endearing and more enduring photographs.

Si Dunn