Archive for the "PHP" Category

Reading CHM manuals on Mac OS X

Tuesday, November 24th, 2009

ChmoxUsing Mac OS X as my primary development platform is great since I can emulate my LAMP production environment a lot closely than I ever could developing on Windows.  One thing I missed for a while is being able to load the CHM (Compiled Help format used on Windows) manuals for PHP and MySQL quickly and easily (especially for those great disconnected development sessions while traveling when looking at the online documentation is not an option).

However, today I finally went searching and discovered several CHM viewers for Mac OS X.

Chmox does a pretty decent job, but the search function wasn’t working for me.

Another option is xCHM with a Mac OS X version available on VersionTracker.  It has the Search functionality and looks pretty much like the Windows CHM Viewer, but is slower and for some really bizarre reason, xCHM only lets you load a single CHM file at a time.

iCHM is a an all-around good app, and has a pretty nice tabbed viewing feature, but didn’t seem to be compabile with PHP’s CHM manual (the searching didn’t work) – worked fine with the MySQL CHM manual though.

Finally, there’s ArCHMock which is fast, has a decent search function, and seems to be the winner at least for my needs.

Now I have my CHM files happily sitting on the desktop.  The trip home for Thanksgiving will now be productive, unless the train is so packed that I don’t have room to take out my laptop. :-/

Time Value of Money – Excel PMT in JavaScript and PHP

Tuesday, May 12th, 2009

PMTI’m currently working on a project that happens to need a JavaScript and a PHP implementation of the Excel PMT function.  I won’t bore you with the details (but ask if you’re intrigued), but it has to do with Loan Modifications that are all the rage nowadays thanks to Obama Administration initiatives that will hopefully help Americans save their mortgages, prevent foreclosures, support real estate prices and generally speaking save the world from sure doom.

So after being handed an Excel spreadsheet that made heavy use of the PMT Excel function (and never having used said function), I proceeded to research this beast.  Let me tell you, there are lots of very confused people searching for solutions on how to implement it in various languages, trying to figure out how the function works, etc, etc, etc. I even came across some folks that think Excel / Microsoft is behind a sinister plot to undermine the world’s economy via a wrong implementation of the function.  Rest assured, I think Microsoft understands the Time Value of Money – TMV for those who still remember anything from their Finance class in college.  So I figured I’d do a little writeup of what I figured out to save somebody else the headache.


Google Charts API

Saturday, April 25th, 2009

I’ve been looking at the Google Chart API recently, its an interesting service, and as far as I can tell, Google really gets nothing at all out of it.  I guess the good-will associated with this kind of service is priceless.  There’s even a PHP object wrapper for the Google Chart API. I guess its too much to ask to get embeddable charts like the ones they use for Google Analytics and Google Finance.

Here’s an example with one of the former slogans for the phdUS Perspectives blog – “Good, Cheap, Fast – pick any two”:

Maybe I’ll use this API to generate some charts for the Facebook Compulsion Inventory quiz results.

Privacy and Anonymity vs. Authenticated Presence

Thursday, April 23rd, 2009

1565920988_lrgMartin Zwilling (@startuppro) wrote about opportunities to tackle Internet privacy and I posed a question to him – “how do you authenticate an online something with an offline entity?”  The reason being that I’ve been thinking about privacy on the Internet as well, but from a slightly different perspective.  I’m not so concerned with things like the seemingly infinite lifetime of something said/posted to websites, or identity theft, or the resale of customer information that lots of shady companies and websites are engaged with.  Well, I am personally concerned about my own information of course, but not in the sense of the business problem.  I’m more interested in authenticating actions, statements, uploads and everything else an “offline entity” could do online.  By “offline entity” of course I mean everything from a teenager who’s friends post as him or her when they forget to lock their computer and ruin their reputation – to a public figure or celebrity being impersonated – to a corporate entity like CNN purchasing @CNNbrk (which some people thought was run by CNN in the first place).

Several things have prompted this line of thought for me.  First, a friend of mine asked me how to mitigate negative press about a design brand he runs.  He was asking if it was possible to get things off the first page of a google search about this brand.  Of course, thats not something that can be solved, but an authenticated coherent statement from this brand regarding bad publicity might actually help mitigate the situation.  There’s been several incidents of this type, for instance the Domino’s video prank incident and its effect on the value of the brand for instance.

Second, for a recent project I’ve been thinking about how to authenticate somebody that comes to complete and manage an online listing for an offline company.  In this scenario, listings are created for companies, the initial information is populated from an existing public records database.  These companies have a vested interest in expanding their listing and participating on the website.  However, how do you invite them to participate – who do you email or send a postcard to, and once they come to the site, how can you be sure that somebody appropriate at the company got that postcard and that its not a mail clerk from their building that’s signing up to destroy their reputation on this listing site?

I guess what I’m getting at is this – how do you know that something done by me online is really done by me?  Do we take PGP signing to the next level and set up a company that can authenticate a signed post online based on the assumption that only the real me has my private PGP key?  Do we set up a company that allows mailing of secret information to physical addresses that then authenticate an invitation to a website via this shared secret “token”?  I’m sure there’s opportunities to start a company that would do something interesting in this space.  Perhaps even tackling the problem Martin is talking about in the process – what if we could submit our private data to websites in an encrypted packet that can only be decrypted by entities that we give permission to?  Something that tracks how many times something’s been decrypted and used for instance, perhaps an intermediary or an escrow sort of service for information?

Any ideas? Its hard to resist signing this blog post with my PGP key, but perhaps a Wordpress plugin to authenticate posts that way isn’t that hard to make and maybe that’s a small step I’ll take in this direction sometime soon.

VIM for PHP Programmers

Wednesday, February 11th, 2009


I came across a pretty good presentation by Andrei Zmievski from Yahoo! Inc.  Its a 77 page walk-through of VIM for PHP Programmers – quite comprehensive!  It covers essentials like setting marks and jumping to them quickly – which was a personal pet peeve of mine.  Little did I know vim had that covered – even global marks across files :) !  Of course vim is a bottomless bucket if you’re going to pour sweat into learning it, Andrei admits it quite succinctly on slide 18 for instance – “vim regexp language is too sophisticated to be covered here.” ;)