Português English

Programming

Hugo feature
2020.12.03

Hugo

Hello World. Testing the new site!

For the N’s time, I migrated the blog to a new blogging system. This time, I’m using Hugo.

Hugo is a class of CMS’s that generate static sites. Just like compiled and interpreted programming languages, the whole site generated beforehand and the result is uploaded to a server.

The main advantage using this method is a substantially faster site and zero attack surface form the CMS. The main disadvantages are the less user-friendly interface and big building times.

Let’s dig into theses issues:

Faster Experience

Since all the pages are now static and pre-made, the only variable it the server latency to delivery the files. The page does not need to be built on the fly for each user, which can be tremendously slow. And it also waste CPU from the server, rebuilding it time after time after time.

Most CMS’s have some caching system to mitigate this issue. They first check if the page have been already built. If so, serve it. If not, build it and save the result. The problem lies on implementing a CDN and/or a technique to invalidate the cache to force a rebuild (in case the content was altered by the author).

Build time.png

More Secure

Since it does not compile the page on the fly, it eliminate the security issues inherited form the language. It also does not access any type of database. There is no admin page. Event DOS attacks can be much more robust, since the CDN can migrate the traffic to another server easily.

User Interface (Lack of)

Well, Hugo uses the developer-driven approach that requires the user to use an IDE and compile the whole site. It does not offer any type of interface in which you can drag and drop widgets. It’s is definitively not WYSIWYG.

If you are seasoned to programming tools, you will have not much problem. It will be very familiar. For a non-tech savvy mom blogger, Hugo is a no go.

Build Times

Even to see a single post that you just wrote will take time. Like compiled programming languages, the site have to be built before you can check on it. Hugo have an automatic service that propagate the incremental changes and it really fast, so iterating the content will not slow you down.

It will take even more time if you have some extra processes implemented, like resizing images.

But the process to rebuild the entire site might take a while. Thankfully, for the production the whole building process can be delegated to CI/CD tools. Using GitHub or GitLab, they will automatically build the site on each commit.

The process of writing this post, the very first on the new platform, was quite nice. But I’m in the perfect spot of product requirements and technical skills


Anyway, I’m going to try to post more content in the following months. :)

Best static site generator 2020

CGD: Awesome Video Game Data 2017 feature
2017.10.25

CGD: Awesome Video Game Data 2017

I follow the GDC (Game Developer Conference) channel on YouTube and, just right now, I recommend you to do the same. A great number of excellent talks (of course there are some exceptions, like the lame at-the-time-GDC-board-member Peter Molyneux making plain simple propaganda).

There is one that I just watched and is very eye-opening: it’s the annual talk from the guys of EEDAR (a data consolidation company) presenting numbers of the whole industry. There are talks about prices, sales, regions, and mobile/pc/consoles. Everything!

It is a must-see.

Linux on Notebook, Take 2, Mini-Buntu feature
2017.07.13

Linux on Notebook, Take 2, Mini-Buntu

My notebook is not new. I bought the Yoga 2 Pro almost 4 years ago. Two years back, I got annoyed with Windows, so I decided to install Linux in it. I was scared because on the contrary of most my PCs that I assembled myself, the Lenovo had a warranty and possibly custom hardware.

As I told, the attempt failed. It was giving me too many headaches. Also, I generally use my notebook to also program and develop games. And because the Unity Editor was not available (not at least in a reasonable version), I was kinda forced to migrate back to Windows10.

Linux 3.jpg


About 3 months ago, I decided to give it a second shot. In case I was not clear, I use Linux in the desktop, in a dual boot, for about 15 years. I saw Ubuntu entering the market. But since I start to systematically be involved on making games, the necessity of Windows started too. Back to the experiment. It was a requirement for me that the general performance had to be great. Not good, great. I would prefer to keep on the Debian-like distro because I’m familiar to. Ubuntu family if possible. So I selected both Kubuntu and Lubuntu for a ride.

Kubuntu was the one that I tested before. I like KDE since version 2 but again failed in deliver a blazing fast experience. In the notebook, the boot time was several minutes. Even Windows 10 was a couple of seconds. I decided then to format and install Lubuntu.

Lubuntu is an Ubuntu derivative using the LXDE desktop environment. Super light. Man! Boot was fast and when ready it consumed a fraction of RAM of both Windows and Kubuntu. However, during my 4 weeks test I was giving too many little problems. So I decided to make another switch.

Xubuntu is fine in a 13 inches monitor. Then came to the software selection. Lubuntu was super short on preinstalled stuff, which I like because I generally don’t use them anyway, but Xubuntu came with some. The good news is that the selection does not consume much of the drive space and are light enough in case I really want to use them.

Linux 2.jpg

I had to install Steam and it works nice. Unfortunately, GOG’s Galaxy does not have currently a Linux version, so the games have to be installed manually one by one. Also, your play time will be not computed, nor you will be alerted about updates. A second negative point is that most GOG’s games do not use the new cloud save feature, so playing a bit in the notebook and a bit in the desktop is only for games that progress do not matter. Fingers crossed for the future.

