Category: Thoughts

My Thoughts on Tabs versus Spaces

There are two debates that will never be solved. The first is VIM vs. Emacs and the second is Tabs vs. Spaces. For the VIM vs. Emacs debate, I use VIM, only because it is the first linux-based editor I learned to use and no, I do not need to look up how to quit out of VIM (it is :q by the way, you can use :wq to write to file and quit). Instead, I would like to focus on the other eternal debate, Tabs versus Spaces. Before I delve too far into the topic, let me share some background.

Day Job

My job title at work is Developer. It has not always been this, but development is what I have been doing during my tenure there. Primarily, I create custom web applications and reports using PHP, HTML5, and CSS. Over the summer I spent some time re-writing some older code that I written. There are a variety of things to think about when making web apps, like following HTML standards, accessibility, alt on images, and the like. One aspect that is often overlooked is how the source code looks when it is viewed in an editor. Many developers overlook this aspect when it comes to web coding. Yes, the primary concern is really making sure the product works and meets standards, yet future maintainability should also be a concern particular when you need to go back and look at some code that you have not looked at in a while. You likely do not want to spend an inordinate amount of time deciphering your unformatted code.

Being able to look at the source code and have it look decent is something that I have been doing for a long time. One way that I achieve this is to line up equals signs. Here is an example of what I mean:

$short1           = "short";
$longvariablename = "long";

I could just use a single space or tab after the end of a variable name, but the code generally looks better when everything is lined up. Usually there are a number of variables within a particular function, file, or other scope of code. I would always try to line up the equals signs. This usually allows me to know what I am looking at without having to look all around the code.

However, while I was reworking the code, I came to the realization that this is somewhat wasteful. Not necessarily because of the extra keystrokes, which is part of it, but because of the amount of space that the file takes up on the drive. There is another aspect that I was thinking about as well.

Side Thought

While I was re-writing the code, there was a nagging thought in the back of my mind, the size of current webpages. With the proliferation of JavaScript-laden webpages, as well as ubiquitous tracking in general, the size of webpages have significantly increased over the past decade. Web developers often overlook

Tabs versus Spaces

My position is to use tabs whenever possible. The reason I think this is due to the size of the file. Examples are always good, so let me provide one. Say you have a file that is 2 kilobytes in size. It is small, and this file uses tabs throughout where needed. The file size is small, and generally smaller than the size of a cluster on a hard drive or SSD. Now, imagine replacing all of those tabs with four spaces. You have now quadrupled the size of the file from 2 kilobytes to 8 kilobytes. Even with this, the size of the file may still be smaller or just at the size of a single cluster on a disk.

Now, let us extrapolate that. Say for instance you have a 1 megabyte file that uses tabs and you replace each tab with four spaces. The file size has again quadrupled but now it is four megabytes in size. Even if the file is only called once in a while, it is still a rather large file. Let us extrapolate this further. Imagine the file is called 1000 times per day and at 4MB, that is now 4GB worth of bandwidth used. If you are on an internal network that may not be a concern, but on the internet it can become one.

Exceptions

I should clarify, the above example is only meant for interpreted code, not complied code. For the source of compiled code, it may not make a difference. It should also be noted that you could use a strip-whitespace function for some languages, however, depending on the language this may result in the script being misinterpreted.

I know some language style guides indicate what should be used, where most indicate spaces. If I was going to release something as open source and to be used by a wide variety of individuals I would likely follow the style guide of the language, but for personal projects, I will continue to use tabs.

Closing Thoughts

Maybe it is just my thinking, but reducing the overall code size of a project is a good thing, particularly if it is a web-based application. Not only will this save on storage space, but it will also save on the bandwidth consumed by users who are often saddled with a bandwidth cap. While I can understand the need for following a style guide, it is also possible that the time the style guide was written that some considerations were not taken into account. Lastly, do not do what the top image does, that is just wrong and is prone to errors.

Apple forces changes for some Parental Control apps

On Friday, April 27th, 2019, the New York Times posted a story that claims that Apple is crippling competitors to its Screen Time feature, by either forcing changes or removing apps altogether.

