Another week another Vista enhancement found. Well, to be honest I did not find this issue this week, rather I was looking for a "fix". Since I did not find such I decided to share my wonderful experience.
"Bug" in question concerns a number of buttons from the keyboard of my work Lenovo T61 with Vista SP1 installed. The actual problem rears its ugly head if you use more than one keyboard layout to type in another language (other than English), say Russian. If you switch the layout from English to Russian the multimedia buttons as well as the "special" Win key do not work. Switching back to English (some of the many) keyboard layout provides you with your precious (Lord of the Rings anyone?) keys again.
Wait it gets a tad bit more interesting. My coleague has a Lenovo T60. Guess what!? The buttons on it work no matter the keyboard layout used.
And for a the grand final. All these buttons used to work with Windows XP, no matter what keyboard layout you used.
I am sure someone at M$ will point out a hardware issue here and point a finger at Lenovo for not handling keyboard interrupts properly and not writing a proper BIOS and whatnot... Yet what I notice day in and day out is that the buttons on my laptop do not work properly and this drives me crazy...
Here's to hoping Windows 7 won't suck as much...
Sunday, March 29, 2009
Sunday, March 15, 2009
Logo Candy
WordPress has now approved my plug-in hosting request. The plug-in is called Logo Candy (for a lack of a better name) and its primary purpose is to allow one to change the logo, the logo's description and redirect link on the WP log-in page. Now for some more details:
General idea:
Since its birth in my mind this plug-in's purpose was to provide you with the aforementioned abilities. I know there are other ways to achieve this task - option 1: edit code directly, option 2 : use other much more sophisticated plug-ins where this is hidden amongst other options. The first does not work in my book as the next WP update may touch that specific file and either revert your changes or refuse to work due to difference in the files that are to be updated. The second is a viable solution but I wanted to start from somewhere with plug-in development and this is plug-in is the result. While creating the plug-in I read quite a lot, saw examples how other people do it in their plug-ins and crafted my own, following the most recent developments in WP.
Going further, since its general availability a few weeks back I have had some ideas on how to expand the functionality. I will not spill the beans here so as not to disappoint someone. I want to see if any feedback comes from the plug-in as it is right now. If there is such I'll evaluate it and may take another direction in my coding efforts.
Technical details:
Judging by the testing I performed on a number of blogs where I installed the plug-in, before it was hosted by WP, it works as expected without any issues. If you find any please post a comment and I'll see to fix any bugs.
I've made an attempt to document the source well so should be relatively easy to either make changes to the code or use it as a simple tutorial. While short, only about 100 lines of code, the plug-in itself utilizes the latest in WP development technology - no depreciation warnings, no old code...
Closing matters:
If you like the plug-in; if it did wonders for you; if it was just what you were looking for; if you liked how well documented it is; or you liked it for any other reason please support my work. A small donation is always welcome.
On the other hand if you like my work you can also hire me for doing changes to the plug-in or support it in some way.
By all means, have fun using the plug-in.
General idea:
Since its birth in my mind this plug-in's purpose was to provide you with the aforementioned abilities. I know there are other ways to achieve this task - option 1: edit code directly, option 2 : use other much more sophisticated plug-ins where this is hidden amongst other options. The first does not work in my book as the next WP update may touch that specific file and either revert your changes or refuse to work due to difference in the files that are to be updated. The second is a viable solution but I wanted to start from somewhere with plug-in development and this is plug-in is the result. While creating the plug-in I read quite a lot, saw examples how other people do it in their plug-ins and crafted my own, following the most recent developments in WP.
Going further, since its general availability a few weeks back I have had some ideas on how to expand the functionality. I will not spill the beans here so as not to disappoint someone. I want to see if any feedback comes from the plug-in as it is right now. If there is such I'll evaluate it and may take another direction in my coding efforts.
Technical details:
Judging by the testing I performed on a number of blogs where I installed the plug-in, before it was hosted by WP, it works as expected without any issues. If you find any please post a comment and I'll see to fix any bugs.
I've made an attempt to document the source well so should be relatively easy to either make changes to the code or use it as a simple tutorial. While short, only about 100 lines of code, the plug-in itself utilizes the latest in WP development technology - no depreciation warnings, no old code...
Closing matters:
If you like the plug-in; if it did wonders for you; if it was just what you were looking for; if you liked how well documented it is; or you liked it for any other reason please support my work. A small donation is always welcome.
On the other hand if you like my work you can also hire me for doing changes to the plug-in or support it in some way.
By all means, have fun using the plug-in.
Friday, March 13, 2009
WordPress plug-in development
Recently I had to do some to work on projects that utilized WordPress as a back-end. While not large-scale projects these got me interested in WordPress (referred to as WP from now on for simplicity's sake). All of the projects required, amongst other things, re-branding of the traditional WP interface both front-end theme and back-end.
Doing it once was not that big of nuisance but a few times would have gone on my already stretched by my day job nerves. Was there no easier way? Sure there was! I just had to find it and there you go. Before I knew it I had given myself a new mission. Soon I was all over the WP site gobbling the developer information and tarnishing through the plug-in repository. Google itself got no mercy either... After relentlessly searching though the available plug-ins and resources for roughly about 30 minutes it was evident I would need to do some coding myself... Oh, well!
Within a couple of hours I had acquainted myself with the WP plug-in development philosophy. Not before long I had found the respective hooks I would need and hacked a few lines to test the thing out. Turns out it was fairly easy to do stuff around WP. And that's where it hit me... Why not release this wonderful peace of ingenious code upon the world in the form of a plug-in?
So I registered to become a WP developer and am right now waiting for approval. Now we play the waiting game :) You wait for my wonderful plug-in that as of now can only change the log-in logo, logo caption and logo link, and I wait upon WP stuff.
See you soon. Another day, another plug-in written, as they say!
Doing it once was not that big of nuisance but a few times would have gone on my already stretched by my day job nerves. Was there no easier way? Sure there was! I just had to find it and there you go. Before I knew it I had given myself a new mission. Soon I was all over the WP site gobbling the developer information and tarnishing through the plug-in repository. Google itself got no mercy either... After relentlessly searching though the available plug-ins and resources for roughly about 30 minutes it was evident I would need to do some coding myself... Oh, well!
Within a couple of hours I had acquainted myself with the WP plug-in development philosophy. Not before long I had found the respective hooks I would need and hacked a few lines to test the thing out. Turns out it was fairly easy to do stuff around WP. And that's where it hit me... Why not release this wonderful peace of ingenious code upon the world in the form of a plug-in?
So I registered to become a WP developer and am right now waiting for approval. Now we play the waiting game :) You wait for my wonderful plug-in that as of now can only change the log-in logo, logo caption and logo link, and I wait upon WP stuff.
See you soon. Another day, another plug-in written, as they say!
Friday, February 20, 2009
Being eco-friendly has a lot of meanings
Following the financial crisis most people seem to have forgotten the energy crisis and the high petrol prices (it even rhymes, wow). These guys from Belgium have not. Check out these two really good commercials:
I just wish there were more such. It would be nice if we could actually follow the message from the commercial too. From what I know in Belgium you can really take the bus to work, school or wherever you are going and leave your car home. Why not invest in such projects rather then spend $12B on GM every year...
I just wish there were more such. It would be nice if we could actually follow the message from the commercial too. From what I know in Belgium you can really take the bus to work, school or wherever you are going and leave your car home. Why not invest in such projects rather then spend $12B on GM every year...
Wednesday, February 18, 2009
Vista - you are my hero!
I appreciate the work Microsoft is putting behind Windows 7 right now. I also appreciate all the work gone into Vista and its service packs. However I have had quite a few battles with the new Vista my employer forced us to use about 9 months ago. It is not all Microsoft's fault though, there are other more "prominent" software developers out there that I think take pride in writing the most crappy software they can...
Oops. Got a bit carried away right there...
To the point. Today Vista surprised me. I had some laughs over it. Check the image below:

Never seen a SD card that could use disks in it. Must be some new interesting device that is about to be unleashed upon us. Can't wait for the new SD cards that come with disks. Can you?
Oops. Got a bit carried away right there...
To the point. Today Vista surprised me. I had some laughs over it. Check the image below:

Never seen a SD card that could use disks in it. Must be some new interesting device that is about to be unleashed upon us. Can't wait for the new SD cards that come with disks. Can you?
Sunday, December 14, 2008
Pylons & PIL (Python Image Library)
Pylons is moving along nicely and I am delighted by that fact. The Pylons book was recently sent for publishing. Pylons itself reached the final RC versions. Christmas is coming. What more could one want. Fine maybe not everything is going that smooth but at least we can pretend.
Without further general talk the topic for today: Pylons and PIL in a virtualenv.
I am on an Ubuntu machine with the latest updates installed. Recently I started a new project with Pylons using the latest version (as of time of writing it is 0.9.7rc4). I setup a virtualenv and began tapping the keyboard. Soon enough I needed to manipulate some images and what better way to do it then PIL. Let the tough stuff begin.
Ubuntu comes with python-imaging package which is exactly PIL but the way it is packaged it does not get picked up by while virtualenv is being created. I poked around the directory structure where PIL is installed and found it to be linked to another directory (/usr/shared/pyshared I think it was). I guess the Ubuntu guys who rely on python extensively need the library and for convenience or something else distribute the package like this. So system-wide PIL is out of the question. Need to install on in the virtualenv then.
Downloaded the source and upon attempting to build the package a whole twenty something screen of errors poured. This missing, that missing... Holy cow! Scrolled way back to the beginning and noted that Python.h was missing. A-ha! Quick fix:
sudo apt-get install python-dev
Presto! Compilation wend on like a charm. Time for selftest.py. Bang! No-go again. One test of 57 failed:
IOError: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.
Searching here and there the "cure" was found:
sudo apt-get install libfreetype6-dev libfreetype6 libjpeg62-dev libjpeg62
After a recompile and a selftest.py again everything looks fine:
57 tests passed.
The obligatory check in the virtualenv was in order:
$ python
Python 2.5.3a0 (r252:60911, Nov 23 2008, 12:10:42)
[GCC 4.3.3 20081122 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>>
Works like a charm. Time to get on cracking on the source again. Hope this helps someone!
Without further general talk the topic for today: Pylons and PIL in a virtualenv.
I am on an Ubuntu machine with the latest updates installed. Recently I started a new project with Pylons using the latest version (as of time of writing it is 0.9.7rc4). I setup a virtualenv and began tapping the keyboard. Soon enough I needed to manipulate some images and what better way to do it then PIL. Let the tough stuff begin.
Ubuntu comes with python-imaging package which is exactly PIL but the way it is packaged it does not get picked up by while virtualenv is being created. I poked around the directory structure where PIL is installed and found it to be linked to another directory (/usr/shared/pyshared I think it was). I guess the Ubuntu guys who rely on python extensively need the library and for convenience or something else distribute the package like this. So system-wide PIL is out of the question. Need to install on in the virtualenv then.
Downloaded the source and upon attempting to build the package a whole twenty something screen of errors poured. This missing, that missing... Holy cow! Scrolled way back to the beginning and noted that Python.h was missing. A-ha! Quick fix:
sudo apt-get install python-dev
Presto! Compilation wend on like a charm. Time for selftest.py. Bang! No-go again. One test of 57 failed:
IOError: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.
Searching here and there the "cure" was found:
sudo apt-get install libfreetype6-dev libfreetype6 libjpeg62-dev libjpeg62
After a recompile and a selftest.py again everything looks fine:
57 tests passed.
The obligatory check in the virtualenv was in order:
$ python
Python 2.5.3a0 (r252:60911, Nov 23 2008, 12:10:42)
[GCC 4.3.3 20081122 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>>
Works like a charm. Time to get on cracking on the source again. Hope this helps someone!
Tuesday, August 26, 2008
Way to go Joomla!
I am not really fond of Joomla or PHP for that matter. I am more of a Python kind of guy. I like things being ordered and symmetric. To the point...
Recently I needed to craft a site for a friend's business in a hurry. I had some experience with writing/debugging PHP before but more importantly I have used Mambo and Joomla before. Need to make something clear: I have been using both as an end user! In a matter of days I remambered what Mambo was all about and crafted the site in question, installed some components and modules and a new template. Everything worked out fine, my friend is happy, I'm happy, peace all over the world...
The component used by the site is one written for Mambo 4.5.x/ Joomla 1.0.x and hence I had to use that one. Geeky by nature I had to check out how the component would fare in Joomla 1.5. As you have probably guessed by now, it did quite poorly. It did not install even. Being an amateur developer I decided to look within the code, dig in a bit deeper and check if I can flex my fingers on the keyboard and massage it a bit Joomla 1.5.x style.
I decided that the simplest and quickest way to go would be to simple change any references to old functions and stuff like that, so I went that route. After a week I noticed I am not going anywhere this way, it was hopeless. But wait I've been coding for a while, this should not pose such a big problem, it is a rather simple problem. So on to rewriting it was. This woule require more effort but hey, a person learns his whole life, why not learn this. I took a book from a friend, a Joomla 1.5 extensions development book, to be precise. I read through it quickly, it was an easy read and not a too long one - roughly 150 pages. Time for some coding. I rolled up my sleeves and began hammering out some code. Few hours of coding behind my back I stumbled for the first time. The code in the book I read did not work. I did a quick check for the version the book was for and it read 1.5. So the API changed at some point in time after Joomla 1.5 was out, but we are only a x.x.point release from the 1.5 branch. Red point number one!
The "bug" I found was an undefined function. It was removed from the framework somewhere. First thought was to look it up the API. The API itself is kind of hidden in the Joomla site (thank you Google), is not searchable and to top it all is rediculously slow to load. I looked here and there within the API to no avail. Nowhere was there a mention of my missing function, so I turned to the Joomla forums where I only found a few other people like me who had used the function (probably read the same book) and got the same error but no answer. Upon some extensive use of Google I managed to find a commit log. In it I found a one-line reference saying that the name of the function was changed from "outputFilter" to "filterOutput" or something very similar to that. Difficult access to information for rookie developers scores one more red point in my table.
I managed to move on coding various aspects of the component but was constntly annoyed with the documentation. Sometimes the documentation was refereing to API that was depriciated in Joomla 1.5 and sometimes even in Mambo. For some things there is virtually no documentation. I will not even mention the fact that the documentation is spread across a wiki, a documentation page, a forum... Perfect order. Strike three.
Right now I am quite frustrated with all this. I will still continue developing the component as I would like to update my friend's installation to Joomla 1.5 (hopefully less security risks). Further it is a bit of a challange and I like one of those. I just want to send a clear message to the Joomla team: Guys, you might want to revisit your strategy for gathering developers under your flag. Right now I'd say you are trying to scare everyone off from coding for Joomla...
Recently I needed to craft a site for a friend's business in a hurry. I had some experience with writing/debugging PHP before but more importantly I have used Mambo and Joomla before. Need to make something clear: I have been using both as an end user! In a matter of days I remambered what Mambo was all about and crafted the site in question, installed some components and modules and a new template. Everything worked out fine, my friend is happy, I'm happy, peace all over the world...
The component used by the site is one written for Mambo 4.5.x/ Joomla 1.0.x and hence I had to use that one. Geeky by nature I had to check out how the component would fare in Joomla 1.5. As you have probably guessed by now, it did quite poorly. It did not install even. Being an amateur developer I decided to look within the code, dig in a bit deeper and check if I can flex my fingers on the keyboard and massage it a bit Joomla 1.5.x style.
I decided that the simplest and quickest way to go would be to simple change any references to old functions and stuff like that, so I went that route. After a week I noticed I am not going anywhere this way, it was hopeless. But wait I've been coding for a while, this should not pose such a big problem, it is a rather simple problem. So on to rewriting it was. This woule require more effort but hey, a person learns his whole life, why not learn this. I took a book from a friend, a Joomla 1.5 extensions development book, to be precise. I read through it quickly, it was an easy read and not a too long one - roughly 150 pages. Time for some coding. I rolled up my sleeves and began hammering out some code. Few hours of coding behind my back I stumbled for the first time. The code in the book I read did not work. I did a quick check for the version the book was for and it read 1.5. So the API changed at some point in time after Joomla 1.5 was out, but we are only a x.x.point release from the 1.5 branch. Red point number one!
The "bug" I found was an undefined function. It was removed from the framework somewhere. First thought was to look it up the API. The API itself is kind of hidden in the Joomla site (thank you Google), is not searchable and to top it all is rediculously slow to load. I looked here and there within the API to no avail. Nowhere was there a mention of my missing function, so I turned to the Joomla forums where I only found a few other people like me who had used the function (probably read the same book) and got the same error but no answer. Upon some extensive use of Google I managed to find a commit log. In it I found a one-line reference saying that the name of the function was changed from "outputFilter" to "filterOutput" or something very similar to that. Difficult access to information for rookie developers scores one more red point in my table.
I managed to move on coding various aspects of the component but was constntly annoyed with the documentation. Sometimes the documentation was refereing to API that was depriciated in Joomla 1.5 and sometimes even in Mambo. For some things there is virtually no documentation. I will not even mention the fact that the documentation is spread across a wiki, a documentation page, a forum... Perfect order. Strike three.
Right now I am quite frustrated with all this. I will still continue developing the component as I would like to update my friend's installation to Joomla 1.5 (hopefully less security risks). Further it is a bit of a challange and I like one of those. I just want to send a clear message to the Joomla team: Guys, you might want to revisit your strategy for gathering developers under your flag. Right now I'd say you are trying to scare everyone off from coding for Joomla...
Subscribe to:
Posts (Atom)