Trial and Epic Fail

Ventures of an indie game developer

Corruption of American politicians

I'm on vacation. Six looong weeks, aaaahhh! Since it's raining all the time, I'm going through a lot of Quake Live, Game of Thrones and of course movies with the kiddies. And the best way to look at movies these days is streaming them. But as all new technology it's held back by old rights holders and American law firms, so the easiest way is still to pirate.

This judical conundrum don't just apply to movies, music and communication, it also affects life-giving and life-changing technologies like electric cars, environmental-friendly heating (think LENR) and of course patents.

I used to work for a company, Mentice, that got sued for software patent infringement. The patentability of the idea was so low that any fourteen-year-old with computer might accidentally infringe. The “unique” idea was simulating a stiff wire on screen. If you did so, the lawsuit said, you infringe on the patent: pay up!

The first six months of the lawsuit was spent moving it from Texas to Cleveland, since Texas is so corrupt you have no chance of winning. The Texas corruption is perfectly exposed by the coder who wrote the X-plane flight simulator:


The offices of those patent trolls looks like something I'd expect to find in the North Korean Chamber of Commerce: totally empty.

Srsly!? Is there even a single American politician who actually thinks that this is for the best of the country, the people or the world? I have a hard time believing anybody could be that dumb, so my inclination tells me it's just rotten through and through.

Mentice (the company I used to work for) had to spend so much money on proving that they abided by the law that they couldn't afford to keep half of their employees (me included).

