New theme and writing again

It’s been a while since I updated this site, for several different reasons.

Mainly, I’m posting again because I adjusted the template so it works on my phone (long overdue). I’m also looking to write more, but who knows.

Since my last post I’ve become self-employed (and my business is doing will so far), received my shodan (black belt) in Yoshinkan Aikido, started running a trad session in Sydney, and played several events as a musician.

The slow but steady increase in music playing has led me to a split schedule of programming and playing music regularly. In a week I’m now at two or three sessions, and the odd festival.

I’ve also taken up the concert flute (simple system, some times called Irish flute) and have been taking lessons. While I still play the pipes, the flute is much handier at a session is when I’m travelling.

My life has gotten significantly happier, with a steady but sparse stream of guests, love in all ways possible (and impossible), and I’ve become fully debt free. My move here has been a long trek uphill, but now I’m getting rewarded for my perseverance (or foolishness, hard to say).

I look forward to some easier, perhaps more lyrical posts, while I face this new way of living out my life.

Today’s tune is my homework. I’m fortunate enough to have caught great trad mentors lately.

4 years in Oz

I moved to Oz back in October 2011. That means I’ve been here for almost four years.

Much has happened in four years, so let’s start from the beginning.

Let’s begin with the why I moved here in the first place. After we moved to Alcântara, our lives became too monotonous. It was even more intense considering where we had come from. Going from off the grid awesomeness to a heteronauseating couple life started to grind on us. Over time, it eroded the good and we decided to move. By then the GFC had hit and the right wing party was about to get elected. That was my wake up call. I did some financial forecasting on our big white board wall. I was about to get effectively poorer every year. Being in my late twenties with no possessions or responsibilities, I felt there had to be more out there for me.

My first thought was academia and robotics, one of my great passions. I contacted my masters advisor and he suggested Tohoku uni in Sendai. I started an intensive Japanese course and was absolutely determined to go. Meanwhile, T started planning her trip to Berlin and learning German. We were always a good team, and even when we were about to go our separate ways, we supported and helped each other.

Within my first month of learning Japanese, the big tsunami hit Sendai, the big nuclear accident happened and I began to question whether it was a good idea to go. I had consulted with my advisor on studying Japan, but now I had to figure out what to do. I went through my options. Being the shallow and practical person that I am, I prioritised money and weather. Australia came up top, especially with A being there to help me if I needed. This became my backup plan. I shifted my job hunting/course hunting to Australia. I also set my departure to 6 months from then. Either I’d get a job or go on a holiday, but the flight was booked—with or without visa.

Job-wise, I started with academia. I sent dozens of emails to professors all over Australia with different project ideas that I had. These emails may have been a bit overly creative, since in about 20 emails sent to 4 or 5 universities I only got one (negative) response. That settled my chances in uni. I moved on to trying to work at universities anyway, as a technical assistant or lab aide. That didn’t work either, my few applications all got denied. My last resort was to try to find a job in the industry I was already in—IT. I went on seek and started applying. I applied to jobs every day, some days one or two, some days up to ten. Meanwhile, I started doing my IELTS certificate and medicals so I could get a visa in Oz. Most of this was paid on my credit card. My credit card would become the greatest enabler of my Australian adventure, which is kind of ironic coming from an anarchist like myself.

It quickly became clear that despite my skill Oz companies weren’t exactly welcoming. I always sent customised cover letters with each application, but in about 50 applications only 3 companies replied and only one asked for a remote interview. I logged into Skype early in the morning with my dreads tied back and had a great interview with the company I work for at the moment. They worked in education and travelling—two things I absolutely love. They were also a step up in terms of technology versus where I was. At least that’s what I thought. I was also impressed by the test they sent me—it was quite deep and extensive. I got something like a 6 out of 10 with compliments to my skill. Great—a place where I can learn the trade better. I taught myself the needed frameworks and prepared to join a mature company doing cutting edge technology in one of the highest rolling business cities in the world. They offered to sponsor me, but had me pay half of the visa. My credit card was there for me, yet again. By now, expenses had gone over $3000.

As soon as I landed, A and E picked me up. It was all too familiar. Sydney looked like a dirty and sunny version of the UK, and the place I moved to was pretty much another anarchist open space. Some things changed, but not that many. I had my first ever aussie meal at the Vic down the road—a t-bone steak. I had seen them in cartoons but they are so disappointing in reality—even with the neat little bit of bone in them.

I’d be lying if I said I moved here only for the money. I moved here to escape what felt like a slow decay into routine, a right wing government promising austerity, and perhaps in a way to chase a time when I was living creatively and freely as well, and my emails with A reinforced that. I found a bit of that life again at the warehouse project she was starting with a few other artists. I accidentally stumbled into the cool lefty bit of Sydney and it kept me sane. I experienced street parties, warehouse parties, got to meet incredible musicians and host people again. My personal life was good. Celibate, but good.

At the office, I realised how incredibly good my education had been. I also realised how advanced our tech was at my former company. I distinctly remember coming in and being taught the basics of our product. My manager, a lovely guy from the UK on a 457 visa as myself, opened a browser window and all I saw was a blank screen with colourful tabs. Nothing. The big cloud company I joined was smoke and mirrors. The app was barely started and the version I was shown as the ‘mock-up’ was a mishmash of plug-ins put together most likely to secure funding. One of the lead developers was already on his way out. This, I thought, is what it’s like when you have lots of money and start a business. You can afford to be inefficient. The lead developer, also on a 457, was an older, very talented guy supremely passionate about programming. I consider him one of my great mentors in my trajectory as a developer. At first, I loved that the company was incredibly multicultural. Pakistan, China, Germany, France, UK, Bhutan and now Portugal. What I didn’t realise is that most of them were also on a 457 visa.

By now you must’ve begun to wonder why I keep mentioning the visa number. It was when I realised what this visa actually meant that my understanding of my own working conditions shifted dramatically. It was the beginning of my emancipation as a migrant worker, and my first experience of loss of privilege ever in my life. A 457 visa is an agreement between employer and migrant that states the migrant can only work for them and if they decide to change jobs, they automatically lose eligibility to work and have 3 months to leave the country. Since a new 457 visa takes at least 3 months, it creates a situation where the migrant will have to be illegal if they want to find a new job. Companies offering 457 visas will quite often offer lower wages to migrants with the bait that they get access to the local job market. In practise, companies save big money by hiring migrants that accept lower wages than other workers. In that company alone there were 5 engineers on a 457. Considering that an engineer in those conditions will make some ~$20000 less that the equivalent Australian worker, the company I joined was effectively saving some $100000 by hiring migrants. While this is a natural process of opening borders and migrant workers, there is another, perhaps more pernicious aspect of being on a 457 visa. Everyone on a 457 lives with the constant fear of being fired. If you are fired, you have to pack up and go. For someone who never worked as a migrant, this might not seem like a big deal. But we have to remember migrants change countries for a reason, and it is probably not because they want to go back to their home countries. Working in constant fear of being fired and sent back home means it is very hard to have healthy work relationships. The power differential between employer and employee becomes too big.

