<-- Back to Andy Balaam Home

Publications by Andy Balaam

Making 100 million requests with Python aiohttp

Balaam, A.J. (2019). At London Python Meetup January 2019.

Description of the basic concepts behind asynchronous code in Python, motivated by the example of making 100 million HTTP requests in Python, all using a single thread of execution.

How to write a programming language Part 1 - the Lexer, How to write a programming language Part 2 - the Parser, How to write a programming language Part 3 - the Evaluator

Balaam, A.J. (2018). In F. Buontempo, editor, Overload 145, 146, 147 (2018)

Articles on the parts of a programming language, demonstrated by following the implementation of a tiny language called Cell.
The first article was awarded joint first place in Overload's "favourite articles of 2018" competition.

Testing: Choose the Right Level

Balaam, A.J. (2018). In F. Buontempo, editor, Overload 143 (2018)

An article attempting to describe some of the "magic" of how to write good tests, not just any tests. Covers some principles, especially the need to choose the right "level" for your tests, and then works through some example of situations where the tests really helped shape the code in good directions.

How to write a programming language

Balaam, A.J. (2017). At ACCU Conference 2017 (April 2017). (Slides)

A description of a tiny programming language called Cell (source code), which I used to explain the basic ideas needed to write a programming language interpreter. Cell looks a bit like JavaScript, behaves a bit like Lisp, and has some remarkable similarities to Python (the language in which it is implemented).

Don't design for performance until it's too late

Balaam, A.J. (2015). In F. Buontempo, editor, Overload 128 (August 2015), pages 12-13. (Original blog entry)

Sometimes people use the famous arguments against premature optimisation to avoid building performance into the design of our systems. I argue that performance must be considered early and often. I suggest some design principles for performant code and systems, and argue that using them will be an improvement, not a path to evil.

Mocks are Bad, Layers are Bad

Balaam, A.J. (2015). In F. Buontempo, editor, Overload 127 (June 2015), pages 8-11.

An attempt to persuade you to avoid mocks where possible, and that arranging your code in layers can lead to more mocking and greater coupling. Examines a number of techniques that can be used to avoid layers, and write code in smaller, composable pieces.

Everyone Hates build.xml

Balaam, A.J. (2014). In F. Buontempo, editor, Overload 123 (October 2014), pages 12-16. (Original blog entry 1, Original blog entry 2)

How to structure Ant XML for code re-use, and how to write tests for the functionality of your Ant build itself, not just your code. Introduces the macrodef Ant tag, which works a bit like a function in a grown-up programming language, and works through how to test that build artifacts are created as expected by different parts of the build. Discusses how genuine unit testing may be possible with Ant, but also the problems with this.

Talk in Code

Balaam, A.J. (2014). In S. Love, features editor, CVu volume 26, issue 4 (September 2014) (Link is for ACCU members only), page 15. (Original blog entry)

An argument that we should clarify communication by using code to speak: either a real programming language, or an ad-hoc language - possibly even on designed soley for the purposes of the conversation. (It's surprising how frequently such ad-hoc languages become real executable code, either as test specification or other domain-specific language.)

Does Test-Driven Development Harm Clarity?

Balaam, A.J. (2014). In F. Buontempo, editor, Overload 122 (August 2014), pages 4-5. (Original blog entry)

A response to David Heinemeier Hansson's RailsConf keynote asserting that test-driven development can harm code clarity. Examines our goals when writing software, the benefits and disadvantages of tests, and the benefits and disadvantages of driving the design from tests.

Footprint on Modify.

Balaam, A.J. (2012). In F. Buontempo, editor, Overload 112 (December 2012), pages 16-19. (HTML version)

A method of tracking changes in an object model (e.g. for an undo-redo system) that allows fast jumping between different points, arbitrary branching of history, and doesn't require a "language" of object changes. Instead, we keep a historical record of previous models, making a "footprint" when an object is modified, but keeping external code's object references valid.

Tail Call Optimisation in C++.

Balaam, A.J. (2012). In R. Parkin, editor, Overload 109 (June 2012), pages 10-13. (Pre-print pdf)

An implementation of a mechanism allowing arbitrary levels of recursion in functions in C++, avoiding stack overflow by using a "trampoline" function and returning a delegate from each function, which either provides the final answer, or says which function to call next. Written as an attempt to understand the mechanism known as the Tail Call Optimisation in languages such as Scheme.

Comparing scalable algorithms for walking all nodes of a dependency graph.

Balaam, A.J. (2010). In R. Parkin, editor, Overload 97 (June 2010), pages 4-10. (Pre-print pdf)

An analysis of the process of choosing an algorithm to walk all nodes of a graph that is scalable (keeping memory usage bounded) but which performs well. The crux of the problem is to handle nodes in batches. The main body of the paper describes the possible choices of how to find good batches to use.

Exploring developmental dynamics in evolved neural network controllers.

Balaam, A.J. (2006). PhD Thesis. School of Science and Technology, University of Sussex.

My DPhil thesis written at the Centre for Computational Neuroscience and Robotics at the University of Sussex. The research involved designing neural networks that exhibited "developmental" behaviour (i.e. structural change) that were used to control simulated robots performing tasks potentially of interest in exploring cognition.

Developmental Neural Networks for Agents.

Balaam, A.J. (2003). In Banzhaf, W., Christaller, T., Dittrich, P., Kim, J.T. and Ziegler, J., editors, Advances in Artificial Life, Proceedings of the 7th European Conference on Artificial Life (ECAL 2003), pages 154-163. Springer.

A talk summarising my progress in my DPhil work as it was in 2003.

nBrains: A New Type of Robot Brain.

Balaam, A.J. (2001). In J. Kelemen and P. Sosek, editors, Advances in Artificial Life : 6th European Conference, ECAL 2001 , Prague, Czech Republic, September 10-14, 2001, Proceedings, pages 491. Springer-Verlag Heidelberg.

A short paper completed during my MSc at the CCNR describing the use of a multi-dimensional "phase space" containing attractors as a dynamical control system for simulated robots.
Edit | History | Print | Recent Changes | Search | Admin Page last modified on August 24, 2023, at 06:45 AM