Linux 4.jpg

Finally, I was looking for a game engine that works on Linux. Unreal, as I found, works, but you have to compile it yourself. GREAT 🙁 I did it. It took hours and the result was too many crashes and too big suite to work in a notebook. I was once again looking for a lightweight engine. I tested Godot and liked. But it is still lacking.

Then I found out that Unity is, in fact, releasing in an alternative channel (through forums) the update engine for Linux. I installed it too. Crashes a lot but it works. I’ve being playing the game developer in the notebook ever since. With the excellent Visual Studio Code editor, it makes my days fun.


After 2 months and half working most of the time on this notebook, I can be happier man but in general I am already one. It is fast, close environment that I face when I deal with cloud Internet stuff and free. I plan to migrate to a newer machine in the next year, mostly to get a better amount of RAM memory and battery life. Currently, it lasts 3 hours, which is by any means a shame for a mobile device.

This is currently my desktop
This is currently my desktop

A Study in Transparency: How Board Games Matter feature
2016.02.23

A Study in Transparency: How Board Games Matter

I just watched a GDC presentation by the same name by the developer Soren Johnson, from Mohawk Games. I’ve agreed almost entirely with him. The basic premise of his presentation is that video games should pay more attention to physical board games, learning that techniques they use in order to create engagement. The motif is: board games have transparent set of rules and transparent implementation of luck. Video games should have such transparency too to engage players.

At the end, when he opened for audience questions, he was nervous to answer and he somewhat backed a bit from this point of view. There were a couple of questions that I want to discuss:

What if the game system is so complex that you deliberately want to hide it from the player? (watch the original answer)

In Civilization, as pointed in the presentation, the designers opted for displaying each variable or modifier as a series of bullet points in the UI. That is because the list of modifiers is long and complex. When engaging in a diplomatic mission, the player must understand what are affecting the relationship. But hey, it is only one way to solve the problem.

In Shadow of Mordor, the orc leaders challenge themselves for power and status. Each orc also have a list of strengths and weaknesses. All this information is presented to the player is a very elegant way. It exemplifies the Soren’s argument.

But if game is so complex that is really difficult/impossible to present the players all information? Well, it is probably a flaw in the game. If there is too much going on, most likely that the player action only impact slightly in the result. The player will feel that is pure luck. He is just a passenger. It is the game designer’s job to balance it back; otherwise, it will suffer from bad reputation and bad sales. Too shallow or too complex have to be considered equally problems to deal.

Notice that another possible consequence is when the game becomes a cult hit and the players that endured the gameplay formed a community to share information and demystify the obscure rules. A good example is Dwarven Fortress, a super weird and complex game that is loved by many for being weird and complex. My suggestion: do not try this path.

If you expose the whole set of rules and internal numbers, it will become a matter of optimization instead experimentation. (watch the original answer)

It can be a problem, yes. Tic-Tac-Toe suffers exactly from this problem: you can anticipate the full match to a point that you CAN guarantee that you will never lose (you cannot guarantee that you will tough).

But as a designer, you can implement counter measures to fight it. Luck and complex decision tree for example.

Luck is the classic solution. By implementing a series of unknown events, it makes very difficult to predict the future. Random numbers, random events, scramble cards. Notice that luck is merely an element that the one cannot control or predict, like weather or a die roll, or a hidden enemy in a fog of war.

Complex decision tree refers to both make several factors relevant for each decision and a game with several rounds. Think of Chess or Go. There are so many possible movements per round that, while theoretically possible, it is practically impossible to compute all moves in order to make a single best decision.


In general, I am with Soren. I might discourse about it in the future, because most people think that creating games is just an intuition and art. But there a lot of reasoning and logical decisions that should guide the construction of such products.

My Experience with Angular JS feature
2016.01.22

My Experience with Angular JS

There are several months now that I started to program using the Google’s Angular JS libraries. For those that do not know it, it is a way to write web applications that are very interactive, interconnecting the user interface with JavaScript. Not simple to explain.

I tried jQuery long ago when developing for Drupal and for my personal enterprises, but I was very laborious to make it automatically respond to user interaction, in a passive (and always alert) way. Angular was just about to solve it.

Primarily, it was a pain to fully understand its concepts and methods. I spent weeks to write some prototypes. One of the major complains is debugging. It always logs cryptic messages, with full stack of weird functions and codes. I was never able to figure out what is the line of my code that is causing trouble or what is the function I wrote that is missing an important parameter, or whatever.

Angular parse and interpolates HMTL and JavaScript, in a dynamic way that it sometimes break before it can generate a nice error output. I have never played with its major competitors, React and Ember, but I honestly doubt that it is much different there.

Once I got better at it, I had a really good experience. I recommend you to use Angular JS and also Google’s Material Design Angular library in your own web app.

Bruno MASSA