Sunday, July 26, 2020

"NodeJS cannot be opened" dialog box on MacOS


If you're using MacOS Catalina or newer, using your IDE may get frustrating.  In Spring, every few seconds I'd get a dialog warning me that nodeJS isn't signed and MacOS can't identify if it's malware. This is an easy problem to solve if you can identify the executable because once you do, you use the context menu to "open" it anyhow which tells MacOS that "yeah, the user knows it's not signed but they are confident in this executable."  However the problem in this case is that because this is happening via the IDE, you've no idea in which of the many locations you've got a Node is the binary your IDE is using.  Not an easy problem to solve.

Here's how to solve it

To narrow down your search for which Node binary by paying attention to the date in the warning dialog.

Put MacOS Finder to work:


Refine the search by date and type:


As you adjust the search criteria below, the list of filenames with "node" will adjust in a reactive manner.  I discovered the "Kind" by adding a "Kind" column to the search results which showed "Kind."  This is also the same "Kind" which you see when selecting a file in Finder and examining its "Info." The Kind of "Unix Executable" is synonymous with Terminal Document in this case.

Then give the "node" executable the "context menu->open" treatment:


The above action will open a terminal window and launch Node. What this does is register the app with MacOS that the user has marked the binary as trusted even though it wasn't signed. Once the terminal running Node is launched, you can close terminal (or double ctrl-C), as we've achieved the result we needed—registering it for execution. At this point, try out your IDE and you shouldn't see the dialog box anymore.




Friday, May 8, 2020

Full Stack Java Web App, Fact or Fiction?

An Agile tech coach's job is never done in a world where relatively few people can do eXtreme Practices such as TDD. Part of the job is entertainer (make training fun), part of the job is teacher (how the heck do I test this!), and part of the job is adoption (how to get my organization to support me doing this). So I'm faced with creating an enjoyable—no, exciting!—experience for training Java developers TDD.  So the formula for success looks like this:
  1. Useful modern technologies for mainstream workers
  2. Fun
  3. TDD
So perfect! I want to take my class on TDD through building a three tier web application, full stack, in Java: DB, micro services, web API.

But WAIT! Can one use Java to build a graphical user interface in the web browser?


Well it turns out you CAN.  However I had to sift through a lot of claims about "full stack Java" which sometimes means building TCP/IP clients for macro test automation. But come on! Nothing impresses the folks at the IT bar like showing off a build that actually works on a smart phone.

But I've got an additional "hangup." To me, modern technologies in the UI ought to be *reactive* (event driven), meaning, when an event happens on the server side, it updates the web clients.

So I went through RayGun's article on 17 popular Java frameworks, investigated them, and filtered the list down to three potential candidates.  See the following table.


Conclusions

So ladies and gentleman, full stack Java Web Apps are FACT!
  • There are actually THREE frameworks that will allow you to use Java to build a web application view!  (See "yes"s in the third column.)
But full stack reactive Java web apps need more investigation.
  • The big problem for me is that none of the reactive choices use Java to describe a view, with the exception of some branches of GWT.
If I care only about reactive and give-up on using Java to build the view, then there are three frameworks that would do the job. But that means bringing in TDD in Javascript (for functionality in the front end) into my Java class.

Next steps

It comes down to the practicality of TDD in one of the GWT branches that are reactive.  If it works, then I'm all good.  If it doesn't do reactive well or if it doesn't make sense to do TDD in GWT, then I move onto one of the other reactive alternatives.

I'll build some POC's and evaluate what will work for a Java TDD course that's fun and uses mainstream technologies.

Monday, April 13, 2020

Splitting a Cell in Excel


