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

Advertisements

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;

@Data
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;

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

    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) {
            stage.setMaximized(getMaximized());
        }
    }

    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;
                break;
            }
        }
        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.
        setX(stage.getX());
        setY(stage.getY());
        setWidth(stage.getWidth());
        setHeight(stage.getHeight());
        setMaximized(stage.isMaximized());
        // 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();
    stageSizer.setStage(stage);
}

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

Book Review: The Distracted Mind: Ancient Brains in a High-Tech World by Adam Gazzaley, Larry D. Rosen

41aipvZ90dLMy review of this book is going to sound a bit negative, but my regard for it is not, hence the four-stars.

The book is nicely divided in three sections. The first one is the brain, how it works, studies, it’s history and evolution. The second section is about the effect of the technological world on the mind and vice-versa. And the third is about how to deal with the world, techniques to be more productive, less distracted, more engaged. I don’t have much to say about the first part except that it’s fascinating and some of the studies were new to me and I thoroughly enjoyed it.

The second section is where my surprises begin. For example, it spent a lot of time explaining how you cannot text and drive. I have used my phone while in the car to change songs, podcasts or the route (I use it for navigation) and every time I can clearly see my driving quality going down and thus I only do it in low risk cases (empty highway with lanes on both sides of me, things like that). I can’t believe that there are people that believe they can text and drive.

The second part also spent a lot of time explaining that multitasking is not doing more than one thing at the same time, but doing one for a bit of time, then the other and coming back and that switching has a cost and thus, doing two tasks multitasking is less efficient than doing one task and then the other. Again, is this news? I do multitask but I know both tasks are suffering. Generally I do it for enjoyment or because there’s value in one task being in-progress (silly example: applying coats of paint while reading a book, you need to wait between each coat, so, multitasking has some value).

The third section is what really surprised me the most and made me feel like a very uncommon person. My phone is by my bedside at night in case of an emergency, but only calls from certain people get through; everything else is blocked. I don’t pick it in the middle of the night and I know that when I do, or when I look at it before going to sleep, it’ll affect my sleeping cycle negatively. There wasn’t much new about this in the book but it was a good reminder to improve my sleep hygiene, which I’m going to start doing.

There was a category of recommendations that I found really interesting. Apparently, the presence of a phone, on someone’s hand or on the table, even if it never rings and it’s never touched, even if it’s off, reduces the quality of human interaction. I’m highly skeptical but I’m willing to give it the benefit of the doubt and maybe start avoiding having my phone present during these sort of interaction.

If you are struggling with messages, Facebook, mails, and so on, overriding your life, then, this book might have some good information for you. For me, it didn’t feel very applicably as I’m a work-at-home-entrepreneur, so, Facebook, email, IM tend to be much needed human interaction for me.

Aside from my experience of the book, I think the book is good, and if things are as bad as they are painted in it, more people should read it.

★★★★☆

Buy The Distracted Mind: Ancient Brains in a High-Tech World in USA
Buy The Distracted Mind: Ancient Brains in a High-Tech World in the UK
Buy The Distracted Mind: Ancient Brains in a High-Tech World in Canada

Book Review: Armada by Ernest Cline

zz48df98ecDo not expect the book to be serious or high brow. It’s silly, predictable and satisfying. Very satisfying if you are a geek that enjoys pop sci fi and fantasy culture. If you enjoyed that aspect of Ready Player One, then you are likely to enjoy Armada too. If that’s you, go ahead and read it, you’ll enjoy it and it’s short.

I feel the book could have spent much more time world building. Maybe Ernest Cline didn’t do that because, unlike Ready Player One, the world is supposed to be our own regular world; but there are a few technological changes that left me wondering how much more advanced it was. I feel that later on, when more information is revealed, a flashback with a lot of world building would have helped me getting more into it.

The audio version read by Will Wheaton is great. Most of the book is read in a more or less neutral voice but every now and then he makes appropriate voices (such as Yoda) which I find suit the book rather well.

★★★☆☆

Buy Armada in USA
Buy Armada in the UK
Buy Armada in Canada