Posts Tagged ‘php’

Conversation About PHP

Posted December 28th, 2009 at 20:57 CST in Thoughts | Tags: , | Leave a Comment »

I wrote down this conversation I had with a co-worker the other day. I just found it, and thought I would share it.

me: how do i tell php to be smarter?
co-worker: you have to enable that in your php.ini
me: oh of course
co-worker: but you have to make sure php was compiled with the –smart flag
me: dang

If it’s good enough for Google

Posted April 16th, 2009 at 10:49 CST in Uncategorized | Tags: , , | Leave a Comment »

A few weeks ago, I realized that in order to expand my possibilities in the programming world, I need to master another language—one not built only for the web. PHP is a good language for the specific task of web programming, but its usefulness ends there. I do know that there are projects that aim to expand what PHP is capable of: PHP-GTK, PEAR, PELC. But these can only do so much. I need a language that I can do cross-platform programming of desktop applications, yet be flexible and is already extensively used (so that it’s worth my time to learn it).

After assessing my options, I’ve concluded Python is the language I need to master. On top of fulfilling all my requirements, Google uses it, and if it’s good enough for Google to use for applications that millions of people rely on every day, then it’s good enough for me. Besides that, it makes a great calculator in Windows.

I’ve looked at Python before, and it didn’t look too amazing. But now that I live in a different world and have a new perspective, Python is awesome. Some people frown on the forced indentation, lack of end-line symbols, and non-dollar-sign-prepended variables. After writing a few “hello world” programs, I believe these are not failures but perks. If you are among a team of people writing a massive application, these qualities might keep you on this side of sanity. However, the “batteries-included” philosophy of Python and its hyper-extendability really push it over the top.

Learning about garbage

Posted April 2nd, 2009 at 10:57 CST in Uncategorized | Tags: , | Leave a Comment »

After switching careers to being a full-time programmer, I have started to see and realize aspects of programming that truly amaze me. Before starting this job, I worked on PHP and Java what I though was a considerable amount. I was wrong, I only scratched the surface with what these languages can do and I had no idea of their limits.

The real-life example from this week is memory management in PHP. That’s right, I have a html page generated by—what I (and confirmed by my project leader) think is—efficient PHP code which I had to write in memory management code for. I was confused out of my mind for a while, since PHP has built-in garbage collection. After looking at my code further and analyzing what was going on, I started to understand what garbage collection is and what its limits are. Of course though, just because I understand what is going on doesn’t mean that I actually coding memory management is easy. Calling unset() at the right time is key.