1. WP 2.6.2 posts revisions & Twitter Updater

    October 5, 2008 by jerome

    * Tlktlk is using the Twitter Updater plugins. It’s quite a nice plugin, really usefull to do automated posting to a twitter account.
    But for a reason I didn’t quite grok, the twitter account was updated even when editing (save post) and/or (maybe) trough the autosave function of the new 2.6. On a few other blogs I decided to desactivate it since it was creating twits based on revision not accessible to general plugin and resulting in a 404.

    This afternoon I had a look in the WP Codex page for Actions’ Hook and I tried to replace the hook from the plugin (line 108: twitter_updater.php) and posted a new event on the blog; so far it seems it worked like a charm:


    add_action ( 'publish_post', 'vc_twit');
    //add_action ( 'save_post', 'vc_twit');


  2. Magpie & Feedburner - the 404 issue

    September 30, 2008 by jerome

    I just had some troubles for a few days trying to figure out why some of my feed were disappearing from Magpie when the website was using feedburner’s services ; the problem was coming from user agent - feedburners apparently has some troubles answering application with a ‘weird’ name.
    The solution I found (here) is to declare Magpie useragent as being something more traditionnal:

    define('MAGPIE_USER_AGENT', 'Mozilla/5.0 (Windows; U; Windows NT 5.1;
    en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1');

    * Magpie is a RSS parser for PHP; it allows for quick prototyping. It is super simple and easy to use. It is a very nice way for using similar concepts as the Yahoo Pipes RSS parser in custom code.


  3. Dalston driving lessons type

    September 15, 2008 by pierre


  4. fun loop

    September 4, 2008 by pierre

    There has been two intresting posts on Word Aligned about software documentation as a “genre” and more specifically humour in documentation. The first one was a review of the documentation litteracy ideas and was a quite interesting starting point. But I found the second post yet more interesting : it explores the link between this form of humour and the notion of “syntactic sugar” in programming… and it is very simple and well written, I recommend it.

    Makes me think of another idea that I like: the fact that formal systems like programming languages or math proofs (any form of constructed, artificial language) can be used for other things than computing or calculating, for example things like jokes or poetry*, usually associated to natural languages (english, body lanuage, etc…).

    xkcd comic completeness

    To which, Possibly Philosophy answered :

    They eventually resolved this self-reference, but Cantor’s ‘everything-in-the-fetish-book-twice’ parties finally sunk the idea.

    * or music. Speaking of which: I like a lot the non-orthodox definition on the first line of the wikipedia article on serial music :

    “a technique for composition that uses sets to describe musical elements, and allows the manipulation of those sets.”

    there is an intresting Stanford Encyclopedia of Philosophy article on set theory for some background.


  5. summer readings

    August 15, 2008 by pierre

    Ian M. Banks, Consider Phlebas (thanks Jérôme!), The Algebraist. First time I read a book from the Culture cycle. The Algebraist is sci-fi as well but not from the same cycle.

    William Gibson, Pattern Recognition and Spook Country.

    Greg Egan, Riding the Crocodile and the serie Oracle | Singleton. Via Tom Moody

    Three lectures by Per Martin-Löf. “On the Meanings of the Logical Constants and the Justifications of the Logical Laws.” Nordic Journal of Philosophical Logic, 1(1): 11-60, 1996 http://www.hf.uio.no/filosofi/njpl/vol1no1/meaning/meaning.html

    Uh… this is not what I read all the time, but it happened like this.


  6. next bigger interger

    August 12, 2008 by pierre

    I’m working on PDF templates using FPDF, the templates are based on a grid and I had to find how much of the grid’s units different images are using, e.g. if an image width is 1.3 units I need to make 2 units space for it in the the grid.

    In other words I needed to “round” a floating point number, but always to a bigger number so the round php function would not be usefull :

    echo round(1.2); // 1
    echo round(1.6); // 2

    Then I thought that what I wanted was the “next bigger integer”, and it felt in place : change the float to an integer and add one.

    echo ((int) 1.2) + 1; // 2
    echo ((int) 1.6) + 1; // 2

    This is super simple but it seem to me a good exemple of how formulating what you want to do in english can help when programming.


  7. An experiment in the economics of production

    July 24, 2008 by jerome

    An experiment in the economics of production: how can we shift focus from consumption of a finished product to investment in the processes of design, print & production?

    R-Echos issue 1 - AMP001

    This is a poster and a text: an analog R-Echos
    Would you be interested in investing in the tangible production of this work?

    1. You can download the digital archive
    and decide wether or not you’re interested in particpating in this project.
    2. Each participant donate a minimum of £8
    3. The publication is produced
    4. We share the publications
    which means each participant own a fair amount of publications and participants decide (collectively or individually) what to do with it.


    minimum £8


  8. (can’t) insert uploaded images in WP 2.5+

    July 3, 2008 by jerome

    With Wordpress 2.5 came a new way of handling files upload: the image gallery. Very neat and simple to use. One single issue made it so far a pain in the bum for me: for some reason, some times, it was impossible to use the button ‘Insert into Post’.

    Firebug was indicating that the AJAX call was left with no answer - it is apparently related with server configuration - this happen all the time and it’s a real problem when developing on a shared hosting machine; I had these issues on a shared hosted account at IX web hosting and I still have to test on a DreamHost account to see if it solves this issue there too.

    I finally found out a solution for my WP 2.5.1 installation:
    Thanks to Otto42 on the WP forum, after following the whole discussion - i had to edit my .htaccess and add the following lines.

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    The ‘.htaccess’ file provides additional configuration instruction to the Apache server, specific for the files accessed in the same directory where it is located - in this case it should be the root directory of your WP installation, if you have no .htaccess file you can just create one and call it this way, with the dot in front of the name: it means the file will be hidden using http, but you still can see it trough ftp - when downloading this file, if your are on a Mac OS X, the file will not be listed in the directory, but it still is there, it is just hidden.

    * Please note that disabling mod_security apparently opens wide door to comment and referrer spam, and possibly nastier attack of other forms.


  9. Electronest Projects & see through pages

    June 8, 2008 by jerome

    empty_page.jpg

    Inspired by a few research and a certain trend we decided to give see-through website a first go and this weekend, we finally managed to group a few works and an archive links list on two pages: Electronest Websites Work Selection and Electronest’s Projects Archive; these page simply use an iframe objects to display other’s websites. Some of the many problem we usually faced when presenting our online portfolio, are:

    1/ it’s bad to have a huge list of links - no one is going to ever click on each links; it’s better to keep track with reality and we reduced the quantity by focusing on just a few websites.
    2/ visual concision - no images and not a list either, but a simple drown menu which stays in the corner. you’re two click away from any content at any given time.
    3/ browsing efficiency - you don’t have to open in a new window, or to browse back to the page if you decided to see a bit more of the showcased websites.
    4/ un-obstrusiveness - you can remove the navigation at any given time to explore further in an de-clustered window.
    5/ the most interesting bit: you see the real thing.

    This way still requires certainly a lot of improvements - but it is a very effective and straight to the point way to share a few things we liked to work on and it gives a good overview of our online work.
    For a more complete picture of all our activities, we developed a prototype following the same principle of the see through website, but we expanded the list to a 88 elements list - our beta archive for the past 4 years, which is approximatively 22 projects per year.

    projects_list.jpg

    The page is made of 2 main elements: an iframe and a navigation form. The navigation form is simply made of a select element where option’s values are giving the url of the listed elements. The javascript we are using on this page remains quite simple:

    - in the form’s OnChange:

    document.getElementById('where_to_go_next').src = this.options[this.selectedIndex].value;
    where “where_to_go_next” is the ID of the iframe

    - in the link to remove the iFrame and reload the selected page:

    the_local_form = document.getElementById('author_list'); window.location=the_local_form.options[the_local_form.selectedIndex].value
    where “author_list” is the Select ID inside the form; the value being set from the Selected option (value="http://..."), we can access it to define the new location of the window DOM element.


  10. php.ini locations

    May 30, 2008 by pierre

    Once it is compiled, PHP can be configured using a file called “php.ini”.

    If you are using PHP as a server module (mod_php in Apache) this file is read when the server is started, this implies that you need to restart the server to update the configuration. But using php via CGI or command line interface, it is read each time a script is executed.

    You can have several php.ini files and it is searched in an ordered orthodox serie of locations. Thanks to this feature you can have specific configurations of PHP per level of directory trees on your server. In some systems though (we just experienced this on a Site5 shared hosting account) you can somehow bypass this list (I don’t know exaclty how you do this) and have php.ini files setting the defaults for only the folder that contains it. In other words each php.ini files can then only affect scripts that are in the same folder.

    For example if you are using a script to upload files bigger than than upload_max_filesize you can reset this limit in a php.ini file but it then has to be in the same folder as your uploading script. In this situation if you are using a framework like Code Igniter or CakePHP the code that is executed when you upload a file will be scattered in many files and directories. We thought and googled hard for a cleaner solution (please comment if you know a better way!), but we ended up duplicating the php.ini file in all the application and framework core dirs so that our settings are applied correctly.

    To do this from the command line, cd to the top dir containing the php.ini file and do something like:

    for i in `ls -aR | grep \: | cut -f 1 -d :`; do if [ -d $i ]; then cp php.ini $i; fi; done