Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the 'Programming' Category

    Ada GNAT GPL 2009 released

    30th May 2009

    We are pleased to announce the release of GNAT GPL 2009, the Ada Toolset for Academic users and FLOSS developers. It introduces many new features including:

    - Ability to generate byte code for the JVM

    - Improved support for the .NET Framework

    - Addition of the Ada-Java Interfacing Suite (AJIS) that enables native Ada code to be called from Java:
    http://www.adacore.com/2008/06/17/ada-java_interfacing_suite

    - Availability on the Mac OS X (64 bit) platform

    - Automatic C/C++ binding generators

    - Addition of the GNAT Component Collection (GNATcoll) providing new APIs that can be extended by the user community:
    http://www.adacore.com/2008/06/17/gnat_component_collection

    GNAT GPL 2009 comes with version 4.3.1 of the GNAT Programming Studio IDE and GNATbench 2.3, the GNAT plug-in for Eclipse.

    It is available for the GNU Linux, Mac OS X (64 bit), .NET, JVM and Windows platforms.

    GNAT GPL 2009 can be downloaded from the “Download” section on the new Libre website:
    https://libre.adacore.com.

    I wonder if the new JVM bytecode generation feature was frequently requested by Ada developers, or is just a move towards popularizing Ada as a highly capable programming language. Either way, it’s good.

    Hopefully, I will find time and a matching project to finally learn Ada properly – since a couple of years I believe Ada is a very good programming language. And the D language is better than C and C++ :) (holy war, anyone? :) )

    Share

    Posted in Ada, Links, Programming | No Comments »

    WordPress and Google Analytics external nofollow problem in comment links

    13th February 2009

    Since some WP release, the comment author’s link in comments is broken – it has ‘ external nofollow’ attached straight to the href attribute (which breaks the link).

    I assume that the problem is caused by Google Analytics, namely the “track outgoing clicks” feature (as recalled, might be inaccurate feature name). “Track outgoing links” adds some JavaScript code to all outgoing links, and that script has tick characters like this one ‘ which, incidentally, are also used for delimiting the values of comment anchor tags.

    To fix:
    Read the rest of this entry »

    Share

    Posted in CMS, how-to, PHP, Programming, Software, Web | 2 Comments »

    Git: how to remove file and commit from history

    13th February 2009

    Once I accidentally added circa 300 MiB of archive files to one of my git repositories (which was as small as 5 MiB). I removed those files as soon as I noticed them, but the .git directory still preserved commits with those files, and still occupied over 300 MiB.

    I have found the solution at stackoverflow (see also this question).

    This method worked for me, but I couldn’t push my rebased repository to the gitosis. I would need to re-init the gitosis repository from my rebased, but I’m not yet prepared to do that.

    There is also a slightly different method (which relies on a temporary tag instead of a temporary branch), documented in Git online manual pages; I prefer the temporary branch method.

    Below is a full copy-paste of the winning answer by Charles Bailey:

    # create and check out a temporary branch at the location of the bad merge
    git checkout -b tmpfix

    # remove the incorrectly added file
    git rm somefile.orig

    # commit the amended merge
    git commit –amend

    # go back to the master branch
    git checkout master

    # replant the master branch onto the corrected merge
    git rebase tmpfix

    # delete the temporary branch
    git branch -d tmpfix

    Also, in my case this thread at stackoverflow was highly useful. I start enjoying the concise and compact style of Charles Bailey :) :
    Read the rest of this entry »

    Share

    Posted in how-to, Links, Programming | 2 Comments »

    ExpressionEngine contact form (email module) spam vulnerability

    26th January 2009

    Yesterday I had a look at mod.email.php – the Email module of ExpressionEngine CMS.

    It appears that it is very easy to use ExpressionEngine’s contact form (which uses Email module) to send emails to arbitrary addresses – simply put, send spam using someone’s EE.

    And here’s why:

    • recipients hidden field is passed to the client; it is encrypted, but with access to the mod.email.php code, it is a matter of several minutes to write your own email-encoding function which will produce a completely valid recipients field
    • there’s also XID field, which seems to be unique for each page load

    Spamming algorithm is clear, so I won’t elaborate. (I could have missed some session variables, though – didn’t check them.)

    This information is valid as of ExpressionEngine 1.6.6, but nothing in the change-logs indicates that this mechanism was modified in the newer versions of EE.

    Update: I’ve tested, and this vulnerability does exist. The simplest prevention measure is to enable Captcha for Contact Form.

    I’ve notified the developers.

    Share

    Posted in CMS, PHP, Programming, Software, Web | 1 Comment »

    Software development schedules

    22nd November 2008

    image from joelonsoftwareJoel Spolsky has an interesting (and useful) post on evidence-based scheduling, as he calls that approach. The post discusses an approach to estimate project volume and key dates (such as milestones and release) based on prior performance of each of the project developers. As Joel argues, this approach provides several benefits, and – among others – allows releasing the software product on the date planned.

    I would recommend learning more about “evidence-based scheduling” to anybody who is somehow involved into software development.

    Also, for me personally it was useful to read the preceding article by Joel (called painless software schedules), which summarizes some basic ideas you should keep in mind while trying to develop some piece of software (mostly from the manager’s viewpoint). If you are going to read that “obsolete” article – better do so before reading evidence-based scheduling.

    Share

    Posted in Notepad, Programming, Software | No Comments »

    GNAT GPL 2008 is now available

    12th June 2008

    We are pleased to announce the release of GNAT GPL 2008, the Ada Toolset for Academic users and FLOSS developers.

    It introduces hundreds of enhancements including:

    • Availability on the Windows .NET platform
    • Upgrade of the debugging engine
    • Improvement in robustness and efficiency for Ada 2005 features
    • Many new warnings & restrictions to help programmers detect errors earlier
    • Companion tools such as gprof, gcov, gnatcheck, gnatpp and gnatmetric are being enhanced to support a wider variety of needs, coding styles, and coding standards
    • Support for Pre/Post conditions

    GNAT GPL 2008 comes with version 4.2.1 of the GNAT Programming Studio IDE and GNATbench 2.1, the GNAT plug-in for Eclipse.

    It is available on the GNU Linux (32 and 64 bit), .NET, and Windows platforms.

    GNAT GPL 2008 can be downloaded from the “Download GNAT GPL Edition” section on https://libre.adacore.com/

    Share

    Posted in Ada, Programming | No Comments »

    Drupal theme development: where to start

    8th June 2008

    Simplest way to develop your custom Drupal theme is to start with some skeleton/wireframe theme.

    In this post, I’m briefly reviewing 4 themes (atck, blueprint, framework, and zen), made specifically to serve as theme developer’s starting point. All 4 are listed with their features (as per Drupal project page of each one), with my personal “impressions” (not based on actual use experience, yet). There’s also my choice and order of preference for the 4 candidates at the end.
    Read the rest of this entry »

    Share

    Posted in Drupal, Links, Notepad, Software, Web, XHTML/CSS | 8 Comments »