Thursday, December 6, 2012

Java 7 and Mac OS X

After getting my new Mac Mini pretty well set up with my development tools, I started playing with Amazon AWS. When trying to connect to one of my instances using their built in tool, Firefox bailed and I was presented with a prompt asking me if I wanted to install Java:

To open “Firefox,” you need a Java SE 6 runtime. Would you like to install one now?

Now this message looked very official, and I’d seen it before when starting up something on a new Mac that required Java, but since I’d already installed the latest JDK I was thoroughly confused. I thought, “OK, maybe you didn’t install Java after all”

So I popped open a terminal and

mini:~ robweaver$ java -version
java version “1.7.0_09″
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode.

OK, so that’s not it – so I changed browsers and tried the browser check at http://javatester.org again, only to get the same results …

Ouch – so I dug around a bit, and couldn’t find anything about how to fix it. And in fact the little bit I did find only confirmed that the browser plugin was active and the right version.

So finally I decided to punt and just let it install – Clicking the button to to let it start ran a package that looked like it was installing something, and when it was done another trip to javatester.org showed that somehow the plugin had been fixed and was now giving me the right version of Java in all my browsers.

Java Version tester

The only thing I can guess is that there was something that had to be set up on first use, but it did give me a start when being asked to install Java SE 6. Fortunately, whatever it did, it didn’t muck with my JVM and I’ll just have to hope that it didn’t break anything elsewhere.

 

Wednesday, December 5, 2012

Adding Missing PHP library on Mac OS X Mountain Lion (10.8)

I’m doing some work on a project that is using PHP, and have been working on setting up some continuous integration build scripts to make sure that we have a shot at catching errors before they make their way to production.

Recently some unit tests were added for the “forgot password” code, which uses the mcrypt libraries which are not installed by default on Mac OSX, so I was seeing this error:

Call to undefined function mcrypt_get_iv_size()

So some quick Google searches, and I found a couple of blogs with “how to” install the library (links at the end of this post), and proceeded to get this done.

First step was to download the mcrypt from SourceForge at http://sourceforge.net/project/showfiles.php?group_id=87941

Once I had the file, I opened a command prompt and ran:

tar xvfz libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/

Next I ran configure, setting the appropriate flags for my envirionment (note – I didn’t do this for the other configures, probably would have been a good idea):

MACOSX_DEPLOYMENT_TARGET=10.8 CFLAGS=’-O3 -fno-common -arch i386 -arch x86_64′ LDFLAGS=’-O3 -arch i386 -arch x86_64′ CXXFLAGS=’-O3 -fno-common -arch i386 -arch x86_64′ ./configure –disable-dependency-tracking

This sets up the make file, so you can run the next two commands:

make -j6

sudo make install

Next to make the PHP library, I needed the PHP source files, so I went out and grabbed PHP 5.3.15 (since that’s the version I have when I run php -version) by going to http://us3.php.net/get/php-5.3.15.tar.bz2/from/a/mirror. Note that you can simply change the version number in that URL to get the version you need.

Once I had that I did the following:

tar xvfz php-5.3.15.tar.bz2
cd php-5.3.15/ext/mcrypt
/usr/bin/phpize

This of course gave me an error about autoconf not being installed:

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

From there I installed autoconf by doing the following:

curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar xvfz autoconf-latest.tar.gz
cd autoconf-2.69/
./configure
make
sudo make install

Then back to the php mcrypt folder and reran the phpize step to and finish building:

/usr/bin/phpize
./configure
make
sudo make install

Finally an edit to the php.ini file which was simply to add the extension:

extension=”/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so”

And of course a quick restart of Apache and the extension shows up and I can run my unit tests successfully.

Related posts:

http://www.coolestguyplanettech.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/

http://michaelgracie.com/2011/07/21/plugging-mcrypt-into-php-on-mac-os-x-lion-10-7/

Wednesday, November 28, 2012

Installing Doxygen on Mac OS X

