MySQL Troubleshooting – Tools, steps & advice from an expert – #bookreview

MySQL Troubleshooting
By Sveta Smirnova
(O’Reilly,
paperback, list price $29.99; Kindle edition, list price $14.99)

Sveta Smirnova knows how to find and fix MySQL problems. She is a principal technical support engineer in Oracle’s Bug Analysis Support Group and works daily with MySQL support issues and bug fixes.

Her new book is structured to help both MySQL beginners and those with more advanced skills, and it has been reviewed, prior to publication, by several other MySQL experts.

This well-written how-to guide likely will become a must-have reference book for many MySQL database administrators and support staff, as well as those currently learning MySQL. It contains numerous code examples, log excerpts and other illustrations, plus tips gleaned from long experience at solving a wide array of MySQL issues.

MySQL Troubleshooting has seven chapters:

  • Chapter 1, Basics – Basic troubleshooting techniques
  • Chapter 2, You Are Not Alone: Concurrency Issues – Problems that can occur “when applications run in multiple threads or interfere with transactions in other applications.”
  • Chapter 3, Effects of Server Options – A two-part chapter: (1) How to find and fix problems caused by configuration options; and (2) recommendations on how to solve and test configuration issues.  
  • Chapter 4, MySQL’s Environment – Deals with hardware and server environments. Lists “some points a MySQL database administrator (DBA) must look into.”
  • Chapter 5, Troubleshooting Replication – When slaves lag far behind the master, and related issues.
  • Chapter 6, Troubleshooting Techniques and Tools – Describes “extra techniques and tools” not discussed in earlier chapters.
  • Chapter 7, Best Practices – Focuses on “good habits and behaviors for safe and effective troubleshooting.”

An appendix titled “Information Resources” offers a number of websites and books that the author deems “good sources of information that can help during troubleshooting.”

She notes that MySQL now has “many forks” and acknowledges that her book cannot cover everything, nor “describe servers I don’t work with daily.” For example, she skips over Percona server and MariaDB but says “most of the methods described here” can be used except when “dealing with a particular feature added in the fork,” which will require product-specific information.

She also does not cover MySQL Cluster problems. Issues “specific to MySQL Cluster need separate MySQL Cluster knowledge that I don’t describe here,” she writes.

“But I do devote a lot of space to MyISAM- and InnoDB-specific problems…because they are by far the most popular storage engines, and their installation base is huge.”

A few of her code examples use PHP. But the C API is used “to illustrate the functions discussed in this book. The choice wasn’t easy,” she notes, “because there are a lot of programming APIs for MySQL in various languages.” And covering them all is impossible, she adds.

For many who work with MySQL, MySQL Troubleshooting can help solve or prevent a wide range of  problems, from easily overlooked syntax glitches to complex issues involving configuration, replication or multiple threads. And even if she doesn’t specifically cover your “fork” of MySQL, many of her tips, techniques, and examples can be adapted and put to good use in your own support and troubleshooting efforts.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

Advertisements

Webbots, Spiders, and Screen Scrapers, 2nd Ed. – Bots can be tools for good, efficiency, profit – #programming #bookreview

Webbots, Spiders, and Screen Scrapers: A Guide to Developing Internet Agents with PHP/CURL, 2nd Edition
By Michael Schrenk
(No Starch Press,
paperback, list price $39.95; Kindle edition, list price $31.95)

Bots have a bad reputation on the Web, but when used properly and for honest purposes, they can be tools for good, for better business and research efficiency, and for profit.

That’s the major premise behind Michael Schrenk’s popular book, now updated from its 2007 first edition.

He is a specialist in “automated agents (webbots, spiders, and screen scrapers)” that “solve problems” which web browsers can’t solve for themselves.

“The basic problem with browsers,” Schrenk writes, “is that they’re manual tools. Your browser only downloads and renders websites: You still need to decide if the web page is relevant, if you’ve already seen the information it contains or if you need to follow a link to another web page. What’s worse, your browser can’t think for itself. It can’t notify you when something important happens online, and it certainly won’t anticipate your actions, automatically complete forms, make purchases, or download files for you. To do these things, you’ll need the automation and intelligence only available with a webbot, or a web robot. Once you start thinking about the inherent limitations of browsers, you start to see the endless opportunities that wait around the corner for webbot developers.”

