- Optimize the slowest thing
- Light and exposure for digital photographers
- Are computing books obsolete?
- Going over to the dark side
- Is "professional software developer" an oxymoron?
- The Ruby Programming Language (the book)
- Hacking, The Book
- iPhone Open Application Development
- Books for Learning C# 3.0
- LINQPad LINQ Query Builder
June 26, 2008 | Comments: (0)
Yesterday I was writing the back cover copy for The C# Programming Language, Third Edition. As a bonus, I got to read the book in draft form. This is a great book, even better than the previous editions because it's annotated. I'm not sure when it'll be available, but you can pre-order it from Amazon.
Disclosure: I used to be Series Editor for the Microsoft .NET Development Series, so you'll find my name in previous editions of this book. I'm not doing that any more, although I do still take on occasional writing, editing, and reviewing work for those folks.
One of the annotations struck me, and I'd like to share a little bit of it with you. (I'll try to stay within the limits of Fair Use.) It's by Eric Lippert, and it annotates a section of the specification that talks about the instantiation overhead of classes and structs:
Always remember that it makes little sense to optimize anything other than the slowest thing. If your program is not gated on heap allocations in the first place then spending any time deciding whether to use structs or classes for performance reasons is not an effective use of time. Find the slowest thing, and then optimize that.
Find the slowest thing, and then optimize that. Great advice. It reminds me of the chemical principle of the rate-limiting step. It's also something that's easy to forget when you're designing a program that you want to run fast. Don't try to optimize it before you write it. First make it run correctly, then make it run fast.
You can find another take on this, possibly a bit extreme, over at Tim Bray's WideFinder 2 project. The latest posting on that is here.
Posted by Martin Heller on June 26, 2008 08:02 AM
June 15, 2008 | Comments: (0)
Light and exposure for digital photographers

Practical Artistry: Light & Exposure for Digital Photographers
By Harold Davis
First Edition April 2008
Pages: 176
ISBN 10: 0-596-52988-0 | ISBN 13: 9780596529888
I started my serious exploration of photography as a teenager in the 1960s, using a WW II-era Leica borrowed from an Uncle. I shot B&W film, since the old Leitz Wetzlar lenses weren't designed for color. If I needed a light measurement more accurate than my eyeballs, I'd pull out a separate light meter, since the old Leica didn't have one.
While a graduate student in the 1970s, I invested in an Olympus OM-1 SLR, a breakthrough at the time for size and weight in a 35mm SLR, but definitely a manual camera: its only electronic doodads are a match needle light meter and a synchronized hot shoe for an external flash. I still shoot with that camera, but not often: I finally succumbed to the digital photography bug when my artist sister upgraded to a digital SLR and gave me her old Nikon Coolpix 5700. While most of my photographic skills apply to the new medium, a few things required adjustments to my thinking, such as the concept of a digital ISO setting and the multitude of shooting options in a digital camera. As you might expect from a die-hard manual photographer, I'm less than satisfied with the Coolpix' fully automatic default mode.
I'm finding Light & Exposure for Digital Photographers very helpful for making that shift. It's a beautiful collection of images as well as an education. I find Davis's explanations of the fundamentals clear and easy to understand, but I'm learning even more from his notes about the thinking and process that went into each image.
Davis also blogs, at http://www.digitalfieldguide.com/blog/. His blog entries are similar to the images in the book: he combines each image with some notes about what he was interested in emphasizing, and how he got there.
Posted by Martin Heller on June 15, 2008 08:42 AM
June 12, 2008 | Comments: (0)
While working on a roundup review of Rails IDEs and editors, I tried to draw on my large stack of Rails books, only to find that they're all at least a little out of date. For example, Agile Web Development with Rails: Second Edition basically covers Rails 1.2. Agile Web Development with Rails, Third Edition covers Rails 2, but it's still only available as a beta e-book. That may be a good thing, as the authors will have a chance to add the updates for Rails 2.1. I don't know if they'll actually do that, though.
The Rails Way covers Rails 2.0, but not the changes in 2.1. Advanced Rails Recipes is for Rails 2.0.2.
Can books keep up with the changes to new software? Not just Rails: any new software.
There are ways to handle change. For example, Essential Silverlight 2 Up-to-Date is a combination of a loose-leaf book and Web updates. It was written for Silverlight 2 beta 1; beta 2 has now come out. Update 1 to the book came out in May covering the TextBox control and data binding, but no update for beta 2 has yet appeared.
The necessity for that scheme, and the decreasing sales of computer books, raises an even more disturbing question: Are computing books as a category becoming obsolete?
What do you think?
Posted by Martin Heller on June 12, 2008 09:08 AM
April 24, 2008 | Comments: (0)
A note from daughter #2, who had a choice of a Mac or PC laptop for her Ph.D. program next fall. "SK" is Gerstner Sloan-Kettering Graduate School of Biomedical Sciences, and SK largely uses Macs:
I just confirmed with SK that I want a Mac for next year. It's weird, I feel like I am switching over to the dark side or something.
I feel like they should put "Switching from PC to Mac" as one of those huge life changes that you go through that may cause you undue stress when combined with other life changing events.
It's an odd feeling.
I offered to lend her my copy of David Pogue's Switching to the Mac over the summer. Maybe I should also introduce her to Tom Yager. :)
Her decision was influenced by some recent negative experiences with Windows Vista and Word 2007 on her current laptop as well as the institution's obvious preference for Macs.
Posted by Martin Heller on April 24, 2008 02:50 PM
April 21, 2008 | Comments: (0)
Is "professional software developer" an oxymoron?
I've been reading Emergent Design: The Evolutionary Nature of Professional Software Development by Scott Bain (Addison-Wesley, 2008, $49.99, 0-321-50936-6). I'm finding it a thoughtful book, which makes a good case for the adoption of patterns, refactoring, and test-driven development.
On the other hand, Bain leads with the premise that software development is not currently a profession. Why is that? It's not a matter of being paid for the work: it's because software development is too hard, too unpredictable, too chaotic.
Of course, those are the things that make it fun. Bain admits that as well.
I think it's no stretch to accept Bain's point that medicine is a profession. Bain cites some of the things that go with medicine -- lengthy training, a specialized language, a professional organization, peer review, standards and practices -- as things that define a profession as opposed to a job.
Bain says that software development is by nature a professional activity, and should be conducted as a professional activity. He also says that we're not yet conducting it as a professional activity.
What do you think? Is the phrase "professional software developer" an oxymoron?
Posted by Martin Heller on April 21, 2008 07:36 AM
March 12, 2008 | Comments: (0)
The Ruby Programming Language (the book)