Just a quick note – I was guided toward doxygen, which is a tool that does source code documentation. It has a DMG installer, that includes an executable to run doxygen with a wizard.

But since my purpose was to run doxygen in an Ant build script, I needed to install the command line version.

I simply looked inside the application, and was able to see that the executable was in /Applications/Doxygen.app/Contents/Resources/

Adding a symbolic link to /usr/local/bin (which is in my PATH) did the trick:

sudo ln -s /Applications/Doxygen.app/Contents/Resources/doxygen /usr/local/bin

Sunday, November 11, 2012

Governance Change (A Fable)

Once upon a time, there was a kingdom of people who were busy managing projects named Pee-Em-Eye Ess-Eff-BeeA Sea. They were busy doing this work, and they found themselves wondering if there was a better way than just telling people what to do, and then scurrying off to the next project.

A small group of people in the kingdom thought that there was a better way to manage the kingdom of Pee-Em-Eye Ess-Eff-BeeA Sea. They believed they could apply some of their project management skills to help all the people in the kingdom to be more successful and happy.

So they started holding meetings with as many people as they could and asked people to become members of the community. They elected a president, and a board. Since each board member was interested in helping out in different areas, each one chose a different title (like CFO and VP of Professional Development, etc.). Since they all knew that they were trying to make life better for Pee-Em-Eye, they worked very well in these roles, and their work flourished.

At some point, they realized that they should probably apply some democratic best practices, so they wrote some bylaws that included both how things were working now, and things intended to sustain the kingdom (like how long a board member could serve, and how they would be elected, etc.)

The kingdom and the board flourished, and new boards were elected from the other volunteers in the organization. The organization grew, and life was good.

After a long while, a curious thing happened. Partly because none of the original council were still around, and partly because the world had changed, they were having trouble keeping momentum from year to year. And, in fact it was becoming harder to find people who could lead the work needing to be done while still thinking of the long term good of the kingdom. And the council was so busy with keeping things running that they were losing touch with their members. The members in turn were losing confidence in the kingdom, becoming less involved and in fact starting to wonder why they were even members at all.

Fortunately for the kingdom, around this time one of the members of the kingdom met Paulie C. Governance. Paulie, it seems, had a solution to the issues of the day: transparency, accountability and community involvement. There was a system, he told them that would focus them on the real goals of the organization (Paulie called this the “global ends statement”). Paulie also told them that the goals would align better with the needs of the members (Paulie called them “owners”), and would open communications between the citizens and the board. (Paulie called this increase in transparency and communication “ownership linkage”), and that system was called Policy Governance®.

After some interesting “Who’s on First?” conversation during which the board learned that the system wasn’t “Paulie C. Governance” and in fact hadn’t been named for Paulie, but rather was  an integrated set of concepts and principles that describes the job of any governing board. This system was similar to the PMBOK in that it was a system based on theory gained by study and synthesis of a number of other concepts including servant leadership.

So Paulie’s idea was to change the way the board operated. They would be responsible for guiding the kingdom, and responsible to the member/owners and accountable to them. All they had to do was to delegate the responsibility for the day to day work to someone who was accountable to the board, who in turn would be accountable to the member/owners.

So the council worked with Paulie to interpret the goals of the member/owners that they would need in order to focus on delivering the true needs of the member/owners (Paulie called these the “ends”). Once they had done that, they worked with the member/owners and with Paulie’s guidance decided upon the boundaries that were acceptable in accomplishing those ends (Paulie called these “limitations”).

They chose a new CEO to lead the day to day work of the organization guided by both the ends and limitations.

Paulie next told them:

In order for this system to work, the CEO needs the freedom to choose the means by which they accomplish the ends. So you need to judge their performance not by personal bias or unwritten ideas, but by the standard that they have used any reasonable interpretation in those means.

Any reasonable interpretation means just that. It doesn’t mean the interpretation of the most prominent board member, the interpretation the board had in mind but didn’t say, or even the interpretation now favored by the entire board. The council is obligated not only to be fair in this judgment, but to protect the CEO from individual board members who wish to judge based on their interpretation of the board’s policy.

