Tag: Programming

Control Flow Keywords in PHP Loops

Too frequently I see PHP code that treats looping constructs (e.g. for, foreach, while) like runaway trains. Terminal conditions are set before entering the loop, but once the loop is started, it’s all hands off until it finishes. Unless there is an express need to iterate over every value, control flow keywords should be used [...]

View Comments  |  Permalink

Factoring out the Human Condition

Everyone, both programmers and non-programmers alike, can gain a lot from reading Mark-Jason Dominus’ article “Why I Hate Advocacy.” It confronts the human tendency to become emotionally attached to our choices, and in turn view alternative choices in a hostile light. When the choice is about programming languages, it hurts the entire programming community. Programming [...]

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

Embracing Javascript as a Mature Language

When I first encountered Javascript, things were a bit different than they are now. Frameworks like MooTools and jQuery didn’t exist, nor did excellent debugging tools like Firebug. Back then Netscape and IE 5.5 dominated the landscape, and I was still writing in the code tab of Microsoft FrontPage. Perhaps unsurprisingly, my early attempts at [...]

View Comments  |  Permalink