Wednesday, June 16th 2021

Vaccinated

I hope no one waited on any follow up to my previous post! I've been quite busy, already change thrice of job, started many now defunct projects, survived the pandemic and avoided most of it.

I'm trying provide a weekly technical article (in French at the time), and feed some pictures to my personnal section. The website engine is starting to be more organised. Trying to write the framework was a mistake, it's way too complicated, and I didn't know what I would need. But rest ensure that one day, the Horn Framework will rule!

Wednesday, November 27th 2019

It's been a full year…

…of employment and up skilling. I know, there is still a month to go, and much can happen until twenty-twenty, but everything gets together so far.

The idle problem

For a start, I succeed to fix my sleeping pattern. Don't laugh, it's been a problem since I'm born, could never sleep enough hour or early enough. But that seems to be fixed, thanks to some Melationin. I honestly don't have a clue if I'm under a placebo spell, or if it actually fixes my sleeping pattern, but it helps and that's what matters at the moment.

The stalled frame

I went back to my PHPframework, to see what went wrong and how it could be better, with my new way to think and some language enhancements that happen since PHP 5.3. It still is a work in progress, but I really feel a new dynamic in my brain, coming back to this old piece of junk.

Up front

I totally rediscovered the front-end world, as I've been introduced to advancements that occurred this past decades. I had to shelf my disgust for JS, and the principle that JS should gradually improve the display of a page, or application, for the SPA paradigm. I still think we should be able to work around JS for safety reason. But at the time, available stacks don't seem to provide satisfying solution for this issue. Maybe gatsby's an answer, I'll have to get some time to explore this kind of tool.
Nevertheless, I skilled up learning TS, advanced modern JS, Sass, SCSS, AngularJS, Facebook's React, Twitter's Bootstrap, and Bulma, ; the NodeJS ecosystem, comprising NPM, Express, Yarn, and a lot bunch of joyful maddening technologies… Let's hope it's for the best.

Back then

I've not been completely idle on the backend side, as I learnt the Go language. I'm still a bit conflicted, as Gophers promote reliance on global variables, single-letter variables, code repeat, a memory model that pretends to ensure memory safe operations, while you still could encounter nil objects… Maybe it's me, I still didn't get how to use coroutines and channels, that might explain why I still see Go as a dumbed C.

Insulation

A technology changed my daily routine: Docker. If you're not a fullstack web developer you can't image the relief this technology provides. Before this, installing projects was an actual pain. Some of us remember the hell it's been to have PHP5 and PHP4 to coexist on the same machine. Of course, solutions based on FCGI and the like existed, but conflicts arose too frequently for not being among the first suspects in a unexpected behaviour.

Docker changed this for the best. Having different apps using different stacks exposing on the same port is no longer an issue, thanks to network management.

Of course, the learning curve's a bit steep, as you have to understand some key points, but the gain in agility is tremendous.

A Nightmare on Elm Street

All that is quite interesting, but it doesn't compare to my encounter of the functional world. I believed I did functional programming through C++. When it's true that std::algorithm is based on immutable behaviours, I never actually get the full extent of functional programming. And to be fully honest, the wording confused me, as I considered procedural programming and the use of free functions as a full-fledged functional programming.

Wrapping my mind around Elm completely shattered that believe, and enable me with a new approach of problems. I rely less on the object orientation paradigm, and leverage invariability to think better (and more predictable) workflows. It even improved the way I'm writing shell scripts!

Unfortunately, Elm, or even Haskell for that matter, are using a syntax that not everyone seem comfortable with. Maybe I'll take some time to right a tutorial next year, to help those who can't make sense of Elm syntax.

Beyond

Since this summer I'm working on some project for a friend. It helped in building my confidence after all those years of uselessness. Can't really talk about it, but this my change next year. I have big hopes for it.

I hope to have enough time to explore some tech I just scratched the surface, and on which I postpone the study. Such domain are the IoT and the ominous cloud.

EOL

This year 2019 has been fun and full. I hope this really throw me back on the track to success and fulfillment, as I have to prepare my 40th anniversary next year. This will require some budget!

Saturday, October 5th 2019

Back to basic

It's been such a long time, not much done, but at least now these webpages will be served through secure channels. For a while, I still believed that you could only serve one secured host per IP, as it was the case.

To put in perspective, one has to understand that virtual hosts, the mechanism that allows to serve content for a domain name is an afterthought. A header is of the HTTP datagramm is to be set to tell the web server which host is requested. But when we arrive there, it's to late to change the certificate, the secured channel is already set, and it's not possible to reset it.

To the cost of some privacy hindering, the requested host is provided through the TLS handshake. The protocol extension SNI describe this idea, and is implemented in most servers and clients.

Let's encrypt!

Therefore, there is no more excuse not to encrypt our personnal web resources. There is some technical steps to follow, mind your web server configuration, and it should be fine!

For example, on Debian GNU/Linux Buster (10) you can just issue the next lines, as root obviously:

You need the second package only if you're using Apache Web server.

apt install certbot python3-certbot-apache

# Require a specific certificate for the blog:
certbot certonly --apache -d blog.example.com

# Require a common certificate for different domains:
certbot certonly --apache -d www.example.com -d example.com

I had issues with the modification of my Apache configuration files, so I'd recommand to just require the certificates, and migrate the configuration manually. On each virtual host, change the host port to 443, as follow:

<VirtualHost *:443>
  ServerName example.com
  ServerAlias www.example.com

  # Replace 'example.com' with the domain name
  Include /etc/letsencrypt/options-ssl-apache.conf
  SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/example.com.org/privkey.pem
</VirtualHost>

And redirect your old plain HTTP trafic:

<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com

  Options -Indexes

  RewriteEngine On
  RewriteCond %{SERVER_NAME} =example.com [OR]
  RewriteCond %{SERVER_NAME} =www.example.com
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Then, all you need to do is to test your server's properly configured, and restart it to test:

apachectl configtest
service apache2 restart

Wednesday March 29th 2017

Reset

Nothing interesting have been layed out there for a long time. So let's have a fresh start.

I'm remaking the main website, as the various articles and code are quite out dated.