If the online world voted, we would have a better world

I’ve seen many cases of this before, but never one as clear as this. Mike Pence, the vice president of the USA, just released a children’s book about a bunny titled “Marlon Bundo’s Day in the Life of the Vice President” and at the same time, John Oliver of Last Week Tonight released a counter-book titled “A Day in the Life of Marlon Bundo“.

How can you make a counter book against a children’s book? Well, Mike Pence is known for being homophobic, for his views that women should not be in the military. Trump even said, regarding talking about gay people “Don’t ask Mike, he wants them all hung”. John Oliver’s book is about gay bunnies getting married. It’s promoting the values that Mike Pence is against.

I’m not a democrat, I’m not a republican, I’m not a feminist (that one is a bit more complex), I’m not gay, I’m not a Tory, I’m not labour, I’m not black. I’m socially liberal, fiscally conservative person. Or something like that. I do believe that tolerance is a good thing, including letting people chose who they love, who they marry, etc. From that point of view I dislike most conservative governments, from Trump’s to the one in the country I live in, the Tories (Theresa May).

I don’t understand how Trump got elected. I do understand why the group of people that voted for Trump did so. There’s a sector of white middle and lower class in the US that feel disenfranchised as their jobs, their way of living, is disappearing. I don’t believe Trump will solve it, but the problem exist and thus people suffering from it were very likely to vote for Trump.

But Trump’s government is anti-gay, anti-black, anti-women and anti many, many other things. All of those demographics surely outweigh the ones voting for him. This is why I don’t understand how Trump got elected. What were all those other people that Trump’s government is against doing on voting day?

Back to the bunny book, look at the reviews for Mike Pence’s book, Marlon Bundo’s Day in the Life of the Vice President:

Marlon Bundo's Day in the Life of the Vice President

Marlon Bundo's Day in the Life of the Vice President - reviews

and now look at the reviews for John Oliver’s book, A Day in the Life of Marlon Bundo:

A Day in the Life of Marlon Bundo

A Day in the Life of Marlon Bundo - reviews

Now, let’s not kid ourselves. All those reviews, for and against both books, by now, are nothing but political commentary. This is political commentary on a neutral website: Amazon. It’s not political commentary on a political site that is likely to have only one side of the argument. And this is happening on other neutral sites as well, such as Goodreads:

John Oliver vs Mike Pence.PNG

By now, this is a popularity contest and a popularity contest that John Oliver is winning by a landslide. A popularity contest in which a story about a gay bunny is winning against the vice president of the United States.

Since an election is nothing else than a popularity contest, where were all those people that are writing reviews on Amazon on voting day? This is a message for everybody, no matter what you believe or what country you are in: get out of your lazy ass and vote!

There are various confounding factors that I want to address:

  • A lot of these reviews might be international and those wouldn’t have an effect on US elections.
  • Reviews are written by people with access to the internet and there might be a high correlation with Internet access and being anti-Trump, gay, lesbian, female, black, liberal. But didn’t Trump win by masterfully using the Internet and social media among other things?
  • John Oliver announced the book last night, so, there might be a pro-John Oliver wave that will die down quickly and in the long run, Mike Pence’s book might prove to be the winner of the popularity contest.









Book Review: Leonardo da Vinci by Walter Isaacson

leonardo-da-vinci-9781501139154_hrThis book was fascinating. I always thought of Leonardo Da Vinci as an artist who did other things aside from painting. This book changed my mind. Leonardo saw himself as a philosopher/scientist/engineer (those were sort of one and the same back then) who also paints; and after reading this book, I have to agree.

I think if it wasn’t for the fact that he didn’t publish his findings, he would be the father of modern science. His science/engineering was strongly empirical. He even disregarded religious explanations for things. I am in awe at many of his findings and discoveries. I’m also amaze at his acceptance of his sexuality, even when part of the world was claiming it was evil (to be fair, Florence in that time was sort-of like the liberal capital of the world).

I’m also glad he wasn’t a tortured soul. Yeah, he had his problems, but he seemed to have lived a long good life and that’s rare for people as exceptional as him. Another rare ocurence is that he seemed to have been appreciated in his time (not as much as later, but at least he was no Van Gohg).

I’m listening to the audio book and there’s a PDF companion that you can use to look at the paintings and drawings being described. I rarely find myself in a position to look at them as I listen to audio books while doing chores, driving, running, etc. Nevertheless the descriptions are good enough to appreciate the techniques but not the art obviously.

