Posts

,

Trace Logging with React

Long ago, when I was a Delphi (Pascal) programmer, I encountered a neat language feature called properties, which are awesome for debugging (and more well known now, as they are in C#). Property Area : Longint read fArea; Property Left : Longint Index 0 read GetCoord write SetCoord; Properties are accessed with the same syntax […]

Functional Programming Patterns in Four Popular Javascript Libraries

I generally find discussions of design patterns a bit dry, but in testing new Javascript libraries, I’ve stumbled across some interesting tactics. Object oriented design patterns are typical not a perfect fit to Javascript, given it’s untyped nature. The language lends itself more to powerful functional programming techniques. I find studying libraries particularly helpful, as […]

Scala zipAll Example

The zip function combines two lists into tuples. If the lists are of differing lengths, the shorter length is used. If you don’t like this behavior, the zipAll function will keep all elements, filling in specified values for the blanks (compare this to the recycling rule in R, which lets you continuously cycle through the […]

Scala Tree Sort Example

This demonstrates basic language features – case classes, iteration, anonymous functions, etc. abstract class Node case class LeafNode(data: String) extends Node; case class FullNode(data: String, left: Node, right: Node) extends Node case class LeftNode(data: String, left: Node) extends Node case class RightNode(data: String, right: Node) extends Node   object test extends App { val words […]

, ,

Philly ETE – Database as a Value

This was the first time I’ve seen Rich Hickey’s talk on Datomic, which lent great clarity to the product. As implemented, Datomic functions as an immutable database for philosophical reasons, although in practice it doesn’t manage it’s own storage, and may eventually support deletions to satisfy legal and compliance issues around privacy. This database technology […]

Philly ETE – Metor.js Talk Summary

I went to a talk at Philly ETE on Meteor, a Javascript-based webapp development platform. The talk was given by Avital Oliver, one of the core meteor developers, on “smart packages,” which is what meteor calls extensions to their core product. While in it’s infancy, the framework appears to be built around rapid development iteration […]

Grep.js

Inspired by a client project with thousands of lines of poorly structured, badly written ExtJS code, I wrote a grep implementation to recursively search the contents of Javascript variables, available on github. This provides a single function “grep”, which can be used directly or added to the global namespace. It recursively searches objects – keys, […]

,

Unit testing in R

Commentary R is a statistical programming language, with a strong focus on mathematical operations. When writing code that is math-heavy, unit testing becomes very appealing- while equations may look correct on paper, one minor error can ruin the output. R programming is also different to CRUD or enterprise software in that the R in-memory data […]

, ,

Building a statistical significance testing web service powered by R

R is a programming language focused on solving statistical and mathematical calculations. R programs often operate on large, in-memory data sets, which feels somewhat similar to database programming. Examples in the R Cookbook bear a resemblence to functional programming in clojure, as others have noted. I’ve been exploring the language to gain insight into related, […]