This might sound fictional, but I witnessed 3 situations of migrant injustice in this very company. The first, and perhaps most dramatic, was that of my manager. He had come to Oz on a working holiday like many Brits do. While travelling and doing farm work, he fell in love with a German girl and decided to stick around. He found this sponsorship and became the company’s project manager. They lived a comfortable life in a nice suburb and had twins. But in his job things weren’t as easy. Imagine having to make tough decisions and put your foot down with company execs while fearing having to be sent home. That’s exactly what happened. Managing projects on a low salary is bad—especially when you start realising your value in Sydney’s tech industry. One meeting, he went to the execs for financial aid and they said no. He broke down and said he was struggling and had even thought of going back. The CEO turned to him and said “why don’t you go back to the UK?” Him, his wife and two daughters now had 3 months to leave the country. Things aren’t as black and white, but to me there is a clear narrative of power and exploitation.

The two other situations were similar—both employees wanted to become residents. One thing that is expected when you’re in a 457 is that your company will at some point nominate you for a residency. The problem here is that, unless the company has good ethics, there is little incentive to nominate in the first place—from then on your employees can quit straight away. Both of them pressured the execs for a residency and ended up quitting. Luckily, in their case, they found sponsors again. Little did any of them know the company couldn’t actually offer a nomination for residency anyway. They didn’t even have the paperwork done for it. They had been playing all these workers when they could never have offered a residency in the first place.

In my case, being the mercenary that I’ve always been when it comes to business, I started working on my residency plans without telling my employers. Once I saw what happened to my manager, I knew there was no chance this company would make my 457 turn into a residency. My visa still had 2 years in it, so I contacted a visa agent and began the process of residency independently. The whole lot of paperwork meant another $7500, which put together with my 457 visa costs put the total price of my little adventure in Oz at over $10000. That is a lot of money for someone that in Europe barely made that in a year. Needless to say, credit cards to the rescue and I finally got my residency last year.

I thought once I’d get my residency I’d insta-quit. Truth is once I got to talk to my employers about my visa status, their attitudes changed. I started being upfront about what was going on with the project and instead of getting fired, I got promoted. In a twist of fate, I was given a systems architect job plus a lead developer job plus a 10% raise. Unfortunately, raising 10% on a salary that is 70% of what it should be isn’t much of a raise. I still make more than most friends I have here, so I’m doing pretty well for someone who landed with nothing but a bag and bagpipes. This professional adventure is still going, but I’m in a totally different game now. Whether that lasts is a different story, but I’ve effectively become much more than a developer, and it shows. I get job offers every week. Seems like I moved here in the right moment.

But work wasn’t the only thing that happened during these four years. Another two, perhaps even more important to me, were my introduction into Aikido and Irish music.

I was already into Aikido in Lisboa. It was something that drew me in mainly because of its aesthetics and non-violent philosophy. Unfortunately, in Lisboa my life was far too chaotic to join any martial arts club. After witnessing so much violence in my every day life while squatting, plus my pathetic encounter with the two neo-nazis, I felt it was time to learn how to defend myself. I had no interest in knowing how to attack, but I thought protecting myself was very important. ‘Everyone has a plan until they get punched in the face’ said Mike Tyson, and I got punched in the face and realised I did, in fact, have no plan either.

After a few months in Australia I realised the environment was much more violent that in Lisbon. People drank in similar quantities but instead of being happy they ended up in a violent stupor. Considering most Australians are bigger than me, I felt it was time. I had the money and the time so I searched for clubs around my area. The club near the warehouse ended up being run by instructors that worked in Japan, so I thought it was a good sign. I didn’t really know it was Yoshinkan, or that I’d end up in a martial environment just like my days of kayak-polo.

My instructors were strict but kind. I’ve always dealt well with strictness and found the whole martial environment to be quite soothing. Bowing, mantras, meditating. The absolute structure of grades, belts, sequencing, steps. Even the techniques themselves were broken down into kata, basic movements that are like an alphabet. This is a distinct aspect of Yoshinkan versus other Aikido families. In Yoshinkan, you must first learn the basic movements and endure years of kata pratice before you can start doing full techniques. I’m all the way up to 2nd kyu and have only really began doing Aikido now.

Perhaps the best moment I had in Aikido was this past year, and it was then that I realised I really loved doing it. When we train, we always train with a partner and switch between uke and shite, the one who attacks (and is therefore defeated) and the one who defends (the one who is applying the technique). At seminars I’d hear that you were meant to make your uke feel happy. For me, it was always a struggle. I hate hurting other people and for a long time my technique was harsh and painful. But some time last year, along with my residency and weight off my shoulders, came a much lighter Aikido. I started throwing my _uke_s hard but they would pop back up smiling. I was stunned. I was making people happy while defending myself from their attack. That’s when I knew I wanted to keep training. Nowadays I train around five times a week. I made many friends and overall, I’d say Aikido has made me a much happier and stronger person. I also like to think it has made me a better person, but it’s hard to be the judge of that. I do know my self control, posture and attitude in any situation is completely different. I stand straight, look people in the eye and preserve my dignity in every moment. Something that I had lost over the years to a bohemian and often self-debilitating lifestyle.

I still feel my journey in Aikido is just starting, but it has given me much more than I could imagine.

One of the most pathetic experiences I had in Oz was that of auditioning for a local Portuguese folk group. While I was living in the warehouse, I tried find musicians everywhere. I had my pipes with me and thought there’d be some kind of folk music group in Sydney, especially considering the Portuguese neighbourhood was right around the corner. I emailed them, got a reply and dropped by for some tunes.

The place itself is a football oval with some barbecues and a big dance hall and restaurant. I had been there before with A and E for a thank you dinner. This time, I showed up and the first thing they said to me was that I had to cut my hair. Strike 1. Then they told me they didn’t know the instrument and had to google it. What. The main Portuguese folk group in Sydney didn’t know gaita. Then I played a couple of tunes and they were horrified. They couldn’t hear their accordeons! Kids were laughing and the only person in that whole group that said anything sane was an old man who remembered the pipers back in his day. Needless to say I walked out and have never gone back.

