Follow Slashdot stories on Twitter


Forgot your password?

Submission + - Making 300 Interview

An anonymous reader writes: Surprisingly, FHM Online has an interesting interview with visual effects supervisor Chris Watts about the making of 300. From the article: "What does it take to film Frank Miller's legendary graphic novel about the ancient Spartan army? Spears, loincloths and over 1300 visual effects — including a series that gave life to a military-enlisted rhinoceros. Here, 300's visual effects supervisor, Chris Watts, breaks down every step that went into creating that sweet-assed rhino scene." 3&stn_id=12&idx_id=3866
It's funny.  Laugh.

Journal Journal: Al "Green" Gores Shocking Electric Bill 1

Some interested person called the Nashville (TN) Electrical Service and under the Freedom of Information Act asked for the Academy Award Winning Ex-VP's energy bill. Apparently the publicly dull persona has quite the party life going at home. His usage last year? 221,000 kWh, that's a $30,000 bill, more than 20 times the national average. Last August alone he used 22,619 kWh, more than you or me (even with those massive 1000W PS' ru
It's funny.  Laugh.

Submission + - Boston Bomb-Squad Strikes Again

Brian writes: Boston Police discover (and destroy) the latest pseudo-threat. This time it's not an animated LED sign, but something far, far more nasty — A Traffic Counter. You know, the little boxes that the city (!) places on a roadside to measure the number of cars that pass in a given amount of time. Wow.

via BoingBoing.

Submission + - Is statewide Wi-Max possible?

Philetus writes: While many politicians seem dead set on shutting down or locking off parts the Internet, is it possible that one Deep South state could provide broadband wireless access to all of its residents? That's the pledge of a new bill that was introduced in the South Carolina Statehouse this week.

From the article:
"Toward that end, (Dwight) Loftis, House Speaker Bobby Harrell and others have introduced a bill, H. 3569, that would create the S.C. Wireless Technology and Communications Commission, a body tasked with implementing a statewide wireless broadband network, possibly as early as late 2008."

Is this another case of politicians getting their tubes mixed up, or is a statewide wireless network possible?

Submission + - Google, meet Uncle Sam

InternetVoting writes: "Looks like Google is trying to increase its stake in government and military operations. At a meeting of about 200 federal contractors, engineers and uniformed military members Google pitched enhanced versions of Google Earth; search engines that can be used internally by agencies; and the new Google Apps. From the article:
"Google has ramped up its sales force in the Washington area in the past year to adapt its technology products to the needs of the military, civilian agencies and the intelligence community. Already, agencies use enhanced versions of Google's 3-D mapping product, Google Earth, to display information for the military on the ground in Iraq and to track airplanes that fight forest fires across the country.""

Submission + - Matt Groening On Futurama and Simpsons Movie

keenada writes: "Though The Simpsons has declined in popularity in recent years, it still has a cult and popular following worldwide. Matt Groening (rhymes with raining) sits down with Crave to discuss his new movie, and the future of Futurama."

Submission + - C-SPAN Takedown Notice to U.S. Congress

Carl Malamud writes: "The New York Times reported on a dustup between C-SPAN and the new Speaker of the House. Speaker Pelosi placed a minute of a congressional hearing on her blog, and C-SPAN sent her a takedown notice. Pelosi caved in and removed the offending video. I think she should have asserted her rights to fair use and told C-SPAN to f*ck off.

The issue of congressional hearings on-line is an important one. Many of the committees, as a matter of policy, refuse to provide archives and everything is streaming-only, low resolution, proprietary. As a partial solution, I've started ripping those streams and uploading them to Google Video and the Internet Archive. (BoingBoing story)

As to C-SPAN, I think they're wrong, and I sent a letter to Brian Lamb yesterday offering to purchase all 6,251 DVDs in his collection that are congressional hearings, and pointed him to >1 minute of C-SPAN video which I have on-line and asserted fair use. Here's my letter to Brian. He hasn't answered my offer, but if he does, I'll then be faced with a $1,059,544 question. :)"

Submission + - A 50-terabyte database of brain maps

