2718.us blog » Programming http://2718.us/blog Miscellaneous Technological Geekery Tue, 18 May 2010 02:42:55 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 Behold: The Power of Lisp http://2718.us/blog/2008/04/21/behold-the-power-of-lisp/ http://2718.us/blog/2008/04/21/behold-the-power-of-lisp/#comments Mon, 21 Apr 2008 14:37:50 +0000 2718.us http://2718.us/blog/?p=25 Lisp

]]>
http://2718.us/blog/2008/04/21/behold-the-power-of-lisp/feed/ 0
Real Programmers… http://2718.us/blog/2008/04/14/real-programmers/ http://2718.us/blog/2008/04/14/real-programmers/#comments Mon, 14 Apr 2008 09:01:38 +0000 2718.us http://2718.us/blog/?p=17

]]>
http://2718.us/blog/2008/04/14/real-programmers/feed/ 0
php5 is fun http://2718.us/blog/2008/04/08/php5-is-fun/ http://2718.us/blog/2008/04/08/php5-is-fun/#comments Tue, 08 Apr 2008 23:15:21 +0000 2718.us http://2718.us/blog/?p=9 A few weeks ago, I upgraded my primary server to some version of php5 (from php4).  It’s been some time since I moved from php3 to php4 (even though I still have some files with a .php3 extension), but I don’t remember it being a huge change.  I upgraded because there was some small feature I wanted…  actually two small features I wanted that weren’t in php4.  One of them was all the curl_multi_ stuff (which parallelized the retrieval of the various LJ clone stats.txt files, making the cache update for that site a much much shorter process).  I don’t, offhand, remember what the other one was, I just know I ran into it again in the past few days and it was some other function that didn’t exist until php5.

Now, what I didn’t know when I did the upgrade was that php5 defaults to having register_globals off.  This is a very good thing.  I’ve been working hard for the past year to make sure any code I was working on didn’t rely on register_globals.  What I didn’t do however, was make sure that any code that was already in use on my server didn’t need register_globals.  This led to a weekend of digging through server error logs to find the scripts that needed to be fixed (if they could easily be fixed) or patch specific chunks of code wholesale by forcing register_globals on in .htaccess.

Lately, though, I’ve been playing with objects/classes.  I like the changes in the object/class stuff in php5 (even though I’m very oldskool and OOP still feels very strange to me, I keep trying to make OOP stuff work).  Komodo Edit, however, doesn’t seem to like it when I use php5 things like protected and private functions and variables.  I suspect this is because my macs have php4 somewhere and Komodo Edit is using the actual php executable to run syntax checks.  I haven’t yet found an easy way to deal with this, since I don’t want to just install php5 over the php4 that’s part of the base OS X install.

]]>
http://2718.us/blog/2008/04/08/php5-is-fun/feed/ 0
Unfortunately, PHP and js are interpreted… http://2718.us/blog/2008/04/06/unfortunately-php-and-js-are-interpreted/ http://2718.us/blog/2008/04/06/unfortunately-php-and-js-are-interpreted/#comments Mon, 07 Apr 2008 03:35:37 +0000 2718.us http://2718.us/blog/?p=6 comic

]]>
http://2718.us/blog/2008/04/06/unfortunately-php-and-js-are-interpreted/feed/ 0
js, jQuery, and AJAX http://2718.us/blog/2008/04/06/js-jquery-and-ajax/ http://2718.us/blog/2008/04/06/js-jquery-and-ajax/#comments Sun, 06 Apr 2008 23:07:29 +0000 2718.us http://2718.us/blog/?p=4 Through the tail end of last week and into this weekend, I’ve been learning some (more) javascript, learning to use the jQuery library/framework, and learning to make AJAX work.  I’ve discovered just how much of a royal pain it is to trap keyboard events in a way that works across platforms (mac-pc, mostly, is what I care about), though I did get pretty much all of the keyboard stuff I wanted working (arrow keys, ctrl+arrow keys, enter key).  I also learned how to make the page communicate back to a PHP backend via AJAX in a sensible way (buffering data to be sent back so as to prevent thrashing the server).

This is all in stark contrast to my previous experience with script.aculo.us, wherein I was able to make some really nifty shiny stuff work really well without having to learn too much, but it was still all traditional client-server and nothing properly AJAX and all the workings of the javascript were so specific to script.aculo.us that I didn’t really learn any js.  jQuery seems much more straight-forward, even though it also seems to provide only a much lower level of functionality, though I did start to fiddle with animations with jQuery.

Hopefully, some jQuery and AJAX will find their way into some of my production stuff in the next few weeks.

]]>
http://2718.us/blog/2008/04/06/js-jquery-and-ajax/feed/ 0