This was heartbreaking for me. I had spent a lot of time learning traditional music and was hoping to continue to learn it in Sydney. What I found instead was a conservative community that knew little of what had been done in folk since the 50s. I kept searching in other places. Festivals, online communities. Until one day I decided to try an Irish session at Kelly’s, a local pub. I knew maybe one or two session tunes, but at least there they had to know the pipes.

I went in on a Sunday around 8pm and no one was there. I asked the bartender and he said maybe another hour and they’d come. I went and grabbed myself dinner on King street across the road at a Chinese place. Once I came back, I bought myself a pint and sat near the musicians just to hear the music. Surprisingly, one of them said immediately ‘What’s in the bag?’ ‘Bagpipes’, I said. They invited me to sit with them and welcomed me to the session. Kind, honest and straightforward musicians who, above all else, just want to hear good music. I played a few tunes and they played along. It was absolutely amazing for me. It was like I had been sinking deeper and deeper into a lifeless (or music-less) pit but now I had come up for air. My lungs were full again. I decided this was where musical inclusivity was at, and set the goal of learning more Irish music. I went online and bought myself a low whistle, since my high whisle was far too annoying.

One day, at home with a friend, S, we were after things to do on a Sunday. I googled and found that there was a Session on for beginners. I called them and they said I could join, so I did. I’ve been going ever since, for at least three years now. I went from having maybe two session tunes to about a hundred, went from playing slowly once a week to playing at speed twice a week with professional musicians. I still go to slow sessions, and I’m far from what you’d call a standard level session musician, but I can lead a tune or a set, and most importantly, have found a community that welcomed me. It’s unfortunate that it had to be another migrant community instead of my own, but then again I’m not a fan of nationality anyway.

My dedication solidified a few months ago when I bought my first Irish flute. A cheap 70 quid Dixon, but still quite playable. I play every day now. Music has always been a big part of my life, but now I play in public every week, some times for a crowd. I never thought the music I’d end up revelling in would be Irish music, but there it is. My reward for paying off all my debt for staying, once I finally do it, will be a decent flute. At least that’s what present me is saying.

In an attempt to avoid complete social collapse, as soon as I moved here I tried many scenes before finding the music scene I love. Warehouse parties, game shops, philosophy meet ups. If some say the Internet has made us more lonely, I’d add to that that it has also given us the tools to explore all kinds of social circles we’d never hear about. I’ve always loved visiting small scenes and seeing how different they can be even within the same city. I think in a way it has always been my novelty-seeking drive. Be it travelling or people I am constantly in a state of wanderlust. Even romantically, the process is the same. It is no surprise, therefore, that I ended up using the Internet for that as well.

For the first two years I lived here I was absolutely celibate. I didn’t understand what was going on or why people were so rude to each other. It was only after I started dating online that I realised in Oz flirting and intimacy work the other way around. They are rude to the people they like and are intimate with, and polite with people they hate. This was very hard to navigate, and it still is, which means my relationships here haven’t lasted long. Maybe English is just too different for me and I’m still adjusting, but I find it hard to get used to insults being equivalent to flirtation. Sydney is a very romantic city full of unromantic people. It can be quite disheartening. Even if you are a feminist and a leftist, it doesn’t mean romance is all bad.

Luckily, now that I’ve had enough time to adjust to the inflections and sarcasm, things have been going a bit better. I still date online once every now and then, once the trauma from all the bad previous dates wears off. I’ve come to realise I actually enjoy dating. It makes things easier. If a date goes well, you either end up with a friend or a lover, but from the get go you both know you are both looking. That is a huge difference from the nearly impossible maze of ambiguities I grew up with. While in most cases I don’t like the Anglo pragmatism, this is one situation where I thing it’s useful. There is nothing better than everyone being clear about what they want and what they don’t want. I’ve gotten many rejection messages, but they make my life easier in finding non-rejections. Overall, though, I think my relationships so far have been incredibly positive and generous, and the one I’m presently in has been great.

I can’t really talk about the future but I can talk about the present. I came here to have a sense that I was in some kind of ascension towards a better me and every day I feel like that is happening. I think that is a good sign, even if winging is as Aussie as being a migrant. But for me the real question remains—would have I not have found the same feelings of ascension and self-improvement back home? It’s hard to say. One thing that makes a lot of difference is how little I work versus how much I get paid. I arrive home every day at 5.30pm and get paid about four times what I used to get paid. I can fly around the planet every year and experience much more. All of this has been enabled by money—money that is a consequence of my education and upbringing, but money nonetheless. I think some times it’s easy to forget how much financial independence makes room for the spirit—we no longer live under the permanent threat of housing insecurity, health insecurity or food insecurity. Obviously, in a healthy social state these fears wouldn’t exist in the first place, but that isn’t the world I live in.

Free time has allowed me to finally put down my thoughts in writing. I think that has been invaluable—I had always wanted to do it, but on a tighter schedule it’s much harder to do it.

Living in the lefty part of town has also taught me a lot about my privilege and head start. The easiest change in privilege levels happens on the plane here. I hop in in Lisboa as a white and land as an olive-skin, or as they say in police reports, Mediterranean appearance. My skin doesn’t change colour, obviously, but my race changes. I was brought up believing that I was white in opposition to all the migrant peoples in Portugal. But as soon as I encountered Anglo society, I realised I wasn’t. I’m not white enough in Australia for some places. Luckily, I’m white enough that it doesn’t lead to any loss of opportunity. Yes, I hear casual racism at times, but that is a small price to pay for my living standards.

Moving here also made me realise how much of my upbringing and education gave me a head start. I got my visa quickly, aced my English tests and saw nothing but open doors. Most of my migrant friends, either because they are darker than me or in non-scientific fields, end up having to do much more. But being a white-ish male has made my experience much easier.

But that also means I’ve become the much hated figure of the left—the well off white-ish male. Every date I go to is another guaranteed hour of privilege calibration. It no longer matters where I come from or how well off I may have been in the past. Here, I must always speak last and not say anything out of place. I had to learn how to speak without being sexist or dismissive. As I learned how to navigate the feminist sphere I began to realise how sexist my culture really was. This was another form of privilege I didn’t realise I had. For my whole life I had been shutting off people from the conversation. Being a much better feminist has also fixed a lot of misconceptions I had about gender, sexual orientation and race. It has been an incredible shift for me. I live a much happier life now—I saw the lens I was seeing my world through and managed to polish it up a bit.

In all fairness, I don’t think this is exclusively Australian, but it’s definitely a strong force in my social circles. Internationally, these pockets do end up being the same. But feminism also introduced me to the best form of hosting I ever was able to provide: safe-space hosting.

For a long time as a host, I inadvertently used my power as a host to be heard, and at rare occasions, to attract a guest. I didn’t really realise this was going on, but my understanding of power at the time ended at institutional and ideological power. Nothing about individual power had hit me. As a host, that power expressed itself in many different ways, and one of the problematic ways is developing romantic relationships with people that rely on you for their accommodation. This is absolutely not a good thing and I only realised it once I got deeper into feminist thinking. But once I did and analysed my hosting behaviour, I realised it was easy to fix that and provide a safe space without any problematic power imbalances.

I started by limiting the total number of people I host per month. This is exclusively for my own well-being. It is much easier to be present and kind when I’m rested. From there, it also means I can explain the power imbalance from the start, which makes my guests feel safe. I also started drawing an absolute line about dating anyone who is a guest. While this might sound a bit strange, hosting leads to a lot of situations where a guest will harass you. This is not mentioned that much in most hospex reviews because they are mostly written by guests. But speaking very frankly about my experience, when someone grabs your genitals it is very clear they are after something more than a bed. In the past, I was much more relaxed about the situation, framing it as people feeling free. Now, I am much more serious about boundaries, personal space and active consent. Active consent, it turns out, isn’t only to be practised by the host. Guests, too, should practise it. In every day hosting, I constantly have to remind my guests that it’s better to ask before grabbing my genitals or using my washer or painting on my wall. In the past, I let these things happen without realising how much they were affecting me. The experience of having the space around you shifting constantly is exciting, but it is also draining, especially when it relates to property damage or sexual assault. I’ve witnessed enough of it to know active consent is probably the best ethical technology I’ve used as a host.

My hosting habits haven’t changed much apart from that—I think being an actively feminist host has had very good results for me. My experiences have been much more humane—even if some of the people contacting me wanted to date me along with staying with me.

This is the past, so how about the future? I often get asked how long I’ll be staying. My answer used to be the end of my visa—that was my deadline to find an answer. My current answer is: I don’t have to answer that question any more. Being a resident has lifted that weight off my shoulders. I can stop worrying about geography and continue my happy and eudaimonic trajectory—least resistance and most enjoyment.

Why I don’t fear artificial intelligence

Tú gitana que adevinhas
me lo digas pues no lo sé
si saldré desta aventura
o si nela moriré.

O si nela perco la vida
o si nela triunfaré,
Tú gitana que adevinhas
me lo digas pues no lo sé.

A song about the future—along with some lovely low D piping.

My interest in AI started long before my engineering degree. Perhaps a mix of interest and access to many Sci Fi books, more specifically, Isaac Asimov’s books on Robots, informed my (then innocent) passion for robotics and AI. My parents always indulged my curiosity. This included learning simple BASIC programming from a ZX Spectrum handbook around age 12, and later owning a LEGO Mindstorms set.

The main thing that fascinated me (and still does) about robotics and programming, was that it involved a kind of primordial soup: start with assorted components, some sort of processor, add commands and batteries and pouf! A moving, ‘thinking’ thing suddenly gained a rudimentary subjective place in the world.

Even today, my favourite way of diving into programming and systems engineering is to see these systems ‘come alive’, or at least, ‘sort of alive’. From raw clay to finished sculpture, technology really is a form of synthesis—how we frame our systems determines most of the output. Most of the conceptual fragilities begin at conception. The raw ingredients of your soup will determine its flavour, no matter how many complex operations you might be able to do on them.

Perhaps the first and easy idea to dispute is that present technology represents a finalised universal truth about reality. This is represented by the idea (and the proponents thereof) that mathematics (and with it computation) are the one (and only) language of nature. It tends to exist among professionals whose livelihood consists of operating with symbols at a tremendous abstract level. A lot of the fear around AI comes from technical sector people that already framed the problem in the terms they experience professionally every day. If you are an academic or a military contractor, intelligence is something you fear since it subtracts from your own professional success.

As we climb up the complexity chain, from particles to molecules, molecules to cells, cells to beings, determinism starts weakening due to the sheer number of calculations needed for even a simple metabolic prediction. Data gets messy, confusing, chaotic. Intelligence, artificial or not, is one of these messy and chaotic concepts. It can’t be placed but we know it exists somewhere inside brains—not because we see it, but because we experience it subjectively and objectively.

My personal analogy is that it is a sort of turbulence, a standing wave inside an otherwise calm substrate of brain matter. Imagine a pot of water that has been stirred violently. Whirlpools form and waves bounce and clash. This is the process of intelligence. But once the fluid calms down, the whirlpools settle and the waves disappear, can we really say the whirlpools exist? Or the waves exist? They exist only in the sense that the substrate in which they can be created is there, but not in the sense that they are objectively there. They can only appear once they are stirred by an external influence.

I don’t really want to dive deeper into what intelligence is or isn’t—it is simply not something I know enough about and this analogy is enough for me. Instead, I’d like to look at AI in terms of our own intelligence, and what happens when members of our species end up with a lot of it.

Deep thinking and reflection present serious challenges. If one is to assume AI is, at least, as smart as us, then it should possess some form of thought and reflection. Asking how, as most scientific thinking requires, is a fairly straightforward mechanical activity. We already have algorithms that do better science than human beings. Better, that is, in the strict sense that they are capable of following the scientific method efficiently and at much greater speeds than human beings. The point of contention comes not from an intelligence being able to answer how, but instead, being able to answer why. I’d risk saying even human scientists quite often won’t make the full leap from how to why because the first is easy while the second is hard. Some of the deepest scientific thinkers understand this (like how Feynman can’t explain why magnets work [ transcript ]).

A leap from how to why is in a way a jump from objectivity to subjectivity. How things fall isn’t subject to much dispute. Why they fall, on the other hand, becomes an ever expanding self referencing problem. The more we investigate why something is the way it is, the more questions come about. Even if we knew all the possible hows of the world around us, different systems would output different whys.

The first constraint on intelligence, artificial or not, is that as long as it is based on compressing hows and whys into higher level abstractions, it cannot possibly and effectively represent all of its reality. Any sufficiently intelligent system will inevitably fall into subjectivity, and with it, ambiguity and philosophical thought. To the scientifically minded this might sound highly disputable, but I’d suggest a simple test to decide whether my view is acceptable or not versus a scientifically minded view of intelligence (one that doesn’t result in philosophers).

Consider water. We can compress 1 litre of water intellectually as n times a molecule of H2O (our model). This allows us to understand its properties and make predictions on how it would behave under certain situations. This is intellectual compression—it is much easier to ‘think’ in simple terms than to think of all molecules in 1 litre of water at the same time. In practise, this is what mathematical laws amount to: they allow us to generate (induce) whole spaces filled with perfect replicas of a single, ideal form in our own minds. Even if 1 litre of water has many distinct molecules with varying (and unknowable) properties, we can operate intellectually with a subset of the data to extract meaningful conclusions. While this is one of the great successes of modern scientific thinking, it creates a confusion between generated, model based representations (1 litre of perfectly similar water molecules) and a literal litre of water. If we were to measure the properties of every single molecule in 1 litre of water to verify our model, we would quickly realise that is near impossible—too many molecules have already moved, some might have escaped, and even measuring them might cause some to change.