Once the board adopted Policy Governance®, the moral of the story became clear. The board was able to clearly summarize the goals of the kingdom as:

PMI-SFBAC members, people who live and work in Northern California, and virtual beneficiaries experience a continually improving standard of living, stability, a sense of community, self-esteem and self- actualization. These Ends will be achieved in a sustainable manner that represents value for the resources invested.

Because there was now this clear vision, CEO no longer focused on random ideas of each board member, but was able to make intelligent decisions and ensure that all the work the volunteers were doing was driving toward that vision. And because the vision was clearer, what was being asked of the volunteers was clearer, and they were happier. And the board no longer had to spend long hours thinking about which programs to cut or how much to spend on each one, since the policies allowed the CEO to do this.

The CEO was able to mobilize more volunteers and more easily help guide them. There was the freedom to innovate, and clear boundaries to avoid misstep, and a confidence building since it was clear that there was no need to satisfy individual board members’ pet projects, but instead be responsible to using means that satisfied the “any reasonable interpretation” test for the entire board.

And the framework also helped the board in their job. Their calendar was now completely driven by monitoring the policies, and linking back to the membership. A schedule for monitoring the policies was included in the policies, so they knew exactly when they would be looking at which issue, and when to expect evidence of compliance from the CEO and when they would monitor their own compliance with the policies.

Because this system called Policy Goverance® helped them be clearer on what they needed to do, things that they had long thought impossible were happening: Board meetings were more organized and regular, they could spend more time working with the membership to improve the policies, the organization was able to be more innovative and focused.

So the journey began, and I’d like to say they “lived happily ever after”, but then came the trial of Paulie C. Governance … But that’s a story for another day ….

The End

Wednesday, October 31, 2012

Who is Policy Governance®

The court room quieted as Paulie C. Governance took the stand. He was sworn in on a stack of PMBOK‘s and the prosecutor was ready to begin.

The following was taken from the transcript and witness accounts:

Prosecutor: Please state your name and occupation for the court

Paulie: Paulie C. Governance, trusted advisor to the board.

Prosecutor: And you are a proposing a change to the way the board operates are you not ?

Paulie: Yes, Policy Governance®.

Prosecutor: Thank you, we have your name, I was asking you about the change you are proposing.

Paulie: Yes, that is Policy Governance® .. with a capital P and a capital G.

Prosecutor: Yes, yes, and a capital C. I was asking what, not who.

Paulie: No capital C, bu there is a registered trademark, like the PMP®

Prosecutor: You don’t capitalize the C?  That IS unusual. Why would Paulie C. Governance have a registered trademark?

Paulie: Well Policy Governance® is the child of John and Mirriam Carver, and they wanted the protection of the registered trademark.

Prosecutor: Your parents gave you a registered trademark ? I think we’re way off topic here. Please tell us: what is the name of the the system you are proposing.

Paulie: Policy Governance®

Prosecutor: So the system has your name ? Are you expecting to run the board yourself.

Paulie: No, the board will use an integrated set of concepts and principles that describes the job of any governing board.

Prosecutor: Now we’re getting somewhere: what is that system called ?

Paulie: Policy Governance@

Prosecutor (clearly frustrated): Now let me get this straight: your name is Paulie C. Governance, right?

Paulie: Yes

Prosecutor: And Mirriam Carver gave birth to Paulie C. Governance ?

Paulie: No, she only added to the theory, it was John Carver’s idea.

Prosecutor (grinning): It usually is the man’s idea. Let’s try something else: you are proposing the board use an integrated set of concepts and principles that describes the job of any governing board.

Paulie: Yes

Prosecutor: and that system is called Paulie C. Governance, but it’s not named after you?

Paulie: Yes

Prosecutor: then what is your name?

Paulie (now frustrated): Paulie C. Governance is my name, and the system is Policy Governance® which is an integrated set of concepts and principles that describes the job of any governing board.

