Film review - Star Wars: Episode VIII - The Last Jedi

Wed 20 December 2017

I had the "pleasure" of watching the latest installment of the Star Wars Saga - The Last Jedi - over the weekend. After reading through some of the glowing reviews online by professional critics, I was really looking forward to it. Taking the reviews at face value I was anticipating a real tour de force of action, adventure, twists, surprises, revelations, emotion, and of course, epic space battles. I only experienced the epic space battles and that was about it.

(Warning: Spoiler below!)

I was bored throughout the film and left the the theatre in a confused daze. It was a poor film by both Star Wars and general standards. Being a bit of a lore buff, I was particularly looking forward to getting to know much more about what happened in the aftermath of the Rebel Victory as was seen in The Return of Jedi, the origins of the First Order and how they came to amass their immense power, the background and motivations of Snoke, how Kylo Ren was turned, Rey's parentage etc.

I didn't get any of that. The Director's intent throughout seemed to be more of a gratuitous "out with the old, in with the new", mirroring Kylo Ren's weird obsession with destroying the old order and creating a new one. Continuity and plot development doesn't matter. I found this disappointing, irritating and even a bit offensive.

It would be one thing to break with the Canon of the original trilogy and the "prequels" - I can somewhat understand that. But there was no attempt to sincerely carry forward the story and answer some of the questions raised in the previous film, The Force Awakens. Instead all we got were a lot of nice special effects, space battles and some nice fight scenes. As if that would be enough to distract us from questions we wanted answered from the previous film and the glaring plot holes, absurdities and inexplicable behaviour of the characters that pervades this one.

Luke's behaviour, for example, was completely bizarre and completely in contrast to the brazen determination and unrelenting optimism he exhibited throughout the original trilogy. The "reasons" given for this radical change in character (namely, his supposed failure in keeping his nephew on the straight and narrow) doesn't really make much sense. This is a guy who refused to give up on his father despite the latter's genocidal crimes.

In terms of the general structure and editing, the film was a long mess. Large sections of the film seemed to comprise of a bunch of cut scenes carelessly put together without much thought for flow and coherence. This was not helped by the multiple nonsensical threads of the film arising from the inexplicable behaviour of some of the main characters. For example the Casino Planet segment was boring, cheesy and totally unnecessary given that the whole charade could have been avoided if Holdo had simply told Dameron that her plan was to evacuate to the salt flat planet all along. The film was also too long given how boredom inducing it was and I was honestly waiting to leave the theatre.

Were there some positive or redeeming areas? Sure, like any film, but not enough to salvage the film as a whole. The fight scenes, special effects and space battles were impressive as can be expected from such a huge franchise. The cast was also diverse and talented, and there was some brilliant acting, particularly from Hamill, who deserves an Oscar for making the most of the poor writing. We also got to see Yoda again so that's definitely a positive.

I don't have much hopes for the Star Wars IX really. This film will inevitably be a huge box office success and that's what really matters to the people at Disney. They have no reason not to produce more of the same. And that's a real shame.

If I had to give this film a score, I'd give it a 5/10.

Warning: Docker does not play well with UFW

Sat 09 December 2017

So I was experimenting with docker a few weeks ago on my VPS (running Debian 9). In particular I was trying to create a memory limited container for running go-ipfs that would function well in the low memory environment (the VPS only has 1GB RAM). As mentioned previously, go-ipfs is quite RAM greedy. Enough to swallow all available memory and send my server into a slow swapping hell for a good few hours until the kernel OOM killer sprang into action.

I ran something like the following to create/start the container:

:::sh
$ docker run -p4001:4001 -p5001:5001 -p8080:8080 -m 256M --name ipfs-node \
    --restart always my_ipfs_image

which opens and forwards ports 4001, 5001 and 8080 from the host into the container. Technically, only port 4001 (tcp) is supposed to be exposed to the outside world according to the IPFS docs (5001 is the API port and is most definitely not supposed to be accessible from the internets and 8080 is the IPFS gateway).