The story provides some information from several developers regarding that their applications have been pulled and that their businesses have been shutdown and/or the apps they have created had to be modified because “Apple began purging apps that offered similar services.”

According to one developer,

“They are systematically killing the industry,”

In response to story, Apple has provided its reasoning for the requesting changes, and if the apps were not updated, removing the apps.

Part of Apple’s statement says:

We recently removed several parental control apps from the App Store, and we did it for a simple reason: they put users’ privacy and security at risk. It’s important to understand why and how this happened. Over the last year, we became aware that several of these parental control apps were using a highly invasive technology called Mobile Device Management, or MDM. MDM gives a third party control and access over a device and its most sensitive information including user location, app use, email accounts, camera permissions, and browsing history. We started exploring this use of MDM by non-enterprise developers back in early 2017 and updated our guidelines based on that work in mid-2017.

As some quick background, Apple unveiled its Screen Time feature on June 4th, 2018 at their World Wide Developer Conference. The feature is part of iOS 12, which was released on September 19th, 2019.

My Thoughts

I am sure that some will argue that this is Apple abusing its dominant position. However, I do not think this is the case, given that some of the parental control apps were using Mobile Device Management to provide the significant access. As Apple states, third parties have FULL CONTROL OVER YOUR DEVICES. This cannot be understated. For some of these apps, if you install an MDM certificate and agree, that third-party developer now has access to everything on your device. So when Apple says they are requiring the changes due to privacy and security, I think they are being honest about it.

There is a line from the New York Times article from a developer whose app was removed. The reason that the developer received was: “Your app uses public A.P.I.s in an unapproved manner, which does not comply with guideline 2.5.1 of the App Store Review Guidelines”.

Section 2.5.1 of the App Store Review Guidelines states, as of this writing, “Apps should use APIs and frameworks for their intended purposes and indicate that integration in their app description.”. It is the first half of that statement that many developers seem to be reason why they were asked to make changes and/or why their apps were removed from the App Store.

It is only my guess, but it seems to me that the developer was using MDM to provide additional settings, then they were in violation of the rule. The reason they were in violation is because MDM is only to be used by businesses and schools to control devices that they own and provide to users of their company or students. MDM is not designed to allow developer access to end-user devices.

Even though these developers were in violation, it does not seem as though Apple made it clear that the developer’s use of MDM was the reason why their app was being removed.

What Apple Can Do

There are a few different ways that Apple can change things to make robust apps available in the store.

Specifically regarding parental control apps, Apple could provide more granular controls both within the Screen Time section, within the Settings app, as well as allowing developers access to configure these settings. However, I can see the significant reluctance for this to occur. Allowing applications access to change when applications are available, could allow a developer to programmatically limit access to apps, possibly without the user’s consent; which would not be a good situation. If there is no interface for developers, it would honestly not surprise me if there are additional settings with the next release of iOS, possibly with more granular control.

I also do think that Apple could be a bit more explicit when communicating with developers. I understand not wanting to provide exact steps for having applications come into compliance with the App Store Review Guidelines, as there are exceptions to each rule. I also get that indicating exactly how to fix an app might come off as a way of exerting excessive control and explicitly dictating how applications should be created. Even with that, additional information provided to developers can go a long way.

In this case of the removed apps, something along the lines of “The application’s use of MDM certificates violates the App Store guidelines, because MDM is intended for business or school usage”, or something along those lines could have gone a long way to making it clear as to why the apps were being removed.

Closing Thoughts

I think that use of MDM by companies does need to come to light. One of the arguments of the story is that once Apple introduced Screen Time that competing apps were being targeted and removed. However, I do not think this is the case. I take Apple at its word that the reason that they removed the apps was because they were violating user’s privacy and/or abusing the MDM certificates.

The New York Times story does state that some of the developers were contacted in August of last year, about needing to change their apps. Apple likely began looking into these some of the apps, that utilized MDM certificates, after it came to light that Facebook and Apple were violating the use of MDM certificates by doing the same thing. And if Apple is going to revoke Facebook’s and Google’s MDM certificates, then there is no reason why they would not do the same thing for smaller developers.

George Carlin

