isn't quite ashamed enough to present

jr conlin's ink stained banana

2004-07-19

:: Beating A Dead Cow

Clint Eastwood and John Wayne were good guys, in so much as guys who were willing to draw a pistol and kill someone else in either defense or vengeance could be considered a good guy. Granted, it's somewhat understandable because having a Wild West full of pacifists would probably not make for a great many very compelling movies, but would probably do wonders for the fertility of various graveyards in Arizona.

i note this because i tend to follow SEO tricks pretty carefully even though i've no intention of using them for my own evil purposes. In some respects, i tend to think of myself as a gun for hire to help peaceful townsfolk stay that way, even if it means occasionally making the town a bit unpeaceful.

Extending this metaphor well beyond the breaking point, the town i'm currently in recently got a new mayor. He came in, surveyed things and foretold of great prosperity that would soon be ours. His plan? Do what the bad guys are doing, worse. In effect, we're going to go find us a bunch of cattle rustlers and steal their herd.

Oh sure, those cattle rustlers are sure getting a lot of attention recently because of all the clever traps they put up to steal random cows from all over, but let's face it, those cows are not exactly destined for anything that doesn't involve a great many whirling knives, sizzling and a sesame seed bun. Although it's a great way to get a lot of money up front, it's not really a good way to keep a herd.

Mind you, this also goes pretty much counter to the way that the state and the country i happen to be in also like to do business. (Wow! This metaphor is getting a hell of a work-out!) i like how the state and country think. They're focusing on actually keeping cows happy and alive and using them for more than just ground round. What's more, it's working because they're getting more and more cows.

Recently the mayor asked me to see if there's anyway i can shoot more cows. You know, use a higher caliber round or thermite or something. Heck, if they're going to become burger anyway, how's about stringing bouncing Betties around the watering hole! i objected saying that while the rustlers may use tricks like that and they're working, the cows will pretty much figure out that showing up around our place leads to there being less cows, so the best thing to do would be hop on a plane and go to some other country. (Airfare being really cheap for cows who are already pretty used to being treated like cattle.)

Needless to say, i'm not horribly happy about this. And i really don't want to leave the country, so to speak.

So, i'm really starting to think about looking around for some other town that could use a hired gun to do something other than shoot cows with an anti-tank gun. Granted, i don't think that the town would really care if i left, which is also fine. Last thing i'd want is for anyone to have a cow.

Probably because they'd go and shoot it too.

  1. Josh
    2004-07-19 18:04:26
    Gotta love when people make short sighted mis-steaks, even as smarter people try hard to steer them away from it.
  2. 2004-07-20 09:43:15
    I ... almost ... follow what's going on there, but it took some effort. You're thinking of opening a hamburger stand, right?
  3. 2004-07-20 09:53:24
    Ah the joy of being both highly disgruntled with my current team, realizing that there are some of them who may read this, and not wanting to openly discuss some things in a public forum. Mmmm Tasty metaphorical hamburgers (best served with hypothetical fries and a nice cool theoretical shake)!
  4. 2004-07-20 12:46:57
    Cows want to be free!
  5. 2004-07-20 19:05:41
    Eat mor chikin!
  6. 2004-07-20 20:07:50
    Luck, either way!
  7. 2004-07-21 08:44:00
    They took are job's! (Sorry, that particular SP season 8 quote is quickly becoming endemic)
Wanna join in?

:: PHP And The Brain

Thanks to Dave, i read an article over on kuro5hin.org (which, apparently, still does post interesting articles from time to time) discussing PHP5. It's not in depth, and it really helps if you understand PHP to begin with, but it does present a rather interesting case.

PHP5 isn't about making PHP more effective, it's about making it take over the world.

The author does a pretty good job of describing the various object oriented improvements made in PHP and then immediately stating the fact that a great deal of effort was put into something that's going to be built up and torn down for EVERY SINGLE PAGE REQUEST. (This is something that i have a hard time trying to get folks to understand. Although PHP is a delightful little scripting engine, it does mean that you no longer should think in terms of optimizing for memory so much as optimizing for processing speed.)

