Is PHP 5.3 Terminal? Well, It’s Getting One For Namespaces

A language lives and dies by how easy it is for a person to express something within that language. But the ease in expression is much like the type I and type II error rate in a statistical test: as you adjust one to be nearer to where you want it to be, the other gets farther away. So the architects of a language have to choose between adding more keywords and constructs or having longer, but simpler sequences of existing ones.

PHP is a very easy language to learn and use because it has a syntax that is a simplified sampling from C++/Java and Perl. People who use these languages pick up PHP fast, and people who haven’t used any languages often learn PHP with as much ease as they would learn Perl.

Read More »

Popularity: 8% [?]

Posted in: Articles, Development

The Lazy, Clever Programmer: A Compendium Of Code Reuse & Recycling

I started getting “serious” about development because I had a desire never to write lengthy, wandering streams of code again.  It was not for any reason but unadulterated laziness—the kind that so overpowers the better senses as to force a person to spend hours in a chair with the express goal of not spending hours in said chair.  It’s a wild, consuming laziness that seems to know no bounds.

As developers, once we start separating our code into abstract ontological typologies, we make use of the human mind’s phenomenal ability to work with types.  Our code becomes less about jump tables and registers and more about users, email messages and images.  What once was a problem of allocating resources and operations within the computer becomes an abstract, logical problem within a collection of objects.  Like children awe-struck by stories of magicians of old, speaking incantations and pressing their wishes into reality by the power of their mind alone, we become drunk with the sense of awe and possibility.

We *really* dive into things after the jump, so go ahead and hit it.

Read More »

Popularity: 100% [?]

Posted in: Articles, Development

Handling State in Multiple Windows and Flaky Connections

The Interweb is a wonderful place to host complex web applications as long as you’re tethered to it by Cat5 and an ISP that has your back (Communism works out in this scenario as well). But that’s not the world we live in, and in all other cases using web applications from mobile platforms can be a new circle of Dante’s Inferno below that ice one.

The trouble with web applications on mobile platforms is two fold. First, displaying data for mobile devices is a problem in and of itself, for which I will say nothing more about in this article. Imagine users with laptops and tablet-PCs. The second and more interesting problem revolves around maintaining state and managing client server interactions in an environment where spotty network coverage and ambient radio noise are totally messing with your stuff.

Read More »

Popularity: 5% [?]

Posted in: Design, Development, How To

Zip Codes in Web Apps: A Tutorial on Validating Cities & Calculating Distance

[Editor's Note: This post was authored originally in 2006. Edgar will be writing an update shortly, but some things have definitely changed in that time.]
As a web developer, I’m constantly having to deal with zip codes, with almost terrifyingly frequency. These experiences no longer leave me in cold sweat; instead, I’ve warmed to the concept as it’s nice to be able to validate someone’s zip code based on the city and state they entered. (Or to autopopulate their city and state based on a zip code.) This can be a major headache saver if you’re doing bulk or CASS-certified mailings as the cost increases for each unverified address. Ensuring the accuracy of your data at the data entry point is always a good idea and is a relatively simple endeavor. Follow us after the jump for a look into what can be done about zips.

Read More »

Popularity: 12% [?]

Posted in: Development, How To

Function References and Runtime Functions in PHP 5

Well, it’s the final hour of the final day, so it’s time for my weekly mandatory blog post. I was going to counter-rant a hack-job post and call the author a chump as much as my fingers could muster. But I was told that “Chump!” three hundred times is not a blog post. As I was thinking of other topics to write about I realized two things. First, no one cares that much about Lindsay Lohan anymore. Second, I have a hard time deciding what to do.

But it is this distinct lack of commitment that, while being so destructive to my personal relationships, has brought me into a rarely discussed nether-region of PHP functionally: function references and lambda functions. The sad thing is there isn’t really either in the language – at least not what you’re thinking of if you just read “function references” and “lambda functions” and though, “Oh yeah! Those are awesome!”. No, I’m going to talk about the dark and shameful ways in which we make do without these features in PHP. That feeling you just got? It’s called excitement. Actually, it’s probably indigestion, but get it checked out anyway. All good? Follow us after the jump for a look into the depths of PHP 5.

Read More »

Popularity: 9% [?]

Posted in: Development

Meet Edgar Hassler: Lead Developer & Office Miser

I’m Edgar Hassler, and I resent having to write an about me blog post. I’m miserly, misanthropic, and am to blame for a good deal of development at the Studios. After an unfortunate misunderstanding with Bob’s sister, the guys gave me the nickname “The Bear”. We don’t really know how long I’ve been here, but it’s been more than thirteen Linux is Ready for the Desktop Slashdot cycles, or roughly three earth years. In addition to being a developer I’m also a student in statistics and I am the captain of the Synapse Studios Step Team, “The Steppers”.

If I show up on the blog it will be either liquor fueled angry polemics that will undoubtedly be deleted by Chris once he finds them, or something about ECMA-262-3, or maybe tributes to John Singleton—I read about him a lot in GoF, Alur and Fowler.

I might also write about dive day, where we travel up main street looking for shady restaurants to have lunch in a form of adventure dining that almost never ends up with someone sick or us becoming unwitting accomplices to a “jacking”.

Finally, I’m also a fan of beards, including Doug Crockford’s beard, but especially the maestro—Ben Bernanke—and his beard.

Popularity: 2% [?]

Posted in: People