Today marks 10 years since legendary comedian George Carlin has died. Even though he has been gone for an entire decade, many of the thoughts and musings that he espoused still remain true and still entirely appropriate. Here are a few of my favorite bits throughout the years.

Modern Man

Euphemisms

Incomplete List of Impolite Words

Golf Courses

And as a bonus, his most famous skit:

Seven Dirty Words

As a special bonus, this one has some major parallels to today, even though it was recorded 30 years ago.

The world is worse off place without having him here. I often wonder what he would say about the current state of things in the world. Alas, we shall never know. Thanks for all the great comedy George.

Defining an app

Everybody has heard, and likely uses, the term “app”. In case you are not aware, app is short for application. A decade ago, prior to the release of the iOS App Store, an app was something that ran on a Mac or PC. With the ability for third-parties to create applications, the term “app” became part of the lexicon.

With everyone using the term “app”, the question becomes, how do you define an application? Having used technology for the last 25+ years, the term “app”, and all it encompasses and represents, has become instinctive and intuitive. Additionally, it is not often something I think about.

However, after listening to episode 259 of the Accidental Tech Podcast, I began contemplating the term. What prompted this is something discussed in the episode. Casey List said that he created a Mac app. John Siracusa argued that it was not a Mac app, because it was a command-line based.

This got me to thinking, “How do you define what is an application?”. I generally agree with John, on many things, but in this case I must disagree.

After some thinking, I think I have a way to define an “app. My definition is: “Any set of compiled, or interpreted, code, along with its supporting assets, that is run on a specific platform.” I think this succinctly sums up what an application is.

Some people would likely define an app as something that you interact with and has a graphical interface. Yes, a vast majority of today’s operating systems are graphical in nature, and it was a natural progression to make. However, anyone who requires an app to have a graphical user interface is doing a disservice, not only to themselves, but they are also ignoring a significant portion of today’s computing resources. The disservice is not only to non-graphical applications, but also to all non-graphical operating systems. Some of these operating systems range from most Unix systems, to the more mainstream ones like MS-DOS, BeOS, OS/2, and even Apple DOS.

With this definition, the interaction method does not make a difference. For instance, if you have a Mac app that is a command-line based application, to me, it is still a Mac app, because it runs on the Mac. It may also run on a Linux box but it is still a Mac app. Similarly, if an app runs on iOS it is considered an iOS app.

It may be seem like a small thing, and the grand scheme it is, but it did get me to thinking. Even though you may initially dismiss any command-line interface, you may also fail to recognize that a significant portion of things that you use on the internet every day runs using the command-line. Just some food for thought.

Thoughts on Man in the High Castle

One of the upsides to the way that many shows are released these days is that you are able to consume an entire season/series of a show without having to wait for a new episode to be released every week. One of the downsides to this method is that it is as lot easier to not pick up a show after you have consumed it. For me, this has happened with a few shows.

  • Lilyhammer – stopped after season 1
  • Newsroom – stopped after season 2.
  • The Walking Dead – stopped after season 5.
  • Fear the Walking Dead – stopped after season 1.
  • House of Cards – stopped after season 3, episode 10.
  • Game of Thrones – stopped after season 3.
  • Orange is the New Black – stopped after episode 3.
  • House
  • Grey’s Anatomy
  • Lost
  • Sopranos

Contrast the list above with the list of TV shows that I have seen in their entirety more than once:

  • West Wing
  • M*A*S*H
  • Life
  • Alcatraz
  • Studio 60 on the Sunset Strip
  • Planet Earth

There are likely more shows, but I cannot think of any more at the moment. Given the popularity of the shows above, you would think that I would finish them. However, this has not been the case. So it may be surprising to learn that I have completely finished Season 1 and Season 2 of Amazon’s Man in the High Castle. I have some thoughts and questions about the show.

NOTE: There will be spoilers. Consider yourself warned.

The Background

The series is based on the novel Man in the High Castle by Phillip K. Dick.

Man in the High Castle is an alternate reality story. One that is based on the United States losing World War II. The country was divided up between Germany in the East, with the “Greater Reich” and Japan in the West with the “Pacific States”. There is a neutral zone that stretches between the two regions. This is where a portion of the story takes place, in particular Canon City.

