Tuesday, February 9, 2016

OSX for the First Time


Here is this week's Tuesday post.

I started a brand new job and one thing didn't come up in the interview: they are a Mac shop.  I already accepted the offer, so I decided to learn how to use this MacBook Pro (I think).  It's definitely OSX.
You may be too young to have seen one of these.


I'm a long time user of Windows, and started back in the MS-DOS days of having to make a custom 3.5" boot disk to have enough 640k memory (which Ought to Be Enough for Anyone) available to play games.  Needless to say, I'm (unfortunately) invested in Windows, and have some pretty cool stuff that I can do with my mouse.
I'm not trying to start a flame war, one way or another.

First Day

The first day was mostly struggling with the keys and initial setup.  It isn't Ctrl-C to copy, it's command(⌘)-C.  Basically, everything you want to do with Control on Windows you do with Command on Mac... except for stopping a process on a command prompt, that's still control-C.

The control key goes from best-friend to too-busy-to-keep-up status.

Also, the Function Keys aren't the Function Keys by default.  To press F3 you have to press fn-F3.  I've seen similar setups on Laptops but they usually have a "fn-lock" key.  I'm a programmer, so I use F3 (Eclipse -> Go to Source Declaration) about 20 times a day.  I've used a "non-fn" key about 5 times.

First Week

I discover the oddness and joy of the Magic Mouse.  It looks like a mouse that forgot to finish getting made, and I have to configure it to be able to right click, but I've started liking it.
I'd still like to Copy and Paste using my mouse like I have setup on Windows, but oh-well.

Apple Magic Mouse - See Credits section for attribution.
I have a three monitor set up (laptop screen and two monitors) - more than I've ever had on a Windows box.  This is really nice!  I have my command prompt on my small lap-top screen on the right, IM / Email on my left hand screen and the rest in the middle.

I had to struggle with the Dock (I was using a 3rd party Dock on Windows, so this was easy in general) when it would seemingly randomly move to another monitor.  It turns out, mousing down off of the screen brings the dock to that screen.  This can be done quite easily on accident, but once I know what's going on I can bring it back to my main screen pretty easily.

My left monitor starts randomly going black, and I look at many different solutions to the problem.

The system in general is pretty powerful (I think the company got a top-of-the-line model).

First Month

I upgrade the OS to El Capitan (trying to fix the screen issue as mentioned above), I thoroughly look at all of the System Preferences and I'm able to do regular, day-to-day work on it.


After a month of work-day use, it's starting to fade into the mental background.  It doesn't do unexpected things and it doesn't need excessive updates.  I'm not a 'convert' and probably wouldn't pay the extra money for a Mac.

It's definitely better than a "standard" Windows pre-install with McAfee (no link on purpose) and the other bloatware.


For the small handful of people reading these, thanks!  You'll continue to find good content.
I'm assuming these reads aren't just bots...


Magic Mouse Image: By Yutaka Tsutano from Lincoln, United States - Magic MouseUploaded by Mewtu, CC BY 2.0

Wednesday, February 3, 2016

Consistency from Here On Out

This blog will be updated with a new post on Tuesdays.

As others have pointed out, consistency is key.

Tuesday, February 2, 2016

Blog Reboot: For SCIENCE!

It has been a heck of a year since the last time there was a new post here.

As mentioned on the Thirteen Blog Cliches on Coding Horror no one likes explainations of why a Blog hasn't been consistent.

Moving forward the posts are going to get a little more Computer Science-y, not in the hard-to read way but in the basic core of reproducing / verifying another persons claims.

In practice, I go through a lot of material that I get off of the web and a lot of times there are gotchas or caveats that the original author did not mention.  They will be mentioned and refined here.  There will be basic sections on hypothesis, results and conclusion.  Nothing super-heavy weight.

I'll keep this short: like I said, nothing super-heavy weight.

Thursday, November 20, 2014

Setting JAVA_HOME for Bitnami Apache Tomcat stack as a Windows Service


You can't set it to a different JAVA_HOME, you'll have to set your JAVA_HOME to the Bitnami JDK if you want a consistent JDK.

Setting the Bitnami Tomcat JAVA_HOME on Windows

The Problem

The Bitnami Tomcat stack packages it's own JDK and uses it over the existing JAVA_HOME directory.  This means that if you want a consistent JDK between your unit tests and in-container tests (and you do) you either need to set your usual JAVA_HOME to the Tomcat version or get Tomcat to use the system JAVA_HOME.

The Background

This tutorial is about the latter, as I have already installed the Java Cryptography Extension (JCE) unlimited strength jurisdiction policy files into the system JAVA_HOME (as per a blog post on Suhorish!) and didn't want to do it again.

The Research

After going through several stackoverflow questions and a Bitnami community post I found that they all suggested changing the various Windows BAT files in /bin and /scripts.  This did not work.

The Experiments

Digging into the Windows Service properties I found that the tomcat7.exe is called directly, therefore bypassing all of these scripts.

I eventually decided to use Junction Link Magic to create a hard link from Bitnami/tomcatstack/java to my actual JAVA_HOME... and that didn't work.  The Tomcat service will fail with Application Error 1 and an event error of:
The tomcatstackTomcat service terminated with the following service-specific error: 
Incorrect function.

So I tried to bypass the service by calling the scripts directly, also to no avail.

The Conclusion

This led me to the tl;dr at the start of this article.  I hate admitting defeat.

Thursday, October 2, 2014

Make Ubuntu 14.04 Look Like Windows with Gnome

After setting up dual-booting with Windows 8 and Ubuntu one of the first things that I did was to have my Windows habits and my Ubuntu habits converge to make things (much) easier.  I decided to make Ubuntu look more like Windows.

There are already several posts about having Ubuntu look like Windows, however they have left out that in the default Unity desktop it is impossible to have your menu buttons (close, minimize, maximize) on the right hand side a la Windows (Unity Tweak Tool bug report).  This leads to needing to use an alternate desktop (like Gnome with the Gnome Tweak Tool) to achieve this effect.  It was pretty easy to switch.