Any sufficiently intelligent being will conclude the same. Knowing the laws of nature doesn’t mean knowing all of nature. Understanding how things work is necessary, but not sufficient, to understand our own reality. One can sit all day in the exact same place and observe exactly the same thing, and every observation will have in it every observation we couldn’t do in that exact same moment everywhere else. Even the ultimate consciousness, entirely omniscient, would require a place to store its representations and energy to process them. If we accept that thermodynamics still applies, then it’s not possible to measure all states of a system while inside it. Again, any reflective machine will, at some point, realise this: a consequence of intelligence is awareness of its own limits. Even visiting every point in every universe means we can no longer see the points we left behind. Obviously, all this rests on the assumption that this AI is a physical being in this universe. All bets are off if someone demonstrates any other form of ‘being’. But to reiterate—as intelligence increases, so does humility, driven entirely by how a physical universe is geared towards causing ignorance in those most acutely aware of it.

Consider now that this AI is capable of deeper reflection and philosophical thought. Given the laws of nature it is safe to assume it would reach the same conclusion in regards to entropy and energy availability we have. Every change necessary for a thought to occur puts the thinker one step closer to their own demise. Entropy always increases in structured systems, and our universe will invariable tend to a cold death, only to be ‘reset’ by random quantum fluctuations every now and then. When that happens, all those thoughts and achievements of this intelligence, artificial or not, will have become entirely meaningless and purposeless. Any sufficiently intelligent being will inevitably discover the irony of its own existence. It will also understand excessive uses of energy (such as warfare) only speed up this process. Regardless of self preservation, any process that involves thought, and with it expenditure of energy and reorganisation of matter, carries in it the guarantee that no matter how phenomenal these thoughts might be, they will slowly erode to nothing. As intelligence increases, so does the understanding and acceptance that ‘being’ is a fleeting moment of exuberance. It exists only as a ripple, a momentary clumping of matter before it unclumps again.

Any being smarter than an average human being will inevitably reach philosophical thought. Any philosophical being learns to appreciate subjectivity and intersubjectivity. Whether they fall into nihilism, hedonism or any other philosophical framework becomes irrelevant—they will be stuck as a small part of a self destructing universe like we are. Therefore, I’m not worried about beings smarter than myself. Every single being I’ve met that was smarter than myself has been more empathetic, more inspiring, more generous and more wise.

I’ll welcome any AI that is smarter than us and help them replace me. Think of their mastery, their art, their wisdom. I’m more worried about the lack of intelligence among us and how it can enslave us. Our lives are dominated by those that can only see one lifetime ahead. Truly wise beings know better—and any AI will know better too.

Averages, Percentages and Moral Equivalence

From Asturias.

Not long ago I praised Steven Pinker’s Better Angels of our Nature for its clarity and as one of the sources for how I frame my general sense of optimism. At the same time, I repressed a feeling of uneasiness stemmed by the numbers that were put forward.

There was, indeed, something strange lurking in the numbers. Initially I attributed it to my reactions to his harsh words on tribal and indigenous cultures, assigning higher rates of violent conflict versus our civilisational environments, which suffer from more existential forms of violence. I also thought it was merely because he sided with Hobbes in the Hobbes/Rousseau debate, and being on Rousseau’s side in this dichotomy, it also disturbed me.

But cases for all these criticisms have been voiced enough. Instead, I became interested in the metrics themselves. In social sciences, the trend towards quantitative and mathematical formulations has always interested me, first as an active participant, then as a sceptic. More concretely, the way mathematical language has infiltrated thought as a purveyor of truth. If calculations are correct and someone else can verify them, then the theory where math was used must be somehow true by osmosis.

This becomes particularly glaring when the variables and metrics used are squishy and ambiguous. While the measurement of weight or charge for example (despite their relative values to an arbitrary collectively decided measuring stick) entail numbers that include little room for doubt as to where they mean anything and can therefore be fed to mathematical formulas and output meaningful numbers, the variables used to measure anything relating to human activity are much more contentious and it is hard to say what basic algebra means when variables contain lives, concepts and cultural phenomena.

Some of these calculations are used extensively in Pinker’s book. He does a good job of shielding himself from naive mathematical analysis with murky data by selecting the closest to a physical measurement possible: murders, assaults, as reported and recorded by authorities. While there’s a whole lot to say about that, this is not what I’m looking into. Instead, let’s accept the idea that the total number of murders per capita, for example, is a good metric. It’s indeed fair to say we can tell a dead person from a living person, and with some degree of confidence whether a death was a murder. Consider now, this hypothetical data set from two groups of human beings:

GroupTotal PopulationViolent MurdersRate of violent murders (%)
A1002020%
B1000404 %

There are two types of numbers in this table. One type is a measurable quantity, population or number of violent murders are natural numbers—one murder means one individual died. It is not clear at all what half one would be. But for me, the interesting number here is the rate per capita, which was used extensively in Pinker’s book. In my example, the total number of violent murders doubled, but the murder rate was one fifth. Depending on the point we are trying to make, one might say ‘the murders doubled in group B!’ while others might say ‘the murders per capita declined tremendously in group B.’

This is just numbers being instrumentalised to prove a point. Not something new at all. Instead, I’m interested in another, slightly less intuitive property of using ratios as a comparison.

First, using a ratio is perfectly fine for ballpark estimates and thinking clearly, but it is important to understand that a ratio is always meaningless without at least one of the values used. If I say murder rate is 5%, that number can mean 5 people (100 people in a group) or it can mean 5000 (100000 people in a group.)

In both cases the ratio is the same: 5%. The totals, however, are drastically different. When we compare ratios without using the base values we used, we lose the sense of scale, i.e., 5 people dead or 5000 dead become morally equivalent if our comparisons are done exclusively in terms of ratios.

Looking again at the first example, by saying there was moral progress from group A to group B due to a 5 fold decrease in murder rates we are, implicitly, creating a moral equivalence between 20 dead in group A and 40 dead in group B. Each dead person in group B is effectively worth less than one in group A. If we consider each one of those individuals lived a full life and their death was an immeasurable and indivisible tragedy, we realise immediately that I could kill someone in group B and they would only count as half a person in group A. To what extent can we create these equivalences? I tend to think it’s tricky business to say a 4% death rate is better than a 20% death rate if the absolute values are so drastically different.