In the explanations of why Leonardo da Vinci’s paintings were so good I find myself in awe of the techniques he developed for his art. Specially if we consider that just perspective was something not understood very well long before his lifetime. I guess the renaissance was an important time for the development of art (I know, doh!). Something that annoys me is when the author makes subjective comparisons of the art as if they were objective (best painting, best technique, etc). Thankfully, this is not very common in the book.


Buy Leonardo da Vinci in USA
Buy Leonardo da Vinci in UK

Book Review: Intermediate Licence – Building On The Foundation by Steve Hartley

s-l640I’m not a good person to judge this book because I not only have a technical background in electronics, I also got my American Extra-level license (AC1DM) before this one, so, I had to study all this material a few months ago. This feel like a revision.

Something that really surprises me about the book is that it says the ionosphere reflects radio waves. I understand we use that word in casual speech but I believe a book on ham radio should be more strict and use the correct term: refraction.

For whatever it matters, I passed the exam with a 43 out of 45 questions answered correctly.


Buy Intermediate Licence – Building On The Foundation

Book Review: American Prometheus: The Triumph and Tragedy of J. Robert Oppenheimer by Kai Bird, Martin J. Sherwin

80571For this review I’m considering, without any fact checking or cross referencing, that this biography is factual and true to the events although clearly some of the statements in the book would be hard to evaluate as they describe the feelings of large groups of people.

I knew a bit about The Manhattan Project and it was fun to have another take on those years of science, innovation and destruction. What I didn’t know is what happened before and after in the life of Oppenheimer.

During the earlier years, I was surprised by how active Oppenheimer and other people were in the projects of the communist party. It sounds as during those days, for many Americans, it wasn’t the enemy’s ideology but a potential solution to their ongoing socioeconomic problems. Some glorified the Soviet Union before they knew and understood how tyrannical it was. I can’t begin to fathom at the absurdity of the witch hunt that was McCarthyism and what a negative force it excreted on the American scientific society. I can’t help but notice the parallel with the trial against Alan Turing.

What surprised me the most about what I read in this book was Oppenheimer’s transformation. You could never guess that the boy and young man described in the early chapters could ever become a leader of scientists, a pragmatic that could put a practical goal above the intrinsic curiosity that pushes people into science and achieve so much. I guess the fear of a Nazi world was a great motivator.


Buy American Prometheus: The Triumph and Tragedy of J. Robert Oppenheimer in USA
Buy American Prometheus: The Triumph and Tragedy of J. Robert Oppenheimer in the UK
Buy American Prometheus: The Triumph and Tragedy of J. Robert Oppenheimer in Canada

Book Review: Life in the United Kingdom: A Guide for New Residents by Great Britain Home Office

81DKEZAB9NLThe only real way to judge this book is whether it helps you pass the Life in the United Kingdom test or not and I don’t yet know that. I’ve read the book (it actually took me one full day to go through all of it) and I’m probably going to re-read at least once, but for my actual study I’m using the mock tests at: https://lifeintheuktests.co.uk/life-i… I’ve found many sources of mock tests, but that one seems to have the hardest questions and I personally know someone that passed the test studying from there.

Judging the book by itself, I found it terrible. There’s two reasons for that:
– It’s written for the lowest level of English that would allow you to become a citizen, so, the prose is terse and simple.
– It’s designed to cover just the information you need to pass the test and nothing more, so, it’s almost a regurgitation of facts.

About the last point, for some bits of history that I know a bit about and that are super interesting (WWI, WWII, Scotland’s joining the UK, and a few more) I found the book super boring and skipping all the interesting bits just because it’s not in the exam. It makes sense for this book but it makes for a boring book. I have to admit that it made me curious about some things that I want to read more about and also some places I want to visit now.


Buy Life in the United Kingdom: A Guide for New Residents in USA
Buy Life in the United Kingdom: A Guide for New Residents in the UK
Buy Life in the United Kingdom: A Guide for New Residents in Canada

Restoring window sizes in JavaFX

When doing usability testing of an alpha version of Dashman, one thing that I was strongly asked was to have the windows remember their sizes when you re-open the application. The need was clear as it was annoying to have the window be a different size when re-started.

The new version of Dashman is built using Java and JavaFX and thus I searched for how to do this, how to restore size. I found many posts, forums, questions, etc all with the same simplistic solution: restoring width and height, and maybe position.

What those were missing was restoring whether the window was maximized (maximized is not the same as occupying all the available space, at least in Windows). But most important than that, none of the solutions took into consideration the fact that the resolutions and quantity of screens could be different than the last time the application run, thus, you could end up with a window completely out of bounds, invisible, immobile.

