Posts

Showing posts from 2020

iPhone 12 mini Bugs!

Image
  I just upgraded to the new iPhone 12 mini, and even though I was initially impressed, I quickly ran into some bugs, a few of which are pretty serious. Many of them relate to the phone not recognizing button presses from the lock screen, so hopefully these all have the same root cause. Unable to answer phone calls! Kind of important for a phone  to be able to answer incoming calls . My phone was locked at the time, and when presented with the "Swipe to answer" control, the phone did not react to my attempts to swipe to answer the call. Buttons on Pin Screen are unresponsive.  When you reboot your phone, you're required to enter your pin, even if you have Face ID enabled. Well, the pin number buttons are unresponsive, often requiring several presses to register...if at all. I had to hard reboot my phone a couple of times to get it to the point where it was, at the most, semi-responsive. Buttons on the Lock Screen are unresponsive.  This is probably the same issue as ment

11 Bad Practices in Software Development (and Their Alternatives)

Image
Software developers often have to contend with the consequences of bad practices (either their own, or those of other developers). How many of us have looked at code we wrote a few years ago and thought "What was I thinking ?" Or, looked at code someone else  wrote and thought the same thing? Unless you are a perfect  software developer who only works with his or her own code, chances are you've been bitten by some of the bad practices listed below...or have inflicted some of them on others (shame!!!!!)! Here's a list of 11 of my least-favorite software development bad practices. 1. Copy/Paste Coding So you've got some complex code to implement, but it's already been done in your codebase, so rather than doing it all from scratch, you just copy an existing block of code and modify it to suit your needs. This saves time, right? Maybe in the short term , but it can lead to duplicate code (which we'll discuss shortly), unnecessary code (code that was copied b

Movie Night at the Virtual Cinema: Son of Frankenstein

Image
  During the COVID-19 pandemic, I’ve been using  SKYBOX VR  on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead.   For the past few years, I've been watching the old Universal Monster movies in the weekends leading up to Halloween. These are the first times I'm seeing these, as they were all released well before I was born, and I never happened to catch any of them before. It's become part of my yearly tradition to try to get into the spirit of Halloween. So, watching this film in SKYBOX VR was the first time I'd ever seen the film. The Universal Monster films, like any series of films, are hit-or-miss

Movie Night at the Virtual Cinema: Phantom of the Opera (1943)

Image
  During the COVID-19 pandemic, I’ve been using  SKYBOX VR  on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead.   This film was a remake of the original silent film The Phantom of the Opera  from 1925, which in turn was based on the novel of the same name. I've never seen the original film nor read the book, and this was my first time watching this movie, so all of this is new to me. I chose this one because for the past few years, during fall and leading up to Halloween, I've been watching the old Universal Monster movies. As this one seemed to be on the periphery of those movies, I chose it to start with, pr

Movie Night at the Virtual Cinema: The War of the Worlds (1953)

Image
  During the COVID-19 pandemic, I’ve been using  SKYBOX VR  on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead.   Released way before my time, this film is very loosely-based on the novel of the same name. In actuality, only the basic premise is the same, with the location and characters being different, and some of the more disturbing elements of the book not being present in the film. Martians invade Earth, tear the place up, then die from bacteria after all hope is lost. Gene Barry plays Dr. Clayton Forrester, a scientist who takes point on the whole invasion due to the lucky fact that he was camping near the locat

Movie Night at the Virtual Cinema: The Incredible Hulk

Image
During the COVID-19 pandemic, I’ve been using  SKYBOX VR  on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead.   I’d only seen this film once before, on DVD, maybe a year or so after it was released. I remember being surprised when it came out that they were rebooting the Hulk only 5 years after the previous Hulk movie (Ang Lee’s 2003 The Hulk ), though that film had been poorly received, and now I wonder if, had the film been received better, if it would have been considered part of the Marvel Cinematic Universe, or if they still  would have done the reboot. Regardless, on the single previous viewing I’d had of this m

A Rather Embarrassing Reason for the "Expression references a method that does not belong to the mocked object" Exception When Using Moq

I've been using Moq for ages, but today while writing a unit test ran into a runtime exception I'd never had before: Expression references a method that does not belong to the mocked object: mock => mock.GetExpiredCredentials(It.IsAny<DateTime>(), It.IsAny<DateTime>(), It.IsAny<Boolean>()).Returns<IEnumerable`1>(.fakeResults, new[] {  }) I couldn't understand why. The method in question was  on the interface, and if it wasn't, the code shouldn't have even compiled , yet it did. Even more confusing was that, when I Googled the error message, all the results seemed to point toward extension methods , and this method was not  an extension method. It turns out, what I had done was to misplace my parentheses (facepalm)! Here's what my original take looked like: _credentialServiceMock      .Setup(mock =>            mock.GetExpiredCredentials(                It.IsAny<DateTime>(),                 It.IsAny<DateTime>(),         

Movie Night at the Virtual Cinema: Judgment at Nuremberg

Image
  During the COVID-19 pandemic, I’ve been using  SKYBOX VR  on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead.   This movie was from before my time and marks the first time I watched a film using SKYBOX VR that I'd never seen before. The film is a fictionalized account of the  Judges' Trial , which was a trial which took place in Germany post-World War II in which German judges were tried for their part in the atrocities of the Nazi party. Released in 1961, it stars several big-name Hollywood stars of the era, and is part of the United States National Film Registry. I have to admit that I have only a passing

Movie Night at the Virtual Cinema: Star Trek V: The Final Frontier

Image
During the COVID-19 pandemic, I’ve been using  SKYBOX VR  on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead.   In my last Movie Night at the Virtual Cinema , I watched 2001: A Space Odyssey , widely considered a Sci-Fi classic. This time around, I'm at the opposite end of that spectrum with Star Trek V: The Final Frontier , widely considered the worst of the Star Trek films, at least among those starring the original cast. I've watched this one many times, but never had the chance to catch it in the theater, and if you've seen this movie you're probably wondering why I chose this one. I'll be hon

Fixing the "Please add a @Pipe/@Directive/@Component annotation" Error In An Angular App After Upgrading to webpack 4

I'm currently in the process of upgrading an Angular application which does not  use the Angular CLI from webpack 2 to webpack 4. The incremental upgrade from webpack 2 to 3 was easy, but once I made the jump from 3 to 4, I encountered a lot of problems. I went through them one by one, but the one that had me stumped was the following: Unhandled Promise rejection: Unexpected value 'MakePositivePipe' declared by the module 'SharedModule'. Please add a @Pipe/@Directive/@Component annotation. ; Zone: <root> ; Task: null ; Value: Error: Unexpected value 'MakePositivePipe' declared by the module 'SharedModule'. Please add a @Pipe/@Directive/@Component annotation. The code was transpiling/compiling fine, but this error was occurring when I'd navigate to a page containing this pipe. This code has worked fine under webpack 2 and 3. I made sure that the pipe was being set up as a declaration , which it was. What finally  corrected the issue for me w

Movie Night at the Virtual Cinema: 2001: A Space Odyssey

Image
During the COVID-19 pandemic, I’ve been using SKYBOX VR on Oculus Quest to watch movies in a virtual cinema that I didn’t get to see when they were theatrically released. The illusion of sitting in a movie theater is a convincing one, minus any reaction from the (non-existent) audience. It doesn’t change my perception of the films I’ve been watching — I’m just doing this for fun: to whet my appetite for going to the movies, and for a little VR escapism. Warning: Spoilers ahead. I hadn’t been born yet when 2001: A Space Odyssey  was originally released, but I’ve seen it several times, the first time probably when I was about 10 years old on TV one night. Truth be told, I found it boring  (and I wasn’t alone: the film got mixed reviews when originally released), but I gained an appreciation for it in later years.  The film begins during prehistory, with humanity’s ancestors being influenced by a strange alien monolith, before flashing forward to 1999 where a similar object is found buri

Path Argument Error When Using webpack With less-loader

I'm currently in the process of trying to upgrade the version of webpack in an old Angular project, which doesn't use the Angular CLI. I made the necessary modifications to upgrade from version 3 to version 4, but was getting the following error with less-loader : (node:672) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined     at validateString (internal/validators.js:112:11)     at Object.normalize (path.js:266:5)     at new LessError (C:\DevGit\MyOrg.Portal\MyOrg.Portal.Mvc\Resources\ng\node_modules\less-loader\dist\LessError.js:15:169)     at C:\DevGit\MyOrg.Portal\MyOrg.Portal.Mvc\Resources\ng\node_modules\less-loader\dist\index.js:62:14 This had me tweaking the webpack config endlessly, until finding out that this is apparently an issue in less-loader v6. When I downgraded to v5.0.0, the problem went away...leaving me with the next problem to troubleshoot. Baby steps! One down,

At The Movies, Part 2

Image
In my previous post , I talked about Siskel and Ebert, and how much I enjoyed their show. In this  post, I want to talk about my own  love of the movies. There’s something about the moviegoing experience that I really enjoy, but I can’t really put my finger on it. It may just be the atmosphere, being in an auditorium and a large screen. But it also might be the trailers, or the dimming of the lights as it all starts, or the reaction of the crowd. I remember seeing Terminator 2  on opening night, and the audience just gasping  as Schwarzenegger did that first one-handed shotgun cocking while riding a motorcycle. While I enjoy watching movies from the comfort of my home, there’s something to be said for being in a theater. Under normal circumstances, I might get to the movies once or twice a year, and some years not at all. But with the current COVID situation, it’s not an option. However, I found an alternative, a not-quite-the-same but still enjoyable way to experience that theater exp

At The Movies, Part 1

Image
When I was a kid, I loved whenever I would happen across Siskel and Ebert’s TV show. I think it was shown at 7pm on Saturdays in my area, but I don’t remember ever setting out intentionally to watch it — I’d just happen to catch it. I always enjoyed getting to watch clips from the new movies they’d be reviewing, and hearing them give their thoughts — and often debate — about the films. It was one of two movie review shows I was aware of, the other being Sneak Previews  (which I learned only relatively recently had originally been their  show). But I preferred Siskel and Ebert’s At The Movies  (and later Siskel and Ebert and The Movies ). It wasn’t just the format of the show, but its hosts. And thanks to YouTube, I’ve been able to revisit a lot of their reviews, including a lot I’d never seen before. I’ve had a blast watching these clips and checking out their reviews of movies I like. We didn’t always agree, but I always enjoyed hearing their thoughts. Sometimes, they would skewer a m

Music To Code To

Image
(Disclaimer: Your mileage may -- and probably will  -- vary.) In 1975, psychiatrist Mihály Csíkszentmihályi coined the term  Flow , which Wikipedia describes as "a flow state , also known colloquially as being in the zone , the mental state in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity. In essence, flow is characterized by the complete absorption in what one does, and a resulting transformation in one's sense of time." We've probably all experienced being "in the zone" at one time or another in our lives, and most of us would probably agree that we do our best work when we're "in the zone". As a software developer, music can be a help or a hinderance. It can be a distraction, or, with the right music, it can become a background soundtrack which helps us attain flow. In my personal experience, I've found that even if I love a par