The author then brings up a point that i feel like an absolute moron for missing PHP-TNG:EB* added the improved Object Oriented functions so that it can be a proper stand alone language. This makes sense in a weird, semi-twisted, slightly bizarro world view in that machines are getting faster, memory cheaper, virtual machines better balanced, interpreters more optimized, and traditional programming languages more obtuse. And while i don't think that C/C++ are quite yet the assembly language of the new generation, i'll agree that they may soon become that.

Thing is, i don't see the appeal of having Yet Another Scripting Language out there. We've already got Perl and Python, both of which do stellar jobs of being hacker-friendly languages, both also on the cusp of major new releases that promise equally magnificent (if also obtuse) feature sets. Now, along comes PHP bargaining for it's place in the pantheon of the scripting languages.

i can absolutely understand the argument of "Use the same scripting language for web pages as well as the back end", and it's pretty darn appealing, until you really think about it from a design point of view.

Building and displaying pages requires callable libraries of functions. Because PHP is fundamentally a scripting language, that means that each script needs to be read into memory, compiled, stored into an object form (since you're using a compiling optimizer like APC, right?) and then invoked. Sure the optimizer saves some compile time for files that have not been modified, but there are still lots of system calls for stat checks and loads that you're not going to get around. You can further reduce that load by taking functions and throwing them into libraries. The problem there is making sure that the libraries contain the least number of functions you really need since anything else is wasted memory and processing. What this counter-intuitively means is that sometimes it's more efficient to put the exact same function into multiple libraries rather than have it located in a single file. Yes, that makes things a bit of a nightmare if you were to try and manage your code with that same function existing in potentially an unlimited number of libraries, but you could easily create a library optimizer function that organizes libraries based on call distribution.

Ok, sing along with me kids: Templates are data. Functions are data too. Optimize your functions like data for rendering processes and no puppies have to die.

Ok, now you see why i don't get invited to any more campfire sing-alongs.

Let me put this in a slightly different manner. Let's say you have a very large website that contains hundreds of thousands of pages. You've got several choices here, one is be very page friendly and fill your disk with every permutation of every page you've got. Another is to create dynamic pages that have simple templates load data from some data repository system.

In effect, what you have is a Model/View/Controller with Scripting Language X being the View/Controller. The Model could (and probably is) something completely different. View and Controller can often overlap since the Controller tends to do things like marshall elements for the view as well as manage connectivity. In an ideal world, View would be separate from Controller allowing for any form of display, but it's really hard to get folks to do that level of thinking.

In the same way that you probably wouldn't use rendering calls in your Model classes, why should you require the same language for that? Why not use a different language that has tools better suited for that task? It's not like this is 1985 and there aren't hundreds of well documented, standard APIs available.

PHP4 (warts and all) is pretty darn well suited for displaying data on pages. So it doesn't have exceptions and has weird mechanisms for modifying passed data structures. Who cares? Look, it's all going away in a few milliseconds when the pages render anyway. If you need/want/desire that sort of persistent long form control over your content there are lots of other alternatives.

i dunno, i could really get on a soapbox here (What? You thought i already was on one? Oh, foolish you.) and maybe i'm just being an old fart for thinking in terms of using a hammer to drive nails and a screwdriver for the screws, but then i'm just funny that way. i guess i'll just never see the appeal of the Porsche SUV.

    What do you think, sirs?

    Blogs of note
    personal that's my blog
    (The Official Blog of the Internet)
    memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org Henriette's Herbal Blog lynne ydw i slumbering lungfish
    geek Y!Cool Thing jeremy z
    (The Official Website of the Internet)
    dave's picks ultramookie Josh Woodward derek balling simon willison
    news ars technica search engine watch

    Powered by WordPress
    Hosted on Dreamhost.