I wasn't the least bit concerned about running the above command since I had UFW set to deny all incoming connections by default (with exceptions for SSH and some other services I ran). For those not familiar with UFW, it's a simple front-end for iptables (a utility to configure the Linux firewall). It has served me well for almost 10 years.

Little did I know that docker is designed to sidestep tools like UFW and directly make changes to iptables to perform port forwarding and NAT. And worse still UFW was completely oblivious to these changes. By sheer luck I ran an nmap scan on my VPS from home and realized what was happening. Googling "UFW docker" showed that this was a known issue.

I initially just gave up on the container route to handle the go-ipfs memory problems and created a script to restart its daemon every 12 hours. But I came across a simple solution to the problem yesterday via this excellent blog post.

In short, to get docker to work with UFW, the steps are (as root):

:::sh
$ echo "{
\"iptables\": false
}" > /etc/docker/daemon.json
$ sed -i -e 's/DEFAULT_FORWARD_POLICY="DROP"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw
$ systemctl reboot # reboot your machine 
$ iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE

And now you can use docker with UFW in peace!

Publishing this site on IPFS

Sun 08 October 2017

There has been a lot of buzz online recently about IPFS. In particular, I read this fascinating piece on Hacker News about how cyber-activists had leveraged IPFS to get around Spain's federal legal block on all Independence referendum activities.

I've always been interested by p2p networks so this immediately grabbed me. I downloaded and started playing around with it. I am very impressed. This technology could radically change the web as we know it, making it much more decentralised, resilient and fault tolerant.

I decided to go ahead and publish my site on IPFS and it has been a relatively painless process. Most of the changes I had to make to the site were down to how I had handled relative links previously. The docs on the official website are excellent and there are plenty of other resources and tutorials on the net for anybody interested in getting started.

The only caution I would issue is that this technology is still in its infancy so I wouldn't rely on it for anything critical yet. There are definitely some rough edges that need to be resolved. For example. I've discovered that DNS resolution can often be painfully slow and this is something the developers are aware of. Go-ipfs, the main implementation of IPFS (written in Go) also has high memory requirements and appears to suffer from memory leaks. I've had to write a script to restart the daemon regularly on a server with 2GB RAM because of this. This is something which will have to be addressed if IPFS is to have any success on embedded or IOT devices.

My site can be found on IPFS at /ipns/nakhan.net.

Book review - Accelerando by Charles Stross

Wed 29 March 2017

I have decided to try writing short reviews here for books I am currently reading. I'll do my best to not include any spoilers.

So, the book I have just finished is Accelerando by Charles Stross. This is another of those titles that has long remained untouched on my reading list and I am glad to have finally scratched it off.

It is initially set in the first years of the 21st century in the immediate run-up to the technological singularity and proceeds to follow over time the mavericks of the uber intelligent, technologically adept and influential Macx family as they steer humanity's trajectory through this tumultouos and disruptive period.

Themes and topics explored in the book include "mind uploading", sentient animal/human AIs and their rights, distributed intelligences, the industrialisation of the solar system and beyond, viable centrally AI-planned economies, increasing cybernetic convergence, alien signals and ultra-intelligences and our attempts at contact, the psychological/social/economic/religious costs of exponential technological progress and much more.

Stross' prose is sometimes dense but always fashionable, full of information-packed metaphors of science/tech jargon. This from what I gather is one of Stross' signature strengths as a writer. Character development was well done given in my opinion given the surrounding chaos. Stross expertly conveyed the sense of being there on the cusp of the singularity and his exploration of the post-singularity world was well handled and enjoyable.

This is one of the best fictional explorations of the concept of the singularity and, while it can feel like a bit of a slog in certain parts, overall it is an intellectually rewarding, thought provoking and enjoyable read.

Learning Javascript in 2016

Tue 18 October 2016

I just came across this hilarious/outrageous piece on modern front end development! Dear Lord, what have these guys done!?!