Tag: DevBlog ¦ Atom ¦ RSS

Groovy: Java Scripting

I have been (well, still am) experimenting with Groovy, a scripting language for Java. I wrote about it on my regular blog, and for the first time i choose to write in english on that blog, so everybody can read it :)

version control with darcs

darcs logo

A few months ago Andreas Gohr started using darcs as his version control tool for Dokuwiki. It was the first time i heard about darcs, but in the past three months i came across the name more and more.

darcs is a distributed system for version control, meaning there is no central server like with other systems, by example CVS. This has some very nice advantages, by examples you do not need to have a connection to a server to be able to 'commit' your changes. With darcs every sandbox is also a repository. Darcs has some other nice features:

  • instead of versioning every file it uses patchsets to bundle changes to sets of files. This makes sharing very easy
  • A repository can be made available online using a normal webserver
  • you can have a local repository with your own modifications and still update to the latest code (thus making it easy to make a personal patched version of the app without having to re-apply your changes everytime you update …

NP_AttachFile

A few weeks ago (or was it months Embarassed ) I told that i was working on a plugin called NP_AttachFile. Today i put a first working version onine to test.

With this plugin you can 'attach' files to an item. But first things first: this plugin doesn't care about uploading files. It just gives you the possibility to enter a path or url to a file you want to link to. Also you can enter a description, contenttype and size.

Using the plugin you can by example:

  • attach some files to an item and let them show up under the item in a nice looking table (use the skinvar <%AttachFile%> for this)
  • add the attachments as enclosures in your rss-feed, by example to create podcasts (use the skinvar <%AttachFile(rss)%> for this)

IMPORTANT: This plugin is far from 'feature-complete' and may have security issues (i still have to check input etc), so I advise you only to test it on a development machine, or localhost.
I'm also not sure if …

Snif

A few days ago hcgtv wrote about snif. I immediately started playing with it and I really like it :). I'm using it now for both my testcases directory as my (new) releases directory, in which i will keep development versions of plugins and other stuff.

Snif can display subfolders, but it uses a parameter in the url to link to them, so if you want to add sniff to a subfolder too, you have to copy a simple index.php file in every subdirectory. Because i don't like having to add a file in every subdirectory i started playing with a RewriteRule in the .htaccess-file. I added the following:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}       -d
RewriteRule (.*)                      /releases/index.php?path=$1  [QSA,L]

Also i set up snif to link directly to subdirs:

<?php
$directDirectoryLinks = true;

It almost works, but links to file now contain the subfoldername twice... The code in the index.php-files for the subfolders will cetainly help to solve this issue :)

UPDATE: The solution :)

Around line 350 …

Extension of the year: Html Validator

Today i discovered an Extension for Firefox which will be in my top 5 list of best extensions of 2005: The Html Validator, based on Tidy. It validates pages on-the-fly and shows the result in a very elegant way.

see also:

Upgrading to PHP 5

Upgrading to PHP 5 (cover) I just bought the book "Upgrading to PHP 5" from O'Reilly (ofcourse :) ), written by Adam Trachtenberg. Hopefully this book help to understand and start using all the new and exciting PHP5 stuff, especially Object Oriented Programming :) (how can one live without OO 8-)? )

Searching PHP Debugger: testing XDebug

Like i already discussed at the dev-list i'm searching for a good method to debug php scripts. I already tried dbg with phpeclipse but couldn't get it to work. Now i'm thinking about adding a little debuggingframework to Nucleus. PHP_Debug is a good candidate for this. But before i start to work on this, i want to study some more debugging methods. When i add such a framework to Nucleus it should be easily extentable, so that it is possible to choose the actual debugger you want to use, and it should require as few core-changes as possible.

Currently i'm testing XDebug. XDebug is a Zend-extension, so it requires some changes to your php.ini-file. A possitive point is that it requires no changes to the Nucleus-core to use most features. I just started playing with it but until now i really like it, certainly the error/warning-messages with a complete stacktrace: XDebug Stacktrace

Testing Flyspray again

a while ago i blogged about my search for a good BTS. After talking with the webmaster of the Psi website, i re-installed Flyspray to try it again. Now i understand it's features better and really start liking it. I think i'm going to use it for some different projects and also my personal todo's. Also my personal Nucleus things will be in my BTS. It will contain not only bug reports but also feature requests, things i plan to create etc. In order to structurize everything i created a project for Nucleus in Flyspray which currently has two categories: core and plugins. In the plugins-category are subcategories for every plugin i work on, also for the ones i consider writing. You can add comments to the tasks after you are registered (there is currently no setting to enable anonymous comments AFAIK)

Firestorm has a brother: Thunderbox

Today my new (well first ever) laptop was delivered :-). It is an Acer Travelmate 4001WLMi, with the following specs:

  • Intel ? Pentium ? M715 (Centrino) (1.5Ghz, 400Mhz FSB, 2Mb L2cache)
  • 15.4" WXGA wide TFT LCD
  • ATI ? Mobility Radeon 9700/64Mb
  • 60Gb HDD
  • DVD-Dual (support DVD +- RW)
  • 512MB DDR
  • 802.11b/g wireless LAN

I plan to make it a dual boot with Windows XP and Ubuntu Linux.

A little debug function for php

While programming in PHP you sometimes want to actually 'see' the content of a variable, array or object. This is possible by using a function like print_r() or var_dump(), but to make it a bit more usable i wrote my own version, which also highlights arrays and objects and can display a bit additional info.

The code, together with some examples can be found here: http://dev.budts.be/testcases/20041112/var_dump_a_demo.php