At this point, the prosecutor tried to strangle Paulie, so court had to adjourn until a new prosecutor could be found …

Monday, October 1, 2012

Using Firebug and jQuerify to Filter a Page

I love Firebug, and I’m getting so I understand jQuery pretty well.

I often drop into the console and type in jQuery commands to figure out how to get things to happen on a page. For example, I was looking at a really long page of search results from Taleo that lists out all of my submissions for jobs at CACI. The problem is, that it shows the fully active submissions with the inactive ones, so it’s not very useful for figuring out what I need to follow up on.

So it occurred to me that if I could just write a couple lines of jQuery to look for the items that include “Active” in them, I could reduce this list in a way that would be meaningful for me.

So the first thing I did was go look at the page HTML to figure out whether there was something on the page I could use to separate out each row on the search page.

 

 

 

I fired up Firebug by right clicking on one of the items and choosing “Inspect in Firebug”.

 

 

 

 

 

 

 

 

 

 

This starts up Firebug (if it isn’t already showing) and took me to the part of the HTML that I was looking for:

 

 

 

 

 

 

So now I knew I needed to look for something that had a class of “iconcontentpanel” that contained the text “Active”.  I decided to outline it with a green dashed line, so my jQuery looked like:

$(".iconcontentpanel:contains('Active')").css('border','3px dotted green');

So I flipped over to the Console in Firebug and tried running that:

 

 

 

 

 

But that gave me an error since there is no jQuery on the original page. But there’s this nifty little thing in the console that says “jQuerify”, and clicking that injects jQuery into the page:

 

 

 

 

 

 

So now that jQuery is available, running the script again gives me what I was looking for:

 

 

 

 

 

 

 

And of course I can add even more jQuery to strip out unwanted parts of the page, change format, etc, leaving me something that is more  actionable:

Sunday, August 19, 2012

Unemployed (Forced to) Become Bank of America Customers