The Ruby Programming Language
By David Flanagan & Yukihiro Matsumoto
First Edition January 2008
Pages: 444
ISBN 10: 0-596-51617-7 | ISBN 13:9780596516178
At one of the Little Language conferences in Cambridge, Yukihiro "Matz" Matsumoto gave a talk on his Ruby language to an audience made up largely of academics, language designers, and language implementers. He got a very warm reception, especially when he shyly admitted that yes, Ruby has lambdas and closures.
When it came time to talk about documentation, Matz held up the 2002 David Reynolds English translation of his own book, published by O'Reilly as Ruby in a Nutshell; then he held up Programming Ruby by David Thomas and Andrew Hunt (Addison-Wesley, 2001), smiled, and said "But if you want a really good book on Ruby, read this one."
Since then, Ruby has matured considerably and taken off in popularity. The expanded and enhanced second edition of Programming Ruby by David Thomas with Chad Fowler and Andrew Hunt (Pragmatic Bookshelf, 2005) covers Ruby through version 1.8. The expanded and enhanced edition of Ruby in a Nutshell by David Flanagan and Matz has been renamed The Ruby Programming Language to reflect its intended status as the K & R of Ruby; it covers Ruby through version 1.9.
The Ruby Programming Language concentrates its 400+ pages on the Ruby language proper. Programming Ruby, 2nd Ed. goes farther afield in its 800+ pages, but has less material on the language itself and more material on ancillary matters. Frankly, both The Ruby Programming Language and Programming Ruby, 2nd Ed. are very good books, and if you're a Ruby programmer (or want to be) you should make room on your bookshelf for both of them.
Posted by Martin Heller on March 12, 2008 01:36 PM
February 21, 2008 | Comments: (0)
Hacking: The Art of Exploitation, Second Edition
By Jon Erickson
Second Edition January 2008
Publisher: No Starch Press
Pages: 480
ISBN 10: 1-59327-144-1 | ISBN 13:9781593271442
I picked up this book equally prepared to love it and hate it. I put it down with decidedly mixed feelings.
There's some valuable information in Hacking about how various exploits against programs, networks, and servers work. It's mixed in with a lot of background about how computer programming works. I eventually found myself scratching my head wondering who the book is really for.
According to the publisher, the first edition of Hacking was a best-seller. Maybe there are a lot of wannabe hackers in the world.
Posted by Martin Heller on February 21, 2008 08:51 AM
February 01, 2008 | Comments: (0)
iPhone Open Application Development
This is yet another oxymoron of the day: Open iPhone. And yet, there's a whole book on the subject, or at least a Rough Cut.
You have to love a book that reads like the ethnic-joke recipe for Chicken Soup. You know the joke: "First, steal one chicken."
In the case of iPhone Open Application Development (O'Reilly, 2008), the joke is that the iPhone is locked, locked, locked. So Chapter 1 of the book is called Breaking into and Setting Up the iPhone. There are extended riffs on what to do when a new version of the OS or of iTunes locks the phone down again.
The authors of this book-in-progress claim that Apple would have to make impossibly huge changes to the iPhone OS to break the application model that they've pieced together by hacking the phone. I suppose they're right.
You know what? I'll wait for the SDK, should Apple ever deign to release it. My chicken-stealing skills aren't what they once were.
Posted by Martin Heller on February 1, 2008 11:36 AM
January 09, 2008 | Comments: (0)
I was surprised at how much the additions to C# 3.0 have changed (and improved) the C# language. Yes, C# 3.0 is backward-compatible, so older C# programs will still work, but using LINQ and the other new features can make a big difference in your new code. It's worth learning the new material.
I currently have four books from O'Reilly that cover C# 3.0, including LINQ, lambda expressions, extension methods, implicitly typed variables, and more. Here's a quick listing for each of them:
Programming C# 3.0 , Fifth Edition
By Jesse Liberty, Donald Xie
December 2007
$49.99 USD
This thoroughly updated tutorial for beginning to intermediate programmers covers C# 3.0 and the newest .NET platform for developing Windows and web applications. Now in its fifth edition...
C# 3.0 Design Patterns
By Judith Bishop
December 2007
$39.99 USD
Want to speed up the development of your .NET applications? Tackle common programming problems with C# design patterns. This guide explains what design patterns are and why they're used...
C# 3.0 Cookbook , Third Edition
By Jay Hilyard, Stephen Teilhet
December 2007
$54.99 USD
Completely updated for C# 3.0 and the .NET 3.5 platform, the new edition of this bestseller offers more than 250 code recipes to common and not-so-common problems...
Head First C#
By Andrew Stellman, Jennifer Greene
November 2007
$49.99 USD
Head First C# is a complete learning experience for object-oriented programming, C#, and the Visual Studio IDE. Built for your brain, this book covers Visual C# 2008, Visual Studio 2008,…
I'm told that C# 3.0 in a Nutshell , Third Edition covers LINQ in more detail than Programming C# 3.0 , Fifth Edition, but I don't yet have a copy of the Nutshell book.
Posted by Martin Heller on January 9, 2008 11:50 AM
January 04, 2008 | Comments: (0)
As I was testing the LINQ to SQL functionality in Visual Studio 2008, I found myself missing the SQL Query Builder. For the relatively simple three-table inner join SELECT queries I needed, I was able to write correct LINQ syntax myself with only a database diagram, IntelliSense and online help for guidance. Writing more complicated LINQ queries freehand felt like it would challenge my nascent LINQ skills.
Do we really have to generate the SQL with SQL Server Management Studio and then translate it into LINQ?
I asked Microsoft, and it turns out that we don't. Joseph and Ben Albahari, the authors of C# 3.0 in a Nutshell, have released a free LINQ query builder (written by Joe), LINQPad.
It requires .NET Framework 3.5. If you have Visual Studio 2008 or Visual C# 2008 Express, then Framework 3.5 will already be installed. LINQPad supports SQL Express, SQL 2000, SQL 2005, and (with some limitations) SQL 2008.
Posted by Martin Heller on January 4, 2008 11:36 AM
November 27, 2007 | Comments: (0)
My discussion of software surprises on Saturday reminded me about the Law or Principle of Least Astonishment, also called the Law or Rule of Least Surprise. This certainly goes back to the early days of Unix, if not before: it is discussed in The Art of Unix Programming, by Eric Raymond, which is online here.
I'm convinced that the originator of the name of this law had a Physics background. The name is strikingly similar to the Law of Least Action, which is the basis of Lagrangian and Hamiltonian mechanics.
Tracking down the origins of the Law of Least Surprise reminded me that I had on my bookshelf at work signed copies of The Tao of Programming and The Zen of Programming, given to me by the author, Geoffrey James, when we were in the same Tai Ji Quan class some years ago.
The entire English text of The Tao of Programming is actually online. Half the pleasure of the book is the Chinese on the facing pages and the layout; that has been lost in the online version. Even though I've studied Chinese and still have my dictionaries, I've never bothered to translate that Chinese -- and I've never asked Geoff what I'd find if I did. I've also never asked whether he minded the online version of his book.
The passage on the 'Law of Least Astonishment' follows:
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity.
A program should follow the 'Law of Least Astonishment'. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least.
A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances.
If the program fails in these requirements, it will be in a state of disorder and confusion. The only way to correct this is to rewrite the program.
Posted by Martin Heller on November 27, 2007 07:45 AM
November 16, 2007 | Comments: (0)
Beowulf: Does Motion Capture Make Sense?
I'm a big fan of Beowulf: no, not the new movie, the Anglo-Saxon epic poem. I've read it several times in the original and in modern English translations, most recently in the bilingual edition with Seamus Heaney's fine verse translation.
I haven't yet seen the movie: maybe I'll get to it this weekend. I'd like to see it in IMAX 3D rather than at my local multiplex. I'm not sure I'll be able to do that, but I'll try. I may decide that's it's a travesty of the poem, but I'll try to judge it on its merits.
The new Beowulf movie uses motion capture to capture live performance data for use in digital animation. The technology used is quite a bit more sophisticated than rotoscoping, but not state-of-the-art: in Beowulf, the body and face performances were captured with Vicon, which captures a few hundred markers. The state-of-the-art is Mova Contour, which captures hundreds of thousands of points, in what Mova calls markerless high-resolution surface capture.
Reviewers are calling Beowulf "creepy" and "uncanny." The Times blogger David F. Gallagher said "When it was over, I felt relieved to be back in the company of uncreepy flesh-and-blood humans again."
I can certainly see using motion capture for video games. I can sort of see it for TV. I'm not sure whether it will ever make sense for movies, at least for movies being viewed on a big screen.
What do you think?
Posted by Martin Heller on November 16, 2007 07:05 AM
November 09, 2007 | Comments: (0)
Have you ever read a programming book and immediate discovered the answers to a dozen mysteries that had been bothering you? That happened to me yesterday when I opened up Silverlight 1.0 Unleashed, by Adam Nathan (Sams, 2007, 272 pp., $39.99, ISBN 978-0-672-33007-0).
Adam is the senior developer who originally built Popfly with Silverlight, working with John Montgomery. (His team has since gotten a little larger.) Popfly is probably the most complicated product that has been built with Silverlight so far; consequently, Adam knows the ins and outs of Silverlight better than most.
I was pleasantly surprised to discover that Silverlight 1.0 Unleashed was printed in color, and uses that color effectively. Programming books are usually printed in black and white with grayscale illustrations to keep the cost down.
What really impressed me were the non-obvious warnings and tips sprinkled throughout the book: WARNING: Inline XAML doesn't work in Firefox unless the DOCTYPE element is removed! WARNING: The Boolean used for isWindowless must be specified as a string! FAQ: How can I provide text input or editing functionality within my Silverlight content? (Use an HTML INPUT element positioned over windowless Silverlight 1.0 content.)
That's the kind of advice, born of hands-on experience, that can make the difference between a project that you complete on time and under budget, and a project that drags on forever and turns into a black hole for resources. If you're working on Silverlight 1.0 projects, you need this book.
Posted by Martin Heller on November 9, 2007 08:29 AM
September 05, 2007 | Comments: (0)
Programming Collective Intelligence
I receive dozens of computer books to review every month. Many of them are pretty good, but they tend to blend together. That's understandable, since so many of them cover the same products and languages.
In one of my favorite Newhart episodes (that's the 1982-1990 series in which Bob plays Dick, an innkeeper and author of how-to books) Dick is sued for plagiarism by a rival author of how-to books. One of the points of similarity cited in the trial is the sentence "Remove the two screws." How many ways are there of saying that? How many ways are there of explaining the precedence of operators in C++?
Once in a while a book comes in that breaks the mold. Programming Collective Intelligence: Building Smart Web 2.0 Applications, by Toby Segaran (O'Reilly, 2007, 358 pp., ISBN 9780596529321, $39.99) is one of them.
Basically, Programming Collective Intelligence is a book about analyzing Web data using statistical and AI methods in Python. It's more interesting than that sounds, however, at least partly because it's very practical and pragmatic.
What does it cover? An interactive TOC is online here; the summary (from the back cover copy) follows:
Want to tap the power behind search rankings, product recommendations, social bookmarking, and online matchmaking? This fascinating book demonstrates how you can build Web 2.0 applications to mine the enormous amount of data created by people on the Internet. With the sophisticated algorithms in this book, you can write smart programs to access interesting datasets from other web sites, collect data from users of your own applications, and analyze and understand the data once you've found it.
Programming Collective Intelligence takes you into the world of machine learning and statistics, and explains how to draw conclusions about user experience, marketing, personal tastes, and human behavior in general -- all from information that you and others collect every day. Each algorithm is described clearly and concisely with code that can immediately be used on your web site, blog, Wiki, or specialized application. This book explains:
Each chapter includes exercises for extending the algorithms to make them more powerful. Go beyond simple database-backed applications and put the wealth of Internet data to work for you.
- Collaborative filtering techniques that enable online retailers to recommend products or media
- Methods of clustering to detect groups of similar items in a large dataset
- Search engine features -- crawlers, indexers, query engines, and the PageRank algorithm
- Optimization algorithms that search millions of possible solutions to a problem and choose the best one
- Bayesian filtering, used in spam filters for classifying documents based on word types and other features
- Using decision trees not only to make predictions, but to model the way decisions are made
- Predicting numerical values rather than classifications to build price models
- Support vector machines to match people in online dating sites
- Non-negative matrix factorization to find the independent features in a dataset
- Evolving intelligence for problem solving -- how a computer develops its skill by improving its own code the more it plays a game
Posted by Martin Heller on September 5, 2007 08:10 AM
August 24, 2007 | Comments: (0)
Charlie Petzold was one of the pioneer Windows development writers, along with Paul Yao and a few others. I didn't write my first Windows development book until 1992, and by then Charlie's books were so well-established that I consciously positioned Advanced Windows Programming as the book to read after you had already grokked Petzold's Programming Windows.
Charlie's latest book is 3D Programming for Windows (Microsoft Press, 2007, 448 pp., $39.99, ISBN 9780735623941). It's no surprise at all to me that the book is a beauty of clear explication, filled with illuminating examples, and backed by a Media3D library that implements many of Charlie's techniques.
If you like 3D programming, aren't averse to XAML, and have access to Windows Vista or Windows XP, go buy this book. If you're in any doubt, try reading Charlie's blog, where he has been discussing the library and other material from this book for the past few weeks.
Posted by Martin Heller on August 24, 2007 02:47 PM
August 14, 2007 | Comments: (0)
Embedded Programming with the Microsoft .NET Micro Framework
In June and July, I discussed the .NET Micro Framework, the Tahoe Board, and the Tahoe SDK. Since then, the Tahoe SDK has been updated, and Microsoft Press has published Embedded Programming with the Microsoft .NET Micro Framework, by Donald Thompson and Rob S. Miles (288 pp., ISBN 9780735623651, $44.99).
If you downloaded the .NET Micro Framework and had trouble getting started, then Embedded Programming with the Microsoft .NET Micro Framework is exactly the book to get you going.
Don Thompson, a former professional Hollywood child actor, directed the Ubiquitous Computing team effort at Microsoft Research, later called the SPOT initiative, which led to the .NET Micro Framework. Rob Miles works in the Computer Science department of the University of Hull, in England. Together they lay out the .NET Micro Framework in an engaging way.
The book also contains some case studies by other people. One is by Steve Maillet, CTO of Embedded Fusion, and is all about the genesis of the Ball-in-Maze game and the Tahoe board. The other is by Rick Swaney, a developer in the Mobile PC group at Microsoft, and discusses Vista Sideshow gadgets.
Posted by Martin Heller on August 14, 2007 08:52 AM
May 30, 2007 | Comments: (0)
Managing Iterative Software Development Projects
I took Managing Iterative Software Development Projects, by Kurt Bittner and Ian Spence (Addison-Wesley, 2007, 672pp, $49.99, ISBN-10: 0-321-26889-X) home to read over the Memorial Day weekend, and curled up with it on the couch Saturday. My 13-year-old daughter asked what I was reading, so I held it up to show her.
"Managing Iterative Software Development Projects?"
"Yes."
"And you're reading it straight through?"
"Yes."
"That's sick."
"Sick" can be taken a number of ways coming from her, but based on her tone of voice I don't think it was a compliment. To be fair to myself, a science fiction novel and the latest issue of The New Yorker were also on my reading pile at the time.
Reading this book reminded me of why I have always practiced iterative, incremental software development: it's because I was trained as a physicist, not a computer scientist. My formative programming efforts (in the 1960s and 70s) were subservient to mathematical and scientific goals, so I almost automatically fell into a pattern of applying the scientific method to programming: hypothesis, experiment, conclusion, revised hypothesis... I would start with a clear goal for an iteration, and clear criteria for determining whether the program was operating correctly. The source code I wrote became the hypothesis, and running the test cases the experiment.
Computer Science was an emerging discipline at the time. When I was a Physics graduate student at Brown in the 1970s, computer science was taught out of the Applied Mathematics department; now, of course, it is a thriving department in its own right. I taught computer science courses at the Boston University Corporate Education Center for several years in the early 1990s; I have never actually taken a computer science course.
But back to Managing Iterative Software Development Projects. I found this book valuable, in that it crystallized a lot of practices that I'd learned from decades of trial and error experience. Why tackle the hardest parts of a project in an early iteration? Bittner and Spence make it explicit in Chapter 1: you do proof of concepts early to reduce your development risk. Why give the customer frequent builds to review? To reduce requirements misunderstandings early.
It was a holiday weekend, so I didn't finish the entire book: the temptation was too great to start reading the science fiction novel on my pile, and once I started that I was loath to put it down. It's Eifelheim, by Michael Flynn, and I'm not surprised to find that it was nominated for a Hugo award this spring.
I usually like to read physical books, but you can also read parts of Managing Iterative Software Development Projects for free online at Google and Addison-Wesley and Safari. You can also read all of this book and other Addison-Wesley and O'Reilly books online with a monthly Safari subscription.
Posted by Martin Heller on May 30, 2007 06:00 AM
May 04, 2007 | Comments: (0)
Getting Started with Silverlight
Shawn Wildermuth, who wrote the excellent book Pragmatic ADO.NET (Addison-Wesley, 2003, 357 pp, $44.99, ISBN 0-201-74568-2), has been working closely with the Silverlight team at Microsoft. Just in time for the release of Silverlight at MIX07, O'Reilly has released Shawn's "short cut" on Silverlight electronically on the Web.
Getting Started with Silverlight (O'Reilly, 2007, 62 pp, $9.99, ISBN 0-596-51068-3) "introduces you to Silverlight's key features and shows you how to tap into its functionality to spice up your HTML and ASP.NET pages." The book is written to the February Silverlight CTP, which was a preview of Silverlight 1.0, so it covers programming Silverlight with JavaScript, but not programming Silverlight with managed code or using extensible controls.
I'm a fan of Shawn's technical writing, and Getting Started with Silverlight confirms my high opinion. Shawn has a good feeling for what you need to know, and how to present it clearly.
Here's the table of contents:
Why Silverlight? ............................ 2
What Is Silverlight? ........................ 3
Working with Silverlight XAML........... 7
Comparing Silverlight and WPF......... 17
Development Model ..................... 19
Using Silverlight with ASP.NET ........ 42
Using Tools ................................ 54
Finding Examples in the World ........ 61
Summary ................................... 61
For Further Reading ..................... 62
Here's a very short excerpt:
Finding Examples in the World
Beyond the resources that are available from the Silverlight DevCenter (http://msdn.microsoft.com/silverlight), there are a number of very good examples of Silverlight working on the Web today. They include:
• Dr. Greenthumb (a Silverlight Game): http://labs.blitzagency.com/?p=50 (http://tinysells.com/82)
• Silverlight Scratchpad: http://notstatic.com/archives/65 (http://tinysells.com/83)
• Silverlight Egg Timer: http://blogs.interfacett.com/simon/2006/12/11/wpfe-egg-timer.html (http://tinysells.com/84)
Posted by Martin Heller on May 4, 2007 07:00 AM
April 27, 2007 | Comments: (0)
Two books live on my desk when I'm working on Web pages with client-side scripting: David Flanagan's JavaScript: The Definitive Guide, 5th Edition (O'Reilly, 2006, 994 pp., $49.99, ISBN 978-0-596-10199-2), and Danny Goodman's Dynamic HTML: The Definitive Reference, 3rd Edition (O'Reilly, 2007, 1307 pp., $59.99, ISBN 978-0-596-52740-2).
They're both huge books, and their content overlaps substantially, but they both keep earning their spots. I reach for Flanagan if the question in my mind is primarily about some aspect of JavaScript, and for Goodman if the question is primarily about some aspect of HTML, XHTML, CSS or the Document Object Model.
Flanagan has two tutorial sections. Part I explains core JavaScript, and Part II explains browser DOM scripting. I read them once: they were nice. I don't think I have looked at them again since the latest edition of the book arrived.
It's the reference sections of the two books that I
return to over and over. Flanagan Part III is a complete reference to core JavaScript 1.5 and ECMAScript version 3. Flanagan Part IV is a reference for client-side JavaScript. It's notoriously difficult to write sophisticated cross-browser JavaScript: Flanagan helps you figure out what to do when, for example, an area is outside the DOM Level 2 standard and implemented differently in IE and Firefox.
Goodman Part I is a Dynamic HTML reference, with five subsections: HTML and XHTML, DOM, Events, Style Sheets, and core JavaScript. Part II has cross references to attributes, properties, methods and events. Part III has tables of color names, HTML character entities, keyboard event character values, editable content commands, HTML/XHTML DTD support, and a cross reference to Mozilla-based browser version numbers.
Posted by Martin Heller on April 27, 2007 06:00 AM
April 16, 2007 | Comments: (0)
Windows PowerShell: An Introduction
One of the hazards that Microsoft groups face when they launch their products is competition for attention from other Microsoft groups with bigger marketing budgets. Think about the poor Windows PowerShell team, who basically launched at about the same time as Windows Vista and Office 2007. It was no contest.
If you haven't already heard about Windows PowerShell by that name, you may have heard of it by its rather pretentious code name, Monad, or its temporary name Microsoft Shell, abbreviated MSH. I'm sure that Jeffrey Snover and the PowerShell team wanted "Monad" to convey the unified interface they were building.
Then why do I think Monad was a pretentious choice? It's the other meanings of the term. In philosophy, the term Monad, meaning the "ultimate, indivisible unit" goes back to Pythagoras, and was used by Plato, Aristotle, the neo-Platonists, Liebniz, and the Theosophists to describe some rather lofty concepts, often verging on the divine. In mathematics, a monad is a type of functor in category theory. In functional programming languages, for example Haskell, a monad is a rather complicated implementation of sequential functors.
So, what is Windows PowerShell? It's a command line shell, a programming language, and a unified interface; it's not your father's command line shell. From the Windows PowerShell Getting Started Guide:
Windows PowerShell is a new Windows command-line shell designed especially for system administrators. The shell includes an interactive prompt and a scripting environment that can be used independently or in combination.
Unlike most shells, which accept and return text, Windows PowerShell is built on top of the .NET common language runtime (CLR) and the .NET Framework, and accepts and returns .NET objects. This fundamental change in the environment brings entirely new tools and methods to the management and configuration of Windows.
Windows PowerShell introduces the concept of a cmdlet (pronounced "command-let"), a simple, single-function command-line tool built into the shell. You can use each cmdlet separately, but their power is realized when you use these simple tools in combination to perform complex tasks. Windows PowerShell includes more than one hundred basic core cmdlets, and you can write your own cmdlets and share them with other users.
Like many shells, Windows PowerShell gives you access to the file system on the computer. In addition, Windows PowerShell providers enable you to access other data stores, such as the registry and the digital signature certificate stores, as easily as you access the file system.
I have found PowerShell to be extremely useful for exploring the operating system. One of the data stores it supports is WMI, Windows Management Instrumentation, which is a wrapper for many system structures, so you can use PowerShell to dig into the guts of things like Win32 processes, add-remove program lists, and system hardware. It also supports COM, so you can use it to script all sorts of applications and controls that expose COM interfaces.
I was under the mistaken impression that PowerShell would ship with Windows Vista. In fact, you need to download and install PowerShell separately; make sure that you get the right version for your operating system (Vista, XP, Windows Server 2003, or Longhorn Server) and locale, and that you have .NET Framework 2.0 installed before you install PowerShell.
The documentation that comes with the Windows PowerShell download will get you started. However, I have found Windows PowerShell in Action, by Bruce Payette (Manning, 2007, 576 pp, ISBN 1-932394-90-7, $44.99) to be an excellent supplement. Payette is a co-designer of the PowerShell language and the principal author of the language implementation. His book not only tells you all the secrets of PowerShell, it tells you what the team was thinking when they designed and implemented the language.
Posted by Martin Heller on April 16, 2007 06:00 AM
March 12, 2007 | Comments: (0)
Free Lessons for Beginning .NET Programmers
When the free Express editions of Visual Studio were first announced, the Microsoft .NET Development Series got quite a few proposals for books aimed at amateur and novice programmers. As Series Editor, I always had to ask how much money someone would pay to learn how to use a free development environment. My gut feeling was "nothing:" the free IDEs would need free training, meaning that the business opportunity for Express-specific books was practically non-existent.
It has been a long time coming, but Microsoft now has a site for this, the Beginner Developer Learning Center. At first examination, I'm quite impressed.
The site is divided into two major tracks, one for Web development and one for Windows development. Within each track, there are lessons in each of three tiers. Tier 1 lessons assume no prior software development knowledge; tier 1 lessons assume that you understand the foundations of .NET development. Tier 3 lessons "expand your knowledge of Windows and Web development with more advanced concepts such as data access and debugging." (Pay no attention to the man behind the curtain rolling his eyes at this last statement.)
In addition, the Learning Center has a Kid's Corner with cartoony introductions to C#, VB, and Web development. I found these corny myself, but I haven't yet tried them out on my middle-school-aged kids.
For reference, the site has video "how-to" guides to Windows Forms and Web Forms controls in C# and Visual Basic, and a video "how-do-I" series about ASP.NET. Finally, it has a "Tips and Tricks" series of assorted video and PDF guides, for things like creating templates and deploying applications with ClickOnce.
These short video guides are very much in the same spirit as the short videos we produce here on InfoWorld.com. As with our videos, the production values might not be anything to write home about, but the information presented is right on the money.
Posted by Martin Heller on March 12, 2007 06:00 AM
February 21, 2007 | Comments: (0)
When Thomas Pynchon's new novel Against the Day came out last November, I read all the reviews I could find. For example, Michiko Kakutani led with this scathing description in the November 20th New York Times:
Thomas Pynchon's new novel, "Against the Day," reads like the sort of imitation of a Thomas Pynchon novel that a dogged but ungainly fan of this author's might have written on quaaludes. It is a humongous, bloated jigsaw puzzle of a story, pretentious without being provocative, elliptical without being illuminating, complicated without being rewardingly complex.
The opinions were not uniform, by any means. Less than a week later, Liesl Schillinger ran a much more favorable review in the New York Times Sunday Book Review:
IN "Against the Day," his sixth, his funniest and arguably his most accessible novel, Thomas Pynchon doles out plenty of vertigo, just as he has for more than 40 years. But this time his fevered reveries and brilliant streams of words, his fantastical plots and encrypted references, are bound together by a clear message that others can unscramble without mental meltdown. Its import emerges only gradually, camouflaged by the sprawling absurdist jumble of themes that can only be described as Pynchonesque, over the only time frame Pynchon recognizes as real: the hours (that stretch into days) it takes to relay one of his sweeping narratives, hours that do "not so much elapse as grow less relevant."
That's right: one Times reviewer hated it, and another liked it. Louis Menand, writing in the New Yorker, came in mixed:
Thomas Pynchon is the apostle of imperfection, so it is arguably some sort of commendation to say that his new novel, "Against the Day" (Penguin; $35), is a very imperfect book. Imperfect not in the sense of "Ambitious but flawed." Imperfect in the sense of "What was he thinking?"
By the way, MetaCritic has a list of the reviews of Against the Day here, ordered by favorability. There are 9 opinions rated outstanding, 6 favorable, 4 mixed, and 6 unfavorable. Kakutani ends the list.
Now, I have read and enjoyed all of Pynchon's other novels, some more than once, and I eagerly anticipated this one. But when I picked up a copy of Against the Day at a local bookstore and browsed through it with Menand's criticism fresh in my mind, I could really see his points, and found what I was reading irritating. Despite the 30% discount on offer, I put the book back on the shelf.
Three months later, my wife came across a copy in our local library. "At least read a few chapters with an open mind," she told me. "If you don't like it, I'll take it back to the library. If you do like it, I'm sure I can find one at a discount through Alibris."
And in fact, this time I really enjoyed the initial chapters. I now have my own copy, and am about a third of the way through the book.
What does all of this have to do with InfoWorld? One of my roles is reviewer. InfoWorld almost never has the luxury of running multiple reviews of a product. If I hate a product like Kakutani hated Against the Day, there is no Schillinger to offer an opposing opinion.
Reviewing is a special kind of journalism. Reviewing, by definition, is not just about reporting the facts: as a reviewer, I also have to say what I think. And here is where I have to consider the anxiety of influence.
I try to suggest that readers try a product for themselves, and I try to describe who might and might not find a product useful. But if I have set expectations with my strongly voiced opinions, I can color your initial evaluation, like Menand's review colored my initial impression of Against the Day.
Most software gives you a 30-day evaluation period. Is that enough for you to shake my opinions out of your mind and decide what you think? Is software quality and applicability easier or harder to evaluate than the "goodness" of a Pynchon novel? Am I doing you a service by telling you what I think about a product, or am I leading you astray?
Posted by Martin Heller on February 21, 2007 06:00 AM
February 19, 2007 | Comments: (0)
The other day I got a press release that started:
Sehr geehrte Redaktion,
Letzte Woche sind einige Neuerungen auf http://www.canoo.net livegeschaltet worden: Vorschläge wie bei Google Suggest...
I got a big kick out of reading the German, but I can't expect you to share that. The English translation was given later in the same release:
Dear editor,
Last week the following changes went live at http://www.canoo.net: AJAX Preview similar to Google Suggest...
I had just been reading Ajax Design Patterns by Michael Mahemoff (O'Reilly, 2006, 635 pp., $44.99, ISBN 0-596-10180-5), and I thought to myself: "Ah, the Suggestion pattern. I wonder how they're doing on throughput, since that pattern typically incurs an XMLHTTPRequest call to the server on every keystroke, unless you throttle the calls." When I tried out the site, I was pleasantly surprised at how quickly the word list popped up.
When I opened the back cover of the book and found the Suggestion pattern listed, I turned to the page reference, and reread the entry. Sure enough, the pattern was based on Google Suggest, as well as Kayak, Delicious, and Amazon. I remembered the throughput problem and the throttling solution correctly, but rereading the pattern entry reminded me of several coding details, alternative solutions, and related patterns.
Since reading the GoF Design Patterns book years ago (note to self: where has that book disappeared to?) I have found it useful to think in terms of design patterns for much of my software development work. It has also been useful to refer to design patterns when discussing solutions with other developers. I have found the various extensions to the design patterns useful as well: C# Design Patterns, J2EE Design Patterns, Enterprise Integration Patterns, and Refactoring to Patterns.
Ajax Design Patterns seems to be the right book at the right time. It covers 60(!) design patterns for Ajax development, classified into four groups: Foundational Technology, Programming, Functionality and Usability, and Development. XMLHTTPRequest Call is a Foundational Technology pattern. Submission Throttling is a programming pattern. Suggestion is a Functionality and Usability pattern. DOM Inspection is a Development pattern.
This is an excellent book. I could quibble about the number of minor typos, and I could wish for an updated edition, especially in the area of Ajax frameworks and libraries. On the other hand, the book is supported by a Wiki, so current content is as close as your Web browser.
Posted by Martin Heller on February 19, 2007 06:00 AM
February 14, 2007 | Comments: (0)
On January 24, I discussed a not-very-focused book on Ajax, and mentioned its diversion to a discussion of Rails:
"Near the end of the journey, we detour to Ruby on Rails, and finally get to its Ajax support; I'm not completely sure why Woychowsky bothered with that particular side trip."
And now for something completely different: a pleasant surprise. Scott Raymond's new book Ajax on Rails (O'Reilly, 2007, 336 pp., $39.99, ISBN 0-596-52744-6) discusses Ajax and Ruby on Rails, focusing on the Ajax support in Ruby on Rails in just about the right depth for most developers, and offering some valuable insight without going too far afield.
Scott is a Rails insider: he's one of the developers of the framework. His book has the unmistakable ring of experience, and it is well-organized and well-written. The chapter on RJS (Ruby-generated JavaScript) is especially welcome, but his chapter on debugging and testing Rails is quite valuable, and his chapters on Rails security and performance will help people lock down and tune up their applications.
I'm not sure how much value the extensive references to the Prototype and script.aculo.us JavaScript libraries will have for Rails developers. Is this just dross to get the page count up, or is it useful? I've done enough JavaScript development that I might come down on the "merest dross" side of the argument, but there may well be Ruby developers for whom JavaScript is enough of a mystery to justify the space spent on this reference material.
Posted by Martin Heller on February 14, 2007 06:00 AM
January 24, 2007 | Comments: (0)
As I mentioned on January 10th, I'm going through a stack of AJAX books. The first of the bunch is AJAX: Creating Web Pages with Asynchronous JavaScript and XML, by Edmond Woychowsky (Prentice-Hall, 2006, $44.99, ISBN 0-13-227267-9).
In general, this is a well-written book, with a lot of useful information to present. On the other hand, it's written with an attitude: some will find it refreshing or amusing, and others will find it annoying. I started off in the former camp, and ended up in the latter.
Woychowsky starts by discussing Web pages and their taxonomy, introduces Ajax concepts, explains HTML, XHTML, and CSS, and offers a brief introduction to JavaScript. You can skip all that if you already know the material. Then he offers a chapter that discusses "Ajax Using HTML and JavaScript", which is something quite primitive that wouldn't normally be called Ajax; he does it from the ground up in 46 pages, and manages to throw in MySQL stored procedures. Don't ask.
Then it's off to a whirlwind tour of XML, and then on to 25 pages on XMLHttpRequest, which is a key component of Ajax as we know it. Then, finally, he's ready to talk about traditional Ajax, using XML and XMLHttpRequest. After that, he wants to talks about Ajax using XSLT, because he's a self-described XSLT geek, so he first has to wander off into XPath and XSLT-land; again, skip a couple of chapters if you already know that stuff. Near the end of the journey, we detour to Ruby on Rails, and finally get to its Ajax support; I'm not completely sure why Woychowsky bothered with that particular side trip.
Woychowsky's book is part of Bruce Perens' Open Source Series, so maybe I should cut Woychowsky some slack about the gratuitous slurs against Microsoft in his book. On the other hand, some of them are inaccurate and misleading: for example, when he discusses ATLAS, which was the temporary codename for what is now called ASP.NET AJAX, he wanders off into a rant about "not invented here" syndrome, and then explains that he can't run ATLAS because he doesn't have $549 for Visual Studio 2005 Professional. Excuse me, Edmond: Visual Web Developer 2005 Express Edition is free for the downloading, and works just fine with ASP.NET AJAX.
Woychowsky presents his own home-grown Ajax library in Chapter 12, "Better Living Through Code Reuse." It's not bad at all: you could do a lot worse. And you could easily modify it to your own devices and desires. (The sample code is here, but you'll understand it better if you have the book.)
This is definitely not a book about using commercial Ajax libraries, or even free Ajax libraries, although Woychowsky likes the free Sarissa library and gives it 5 pages. On the other hand, the book is a good foundation for doing Ajax development yourself, and once you know how to do that you can intelligently examine the construction of the Ajax library your management wants you to evaluate, to see if it actually makes sense for your application.
Posted by Martin Heller on January 24, 2007 06:00 AM
January 17, 2007 | Comments: (0)
The other week, Raymond Chen's book The Old New Thing: Practical Development Throughout the Evolution of Windows (Addison-Wesley, 2007, $39.99, ISBN 0-321-44030-7) arrived at my office unannounced. I threw it on one of the many piles of new books on the floor, and thought nothing more about it.
A few days later, I noticed it on the pile when I was looking for something else close to quitting time, and started browsing through it for a minute. An hour later, when my wife called to ask whether I was planning to come home for dinner, I was still chuckling.
Raymond writes a blog by the same name; the book is not exactly the blog. Yes, much of the material in the book first appeared in the blog, but it has been "substantially supplemented by new material better suited to book form."
About half this book can be appreciated by a reader without programming background; perhaps two-thirds can be appreciated by any programmer. If you're an old Windows programmer, like me, you'll follow the whole book with interest.
Chen writes "Raymond actually remembers using Windows 1.0. Fortunately, the therapy sessions have helped tremendously." I am right there beside him. Movable global memory that needed to be locked for use; discardable code segments: Ah yes, I remember it well. Not fondly, mind you, but well.
Posted by Martin Heller on January 17, 2007 06:23 AM
January 10, 2007 | Comments: (0)
My so-called office is getting smaller and smaller, because my books no longer fit on the shelves, and I don't really have room for more shelves. I'm making some progress clearing out old stuff, but it's hard because I still use some books from 20 and even 30 years ago. It's actually easier for me to discard old computers and software than old books. This was to my benefit a couple of years ago when I was working on an intellectual property case that hinged on computer technology from the 1980s, but that's another story entirely.
Anyway, the newer books are in piles on the floor; the tallest pile is about 4 feet high. One of the shortest piles contains half a dozen books about AJAX:
- AJAX: Creating Web Pages with Asynchronous JavaScript and XML, Edmond Woychowsky, Prentice-Hall, 2006, $44.99, ISBN 0-13-227267-9
- Ajax Design Patterns: Creating Web 2.0 Sites with Programming and Usability Patterns, Michael Mahemoff, O'Reilly, 2006, $44.99, ISBN 0-596-10180-5
- Ajax Hacks: Tips & Tools for Creating Responsive Web Sites, Bruce W. Perry, O'Reilly, 2006, $29.99, ISBN 0-596-10169-4
- Build Your Own Ajax Web Applications, Matthew Eernisse, SitePoint, 2006, $39.95, ISBN 0-9758419-4-7
- Pragmatic Ajax: A Web 2.0 Primer, Justin Gehtland, Ben Galbraith, and Dion Almaer, Pragmatic Bookshelf, 2006, $29.95, ISBN 0-9766940-8-5
- Understanding AJAX: Using JavaScript to Create Rich Internet Applications, Joshua Eichorn, Prentice-Hall, 2006, $39.99, ISBN 0-13-221635-3
Do you need any or all of these books? I'm not sure. I can only tell you what each book is about, once I've read them myself. Stay tuned.
Posted by Martin Heller on January 10, 2007 06:41 AM
TOP STORIES
ADDITIONAL RESOURCES

- Remote Access: Maintain Security and Decrease the Burden on IT
- Beyond AntiVirus: Symantec Endpoint Protection
- What Every Enterprise Needs to Know About VDI

- Monitor the core and troubleshoot the access layer
- Disaster Recovery in Minutes
- Protecting Microsoft(R) Applications