No, Seriously, beyond this is spoiler territory. This is your last chance to turn back

Frank Frink

The story arc of Frank is an interesting one. In the first episode, he insists on bringing Juliana to the Police Station to turn in the film that Trudy had given her, and that she needs to tell them that she’s a loyal citizen. However, by the end of the second season Frank is right in the thick of the resistance, planning and offering to go cause major destruction to the Pacific States headquarters.

Trudy

One of the plots throughout the series is how Juliana is carrying forth what her half-sister Trudy started. Early in the series, Trudy is killed by the Japanese for trying to evade the Kempeitai and for trafficking the films. The last shocker of Season 2 is that Trudy is not actually dead. This bombshell leads to so many questions.

  1. When Juliana’s Mom says that Trudy is not dead, because she can feel that she is not. Was she right?
  2. From the ending of Season 2, it is presume that she is correct that Trudy is not dead.

  3. Did Juliana actually see Trudy in the market?
  4. Again, from the end of the Second Season, it may be that she actually did see Trudy in the market.

Joe Blake

One of the primary characters is Joe Blake. Joe is also one of the first characters introduced. The character of Joe Blake is an interesting one. Joe’s allegiances vary throughout the show. At first he is working for Obergruppenführer John Smith. His first assignment was to bring a shipment of coffee makers to the neutral zone, from New York City. During this long haul, Joe get suspicious and begins looking at the truck and realizes that something does not seem right. So, right from the start, Joe questions his loyalty.

In Episode One, Joe states “I want my country back”, when he getting the job from Mr. Warren, and insists he is not a spy. However, as the series progresses, it turns out that he is indeed working for the Greater Reich. He is a spy for the Greater Reich. It is not entirely clear where his actually allegiances lies.

A fact that comes in Season 2, is that Joe is actually leibensborn, or part of a German program to create a superior race of germans.

The Films

The biggest thread through the series is the films. These films, as one can surmise, show a different world. Some of these films are ones that depict what actually occurred in World War II. Within the Pacific States of America and the Greater Reich, owing a film is considered treasonous and punishable by instant death, as Frank tries to tell Juliana in episode one.

The entire story behind the films is not fully flushed out. The theory is that the Man in the High Castle is the one manufacturing these films, but very little is know about the Man in the High Castle.

The Man in the High Castle indicated that all of the films end up with San Francisco being annihilated by a bomb, except for the one that Julianna gave to Joe Blake, that was subsequently given to Adolf Hitler. It can be presumed that this is the most important film of them all since it may show the only way to not have the entire world destroyed.

Obviously Hitler wants the films destroyed, as is stated in episode one. However, obviously there is a huge cache of them as discovered by Obergruppenfuhrer Smith at the end of Season 2.

The Trade Minister

One of the main Japanese characters is Trade Minister Nobusuke Tagomi. One of the ways that the Japanese divine answers to things, and anticipate what will occur, is through a 5,000 year old book, called the “Oracle”.

You may not understand this. I live by a 5,000 year old book. I ask it questions as if it were alive. It is alive. It tells me you have a purpose. It says superior person in an inferior position, accepting a task graciously brings good fortune to all.

One aspect to Tagomi’s story is that he goes back to the house that he and his deceased wife owned, or would have owned that part is unclear. When he returns his wife is on her way out, and he finds that she has filed for divorce; or one presumes that. As I do not read Japanese I cannot say for sure.

At this point, Tagomi’s story takes us into an alternate reality. Tagomi’s alternate history takes place in the timeline where the United States wins the War. During these sequences he sees his son. In this version, his son marries Juliana, and they have a child. It is presumed that in this timeline that there is a strain within his family. He is still on decent speaking terms with his son, and Juliana, but less so with his wife. With this timeline, I am presuming that he is an alcoholic because his son mentions his father’s “benders”. It is presumed that in this alternate timeline, Tagomi is an alcoholic.

Upon the second viewing, when Tagomi is repairing the broken cup, it symbolizes his attempt to repair his relationship with his family; at least in the alternate timeline. It may seem like a small gesture, but Nori does put it in the baby’s room and allow Tagomi to enter the room and hold his grandchild, so it is a powerful gesture. This, I believe, allows Tagomi to do what comes next.

