Domain: wikipedia.org
Stories and comments across the archive that link to wikipedia.org.
Stories · 7,048
-
US Candidates Ignore Looming Debt Crisis
code_rage writes "Carolyn Lockhead of The San Francisco Chronicle has written an article about one of the most important, but overlooked, political issues we are facing. Baby-boomers will soon begin retiring, which will result in a huge fiscal imbalance (deficits and debts). The article says that the present value of the anticipated debt is estimated to be between $40 trillion and $72 trillion, depending on the source. To put that in perspective, the current national debt is $7.3 trillion.""
Former Treasury Secretary Paul O'Neill commissioned a study (free PDF) that was written by Jagadeesh Gokhale and Kent Smetters. To give a sense of how serious the fiscal imbalance is, consider some of the painful measures that the study said would be necessary to balance the books:
- More than double the payroll tax, from 15.3% to 32% of wages
- Raise income taxes by two thirds
- Cut Social Security and Medicare benefits by 45%
- Eliminate all "discretionary" spending (including such constitutionally mandated government functions as the military and the judiciary)
Peter G. Peterson has written a book about the issue: "Running On Empty: How the Democratic and Republican Parties Are Bankrupting Our Future and What Americans Can Do about It." He recently gave an interview at the Council on Foreign Relations. He prefers to express the issue in terms of cash flow, because Social Security and Medicare are "pay as you go" systems (there is essentially no trust fund). The cash flow impacts will be an estimated $783 billion in 2020, increasing to trillions later.
Peterson offers some concrete proposals in the interview, and offers some political cover to the candidates in saying "I have never thought that a political campaign is an optimum environment for serious discussion or practical proposals. -
PAC Asks Voters Where To Spend 10K
An anonymous reader submits "Not sure if this is for real or not, but for what it's worth, it seems like a Democratic PAC is letting people vote on where to spend US$10k of its money. Think Oregon is a more important swing state? Pennsylvania? Let' em know at ORvPA.org. What kind of issues does this raise? Think Republicans will try and game the vote? Does it really matter in the grand scheme of things? Is this a good example of trying to harness the wisdom of crowds?" -
Firebird At 20 Years
mAriuZ writes "From Jim Starkey: "September 4th is the 20th anniversary of what is now Firebird. I quit my job at DEC in August, took a three day end-of-summer holiday, and began work on September 4, 1984 in my new career as a software entrepreneur. As best as I can reconstruct, the first two files were cpre.c and cpre.h (C preprocessor), later changed to gpre.c and gpre.h. The files were created on a loaner DEC Pro/350, a PDP-11 personal computer that went exactly nowhere, running XENIX. Gpre was my first C program, XENIX was my first experience with Unix, and the Pro/350 was my very last (but not lamented) experience with PDP-11s."" -
Firebird At 20 Years
mAriuZ writes "From Jim Starkey: "September 4th is the 20th anniversary of what is now Firebird. I quit my job at DEC in August, took a three day end-of-summer holiday, and began work on September 4, 1984 in my new career as a software entrepreneur. As best as I can reconstruct, the first two files were cpre.c and cpre.h (C preprocessor), later changed to gpre.c and gpre.h. The files were created on a loaner DEC Pro/350, a PDP-11 personal computer that went exactly nowhere, running XENIX. Gpre was my first C program, XENIX was my first experience with Unix, and the Pro/350 was my very last (but not lamented) experience with PDP-11s."" -
Wikipedia != Authoritative?
Frozen North writes "Recently, this article in the Syracuse Post-Standard caused a stir by dismissing Wikipedia as an authoritative source, and even suggesting that it was a little deceptive by looking too much like a "real" encyclopedia. Techdirt suggested an experiment: insert bogus information into Wikipedia, and see how long it takes for the mistake to be removed. Well, I did that experiment, and the results weren't good: five errors inserted over five days, all of which lasted until I removed them myself at the end of the experiment." -
Build Your Own Blade Server
fw3 writes "Information week is reporting that IBM and Intel are opening up the standards for the eServer BladeCenter. 'The companies will make available the design specifications for IBM's eServer BladeCenter product... hardware vendors can build "BladeCenter compatible" networking switches, blade adapter cards, and appliance and communications blades for enterprise networks.' Not really a new strategy for IBM, ISA of course was open from the start, IBM's technical references for the original PCs contained nearly all of the engineering data needed to build a PC. Looking further back I've been told by a reputable source that RCA was able to fully duplicate the System 360 System/360, mainframe working just a month behind IBM's own schedule by using IBM's published tech reports. (Of course IBM *didn't* share the details of OS/360, leaving RCA with a box but no OS.) See also stories from EETimes, CNN." -
Build Your Own Blade Server
fw3 writes "Information week is reporting that IBM and Intel are opening up the standards for the eServer BladeCenter. 'The companies will make available the design specifications for IBM's eServer BladeCenter product... hardware vendors can build "BladeCenter compatible" networking switches, blade adapter cards, and appliance and communications blades for enterprise networks.' Not really a new strategy for IBM, ISA of course was open from the start, IBM's technical references for the original PCs contained nearly all of the engineering data needed to build a PC. Looking further back I've been told by a reputable source that RCA was able to fully duplicate the System 360 System/360, mainframe working just a month behind IBM's own schedule by using IBM's published tech reports. (Of course IBM *didn't* share the details of OS/360, leaving RCA with a box but no OS.) See also stories from EETimes, CNN." -
Secret Chamber In The Great Pyramid?
ferkelparade writes "The Guardian reports that two French amateur archaeologists believe they have located a secret chamber in the Cheops pyramid using microgravimetry and radar. The team believes that this might be the pharaoh's burial chamber - as the chamber seems to be unopened, it might still house the complete burial treasure. More coverage from abc." -
Space Elevator Prizes Proposed
colonist writes "Space elevator proponents are planning competitions for space elevator technologies, similar to the Ansari X Prize. Elevator:2010 will organize annual competitions for climbers, ribbons and power-beaming systems. In other space elevator news, researcher Bradley C. Edwards recently left the Institute for Scientific Research to work at two companies on materials and technology. Also, the space elevator has caught the interest of Google's founders: 'At a space camp in Alabama last year, Brin talked about creating a space elevator to transport cargo up a special tether attached to earth. Also last year, Brin joined Page in proclaiming they should found a nanotech lab at Google.'" -
RIAA Sues More Music Lovers
DominoTree writes "The RIAA, a trade group representing the U.S. music industry has filed a new round of lawsuits against 744 people it alleges used online file-sharing networks to illegally trade in copyrighted songs, it said on Wednesday." -
First 'Atomic Air Force' Observed
SeaDour writes "From the National Institute of Standards and Technology (the people who brought you the atomic clock) and the Unviersity of Colorado at Boulder (location of the world's first Bose-Einstein Condensate and Fermionic Condensate) comes the world's first observation of atoms "flying in formation". Atoms are normally expected to fly around through empty space quite haphazardly, constantly colliding with one another. But thanks to precision laser pulses and extremely cold temperatures, Jun Ye's team was able to correograph strontium atoms into the shape of a cube as they travelled across a vacuum chamber. "This 'really bizarre' behavior is believed to occur with all atoms under similar conditions."" -
Interview With Chernobyl Engineer
An anonymous reader writes "New Scientist has posted an interview with a former Chernobyl engineer, Alexander Yuvchenko, who was not only there the night of the explosion, but is still alive today to tell about it. A fascinating recollection of some pretty heroic acts." -
Itanium Retreats To Multis, Opteron Presses Attack
vincecate writes " Back in 1997 Itanium was presented as a compatible extension of x86, and Intel had dreams of replacing high end x86 by 1999 (about min 16 in link). However, the original 2001 Itanium had the 32-bit performance of a much older Pentium so Itanium is viewed as non-compatible. Now with the rise of what Microsoft is calling the "x64" architecture (AMD64 and EM64T), Itanium has been repositioned to the multiprocessor server market."However, Opterons are designed for multiprocessing. Each has its own memory and built in hypertransport links to make NUMA multiprocessors. So existing Opterons don't need large expensive caches like Xeon MP, nor any glue chips for up to 8-way multiprocessors. This has started the commoditization of multiprocessors. You can now buy a 4-way Opteron for $6000 or an 8-way for $10,000.
There is an interesting interview with Tyan CEO and his assistant that give some info about future Opteron plans. People are working on 8-way motherboards that will become 16-way when duel-core Opterons come out. They also say that the next Opteron core, the K9, will be able to 'go over 60 processors without adding any external crossbar chips.' Another fun plan mentioned is connecting the hypertransport links using fibers for really large systems."
-
Information Preservation and Data Havens?
tiltowait asks: "An interesting story on LISNews.com this morning about savvy U.S. students photocopying textbooks in Mexico then returning them for refunds got me thinking about data havens. There's already few places on the web where you can exploit countries having different copyright durations and eligibility. On the flip side, there's restrictions such as broadcast blackouts and country-wide firewalls. But just as the rich can use of international tax loopholes and in light of the recent file-sharing victory, are there any projects out there, beyond the P2P networks, to distribute possibly-protected information by any means necessary? For example, your company may already outsource labor, but what about an off-site backup in case of an FBI raid?" -
More On The International Linear Collider
paragon_au writes "The UK Independent is reporting that details for a purposed 40km long international Linear Collider have been released by 'An international panel of particle physicists [that] decided the high-energy linear collider - a £3bn machine for smashing matter against antimatter - will use revolutionary superconducting technology to shed light on the origin and nature of the universe. Plans for the International Linear Collider have still to be finalised but scientists hope that construction of the underground machine will begin in six years.'" -
British Town Worried About WWII Ammo Ship Wreck
Radical Rad writes "For 60 years, 1.4 kilotons of unstable world war II bombs have lain in the rusting wreck of a US cargo ship half-submerged on a sandbank in the river Thames. If it explodes it will be one of the biggest non-nuclear explosions ever with predictions of a 3 kilometre high wall of mud, water, and metal fragments causing devastation to the nearby town of Sheerness in Kent." The BBC has more. -
First Plasma on the Levitated Dipole Experiment
deglr6328 writes "In light of recent, somewhat disappointing news in the world of nuclear fusion research, it is worth noting that there are still reasons to keep up hope that some breakthroughs are yet to be made. At 12:53 pm on the 13th. of this month the Levitated Dipole Experiment achieved its first plasma. The Levitated Dipole Experiment(LDX), built at MIT's Plasma Science and Fusion Center as a joint project of Columbia University and MIT, is a magnetic confinement fusion research device, that unlike all previous stellarator, reverse-field pinch and tokamak like experiments, uses a superconducting levitated torus to confine its plasma. The LDX's achievement of first plasma is, in a way, about 17 years in the making even though it has only been in construction since 1999. The concept for LDX was first considered by Akira Hasegawa as he was studying the data coming in from the Voyager missions which flew through the (dipole) magnetospheres of the outer planets. He noticed that unlike laboratory confined fusion plasmas which tended to be unstable, difficult to control, and which lost energy quickly, the plasma of a magnetosphere is intrinsically more quiescent, stable and actually reacts favorably (increases its density/temperature) to outside perturbations such as ie. bombardment by a solar storm. A highly informative and interesting video of operations on the day of first shot can be found here. Congratulations to the scientists and engineers who have worked very hard on getting the project to this point and here's looking forward to the possibility that LDX will reveal fundamentally new physics in the arduous quest for clean fusion energy." -
First Plasma on the Levitated Dipole Experiment
deglr6328 writes "In light of recent, somewhat disappointing news in the world of nuclear fusion research, it is worth noting that there are still reasons to keep up hope that some breakthroughs are yet to be made. At 12:53 pm on the 13th. of this month the Levitated Dipole Experiment achieved its first plasma. The Levitated Dipole Experiment(LDX), built at MIT's Plasma Science and Fusion Center as a joint project of Columbia University and MIT, is a magnetic confinement fusion research device, that unlike all previous stellarator, reverse-field pinch and tokamak like experiments, uses a superconducting levitated torus to confine its plasma. The LDX's achievement of first plasma is, in a way, about 17 years in the making even though it has only been in construction since 1999. The concept for LDX was first considered by Akira Hasegawa as he was studying the data coming in from the Voyager missions which flew through the (dipole) magnetospheres of the outer planets. He noticed that unlike laboratory confined fusion plasmas which tended to be unstable, difficult to control, and which lost energy quickly, the plasma of a magnetosphere is intrinsically more quiescent, stable and actually reacts favorably (increases its density/temperature) to outside perturbations such as ie. bombardment by a solar storm. A highly informative and interesting video of operations on the day of first shot can be found here. Congratulations to the scientists and engineers who have worked very hard on getting the project to this point and here's looking forward to the possibility that LDX will reveal fundamentally new physics in the arduous quest for clean fusion energy." -
A Day In The Life Of A Spammer
kaip writes "Internetnews.com has a story of a spammer. The individual sends 60 million spam emails for four days worth of work and claims that one in 19 of AOL users clicks the links in his mortgage spam (this number should however be taken with a grain of salt, see rules 1 and 2). Maybe not everybody has heard of the Boulder Pledge... The article also tells how the CAN-SPAM Act, which legalises spamming, is turning the US into the spam haven of the world. Currently, 86 percent of the total spam volume is coming from the States." -
A Dicebag of Dungeons and Dragons Documentaries
Jason Scott writes "While we're celebrating 30 years of Dungeons and Dragons, Slashdot readers might as well sit back with their DVD players and enjoy a few documentaries that have recently popped up; all of them done by independent filmmakers, too! Uber Goober: The Movie calls itself 'A Film About Gamers' is a not-taking-itself-too-seriously overview of the life of RPGs and LARPs. Life With the Dice Bag, a 'Documentary about Role Playing Games and the people who play them' looks to take itself a bit more seriously as it covers the last GenCon held in Milwaukee. And finally, who can resist the pull of The Dungeons and Dragons Experience?" -
Your Right to Travel Anonymously: Not Dead Yet
ChiralSoftware writes "Remember John Gilmore's fight to be able to travel on commercial airlines without having to show ID? It has dropped out of the news for a while, but now it appears that the fight is continuing. I remember in the 80s we used to make jokes about Soviet citizens being asked "show me your papers" and needing internal passports to travel in their own country. Now we need internal passports to travel in our country. How did this happen? The requirement to show ID for flying on commercial passenger flights started in 1996, in response to the crash of TWA Flight 800. This crash was very likely caused by a mechanical failure. How showing ID to board a plane prevents mechanical failures is left as an exercise to the reader. How mandatory ID even prevents terrorist attacks is also not clear to me; all the 9/11 hijackers had valid government-issued ID. I hope the courts don't wimp out on this fight." -
It's Just the 'internet' Now?
This morning Wired News announced that 'web', 'net', and 'internet' will no longer be capitalized in their stories. Is this the next logical step after ditching 'e-mail' in favor of 'email' , or should the global computer network still be treated with a proper name? For more discussion, see Wikipedia, The Chicago Manual, and an article profiling Joseph Turow's de-capitalization efforts. -
WAP is Dead, Long Live WAP
antimatt writes "Everyone knows WAP is dead. It was dead on arrival. Right? Wrong. WAP use, at least in the UK, is up 42% in the last year. Are we seeing postmortem twitching, or a phoenix rising from the wireless ashes?" While the first incarnation was pretty rough, WAP is slowly growing into what people had hoped the first version would be. Now if only it just lost the stigma attached to it. -
Asian Origins Of Gaming Exhibited
thrashor writes "A major upcoming exhibit of the Asia Society in New York City explores the Asian origins of games - including many of the favorite board games in the English speaking world. The exhibition looks at how games have been as important as trade and religion in transmitting cultural ideas. Backgammon, dice games, chess, and of course (my favorite), Go/Weiqi/Baduk are explored, among many others." The exhibition preview mentions: "Illustrating the importance of games in early societies, mastery of weiqi was considered by Chinese people to be one of four essential cultural accomplishments along with music, calligraphy and painting." -
Asian Origins Of Gaming Exhibited
thrashor writes "A major upcoming exhibit of the Asia Society in New York City explores the Asian origins of games - including many of the favorite board games in the English speaking world. The exhibition looks at how games have been as important as trade and religion in transmitting cultural ideas. Backgammon, dice games, chess, and of course (my favorite), Go/Weiqi/Baduk are explored, among many others." The exhibition preview mentions: "Illustrating the importance of games in early societies, mastery of weiqi was considered by Chinese people to be one of four essential cultural accomplishments along with music, calligraphy and painting." -
Perseid Meteor Shower This Week
fejikso writes "Space Daily and the BBC announce the coming of the annual Perseid meteor shower, and forecasters say it could be unusually good. The cosmic spectacle is produced by the debris left by the comet Swift-Tuttle. When the shower peaks, by August 12, sky watchers can expect to see dozens, possibly even hundreds, of meteors per hour." -
The Business Value of Open Source Examined
jg21 writes "'Open source developers have the opportunity to influence technology that is being used by companies and do it on a global scale in a way that cannot occur with any other type of software,' contends Bill Claybrook, writing in the current issue of LinuxWorld. The article is a historical overview of the open source revolution, starting in the 80s with the GNU Project, BSD, and TCP/IP and then moving into the 90s with Red Hat, StarOffice, and coming right into the 21st century with the Ximian Desktop and Sun's Linux-based Sun Java Desktop System." -
The Business Value of Open Source Examined
jg21 writes "'Open source developers have the opportunity to influence technology that is being used by companies and do it on a global scale in a way that cannot occur with any other type of software,' contends Bill Claybrook, writing in the current issue of LinuxWorld. The article is a historical overview of the open source revolution, starting in the 80s with the GNU Project, BSD, and TCP/IP and then moving into the 90s with Red Hat, StarOffice, and coming right into the 21st century with the Ximian Desktop and Sun's Linux-based Sun Java Desktop System." -
The PHP Anthology - Volume II, 'Applications'
sympleko (Matthew Leingang) writes "In Volume I of The PHP Anthology, Harry Fuecks showed some of the basic PHP functionality to solve a few simple problems, including how to object-orient your code, how to use PHP's hundreds of built-in functions, and how to use well-developed existing classes, be they from PEAR or other sites. In Volume II, he intends to 'blow your socks off by tackling some traditionally complex problems with the same principles--to great effect.' It's summertime and I'm sandals-only for the time being, so my socks remain safely in the top drawer. But the volume is nonetheless exciting." (Read on for the rest of Leingang's review, and check out last week's review of Volume I.)There are seven chapters in this volume, each dealing with real-world problems. Many problems are those you've seen solved on sites you admire and wondered "How did they do that?" Others are frameworks that allow your site to run smoothly, with nobody getting accidentally logged out or having to wait too long while your script gluttonously pulls the same data out of the database for the Nth time. At the end, Fuecks goes back to the beginning, to show how proper design and development can save you time when you start your next project.
Chapter 1: Access Control
Authentication is the process by which users identify themselves. This is difficult in HTTP, a stateless protocol in which the server handles one request at a time and instantly forgets you. Luckily HTTP allows cookies, which are bits of data the server sends to the client for to reveal upon revisiting. At first cookies were used only to annoy ("Hello, Steve! You have visited this page 3 times"), but a cookie can hold the ID of a session record in a database, which contains any state-information that you like.You can authenticate without sessions via HTTP server configuration, as long as you like the dull dialog box the browser pops up when users enter a restricted area. Oh, and you don't mind the fact that users won't be able to "log out" without quitting their browser, nor can you force a logout after a certain timeout value. Nor can you allow users to register themselves... these are all existing, solved problems and the author shows some of the best solutions. Common tasks like allowing users to change their passwords, recover their passwords if (I mean when) they forget them, and arranging users in groups to which you assign common permissions are also covered.
My favorite example from this chapter is the humans-only registration application. Remember when online voting for the Major League Baseball All-Star Game first started? Anyone who knew how to write a web client could have automated a task to vote as many times as the server could handle, and have his favorite players be the all-star team.* To bring it closer to home, what if somebody decides to bog down your site by automatically registering a huge number of times and filling up your database? You can keep these things from happening by making users look at images which contain text but are hard for computers to "read." PHP is in use at all stages of this game, from writing the registration form's HTML to generating the obscured image on-the-fly.
Chapter 2: XML
XML is a fact of life and, hype aside, is a great way to store and transmit machine-readable data. One of the most visible applications is the thousands of bloggers and news sites providing XML feeds of their headlines. You can write portal sites that grab these headlines, parse them all and present them on your site with links to the full text at the source.There are two ways to parse XML: with events, or by using the Document Object Model (DOM). The methodologies are similar to reading a plain-text file line-by-line or all at once. Using events you can implement a finite-state machine based on which tags and text come down the pike. Or you can slurp the whole document into memory and find any part of it with ease. The built-in library for the former is based on the popular Simple API for XML (or SAX; don't you like those nested acronyms?), while the latter often uses Xpath to find the particular document nodes you want.
The author shows how to parse RSS feeds with both SAX and the DOM, and how to render a feed with DOM. Further, you can use Extensible Stylesheet Language Transformations (known as XSLT) to transform XML -- whether it's to XHTML for regular browser reading, WML (Wireless Markup Language) for viewing on mobile phones, or even SQL to communicate with a database.
Another exciting XML application is in the area of web services, in which agents (often but not necessarily web servers) communicate with each other over an XML-based protocol built on top of PHP. The two most popular protocols are XML-RPC (the RPC stands for "Remote Procedure Calls") and SOAP (which used to stand for "Simple Object Access Protocol" but now is just a name). Often-changing information such as stock prices and weather are often offered through web services, but they can also be used as an object API between agents over the network. What's cool about using SOAP is you can publish to clients exactly what services you offer and how they can call them using the Web Services Description Language (WSDL).
Chapter 3: Alternative Content Types
If you've ever printed out a web page that was designed for browser viewing, you know the less-than-desired effect. The navigational elements, search boxes, and banners, while necessary for the web page, are useless once a static copy is printed. Furthermore, you need to extend your site to include users with less-featured browsers, such as mobile phones.Fortunately, PHP has been taught many languages. PDF is the standard for print-quality documents, and there are several libraries (free and non-free) which allow you to generate them. WML is the HTML of cell phone browsers, in which screen space is at a premium and bandwidth scarce. SVG is an XML application which allows vector-based images like PostScript does. The coolest example, however, uses XUL (the XML User interface Language, not to be confused with Zool) to make full GUI applications that you run through Mozilla. This isn't useful for the outside world where you can't force your users to use Mozilla (sigh), but works well for intranet applications that run on a variety of platforms.
The author also brings up in this chapter an HTML SAX parser he has written. You can process HTML pages chunk-by-chunk and extract the pieces you want. I hadn't known about such a class until I read the book and I'm very excited I know about it now. For sometimes it's necessary to parse a web page meant for humans to read (perhaps to pretend to be a user and automate your all-star voting), and most HTML pages won't validate as HTML, let alone XML.
A good point here is that a well-designed, tiered application will allow you to swap out different presentation classes with little code rewrite. Separating the tasks of extracting the data from the database and presenting to the user in variety of formats is a common task that when done right becomes subsequently easier.
Chapter 4: Stats and Tracking
Once your site is up and running, you'll be interested to know which parts are the most active, and how much traffic you're getting. Into a dynamic page you can obviously insert any logging mechanism, but a great place to put it is inside your site's logo. PHP can send binary data as easily as text. Why would you want to do this?- The logo is usually on every page (or it should be). You don't have to cut-and-paste code.
- You can serve the image, then use the flush command to send the output on and do extra processing. This way logging doesn't get in the way of page rendering.
There are lots of packages available to collect and analyze data. The author goes through phpOpenTracker which is quite rich in features. There are also ways to collect data on what links users follow to leave your site, and to keep requests from search engines from cluttering your log files.
Chapter 5: Caching
Another possible knock against PHP is that, while it's good to have dynamic pages, some pages are unnecessarily so. This is a waste of server resources to keep rendering the same page anew. There are different ways to conserve.On the client side, you can use HTTP 1.1 headers like Cache-control and Expires to tell browsers when it's okay to store cached copies locally
On the server side, as can be expected, you have a greater level of control. You can use output buffering to delay sending of output to the browser, then save a copy of the output locally. On subsequent requests, you can serve the file rather than generate the HTML all over again. This can be implemented on a chunk (or block) level, so that you can keep some parts ultra-time sensitive and others not so much. The package PEAR::Cache_Lite can help with this.
Chapter 6: Development Technique
The last two chapters were my favorites of the two-volume set. They are on a higher level of abstraction than the features of PHP's library of functions, or previous five chapters on real-world solutions. After you've reached a certain level of expertise in PHP coding, you being to wonder about the "right" way to do things. The author shows how to use Xdebug to find bottlenecks in your code, as well as a few quick optimization tips (for instance, design your flow control so that the first choice is the one most often taken).He then discusses the principles of N-tiered design. N is usually 5, but the data layer (usually a database or file system) and presentation layer (usually the browser) are most often handled outside of PHP, so you normally have three levels to worry about:
- Data Access: Getting data from the outside world into your application
- Application Logic: Doing whatever unique thing your application is supposed to do
- Presentation Logic: Forming a response in a format acceptable to your client
Keeping these layers separate and restricting them to communicating through well-defined interfaces allows you maximum flexibility. If you need to change databases (say you just got venture capital money and can afford Oracle now), you can do so only changing one layer. If you want to serve different flavors of HTML, or different markup languages altogether, or binary data, you can do so by only changing one layer. You can even strive for maximum distributability by enabling your layers to "live" on physically independent machines and communicate with XML-RPC or SOAP.
Documenting your code is essential. Anybody who's been programming for over a year has gone back to code he or she's written and thought, "Now what the heck was this supposed to do?" It's even more essential when you write something and wish to distribute it for the benefit of others. You can expect them to grok your code at an even lower rate since they didn't write it the first time.
Luckily, scripted languages like PHP are excellent at parsing text files, including PHP scripts themselves. Using well-defined documentation formats akin to JavaDoc, you can embed documentation in your code inside comments, and use tools like phpDocumentor to extract these documentation blocks and format them as nice, cross-reference HTML. In fact, writing doc blocks before your code is a good way to think ahead about how you want your classes and methods to work.
Unit Testing, one of the most digestible dogmas of Extreme Programming, is an awesome way to test your code for logic errors. You build up tiny test cases (using mock objects to isolate the class you're testing) and build as many as you like. Once you do this (PHPUnit and SimpleTest are two rich frameworks), you keep your tests and each time you add features, you run your test to make sure you haven't added bugs as well.
Chapter 7: Design Patterns
Design Patterns is one of the modern classics in information technology. After having done OOP for a while, you will inevitably get the feeling of deja vu that you've solved a problem before. Not so concretely as "I need a database abstraction layer," or "I need a templating system," but as in "I need a way to create objects without specifying exactly what class they belong to," or "I'm tired of writing so many if statements." Design patterns are common object architectures which can be used to solve common (though unique) problems.Many design patterns are more suited to state-equipped applications with GUIs, but there are plenty to assist the PHP coder. The Factory Method is a pattern through which an object can create other objects of varying classes. So instead of writing mysql_connect everywhere, then having to change every occurrence of that function, you can abstract all database interaction to a class, then instantiate a database connection through a class method of another class: $db = MyApp::getDatabaseConnection(). This is useful when the connection (not just the RDBMS, but the actual database) you want varies depending on whether you are developing, testing, or going live with your application. Factory methods are also a good way to avoid global configuration variables.
The Iterator Pattern and the Observer Pattern are two others mentioned in this chapter. Iterators are used often in paging through database results. Observers are used to let objects notify other objects of changes in their state. This chapter will make you want to go read the whole Gang-of-Four book if you haven't already.
My biggest beef with the book is that this wasn't presented earlier on, perhaps at the beginning of Volume II. As a climax, it leaves me flat, wondering how the rest of the volume could have been derived from this very cool concept. But most PHP books conclude with chapters on how to extended PHP on the C level, or giant case studies involving massive code dumps, and I'm often not satisfied with them. This is a nice philosophical note to go out on. And there's something to be said for the argument that books like these aren't written to be read cover-to-cover.
Appendices
The book closes with the same indices as in Volume I. Since I don't know the URL of my review of that volume, I'll just copy: You can read about which configuration directives you're probably most interested in (the complete list you can get on PHP's web site), some common security breaches, and how to install PEAR, PHP's version of CPAN. My favorite appendix is the "Hosting Provider Checklist," a great reference for evaluating whether kewlhosting.com is going to give you the freedom and support you need to make a great hosted web site.This volume was informative, well-written, and inspirational in that it made me want to go out and add cool and useful features to my web sites. Check it out if you can.
*Not really (not that I tried or anything), but they've always been a little bit smarter about it. You get my point, though. This did happen on an ESPN.com Page 2 mascot popularity contest, but they noticed through request headers that millions of votes were coming from the same place, and invalidated all those votes.
In real life, Matthew Leingang is Preceptor in Mathematics at Harvard University. He promises to review any book sent to him for free, and sometimes actually does it. Both volumes of The PHP Anthology are available from SitePoint. Slashdot welcomes readers' book reviews; to see your own review here, carefully read the book review guidelines, then visit the submission page.
-
Broken Angels
Motor writes "Broken Angels is the second novel by Richard Morgan, and a follow up to 'Altered Carbon' (see a Slashdot review here) with the same protagonist, Takeshi Kovacs. Although 'Broken Angels' works as a standalone novel, it does draw on the background established in the first book: the Envoy Corps; the Protectorate; the Martians, and most significantly the concept of 'sleeves.'" Read on below for the rest of Motor's review to see if this book might be your kind of Sci-Fi. Broken Angels author Richard Morgan pages 484 publisher Gollancz rating 8 reviewer Motor ISBN 0575075503 summary Violent, gory and intelligent hard SFFirst, a little background on the universe of Broken Angel. A few hundred years before the events in Altered Carbon, humanity discovers the technological remains of a space-faring species on Mars -- and naturally nicknames them Martians, even though it is clear Mars is not their home planet, just a colony. After decoding some of their technology and information, humanity begins moving out to the various worlds detailed in the Martian records.
The other big technological breakthrough is the ability to record a person's mind via a cortical stack implanted in the spine. This effectively abolishes death through injury or disease, as the stack can be recovered and the data stored -- and even downloaded into a new body, or 'sleeve.' It also makes Real Death, or the destruction of someone's cortical stack, a much more serious crime than mere organic damage.
Far from creating a technological utopia of plenty for everyone this tech-breakthrough, diaspora and near-freedom from death, leads to more revolutions, more killing, and more varied inventive ways of brutalising each other. New bodies, or sleeves, cost money and most people are unable to afford them, and are consequently kept "on stack." Raw, unfettered captialism is the way. Criminal behaviour gets you stacked for a number of years, and your body handed over to someone else. It also opens the way to such charming practises as virtual torture, with no hope of escape or death.
Takeshi Kovacs, born on the Harlan's World colony, is a former member of the Envoy Corps. A military branch that 'conditions' its members, effectively rewriting their personalities to make them better soldiers. The Envoy Corps are the most feared soliders of the Protectorate. The conditioning gives them iron emotional control, a lack of empathy, extra combat awareness, and skill at psychologically manipulating others. They also possess the ability to deal with being quickly and frequently re-sleeved when deployed into a combat situation via needlecast (a kind of hyperspace communication system) -- something that can, apparently, be quite traumatic for normal people.
Altered Carbon covered (in flashback) some of Kovacs' background story, and the reasons for his disillusionment and desertion from the Envoys; Broken Angels continues his story. After the events in Altered Carbon, Kovacs finds himself signed up to fight in a mercenary unit -- known as 'The Wedge' -- on the colony world of Sanction IV. Former Envoys are highly prized by commanders, and despite his distaste of command and responsibility, it pays the bills.
After being injured in a battle, Kovacs is approached by another soldier to get involved with the unofficial find of a Martian artifact ... one of the most extraordinary and potentially lucrative yet found. It's a race to claim ownership, against other ruthless corporations, betrayal, slow sleeve death due to radiation sickness (the Mandrake corporation engineers the nuking of a nearby city, just to clear out the area), and killer nanotechnology.
Like Altered Carbon, Broken Angels is a brutal read in parts. It doesn't flinch from the horrific things people do to each other, and is spectacularly inventive in thinking up ever more horrendous methods of punishment and interrogation. It throws in voodoo, 'soul markets' where dead soliders' stacks are sold, and an anatomiser -- a machine designed for a horrible ritual punishment in The Wedge.
While I enjoyed Altered Carbon, I thought it almost too much of a teenage-boy fantasy novel: An almost unstoppable bad-ass who can deal with anything, but is basically a good guy at heart; the almost fetishistic descriptions of weapons and gleefully detailed battles and brawls. It's all good stuff; well written and inventive, but a bit limited (except for the Jimmy de Soto hallucinations, which I thought were excellent). It was saved by its imaginative technology, hard SF speculation and clever detective story twists. Broken Angels seems a bit more mature. There is still the gleeful descriptions of battles, but the surrounding characters seem more fleshed out. 'Broken Angels' is no character-driven, emotionally deep masterpiece -- but it is a page-turner which neatly combines fast-paced action, imaginative technology and plot twists.
A quick note for any British readers who remember when the Conservatives (the traditional party of the Right) were in power: In the novel, the current whiney political officer of Kovacs' Wedge unit is called Lamont (he's been deliberately addicted to wire to keep him quiet), and the previous one was Portillo (he was regularly beaten, also to keep him quiet). It's a safe bet that Morgan is not a card-carrying member of the Conservative Party.
You can purchase Broken Angels from bn.com. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. -
Broken Angels
Motor writes "Broken Angels is the second novel by Richard Morgan, and a follow up to 'Altered Carbon' (see a Slashdot review here) with the same protagonist, Takeshi Kovacs. Although 'Broken Angels' works as a standalone novel, it does draw on the background established in the first book: the Envoy Corps; the Protectorate; the Martians, and most significantly the concept of 'sleeves.'" Read on below for the rest of Motor's review to see if this book might be your kind of Sci-Fi. Broken Angels author Richard Morgan pages 484 publisher Gollancz rating 8 reviewer Motor ISBN 0575075503 summary Violent, gory and intelligent hard SFFirst, a little background on the universe of Broken Angel. A few hundred years before the events in Altered Carbon, humanity discovers the technological remains of a space-faring species on Mars -- and naturally nicknames them Martians, even though it is clear Mars is not their home planet, just a colony. After decoding some of their technology and information, humanity begins moving out to the various worlds detailed in the Martian records.
The other big technological breakthrough is the ability to record a person's mind via a cortical stack implanted in the spine. This effectively abolishes death through injury or disease, as the stack can be recovered and the data stored -- and even downloaded into a new body, or 'sleeve.' It also makes Real Death, or the destruction of someone's cortical stack, a much more serious crime than mere organic damage.
Far from creating a technological utopia of plenty for everyone this tech-breakthrough, diaspora and near-freedom from death, leads to more revolutions, more killing, and more varied inventive ways of brutalising each other. New bodies, or sleeves, cost money and most people are unable to afford them, and are consequently kept "on stack." Raw, unfettered captialism is the way. Criminal behaviour gets you stacked for a number of years, and your body handed over to someone else. It also opens the way to such charming practises as virtual torture, with no hope of escape or death.
Takeshi Kovacs, born on the Harlan's World colony, is a former member of the Envoy Corps. A military branch that 'conditions' its members, effectively rewriting their personalities to make them better soldiers. The Envoy Corps are the most feared soliders of the Protectorate. The conditioning gives them iron emotional control, a lack of empathy, extra combat awareness, and skill at psychologically manipulating others. They also possess the ability to deal with being quickly and frequently re-sleeved when deployed into a combat situation via needlecast (a kind of hyperspace communication system) -- something that can, apparently, be quite traumatic for normal people.
Altered Carbon covered (in flashback) some of Kovacs' background story, and the reasons for his disillusionment and desertion from the Envoys; Broken Angels continues his story. After the events in Altered Carbon, Kovacs finds himself signed up to fight in a mercenary unit -- known as 'The Wedge' -- on the colony world of Sanction IV. Former Envoys are highly prized by commanders, and despite his distaste of command and responsibility, it pays the bills.
After being injured in a battle, Kovacs is approached by another soldier to get involved with the unofficial find of a Martian artifact ... one of the most extraordinary and potentially lucrative yet found. It's a race to claim ownership, against other ruthless corporations, betrayal, slow sleeve death due to radiation sickness (the Mandrake corporation engineers the nuking of a nearby city, just to clear out the area), and killer nanotechnology.
Like Altered Carbon, Broken Angels is a brutal read in parts. It doesn't flinch from the horrific things people do to each other, and is spectacularly inventive in thinking up ever more horrendous methods of punishment and interrogation. It throws in voodoo, 'soul markets' where dead soliders' stacks are sold, and an anatomiser -- a machine designed for a horrible ritual punishment in The Wedge.
While I enjoyed Altered Carbon, I thought it almost too much of a teenage-boy fantasy novel: An almost unstoppable bad-ass who can deal with anything, but is basically a good guy at heart; the almost fetishistic descriptions of weapons and gleefully detailed battles and brawls. It's all good stuff; well written and inventive, but a bit limited (except for the Jimmy de Soto hallucinations, which I thought were excellent). It was saved by its imaginative technology, hard SF speculation and clever detective story twists. Broken Angels seems a bit more mature. There is still the gleeful descriptions of battles, but the surrounding characters seem more fleshed out. 'Broken Angels' is no character-driven, emotionally deep masterpiece -- but it is a page-turner which neatly combines fast-paced action, imaginative technology and plot twists.
A quick note for any British readers who remember when the Conservatives (the traditional party of the Right) were in power: In the novel, the current whiney political officer of Kovacs' Wedge unit is called Lamont (he's been deliberately addicted to wire to keep him quiet), and the previous one was Portillo (he was regularly beaten, also to keep him quiet). It's a safe bet that Morgan is not a card-carrying member of the Conservative Party.
You can purchase Broken Angels from bn.com. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. -
The PHP Anthology - Volume I, 'Foundations'
sympleko (Matt Leingang) writes "What a beautiful world anthology is. It comes from the Greek for a gathering of flowers, and in literature means a collection of works. Harry Fuecks, a very frequent contributor to the SitePoint community PHP forums, has gathered a bouquet of PHP best practices in a new book. The book comes in two volumes. The audience for Volume I, "Foundations," is the advanced beginner who's done one or two things in PHP, but you wants to know how to do more. Volume II, "Applications," is a design volume, mainly, and is good for people who have lots of experience with PHP but want to be better programmers. It's nice that the two volumes are separate; if you already know the syntax and mechanics of PHP you can buy Volume II and maximize d!/d$.*" Read on for Leingang's review of Volume I, and watch for his followup on Volume II. The PHP Anthology: Volume I: Foundations author Harry Fuecks pages 376 publisher SitePoint rating 7 reviewer Matthew Leingang ISBN 0957921853 summary Good start; for the real story read Volume II as well.The book is very well-written, often using a question-and-answer heading style that makes searching the table of contents easy. In the preface, we already meet the first cool aspect of the book: lots of links to sites in the form of footnotes.** Yes, most books of this genre include links to web sites, but this way makes a couple of things clear: first, that there are lot of references, so you have many places to jump to for more information, and it's a sleeker text flow: embedding URLs in dead text makes line breaking hard and detracts from the flow of the language. As you read a page, you can note, "OK, that's an online resource," and keep reading without having to stumble over an incomprehensible URL.
Each volume has numerous code examples, and they're all on the book's web page to save you from transcribing. The web site is the best place also to buy the books; they're generally not available in stores.
Chapter 1: PHP Basics
These are the foundations of the book. Quick highlights:How does one exactly RTFM? The author directs the novice to the PHP web site and explains what each part of the online manual corresponds to. But also, the coolest aspect of the PHP web site is its search-by-url feature. It looks up a function or language reference page, finds a set of likely matches, or just googles the site for you. Try it: http://php.net/array, http://php.net/sprintf, http://php.net/error.
How to understand error messages. Remember your first "cannot add header information -- headers already sent" error. Huh? Learn the difference between parse errors (what you wrote is not valid code), semantic errors (you're asking PHP to do something illegal), environment errors (PHP is not equipped to do what you want), and logic errors (PHP is happy but you're not). The last is particularly insidious (no E_PEBKAC level of reporting), but unit testing (see Volume II) gives you hope to find and fix those.
How to include. What is the difference between include and require (answer: require forces a fatal error if it can't find the file you want, while include only warns)?
How to write portable and reusable code There are hundreds of configuration directives, and using them can make one of your applications simpler. But some are to be used only with careful consideration. The magic_quotes_gpc directive, for instance, sounded like a good idea at the time it was developed. It automatically escapes user input so backslashes remain backslashes and not escape characters. A common use of this directive allowed you to insert user-supplied data directly into a database without checking to make sure any embedded quotes wouldn't create unintended SQL statements. While this does guard against SQL injection attacks, you could still end up with garbage in the database. So you still have to check user data to make sure it complies to your standards. This is easier to do before escaping magic characters, so it's better to wait until just before storage; then add all the backslashes you need. Nowadays it's considered good form to not rely on this directive and just use addslashes when you need it.
For maximal code reuse, consider object orientation. But there's a whole chapter on that...
Chapter 2: Object Oriented PHP
"Be lazy," the author writes; "Write good code." One of the ways to organize your code is through object-oriented programming. Most readers know the basic concepts of OOP, and are probably tired of the few over-simplified examples. Beyond that this chapter wants to get you to think OO, to "no longer think about long lists of tasks that a single script should accomplish; instead, [to] see programming as the putting together of a set of tools to which your script will delegate work."I know my first PHP classes were just namespaced scripts. The attributes and methods weren't at all related. This chapter (as well as Chapter 7 of Volume II) helps you distinguish where your classes are and how they connect. One of the aids for this is the use of Unified Modeling Language (UML) class diagrams. These diagrams, which use boxes for classes and arrows for the relationships between them, are really cool programming and teaching tools that require no code!
Here I think the book's physical workflow got caught in a gap between major PHP releases. The cover says this book says "PHP5 ready," which is a bit of a misnomer because all the code examples and rules are all written for PHP4. Minor text mentioning how things are going to be different in PHP5 has been inserted. It's true that none of the OO code written here will break in PHP5, but there are major additions to PHP5 especially in the OO implementation (no more ampersands! actual private variables! Exceptions! Much, much more!). Still, the author makes the point that you the programmer may not be using PHP5 for a while (PHP 5.0.0 is only a few weeks old today), and that you shouldn't put off learning PHP until version 5 is agreed to be stable.
I've read the comments of PHP bashers, arguing that using it for OO programming is a waste of overhead. The author has heard that argument, too, and rebuts:
"What they forget to mention is the drastic increase in your performance that object oriented programming delivers. After all, fast programmers cost more than fast microprocessors!"
Hear, hear. RAM and disk space are commodities, while programmers are not (yet).
Chapter 3: PHP and MySQL
This goes beyond the simple HOWTO on connecting to a database. A suite of PHP classes is developed for database connections, querying, and result handling, not as much to use as for your "health"--i.e., to see a well-done class from start to finish. For your real applications, use a real, well-maintained and tested class such as those found in PEAR. This is another principle of good programming: Somebody has probably had the same problem you are having right now, and already solved it (also known as Ecclesiastes 1:9, "...there is nothing new under the sun.")If you've done lots of SQL queries, you get to thinking that there's got to be a better way to access a database. In fact, you can build a layer of abstraction over the database connection layer to create interface classes to individual tables. This is called a persistence layer. For an implementation, see PEAR::DB_DataObject.
Any web programmer fears insecurity, and I don't mean self-doubt. The author weaves discussions of security into each chapter. For instance, you must be careful to guard against allowing users to seriously alter the nature of your SQL queries. Trust no user-supplied data! Also, this chapter gives a PHP-based solution for creating MySQL dumps.
Once you've got the data in the database, making sure users can find it is another problem. You can use LIKE relations in your queries to search field strings. The author shows how to use FULLTEXT indexes (a MySQL 4 feature) to assist in searching the entire table or any set of fields you like, all at once.
Chapter 4: Files
Sometimes databases are overkill for data storage, or you need to extract data from text files. The author gives several examples of uses of interacting with a local or remote file system. He explains:- how to slurp whole files into memory or to process them chunk-by-chunk.
- how to use the PHP built-in functions to interface with the file system (so you can make a self-updating "Last updated: " item on your pages).
- how to use .ini-style files to store configuration data -- a common configuration style which is much faster than keeping it in a RDBMS or XML file.
- how to use FTP with PHP.
- how to compress and decompress with tar through PHP.
- how to send create a file and send it to your web user (custom files generated on-the-fly and ready for download!).
Again, the security threat is raised, and the author gives pointers on how to prevent from crackers getting you to execute their code by including one of their files rather than your own.
Chapter 5: Text Manipulation
When building dynamic web sites, being able to manipulate code is a must. You need to validate the data that users send to you, as well as guard against simple HTML error or malicious cross-site scripting (XSS) attacks. There are lots of built in functions (strip_tags to remove the HTML from a string), but using regular expressions you can validate and filter just about anything. You can reimplement a restricted set of markup tags a la BBCode, or set up a custom, easily-updated profanity filter.Chapter 6: Dates and Times
Another real-world problem is formatting dates and times in a human-readable (and perhaps localizeable) way, and on the machine level manipulating dates correctly. Luckily these are all solved problems and PHP connects you to the C functions which do it. Whether you store dates as MySQL timestamps (e.g., 2004-08-03 20:07:00) or UNIX timestamps (1091578114 seconds since the epoch) is up to you, although if you use the former you'll probably have to convert to the latter at some point. Putting it all together you can create dynamic calendars where clicking on a day brings you to your appointments for that day. Another good use of date functions is a implementation of cron written entirely in PHP for those not on a unix platform.Chapter 7: Images
Once you've mastered the art of producing HTML with PHP (developed even further in Chapter 9), you'll wonder what else can do. It turns out that PHP, using glue to the GD image library, can output images as well. You can generate thumbnails of your images to create galleries. You can watermark images with text to discourage stealing them. You can hide your images behind a PHP script that protects people other than you from linking directly to your images. And you can analyze data with enough charts and graphs to make Ross Perot ecstatic.Chapter 8: Email
Contacting your users off-site is a must if you want them to come back. Furthermore, it's a nice way to register users by sending them links to an address they provide. PHP can send email natively using the mail function, but as always there are nice classes which jazz up the features. You can send HTML attachments (known by some as "spam", but we're not here to judge), even including the images in the mail. You can even use PHP as a replacement for procmail by parsing incoming mail and triggering actions based on headers.Chapter 9: Web Page Elements
Eventually you get tired of writing HTML, and interweaving markup and presentation logic can give you a headache. Can't PHP be told to format the table the right way? Another solved problem! Displaying data in a table is a common task, and classes such as PEAR::HTML_Table can take a simple data structure and beautify it for you. Forms are another area in which PHP-generated code can save you time. You can also use PHP to produce "breadcrumbs" (there's one at the top of every slashdot page) and drop-down menus that show your users where in the hierarchy of information they are. Finally the author shows how to use apache's url_rewrite module to get those question marks, file extensions, and ampersands out of your URLS and sex them up. (You can also do this without url_rewrite, completely inside PHP, but using a custom error document and examining the path requested.)Chapter 10: Error Handling
So you're all excited about your next web app, and you dive into coding, and something goes wrong. What then? This chapter is about errors. You can use the error_reporting function to customize which exceptions actually produce error messages, or create your own error messages that handle errors your own way. You can choose to log them in a database, send an e-mail to a coding team, and most importantly, recover gracefully so that your users don't see an error message. Not only is it unprofessional, it may reveal information about your program, file system, or database structure that can harm you.Appendices
There are several good appendices, which tell you which configuration directives you're probably most interested in (the complete list you can get on PHP's web site), some common security breaches, and how to install PEAR, PHP's version of CPAN. My favorite appendix is the "Hosting Provider Checklist," a great reference for evaluating whether kewlhosting.com is going to give you the freedom and support you need to make a great hosted web site.All in all, I liked this volume. Having read probably a dozen PHP books I wouldn't say it offers new information. But even though you know the plot, it's possible to enjoy a well-told story. See Volume II for heavier-duty ideas.
* My made-up calculus notation for "bang for your buck"
**Like this: http://books.slashdot.org/
In real life, Matthew Leingang is Preceptor in Mathematics at Harvard University. He promises to review any book sent to him for free, and sometimes actually does it. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. -
The PHP Anthology - Volume I, 'Foundations'
sympleko (Matt Leingang) writes "What a beautiful world anthology is. It comes from the Greek for a gathering of flowers, and in literature means a collection of works. Harry Fuecks, a very frequent contributor to the SitePoint community PHP forums, has gathered a bouquet of PHP best practices in a new book. The book comes in two volumes. The audience for Volume I, "Foundations," is the advanced beginner who's done one or two things in PHP, but you wants to know how to do more. Volume II, "Applications," is a design volume, mainly, and is good for people who have lots of experience with PHP but want to be better programmers. It's nice that the two volumes are separate; if you already know the syntax and mechanics of PHP you can buy Volume II and maximize d!/d$.*" Read on for Leingang's review of Volume I, and watch for his followup on Volume II. The PHP Anthology: Volume I: Foundations author Harry Fuecks pages 376 publisher SitePoint rating 7 reviewer Matthew Leingang ISBN 0957921853 summary Good start; for the real story read Volume II as well.The book is very well-written, often using a question-and-answer heading style that makes searching the table of contents easy. In the preface, we already meet the first cool aspect of the book: lots of links to sites in the form of footnotes.** Yes, most books of this genre include links to web sites, but this way makes a couple of things clear: first, that there are lot of references, so you have many places to jump to for more information, and it's a sleeker text flow: embedding URLs in dead text makes line breaking hard and detracts from the flow of the language. As you read a page, you can note, "OK, that's an online resource," and keep reading without having to stumble over an incomprehensible URL.
Each volume has numerous code examples, and they're all on the book's web page to save you from transcribing. The web site is the best place also to buy the books; they're generally not available in stores.
Chapter 1: PHP Basics
These are the foundations of the book. Quick highlights:How does one exactly RTFM? The author directs the novice to the PHP web site and explains what each part of the online manual corresponds to. But also, the coolest aspect of the PHP web site is its search-by-url feature. It looks up a function or language reference page, finds a set of likely matches, or just googles the site for you. Try it: http://php.net/array, http://php.net/sprintf, http://php.net/error.
How to understand error messages. Remember your first "cannot add header information -- headers already sent" error. Huh? Learn the difference between parse errors (what you wrote is not valid code), semantic errors (you're asking PHP to do something illegal), environment errors (PHP is not equipped to do what you want), and logic errors (PHP is happy but you're not). The last is particularly insidious (no E_PEBKAC level of reporting), but unit testing (see Volume II) gives you hope to find and fix those.
How to include. What is the difference between include and require (answer: require forces a fatal error if it can't find the file you want, while include only warns)?
How to write portable and reusable code There are hundreds of configuration directives, and using them can make one of your applications simpler. But some are to be used only with careful consideration. The magic_quotes_gpc directive, for instance, sounded like a good idea at the time it was developed. It automatically escapes user input so backslashes remain backslashes and not escape characters. A common use of this directive allowed you to insert user-supplied data directly into a database without checking to make sure any embedded quotes wouldn't create unintended SQL statements. While this does guard against SQL injection attacks, you could still end up with garbage in the database. So you still have to check user data to make sure it complies to your standards. This is easier to do before escaping magic characters, so it's better to wait until just before storage; then add all the backslashes you need. Nowadays it's considered good form to not rely on this directive and just use addslashes when you need it.
For maximal code reuse, consider object orientation. But there's a whole chapter on that...
Chapter 2: Object Oriented PHP
"Be lazy," the author writes; "Write good code." One of the ways to organize your code is through object-oriented programming. Most readers know the basic concepts of OOP, and are probably tired of the few over-simplified examples. Beyond that this chapter wants to get you to think OO, to "no longer think about long lists of tasks that a single script should accomplish; instead, [to] see programming as the putting together of a set of tools to which your script will delegate work."I know my first PHP classes were just namespaced scripts. The attributes and methods weren't at all related. This chapter (as well as Chapter 7 of Volume II) helps you distinguish where your classes are and how they connect. One of the aids for this is the use of Unified Modeling Language (UML) class diagrams. These diagrams, which use boxes for classes and arrows for the relationships between them, are really cool programming and teaching tools that require no code!
Here I think the book's physical workflow got caught in a gap between major PHP releases. The cover says this book says "PHP5 ready," which is a bit of a misnomer because all the code examples and rules are all written for PHP4. Minor text mentioning how things are going to be different in PHP5 has been inserted. It's true that none of the OO code written here will break in PHP5, but there are major additions to PHP5 especially in the OO implementation (no more ampersands! actual private variables! Exceptions! Much, much more!). Still, the author makes the point that you the programmer may not be using PHP5 for a while (PHP 5.0.0 is only a few weeks old today), and that you shouldn't put off learning PHP until version 5 is agreed to be stable.
I've read the comments of PHP bashers, arguing that using it for OO programming is a waste of overhead. The author has heard that argument, too, and rebuts:
"What they forget to mention is the drastic increase in your performance that object oriented programming delivers. After all, fast programmers cost more than fast microprocessors!"
Hear, hear. RAM and disk space are commodities, while programmers are not (yet).
Chapter 3: PHP and MySQL
This goes beyond the simple HOWTO on connecting to a database. A suite of PHP classes is developed for database connections, querying, and result handling, not as much to use as for your "health"--i.e., to see a well-done class from start to finish. For your real applications, use a real, well-maintained and tested class such as those found in PEAR. This is another principle of good programming: Somebody has probably had the same problem you are having right now, and already solved it (also known as Ecclesiastes 1:9, "...there is nothing new under the sun.")If you've done lots of SQL queries, you get to thinking that there's got to be a better way to access a database. In fact, you can build a layer of abstraction over the database connection layer to create interface classes to individual tables. This is called a persistence layer. For an implementation, see PEAR::DB_DataObject.
Any web programmer fears insecurity, and I don't mean self-doubt. The author weaves discussions of security into each chapter. For instance, you must be careful to guard against allowing users to seriously alter the nature of your SQL queries. Trust no user-supplied data! Also, this chapter gives a PHP-based solution for creating MySQL dumps.
Once you've got the data in the database, making sure users can find it is another problem. You can use LIKE relations in your queries to search field strings. The author shows how to use FULLTEXT indexes (a MySQL 4 feature) to assist in searching the entire table or any set of fields you like, all at once.
Chapter 4: Files
Sometimes databases are overkill for data storage, or you need to extract data from text files. The author gives several examples of uses of interacting with a local or remote file system. He explains:- how to slurp whole files into memory or to process them chunk-by-chunk.
- how to use the PHP built-in functions to interface with the file system (so you can make a self-updating "Last updated: " item on your pages).
- how to use .ini-style files to store configuration data -- a common configuration style which is much faster than keeping it in a RDBMS or XML file.
- how to use FTP with PHP.
- how to compress and decompress with tar through PHP.
- how to send create a file and send it to your web user (custom files generated on-the-fly and ready for download!).
Again, the security threat is raised, and the author gives pointers on how to prevent from crackers getting you to execute their code by including one of their files rather than your own.
Chapter 5: Text Manipulation
When building dynamic web sites, being able to manipulate code is a must. You need to validate the data that users send to you, as well as guard against simple HTML error or malicious cross-site scripting (XSS) attacks. There are lots of built in functions (strip_tags to remove the HTML from a string), but using regular expressions you can validate and filter just about anything. You can reimplement a restricted set of markup tags a la BBCode, or set up a custom, easily-updated profanity filter.Chapter 6: Dates and Times
Another real-world problem is formatting dates and times in a human-readable (and perhaps localizeable) way, and on the machine level manipulating dates correctly. Luckily these are all solved problems and PHP connects you to the C functions which do it. Whether you store dates as MySQL timestamps (e.g., 2004-08-03 20:07:00) or UNIX timestamps (1091578114 seconds since the epoch) is up to you, although if you use the former you'll probably have to convert to the latter at some point. Putting it all together you can create dynamic calendars where clicking on a day brings you to your appointments for that day. Another good use of date functions is a implementation of cron written entirely in PHP for those not on a unix platform.Chapter 7: Images
Once you've mastered the art of producing HTML with PHP (developed even further in Chapter 9), you'll wonder what else can do. It turns out that PHP, using glue to the GD image library, can output images as well. You can generate thumbnails of your images to create galleries. You can watermark images with text to discourage stealing them. You can hide your images behind a PHP script that protects people other than you from linking directly to your images. And you can analyze data with enough charts and graphs to make Ross Perot ecstatic.Chapter 8: Email
Contacting your users off-site is a must if you want them to come back. Furthermore, it's a nice way to register users by sending them links to an address they provide. PHP can send email natively using the mail function, but as always there are nice classes which jazz up the features. You can send HTML attachments (known by some as "spam", but we're not here to judge), even including the images in the mail. You can even use PHP as a replacement for procmail by parsing incoming mail and triggering actions based on headers.Chapter 9: Web Page Elements
Eventually you get tired of writing HTML, and interweaving markup and presentation logic can give you a headache. Can't PHP be told to format the table the right way? Another solved problem! Displaying data in a table is a common task, and classes such as PEAR::HTML_Table can take a simple data structure and beautify it for you. Forms are another area in which PHP-generated code can save you time. You can also use PHP to produce "breadcrumbs" (there's one at the top of every slashdot page) and drop-down menus that show your users where in the hierarchy of information they are. Finally the author shows how to use apache's url_rewrite module to get those question marks, file extensions, and ampersands out of your URLS and sex them up. (You can also do this without url_rewrite, completely inside PHP, but using a custom error document and examining the path requested.)Chapter 10: Error Handling
So you're all excited about your next web app, and you dive into coding, and something goes wrong. What then? This chapter is about errors. You can use the error_reporting function to customize which exceptions actually produce error messages, or create your own error messages that handle errors your own way. You can choose to log them in a database, send an e-mail to a coding team, and most importantly, recover gracefully so that your users don't see an error message. Not only is it unprofessional, it may reveal information about your program, file system, or database structure that can harm you.Appendices
There are several good appendices, which tell you which configuration directives you're probably most interested in (the complete list you can get on PHP's web site), some common security breaches, and how to install PEAR, PHP's version of CPAN. My favorite appendix is the "Hosting Provider Checklist," a great reference for evaluating whether kewlhosting.com is going to give you the freedom and support you need to make a great hosted web site.All in all, I liked this volume. Having read probably a dozen PHP books I wouldn't say it offers new information. But even though you know the plot, it's possible to enjoy a well-told story. See Volume II for heavier-duty ideas.
* My made-up calculus notation for "bang for your buck"
**Like this: http://books.slashdot.org/
In real life, Matthew Leingang is Preceptor in Mathematics at Harvard University. He promises to review any book sent to him for free, and sometimes actually does it. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. -
Portable Digital Voice Recorders for a Singer?
Geek Singer asks: "I've had classical singing lessons for a while now and managed to advance to a level where hearing my own lessons is important for developing my skills. Here in Europe many singers use MiniDisc recorders. As a geek I think that MD recorders are DRM-encumbered, clumsy, slow and obsolete. Especially moving the recordings into my computer can get very troublesome due to nasty restrictions cast by Sony. For these reasons I need to have something else than a MD recorder. There are various portable MP3 players that have a voice recording capability, but I've found none that have all the properties I need: low price, good recording quality, line-in recording, excellent battery life, a good interface, support for Linux or Mac OS X and enough space for tens of hours of decent quality voice recordings or a slot for an exchangeable memory card. I've already checked numerous manufacturers including iRiver. Their players are great, except that the HD-models are too expensive and the flash-based models don't have a memory card slot. What portable digital voice recorders do you suggest?" -
Portable Digital Voice Recorders for a Singer?
Geek Singer asks: "I've had classical singing lessons for a while now and managed to advance to a level where hearing my own lessons is important for developing my skills. Here in Europe many singers use MiniDisc recorders. As a geek I think that MD recorders are DRM-encumbered, clumsy, slow and obsolete. Especially moving the recordings into my computer can get very troublesome due to nasty restrictions cast by Sony. For these reasons I need to have something else than a MD recorder. There are various portable MP3 players that have a voice recording capability, but I've found none that have all the properties I need: low price, good recording quality, line-in recording, excellent battery life, a good interface, support for Linux or Mac OS X and enough space for tens of hours of decent quality voice recordings or a slot for an exchangeable memory card. I've already checked numerous manufacturers including iRiver. Their players are great, except that the HD-models are too expensive and the flash-based models don't have a memory card slot. What portable digital voice recorders do you suggest?" -
Annual Big Brother Award Winners Announced
SteamyMobile writes "Privacy International announced its Sixth Annual Big Brother awards today. These are awards given to the governments, business and individuals who are doing the most to bring us closer to Orwell's world of 1984. Normally this award is reserved for the British, but there are so many great candidates from other countries this year that they had to acknowledge that. So, who won, and who shall we nominate for next year? This certainly is an area with some tough competition lately." -
Artificial Prion Created
jabberjaw writes "Nature is reporting that researchers at the University of California San Diego have created a synthetic prion which, when injected into mice will bring about symptoms similar to those displayed by cattle suffering from bovine spongiform encephalopathy, aka mad cow disease. The researchers first crafted healthy prion proteins using bacteria. They then shook these proteins until they resembled the tangled structure of an unhealthy prion. Afterwords, these prions were injected into the brains of mice who fell ill two years later. Perhaps someone who is more familiar with this field of research would care to fill us in on the details as the article was rather light." -
DNA Pioneer Francis Crick Passes Away
Neil Halelamien writes "Francis Crick, who discovered the structure of DNA with James Watson, Rosalind Franklin, and Maurice Wilkins, passed away Wednesday in San Diego. His co-discovery of 'the secret of life' made him one of the most influential scientists of all time. In more recent years, he shifted his research efforts from molecular biology to neuroscience, with a particular interest in the question of the neural basis of consciousness." -
NIST Proposes Abandoning DES
Mr. Manometer writes "With little fan-fare, NIST proposed yesterday to withdraw the Federal Information Processing Standard (FIPS) for the Data Encryption Standard (DES) with a Federal Register notice (pdf). NIST is encouraging federal agencies to use the Advanced Encryption Standard (AES) instead since they feel that DES is 'now vulnerable to key exhaustion using massive parallel computations.' We all knew this day would come as computers got faster & cheaper... and this should put more pressure on folks to use stronger encryption techniques with is a good thing." Some would argue that DES has been insufficient for some time now. -
Vaccinated Against Vices?
Smoke Me A Kipper writes "The Independent is reporting that the latest UK government sponsored quango, charged with looking at the problems of drug abuse, is to recommend a national anti-addiction 'vaccination' scheme. Apparantly, trials are already in progress. No details as to whether it would be mandatory. Personally I find such an idea utterly shocking - what happens when you find yourself injured in later life and morphine based painkillers no longer work? I wouldn't be surprised to find existing phamaceutical companies excited by this, having to replace cheap drugs with something new, which they can patent and control." -
First Clip from Firefly Movie to be Shown at Comic-Con
Snaller writes "It's almost a tradition. At Comic-Con a few years back, Joss Whedon showed a stunned audience the first clip from Serenity, the pilot for his new show Firefly. Although the movie isn't due to open until April 22nd next year, Whedon is ready to show the first clip from from Serenity, the motion picture based on the Firefly series. He'll do it this weekend at Comic-Con, also present will be the cast from the series/movie (all 9 actors), editor Lisa Lassek, special effects guru Loni Peristere and producer Chris Buchanan. It will take place on Sunday July 25th, 1-2pm, Room 20, afterwards there will be a signing session in room 28DE. This was reported on what used to be the official Fox board, by the user 'AffableChap' which has previously been confirmed to be Chris Buchanan." -
OpenBSD Project Releases OpenNTPd
44BSD writes "The folks at OpenBSD have announced OpenNTPd, a BSD-licensed implementation of the NTP protocol. As with OpenSSH, there are two teams responsible for the code, which, like OpenSSH, is available in pure OpenBSD and portable versions." TLA FYI: This Wikipedia entry offers a quick overview of the Network Time Protocol. Read on below for some more on OpenNTPd."As explained at the project home page:
One team does strictly OpenBSD-based development, aiming to produce code that is as clean, simple, and secure as possible. We believe that simplicity without the portability "goop" allows for better code quality control and easier review. The other team then takes the clean version and makes it portable, by adding the portability "goop" so that it will run on many operating systems.
I have been using the OpenBSD variant of this daemon as it exists in the OpenBSD 3.5-current branch of the OS, and it has worked flawlessly with absolutely zero configurational effort. The supplied config file is sufficient to have the daemon synch against a randomly chosen stratum 2 server (pool.ntp.org, served up via round-robin A records). Aside from its simplicity, this daemon offers the ability to be selectively bound to a machine's network interfaces, rather than having to bind to all, as is the case with xntpd. The features provided by this implementation are probably sufficient for the majority of NTP users, and when the promised support for GPS and radio clocks is added, still more will be able to choose OpenNTPd. This additional diversity is welcome, indeed." -
I, Robot Hits the Theaters
tyleremerson writes "With today's film release of "I, Robot," the Singularity Institute for Artificial Intelligence has launched a new website, 3 Laws Unsafe. 3 Laws Unsafe explores the non-fictional problems presented by Isaac Asimov's Three Laws of Robotics. The Three Laws are widely known and are often taken seriously as reasonable solutions for guiding future AI. But are they truly reasonable? 3 Laws Unsafe tries to address this question." Reader Rob Carr has submitted a review of the movie, below, that he promises is spoiler-free.I, Robot: A Movie Review that's 3 Laws (and Spoiler) Safe!
A movie review by Rob Carr
Thanks to Eide's Entertainment I got to see I, Robot tonight. As someone who grew up with Isaac Asimov's robot stories, I've come to expect a mystery based on the implications of the 3 Laws of Robotics (or the lack of one or part of one of those laws), the "Frankenstein Complex," and Dr. Susan Calvin. I was afraid that the movie might miss out on this, especially since it's not a direct adaptation of the book, but "inspired" by the Good Doctor Asimov.
The movie met my expectations and more. Will Smith, whom we all know as an overconfident smart@$$ character from such movies as "Independence Day" and the two "Men in Black" movies, played a somewhat less confident and far less wisecracking character. It was a welcome change to see him less confident. Yeah, some of the stunts were a little absurd (am I the only one thinking of Gemini 8 at one point in the movie?) but that's to be expected from this type of movie. Bridget Moynahan was far too young to be the Susan Calvin I remember, but that's also to be expected in this type of movie. James Cromwell (whom you'll all remember from Star Trek: First Contact and Enterprise's "Broken Bow" episode as Dr. Zefram Cochrane) gave a flat performance - but that's actually a complement. I doubt anyone will recognize Wash from "Firefly" as an important robot in the story.
It's customary to comment on how well the CGI was done. I liked it, but then again, I'm not hypercritical on something like that. I did wonder a little bit about center of balance as some of the robots walked, but mostly I didn't think about it at all, which to me is the goal of CGI. I did wonder about children's fingers getting caught in some of the open gaps on the robot's bodies. Real world models would have a bit more covering, one would think. But that's being picky.
I have no memory of the soundtrack music. That in and of itself might say something. I'm a musician, but it just didn't register.
I figured out some clues, missed some others, and was surprised several times in the movie. There were a lot of clues - this isn't one of those mysteries where the answer is pulled out of the writer's a...out of thin air.
I'm not a complete continuity freak, so I can't tell if the movie violated any of Asimov's universe, but from what I can remember, it fits pretty well (if you ignore Dr. Calvin's age) and might even explain a few things.
Given that even some of the geeks in the audience were surprised to find out that there was a book of stories just like the movie, I think the movie will hopefully bring Asimov's stories to a new generation.
I liked "I, Robot. It's worth seeing, especially if you 've already seen Spider-Man 2 at least once. It's a pretty good (though not great) movie.
Having read Slashdot for a while, I know that there are folks out there who will despise this movie because it's not exactly like the book. Others will hate the movie or worship it, and loads of people are going to savage this review. You know what? That's fine with me. I had fun with this movie, had a nice date with my wife, and it didn't cost anything. I even had fun typing up this review. You're allowed to be different and to agree or disagree with me. Heck, that's a big chunk of what makes the world fun. Interestingly, it's even a small point in the movie. I'd say more, but that would be telling."
-
Hacking the RFID Network
An anonymous reader writes "The world's largest retailers are developing the EPC Network as the infrastructure for a global rollout of item-level RFID. In many ways this 'Internet of Things' resembles the ISBN system or CueCat's codes-to-content. But the network built for tracking consumer goods could also be used for intangible items: airline seats, music tracks or service calls." -
Hacking the RFID Network
An anonymous reader writes "The world's largest retailers are developing the EPC Network as the infrastructure for a global rollout of item-level RFID. In many ways this 'Internet of Things' resembles the ISBN system or CueCat's codes-to-content. But the network built for tracking consumer goods could also be used for intangible items: airline seats, music tracks or service calls." -
Matrix Decision Making
Eli Singer writes "I'm writing to recommend The Power of the 2x2 Matrix , the best book on decision-making I've seen in a long time. The book presents 55 decision matrix models by some of the best minds out there including Stephen Covey ( 7 Habits of Highly Effective People ) and Geoffrey Moore (Crossing the Chasm). Although the book is primarily for business decision-making, the matrices really force you to think about your own personal and professional life." No bones about it, Singer is not a disinterested party: he helped with research that went into it. Read on for the rest of his review, below; there's also a link to a sample chapter of the book. (The Globe and Mail recently reviewed this book as well.) The Power of the 2x2 Matrix author Alex Lowy & Phil Hood pages 320 publisher Jossey-Bass rating 8 reviewer Eli Singer ISBN 0787972924 summary Using 2x2 Thinking to solve business problems and make better decisionsI had the pleasure of working with the authors of this book for over a year as a research assistant. Over that time I came to deeply associate with the 2x2 Matrix approach to problem-solving, and believe it is one of the most novel, fun, and effective ways of understanding business and personal dilemmas.
The idea behind 2x2 Matrix problem solving is to simplify any dilemma you're experiencing to its two core, often competing, facets. For example, The Gartner Magic Quadrant evaluates a company's technology solution based on Completeness of Vision and Ability to Execute. These two aspects are then placed on opposing axis of a grid and given hi/low extremes. This instantly generates four quadrants of distinctly different possible scenarios. In this case:
- Niche Players - Low completeness of vision, low ability to execute
- Visionaries - High completeness of vision, low ability to execute
- Challengers - Low completeness of vision, high ability to execute
- Leaders - High completeness of vision, high ability to execute
The authors, Alex Lowy and Phil Hood, have gone to great lengths to examine outstanding problem solving practices offering both an academic explanation of the theory behind 2x2 modeling, and a profile of 55 of the best decision models out there.
These 55 decision models, presented in short, clear summaries with illustrations and often technology-based case examples (drawn from IBM, Apple, HP, Borland, and the open source world) are the real gold in the book. The models range from highly business-oriented strategy, marketing, and employee-motivation frameworks, to personally oriented frameworks that help structure time, understand personality conflicts, improve leadership skills, and evaluate career transition opportunities.
Chapter 3 is devoted to what the authors call Archetypal Business Dilemmas. The dilemmas presented here speak vividly to the challenges being experienced right now by the open source community:
- Head vs. Heart The toughest choices are between doing what makes sense, and what feels right.
- Content vs. Process Content is the what, Process is the how. Success in most things requires mastery of both qualities.
Also, there are a host of technology gurus who have been interviewed and have matrices presented from their work: Charles Fine, author of Clockspeed; Watts Wacker, author of The Deviant's Advantage ; Hal Varian and Carl Shapiro, authors of Information Rules ; Paul Weifels and Geoffrey Moore, authors of Crossing the Chasm; and Joseph Pine and James Gilmore, authors of The Experience Economy.
It is almost impossible to read this book and not compulsively apply these exceptional models to personal life. At the moment I've been working with Stephen Covey's Urgency and Importance matrix.
For many of us, life is filled with tasks that are Urgent, leaving little time for more fundamental and long-term activities necessary for personal and professional development.The Time Management matrix explores two key dimensions, Importance and Urgency:
Importance. Things that are important are reflective of one's values and contribute to achieving higher-priority goals and personal mission. Importance is about results that matter.
Urgency. Urgent things require immediate attention. They tend to be visible, popular with others, and to act on us.
My cell-phone and inbox both feel highly Urgent, and I often answer my messages immediately, despite the fact that in most situations their Importance is questionable. I'm working at shifting away from a crisis-oriented instant response, which is in turn generating more free time to work on the things that are really important to me but don't necessarily jump in front of my face.
Without actually sitting down and plotting how I used my time during a week on the matrix, I would never have had to directly face the multitude of things I was sacrificing just to keep up with my trivial emails. It's the simplicity and clarity of 2x2 modeling that makes it a great tool for wrestling with dilemmas, and generating deep insights.
Most will find the book an easy and engaging read, especially the framework sections. The downside, if there is one, is the sheer volume of great frameworks. One can only absorb a few at a time and for this reason I'd recommend reading slowly, jumping from the table of contents right to parts that sound the most interesting.
You can purchase The Power of the 2x2 Matrix from bn.com; a sample chapter is available here. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. -
Matrix Decision Making
Eli Singer writes "I'm writing to recommend The Power of the 2x2 Matrix , the best book on decision-making I've seen in a long time. The book presents 55 decision matrix models by some of the best minds out there including Stephen Covey ( 7 Habits of Highly Effective People ) and Geoffrey Moore (Crossing the Chasm). Although the book is primarily for business decision-making, the matrices really force you to think about your own personal and professional life." No bones about it, Singer is not a disinterested party: he helped with research that went into it. Read on for the rest of his review, below; there's also a link to a sample chapter of the book. (The Globe and Mail recently reviewed this book as well.) The Power of the 2x2 Matrix author Alex Lowy & Phil Hood pages 320 publisher Jossey-Bass rating 8 reviewer Eli Singer ISBN 0787972924 summary Using 2x2 Thinking to solve business problems and make better decisionsI had the pleasure of working with the authors of this book for over a year as a research assistant. Over that time I came to deeply associate with the 2x2 Matrix approach to problem-solving, and believe it is one of the most novel, fun, and effective ways of understanding business and personal dilemmas.
The idea behind 2x2 Matrix problem solving is to simplify any dilemma you're experiencing to its two core, often competing, facets. For example, The Gartner Magic Quadrant evaluates a company's technology solution based on Completeness of Vision and Ability to Execute. These two aspects are then placed on opposing axis of a grid and given hi/low extremes. This instantly generates four quadrants of distinctly different possible scenarios. In this case:
- Niche Players - Low completeness of vision, low ability to execute
- Visionaries - High completeness of vision, low ability to execute
- Challengers - Low completeness of vision, high ability to execute
- Leaders - High completeness of vision, high ability to execute
The authors, Alex Lowy and Phil Hood, have gone to great lengths to examine outstanding problem solving practices offering both an academic explanation of the theory behind 2x2 modeling, and a profile of 55 of the best decision models out there.
These 55 decision models, presented in short, clear summaries with illustrations and often technology-based case examples (drawn from IBM, Apple, HP, Borland, and the open source world) are the real gold in the book. The models range from highly business-oriented strategy, marketing, and employee-motivation frameworks, to personally oriented frameworks that help structure time, understand personality conflicts, improve leadership skills, and evaluate career transition opportunities.
Chapter 3 is devoted to what the authors call Archetypal Business Dilemmas. The dilemmas presented here speak vividly to the challenges being experienced right now by the open source community:
- Head vs. Heart The toughest choices are between doing what makes sense, and what feels right.
- Content vs. Process Content is the what, Process is the how. Success in most things requires mastery of both qualities.
Also, there are a host of technology gurus who have been interviewed and have matrices presented from their work: Charles Fine, author of Clockspeed; Watts Wacker, author of The Deviant's Advantage ; Hal Varian and Carl Shapiro, authors of Information Rules ; Paul Weifels and Geoffrey Moore, authors of Crossing the Chasm; and Joseph Pine and James Gilmore, authors of The Experience Economy.
It is almost impossible to read this book and not compulsively apply these exceptional models to personal life. At the moment I've been working with Stephen Covey's Urgency and Importance matrix.
For many of us, life is filled with tasks that are Urgent, leaving little time for more fundamental and long-term activities necessary for personal and professional development.The Time Management matrix explores two key dimensions, Importance and Urgency:
Importance. Things that are important are reflective of one's values and contribute to achieving higher-priority goals and personal mission. Importance is about results that matter.
Urgency. Urgent things require immediate attention. They tend to be visible, popular with others, and to act on us.
My cell-phone and inbox both feel highly Urgent, and I often answer my messages immediately, despite the fact that in most situations their Importance is questionable. I'm working at shifting away from a crisis-oriented instant response, which is in turn generating more free time to work on the things that are really important to me but don't necessarily jump in front of my face.
Without actually sitting down and plotting how I used my time during a week on the matrix, I would never have had to directly face the multitude of things I was sacrificing just to keep up with my trivial emails. It's the simplicity and clarity of 2x2 modeling that makes it a great tool for wrestling with dilemmas, and generating deep insights.
Most will find the book an easy and engaging read, especially the framework sections. The downside, if there is one, is the sheer volume of great frameworks. One can only absorb a few at a time and for this reason I'd recommend reading slowly, jumping from the table of contents right to parts that sound the most interesting.
You can purchase The Power of the 2x2 Matrix from bn.com; a sample chapter is available here. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. -
Shin Megami Tensei Nocturne And Tokyo Culture
Thanks to QuarterToThree for its article discussing the cultural relevance of forthcoming PS2 RPG Shin Megami Tensei: Nocturne, being released later this year in the States by creators Atlus. The author notes: "As some movies and novels are undoubtedly based around the various subcultures which spring up in these popular cities, MegaTen's soul is firmly based in Tokyo and some of the subcultures therein", and continues with regard to the mature plots of the series: "MegaTen games [which include U.S.-released side-story Persona 2], but more specifically the main series in Shin Megami Tensei, are concerned with weighty, thematic, thick, convoluted moral themes. It organizes modern and old religions and mythologies into areas where people insecure in their beliefs might be uncomfortable." In a related article, 1UP has an interview with MegaTen series composer Shoji Meguro, including samples of his work for Shin Megami Tensei: Nocturne. -
Wikipedia Hits 300,000 Articles
Raul654 writes "Today Wikipedia reached the 300,000 article mark. Wikipedia is a 3-year-old non-profit project to build an encyclopedia using WikiWiki software. All text is licensed under the GFDL. It has everything that a traditional encyclopedia would, but also many things that would never get written about, such as Crushing by elephant and the GNU/Linux naming controversy. For size comparisons, the English Wikipedia has 90.1 million words across 300,000 articles, compared to Britannica's 55 million words across 85,000 articles. (All the languages combined together reach 790,000 articles.) For much of the first half of 2004, Wikipedia's growth has outstripped server capacity - however, the shortage of PHP/MySQL developers is probably the biggest long term problem facing the project. Slashdot had previously reported when Wikipedia reached the 200,000 mark." -
Wikipedia Hits 300,000 Articles
Raul654 writes "Today Wikipedia reached the 300,000 article mark. Wikipedia is a 3-year-old non-profit project to build an encyclopedia using WikiWiki software. All text is licensed under the GFDL. It has everything that a traditional encyclopedia would, but also many things that would never get written about, such as Crushing by elephant and the GNU/Linux naming controversy. For size comparisons, the English Wikipedia has 90.1 million words across 300,000 articles, compared to Britannica's 55 million words across 85,000 articles. (All the languages combined together reach 790,000 articles.) For much of the first half of 2004, Wikipedia's growth has outstripped server capacity - however, the shortage of PHP/MySQL developers is probably the biggest long term problem facing the project. Slashdot had previously reported when Wikipedia reached the 200,000 mark."