Blogs
SPL Datastructures updated
Here is some news about data structures available in SPL:
- There finally is documentation for SplDoublyLinkedList, SplStack and SplQueue.
- "New" classes: SplHeap (abstract), SplMaxHeap, SplMinHeap and SplPriorityQueue, documentation of those classes is in progress.
Here is an example of a simple but task scheduler using SplPriorityQueue:
<?php$q = new SplPriorityQueue;$q->insert('a', 1);$q->insert('b', 4);// ...$q->insert('z', 2);foreach($q as $task) {// .. process task ..echo $task."\n";// ... add new tasks ..if ($task == 'b') {$q->insert('c', 3);}}/* Output:* b* c* z* a*/?>This implementation is really efficient as the underlying data structure of SplPrioritiyQueue is a Heap, which allows insertions and extractions in O(log2(N)).
Synchronizing Drupal Modules with Adobe AIR
Whether you’re an enterprise developer working in a large shop or setting up a blog for yourself, you’ve almost certainly been tasked with keeping your development code in sync with some type of stable release. Whether a project is big or small, you still need to ensure that the core code you work with remains consistent. This article will walk you through the development of an Adobe AIR and AJAX application used to synchronize the modules of a site developed in Drupal, the popular free and open-source content management system used in thousands of sites across the Internet.
Database Management with phpMyAdmin
This is part one of the quick review of the book “ for Effective MySQL Management
” and the phpMyAdmin software.
This article/review is not just another review about phpMyAdmin, but more some information about features I haven’t used during the last years of PHP/MySQL web development.
About phpMyAdmin
PMA is a full featured tool to administrate your MySQL database server via a web browser. While the functions are almost unlimited, it’s also a powerful tool to maintain the database content even for less experienced users.
It’s already a year ago (or more) that I got the book “Mastering phpMyAdmin” as a present/reward for contributing some snippets on weberdev.com. Finally I found the time to read (most of) the book during a vacation. The book is great for webmasters using phpMyAdmin (PMA) the first time and also more advanced users. The book covers the installation, basic database interactions using PMA like simple INSERT or SELECT commands and also advanced features like the relational system provided by the phpMyAdmin software. (more…)I dont give you a damn, if
You came to an interview for “PHP Developer” and you said you dont know the name “Rasmus Lerdorf”. You’ve used MySQL for a long time and didn’t even hear about “Michael Monty” and though “jQuery” is your “favorite JS framework” for a long time, but “John Resig, who is he?” Fuck Off! The reason behind writing this [...]The D3 arrived. Part II: Pros and cons
Unpacking the box—and being happy! The Nikon D3 is just an unbelieveable camera—or toy for that matter. Anyway it just feels right. A bit heavy maybe but, well.
Most things feel just as they should be and there is hardly anything wrong with the camera. So I spend a few days shooting, collecting all the things I do not like. Here goes:
1) First of all, Nikon obviously tried to give the D3 a superior strap compared to the D200 or the D300. To me it is just too broad; the old one was much better. So the first thing after buying the Nikkor 24-120/VR was a new strap!
2) I even read the book (aka manual)—but Nikon indeed removed my favorite pre-shutter mirror-flipping mode. Of course, the D3 has a mode where you can flip the mirror with first pushing on the shutter release button and then taking the shot with a second push. But what about the nice mode where you just press once and the camera waits a split of a second? It is an awesome feature, it usually gave me one additional stop.
3) Nikon still refuses to care for its customers. I mean you can now add some crappy signing to the pictures. But hey, I still cannot claim the camera to be mine. That's unbelievable. The EXIF standard has both author and copyright tag (though sadly combined in one tag). And of course the camera does not ask me to point it to my PGP or whatever key. Without that what is the signing good for? I guess it makes people that have no clue feel better. For all the rest, this is useless becasue you can always get rid of this signing, post-process the picture and re-create it. And of course this includes changing the author and copyright info some software adds for you. Photokina is ahead, if I have time for it I will once again ask about this insanity.
4) There is no ISO setting below 100, not even with stupid filtering in the camera. Not that I personally will ever miss it though.
5) The HDMI output is pretty poor. On preview it uses the thumbnails, in other words it has very low resolution and the output simply looks crappy. Hey, I have a 46" screen and I would expect that people buying a D3 and use the HDMI would use nothing smaller. Now it gets a bit better when changing to a slide show. However there is no 1080p mode and the 720p mode looks in my opinion a tad bit better than the 1080i mode. Either way, not worth buying an HDMI cable. This said, it does not really matter that the camera allows neither 1920x1080 nor 3840x2160 resolution.
6) When doing a firmware update, you have to upload the firmware files separately to exactly one CF card. When using both CFs, the camera simply refuses to accept any firmware file and when finding both it always selects the same one. At least the order in which you do the update does not matter. Well so far it does not.
7) Once again the focus points are all around the center of the sensor. They only spread so much that you get about one focus point per golden cut. Meaning one probably uses about 9 focus points. As a tip for Nikon, if the corner focus points are used extremely often, then that is probably based on the fact that people are missing points closer to the edges.
8) The function button still cannot do everything. And of course it cannot do pre-shutter mirror-flipping. Simply becasue the mode is gone (see 2).
9) The camera does not allow to add a 'normal playback' mode as Caitlin called it. Meaning you cannot set the camera to show some information while having at least one screen without any data (over-exposure areas, focus points, etc.).
10) The view finder is really awesome. But the rubber, the eyepiece you put, well, to your eye, is simply bad. So the next things I ordered was a DK-17M and a DK-19.
Now all of the above are really minor complaints. And there is a hell lot of good things to mention. Just to mention a few highlights:
1) The reTruncated by Planet PHP, read more at the original (another 4445 bytes)
The D3 arrived. Part I: Now I need a new lens
The camera change from Nikon D200 to Nikon D3 with its sensor size change from APS-C aka DX to full frame aka FX unfortunately made the purchase of a new all rounder lens imminent. And so I switched from 'AF-S DX VR Zoom-NIKKOR 18-200mm f/3.5-5.6G IF-ED' to 'AF-S VR Zoom-NIKKOR 24-120mm f/3.5-5.6G IF-ED'.
The picture was shot using the 'AF-S VR Micro-NIKKOR 105mm f/2.8G IF-ED' on the D3 and post-processed with Adobe Lightroom 2.0 beta and Corel Paint Shop Pro XI.
Both lenses have a UV filter mounted. The 18-200/VR has a B&W filter while the 24-120/VR has a Hoya filter. Both lenses come with VR and share the same aperture range, that is f/3.5 to f/5.6. Also the wide range is very compareable as the 18mm on the DX camera turns into 27mm on 36mm film, while the 24mm are already correct in terms of 36mm film equivalent, when mounted on the D3.
The unfortunate difference is the telephoto range. Here the 200mm DX format turns into 300mm on 36mm film. And that is way more than the 120mm of the FX lens.
Interestingly, the switch does not come with a handling difference - at least not in lens handling. Both lenses nearly look identical and share a more or less identical housing. But as to be expected, the 18-200 goes out much more than the 24-120 does. Sharpness-wise it appears both lenses deliver the same quality. Meaning they do a great everyday job but do not take very sharp pictures. Since even the flowers of both lenses are nearly identical, I had to check the internet to figure out which one belongs on which lens. The HB-35 has broader fins and belongs on the 18-200. The 24-120 is a tad bit wider, so it takes the HB-25 with its smaller fins.
I actually bought the camera and lens in Switzerland where prices are insanely high - though yet much lower than for instance in Germany. So I spent some time searching for shops with reasonable prices. I found digitec in Zürich and ars-imago in Zug, which was not too far away and unlike digitec, where I bought the camera, had the lens in stock.
I had to go twice to digitec because the first time they figured they could not get enough money from my ATM cards. It turned out that my two German ones only allow higher charges in Germany - or they just don't care so that you pay with Credit Card. For that however they happily charge 2.75% extra. That is absolutely ridiculous and of course unacceptable. So I came back the next day after visiting my bank in the morning. And believe me, it really feels strange running around with 6k in cash.
When I decided for the lens and found ars-imago I chose them for one reason. It was the cheapest place with the lens in stock that was reachable by car. There was one shop where I could have ordered the lens on-line. Including charges for shipping I would have paid the same, well there also is the credit card insanity. So I either would have had to wait longer or pay this unbelievable special Swiss insanity extra charge. So I happily drove to Zug after reading that there was the last lens of its kind waiting for me to be picked up. However when I arrived they told me with the typical Swiss smile, that my lens was sold half an hour ago. That means that those idiots sold my lens just after they sent me the confirmation that I can pick up the lens on the same day. They assured me the lens would come next business day which was two days later. So I lost one day for experimenting - dammit! The least thing one would expect now - of course - is that they would give a bit of a rebate for making me drive twice. But nothing - that's Switzerland. Lesson learned, never buy anything from ars-imago again.Blogged with the Flock BrowserA cute search box
That's it really. A cute search box that's "self contained" inside a PHP function so it's extremely convenient to display. What can I say? I got bored... [Link]
Unit test practice at tilllate.com
For now over three years we are working with unit tests. I’d like to share some of those experiences.
As we have two frameworks in place for our website, I can compare two different strategies for unit tests.
In our homemade legacy framework we were using SimpleTest. Mainly because I read PHP|Architect’s Guide to PHP Design Patterns and Simpletest was Jason’s framework of choice.
We have a cron job running which runs all tests every hour. The results of the tests are being shown on a page. The results are also displayed in Nagios.
ExtJs - talking forking
I've started looking at forking ExtJS, after some considerable thought, I'm pretty close to the concluding that forking ExtJS is really option left, to retain the investment I've already made in it..
So, as I have a Zip file of 1.1.1 and it explicitly says that the Javascript code is Licensed under LGPL, (not ifs/ no but's) - I'm slowly putting the code into my subversion repo under www.akkbkhome.com/svn/extjs1 (*I'm looking at extjs1.1.1 as I have been using it and tend to prefer it, but there is nothing in the discusion below that precludes anyone helping/leading with the last extjs2 version that was released)
Now if this actually becomes a full fork (most forks fail BTW), It will need a bit of work, so If anyone is interested in helping out. I've no idea where this could go. But this fork ain't changing the license no-more...
The plan
I think there's quite a few things to do here... so Ideas or contributions.. -- feel free to email me, or just comment on this post. - At worst, it could form the brainstorming for anyone else actually doing this. (If you want to comment on if/should this be done - do it on my previous post, otherwise I will delete the comment)
The Code
- Tidy up Ext Js's source - see if it can be stored in one file per class, and have a simple classname->filename mapping... (eg. Ext.Dom in Ext/Dom.js) ** started..
- Sort out the CSS
- If Jack ever released any old CSS/images under a open licence (ext-yui source?) see if that can be used.?
- or Go through the classes and see what their requirements are for CSS
- Probably in batches - write a short document listing the required classes needed by the batch, enabling someone to contribute a CSS file that works.
- Posibly create enough CSS to make enough of it useable (probably with no images)
- Document image requirements (see above), then see if other open projects already have images that can be used? - otherwise see if someone want's to contribute themes..
- Break up Source into managable packages - Distribute ownership! - GIT or multiple SVN repos??
The Project
- Build infrastructure
- Create a command line tool that can compress then merge all the required components (and allows end users to do this)
- Allows source to be taken from multiple sources (so you can create builds with extensions / or without stuff you don't need)
- Forums
- Set up a mailing list! (and archived, with a search feature!) - Anyone know a good hosted one available? - or should I just go off and set the infrastructure here..
- No more 'premium' ... users! - equal, like open source is supposed to be!
- Manual
- Work out how to build a manual from the source!-- While Ext's manual is not bad, take the opportunity this time do it right, and have a bug reporting / user comments on it....
- A name??/ - May need some thought...
Truncated by Planet PHP, read more at the original (another 2564 bytes)
- Tidy up Ext Js's source - see if it can be stored in one file per class, and have a simple classname->filename mapping... (eg. Ext.Dom in Ext/Dom.js) ** started..
Spaces in PHP variable names
I just found out a very strange PHP feature by browsing the PHP-GTK2 API with the Reflection classes : spaces can be used in some alien places, like variable names.
But the doc says you can't !
Well, try this in PHP 5.2.5, for instance:

