Posts

Showing posts from June, 2017

Courtesy Implmentation

Image
I have a great deal of respect and admiration of Martin Fowler . I read his blog and try to absorb as many of his talks as possible. While reading his blog one day, I found his post on the Courtesy Implementation . The first time through, my mind went wonky on me. After a brief mental tussle over over who is smarter, me or Martin Fowler, I considered that I should give it another look. It started to make more sense, but I knew I wasn't going to completely click until I coded it up. I think part of my confusion is that Martin did his implementation in Ruby - which I don't have any experience with. I implemented it in Javascript and everything just clicked. 'use strict'; // box class box { constructor () { this.children = []; } addChild (child) { this.children.push (child); console.log('added ' + child.name); } num_elephants () { var result = 0; for (var value of this.children) {

Error Handling

Image
I found this actual error message today while working with a vendor application: Okay, it wasn't that exact error message. And that's my code. BUT, the first part is verbatim. This is a server-side, vendor-provided, and above all, released product. This is not a beta; we paid someone to give us that error message. What am I supposed to do with that message. My code called your code and it told me "Unable to get resources." Guess I'll just take a nap till those resources can be gotten. Over the years I have seen both vendor applications and custom code where programmers are throwing away valuable information by not properly sending errors up the stack.   You should always, always, ALWAYS send your errors up the stack! * The error above could easily have been something like this: See, now I know something! This is a java.lang.NullPointerException exception in the file MeaningfulError.java - on line 11. That's an informativ

Integrated Windows Authentication with Chrome and Firefox

Image
A few days ago, the Powers That Be at my institution rolled out a change to our web authentication scheme. Previously, we were using a proprietary system that somehow played nice with Active Directory. The changed made Active Directory Federation Services play nice with our proprietary system - making ADFS do the real work. Now, we live in the world of Integrated Windows Authentication. I'm all for that, mainly because the proprietary system was a PITA in a lot of cases. This new change makes a lot of thing easier. Plus, now logging onto your workstation logs you into our webapps! Well, not for me. I use a Chrome and Firefox. Well, not yet anyway .... It works great for Safari users on a Mac. However, I use Chrome mostly and Firefox for development testing.  How on earth do I tell Chrome what servers are okay to do Microsoft Integrated Login with? I guessed there was a way to configure Chrome and Firefox to do this, and it turns out there is! However, it&