Andrew Rea

Andrew Rea


Stuff about programming, security and technical architecture

Twitter


Andrew Rea

Stuff about programming, security and technical architecture


Command Line Lexer Kata

During some coding on a side project I found the need to create a lexer for command line args which were in the initial form of a single string and not already separated out into an array i.e. the arguments array you get in an application main method. The reason why I have called this a command lin…

Andrew ReaAndrew Rea

Integrating C into GOLANG

Code for this post can be found here https://github.com/REAANDREW/coding-sessions In this post I want to show how you can integate C code directly with GOLANG. To start with I will create a simple program in GOLANG which will assert on the result of invoking a factorial function with several diffe…

Andrew ReaAndrew Rea

Why use Object.freeze

March 15 2015: An update to this post has been written: Why use Object.freeze and why not to use Object.freeze. I like JavaScript but I also like Encapsulation and Immutability. There is lots of information on the internet, in books, whitepapers etc... about the benefits of Encapsulation and Immutab…

Andrew ReaAndrew Rea

Encapsulation with JavaScript

All of the example make use of the Revealing Module Pattern and the Object.freeze method in JavaScript. All of the examples are using mocha and should libraries to implement the tests and the assertions. Whilst working on a recent project where I decided to use node.js, I wanted to achieve a much…

Andrew ReaAndrew Rea