Roland Piquepaille writes: "If you want to compare images from human brains with the ones of monkeys, dogs, cats, mice or birds, you should visit the website at UC Davis. It contains over 50 terabytes of brain image data directly available online. The researchers have found a way to transform sections of brain mounted on microscope slides into brain maps with a resolution of half a micrometer per pixel, or 55,000 dots per inch. With such a resolution, all the images are fully zoomable. You start with a single section of a brain and you explore it like if you had a virtual microscope. And the site also provides free downloadable tools to see the images in 3-D. Be warned: you might spend lots of time exploring this site. Here are more details about this project and pictures showing how the brain navigating process works and what a barn owl's brain looks like."

Submission + - Which bookmarklets do you use on regular basis ?

eporue writes: "I use daily the following bookmarklets:
  • Co.mments, to keep track of conversations : the bookmarklet can be found here.
  • Toread, to email copies of web pages.
  • Playtagger from delicious, to play MP3s without leaving the page. The bookmarklet can be found here.
What other bookmarklets do your use on regular basis ??"

Submission + - MySQL Cookbook

Michael J. Ross writes: "Of all the technical challenges faced by the typical experienced computer programmer, questions about syntax form a relatively small portion. This is especially true now that current coding editors and IDEs offer statement expansion and syntax checking. Rather, the most common type of technical challenge is understanding how to solve a specific data access or manipulation problem. Hence the growing popularity of programming "cookbooks," which are filled with "recipes," each comprising a concise statement of a focused problem, followed by a solution, with plenty of sample code to show how to implement it. For developers using the MySQL database system, the gold standard of such books is MySQL Cookbook, by Paul DuBois.

Published by O'Reilly Media, the second edition appeared in November 2006, under the ISBN-10 of 059652708X and the ISBN-13 of 978-0596527082. This new edition has been updated for MySQL version 5.0. The publishers have a Web page devoted to the book, where the visitor can find both brief and full descriptions of the book, an online table of contents and index, a sample chapter (number 5, "Working with Strings") in PDF format, errata (none reported as of this writing), and a way to post your own review on the O'Reilly Web site. There are also links for purchasing the book, or reading an online version, in the Safari Bookshelf program.

The bulk of the book's material is divided among 20 chapters, covering a wide range of topics: Using the mysql Client Program; Writing MySQL-Based Programs; Selecting Data from Tables; Table Management; Working with Strings; Working with Dates and Times; Sorting Query Results; Generating Summaries; Obtaining and Using Metadata; Importing and Exporting Data; Generating and Using Sequences; Using Multiple Tables; Statistical Techniques; Handling Duplicates; Performing Transactions; Using Stored Procedures, Triggers, and Events; Introduction to MySQL on the Web; Incorporating Query Results into Web Pages; Processing Web Input with MySQL; Using MySQL-Based Web Session Management.

Most of these chapters contain a generous number of sections, each serving as a recipe for a specific problem within MySQL. Two of the chapters have only four such recipes, but most have a dozen or more, with a few of them boasting more than three dozen recipes. Each recipe begins with a brief problem statement, and usually an equally brief solution statement, followed by a much more lengthy discussion, which contains the actual explanation of the solution, the sample code, and the expected output of that code. Some of the sections conclude with a mention of related recipes that could also be consulted.

This book, like so many other programming cookbooks, is weakened by the practice of offering a "Solution" subsection that consists of only one or two sentences — so terse and high-level that it provides, for all practical purposes, no solution to the reader. The actual solution is found in the "Discussion" subsection, which follows. This practice makes no sense. Because both subsections address the problem solution, they should be combined into a single subsection, naturally labeled "Solution." It appears that the purpose of the current Solution statements is to provide a terse summary. If so, then it should be labeled as such, yet still included within the new Solution subsection.