I came up with this solution, a class that’s designed to be serializable to your config to store the values but also restore them and make sure the window is visible and if not, move it to a visible place:

// Copyright (c) 2017 Flexpoint Tech Ltd. All rights reserved.

package tech.dashman.dashman;

import com.fasterxml.jackson.annotation.JsonIgnore;
import javafx.geometry.Rectangle2D;
import javafx.stage.Screen;
import javafx.stage.Stage;
import lombok.Data;
import tech.dashman.common.Jsonable;

public class StageSizer implements Jsonable {
    private static int MINIMUM_VISIBLE_WIDTH = 100;
    private static int MINIMUM_VISIBLE_HEIGHT = 50;
    private static int MARGIN = 50;

    private Boolean maximized;
    private Number x;
    private Number y;
    private Number width;
    private Number height;

    public void setStage(Stage stage) {
        // First, restore the size and position of the stage.
        // If the stage is not visible in any of the current screens, relocate it the primary screen.
        if (isWindowIsOutOfBounds(stage)) {
        // And now watch the stage to keep the properties updated.

    private void resizeAndPosition(Stage stage) {
        if (getX() != null) {
            stage.setX((Double) getX());
        if (getY() != null) {
            stage.setY((Double) getY());
        if (getWidth() != null) {
            stage.setWidth((Double) getWidth());
        if (getHeight() != null) {
            stage.setHeight((Double) getHeight());
        if (getMaximized() != null) {

    private boolean isWindowIsOutOfBounds(Stage stage) {
        boolean windowIsOutOfBounds = true;
        for (Screen screen : Screen.getScreens()) {
            Rectangle2D bounds = screen.getVisualBounds();
            if (bounds.getMinX() < stage.getX() && stage.getX() + MINIMUM_VISIBLE_WIDTH < bounds.getMaxX() &&
                    bounds.getMinY() < stage.getY() && stage.getY() + MINIMUM_VISIBLE_HEIGHT < bounds.getMaxY()) {
                windowIsOutOfBounds = false;
        return windowIsOutOfBounds;

    private void moveToPrimaryScreen(Stage stage) {
        Rectangle2D bounds = Screen.getPrimary().getVisualBounds();
        stage.setX(bounds.getMinX() + MARGIN);
        stage.setY(bounds.getMinY() + MARGIN);
        stage.setWidth(bounds.getWidth() - MARGIN * 2);
        stage.setHeight(bounds.getHeight() - MARGIN * 2);

    private void watchStage(Stage stage) {
        // Get the current values.
        // Watch for future changes.
        stage.xProperty().addListener((observable, old, x) -> setX(x));
        stage.yProperty().addListener((observable, old, y) -> setY(y));
        stage.widthProperty().addListener((observable, old, width) -> setWidth(width));
        stage.heightProperty().addListener((observable, old, height) -> setHeight(height));
        stage.maximizedProperty().addListener((observable, old, maximized) -> setMaximized(maximized));

and the way you use it is quite simple. On your start method, you create or restore an instance of StageSizer and then do this:

public void start(Stage stage) {
    StageSizer stageSizer = createOrRestoreStageSizerFromConfig();

I haven’t put a lot of testing on this code yet but it seems to work. Well, at least on Windows. The problem is that this snippet is interacting with the reality of screen sizes, resolutions, adding and removing monitors, etc. If you find a bug, please, let me know and I might release this a library with the fix so we can keep on collectively improving this.

What Star Trek: Discovery should have been

Star Trek DiscoveryMy opinion of Star Trek: Discovery is positive, but there’s still something that annoys me and since it’s a bit of a spoiler, you should stop reading here until you watched season 1.

Star Trek: Discovery shouldn’t have been a prequel. STD (oops, unfortunate acronym) should have been a sequel to all the other Star Treks we had. I don’t understand why they made it a prequel. It’s not trying to explain an origin story; if anything, it’s destroying Star Trek cannon.

If it was a sequel, in the 25th century:

  • the uniforms wouldn’t be an issue
  • the introduction of new races wouldn’t be an issue
  • the introduction of a human that went through Vulcan academy wouldn’t be an issue (she could be Spock’s protege, instead of Spock’s father’s protege)
  • the Klingons looking different wouldn’t be an issue
  • flat screens and holograms wouldn’t be an issue
  • the use of a sort of holodeck wouldn’t be an issue
  • discovering a way to teleport through the galaxy without needing warp drives wouldn’t be an issue
  • we could have Star Trek: The Next Generation, Voyager and Deep Space 9 cameos.

The BorgWhy make it a prequel then? There’s no advantage to having it be a prequel. You could still have a war with the Klingons if they wanted to bank on their fame (although a war with the Borg is much more frightening in my opinion, specially since peace with the Borg is impossible).

They couldn’t have the flip phones, I mean, the communicators, which apparently are iconic enough to put on one of the posters, but aren’t the badge communicators also iconic? And if not, it feels like a small lose.

I don’t understand this obsession with needles prequels, are people afraid of the future? of moving forward and seeing what happens next?

Book Review: Things to Make and Do in the Fourth Dimension by Matt Parker

81xpnk+4DXLI was expecting a funny read of math curiosities and indeed there was plenty of humor and curiosities in this book in the style of Matt Parker (Google him and watch his videos, he’s great); but this book had much more than that.

Some parts of the book were not easy at all. I’m glad things were not dumbed down too much for us plebes. Some parts I couldn’t understand a lot and I just skipped them. Mind you, this was bed-time reading for me, so, I didn’t put a huge effort into it.

Something that surprised me when reading this book is how much we don’t know. From studying math in school and college it feels like we have most of it figured out, but I like how often Matt points to corners of the math world that don’t look, but probably are, too complex and they are not know or resolved at all. Similarly, how much of the math that we know is rather young, as in 20th century or second half of the 20th century.

I’m happy to recommend this book to everybody that enjoy maths but for people that don’t, they should read this book, as it might change your mind.


Buy Things to Make and Do in the Fourth Dimension in USA
Buy Things to Make and Do in the Fourth Dimension in UK
Buy Things to Make and Do in the Fourth Dimension in Canada

Read this before watching Star Trek: Discovery

I just finished watching Star Trek: Discover and although I’m not blown away, I did enjoy it and I’m looking forward to how the story continues.

There were three points that felt wrong about the series but if you approach them with the right mind-frame you can minimize their impact on your enjoyment because they are more subjective that they look.

Star Trek Discovery

  1. The Star Trek universe: this TV show just doesn’t fit. The uniforms don’t fit, the look of the Klingons don’t fit, the level of technology doesn’t fit, the design of the Starfleet ships doesn’t fit. Just think of it as a reboot and stop trying to make it fit, it’ll hurt. This is what happens when you do a prequel and you are original.
  2. The bullshit: there’s plenty of space bullshit in Star Trek: Discovery and you might feel insulted by it, but if you try to be objective you’ll see that all of Star Trek had a lot of bullshit in it. This one smells slightly different but it’s neither better nor worse.
  3. It’s an exception in Starfleet: the events depicted in the TV show are exceptional in the Starfleet organization and thus it’s not the attempt and success at clean solutions that we come to love and respect with Captain Picard; but if you think about it, it’s not that different from some of the Deep Space 9 episodes.

If you can get past those three points, the TV show can be very enjoyable. It’s not full of politics and morality like Star Trek: The Next Generation; but this is only the first season (go and re-watch TNG season 1 again, it might not be what you remember) and there’s plenty of talk about what’s right and wrong and when the ends justify the means and whether the needs of the many outweigh the needs of the few or the one.

It’s a breath of fresh air to see clean-tech sci-fi produced with state of the art graphics. It looks astounding, even better than J.J. Abrams’ movies (mostly because, I believe, it tries to be even less canon than those). The design of the Klingons, their culture, their spaceships, their armor and space suits, their language and the fact that they speak it constantly is amazing and gives a deep experience of the difference in cultures. I just hope those sets and costumes are not too expensive, I want this TV show to go on.

Book Review: The Psychopath Test: A Journey Through the Madness Industry by Jon Ronson

psychopathtest_custom-9fb3036a713639d308b67686c1b07ba6358eae8b-s6-c30I went into this book with the wrong expectation. When it says “A Journey” in the title, it really means it. The book is a journal. It almost feels like the making-of of The Psychopath Test, instead of the book itself. The whole book is written in first person, with no other order than time passing. It’s like a story.

There are some good nuggets of content every now and then but for my taste, they are too far apart. For most of the book the treatment of psychopathy is very prejudicial, but it’s impossible to pin-point examples because everything is either something that happened (so and so said), something the author felt or thought (you can feel something, like, tall people are evil, without claiming it to be true), or an open question (should all psychopaths be locked up?)

I wish for a more descriptive book that was neutral as to morality. If you are after that, look elsewhere, this is not it.


Buy The Psychopath Test: A Journey Through the Madness Industry in USA
Buy The Psychopath Test: A Journey Through the Madness Industry in UK
Buy The Psychopath Test: A Journey Through the Madness Industry in Canada