Well, I've received a response to my feature request at Zend, and a comment to my previous posting. Just to clarify: No, I'm not an idiot, and Yes, I have heard of CVS (though I use SubVersion).


Version control systems are great, they let you work concurrently with friends and co-workers, branch code, revert back to previous states, etc. etc. That being said, they aren't ideal for the use case I suggested, for several reasons:

  • Many groups subscribe to the "don't break the build" mantra, as such people don't often commit code until they know it works. In my example this would be the end case, after the code has been written, then re-factored to be usable and pretty. I want something that's helpful in the intermediate steps.
  • Most people I know do commits once or twice a day, when stuff works. Often for the above reason, as well as others (like not being connected to the network while coding or not wanting 400 commits/day polluting the logs)
  • Not every program handles having two copies of the exact same file open concurrently that well. Let alone providing a good diff.
  • I want something integrated seamlessly with the IDE, so its use will become both trivial and automatic.



For the curious, my feature request to Zend:
Hi, I have two small(?) feature requests for the IDE, there doesn't seem to be another way to submit them...

1) SFTP support that doesn't suck. I'm not sure if it's the java controls that are to blame but doing anything via SFTP is several times slower than it is in any other client (take UltraEdit for example). Performing other SFTP actions like creating directories is painful and doesn't always work.


2) Internal version control. During development code frequently hits a point when it works, but looks horrible. The developer then attempts to refactor the code into something maintainable, without breaking it. It would be great if there was a button "Code works now" or "Save Iteration", then during the refactoring a "Compare" button would bring up a diff of the original (working) code and whatever they have now.



Okay, well the consensus after my last post seems to be that AVG is the way to go in terms of an anti-virus solution that leaves me the heck alone. I uninstalled McAffee and installed the free version of AVG, and am delighted to report that it does not bother me when it finds a virus! There are currently 33 items in its quarantine vault, and it didn't talk to me about any of them! It just informed me that it updated its virus database, but I think that I've convinced it not to bother next time.



Thanks all!


Take a little look at this little code block:

$response = <<< XMLBLOCK<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents"><Timestamp>2005-10-28T01:01:04.668Z</Timestamp><Ack>Success</Ack><Version>429</Version><Build>e429_intl_Bundled_1949355_R1</Build></GeteBayOfficialTimeResponse></soapenv:Body></soapenv:Envelope> XMLBLOCK; $xml = simplexml_load_string($response);

Now, imagine that for some crazy reason, you care what time it is in eBay land, how would you access that Timestamp value? Your first thought is probably something along the lines of:

echo "Time: " . $xml->Envelope->Body->GeteBayOfficialTimeResponse->Timestamp . "\n";

Quaint, nice try, but you're not even close. If you're really paying attention you noticed the namespaces and might try one of these:

echo "Time: " . $xml->{'soapenv:Envelope'}->{'soapenv:Body'}->GeteBayOfficialTimeResponse-> Timestamp . "\n"; echo "Time: " . $xml->children('http://schemas.xmlsoap.org/soap/envelope/')->Body-> GeteBayOfficialTimeResponse->Timestamp . "\n";

Or noticing that the body is also in the namespace, this:

echo "Time: " . $xml->children('http://schemas.xmlsoap.org/soap/envelope/')-> children('http://schemas.xmlsoap.org/soap/envelope/')->GeteBayOfficialTimeResponse-> Timestamp . "\n";

Nope, It's this:

echo "Time: " . $xml->children('http://schemas.xmlsoap.org/soap/envelope/')-> children('urn:ebay:apis:eBLBaseComponents')->GeteBayOfficialTimeResponse->Timestamp . "\n";

In retrospect, it seems to make a lot of sense. However, all the documentation I've read on namespaces in SimpleXML tell you that you need to pass it the URL of the relevant namespace (the aliases are relatively irrelevant). It would be great if the print_r() or var_dump() output gave you some deep indication of how the data should be accessed, but alas, it does not:

SimpleXMLElement Object ( [Body] => SimpleXMLElement Object ( [GeteBayOfficialTimeResponse] => SimpleXMLElement Object ( [Timestamp] => 2005-10-28T01:01:04.668Z [Ack] => Success [Version] => 429 [Build] => e429_intl_Bundled_1949355_R1 ) ) )

I'm done playing World of Warcraft, I barely have enough time to play the game, I definitely don't have enough time in one sitting to play any of the higher level instances.


So, anyone want to buy it off me? It comes with a level 52 Gnomish Engineer, as well as various alts.



Actually, this is a pretty generic IDE feature request.


I want some internal version control, specifically I want a button that says "Code works now". When my code starts working, I click on it. Then I start refactoring the code to try and make it pretty and such. Should things go awry I can click on the "Compare to last working point" button and I get a nice side by side comparison or something.


I was cleaning up my hard drive earlier today and came across this photo nested deeply within old backup files:
DCP_1940


I think that may be one of my favourite photos (that I took) of all time. I had to look at the information associated with the photo to convince myself that I in fact took the picture, rather than it being some stock art thing floating around my hard drive.


If memory serves it was taken in Central Park NYC, south east corner, near the pond.


I'm glad I didn't just blindly delete the folder!


It was ten years ago today that many of us stayed up late into the night wondering whether the sun would again rise on a united Canada. The vote was close enough that the victory left more questions than answers: the sovereignty movement remains an ever present force in Quebec, and likely the issue is still debated in coffee shops and pubs across that province (as anecdotal evidence: my previousblog postings regarding Quebec's special status seem to have a far greater comment life span than any of my other postings).


I believe thinking about why you (may) feel "My Canada includes Quebec" is an important exercise; you need a firm answer in mind for the next Montreal rally. Answers like "because that's the way it's always been" just don't cut it, here or anywhere else. When answering that question we need tangible benefits that Quebec brings to the union, as well as tangible benefits that the union brings to Quebec. The former benefits will be required to enlist other non-Quebecois to fight for the union, the latter to hopefully convince the Quebecois to stay. Anything short of facts supporting the union makes it appear as if we have nothing other than superstition or tradition holding us together.


I think these are the types of issues we should see in the media, probably not in the collage of 15 sound bites that masquerade as the evening news, but during an 'in-depth' piece, or during one of CBC's in house mini-documentaries.


Coverage:

Globe and Mail: Sovereignty push came to hard shove

Reuters: Quebec restless a decade after failed referendum

CTV: Quebec divided on question of separation

I've written a few book reviews (something I want to get back into), and I've often wanted to speak to some of the software I use, this is me succumbing to that desire.


I made the switch from IE to Firefox a long time ago (If you're still using IE two things: shame on you, tabbed browsing is 'da bomb'). When Opera had it's birthday party and gave away free licenses I determined I had nothing to lose and gave it a try.

First Impressions

Whoa, this is fast. This probably sounds weird, but the browser 'feels faster'. Apparently it's not too weird, as some browser speed tests back up this 'feeling': http://www.howtocreate.co.uk/browserSpeed.html


Tabbed browsing works like I think it should, the way tabs close makes more sense than the Firefox method I guess, but it's going to take some getting used to.

Second Impressions

What the hell is this wand thing? The password manager tool "the wand" takes some getting used to. Unlike other browsers it doesn't auto-populate login fields, you have to click on the wand near the address bar, weird but it works. You also get a bit more granularity when it comes to remembering passwords than I'm used to, but ultimately a good thing.


Opera also seems to be really good at remembering what tabs I have open, and opening them again next time I start the browser. I installed a Firefox plugin to do this back in the day, but: it never quite worked right, it made starting Firefox take A LONG TIME if I had a bunch of tabs open, and it crashed.


I'm used to using "Alt-D" to move focus to the address bar, getting that to work in Opera took some work.


Opera also zooms rather than changing text size. In most browsers when you hold control and roll your mouse wheel the size of the text on the page changes (and if you're like me, the first time it happens you have no idea what happened, and have to call a friend to help you fix it) which is good, the text is bigger, but is also bad because chances are they used images for layout and now everything looks broken. Opera scales the whole page at once, so everything keeps working! As a side bonus, you can zoom in on pictures without transferring them to an image editing package.

Pros

  • Fast
    • Start up
    • Pageload
  • Tabbed browsing
    • Memory between sessions
  • Integrated pop-up blocker (vs IE)
  • Smaller user base (less attractive for attackers)
  • Nifty zoom feature

Cons
  • Different keyboard shortcuts
  • Tabbed browsing behavior is different than other browsers
  • Smaller user base (harder to obtain support)
  • Not Open Source (some people think it's a big deal)



    All in all Opera gets my seal of approval.


  • I've been putting some thought into Google Print since I first heard of it, being an author it's been a noticeable amount of thought. Helping people find books is a Good Thing, and on a larger scale, propagating information is a good thing. Public domain titles will become easy to access in their entirety, probably forever (hmm, does that mean that I won't have to go buy expensive copies of really old books next time I take philosophy?), and that’s a lot of free reading material for everyone. On the other hand I have a few problems:

    • For all the books still under copyright Google just scored a free copy, what steps are they taking to ensure it is protected? What will they do to recompense the author if their systems are compromised and people take a free copy of the book?
    • If an author/publisher doesn't want a book included in the library they have to tell Google: It's their responsibility to tell Google they don't want their book added. It's not too big a burden, you have to jump through a bunch of hoops to set up an account, prove that the books are yours, and tell Google not to index them. If you're a major multinational publisher this isn't too big a deal, if you're a small publisher you might not know that Google Print even exists. They did nothing, but Google just increased their workload.
    • Opting out is pretty easy now, you only have to opt-out once, but what happens when the similar EU initiate takes hold? What happens if Yahoo! wants to do the same thing? How many times are people going to need to opt out?
    • Only publishers can make decisions on what gets included, not authors. This seems kind of odd. As I understand my contract I retain copyright to my work, and grant the publisher an exclusive license for as long as they feel like stamping my words on dead trees. Some reasonable amount of time after that however, their rights expire and it's mine again. In that case shouldn't I get to tell Google what I want to happen with my book?



    All that being said Eric Shmidt is a good enough writer to allay my concerns. That and I'm writing for a major-multinational publisher that has people with expensive degrees to decide what's best for my book.


    I'm still running with the Apache 1.x series, the calls to upgrade have been comming in a little stronger, but I want to finish my book first.


    If you're trying to get mod_ssl & apache built, you're probably having problems, I find the way it works is to take all of the options you built Apache with (before mod_ssl) and add them to your mod_ssl configure command.


    So, rather than


    $ cd /usr/src/apache_1.3.33/

    $ /configure

    --prefix=/etc/httpd/

    --enable-module=so

    --enable-module=ssl=/usr/include/openssl/

    --enable-module=auth_db

    $ make

    $ make install



    You do something like this:


    $ cd /usr/src/mod_ssl

    $ ./configure

    --with-apache=/usr/src/apache_1.3.34/

    --with-ssl=/usr/src/openssl-0.9.7f/

    --with-crt=/root/certificates/secure_preinheimer_com.crt

    --with-key=/root/certificates/myserver.key
    --prefix=/etc/httpd/

    --enable-module=so

    --enable-module=ssl=/usr/include/openssl/

    --enable-module=auth_db


    $ cd /usr/src/apache_1.3.33/

    $ make

    $ make install



    The mod_ssl configure process does the apache configuration for you, you don't do it yourself... I think.


    I re-compiled PHP with the following to make the DEAPI warning go away:


    $ ./configure

    --with-mysql=/usr/local/mysql

    --with-apxs=/etc/httpd/bin/apxs

    --with-gd

    --with-png

    --with-zlib-dir=/root/zlib-1.2.2

    --enable-gd-native-ttf

    --with-ttf

    --with-jpeg-dir=/usr/local/lib/jpeg-6b/

    --with-freetype-dir=/usr/local/lib/freetype-2.1.9/

    --with-xpm-dir=/usr/X11R6/

    --with-tidy

    --with-curl

    --with-openssl=/usr/local/

    --enable-dba=shared

    --with-db4
    --disable-eapi



    I've also started using script to record anything I end up building, hopefully lessening the confusion when I need to do it again in a couple months.



    Next: SenderID & mod_security


    I saw this yesterday at Zellers:
    photo016.jpg

    Upon further inspection, they had a total of four boxes of Y2K software on their meager shelves, this one, and three boxes of McAfee's offering.


    If you enjoy machinima you should take a gander at the return, it starts off a little slow, but it gets good. Some decent story in there. Red vs Blue is what originally got me into this genre, this is the first video I've seen using World of Warcraft as a medium.


    Download Now: The Return


    I hosted it here because registration based download sites suck, I got the file from here


    Hey all,


    I need a good anti-virus solution, McAffee pisses me off to no end, here's a short list of my complaints:

    1. It insists on letting me know each and every time it finds a virus, including in incoming email. This isn't news, it's to be expected.
    2. Once I've dismissed that notification, it pops up and asks me if I want to scan my entire computer for viruses now
    3. This process repeats, constantly, when downloading my eDonkey email (which I do sporadically)
    4. It insists on letting me know when it updates itself, what does it want? A pat on the back? I have to click on "Continue what I was doing" to make it go away, and if memory serves the little box steals focus.


    Seriously, I cant figgure out how to make it stop.


    I used to use Norton, can't remember why I switched (when it expired), it was probably a cost base decision.


    Requirements short list:

    • Granular controls, I want to let it know exactly when it may (never) and may not (always) bother me
    • Automatic, transparent, silent updates
    • Allows me to set default actions when it detects viruses (so it doesn't have to bother me)
    • It works



    Cost is an issue, I've got a valid student ID, and two WinXP computers.

    I'm not asking much, but I can't afford to buy 6 A/V solutions to give them all a whirl.


    I'm not sure who came up with the idea of releasing temporary book cover image showing just me, but I'm only partially amused. There are THREE authors of the PHP Security book, Ben Ramsey and Christian Wenz are (combined) doing more writing than I. Yet, their pictures aren't yet available so they aren't shown. Personally, I would have preferred they ran with the "No Image Available" text untill they got the final cover.


    Well I managed to resolve the differences I was having with the iTunes XML format, rather than using SimpleXML I am parsing the file manually. In a somewhat surprising development this is actually slower than letting SimpleXML load the file and create an object to represent the contents. This left me quite baffled until a friend pointed out that SimpleXML would have been written in C, and was optimized for exactly this sort of thing.


    Presently I'm using fopen() & fgets() to do the work. Ilia pointed out in his talk at PHP|Works that this was far slower than using file_get_contents() if what you want is the whole file. The thing is, I don't want the whole file in a string (and I most certainly don't want to load the whole file into memory, some of the ones I've been playing with are in excess of 10MB). I'm going to need to play around a bunch more in an attempt to determine the fastest way to go about this.


    Anyways, here is a graph similar to the one I posted earlier, except I'm now parsing the XML properly. To create the graph I look at the number of times (in a range) the user has listened to songs in their library, as a percentage of their overall library. For example, most people have listened to over 90% of their library fewer than 10 times. I'm using percentages rather than absolute numbers so comparisons between people of differently sized libraries are meaningful.



    Hi, I’m Paul Reinheimer, a developer working on the web.

    I co-founded WonderProxy which provides access to over 200 proxies around the world to enable testing of geoip sensitive applications. We've since expanded to offer more granular tooling through Where's it Up

    My hobbies are cycling, photography, travel, and engaging Allison Moore in intelligent discourse. I frequently write about PHP and other related technologies.

    Search