Spiders, by the way, “are specialized webbots that – unlike traditional webbots with well-defined targets – download multiple web pages across multiple websites,” he notes. Meanwhile, screen scraping is not clearly defined in this book, despite being in the subtitle. It generally involves automatically collecting, but not parsing, visual data from a source. Schrenk includes a chapter titled “Scraping Difficult Websites with Browser Macros,” and some purists would call that more a focus on the process known as web scraping rather than screen scraping. But this is minor nitpicking.  

Schrenk’s well-written book offers sample scripts (mostly written in PHP) and example projects that show how to design and write webbots. And his website for the book offers several code libraries that can be downloaded. “The functions and declarations in these libraries provide the basis for most of the example scripts used in this book,” he says. Likewise, his example scripts mostly use that website “as targets, or resources for your webbots to download and take action on” for practice and learning.

It is important, before diving into the programming, to take very careful note of his paragraph titled: “Learn from My Mistakes.” In it, Schrenk emphasizes: “I’ve written webbots, spiders, and screen scrapers for over 15 years, and in the process I’ve made most of the mistakes someone can make. Because webbots are capable of making unconventional demands on website, system administrators can confuse webbots’ requests with attempts to hack into their systems. Thankfully, none of my mistakes has ever led to a courtroom, but they have resulted in intimidating phone calls, scary emails, and very awkward moments. Happily, I can say that I’ve learned from these situations, and it’s been a very long time since I’ve been across the desk from an angry system administrator. You can spare yourself a lot of grief by reading my stories and learning from my mistakes.”

The 362-page 2nd edition has 31 chapters and three appendixes, and it is divided into four major parts:

  • ·         Part I: Fundamental Concepts and Technologies
  • ·         Part II: Projects
  • ·         Part III: Advanced Technical Considerations
  • ·         Part IV: Larger Considerations

That final part includes a very important chapter on keeping webbots and spiders out of legal trouble.

In other words, have fun but be very careful with what you create. As Schrenk emphasizes: “…it’s up to you to do constructive things with the information in this book and not violate copyright law, disrupt networks, or do anything else that would be troublesome or illegal.” And: “If you have questions, talk to a lawyer before you experiment.”

Words to the wise. And, yes, to the wiseasses, as well.

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

Switching to the Mac: The Missing Manual, Lion Edition – #bookreview #in #mac #windows

Switching to the Mac: The Missing Manual, Lion Edition
By David Pogue
(O’Reilly,
paperback, list price $29.99; Kindle edition, list price $23.99)

I own and use three Windows PCs during a typical day. But sometimes (don’t ask why), I find myself forced – forced – to use my wife’s Macintosh.

Grrrr. Where do I click? Where are the other mouse buttons? And what do these geeky, alien icons actually mean?

Frankly, I’ve hated Macs for a long, long time. And I’ve especially hated the smug, “Everything’s simpler on a Mac!” attitude that peppy Mac users seem to radiate whenever they are around us gray-haired Windows types who  have been messing with command prompts, anti-virus software, and the Blue Screen of Death since (seemingly) the War of 1812.

That being said, I am a big fan of New York Times tech columnist David Pogue and “The Missing Manual” book series he created.  I use several of O’Reilly’s “Missing” manuals on a frequent basis.

Pogue’s new book is now proving useful for me as a sort of Klingon-to-English translation guide when I am forced – forced –to use my beloved’s dearly beloved Mac.

But in all seriousness, if you are contemplating making the switch or have already switched from Windows to Mac (traitor!), you need this book. It is a well-written, nicely illustrated user’s guide with a strong focus on how to transfer documents and other files from Windows machines to Macs. Often, the transfers go smoothly. “It turns out that communicating with a Windows PC is one of the Mac’s most polished talents,” Pogue notes.

