By writing tests for the PHP language, you will improve PHP as a language. The more parts of PHP that are covered by tests, the less bugs will appear and the more bugs can be found. And yes, it actually occasionally happens that a bug is found while writing a test for part of PHP that is not yet covered by tests.
2. Improve your own knowledge
By writing tests for PHP, you improve your knowledge of the details of PHP. Actually, last year at TestFest we wrote tests or the reflection API. That was something I’d heard of before TestFest, but never looked at. After having written tests for Reflection, I had a very clear and detailed knowledge of what was possible with it. And I think this goes for most attendees of last year’s TestFest in The Netherlands. But even if you test very common code, you’ll be bound to find out about something you didn’t know before.
3. To expand your network
Attendees of PHP TestFest are usually developers who take PHP serious. Who are very serious and committed to the language and work with it on a very regular basis, either professionally, as a hobby, or both. So attending TestFest will allow you to meet such people. Such people can be good to have in your network in case you run into problems and need some help, or you’re looking for developers, or looking for a job. This is very useful if you’re a developer of a similar level, but really, also if you’re just starting out with PHP, attending a PHP TestFest will help you get to know people who already have experience in the field and may be able to help you at some point or other.
4. Because you’re friggin cool!
Of course you are friggin cool! And cool people come to TestFest! OK, so this may be the least effective reason for coming, but really, I and with me quite a few others think the people that come to PHP TestFest to be amazingly cool! So have a look where a TestFest is being organized near you in the coming period and attend!
The article has a close relation with my Power of Refactoring talk as it has been given a few times already, and as it will be given again in a few weeks time over at php|tek.
In the Netherlands, this year’s TestFest instance is in Utrecht at the Hogeschool Domstad. We have the pleasure of having Pierre Joye over to the Netherlands to mentor the TestFest (thanks to Microsoft for supporting us in this). Pierre will, together with all attendees, go through the steps of how to write tests and then we’ll go and actually write tests for PHP. Last year, the combined Dutch/Belgian TestFest instance was one of the most successful instances worldwide, so of course we will seek to continue the success this year! So if you’re from the Netherlands, feel free to come by on may 9th! Please do register though (see info here).
However, if you’re not from the Netherlands, feel free to check the PHP wiki for a TestFest in your neighbourhood. One more TestFest I want to highlight is the one I will be involved in over in Chicago during PHP|Tek. With the help of Matthew Turland and his friends and the Chicago PHP Usergroup, we’ll be doing a PHP TestFest during the PHP Hackathon which is part of the PHP|Tek Unconference. A great opportunity to contribute to PHP while at a conference! We’re working on the details, so more info will follow later.
Most important, no matter where you attend, is that you contribute to the stability of the language we all love, as well as have fun in the process! So head on over to one of the TestFests!
In the blogpost I write about making the choice between using standard open source software and components on the one hand, and building your own on the other hand. It is a description of how we do things at Ibuildings and will hopefully help others in making this tough decision at the start of any project.
The actual reason I’m posting this now is their Warp20 website, where people can vote for their favorite Warp Records tracks. I voted and thought I’d clarify my choices here (and who knows, get some people interested in some music they hadn’t heard before). So here it is, 10 tracks released on Warp Records that I think are the best they’ve done. There is no order, they are all good on their own.
Aphex Twin – On
On is one of the lesser known tracks by Aphex Twin, and is as far as I know only released as single (and remix single) and not on any of his albums. When I first saw On, on MTV’s Party Zone (with legendary (at least to me) hostess Simone Angel) I was completely blown away. I was mainly into house and techno at that time, and the whole concept of On with it’s strange beats and beautiful ambient melodics was new to me. The accompanying music video was also awesome, and so my love for Aphex Twin, Warp Records and IDM was born.
Boards of Canada – Aquarius
I discovered Boards of Canada by accident. I was a reviewer at GarageBand.com (this is years and years ago) and as reimbursement for writing reviews, you got HMV vouchers. One of the vouchers I got I spent on Boards of Canada’s In A Beautiful Place Out In The Country, because I heard someone mention Boards of Canada, it was released on Warp, and it just fitted the voucher value. I was completely blown away and immediately bought just about anything I could get of Boards of Canada. Aside from IABPOITC, Music Has The Right To Children is their absolute masterpiece. To me, this represents what IDM was about back then. And the absolute number one of Boards of Canada was Aquarius. Beautiful, with strange yet catchy “lyrics”. Mindblowing!
Jimi Tenor – Take Me Baby
Now this is something completely different. Especially if you know Jimi’s album Organism, this track is so surprisingly different. A pretty banging beat, slightly harsh bassline and kind of explicit lyrics… well, kind of ;). It drew on my old love for house music, yet gave it a twist. Awesome.
Coco Steel & Lovebomb – Feel It
I first heard this one in a DJ mix on the legendary dutch radioshow For Those Who Like To Groove. Feel It goes back to my old love: House music. It has everything a house track should have: a deep bassline, great rhythm, some twisted vocal samples. Beautiful and moving.
Gescom – Keynell [Mix 1]
Now this track represents to me a different kind of IDM. Less laidback, more rhythm-driven but definitely not less melodic. The “twist” is also different, but with a relation to Autechre, that isn’t strange.
The Sabres of Paradise – Towtruck (Chemical Brothers Remix)
This track represents the combination of two legendary musical acts to me. I have long been a huge fan of The Chemical Brothers, and The Sabres of Paradise is also an unmistakeable legend in electronic music. Having Tom and Ed remix Tow Truck is an awesome combination of the two!
Autechre – Drane
Autechre is one of the famous acts signed to Warp Records and probably also one of the most productive, not just under this name but also with various side projects. They have a shitload of great music, but most of it is best when heard in context (within the album). On their first Peel Sessions EP (they did two) were three tracks that, though great in context, were also awesome on their own. Drane is by far my favorite. It has a very weird time signature, beautiful sounds and it just fits. It just works together, all of it.
F.U.S.E. – Substance Abuse
Richie Hawtin (also Plastikman) is a hero. He is one of the living legends in techno music. He is a master with usually only Roland drum machines and the legendary Roland TB-303. Substance Abuse is one of the most famous and legendary of his tracks (for me personally, together with Plastikman’s Spastik).
LFO – LFO (Leeds Warehouse Mix)
Little can be said about this track. LFO is not just another house track, it is LFO. It is old warehouse rave parties. It is synonymous with oldschool house. It is the best track for others. To me, it is LFO. It is the definition of early 90’s rave. It is one of a kind.
Plaid – Eyen
I saw Plaid live once on a festival in Utrecht and was completely blown away. That show reassured my earlier love for Plaid and renewed and strengthened it. Eyen is dreamy yet not necessarily laidback. It is beautiful, melodic and slightly hypnotic without being too repetetive. And it represents well the style that Plaid does best. It could be the soundtrack to a movie, telling a story.
So that’s 10. There’s much much more that is good from Warp but these 10 represent to me what Warp is about. If you’re familiar with Warp, most of the above will be familiar to you. If you’re new to Warp, go and check it out. They have many different styles of music and they’re all awesome. And they’re 20 years old. Congratulations Warp!
First of all, let’s look at the hack. At this point I am unsure what exactly caused so many of my files to contain the odmarco string. It looks like quite some people on DreamHost got hit by this problem, so I am guessing a vulnerable script on one of their servers caused this. Now, I should blame myself as well, because apparently I didn’t take notice to a lot of files in my websites being writable by the server. It’s no excuse, but a lot of the sites that I have are very old sites, where I definitely didn’t pay as much attention to such details as I do now.
Anyway, from a comment on siteadvisor I learned that the script called in the iframe is trying to abuse an exploit in Adobe Acrobat. Though I hate all stuff like this, I hate exploits more than mere referrer spam injection, so I felt I needed to take care of this quickly, even if a lot of the sites are hardly maintained anymore. So I sat down to hack up a little PHP script that would remove the offending string. Why PHP? Simple, it’s the only language I know good enough to hack something like this up in a short time.
After some hacking around I came up with this script. It’s not perfect, but it does the job and it does it well, so I’m happy. Anyone interested, feel free to use this script to clear up the mess in your site. It’s meant to be run from the command line, inside the directory that you want to (recursively) clean. What I did was put it in the homedir on DreamHost, and then go into a directory that needed cleaning and issue the command:
/usr/local/php5/bin/php ../clear_odmarco.php
As you notice, at DreamHost you need to explicitly specify the php5 path because for some reason, the “php” command still defaults to php4. Then I put in a relative path to the clear_odmarco.php file (you could put the full path if you want).
First of all, next week is the pfCongrez , where amongst others I am looking forward to seeing Anne van Kesteren and Derick Rethans speak about their respective topics.
But most importantly, this june Amsterdam will again for a short while be the center of the PHP universe with the Dutch PHP Conference. This year will be special for me, as it will be the first year I’m not actually speaking at the conference. But since my employers Ibuildings are organizing, I might well be active in one way or another at the conference to keep myself occupied.
Between those tasks, however, I am looking forward to attending the sessions. Choosing will be very very difficult this year, with most slots filled with two or even more sessions I’d like to attend. I am specifically looking forward to attending Michelangelo van Dam’s talk on SPL, Matthew Weier O’Phinney’s talk on contributing and community, Eli White’s talk on Scalability, and Ben Ramsey’s talk on HTTP. At this point, I am undecided on which tutorial I would like to attend.
Of all conferences worldwide, the DPC is the conference I’ve been to most so far, and it’s also the one I’ve enjoyed most so far. The people there are always nice and laidback, the schedule is well-balanced and the location is very nice.
For those interested, I just want to mention that the early bird registration is still open the whole month of april, so if you want to go, now is the time to register to save some money for beer. I surely hope to see you there!
But before I do that, I want to talk about something else. Lukas made a great blogpost about those that want to “sex up” the geek world, and I wholeheartedly agree with that. Why the hell have those sexy booth babes at conferences. Unfortunately though, it’s not just the fault of those who own the booth, because too many (male) geeks still fall for it and actually give those booths lots of attention. So not just for booth owners but also for geeks: Try to contain your primal urges and give those booths just as much attention as any other. 😉
Another thing I mentioned in a comment at Lukas’ blog that I want to give some attention is the unnecessary fuzz about the usage of a little cleavage in slides of a presentation at a conference. There was some fuzz about this after my myphpbusters talk at the PHP UK Conference because my slides contained a picture of Kari in a sexy pose holding a fire extinguisher. Though I don’t think a presentation should contain sexy pictures just because they’re sexy pictures, I feel the way I used it was clearly in a funny way, and in no way even hinted at being serious about wanting cleavage in my presentation. Funny enough, it wasn’t even my idea to put it in, it was my wife’s. But also, the picture as I used it fitted completely in the context: Kari was used because it was a mythbusters-themed presentation, and I used this specific picture because it had Kari with a fire extinguisher, which I wanted because the previous slide contained a video of an exploding server. So it was never meant as offensive, just as funny.
Having said that, let me now write a little about two women I feel are important to the PHP world.
Lorna Mitchell
It won’t come as a big surprise to many of you probably that I’m writing about Lorna. Lorna is a colleague of mine over at Ibuildings. Even though Lorna works for the UK branch of Ibuildings, we are in touch on a regular basis. Hell, we will even be doing a presentation together at php|tek. I think Lorna is a great example of a succesful women in technology. She’s doing great work within Ibuildings, but also outside of Ibuildings, being a contributor to the PHPNW usergroup, being involved in several communities including the global PHP community and PHPWomen, even being one of the most important public faces for the latter. I think Lorna is one of the prime examples of how a women can be succesful in technology. On a more personal level, Lorna is also a friend and someone whom I (even though I’m male 😉 ) can always bother with a question, be it technical or non-technical. It is scary sometimes to see how often we respond to eachother with an “I agree”, both on IRC and in private chats.
Kana Yeh
Kana is another woman in technology. However, this is a woman in technology that is on the rise. Kana has not long ago made her first steps into PHP and related webtechnologies. Often, people new to a technology or community are consumers of information and support: They need help and ask for it. After a few years, they start considering giving something back to the community. Kana, however, is different. Even though she is relatively new to PHP, she is already an active member of the community. Aside from being active in IRC, she has also already taken the next step. Not only by attending conferences and user group meetings, but by actually already being active in the Dutch PHP Usergroup. Kana has already been a great help to us, and I am very confident that Kana has a bright future ahead. Her enthusiasm combined with her clear effort to learn and her willingness to ask questions as well as providing answers to others tells me that this is someone to keep an eye on. And I am very happy and proud to have her aboard at the Dutch PHP Usergroup 🙂
Quite often have I been staring at my virtualhost setup for the admin subdomain of this application, wondering why the hell it kept serving the frontend. I’d set the DirectoryIndex to backend.php, so why did it keep serving the frontend? There would be no reason for it to do that, it seemed to ignore my DirectoryIndex setting!
Today, for something unrelated, I opened my project’s .htaccess file and realised my mistake. Apache had been configured perfectly well for all this time. Because of course, the rewrite rules in the .htaccess were configured to point to index.php!
So, I moved all the rewrite rules into both my frontend and my backend vhost, changed the backend vhost to rewrite into backend.php, and lo and behold: it worked! All this time I was not considering the .htaccess!
Now, having moved the settings into my virtualhost setup has another advantage: performance. Apache now doesn’t need to parse my .htaccess anymore (which it has to do on every request) but instead parses the virtualhost at startup and then remembers the settings. So the application should be performing better as well! Double WIN!
Both sessions went well. The myphpbusters talk got greeted with much more enthousiasm though than my refactoring talk, but I guess the nature of that presentation is much more open and informal, where the refactoring talk goes more into theory and concepts that developers may not yet be familiar with. I got the idea that some people in the room had a hard time grasping the concept of refactoring. I tried to explain it, and hope the message got through.
The conference itself so far was quite nice. Lots of nice people, had interesting talks with people and attended a few sessions myself, of which I think the best was the one by Lars Jankowfsky on why architecture matters.