In this timeline, Juliana is having a get together at Tagomi’s house where they are creating “Ban the Bomb” signs to protest the Nuclear bomb. During this time, she shows a video of a Hydrogen Bomb test that was conducted on the Pacific Atoll. After showing this film, Tagomi tells his wife: “There is something that I must do.” Her reply, “Safe Journey.” Right after this, Tagomi asks Juliana for the film. The following dialog takes place amongst some Cherry Blossoms.

Juliana: “Why do you want this?”
Tagomi: “Proof, that something like this should never happen again.”
Juliana: “I don’t understand.”
Tagomi: “You have all made me happy. Happier than nI have been in a very long time. There are somethings that are more important than happiness. I have duties elsewhere tat I can no longer neglect.”
Juliana: “Are you leaving?”
Tagomi: “We will see each other again. Of that, I am sure.”
Juliana: “Ok, don’t go, I’ll be right back.”

Here is where Juliana begins to leave, she pauses, and when she turns around Tagomi is gone. In the next scene we see Tagomi back at his desk. This is the location where my questions begin.

  1. Was that whole sub-plot just wishful thinking on Tagomi’s part?
  2. We can presume that he thinks of Juliana as a daughter figure, first by providing her a job when she refuses to “perform special tasks” for the general, but through this sub-plot. In particular, when Tagomi tells his son that he is proud to call her his daughter.

  3. Did Tagomi actually travel to the alternative timeline?
  4. It is easy for one to infer that this may be the case, since we see Tagomi back at his desk with the film in hand. Maybe I missed it, but I do not recall him getting this by any other means. At least not that film.

    I have some theories about it all.

The Smiths

Of the entire Smith family, the one character that we are exposed to most is Obergruppenführer John Smith. The Smiths are based in New York City. With the Reich taking over the Eastern United States, it appears that John Smith is the most powerful person in the Reich

The plot with Thomas, which includes Obergruppenfuhrer John Smith, is an intriguing one. In Episode 6 of Season 1, Thomas reveals that he wants to make his country proud, and that there are many places that he would like to go. The statement of wanting to make his country proud. In his eyes, this is exactly what he does at the end of Season 2 in one of the last scenes of the season. In this scene Thomas turns himself into the Greater Reich Hospital because he is a “degenerate” due to his neurological condition.

It should be no surprise that Smith would take the doctor out of the equation, given that there are only three people who actually know of Thomas’ condition. The doctor, Smith, and his wife Helen. The means of which he kills the doctor was one that some could predict. It does show two different sides to Smith. The first being a father that would do anything for his family. Yet, Smith is willing to do what it takes to protect the Reich, and has no problem using people for his own personal reasons, like Joe Blake.

In order to save Thomas, or so they think, John decides to make a ruse and had a letter sent to Thomas indicating that he was picked to go on an expedition. At first Helen is reluctant, since she knows about his condition. She confronts John, at work, and John informs Helen of the entire plan. Ultimately, she decides it is for the best and informs Thomas that he will be going to South America.

Thomas: So you’re letting me go?
Helen: We’re letting you go.

This double meaning has so many implications for the Smiths, and Helen in particular. The way that Helen states it, most would pick up on; but Thomas, both being excited, and only a teenager, does not pick up on the subtly and double-meaning of the sentence.

Even though John Smith is a loyal Senior Officer for the Reich, he disobeys a direct order by acting Chancellor Heusmann and leaves New York to unveil a conspiracy that killed the Crown Prince of Japan a well as Adolf Hitler. Also, he hides all evidence of Thomas’ illness. This includes killing Dr. Adler, as well as confiscating the tapes that implicate that his son has a defect.

It is clear that when John is at the Reich Headquarter in Berlin, and is being praised within the volkshalle for his heroism in saving the Reich, that he is quite uncomfortable. Short of Himmler, John is probably the second most powerful person in the Reich, after Heusmann and his co-conspirtors are removed. This is likely due to his betrayal with his son and hiding his defect.

The Bombing