Sometimes, however, the transfers do not go well. Pogue’s huge book (691 pages) also points out some potential pitfalls and remedies, such as possibly losing “memorized transactions, customized report designs, and reconciliations” when transferring from QuickBooks for Windows to QuickBooks to Mac.

Switching to the Mac is organized into five parts:

  • Part 1, Welcome to the Macintosh – Covers the essentials of “everything you see onscreen when you turn on the machine.”
  • Part 2, Making the Move – Covers “the actual process of hauling your software, settings, and even peripherals (like printers and monitors) across the chasm from the PC to the Mac.” Includes steps for running Windows on Macs, “an extremely attractive option.”
  • Part 3, Making Connections – Shows how to set up an Internet connection on a Mac and use Apple’s Internet software suite.
  • Part 4, Putting Down Roots – Gets into more advanced topics “to turn you into a Macintosh power user.”
  • Part 5, Appendixes – Two of the four appendixes cover installation and troubleshooting. One is the “Where’d It Go?” Dictionary for those trying to find familiar Windows controls “in the new, alien Macintosh environment.” And the fourth appendix offers “a master keyboard-shortcut list for the entire Mac OS X universe.”  

Switching to the Mac offers sound reasons (1) why you may prefer to stick with certain Windows for Mac programs on your new Mac and (2) why you may want to abandon certain Windows programs written for Macs and learn to use the Mac programs that are better than, say, PowerPoint or Notepad, for example.

If you happen to be addicted to Microsoft Access and Microsoft Visio, you have a separate choice. You can either switch to FileMaker and OmniGraffle or keep a Windows machine sitting close to your new Mac.

You won’t be alone as a user caught between two different worlds. Writes Pogue: “A huge percentage of ‘switchers’ do not, in fact, switch.  Often, they just add.  They may get a Macintosh (and get into the Macintosh), but they keep the old Windows PC around, at least for a while.”

In my case, you’ll have to pry the Windows keyboard and mouse from my cold, dead fingers. But I’ll keep this hefty book with me, to use both as a how-to guide and as a bludgeon, each time I have to go into the Macintosh wilds and battle the Lion.

# 

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

 

Not your father’s database: Getting Started with CouchDB & with Fluidinfo – #bookreview #in #programming

These two books reflect some of the wide-ranging changes that the Internet and mobile devices are bringing to the ways databases are structured, accessed, updated, stored and maintained.

Getting Started with CouchDB
By MC Brown
(O’Reilly,
paperback, list price $24.99; Kindle edition, list price $14.99)

“Databases are no longer isolated, single systems,” writes MC Brown. “Whether you want a database that can be shared among multiple devices (your desktop, laptop, and mobile phone), between multiple offices, or to be used as part of your database scaling operations, copying and sharing database information has become required functionality.”

He adds: “Different databases have traditionally approached this in a variety of different ways, including binary logs, data streams, row-based logging, and more complex hashing techniques. Within CouchDB, a simple but very effective method has been developed that uses the individual documents as the key to the method of sharing and distributing the document information between databases.”

Apache CouchDB is a free download for Linux, Mac OS X, or Windows. According to the website, “Apache CouchDB™ is a database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API.”

Brown also describes how to install CouchDB from source code, with careful emphasis on “(if you must).”

For the number of pages (84), the list prices for Brown’s book seem a bit high. But if you want to learn how to work with CouchDB, information to get you started is conveniently at hand, in the book or e-book. For example, Brown shows how to create databases and delete databases and how to create, update and delete documents in the databases.

“All of your interactions with CouchDB will be through HTTP,” he notes. His book provides some “key details” for several HTTP operations “such as HEAD and DELETE that are useful when talking to CouchDB.”

MC Brown has written or contributed to more than 26 books dealing with programming, systems management, web technologies and other subjects. He is vice president of documentation for Couchbase.

#

 Getting Started with Fluidinfo
By Nicholas J. Radcliffe and Nicholas H. Tollervey
(O’Reilly,
paperback, list price $24.99; Kindle edition, list price $11.99)

