This Week I Learned - 2017 Week 20

Last week stuff or the previous posts.

The battlestation have been acting up this week again. Repeated restarts is getting old and rather annoying. Maybe it's a good time to sell it and build a new one instead, probably based on Ryzen. However, the next question to ask is do you want it or need it?

It was so simple that I was shaking my head wondering why it was never occurred to me before. Eating dinner at consistent times of the day will have significant impact on you, both physiological and psychological. Having your dinner before 7 p.m. seemed to have noticeable effects on my body weight and quality of sleep. This is one habit that I need to follow through.

#1 The Starfish Story. Everyone can make a difference in the world, no matter how small the change is. You just have to work fscking hard and stop being lazy. Or maybe taking the opposite approach instead? By adapting a minimalist lifestyle?

#2 While we have web proxy server, it seems that database system also have their own proxy server. For MySQL there are two popular DB proxy servers, ProxySQL and MaxScale. Sadly, I've never implement either one of them in actual production environment. Not everyone works with web scale system.

#3 nftables, iptables replacement. Installation procedure as follow.
$ sudo apt-get install nftables
$ nft --version
nftables v0.6 (Support Edward Snowden)

#4 Google I/O 2017. However, one of less obvious announcement that caught my attention is that the programming language Kotlin have been officially supported on Android. Steve Yegge's long post (HN and Reddit discussion) on the language, as usual, was an interesting read. Maybe it's a good time to start looking into long postponed Android development.

#5 How to start Web Development in 2017. The same old things repeated again and again but getting more and more complicated. Numerous technologies have been superseded by the core essential always remains the same.

#6 Michael W Lucas, interesting author who published both nonfiction and fictions books.

This Week I Learned - 2017 Week 19

Last week post or the whole series.

Slow week but nevertheless, it was an interesting turn of event. Can't wait for more excitements to unfold in coming week. Importantly, never lose focus on your goals over petty things.

#1 One of the best experience shared I've read when comes to employment agreement. Always read the agreement carefully and lawyer up when necessary. Emphasis added by me.
I got sucked into a dispute with a former employer once over intellectual property rights in an employment agreement. They kept trying to sneak in a clause into the agreement in every other paragraph that gave them ownership of, full rights/responsibilities for, and access to, anything I did remotely related to programming or computers outside of work while not on the clock. It was so broad, even my non-lawyer ass knew it was an awful thing. It became a deadlock argument back and forth until I asked if they were accepting liability for any illegal activities I could perform outside of work. Suffice to say those clauses disappeared by CoB the next day in the agreement.
#2 Perl's answers to the Fizz-Buzz question.
#! /usr/bin/env perl
use strict;
use warnings;
use 5.024;

my $t = <>;
chomp $t;

for my $ins ( 0..$t-1) {
    my $limit = <>;
    my $sum = 0;
    map {
        $sum += $_ if ($_ % 5 == 0 or $_ % 3 == 0) 
        } 0..$limit-1;
    print "$sum\n";
}

What interested me is not the solution but the input from the diamond operator (<>) used within this context, which itself is also another interesting story. The diamond operator is useful when writing GNU/Linux console utilities as the operator will work either on standard input or files.

#3 Probably the best sequence diagram to illustrate an HTTP request through CGI. Source from Web Development with Perl.

#4 Why does Google prepend while(1); to their JSON responses? (via HN)

#5 Why you should just use PostgreSQL if you're using Open-sourced database systems? See the number of features (those in green) available. Sigh. Yet we still stuck with MySQL.