pascal.vree's blog

Performance and Queries, MySQL Optimization to the Rescue!

As always we write code and as soon as the dust settles in, our code seems to fade away into nothingness and you forget about it right until the moment the code decides to slap you in the face by grinding your server to an halt. After a quick inspection, the server load tells it's story. You'll find a few processes eating away most IO, Mem and Proc resources.

The remote (mysql) database accessed locally

Recently I've left a very nice web Development company, located near my home town. I love the company even though they're using ASP.net and all those closed source Microsoft tools I so sincerely like! Don't get me wrong, most off my live I've been working with open source ... but development always has come easily with the tools Microsoft provides.

It's a breeze to work with VCS, DBMS and integrate them with their well written tools.

What makes a developer great?

The internet is filled with flamewars, trolls and stories on how to become great. Most linkedin users, forum abusers and casual readers have seen questions such as

  • how to become a great developer
  • how to get famous
  • starting a million dollar company
  • how to become a skilled influencer
  • ...

Why should code be self-explanatory?

About a year ago, during my trip to Paris and Barcelona, I read Refactoring; improving the design of existing code. As it happens I like the way Martin Fowler writes his books and explains his ideas. I won't always agree with the guy but he has some pretty nifty insights.

I've been know to write code that ain't readable, don't we all love one liners that do all the heavy lifting and never fail? Well I do, coding in this way means almost always writing indecipherable code.

Five things I dislike about Drupal

I've been using Drupal for a while now and as a developer there are a few things I really dislike in the 6.x distributions.

Commandline Magic with Linux, count and summarize all file extensions within the Directory Tree

With Powershell, it's easy to program your Windows Commandline. The Powershell gives incredible power to those Windows powerusers that know how to manipulate it well. A few weeks ago, I wrote a minor scriplet that returns me the current ip-address in use. A rather hard thing to do, when you only have a mouse and the dialog box left.

Running SimpleTests' TestCases within Bash

Unit Testing is the way to roll nowadays, so after a few years of lacking behind on the unit testing part I decided to catch up and use it properly with Drupal. It's fairly easy to install the basics, just download the stable simpletest module. Extract the archive and copy it to your favorite directory. (in my case it's sites/default/modules/contrib)

Debug PHP Code with Facade Design Pattern

Some days ago, a co-worker asked for a hand. His IIS started to crash down around him. Even though he hadn't changed anything important.

So in short, he didn't know why IIS was crashing and couldn't find the source. Again I wondered, why didn't we set IIS up so we can debug a PHP process running on it. (http://www.tellingmachine.com/post/Setting-up-XDebug-with-Eclipse-and-II...)

Right now we seem to be in no mans land and we're only armed with a windows machine, no debugging options except for the old fashioned "debug by die and print".

How to configure "ckeditor" and "html filter" with Drupal (6.x)

As some may allready have found out, www.hardcoded.nl is built up with Drupal 6.x.

Drupal provides some excellent support for WYSIWYG editing. They for instance provide the famous ckeditor, a nice feature which almost works perfectly when deployed. So the out-of-box-usage experience is above expectation ... (at least when compared with spending hours configuring the tiny mce editor and ckeditor when outside Drupal and used within custom websites)

PHP 5.3 array_map, heaven or hell?

Most PHP Developers out there, like me, love the foreach language construct ... It makes iteration through an array so easy. Especially when you come forth from a language where you always had to determine the array's length and keep an index-counter up to date with each array-element you iterate through.

Syndicate content