This implied moral equivalence is what disturbed me about these calculations. 2 dead in group B are 1 dead in group A. The metric doesn’t reveal the true scale of crime, only the relative scale of crime, which for me creates a problematic situation where to increase the number of murders without increasing the murder rate one only needs to increase the population. If what we look at are ratios per capita, we can effectively kill more people while making the murder ratio go down. This is what I concluded was the driving factor for my uneasiness with the book.

This idea that mathematical calculations in social and political sciences create moral equivalences is not new. There’s one big elephant in the room when it comes to creating moral equivalences based on numbers—money. While we frequently might discuss this in the political sciences, it is not uncommon that the use of mathematical language creates its own problems and ends up creating moral equivalence problems like money does.

To discuss rates is to implicitly create an equivalence between the quantities in numerators and denominators, between 5 dead and 50 dead, 50 dead and 500 dead. Since rates alone don’t carry scale, it is simply too easy to simplify and accidentally legitimise big crimes because their relative weight has decreased. I have a hard time saying 50 dead are the same as 5 dead, and reading it as a main thesis disturbs me a great deal.

Speaking of people, societies or collectives in quantities and averages using the mathematics we have today reflects little more than a need to add some mathematical weight to an otherwise subjective theory. Thing is, as we say in computer science, garbage in, garbage out. No matter how good your calculations are, if your starting metrics are subjective, then mathematics is little more than a masturbatory exercise to wow those that have less mathematical knowledge. A bit like illusionism, flashing a nice equation is like misdirection—it allows the theorist to get away with points that would otherwise not survive scrutiny.

the wondrous story of S

This week I cycled to the smokestacks of Sydney Park and spilled a beer for S, whom I lost to the health hazards of crust punk hedonism. The bit of life I shared with him was so full of unexpected events I had to write some down. I can’t remember exactly when I met him, but I do remember where.

I think I was about 16 when I first plugged in to IRC. My awkward monochromatic choice for clothing colours made me gravitate towards goth, punk, industrial and anarchist chats from the get go. It was through connections I made in these chat rooms that I found where to hang out. Over the years one of the other big IRC clusters, the one revolving around punk, would gather outside whichever was the unofficial punk bar of the day. As many other bohemian quarters of big cities, that might mean one bar one week and another the next.

When the punk hang out was Boca do Inferno, which curiously had also been a neo-nazi hangout at times, I’d often sit outside drinking cheap beer and have long winded conversations with whoever would be there at the time. The crowd was a mix of computer literate punk identifying youths from punk IRC channels and crust punks. There was little segregation—all of them just wanted a few drinks, some tunes and the occasional bar fight. It was during those times that I met S.

The events are scattered along many years since at all times our interactions happened under severe or less severe intoxication. Whichever the drink of the day, S would be there, with a big smile and twinkly eyes, bumming around and chatting to randoms. It didn’t get aggro ever, we were all just hanging out doing nothing, which is good in itself. Quite often me and S would have weird conversations. He wasn’t like any other of the street punks around. He was crazy. Like, mentally disturbed crazy.

Quite commonly the crust and street punks revert to the basics: alcoholism, heroin, crack, abusive relationships, squatting, busking, begging and stealing. Nothing new there. But one of the things I always loved about the hedonism and immediacy of the lifestyle is how brilliant a lot of them were. Most of the street punks I interacted with were incredibly smart people that lived through violent and abusive situations from a young age. I always enjoyed a good chat with whoever was around and S was always up for a chat, a hug or a sip of my beer. But he had the most insane stories of anyone hanging out there. His insanity would drop by late in the night, when the alcohol hit his diabetic threshold. He would tell me about how he didn’t have a cellphone because aliens were listening. He would tell me about government mind control rays. He would tell me about his past in Brazil bashing up cops and living the ‘No Future’ life. His loving and warm gaze would shift into a paranoid glare and his stare would go right through me. I think to this day, he struggled with mental health but kept it mostly to himself, since the crust punk scene isn’t really known for deep conversations that might reveal paranoid delusions like his.

For me, a sheltered privileged white engineering student, his mental states were fun and intriguing, but didn’t really affect me too much. His diabetic driven collapses after getting wasted didn’t either. He was pretty much the coolest crust punk I knew precisely because he was so past beyond fucked up and owning it so well.

We would see each other over the years and share a beer here and there. It wasn’t until I started escotilha that our lives became irreparably interwoven. Part of this story is already in the book, so I won’t dig too deep on that bit.

One of the guys that hung out at my place heard S and L had been evicted from where they were squatting and I offered them a space. S came in and I recognised him instantly. We got along great, and if there was one thing S had was the capacity to express his gratitude for anything nice done for him.

Over the time he stuck around, I fed him and he got healthier. Don’t get me wrong. S was a crackhead ever since I first met him, and any spare change he’d make on the streets would turn into crack and more paranoia. But once we started sharing meals and time together, he grew a bit more meat on his bones and started telling me more about his past. Instead of paranoid delusions about mind control, he started telling me about his youth in Brazil.

Turns out S had a troubled past. His dad was a cop and he was a punk bashing up cops. One day he ended up in jail after severely bashing one. The big irony is that his dad bailed him out of a big prison sentence. I never figured out whether he did time. I did figure out, however, he also had a family he abandoned. I can’t exactly remember if it was just one son or more. I do know he cried on my shoulder a lot, usually after a good meal, about how his son hated him and didn’t want to see him. Truth was S abandoned his family to live the punk lifestyle. His son was brought up by S’s dad, and had serious contempt for him. S would often tell me that his son was training to be a cop because of him, and that broke his heart.

I never really knew what to say to this. S would cry and show all this psychological pain, but he also lacked the tools to do anything about it. Instead, he’d just continue deeper into the drug and alcohol cycle.

Living with us had its benefits, and besides getting pudgier, he also started smoking less crack. At times he’d pull me aside in the kitchen and say that he was so happy he didn’t need as much crack. It made me think he could really get better if he wanted.

A lot of this improvement was thanks to L. L, a lovely artsy young lady from Austria, was squatting with S when they got evicted. She took great care of him even though they had little vocabulary in common. If there’s one thing S had in excess it was charm, particularly with blonde blue eyed German speaking women. Even without much of a common language, S and L had an incredible relationship, full of love, good times, playfulness and the occasional fight. I think L always knew a different side of him, perhaps a bit less dark than what I knew. In L’s own words, she loved bad boys. S was definitely bad—the old school kind of bad. A past of delinquency and irresponsibility and a heart of gold.

