Tag: Web Development

Bending PHP, Control Flow Flexibility With call_user_func()

In comparison to other dynamic languages like Python and Ruby, control flow mechanisms in PHP are rigid. But in the absence of first-class functions and limited OOP paradigms, there’s still some flexibility in the language thanks to built in functions like call_user_func(). While lacking the same syntactic sugar, call_user_func() is the equivalent of variable variables($$v) [...]

View Comments  |  Permalink

Running Multiple Redis Instances on the Same Server

Setting up multiple Redis instances on one server is surprisingly easy. Redis runs as a daemon – a background process that answers requests on demand but is otherwise dormant – and receives requests by over a socket. Running multiple instances is as simple as creating a separate config file and a new init script. The [...]

View Comments  |  Permalink

Thoughts on the Feasibility of Batch Jobs in PHP

I accept that every programming language is an exercise in trade-offs. In order to do certain things well, they inherently have to do some things poorly. The modestly low defaults for memory size and execution time limits in PHP are there for good reason. The language isn’t great at long executing memory intensive jobs. Offloading [...]

View Comments  |  Permalink

Private Variables in Javascript

After spending some time with Node.js and starting to work my way through Douglas Crockford’s Javascript: The Good Parts, I’m getting more excited about the concept of closures. In Javascript, the Good Parts, Douglas Crockford explains in javascript “[a] function has access to the context in which it was created. This is called closure.” This [...]

View Comments  |  Permalink

Python for IO

A while back I started to get serious about Python. Four frustrating days into hacking WordPress’s less than stellar PHP code for work, I took some time out and found solace in Python’s clean syntax. I began to evaluate Python and seriously considered jumping ship to Python for the majority of my web development. Ultimately [...]

View Comments  |  Permalink