Php5 now embraced and extended by Microsoft

Php5 is worth a closer look if you haven’t done so lately. Consider the fact that it is now part of the Microsoft Web Platform Installer 2.0 . Their installer also includes a bunch of LAMP solutions including WordPress which I use for this blog. The php that ultimately gets loaded onto Windows has good odbc integration, gd graphics, improved OOP support, experimental .NET hooks, and is ready for any of a number of php5 MVC frameworks .  I hear it can even be agile.

Php has been ported to Windows for a while, but now it should get a little more exposure. More importantly, this should remove some of that ‘open source’ smell which seems to be so frightening to many IT shops.  Just look at the fact that there is now a php manual with a cover like this:

The slightly nerdy young white guys with nice hair and eyes of steely resolution shows that this is a language that can be trusted and is now an industry standard. The fact that this is a ‘Programmer to Programmer’ book, not just some O’Reilly book means that no manager will be fired simply for picking it as a valid solution.  Perhaps now we can put more stock in php and distinguish it from Ruby, Perl, Python, or (gasp) the functional programming languages like Lisp, Haskell, Scheme or Erlang.
In contrast, we see an image to the left of what we clearly  want to avoid.  Please notice the crusty old programmer hair and the stuffed Penguin in the background. And yes, he appears to be smelling a sword.  This is Richard Stallman , supergenius and one of open source’s pinko godfathers.  Don’t worry about him, he probably doesn’t like php and he can’t hurt you.

OK, well I have had a little fun here, but my point is valid. Too often ‘open source’ is overlooked for the very reasons that I illustrate in an exaggerated way above. Because we don’t have enough time or expertise to examine all possible solutions, we fall back on biases that aren’t totally logical. In this case, the book above with young programmer on the cover makes php perhaps seem safer and IT ready and the unfair picture of Stallman just seem extra wierd.

Robert Cialdini studies and writes about these tendencies of ours. He argues that clever marketing  plays a huge role in our decision-making process. Part of open source’s bad rap is because folks like Stallman revel in snubbing their noses at any marketing, even to the point of having bland and geeky websites. Two of Cialdini’s most powerful observations are:

The “click-whirr” inference process: Vital to our normal processing of the world around us, our caveman brains take short-cuts in our decision making process.  These make great sense when running from a sabre-tooth tiger, but set up ‘compliance professionals’ to subtly mislead us in the information age.

Consistency : Once we have been forced to take a stand, we like to remain consistent with it, even when it no longer makes sense.  Therefore compliance professionals get us to take a stand early on in the game and never look back.

This second force is one that concerns me the most. I have used php as a part of my toolkit in a very subtle way so that we could all benefit from its speed, simplicity, and portability without forcing my managers to draw a line in the sand for or against it, because it seemed like they would consistently choose to be against it.

Maybe now php will start to appear more suitable for business, or maybe this is just another example of Microsoft’s policy of Embrace, Extend, Extinguish . Either way it is a mark of distinction for php.

Howto setup sbcl on linux (redhat)

First install Steel Bank Common Lisp (sbcl) , it comes in a bz2 file and installs into /usr/local/bin. If you are using something like Ubuntu, dig around with synaptic installer, because all of this is already done for you, and it is really pretty seamless once you get past a few gotchas.

Next make a link from sbcl to lisp as root or through sudo:

cd /usr/local/bin
ln -s sbcl lisp

Now download slime and add to your .emacs file. Mine was in my home directory for GNU Emacs 21.3.1:

(add-to-list `load-path "~/slime-2009-04-13")
(require 'slime)
(slime-setup)

That’s it, you are done, ‘^M (alt on my keyboard) slime’ starts it up.

After playing around with it a little bit, you will realize that ‘asdf’ is really cool so down it too . To install it, just load it up and you are done.

Clear Scsi reverse on Hitachi disks

dlmpr – utility for clearing Hitachi SAN HDLM persistent reservation
Description

The persistent reservation of a logical unit (LU) may not be canceled due to some reason when multiple hosts share a volume group rather than making up a cluster configuration using HACMP. In this case, this utility clears the Reservation Key to cancel the persistent reservation.

# /usr/DynamicLinkManager/bin/dlmpr {{-k | -c} [hdiskn] | -h}

where:

-k: specify this parameter to display the Reservation Key. The utility displays an asterisk (*) for a Reservation Key of another host. If the Reservation Key is not set, [0x0000000000000000] is displayed.

-Regist Key: the registered Keys are displayed.

-Key Count: the number of registered Keys is displayed.

-c: specify this parameter to clear the Reservation Key.

hdiskn: specify the physical volume (hdiskn) for which you want to display the Reservation Key. You can specify more than one volume. Note: If you do not specify this parameter, the utility displays the Reservation Keys for all the physical volumes.

-a: when multiple physical volumes (hdiskn) are specified, even if an error occurs during processing, the processing continues for all physical volumes.

-h: displays the format of the utility for clearing HDLM persistent reservation.

Note: [0x????????????????] appears for Reservation Key if the destination storage subsystem does not support the persistent reservation or if a hardware error occurs.

Example to execute the dlmpr utility to display the Reservation Keys for hdisk1, hdisk2, hdisk3, hdisk4, hdisk5, and hdisk6:

# /usr/DynamicLinkManager/bin/dlmpr -k hdisk1 hdisk2 hdisk3 hdisk4 hdisk5 hdisk6

self Reservation Key : [0xaaaaaaaaaaaaaaaa]
hdisk1 Reservation Key : [0xaaaaaaaaaaaaaaaa]
Regist Key : [0xaaaaaaaaaaaaaaaa], Key Count : 1
hdisk2 Reservation Key : [0xbbbbbbbbbbbbbbbb]*
Regist Key : [0xaaaaaaaaaaaaaaaa], Key Count : 2
Regist Key : [0xbbbbbbbbbbbbbbbb], Key Count : 2
hdisk3 Reservation Key : [0xbbbbbbbbbbbbbbbb]*
Regist Key : [0xbbbbbbbbbbbbbbbb], Key Count : 4
hdisk4 Reservation Key : [0xaaaaaaaaaaaaaaaa]
Regist Key : [0xaaaaaaaaaaaaaaaa], Key Count : 4
hdisk5 Reservation Key : [0x0000000000000000]
hdisk6 Reservation Key : [0x0000000000000000]
Regist Key : [0xaaaaaaaaaaaaaaaa], Key Count : 1
Regist Key : [0xbbbbbbbbbbbbbbbb], Key Count : 1

Example to execute the dlmpr utility to clear the Reservation Keys for other hosts (marked by an asterisk (*)):

# /usr/DynamicLinkManager/bin/dlmpr -c hdisk2 hdisk3

Example

dlmpr -k hdisk1; dlmpr -c hdisk2