Feeds:
Posts
Comments

Archive for March, 2014

The Worst Does Happen

The worst does happen, and it does not take a god to initiate it: White Blotches. I hope the Meyer family finds the strength to overcome this new crisis; a small medical “miracle” would be nice as well…

Read Full Post »

BMW takes care of the motorcycles it builds: it keeps a serious stock of the pieces for many of its models. Nevertheless, it’s quite surprising to see that it is possible to build a brand-new BMW R90S from stock pieces – after all, the R90S was first produced in 1973! I don’t suppose this is possible for any BMW bike, and it’s not a cheap exercise by any means… The end result, in this case, is a fine machine – I wouldn’t mind driving it for a weekend!

On the left: the pieces. On the right: the R90S in one piece!

On the left: the pieces. On the right: the R90S in one piece!

Bike EXIF tells the story, and the build is documented on the website of BMW MAX Motorsport. A fantastic build it is, considering the fact that they just missed a handful of original pieces (and the replacements all come from BMW as well).

Read Full Post »

Just read “‘If you step into Crimea I’ll break your camera’” (from the AFP Correspondent blog). And read “Turkey widens Internet censorship” (Hürriyet Daily News). Read “Turkey moves to block YouTube access after ‘audio leak’” (BBC News website). Or check the website of Reporters Without Borders, say on the subject of Syria. Then check out the discussion “Blogger vs Journalist” on Scripting.com. When journalists are being muzzled, let the bloggers report what is happening!

Read Full Post »

I am writing a bit of .NET/C# code to add a SHA1 hash to a PDF file. Since I’m not a .NET specialist, I am slowly making my way through the .NET API’s. And since the documentation is not always as clear or expliciet as I would like to see it, I’ll ask the question here: the two methods in the sample class below are functionally equal, but is the one using the ‘BufferedStream‘ the best way to make sure that a large file will not gobble up all memory when there are multiple hashings ongoing on a single server? Or is there an even better way?

using System;
using System.IO;
using System.Security.Cryptography;

public class Sha1Hashing
{
    public String getHash( string FilePath ) {
        HashAlgorithm sha = new SHA1CryptoServiceProvider();
        String hashAsBase64 = "";
        byte[] dataArray;

        if ( File.Exists( FilePath ) ) {
            dataArray = File.ReadAllBytes( FilePath );
            byte[] hashvalue = sha.ComputeHash( dataArray );
            hashAsBase64 = Convert.ToBase64String( hashvalue );
        }
        return hashAsBase64;
    }

    public String getBufferedHash( string FilePath ) {
        HashAlgorithm sha = new SHA1CryptoServiceProvider();
        String hashAsBase64 = "";

        FileInfo fi = new FileInfo( FilePath );
        if ( fi.Exists && ( fi.Length > 0 ) ) {
            FileStream FS = new FileStream( FilePath, FileMode.Open, FileAccess.Read );
            BufferedStream BS = new BufferedStream( FS );

            using ( BS ) {
                byte[] hashvalue;

                BS.Seek( 0, SeekOrigin.Begin );
                hashvalue = sha.ComputeHash( BS );
                hashAsBase64 = Convert.ToBase64String( hashvalue );
            }
        }
        return hashAsBase64;
    }
}

PS. You know how to add your own namespace, and you know how to create unit tests in Visual Studio, don’t you?

Read Full Post »

Dave is thinking aloud: “What would an open Secret look like?” – he’s referring to the Secret chat app, of course.

What is a web application if it does not have an API (an Application Programming Interface)? An API will allow developers or users to apply certain functionalities to their own data, and combine those data with functionality from another application, running e.g. on a PC or a mobile device. Without an API, you could not reuse things like the maps from Google. Without an API, a web application is just a website, closed and incapable of being integrated into the rapidly expanding universe of mobile apps!

Source: http://www.dssw.co.uk/blog/2011-02-11-how-to-run-an-applescript-when-switching-to-mains-power/

Source: DssW

Do you want to throw your data into a closed silo? Perhaps when those data are very private – but that raises other questions to ask the app owner. But take AppleScript, for example, or the *nix shells like ‘bash‘. They’re the glue that allows you to assemble data from different programs into something worthwhile for you – based on the fact that there is a more or less standard way to communicate with individual apps. AppleScript uses the verbs and nouns exposed by compliant apps; *nix shells have their own way of dealing with many applications and executables.

Shouldn’t all web applications expose a minimal but serious API, whether it’s based on ReST or just plain web services? The minimum should be a way to get your data in and out of the app, by the way!

Read Full Post »

Yes, yesterday March 16 was a great day for a ride on your motorcycle here in Belgium. Here’s a bit of proof.

Blue sky, blossoms on the trees, touring on your motorcycle: spring is in the air!

Blue sky, blossoms on the trees, touring on your motorcycle: spring is in the air!

Read Full Post »

Bitcoin and its ilk have been very visible the last few months. And that means many people are looking for answers to rather fundamental questions, like these: is virtual money different from “real” money? Is it safe to use? Should you have some to pay with on the Internet? What’s so “crypto” about cryptocurrency? Etc.

(Source of the image: The Great Northern Prepper)

If you are like me – a developer interested in virtual currencies – then you will like what Ars Technica did. In order to illustrate the concept they have created their own *coin, and they tell you all about it in these articles:

Followup articles will be there as well. All in all, a nice educational effort by the Ars Technica editors. And spare me the wisecracks about the name of their coin, please.

Read Full Post »

Older Posts »