ACCU World of Code
-
Vim as editor for Claws Mail
I got sick of not having Vim as my text editor for emails in Claws Mail but GVim makes my eyes bleed so I wanted proper Vim-in-a-terminal as my editor, which was not particularly straightforward. The proper incantation was to make a script in my PATH c…
-
Using GitHub and GitLab
Taking all the Git understanding we’ve developed through the series on Git and applying it to how to work on and contribute to projects on GitHub and similar systems like GitLab:
-
Writing: Bug hunting (part 1)
The latest C Vu magazine has hit respectable doormats the world over. It contains my latest column, entitled “Bug Hunting”. You’ll never guess what it’s about.
-
Writing: Bug hunting (part 1)
The latest C Vu magazine has hit respectable doormats the world over. It contains my latest column, entitled “Bug Hunting”. You’ll never guess what it’s about.
-
Speaking: Juce Summit
I’m giving a “guest talk” at the Juce Summit on the 19th November. Juce is a great C++ framework that’s particularly well suited to audio application development. I’ll be giving a specially crafted version of one of my favourite talks – this time call…
-
Speaking: Juce Summit
I’m giving a “guest talk” at the Juce Summit on the 19th November. Juce is a great C++ framework that’s particularly well suited to audio application development. I’ll be giving a specially crafted version of one of my favourite talks – this time call…
-
Avoiding postfix error “status=deferred (unable to look up host”
My emails wouldn’t send when I was working from home, giving me this message in /var/log/mail.log: Nov 11 12:38:16 machinename postfix/smtp[20672]: CF5D6D41CE2: to=, relay=none, delay=14416, delays=14416/0.01/0.07/0, dsn=4.3.5, status=deferred (Host or…
-
Things I learnt from Swift Summit
I attended the first Swift Summit on 21st of March; there were two days but I only went to the first. Here are some of the facts I learned: Int is not a fundamental type as you would think of it in most languages. Instead it’s a struct that der…
-
Things I learnt from Swift Summit
I attended the first Swift Summit on 21st of March; there were two days but I only went to the first. Here are some of the facts I learned: Int is not a fundamental type as you would think of it in most languages. Instead it’s a struct that der…
-
Speaking: XP Days Ukraine, 2015
I’m giving an opening presentation at XP Days Ukraine in October. The talk is called Becoming a Better Programmer. Find out more about this conference here. Looks like it will be really interesting.
-
Speaking: XP Days Ukraine, 2015
I’m giving an opening presentation at XP Days Ukraine in October. The talk is called Becoming a Better Programmer. Find out more about this conference here. Looks like it will be really interesting.
-
Finding the download count of GitHub releases
You can use the GitHub API to find out how many times the files in your releases have been downloaded. For example, to find out how many downloads there have been of my Rabbit Escape project you can do: curl -s https://api.github.com/repos/andybalaam/r…
-
Software Process Dynamics
At the Software Architect 2015 conference in London I presented “What if? Supporting decisions with software dynamics simulations”. [1] This talk introduces the idea of performing numerical simulations of software development teams and the products they build. The value in such simulations is to inform policy decisions and guide deliberate …
-
Software Process Dynamics
At the Software Architect 2015 conference in London I presented “What if? Supporting decisions with software dynamics simulations”. [1] This talk introduces the idea of performing numerical simulations of software development teams and the products they build. The value in such simulations is to inform policy decisions and guide deliberate …
-
Android: using a TextView to show rich text in an AlertDialog
If you want to display a link or basic formatting in an AlertDialog on Android, you can do it by providing HTML. The key parts you need are Html.fromHtml and TextView.setMovementMethod. Make sure you pass the dialog’s context in to the constructor of t…
-
Assassination of individuals by the state
I wrote to my MP (via writetothem.com) about the British government assassinating people they suspected of planning terrorist attacks. He replied saying that the government believes the action was legal, proportional and necessary. Part of this justifi…
-
Event-Sourced Domain Models in Python at PyCon UK
At PyCon UK 2015 I led a very well attended workshop with the goal of introducing Python developers to the tried-and-tested techniques and patterns of Domain Driven Design (DDD), in particular when used as part of an event-sourced architecture.
The two-and-a-half hour workshop was comprised of excerpts from our training …
-
Event-Sourced Domain Models in Python at PyCon UK
At PyCon UK 2015 I led a very well attended workshop with the goal of introducing Python developers to the tried-and-tested techniques and patterns of Domain Driven Design (DDD), in particular when used as part of an event-sourced architecture.
The two-and-a-half hour workshop was comprised of excerpts from our training …
-
A slight enhancement on Developing tvOS Apps with Swift
Apple announced tvOS yesterday. Downloading Xcode 7.1 Beta comes with the SDK and simulator for tvOS apps. The official documentation starts to run through how to create a basic app but is doesn’t mention where to place and load the JS from and the sam…
-
A slight enhancement on Developing tvOS Apps with Swift
Apple announced tvOS yesterday. Downloading Xcode 7.1 Beta comes with the SDK and simulator for tvOS apps. The official documentation starts to run through how to create a basic app but is doesn’t mention where to place and load the JS from and the sam…
-
Difficult merges in Git – don’t panic!
A video in which I try to explain what merging and rebasing really are, to help you understand what is going on when Git presents you with scary-looking conflict messages. I also explain why you shouldn’t panic because it’s hard to lose your work, and …
-
ZX Spectrum BASIC Web Server
Finally, you can write your web sites in ZX Spectrum BASIC, using my new project, ZX Spectrum BASIC CGI server . How it works Here’s what happens when a request comes in: Apache HTTPD receives the request, and runs the CGI script that does the magic. …
-
Letter to my MP on UK government assassination of British Citizens in Syria
Below is a copy of the letter I sent to my MP this morning (via writetothem.com). Feel free to re-use and adapt it if you want to send a similar letter. Update: follow-up letter. Dear Philip Hammond, I was extremely concerned to hear of the assassinati…
-
Rabbit Escape out now on Android!
Watch the video: Buy the game on the Play Store.
-
Writing: More magazine columns
I’ve been remiss at posting news of my recent magazine columns. C Vu issue 27.2 carried a column entitled Wallowing in Filth, about how to deal with messy code. C Vu 27.3’s column was called Coding Dinosaurs, and discussed how to avoid become an&nb…
-
Writing: More magazine columns
I’ve been remiss at posting news of my recent magazine columns. C Vu issue 27.2 carried a column entitled Wallowing in Filth, about how to deal with messy code. C Vu 27.3’s column was called Coding Dinosaurs, and discussed how to avoid become an&nb…
-
Changing the Docker daemon options in systemd on Ubuntu 15.04
Update: now documenting the better way, as described in issue 14513. Update 2: I think this way is even better (works in Ubuntu 16.04, Docker 1.12.2, Reference: dockerd command line):sudo -s -H echo ‘{“insecure-registries”:[“myreg.example.com:5000”]}’ …
-
Docker fails to start on Ubuntu 15.04
I installed Docker on Ubuntu 15.04 using: wget -qO- https://get.docker.com/ | sh as described at Install Docker on Ubuntu. I added myself to the docker group: sudo usermod -aG docker balaaman Then I logged out and logged in again, and ran: docker run h…
-
Preventing Audacity from crashing when using PulseAudio
I found that Audacity would crash whenever the Playback Device in the Devices section of Preferences was set to “pulse” or “default”. This can be fixed by launching Audacity like this: Exec=env PULSE_LATENCY_MSEC=100 audacity I fixed it “permanently” b…
-
Movie podcast “The Good Robot Andys”
My friend and I have launched a new podcast in which we discuss movies: The Good Robot Andys. Enjoy.
-
Speaking: CodeConf 2015
I’ll be giving the closing keynote at GitHub’s CodeConf 2015 in Nashville this month. Find out more from the conference’s website here: http://codeconf.com. The talk is called Becoming a Better Programmer.
-
Speaking: CodeConf 2015
I’ll be giving the closing keynote at GitHub’s CodeConf 2015 in Nashville this month. Find out more from the conference’s website here: http://codeconf.com. The talk is called Becoming a Better Programmer.
-
Interview: Fog Creek (Going Beyond Code to Become A Better Programmer)
I recently did a short interview with the guys at Fog Creek on the subject Becoming a Better Programmer. You can view it here. It’s a heroic editing effort! Between unreliable network connections and probably a 40 minute conversion they’ve heroically …
-
Interview: Fog Creek (Going Beyond Code to Become A Better Programmer)
I recently did a short interview with the guys at Fog Creek on the subject Becoming a Better Programmer. You can view it here. It’s a heroic editing effort! Between unreliable network connections and probably a 40 minute conversion they’ve heroically …
-
Code for detecting when you leave an Android app
Further to Detecting whether an Android app is stopping (or starting), I implemented code to decide when you are leaving or entering my game Rabbit Escape. The relevant class is called Lifecycle2SoundEvents. (Yes, it’s a terrible name. Yes, I spent a l…
-
Release news: Hungry Bunny & KeyChainItemCRUDKit
Not a technical post today, just a bit of news on the things I’ve been working on.
Firstly, my latest SpriteKit game written in Swift is now available on the App Store. It’s called Hungry Bunny and is effectively an endless runner/skill test. It’s free with ads.
Secondly, now that Hungry Bunny is complete I’ve returned to working on another project. This is nowhere near complete but I got to the point where I needed to securely store an OAuth2 token on iOS. I came across the Keychain API. However, the API for this was long winded and I only wanted to use it in a simple manner. Therefore I created a Swift framework to provide CRUD access to it along with a higher level interface where any type conforming to NSCoding and be saved, loaded & deleted.
This is available on github and also as my first ever CocoaPod. All the docs are in the README plus there’s an example iOS program (Single View App) and the Unit Tests.
-
Release news: Hungry Bunny & KeyChainItemCRUDKit
Not a technical post today, just a bit of news on the things I’ve been working on.
Firstly, my latest SpriteKit game written in Swift is now available on the App Store. It’s called Hungry Bunny and is effectively an endless runner/skill test. It’s free with ads.
Secondly, now that Hungry Bunny is complete I’ve returned to working on another project. This is nowhere near complete but I got to the point where I needed to securely store an OAuth2 token on iOS. I came across the Keychain API. However, the API for this was long winded and I only wanted to use it in a simple manner. Therefore I created a Swift framework to provide CRUD access to it along with a higher level interface where any type conforming to NSCoding and be saved, loaded & deleted.
This is available on github and also as my first ever CocoaPod. All the docs are in the README plus there’s an example iOS program (Single View App) and the Unit Tests.
-
Mocks are Bad, Layers are Bad
In which I argue that mocks are a code smell, and layers lead to increased coupling: Mocks are Bad, Layers are Bad (in ACCU’s Overload Journal issue 127) I also suggest some ways to avoid both mocks and layers, including Classical TDD, Selfish Object, …
-
Prediction result: corporate Linux
Ten years ago I predicted that 30% of corporate desktops would be Linux or similar open source desktops. It’s very hard to find any accurate (or even confident) numbers, but it seems clear I was wrong. This month, NetMarketShare puts Linux usage at 1.2…
-
Detecting whether an Android app is stopping (or starting)
I am writing an Android app (called Rabbit Escape), and I want it to start playing music when the user enters the app, and stop when the user leaves. Not as easy as it sounds because Android largely doesn’t think in apps, but Activities. Update: real-l…
-
Order of Android Activity lifecycle events
I noticed some variation between devices so I tested various user actions on various devices and recorded the Android Activity lifecycle methods (e.g. onResume, onPause, onCreate, onStop) that got called. My results are below. [Why? I want to detect wh…
-
Snake in Dart
Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. This time, Dart, which is for people who love Java and wish they didn’t have to do JavaScript. Sli…
-
Preventing Kupfer switching to existing windows
I am enjoying using Kupfer but I don’t like the way it switches to an existing window of an application, instead of launching a new instance. I should write a patch for a config option or similar, but for now, here are my notes on how I disabled the be…
-
Using Kupfer on MATE
I am trying out MATE desktop and really liking it. I like to use a (GNOME-Do style) keyboard-driven application launcher, and have found Kupfer really good. Kupfer as packaged for Ubuntu MATE does not support MATE desktop, so the file manager (“Caja”) …
-
Tweetable Art Code
Picking apart some cool code to draw pretty pictures with code that fits into 3 tweets: This comes from a codegolf question here: Tweetable Mathematical Art. Slides: Tweetable Art Code.
-
Drawing into bitmaps and saving as a PNG in Swift on OS X
Not an in depth post today. For a small iOS Swift/SpriteKit game I’m writing for fun I wanted a very basic grass sprite that could be scrolled; to create a parallax effect. This amounts to a 800×400 bitmap which contains sequential isosceles triangles …
-
Drawing into bitmaps and saving as a PNG in Swift on OS X
Not an in depth post today. For a small iOS Swift/SpriteKit game I’m writing for fun I wanted a very basic grass sprite that could be scrolled; to create a parallax effect. This amounts to a 800×400 bitmap which contains sequential isosceles triangles …
-
Rabbit Escape 0.3.1 – now with zoom!
I’ve just release the latest version of Rabbit Escape, which makes things look a lot nicer because you can zoom in, getting you much closer to your rabbits: There are still 60 levels of Lemmings and Pingus -like gameplay, all downloadable for free art…
-
Treat warnings as errors in a (Gnu) Makefile
I got hit again last night by a bug in my Makefile that meant I effectively ran rm -rf /*, which was not fun. Today I have been looking for how to make Make stop if a variable is undefined. Here’s my solution. This Makefile contains a bug (“SRCS” inste…
-
Switching Xfce to use metacity
I am trying out Xfce and liking it. However, I’ve never found a window manager better than Metacity, so I’d like to use it. Here’s how I switched: # Install it sudo apt-get install metacity metacity-themes # Tell it how many workspaces I want gsetting…
-
Java game programming: image rendering hints make no difference to rendering time
I am writing an Open Source/Free Software Java desktop game (Rabbit Escape) and am experimenting with allowing you to zoom in so that the images being rendered are fairly big, and I’m seeing some slow-down. [Note: Rabbit Escape is also available on And…
-
Speaking: ACCU 2015
I’m pleased to announce that I’ll be delivering the opening keynote at the awesome ACCU 2015 developer conference in Bristol this April. The talk is called “Becoming a Better Programmer” (it’s no coincidence that this is the same title as my new book&n…
-
Speaking: ACCU 2015
I’m pleased to announce that I’ll be delivering the opening keynote at the awesome ACCU 2015 developer conference in Bristol this April. The talk is called “Becoming a Better Programmer” (it’s no coincidence that this is the same title as my new book&n…
-
Videos: MPC Sneak Peeks
In my day job I am the software lead for Akai’s MPC product line. This is a product I’m immensely proud of, and I’m very proud of the the work the software team puts into this iconic music controller. Over the last few months we’ve been producing in…
-
Videos: MPC Sneak Peeks
In my day job I am the software lead for Akai’s MPC product line. This is a product I’m immensely proud of, and I’m very proud of the the work the software team puts into this iconic music controller. Over the last few months we’ve been producing in…
-
Event Processing with Transducers
In the previous article in this series on transducers we looked at lazily evaluating transducers. This time we’ll look not at pulling output through a transducer chain from downstream, but at pushing input items into the chain from upstream.
All of the uses of transducers we’ve demonstrated in Python so …
-
Event Processing with Transducers
In the previous article in this series on transducers we looked at lazily evaluating transducers. This time we’ll look not at pulling output through a transducer chain from downstream, but at pushing input items into the chain from upstream.
All of the uses of transducers we’ve demonstrated in Python so …
-
Snake in ZX Spectrum BASIC
Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. This time, the first language I ever learned: Slides: Snake in ZX Spectrum BASIC If you want to, y…
-
fetchmail complaining about GoDaddy SSL certificate
Update: I don’t think this fixed the problem I was getting this every time I ran fetchmail. fetchmail: Server certificate verification error: unable to get local issuer certificate fetchmail: Broken certification chain at: /C=US/ST=Arizona/L=Scottsdale…
-
Writing: Coders Causing Conflict
My latest Becoming a Better Programmer column is published in the March issue of C Vu magazine (27.1). It’s called Coders Causing Conflict and investigates how “conflict” can be a driving force for good in software develop…
-
Writing: Coders Causing Conflict
My latest Becoming a Better Programmer column is published in the March issue of C Vu magazine (27.1). It’s called Coders Causing Conflict and investigates how “conflict” can be a driving force for good in software develop…
-
Encapsulation as passing on responsibility
I recently dealt with some code that I felt was not properly encapsulated, but in a sense that I’ve not seen articulated in this way before. Please enlighten me if I missed it. Here’s a snippet: OutputThing manipulate( InputThing input ) { Processi…
-
Snake in Ruby
Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. Slides: Snake in Ruby If you want to, you can Support me on Patreon.
-
Batch-converting audio files to be louder (on Linux)
My mp3 player is very quiet, so I wanted to make all my podcasts as loud as possible. First I ran this to get the programs I needed: sudo apt-get install libav-tools normalize-audio To convert each file I made a script that makes a “loud” directory, a…
-
Why Rabbit Escape is Open Source / Free Software
Why I wanted to make Rabbit Escape Free Software, even though I also plan to sell it. Because I want to share it.
-
When a Swift immutable collection isn’t or is at least immutable-ish
Take the following code: struct Foo { var value: Int } let foo = [Foo(value: 1), Foo(value: 2)] By using ‘let foo’ an immutable array has been created. As such no members of this array can be replaced and nor can an element’s …
-
When a Swift immutable collection isn’t or is at least immutable-ish
Take the following code: struct Foo { var value: Int } let foo = [Foo(value: 1), Foo(value: 2)] By using ‘let foo’ an immutable array has been created. As such no members of this array can be replaced and nor can an element’s …
-
What is a good company?
I’ve been trying to work out what I think would be a good company to work for. Here’s what I’ve got so far. Please comment pointing out what I got wrong and missed out. Be coo We believe a company should be a good place to work. We sum that up in one r…
-
Visual Studio 2013, PC-lint and C++ 11 Variadic Templates
Although we added support for Visual Studio 2013 some time ago, PC-lint has lagged behind somewhat and even now (well over a year after it was released) has difficulty analysing any projects for it which use the Standard Template Library (STL) to any s…
-
Visual Studio 2013, PC-lint and C++ 11 Variadic Templates
Although we added support for Visual Studio 2013 some time ago, PC-lint has lagged behind somewhat and even now (well over a year after it was released) has difficulty analysing any projects for it which use the Standard Template Library (STL) to any s…
-
Book review: Swift Essentials
Disclaimer I was asked to review: Swift Essentials by Alex Blewitt from Packt Publishing (I’d previously reviewed another book of theirs for the ACCU) and ideally publicise the review. In return I was given a free copy of the eBook and offe…
-
Book review: Swift Essentials
Disclaimer I was asked to review: Swift Essentials by Alex Blewitt from Packt Publishing (I’d previously reviewed another book of theirs for the ACCU) and ideally publicise the review. In return I was given a free copy of the eBook and offe…
-
How to make your own levels for Rabbit Escape
A little video showing you how to make levels for my new game Rabbit Escape. There are more instructions on the Creating levels for Rabbit Escape page.
-
Rabbit Escape v0.1 out now for Linux, Windows and Mac video
A little video to announce my new game, Rabbit Escape. Download it, play it, enjoy it, and let me know how I can improve it!
-
Rabbit Escape (a bit like Lemmings) v0.1 released for Linux, Windows and Mac
Today I am releasing the first version of my new game, Rabbit Escape. It’s an arcade puzzle game inspired by Lemmings and Pingus, but intended to be simpler and easier to control on a mobile device. Your task is to guide a party of rabbits from the ent…
-
Snake in Groovy
Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m starting a series where I write the game Snake in lots of programming languages. I almost always use writing Snake as my way in to understand a new language, so I’ll share my thoughts about each l…
-
Programmatic equivalents of web.xml sections for Tomcat
Most documentation for J2EE configuration is based on having a web.xml file, but I want to configure my Tomcat programmatically. Here are some of the things I have found out. Please use the comments below to correct what I got wrong, and mention equiva…
-
Optional chaining with dictionaries (in Swift)
Whilst learning Swift and SpriteKit I came across an issue with the documentation for SKNode.userData. In an early XCode beta it was specified as an implicitly unwrapped optional whereas now it is clearly an optional. Therefore the code I origina…
-
Optional chaining with dictionaries (in Swift)
Whilst learning Swift and SpriteKit I came across an issue with the documentation for SKNode.userData. In an early XCode beta it was specified as an implicitly unwrapped optional whereas now it is clearly an optional. Therefore the code I origina…
-
Lazy Transducer Evaluation
In the previous article in this series on transducers we looked at transducers which push more items downstream through the reducer chain than they receive from upstream. We promised that this would make lazy evaluation of transducer chains quite interesting.
When used with our transduce() function, our mapping and filtering …
-
Lazy Transducer Evaluation
In the previous article in this series on transducers we looked at transducers which push more items downstream through the reducer chain than they receive from upstream. We promised that this would make lazy evaluation of transducer chains quite interesting.
When used with our transduce() function, our mapping and filtering …
-
Item Injecting Transducers
In the previous article in our series on understanding transducers through Python we showed how to support early termination of a reduction operation. This time, we’ll demonstrate how transducers can produce more items than they consume. Although this may seem obvious, it leads to some important consequences for implementing lazy …
-
Item Injecting Transducers
In the previous article in our series on understanding transducers through Python we showed how to support early termination of a reduction operation. This time, we’ll demonstrate how transducers can produce more items than they consume. Although this may seem obvious, it leads to some important consequences for implementing lazy …
-
Terminating Transducers
In the previous article in this series on transducers, we showed how to implement stateful transducers, and how to deal with any left-over state or other clean-up operations when the reduction operation is complete. Sometimes, however, there is no need to process a whole series of items in order to …
-
Terminating Transducers
In the previous article in this series on transducers, we showed how to implement stateful transducers, and how to deal with any left-over state or other clean-up operations when the reduction operation is complete. Sometimes, however, there is no need to process a whole series of items in order to …
-
Stateful Transducers
In the previous article in this series on transducers we saw how we can develop the notion of the transducer from a single function which literally transforms reducers to a more capable protocol which supports two further capabilities: First of all, the association of initial ‘seed’ values with a reduction …
-
Stateful Transducers
In the previous article in this series on transducers we saw how we can develop the notion of the transducer from a single function which literally transforms reducers to a more capable protocol which supports two further capabilities: First of all, the association of initial ‘seed’ values with a reduction …
-
Enriching the Transducer Protocol
In the previous article in the series we looked at improving the experience of composing transducers together in Python, by introducing a compose() function. We finished by showing this snippet, which composes a filtering transducer with a mapping transducer to produce a prime-squaring transducer. Recalling that transducers are used to …
-
Enriching the Transducer Protocol
In the previous article in the series we looked at improving the experience of composing transducers together in Python, by introducing a compose() function. We finished by showing this snippet, which composes a filtering transducer with a mapping transducer to produce a prime-squaring transducer. Recalling that transducers are used to …
-
Improving Transducer Composition
In the previous article in this series we derived a Python implementation of transducers from first principles. We finished by showing how transducers can be composed together using regular function call application to give us a single composite reducer which can perform many operations with a single pass of reduce …
-
Improving Transducer Composition
In the previous article in this series we derived a Python implementation of transducers from first principles. We finished by showing how transducers can be composed together using regular function call application to give us a single composite reducer which can perform many operations with a single pass of reduce …
-
Deriving Transducers from First Principles
What is a transducer?
Transducers – a portmanteau of ‘transform reducers’ – are a new functional programming concept introduced into the Clojure programming language. Although transducers are actually pretty straightforward in retrospect, wrapping your brain around them, especially if you’re not already a competent Clojureist, can be challenging. In this series …
-
Understanding Transducers through Python
In this series we take an in-depth look at transducers. Transducers – a portmanteau of “transform reducers” – are a new functional programming concept introduced into the Clojure programming language. Although transducers are actually pretty straightforward in retrospect, wrapping your brain around them, especially if you’re not already a competent Clojureist, can …
-
Deriving Transducers from First Principles
What is a transducer?
Transducers – a portmanteau of ‘transform reducers’ – are a new functional programming concept introduced into the Clojure programming language. Although transducers are actually pretty straightforward in retrospect, wrapping your brain around them, especially if you’re not already a competent Clojureist, can be challenging. In this series …
-
Understanding Transducers through Python
In this series we take an in-depth look at transducers. Transducers – a portmanteau of “transform reducers” – are a new functional programming concept introduced into the Clojure programming language. Although transducers are actually pretty straightforward in retrospect, wrapping your brain around them, especially if you’re not already a competent Clojureist, can …
-
JAX-RS (using Apache CXF) in embedded Tomcat example
I had serious trouble today firing up an embedded Tomcat server that serves up REST resources using JAX-RS via Apache CXF. Here’s minimal example, hopefully saving you the same trouble: src/HelloJaxRs.java: import org.apache.catalina.startup.Tomcat; im…
-
Vim persistent buffer list combined with saved sessions
I like to use several saved Vim sessions to remember what files I was working on in a particular project. I also like to have a list of buffers I have open on the left-hand side of the screen that is always visible and up-to-date. Sometimes, the existe…
-
Snowflake Christmas card web page on the Raspberry Pi
In this video I will show you how to make an electronic Christmas card for your friends or family using HTML and JavaScript, which means it will be a little web site that anyone can see by going to it in their Internet browser. I’m doing this on the Ra…
-
Snowflake Christmas card in Scratch on the Raspberry Pi
In this video I will show you how to make an electronic Christmas card for your friends or family using Scratch. Scratch can work on most computers – you can download it from http://scratch.mit.edu/. Scratch is already installed on your Raspberry Pi if…
-
Encoding URLs in Java
To encode a URL in Java, create a new instance of java.net.URI and then call toString() or toASCIIString() on it. DO NOT use java.net.URLEncoder. It is for HTML form encoding, not encoding URLs, despite its name. Each part of a URL must be escaped diff…