Right now the biggest and best innovation since the combustion engine, the E-Cat, is held back by litigation. Here we have a product which once and for all can stop global warming and we let American law get in the way? If it would have been Russia, China or North Korea this madness would make sense, but please corrupt American politicians go fuck yourselves and then make amens. (And then finally it would be easy to watch movies with the kiddies when we're on vacation.)

Private vs. public

The article deserves to be read still, four years to the day after it was posted. Stallman thinks so too.

Windows wins

Going back to using Windows, utilizing the free Windows 10 upgrade period which might close within one and a half months. My three month endevours with the Linux desktop has come to an end. I don't believe the desktop is dead, but the Linux ditto absolutely is.

Downloading Windows 10 over DSL is no small feat though. A couple of years back we were offered fibre installation for a fee of $1900. I didn't want it, and my main reason to not get it was that I wanted the family to stay offline more. Be more social, play more board games, be outdorsier. I'm not sure there's a correlation between bandwidth and behavior, and times like these I regret the decision. At least a little.

The first things I'll install are AutoHotkey, Git4Windows, Python3 and Chrome. It's not possible to power-use a Windows computer without 'em. Then Visual C++, Texts and Steam. No matter what the Linux nerds will have you believe, installation is still faster with Windows than Linux.

Top-heavy

We grunt workers often complain about behemoth administration and overly-managed parts of the organisations we work in. We accuse large companies of having poisonous meetings and the middle-management of obeying the Peter principle. More often than not we're right to be disgruntled with this in our day-jobs. Or are we?

Take my current project as an example. This morning, my business project lead sent me this list of project participants:
  1. Business PL
  2. IT PL
  3. Lead Architect
  4. Lead Requirement
  5. IT-agreement lead
  6. I&O-PM
  7. Test
  8. Test
  9. Lead Developer
  10. Business Expert
  11. ACI Agreement Lead
  12. Business Expert
Number 9 happens to be me (and, yes, the "Lead" could easily be removed on that as well as on all other role descriptions). The other people involved are there to either have meetings, produce documents as input for the developers or test the developer's code. The project has one developer. Me. Sure, not all other roles full-time in the project, but neither am I. And sure, there are integrations with third-parties. But. Please. Come. ON!

I'd need a tester say 1/4th of the time and a nagging PM 1/8th of the time. The first part of the project, running over six months, had the architect and requirements guy produce their documents after the development was done. They weren't able to put together the documentation before implementation. I wouldn't have read it anyway as planning is only guessing. I only went to a couple of meetings, and could have skipped those as well. The realistic overhead for my day-job is thus:

This is, as we grunt-IT-workers know and lament, common in large corporations. But my private little tide is turning. When I was younger I was certain that I wanted a lean and effective workplace. I'm not as sure anymore. Is a company with 100% efficiency as dull as a 100% efficient relationship? Perhaps 14.6% is better, softer, more laid-back, comfier, happier and healthier than 50%? I'm actually starting to think it is.

Nonetheless there are two interesting questions here. The first one is: what is it going to take for top management to catch on? Because eventually they will. And capitalism kills dead meat. The answer to the second question will affect us all in inconceivable socioeconomic ways: what are all the meeting people going to do when it's obvious for everyone else that there is no demand for purposeless meetings and unread documents? Shangri-la or abyss? Hard to tell.

C++ parsing, Linux, and Linux no more

I recently "modernized" my C++ code style using a Python script. The script didn't catch everything and probably contained some bugs, but considering the amount of text it had to go through I'm pretty impressed with it anyway. C++ is notoriously hard to parse, and I just had to write the whole thing from scratch.

The script converted:
  • 1335 filenames+paths and 1040 include statements to lowercase;
  • 16 namespaces to lowercase;
  • 45 global variables from gMyVariable to g_my_variable;
  • 1550 constants from MY_COSTANT to kMyConstant;
  • 2556 member data variables from mMyVariable to my_variable_;
  • 6100 unique stack variable names from lMyVariable/pMyVariable to my_variable.
When the scoped stack variable and the parameter stack variable would collide, the scoped stack variable got an extra underscore, like so: _my_variable. Another 7k classes, functions and macros were left untouched as they already complied somewhat with Google's idea of a good coding style. Before-after:


So the code got a fix-up. Then I open sourced it on GitHub. And eventually I've gotten around to building the binaries for Linux (including the simulator for Trabant).

Wonderful! Finally I can leave the crappy world of Linux! The GUI is yuckie, but there's so much more to it than meets the eye at first. Here are some of my recent encounters:
  • Installing my Samsung laser printer took me hours, and the final solution included manually downloading and compiling some part of some CUPS driver (CUPS was originally an Apple network printing framework made open source).
  • Installing the scanner was fairly straight-forward, and worked quite well as long as I didn't perform too many configuration changes to the scanning software while the scanner was on.
  • When I booted, the computer would often hang with a blank screen due to a broken motherboard.
  • When I replaced the motherboard I got USB 3 support. Which rendered the USB scanner software non-working. Took me forever to realize what the problem was. Had to go into BIOS and disable USB 3.
  • The problem with the motherboard was not with the motherboard. Even with the new motherboard the system still hangs during boot 10-20% of the time. Probably some driver and/or some part of the kernel that hangs.
  • If computer hibernates, it hangs during boot 90-95% of the time. And takes forever those few times it actually does boot.
  • Had automatic updates enabled. Got a new kernel, 3.13.0-83. Hangs during boot 100% of the time. Same with 3.13.0-85.
  • When Ubuntu 16.04 LTS got released, the old 14.04 LTS became unfashionable and I was no longer able to update my system. I also don't dare to update to a newer Ubuntu as the most recent kernels crash on my machine.
  • Thus I was not able to install vlc to watch films.
  • Could never get my expensive Philips screen booting to 144 Hz. Instead I had to run something as extravagant as xrandr --output DP-4 --mode 1920x1080 --rate 144 every time I log in. When run the screen flickers for five seconds which lead to me not using that command at all, I just leave it running at the default 60 Hz. I could have just bought a 60 Hz screen for 1/3 of the price.
  • Whenever I jack in the HDMI cable to watch something on the TV instead the monitor flickers for five seconds and half of the time the TV becomes the primary monitor, so the thing corresponding to the "start menu" goes missing. Is the glass half-full or half-empty you ask. For Windows users' it's half-empty I can assure you. Also switching sound to go through the HDMI wire takes installing a software like pavucontrol and then clicking around for ten minutes until you succeed by accident. 
  • Default fonts, and font rendering in general look like shit. In the desktop and in the browser. I didn't think I had any preferences what so ever regarding fonts, but I apparently must have a distaste for ugly font rendering.
  • I used CodeLite for C++ programming and Sublime for Python hacking. CodeLite is free and has a lot of (MSVC-like) features, but is lacking some important ones like mouse hover over variable while in debug to read it's value, and keeping debug vars expanded during single-step which is really frustrating to be without. As always with large freeware, most of the interface is extremely poor and it's filled with output panes, quirky icons, incomprehensible check-boxes and empty areas with strange names. Which of these ugly icons and/or tabs would you click first? Dare to click one without mouse hovering first? I think not.
    It's not that I'm ungrateful or anything - or well I'm that too - but it's just that why would you want to work with this low quality when you easily can choose not to?
  • Sublime is like a poor version of Notepad++ and lacking hotkeys for "replace all" and similar features which Windows' users take for granted; the only option is to retort widd da mouse. I've used vim more than ever before in the last months, but the i-esc-:wq mode switching from the seventies sucks ass and if I ever use Linux seriously in the future I'll start using Emacs again. Vim you fucker.
So all in all, Desktop Linux made me buy a motherboard and a screen I didn't need, and I've wasted many hours building my own shitty software on other people's shitty software for no apparent reason since only 1.65% are stupid enough to run Linux on the desktop.

Where there any extenuating circumstances? Well when apt-get worked that was nice. And at first I was a bit infatuated with the "configure everything" concept. But frankly, that was it. As soon as I have time I'll move over to Windows 10 and never look back.

Bad conf

Went to my first conference ever in the beginning of the week. PyCon.se. The conference was free and cheap, but I was surprised by the mostly unrehearsed, poor speakers and by how little the conference was about hard-core programming. My warning-bells started whistling already in the first few minutes when all return visitors were asked to raise their hands - and less then ten out of seven hundred did. From there on it went downhill. (The food was excellent though, but food is for suckers.)

Perhaps one should try to start something small in the municipality. Like inspiration for the kidz and socializing for the elder nerds. If I had more spare time I could have given it a try, but for now I'll just settle with a backseat driver's "I could have done better than most presenters at PyCon.se."

Free game engines++

When I started out writing a game engine fifteen years ago or so, the end-goal was to create a good one that could be sold. It didn't take long to realize that would never happen, but I stuck to the idea of developing a game engine and not just games.

Possibly one of the poorest choices in my life. I've spent enormous amounts of time on details that UE4 and others surely solves more elegantly and without sleepless nights.

In the duration of the project I've started a game engine from scratch, abandoned that to work with a friend's game engine, then abandoned that one to work on another friends game engine. Eventually, in 2006 I think, when he abandoned ship, I gave no shat about the redundancy and poor quality of the base we'd lined out and I just ran with it. 3 year later the UE3 SDK became free and last year UE4 came out. 7 years post UDK3 and my game engine is so utterly pointless that there is no point in keeping it to myself.


Not only have I struggled too many years, but I also had no time to refactor the code where it hurts. One especially poor decision, to use inheritance in two central "GameTicker" and "GameManager" classes makes my own eyes bleed, not to mention what it must look like to an outsider. Another bad decision. to use asynchronous resource loading to be able to stream huge amounts of world data (think MMOG), was also an awful one as it makes for horrible, fragile code, and there are coroutine options since 10+ years which would have been a much nicer solution.

When we started coding many years ago, hungarian notation seemed like a good choice. Now that I release the source code free I wanted something better, so I converted to something similar to Googles C++ coding standard. I wrote a small Python script for it, but it was non-trivial to get things flying and I easily spent two days on it.

Anyway, the code is out there. If anybody ever has any use for it, great! If not, well, hopefully I learnt something in the process. If I did, maybe it wasn't so bad after all. Trial and epic fail must the closest to the meaning of life one could ever get, right?

About the author

Mitt foto
Gothenburg, Sweden