I confess to be a Mac fanboy but sometimes I need to work with people who use Excel rather than Numbers. One problem that took twenty minutes of searching to figure out (but is easy to do with Apple's Numbers spreadsheet) is how to split a cell into two pieces.

After watching YouTube and reading comments from others who remained confused, it finally hit me: Excel ONLY provides "merge cell." And you don't technically need "split cell" because you can split cells already with "insert row." So the idea is to insert a row and then merge the parts that you don't want split.

Here are the steps: Insert a row, merge cells that shouldn't be split, done!

Example

Here is an example.  I want to split the cells to the right of the headers that label the days of the week.

Insert Row

Since insert row inserts above the selected row, you need to select the row beneath your target.  So to do Monday, I had to select the row beneath Monday.

Merge other Cells

Select the Monday cell and the cell beneath, then click on "Merge & Center" and then "Merge Cells."

Wrap-up 

So Excel doesn't believe in cell division, only cell fusion. :-) And I'll have to either repeat the process more times for each day of the week or copy paste the formatting. If you want to do something different such as split cells vertically, then follow the same process but insert a column rather than a row.

Saturday, April 11, 2020

Games for the Virtual Office

Games you can play with colleagues at the virtual office.

The Agile Thoughts podcast will produce an episode on games for the virtual office. Please share your favorites and I'll put them in the episode. You can share by either Tweeting to @LancerKind, commenting on this post, or adding to this Hacker News thread.

Click here for Agile Thoughts

Tuesday, March 10, 2020

USB 3.0/3.1 ruins Wi-Fi connectivity

Have you ever had a webcast or video conference to attend and then the very moment you need your internet to work smoothly, it performs like elves are hanging tinfoil ornaments on your Wifi router? Perhaps you, like me, are hooking in keyboards and docking stations via the USB ports, and doing so could be ruining your internet connectivity!  And not by a little, but a LOT.

USB 3.0/3.1 Hubs

Honestly, USB 3.0 hubs should come giant warning labels.  Many USB devices you've been buying have some fine print that mentions "may reduce performance of Wifi."  For the last decade (since the time I got my first USB 3.0 hub) I've been having strange wifi performance which then causes phone calls to my network provider.  So for years I've been barking at the wrong people, because it turns out, USB 3.0/3.1 hubs cause interference that interfere with 2.4 GHZ wifi!

Let me break it down for you with a Behavior Driven Development scenario:
Given laptop And usb 3.0 hub
When using Wifi over 2.4GHZ
Then internet performance is greatly reduced (reduction by 20% - 100%)

Check out these before and after photos done on a late 2019 Mac Book Pro and pay attention to the speed difference from when the blue cable is plugged in and when it is not (the cable leads to my 3.0 USB hub which sits about a foot away from my laptop):
USB 3.0 hub disconnected
USB hub connected
I've replicated the problem every other laptop I've in the house and the problem is completely reproducible.  The amount of reduction varies between 20%-100% (100% mean no data moves from or to the laptop).  USB 3.0/3.1 devices work fine when directly connected to my laptop. The problem happens when a hub is added.

Solution: Turn off the 2.4GHZ channel on your Wifi

Most people have their WIFI access points sending BOTH 2.4GHZ and 5GHZ. 2.4GHZ Wifi has a longer range at a slower maximum speed.  5GHZ Wifi has over double the speed but degrades over range faster than 2.4GHZ.  This means that most people who buy Wifi routers, let the routers use both channels (2.4 and 5 GHZ) in which case their laptop will shift between the two channels as needed.

But this is a bad idea when using 3.0 or 3.1 USB devices.

Configuring your Wifi router to turn off the 2.4GHZ radio solves the problem with the laptop.  But if you're like me, you've a few things like printers, Xbox 360, or home automation that only connect on 2.4ghz.  So now what?

Solution 2: Differentiation 2.4 and 5 GHZ with different SIDs

Go back to your Wifi router and rename the SSID for the 2.4 GHZ channel to ... 2.4, and don't tell your laptop about that other SSID.  Then you're laptop stays off of 2.4GHZ and your older devices can use the 2.4GHZ channel.

Solution 3: Use a Wired Internet Connection

I've not tested this, but I expect that a hardwire connection into the laptop will solve the problem whether or not a hub is plugged in, as long as your laptop doesn't suddenly decide to grab Wifi.