Posts

View Categories

  • Setting Vim colour schemes

    The default syntax highlighting scheme is so-so, especially when it comes to the dark blue comments against a black background.

    alt text

    Fortunately, we can easily install our own. I prefer a colour scheme called Monokai to the pre-installed set, and the steps to install it are the same as for any other schemes.

    Continue reading...

  • Supervised learning

    Supervised learning algorithms use an initial set of labelled data to "learn" a prediction model that can be applied to future data. Labelled data is divided into training and test samples, which are ideally independent and representative of the distribution of actual data, and the training phase must not be influenced by the test data in any way to avoid overfitting our model to our data.

    If there isn't enough labelled data for us to split it into training and test samples and still obtain satisfactory results, then cross-validation can be applied to evaluate our models while training on all our data. If we evaluate a small number of models using cross-evaluation and pick the one with the lowest error, we can produce a fairly accurate and unbiased prediction model.

    Supervised learning isn't a magic solution to every problem, and each algorithm makes some assumptions that must be true of your data for it to work well. However, it can be a powerful tool if you understand where and how to apply it.

    Continue reading...

  • Visualizing data in Matlab

    Data visualizations are a useful way to condense a large amount of information, and represent it in a format that is easy to read and interpret.

    Generating a few visualizations is often easy once you have the data, and can be a good way to explore a data set. You might stop once you find a useful format and put together a script or app to provide up-to-date views, or just gather enough context to decide what to look into further.

    In this post I’ll show how to generate line plots, box plots, histograms and scatter plots for a simple data set in Matlab. This data was sourced from Google Flu Trends (updated October 2014 model for United States 2013 data)*.

    Continue reading...

  • Functional programming ideas in object-oriented languages

    Over the last several years, many ideas from functional programming languages have been welcomed into the object-oriented world, and are no longer only found in languages like Ruby and Scala, but also in Java 8, C# 3.0, and other languages traditionally thought of as primarily object-oriented.

    Functional programming provides alternative and sometimes more natural ways to think about algorithms and how to approach problems.

    For example, functional programming languages introduce the idea of handling functions as first-class citizens. This means that functions can be passed as parameters, often generalized to accept a wide range of input types, and algorithms can be even more closely tied to behaviours rather than classes.

    Continue reading...

  • Developers must write tests

    Software developers must test their own code. There's no way around it, and especially no "but Quality Assurance does that for us."

    Continue reading...

  • Using JQuery to show or hide related elements

    Sometimes a web page needs to display a very condensed view of information, but also allow users to easily drill down for details. Summary tables often fit into this category when there are multiple layers of information to display.

    Ideally the user shouldn’t have to follow a chain of links to get to the information they care about, and if we can allow users to expand or hide detailed information without reloading the page, all the better.

    Javascript is perfect for this, as we can assign listeners to toggle the visibility of elements based on user interactions.

    I’ll show a simple example of how to do this using JQuery, a popular Javascript library.

    Continue reading...

  • Security Engineering, by Ross Anderson

    “Security Engineering: A Guide to Building Dependable Distributed Systems”, by Ross Anderson, is one of the most engaging technical books I’ve seen, and I’ve taken to reading it on my commute.

    It’s highly readable, unlike most textbooks, and provides an accessible view into the many areas of security. The author has made the full book freely available online, so I highly recommend checking it out.

    Continue reading...

  • Checking in on the "Let's Use Linux" experiment


    In March I started looking at how much of my work I could do on Linux, using Debian on a dual-boot machine alongside Windows 10.

    It’s gone fairly well, and something that speaks to that is that a little while ago I found that I couldn’t remember my Windows password. I really thought I had it on the fifth try, but that was just the loading screen taking a bit longer. I got it the sixth time.

    Continue reading...


subscribe via RSS