I’ve worked hard (as many others have) to eliminate credit cards, stay away from large fee charging banks, and generally protect my money, so when I recently learned that the EDD is paying people with debit cards, I got a bit angry (see: http://www.sfbg.com/2011/09/13/banking-misfortune?page=0,1.)

Debit Card

Now I think the idea of giving people an option other than a check or direct deposit is commendable, and I hope that the EDD at least did this to save some money (although I can’t imagine how this could possibly be more cost effective than an EFT, since somebody has to pay all those bank fees that B of A loves to charge). And maybe I’m just being old fashioned, like a generation ago when the move from cash to paychecks first happened, or again when direct deposit became the norm.

But I don’t think this is really the same, because when a check (or a direct deposit happened), you weren’t an involuntary customer of Bank of America. You were a customer of whatever bank you wanted to be. And if you weren’t a Bank of America customer, they couldn’t count you on their customer roles.

Overnight, B of A has a huge influx of people they can market to. They have an additional revenue stream as well, since these are debit cards, so if you use them at a merchant, that merchant has to pay fees to get their money.

Will the next step be elimination of paychecks ? Maybe the IRS would like that: your money would pass through B of A, they could directly pull taxes from there since it is the Bank of America ….

This just feels plain wrong to me.

Wednesday, July 25, 2012

Mourning Loss of our Public School Programs

I was struck by the power of unintended consequences while watching a show about the science of dyslexia.

What hit me the most was a segment of the show where they were talking to a successful business man who had struggled with dyslexia his entire life and found a place he could succeed in the high school shop. His business was started by buying up the equipment from that same shop as the high school did as most schools have done: cut “non-essential” programs.

What struck me was that because the schools have chosen to cut the broadening curriculum like art, music and shop, there are kids today who will potentially never know success. And even worse, the kids who do well in the remaining classes, will never see that those kids who struggle with the college prep classes have abilities in different areas.

From my high-school experience, I distinctly remember that there were kids who just didn’t do well in the standard classes, but luckily for us we had art, music, home ec and shop. Because of those classes, I got to see some of those kids do amazing things that I simply didn’t have the skill to.

I saw incredible cabinetry built by a kid who literally couldn’t read (today he’d probably have been diagnosed with dyslexia and learned to read).

I recall other kids who built beautiful hot rods from piles of junk, amazing metal contraptions, and people who were able to shine in all sorts of ways that aren’t readily available to kids today.

So as an unintended consequence of “saving money”, we’ve cost our society the chance to expand the social interconnection that happens with recognition.

Those kids may not get the chance to sing in front of the rest of the school and gain the respect that they deserve. That quiet kid in the back of the room might just be perceived as angry and sullen, instead of having the respect as the guy who can do something amazing with a piece of wood.

We weaken our community by not supporting the search for that potential. Those kids frustrated by subjects they have no talent in, who won’t as easily find the joy in something they can do well, and won’t be as likely to go on to be pillars of our community.

Monday, April 9, 2012

How to Map a SharePoint Drive on Windows 7

For ease of use, it helps to be able to treat a SharePoint document library as a file folder on your laptop, and from a team productivity perspective, it’s very valuable to have these documents stored there instead of on your local hard disk:

  1. SharePoint provides versioning and check-in/check-out capability
  2. It’s accessible from other locations than your machine
  3. Your fellow team members can see your work in progress if they need to.
  4. SharePoint is backed up, so you won’t lose anything if your PC gets run over or dies.

To start this process, the simplest thing to do is to browse to the document library (in this case the BLASS shared documents);

Because this is a SharePoint 2010 site, there is an option to open the library in Windows Explorer on the “Library” tab:

Clicking on the “Open with Explorer” button will launch Explorer on your machine. You may be prompted for your user name and password before this happens, but once you’ve logged in, you’ll see the folder:

From here you can do all the normal things that you’d expect with a local drive or mapped network drive. To make this sticky so that you don’t have to go through browsing the site every time you want to do this, you can map the drive to your computer.

Step 1: Clicking into the address bar will show you the actual URL for the library (hit ctrl-C or right click and choose copy to save it to the clipboard):

Step 2: Click on your computer icon in the Navigation pane, which will add the “Map Network Drive” to the menu:

Step 3: either click the “Map network drive” or right click and choose it from the menu:

Step 4: Click the hyperlink to connect to a web drive:


Step 5: Click next to start the wizard:

Step 6: Use “choose a custom network location” and click Next:

Step 7: Enter or paste the URL from the document library you found above and click Next:

Step 8: Give it a name you’ll recognize (defaults to the server name) and click Next

Step 9: You will be prompted with the following screen that means your web folder has been mapped:

From then on, you should be able to find it in the navigation pane of Explorer:
.

Friday, March 30, 2012

Stupid Project Tricks #2010

I’ve been working with Office and Project for a while now, and one of the things I love about the new 2010 version is that you can save as PDf from almost any application.

So today I was saving a Project plan as a PDF, and noticed it was breaking across pages in weird ways. Since I’ve done something similar with Visio a LOT, I figured the control for page size would be in the page setup, but I couldn’t find any mention of page setup in the menus or ribbon bar …

So hunting a bit, I figured that it might be on the print preview, which I found on the “File” tab:

And that’s when I got stymied for a bit: the controls for page setup were all greyed out:

Finally it occurred to me that maybe I needed to have Print Preview working, and off to the right was a button that said “Print Preview”:

Clicking that activated all the controls, and I could see a preview of the printout, and even get to the handy dandy Page Setup (as well as the other page settings):

For this particular one, all I wanted to do was change the page size to be bigger (so I chose the 11×17 in landscape), and limit the dates to this contract year.

 

But clicking the “Page Setup” also lets you do things like scale the printout to fit the page, set margins, etc:

 

Once you have everything the way you want it on this page (IOW the image of the printout on the right looks good), you can click “Save As” and choose PDF as the format you want to save:

 

 

The newly saved document will be scaled and limited to what you chose on the File/Print/Print Preview settings !