Articles in the programming category

  1. When Dynamic Typing Goes Wrong

    Yesterday I found out first-hand how using a dynamically typed language can get you into trouble in unexpected ways whilst writing unit tests for CSF (my PHP framework).

    Take a look at this code---what do you think it should do?

    $foo = 'bar';
    var_dump(isset($foo['xyz']));
    var_dump($foo['xyz']);
    

    Most ...

    Read more...
  2. Why .NET Won't Beat Java (Yet)

    It's been no real secret that the .NET CLR (Common Language Runtime) has been Microsoft's answer to Java. Garbage collection, bytecode compilation, large set of core libraries, it's all there. But there is a problem that I've encountered recently: distribution size and install base.

    A fairly ...

    Read more...
  3. VDB 0.1.0 (alpha) Released

    Recently I've been working on a program that will let me do a full-text search of my 1500-file digital video library. The result is something I've unimaginatively called "VDB", short for "Video Database".

    This release doesn't do much; you can add your library of video files, and ...

    Read more...
  4. C is not MATLAB

    Refactoring some code at work today, I came across a classic example of somebody attempting to use one language like another. The project in question is a port from MATLAB to C, and the purpose of the function is to see if a square matrix is symmetrical within a certain ...

    Read more...
  5. C linked list macro

    Here's a simple macro I came up with a few weeks ago for easily defining linked list types in C:

    #define LINKED_LIST(type, name)     \
        struct name ## _ {              \
            struct name ## _ * next;    \
            type data;                  \
        };                              \
        typedef struct name ## _ name;
    

    Usage is simple:

    LINKED_LIST(int, int_ll);
    

    gives the same type as ...

    Read more...

Page 1 / 1