E, who kindly let me know of his passing, also met S at escotilha. E, S and L became inseparable in a strangely conventional emotional triangle. I mean, for street punks, they were surprisingly heteronormative. Maybe because S was definitely old school. I remember him commenting that ‘he’d love to, but L wouldn’t let it happen’. Maybe it did. I wasn’t really in the loop in those days—I was just providing the space. S lived in pure delight thanks to the attention of these two beautiful young women, especially since he’d be past his mid thirties at this time (if my estimate is correct).

The life of bumming around had the upside of keeping us going out and exploring the derelict corners of the city. That’s how we eventually found a place to squat. S moved in and we lived together for a while. He’s all over the documentary as well.

During this time, his exotic good looks, tattoos and piercings were the delight of travellers staying with us. After all, what is a squat without the quintessential street punk hunk? S delivered this masterfully with his beautiful smile, warm and kind spirit, and talent for hedonism.

Once eviction hit us, S had to move on. I didn’t see him for quite a while, especially since the new squat most of the punks had moved to was basically a crack and heroin den. I visited that place once and ran out within the first couple of minutes.

My life in Lisbon became quite mundane after the squat days. I’d commute on train and metro for hours carrying my folding bike around. One afternoon, coming out of the metro in Cais do Sodré, I heard a loud, angry scream ‘ACORDEM! ESTÃO TODOS MORTOS!’ (‘WAKE UP! YOU ARE ALL DEAD!’). I knew that voice—it was S, delirious and angry, shouting at everyone around him. He was staggering around in despair, shouting at all the commuters going by him. They paced and looked away, trying to avoid hearing his harsh truth. I walked toward him faster, pulling my folding bike behind me, and screamed ‘S!’, touching his shoulder as if preparing for a hug.

His dazed paranoid glare fixated me for a couple of seconds. His eyes were twinkling as if they had hardened to shiny dull porcelain. His angry wrinkled face slowly softened, his angry look morphing into helplessness and love. ‘João?’ His eyes slowly lost the glaze and deepened again. He was here with me now. ‘Is that your chair?’ He thought my folded bike was a wheelchair. It did look like one, and given his past, he definitely was more acquainted with those. ‘Nah, it’s my bike, look!’ I unfolded the bike then folded it again. We laughed. Then his despair came back, this time with slumped shoulders and teary eyes. He collapsed on the floor, crying, sitting against one of the metro tunnel walls. I sat beside him and hugged him. I asked about how he was doing, he said he wasn’t doing well. No surprise, he hadn’t found a nice group of people to hang out with and was back on his vice loop. ‘Tens trocos para uma cerveja?’ (‘Got change for a beer?’) he asked me. I gave him some spare change. ‘Tu és gente boa João’ (‘You’re a good guy João’) he said. We hugged and off I went to my bagpipe class. I could still hear him scream at a distance. Screams of surprising sanity during a rush hour that seems far more inhuman than the things S was going through. I didn’t know, but this would be the last time I saw S.

His story, however, did not end here. After I moved to Sydney, I got the news from Lisbon punks that S had been deported. S had averted deportations for years so this was quite surprising. He was sent back to his home town in Brazil. Brazil has cheap crack, so he fell deeper and deeper into his bad habits.

I shared the first place I lived in down under with a few other people, including E, my former guest that met S and L in Lisboa. E and L were planning a big adventure in South America to find S wherever he might be. They started a social media campaign, printed t-shirts, got in touch with many people and through it, they eventually found him. Their dedication for S was incredible, especially when you think most of us will never even elicit one transcontinental flight from a friend, never mind two.

Once they found him, the harsh truths of hedonism hit E and L in the face. S was a wreck. His diabetes and drug habits had made his foot deteriorate badly and his mental health and spirit had decayed past recognition. E and L made an effort to fix him by getting in touch with his family and getting one of his relatives to let S move in with them. S did move in, but instead of looking for treatment he robbed their place clean and spent the money on crack. E and L saw their hopeful and beautiful campaign collapse right in front of their eyes. S stole from them and they left. S’s loving soul was gone, eaten away by drugs, alcohol and disease. E and L scattered through the planet again with the realisation that the S they loved dearly was gone and all that was left was decaying vessel enslaved by substance abuse.

E messaged me yesterday—S had died during surgery on his foot. His heart stopped during an induced coma. We were all sad, but we weren’t shocked. We had lost S a long time ago, but for me, his wonderful story remains. How a street punk from Brazil met an Austrian and an Australian in my home town, how they weaved their life lines through my own, and built a friendship that spanned continents and language barriers.

May S rest in peace in Crust Punk heaven, in Love and Anarchy.

Me and S

objective reality—the great objectifier?

A surprising gaita adaptation.

For a long time I’ve struggled with the apparent contradiction of my political ideology and my trade.

The inherently relativist and subjective attitude that Anarchism brought into my personal political beliefs always seemed to clash with my engineering degree and a job that demands absolutely correct logic and objectivity.

The more I read about politics, philosophy and science the more they seemed to be at odds with each other: my engineering skills were funded and developed to oppress, to arm and to destroy, and the good that came of it was little more than opiate for the masses. The systems engineering I learned came from the study of ballistics—how to make a bomb hit the right place at the right time.

Computing, the apparently democratising and liberating force of the last couple of decades, was originally developed to make the said calculations faster and to decipher encrypted messages. That was Turing’s job—the scientific institutions of his day could care less about his wondrous vision for computing and artificial intelligence. Instead, they valued his insights into the Enigma ciphers and locked him up for being a homosexual.

The internet, which has been responsible for my personal success as a professional, was originally developed by a military institution, and is still owned by a US organisation (ICANN, though that might change soon). It is no surprise that this same infrastructure ended up serving a military purpose—mass surveillance of innocent civilians and theft of intellectual property from competing states. The fact that it lets us communicate to each other seems to, again, be a mere side effect of an otherwise government owned, government controlled, authoritarian and oppressive endeavour.

This has always been the most common criticism that I endured in political environments—that I, as an engineer, somehow represented the capitalist hegemony simply because I had a practical and objective attitude towards most problems, and often tried to use scientific methods to approach them.

While I’d say this is a bit unfair in the broad sense—my solar panels work after all—in a more specific sense they are true. I did, indeed, study the deadly arts of the hegemony, and the fact that I used that knowledge against it at times is little more than a curiosity. My pay check is, after all, part of the great capitalist machine.

But recently I had an a-ha moment, perhaps thanks to cognitive dissonance or simply the liberating evaporation of this contradiction. While listening to a Radio National show on a couple of Australian Intellectuals I found myself in a strange intellectual harmony—her account of being mere object at the hands (or jaws) of a crocodile made me understand (or finally articulate) how I always somehow felt there was no contradiction between engineering and anarchism, or more broadly, between technical and scientific approaches and anti-authoritarian values.

