?

Log in

No account? Create an account
Ramblings Journals I Read Calendar The Dirt MegaZone's Waste of Time Older Older Newer Newer
You! Obey the fist! - MegaZone's Safety Valve
The Ramblings of a Damaged Mind
zonereyrie
zonereyrie
You! Obey the fist!
Most of today was so-so. I haven't been sleeping well and it really hit me hard this morning. I came in about an hour late because I just couldn't find it in me to give a shit when my alarms went off this morning, I was that tired. But I eventually achieved higher brain functions and realized it would be a Bad Thing to just blow off the day. Still, I was dragging through most of the day, and little things were coming up here and there to distract me. After lunch I bonked completely, I wanted to nap and nothing else.

But napping wasn't an option, so I managed to slog back into the PHP. And in my sleep deprived state I managed to hit a kind of groove and actually cranked out some work. And now all of the basic tests are working, both the PayCash and Kiosk contexts return the expected results in all the standard cases. I'm, once again, highly pleased with myself for nailing things readily. Again most of the issues that did come up were syntax changes that got overlooked in the guts of the code. (Perl - textContent(), PHP - get_content(), etc) Mostly it was a matter of running the scripts, looking at the error message, finding the offending line, fixing it, searching in emacs for any other occurrences, saving, running the scripts, lather, rinse, repeat.

Actually it is a little more than that. See, I'm developing these scripts on a Linux box. But the cryptography object for UNIX/Linux is still not ready for PHP, my boss is working on that in C++. There is one, but it is Perl XS. So I'm testing the scripts on WinXP with the COM object version of the cryptography library. So I could've developed on WinXP - except my Linux desktop has dual heads, it is a lot more ergonomic to work on than the laptop, and I have it setup for my development like I want it already. I put emacs on XP, but I can't cut/paste between emacs windows, or emacs and any other window, which is frustrating. (I haven't had time to do more than a cursory search for a solution.) Rather than spend a lot of time tweaking the XP box, I decided to run things split. I have SecureFX on the XP box (the SFTP companion to SecureCRT - my favorite windows SSH client). So I'd modify the files on Linux, suck them down with SFTP, test, then do the modifications in Linux again, repeat. :-) I also considered setting up Samba and just mounting the drive to have direct access to the files, but it has been a few years since I've setup Samba, and never with XP. Since I was under a lot of time pressure to get this done I decided to just go with what I knew would work immediately rather than spend time relearning Samba when the time needed was indeterminate. Maybe when I get some slack time I'll do it anyway.

So once my boss is done with the cryptography port, I'll be making the tweaks to the scripts to run natively on Linux. I have to say that I rather like PHP. I haven't really done that much serious work with it in the past, but as a Perl hacker (and having some old C/C++ experience) I found it very familiar territory. I really didn't have any major difficulty in the porting, mostly a matter of learning the language syntax and limitations. It looks like PHP5 will be a nice jump up too, with one of the main limitations I hit in PHP4 resolved and the native XML support much improved.

Some of the Perl folks I know have turned up their noses at PHP in the past, but for developing web applications I think it looks like a nice system. And if you know Perl at all well, picking up PHP isn't that difficult.

I am: accomplished accomplished
Current Media: quiet office

2 STDOUT || STDIN
Comments
blarglefiend From: blarglefiend Date: September 11th, 2003 12:56 am (UTC) (Direct Link)
I reacted to PHP in much the same way as you, though I was playing with web+database things. Bare PHP is pretty good at that -- there's less faffing about than DBI -- but it has some really annoyingly stupid things like a separate set of functions for each database backend.

I *think* there's supposed to be an extension that papers over that, but I haven't been working with PHP for a while so haven't looked.
elisteran From: elisteran Date: September 14th, 2003 11:59 pm (UTC) (Direct Link)
Well, I'm one of those who turns up their noses at PHP. In a lot of ways, it just felt like a clunkier version of perl, and leaving out a lot of the things that makes perl so great. (Using a php library felt clunky, variable scoping was annoying, you don't have access to the symbol table, there are all sorts of web app options that manifest themselves in the language...I can see its use as a special purpose language, but I'd much rather not be mucking around with it myself).

Still, it is pretty straightforward to use, particularly if you make sure to check the user comments on their online documentation. It really points out a few gotchas in their interfaces.
2 STDOUT || STDIN