Pages:  1 2 3 4 5
Playing with assembly
  Created - 2013/12/10 21:05:28+0000

I've been playing with assembly code recently. It isn't something I have looked at since my undergraduate degree. It's very slow going but fun in a perverse way. I had forgotten a lot. I'm using the NASM assembler for the x86_64 instruction set. They were not what I was using in my degree so some of the things are new and that makes it unclear what I have forgotten. Macros are new, at least for assembly. I've been putting together some obvious, generic macros for the syscalls. ... read more

Rated Executor
  Created - 2013/10/06 14:53:58+0000

A colleague was working on a demo that polled the Twitter API. He had to solve the problem where he needed to ensure that the poll did not exceed the rate limits imposed on polling. This problem can easily be generalised into a generic problem, accessing a resource at no greater than a fixed rate. I didn't know of a generalised solution to the problem so I decided to implement one. A rated executor. A rate limited executor or a rated executor is an executor that executes tasks no faster than a fixed... read more

Checkstyle in the IDE
  Created - 2013/09/29 15:06:28+0000

Shortly after I started using Maven I added the Maven Checkstyle plugin to my build to generate reports on the conformance of my code to my preferred coding style. Recently I added an Eclipse plugin to do the same. The effects of installing a Checkstyle plugin into an IDE are simple. It makes you far more likely to fix problems and causes you to check files more thoroughly. What do I mean by more likely to fix problems? I mean that I don't have to check something to see what Checkstyle says th... read more

User Agent Parsing
  Created - 2013/09/25 21:48:59+0000

For my Web Utilities project I have been parsing user agent strings. You can take a look at the results for your browser by going to my user agent parser . All the APIs I looked at were focused on parsing for the Browser, OS, Layout Engine and Device. They ignore many of the additional details. There are sites such as http://www.useragentstring.com/ but I didn't want to make requests to a web API to get the information. So I did it myself. It has been very slow, boring and unpleasant. Lots of dat... read more

Lots and lots of tests
  Created - 2013/09/23 21:58:32+0000

When I write code I don't use test driven development. I do write tests. Unit tests and integration tests and tests where I don't bother to make a distinction. I do write plenty of them. This gives be two things: Something to run my code The ability to refactor and know if I changed something I shouldn't have When I write code the first thing to run it are my tests. I don't worry about a test contract, I'm happy to rewrite the code and the test at this point. The tests just tell me w... read more