“Fluidinfo is an online storage system in which there is a place for information about everything—everything that exists, everything that could exist, and everything that can be imagined,” this book’s two authors state. “It allows anyone to store any information, about anything, in any digital form. And Fluidinfo is social: users can exercise fine control over who can read their data and can even enable other chosen users and applications to write data on their behalf.”

Another way to describe Fluidinfo is as an “openly writeable shared datastore.”

Like CouchDB, Fluidinfo exposes “all its functionality through HTTP, the core protocol that underpins the World Wide Web. Programmers can take advantage of its RESTful API, which makes it easy to integrate with other applications.”

To try out Fluidinfo and get an account, go to fluidinfo.com. The site offers the option to sign in via Twitter.

This well-written, 119-page book is offered as a “practical guide to several ways to access and use Fluidinfo” and is organized into nine chapters:

  • Chapter 1: What Is Fluidinfo?
  • Chapter 2: Fluidinfo from the Command Line
  • Chapter 3: Social Data
  • Chapter 4: Programming with Fluidinfo
  • Chapter 5: Programming with FOM (the Fluid Object Mapper)
  • Chapter 6: Programming Fluidinfo with JavaScript
  • Chapter 7: Fluidinfo’s RESTful API
  • Chapter 8: Advanced Use of the Fluidinfo Shell
  • Chapter 9: Conventions for the About Tag

There is also an appendix titled “Fluidinfo Query Language Reference.”

One of the book’s authors, Nicholas Radcliffe, has connections to Fluidinfo that date back to the 1980s and “has been a friend and advisor to the Fluidinfo company since its inception.” Meanwhile, Nicholas Tollervey is a software developer at Fluidinfo and has nearly 30 years’ experience in programming.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

The Nikon Creative Lighting System, 2nd Ed. – Better flash photography (with electronic help) – #bookreview

The Nikon Creative Lighting System: Using the SB-600, SB-700, SB-800, SB-910, and R1C1 Flashes
By Mike Hagen
(Rocky Nook and Nikonians Press,
paperback, list price $39.95)

In my many years as a photojournalist, I hated one aspect of photography above almost all others: Having to use an electronic flash in low-light situations.

Of course, that was back in the ancient days of 35mm film cameras and heavy, shoulder-bag battery packs. We had little idea how well a flash shot would turn out until we got back to the photo lab and ran the roll of Tri-X or Plus-X through the D-76 developer, stop bath, fixer, and a perfunctory wash – and prayed we had remembered to use “X” synchronization, not the outdated one (“M”) for flash bulbs.

If anything at all went wrong, there was no going back.

For that reason and many more, I love digital photography–and being able to see how well a flash shot has turned out moments after I press the shutter.

This updated second edition of  The Nikon Creative Lighting System covers both modern flash technology and some good old, no-tech techniques that still work. One of my favorites, illustrated in this book, is doing bounce flash to eliminate shadows while also using small reflector cards or just your bare hand and fingers to reflect what author Mike Hagen calls “a nice catch light” and a bit of glow into a portrait subject’s face.

Another is flash bracketing, which we used to do by manually opening up or stopping down one f/stop (typically while running along near a famous criminal or politician or movie star and hoping our flash units had recharged along enough to pop off another shot at the right exposure). “Each of the modern Nikon cameras has an auto bracketing function,” Hagen notes.

Hagen’s well-written guide covers Nikon’s newest iTTL (Intelligent Through the Lens) flash units and includes separate chapters for the SB-600, SB-700, SB-800, SB-900, SB-910, and R1C1. An iTTL-compatible camera body “meters flash output through the lens” when used with an iTTL flash unit.

In his “Case Studies and Examples” chapter, Hagen presents some excellent photographs and provides complete setup details and settings, so you can learn by trying similar shots.

Hagen’s book is a full-blown, step-by-step, technical how-to guide that likewise provides easy techniques for making better photographs in a variety of situations.

With the help of Nikon electronic flash units, of course.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.