Despite this illogical division of each solution into two subsections, the content of the problem solutions found in MySQL Cookbook should be quite valuable, for several reasons: Firstly, the author has chosen the sorts of problems, within each category, that the MySQL programmer would typically encounter. No doubt this is a consequence of Paul DuBois being the author of a number of MySQL books, as well as one of the earliest contributors to the online MySQL Reference Manual. Secondly, the solutions work, and have been demonstrated to do so. Thirdly, the writing style is straightforward, which is characteristic of O'Reilly's titles. Fourthly, all of the problem solutions contain sample code and its output, which not only demonstrate the validity of each solution (as noted in my second point), but also allows the reader to see how the solution works simply by reading the material, and not having to type in the sample code to get the output within their own development environment — assuming one is even at hand, when reading the book.

The bulk of MySQL-related code in use today, was created not just to be accessed within a database client program, such as mysql, but instead from interpreted programming languages — especially those used heavily on Web sites. This is one area where MySQL Cookbook really shines, because it contains a large amount of sample code in Perl, PHP, Python, Java, and even Ruby. That is not to say that every code sample in one language has corresponding samples for all of the other languages; that would undoubtedly make the book much longer than it currently is, and probably unwieldy. But in cases where all of the languages are capable of expressing brief solutions, then they are included.

Regardless of whether the reader chooses the print or online versions, there are roughly two ways to make use of this book. If a programmer wishes to significantly increase their knowledge of what MySQL can do for them, and also increase their comfort level with utilizing those capabilities, then they might elect to read the book from stem to stern. Given that this would involve reading over 900 pages, it would certainly take some time for the average developer, but arguably could be time well spent. At the other end of the spectrum, the reader might elect to peruse individual sections that look interesting — particularly if they are relevant to a current project. This approach is certainly doable, because each of the recipes is self-contained, without the cross-referencing seen in many non-recipe style books. Admittedly, there are some "See Also" sections, but they are relatively few in number, with largely optional information, and tend to simply enrich the book's presentation, rather than frustrating the reader by pointing to other areas of the book.

This new edition of MySQL Cookbook concludes with four appendices, and an index. The first appendix explains where to obtain the software for MySQL, the five API programming languages used in the book, and the Apache Web server. The second appendix shows how to execute programs written in those five interface languages, on the command line. The third appendix is a fairly substantial primer on Java Server Pages (JSP) and Tomcat, providing an overview of servlets and JSP, as well as how to install and set up a Tomcat server, the Tomcat directory structure, the basics of JSP pages, and more. The last appendix lists resources outside the book for MySQL and the five aforementioned languages.

Unlike far too many programming books on the market now, this book's index is generally quite thorough, which is essential for a work of this size (975 pages). The recipe titles in the table of contents, are detailed enough to make it possible for the reader to locate the appropriate recipe in the book for their particular problem — assuming the book addresses that problem — and are grouped by subject, making it easier to find related recipes, which oftentimes can provide insight into other problems that they do not address directly.

Despite the obvious effort that has gone into both editions of this book, there are still some areas for improvement, and most of them are related to the readability of the sample code. Admittedly, there are different schools of thought as to optimal coding style, including use of whitespace, the placement of braces, and other matters. This assessment can only be my own opinion, based upon years of reading other people's code. The sample code in MySQL Cookbook would be more readable if more whitespace were utilized to separate function and variable names from open and close parentheses. This is especially true for the SQL code and MySQL extensions, for which all of the keywords are in all uppercase. The code fragments and full programs written in the API languages — such as Perl and PHP — are more readable, though they sometimes suffer from nondescriptive variable names. One might argue that the aforesaid choices are needed to cut down on the space consumed by the code on the book's pages. But if that were true, then the author likely would not have wasted an entire line for each open brace. Last, and certainly not least for the programmer who would like to try out the author's sample code in their own environment, it is unfortunate and inexplicable as to why the sample code is not offered on the O'Reilly Web site for downloading.

All in all, MySQL Cookbook is a well-organized and neatly written work, which should be of tremendous value to any software developer trying to find proven solutions to common database programming problems.

Michael J. Ross is a Web consultant, freelance writer, and the editor of's free newsletter. He can be reached at, hosted by SiteGround."

Slashdot Top Deals

Neutrinos are into physicists.