Last week, I was working on updating some old PHP code from 1999 and 2000. Now this is working code in PHP4 but was not quite up to todays standards. As an example it used the PHP code start tag of <? instead of the much better <?php. Also needed to make certain that all of my variables were declared and that no global or unsanitized variables were used. Overall not a big deal just a good use for grep or sed.
A WinXP laptop is my where I write most of my code and the files are then uploaded to a FreeBSD server. I do not and have never owned a Mac. Usually for this type of action, I would run grep or sed on my FreeBSD server but instead decided to try Windows Grep. I ran Windows Grep with the proper regular expressions and voila, my PHP start tags were updated. Next, the files were uploaded to a new server for testing. ERRORS, errors everywhere.
About half of the updated files were kicking out errors or failing completely. The failed files were rather random and the code looked just fine in the editor. What was going on?
I regularly develop GPL open source plugins, modules, and widgets for Joomla and WordPress. On ocassion, a users has asked if a donation would help support this development. The comment alone is a great compliment and incentive. Cash is always greatly appreciated but in this case, if you find one of my plugins useful please make a donation to one of these great organizations instead.
American Red Cross in Southeastern Wisconsin – Provides relief to victims of disasters and helps people prevent, prepare for, and respond to emergencies in Dodge, Kenosha, Milwaukee, Ozaukee, Racine, Walworth, and Waukesha Counties.
Milwaukee Achiever Literacy Services – Inspires and empowers adult learners to gain the skills necessary to enrich their lives through education and training in an atmosphere of mutual acceptance and respect.
“The singularity is supposed to begin shortly after engineers build the first computer with greater-than-human intelligence. That achievement will trigger a series of cycles in which superintelligent machines beget even smarter machine progeny, going from generation to generation in weeks or days rather than decades or years. The availability of all that cheap, mass-produced brilliance will spark explosive economic growth, an unending, hypersonic, technoindustrial rampage that by comparison will make the Industrial Revolution look like a bingo game.” – http://spectrum.ieee.org/jun08/6311
IEEE Online Spectrum has a special report on the Singularity. This is an idea promoted by science fiction writer and futurists. It does also contain some parts of likelihood. This is a very good series of articles that I recommend reading. http://spectrum.ieee.org/singularity.
Some sad words from me today. Last week a longtime work colleague and friend of mine committed suicide. It was a true shock. This was from someone I had known to usually be upbeat and always helpful and caring.
When you think about suicide, you usually think of some confused and depressed teenager, someone who is facing great turmoil in their personal life, or someone who must face great pain in the near future. I don’t think any of these apply to ‘Friend’. (more…)