One of the main plot points is that there is a resistance that is trying to actively work against the Japanese in the Pacific States of America. The bombing happened late in Season 2, and was intended to cause confusion. One question I have is whether Sara and Frank made it out, just like the Inspector Kido managed to. My gut is no, but it would not be surprising if they did, given the unveiling at the end of Season 2. More on this a little later.

Theories

This is my theory on the whole story; thus far anyway. It involves the ability for certain individuals; Those who study the 5000 year old book, and follow what it says, have the ability to enter into, and bring items back with them, from the alternate reality. This theory fits quite well with how the Reich was obsessed with the occult. This would also mean that the Man in the High Castle follows what the 5,000 year old book says as well; hence how he is able to bring Trudy back from the dead. This is similar to how Tagomi can bring the film back with him when he leaves the alternate 1962.

The ability for certain individuals to travel between the timelines is why Hitler wants the films. Given that there are so few individuals who can do this traveling, it is imperative that Hitler gets the films.

This is reaffirmed when Tagomi is talking to Kotomichi, and realizes that Kotomichi is not of the 1962 that exists within the story, but from the alternate 1962. Kotomichi has burns from the bomb dropped on Hiroshima or Nagasaki.

Furthermore, It is possible that Abendsen is able to travel between the two worlds, at will. This is how he is able to get the films, destroy them whenever he wants, and yet can always end up having more films, even after they are burned.

The films complicate any rational idea behind the storyline. The best theory that I have is that there are multiple simultaneous timelines. The evidence for this is that how the Trade Minister obtains the film with the bomb testing on the atoll. In particular, since he disappeared when Juliana turned around, after giving him the film.

This is further evidenced by the fact that the Trade Minister has the visions of his deceased wife as well as his son. We know that his wife is deceased since Juliana brought it up during one of her meetings with Tagomi.

The idea of being able to bring the films back, may also extend to being able to bring individuals between the two timelines as well. This may be how Abendsen was able to bring show Juliana that Trudy was not in-fact dead. This is how Juliana’s mother felt that Trudy was not dead and why Juliana saw Trudy in the market; because while the “true” 1962 Trudy was indeed dead, the alternate timeline Trudy was brought back.

Season 3 Plot Ideas

I do not think that both Frank and Sara are dead, even though they appear to be so. It is possible that one of them was killed in the blast. If I had to put money on it, it would be that Sarah is dead. However, a more unforeseen option would be to have Sara survive and Frank not.

If Frank is indeed dead, it would not be surprising if Ed and Juliana ended up getting together. This theory is based upon Season 2, Episode 9, where there is the flashback to when Ed first meets Juliana. It is clear that she is flirting, at least to some extent, with Ed while Frank is off getting the glasses.

I think in Season 3, Juliana will learn that she also has the power to travel between the timelines, or at least the existence of the ability to travel between the timelines.

Other Thoughts

  • I love the little touches that show the alternate reality, like “Ranger Reich” instead of Ranger Rick. Along this, the signs like “U-Bahn” for Subway, while within the Greater Reich.
  • While Stephen Root (Milton from Office Space) does a really good job as the Man in the High Castle. If he were still alive I think Phillip Seymour Hoffman would have made an even better Man in the High Castle.
  • Given that the year is 1962, the Concorde is still flying and super fast travel is still attainable. Having the capability of fast travel like that would be nice to have, even today, but only if it were financially practical for people.
  • I do like the quasi refrigerator that the Smiths have. I honestly would not mind having one similar myself.
  • Can I have a few of the cars that are shown in the show?

Final Thoughts

It is not often that I end up watching an entire series of a show. I have now watched the entire series twice and enjoyed it even more the second time around. You may miss things the first time you watch it, but that is typically how things happen when you watch any sort of media.

There are a breadth of characters, both primary characters and secondary characters. It is easy to get lost within the story, which is why it is best to really pay attention to everything. It is too bad that Season 3 will not premiere until the end of 2017. It would be nice to have it sooner, but I like the quality thus far.

If you enjoy alternative-reality stories, then Man in the High Castle would be right up your alley. It may start off slow, but it will be well worth seeing it in the end.