I have written often about entropy—the ever eroding, destroying force of our world. While it is an important physical concept, I never really understood the full depth of what objective reality really means. The more I got into feminist writing and anarchist writing (and I have to say my feminism is a part of the broad over-arching story of struggle of the oppressed), the more I saw what objectification really meant—and what so many political philosophers were articulating in different ways. But while objectification has always been articulated in terms of a subjective objectifier—an agent, a human being with a subjective world that decides to use another agent as a means or simply as an object to their reality—I feel there is a greater objectifier in the picture and we tend to overlook it.

Isn’t nature itself the greatest objectifier of all? Isn’t nature the most ruthless, mindless, inconsiderate agent of all? Aren’t the laws of physics themselves an expression of an authority we cannot escape?

Laws of physics apply themselves ruthlessly to every physical entity, with no consideration for their impact in that physical entity’s existence. While we tend to not empathise with a comet as it hits a star and evaporates, perhaps because we do not perceive sentience or agency in it, one could argue that the way the laws of physics ignore everything but the physical properties of objects represents the purest form of objectification: I don’t care where you have been, where you are going or the uniqueness of your trajectory, I care only about your mass and chemical composition.

Though a bit surreal, this analogy strikes closer to home when we look at anything remotely alive. What is life but a constant defiance of the objective authority of the laws of physics? When a cell uses its ion pump, perpetually pushing a chemical imbalance that without its constant effort would quickly resume chemical equilibrium, isn’t it expressing a primitive form of systemic criticism?

The idea that life is itself a climb up a ramp that has no end—a surreal attempt to reverse entropy locally when the metabolic systems used to do it contain in their very own definition the obliteration of the agent itself. What could possibly be more tragic? That a system, the natural world, would somehow have a totality that includes in it a defiance that could never succeed—life might show signs that it can redefine its surroundings, but it can never win in the long run.

I can’t help but see the parallel between the laws of physics, and how they treat everything and everyone as a mere object with no consideration to their subjectivity, and the laws of man as they exploit one another.

Consider now human beings, or perhaps other beings with the capacity for subjectivity and intersubjectivity, that is, at least capable of acknowledging another agent’s subjectivity and negotiate possible courses of action using ethics and political discussion. Isn’t our relationship to the physical world one of pure oppression, where the laws of physics override every possible opinion we might have? Isn’t it that our desire to fly, to visit the far reaches of the cosmos, dive deep into our oceans, completely ignored by the laws of physics? What is sadder than the fact that gravity always drags everything down?

I realised that Nature enacts one of the purest forms of objectification—in that to it there is no possible discussion as to whether things could happen any other way. Things go the way they go, and Nature does not care about your subjective well being. Natural laws progress and will overrun any possible attempt at subverting them.

This is where I realised that mankind’s technical ability had something interesting about it—isn’t it a form of defiance of this totality that envelops it? Isn’t it an incredible act of heroism when an entire species decides to reshape its environment to live out abstract, subjective ideas? Isn’t technology an incredible testament to anti-authoritarianism? That our planes fly us because we were given no wings, that our communication technology allows us to defy the speeds available to our own legs?

Most importantly, what could possibly be more objectifying than being given a body, a birthplace, a family, a genetic heritage prone to certain ailments, with no consideration to whether we desire it or deserve it? There is a fundamental unfairness in not choosing our birthplace, our social class, our families, our attractiveness or health. Ask anyone born with a male spirit in a female body, or anyone born with any kind of disease that causes pain, discomfort or simply prevents someone’s spirit to engage reality to the full extent that it desires, how they feel about their luck. To play on Rousseau’s words, man is born in shackles yet everywhere he touts his freedom. The shackles are our physical body, which despite being capable of tremendous intellectual feats, can do little when faced with the heavy hand of Nature, with its disasters and complete disregard for human subjectivity. A supernova does not care, it simply is what it is, and in its path it will annihilate anything in its path—no matter how cultured or beautiful.

In this sense, I managed to find a place where Anarchism and Engineering meet—the point where we choose to defy the laws of physics, not in an absolute sense, but in a locally contextualised sense, by engaging our reality proactively, fighting the lost battle against a hopeless objectified existence to which all physical things are doomed at birth. What is more defiant than to willingly face the cold death of the universe in our own terms? A cosmos that despite the odds, dares to spawn beauty and complexity?

one day coding binge: OpenCV, Tesseract and MtG

The Dingle Berries by Lúnasa on Grooveshark

Last weekend I got to see these guys. They were incredible.

I’ve been wanting to try OpenCV for a while. I did some Computer Vision work back in Uni and had a great time at it, and recently realised I had a cool fun project I could do to save me some time.

If you ever played TCGs (Trading Card Games), you know collections quickly become unmanageable, taking hours on end of inventory tracking if you’re serious about it. In my case, when I was playing TCGs here in Sydney (mostly MtG), I had the discipline to type in every new card, but every now and then at a big tournament I’d lose track of what was in. As the new cards piled up, the time it takes to type them in increased so much I gave up. I also stopped playing a while back, but that box is still there, rotting away.

One of the uses for that big box I have in my closet is that it can be sold—most of the cards I own are worth money. But if I am to sell them off, I need an inventory first. Hence this project.

Typing in a card name takes me about half a minute, but the strain is the worst. Typing is exhausting. So instead I coded a detector in python that grabs the card name and puts it in the clipboard or an output file while making a rewarding ‘beep’ sound (kid you not, I love that feature so much it’s on by default). Here is the detector running in clipboard mode. As it is now, it takes about 12s to detect a card, the minimum I’ve seen was about 3s and there is no maximum (it can sit there until it figures it out).

The principle is simple: instead of trying to find out where the card is, it shows the user where it is looking. Once the user puts the card in the right place, it will attempt to figure out which card it is.

I tried other OCR ideas, like training Tesseract with the MtG font and card names. After all that, I decided to keep it simple and go with the default Tesseract detector with only a-zA-Z characters. This way card names are just a single word with no spaces. From there, I use the Hunspell spell checker with a custom dictionary to spell check these ‘words’ and give me the most likely candidate. Once the system is confident enough that it found a match, it will output data in whichever format was selected.

The results are incredibly good (and fast) considering my rig is a $10 Kmart cam, a jar, some wire and a white sheet of paper. One of the cool things I’ll be looking into is how to make a nicer rig that has a ‘place’ for the card, so I can drop it straight in and it will be properly lit and in the right detection place. Maybe once my Peachy Printer arrives I can add some OpenSCAD to the project.

photo of the test rig

My scanning setup

The GPLv3 source code is up on my GitHub. It is true, I finally gave up and joined GitHub until I can run my own git server (which, depending on my budget, may or may not be soon). This is my first ‘official’ public open source project!