About Greg Moore

Founder and owner of Green Mountain Software, a consulting firm based in the Capital District of New York focusing on SQL Server. Lately I've been doing as much programming as I have DBA work so am learning a lot more about C# and VB.Net than I knew a couple of years ago. When I'm not in front of a computer or with my family I'm often out caving or teaching cave rescue skills.

Nothing to Prove

This past weekend was a busy weekend for me. Thursday night I helped do the offensive door for my wife’s hockey team in the first game of a 3 game tournament. Despite only having 9 players (plus a goalie) they tied it 2-2 against a far larger squad. Quite impressive really seeing them up their level of play. They in fact got accused later of stacking the team with college students. Truth is, about half the team was in their 40s or above and the others late 20s or 30s. Not bad.

Friday night the family went to see Captain Marvel. I’ve mentioned before my daughter’s love of Star Wars. She’s also a fan of superheros, both in the comics and movies. We’ve seen a number of them together, including Wonder Woman and now Captain Marvel.

As a father I’m glad for movies like The Last Jedi, Wonder Woman and Captain Marvel. The last two might be called superhero movies, but they’re really about being a hero in general. You don’t need superpowers to be a hero. You need to be a person who decides to do the right thing at the right time. When Wonder Woman decides to cross the No-Man’s Land, she does rely on her superpowers to keep her safe, but she acts because she knows she has the power to make things better. Similarly, Carol Danvers is faced with a choice of doing what is easy and she has been taught to do and what is right. She’s a hero, again not because of her powers, but because she chooses to do the right thing.

Wonder Woman and Captain Marvel are great movies for a number of reasons; but I think foremost because they truly focus on their stars. Steve Trevor and Nick Fury are supporting partners, not just in theory, but in the way they often take their lead from the main characters. Both are strong and powerful people in their own right, but recognize they’re among their betters. And, aiding their partners doesn’t hurt their masculinity, and they realize that.

I enjoy these movies because, while, as far as I know, my daughter doesn’t have a magical lasso, nor can she shoot photon bursts out of her hands, she has role models. While yes, her favorite comic book superhero might be Batman, she really enjoys having these superheros as models.

On Saturday, she and I drove 2.5 hours to Binghamton NY for her team’s competition in something called “Odyssey of the Mind“. While her team didn’t do as well has hoped, it was still a great time to bond and talk, including about Captain Marvel and role models.

My wife had her second game of the tournament on Saturday and when she called to give me the score, I could pick up on her excitement even before she said they had lost, 1-0. But this time with only 8 players instead of 9, it was in some ways even more impressive than the Thursday game.

Sunday rolled around and since we had to take our son to the train station to go back to college, it was easier to bring him to the game first. So, he got to watch his mom’s team, again with only 8 players actually win, 3-1 and come in 3rd out of 6 teams!

It was a fitting cap to a weekend of watching powerful women.

Oh, and besides Wonder Woman, Captain Marvel, and my wife’s hockey team be great role models for women, I think they’re great role models for men.  Men, you can have powerful women in your life and it doesn’t weaken you or make attack your masculinity.  If anything, it can help you be a better man.  So don’t just take your daughters to see Captain Marvel, take your sons.

 

Design Thoughts

Ever look at a product and wonder, “why did they design it that way?” I know I have, and I have some examples I want to bring up.

Years ago, over dinner, I had a programmer from our Wisconsin office basically ask, “why the hell is your file system for your web servers setup the way it is?”  It was a fair question. It wasn’t something one would normally see.  But before I explain that…

Like any modern American, I’m physically incapable of being more than 10′ from a flat screen TV in my house.  We have several, including one in my office and one in the kitchen. I couldn’t tell you the brand of the one in the kitchen (well I could, but I’m too lazy to go downstairs and find out) and the only reason I can tell you the brand of the one in my office is because I can see it from here. It’s an Inginsia brand.

Both serve the same function: they allow me to watch TV. But both have design quirks.

Their button layouts are a bit different (note the layout of the numbers and the volume/channel control buttons.)

Kitchen TV Remote

Kitchen TV Remote

Office TV Remote

Office TV Remote

The kitchen TV also has a built-in DVD player, so it has additional controls for that.

So obviously, there’s different design philosophies and requirements here. But I want to go a step deeper and talk a bit about functionality.

The kitchen TV remote, if you mistype a number, you can hit the Vol – button and it will essentially backspace and delete the number. Actually a handy feature.  The Office remote has no such functionality, though hitting EXIT will remove the entire channel already entered.  Score one for Dynex. (Ok, I did go downstairs so I could grab the remote and take a photo).

But, the Dynex has one annoying quirk I’ve never figured out. When I hit the OFF button, there’s a noticeable delay of 1-2 seconds before it actually turns off. For the life of me, I have NO idea why. I mean I’m turning off a TV. It’s not like I’m shutting down a computer where it has to write the contents of memory to disk and perform other tasks. Sure, maybe it has to save the last channel I was tuned to, but it could do that right after I tuned into that station. Same with the volume.  Every other TV in the house, including my office one, when you hit the off button, turns off instantly.

I’m reminded a bit of early computers that had the big red switch. There was something satisfying about turning off an early PC. You knew it was instantly off. There was no two questions about it. Now, shutting off a PC is a far more complex operation and can take sometime.  But a TV? I’d love to know why the kitchen TV takes a long time to turn off.

Now back to the file design the programmer was asking me about. Essentially we had 5-6 web front ends, each with a virtual directory in IIS pointing to a NAS. Not an entirely awful setup, but uncommon at the time.  We were offering a web platform to newspapers so they could publish their content. Originally we tried using a 3rd party package to make sure the content on all the servers was always in synch (since a newspaper could upload content at any time to any of the servers and wanted it available instantly). What we found was sometimes we’d get into race conditions where files could actually end up erasing themselves. The 3rd party company kept assuring us they had the solution. Well after a desperate call at 4:00 AM call from my on-duty NOC person, I drove into the office, scrambling to figure out a better solution. On the drive, the idea of using the virtual directories to the NAS occurred to me. We implemented it in about 30 minutes and solved our problems. It was supposed to be a temporary solution until we came up with a more robust, permanent solution. But, 18 months later it was still in place, working great and I was explaining it to our out of town programmer. He went from, “that’s nuts” to “Hey, that makes a lot of sense.”

So, I like to think that when there’s a design I don’t understand, the designers at the time had their reasons. But, to be honest, I’m not always sure.

For example, the photo that should be heading up this article, of a shampoo bottle and a bottle of conditioner, both from the same manufacturer, both designed to be cap down, are printed the opposite way. The only reason I can think of that makes sense is so that in a befuddled, sleep deprived state, I can more easily determine which is which. But even if that is the answer, why this way, and not the other? Inquiring minds want to know!

And yes, the shampoo bottle can be placed cap up, but the conditioner bottle can’t be. Again, why? The viscosity of the two aren’t that different. Again, inquiring minds want to know.

Shampoo/Conditioner bottles

One of these is upside down!

 

Don’t…

call yourself an ally.

Just don’t.  You may think you’re an ally. You might actually be one, at times. But, don’t call yourself an ally.

Note, I didn’t say you can’t be one, nor did I say you can’t strive to be one. I’m simply saying don’t call yourself one.

I don’t care if you volunteer for the local LGBTA+ outreach group, if you serve on a women in tech diversity panel, or have all the “right” stickers on your car or laptop. You can do all the right things and be an ally, but don’t call yourself one.

Now, if members of the groups you’re helping want to call you an ally, that’s great. You’re doing good work. You’re doing something right. And it’s ok to enjoy the praise and thanks, a bit. But, still, don’t call yourself an ally.

Here’s the thing, I’ve got about every privilege box I can check in the US. I’m white, cis-het male, with a decent income. I have friends and family members that don’t quite hit all those boxes. I like to think I use my privilege to help others.

And it’s true, I’ve found in online debates I can say almost the exact same thing one of the people identifying as female says and somehow my words get taken with more gravity.

And yes, in the IT field, I’ve seen multiple times my coworkers talk over or ignore someone who wasn’t cis-het male, despite the other person’s knowledge and wealth of experience.

I’ve used my privilege to try to bring equality into the IT spaces I’m in. Sometimes I’ve succeeded, sometimes I’ve failed.

I’ve called others out for homophobic jokes, cat-calling and more.

But, as I’ve grown older, and I like to think wiser, I’ve realized even more, how I can’t call myself an ally.

It’s not for lack of effort. Let’s be clear, NO amount of effort will allow me to call myself an ally. And here’s why:

I’m not a member of the groups I’m trying to help. I’ve never truly experienced the discrimination and bigotry they’ve faced. Even when I’ve been associated with them, I’ve come to realize I’m “other”. This isn’t a fault or a failing, simply my reality. I can be among a group of gay men celebrating a friend’s birthday at the Green Lantern in Washington DC, and be perfectly comfortable, but know I’m “other”. And they know it too. The next day at work, even if I encountered a homophobic coworker, I can still disassociate myself from that weekend’s activities. It’s not a core part of WHO I am, it’s simply a part of something I did.

If I support women in tech, and I’d like to think I do, no matter how well I listen, I won’t truly have the gestalt experience of walking to my car at night wondering, if something happens, will someone’s first question be, “Well, what where you wearing?”  I’ll never be in a meeting and have an idea shot down and wonder, “was my idea dismissed because it was bad, or because of my gender presentation?”

I will always be “other”.

In a related manner, I can, intentionally, or unintentionally stop being an ally in an instant. I can intentionally choose to sit down and not be an ally.  Or, I can make a misstep and fail as an ally. And I don’t get to decide if I’ve succeeded or failed.

I will give an example of this: via Twitter I saw one woman speaker comment on how she felt offended that she had been asked, in part because of her gender, to speak at a conference. The person approaching her had made it clear he wanted more women to speak. Generally, this could be seen as being a good ally; making sure conferences aren’t full of manels and/or only have a slate of male speakers. Other women stepped in and said they wouldn’t be offended at all, that they appreciated the effort to include more women, even if at times it came across as ham-fisted or overly obvious.

So here’s the thing, the person asking probably thought of himself as an ally and might have called himself one. But, clearly the first woman didn’t agree, but others did. This is why he can’t call himself an ally, but others can. Perspective makes a huge difference here.

So in conclusion, let me end with what I opened with: not only can you work to be an ally, I would in fact encourage you to work to help others obtain the privileges and opportunities you have. BE an ally. But let OTHERS determine if you’re their ally. If they call you an ally, great! Keep it up.

If they however tell you that your actions or words are not helpful, listen to them. They are in the best position to determine what helps them. Unless they ask for input, don’t tell them what they’re doing wrong or why they’re wrong to not accept their help.

42

How many roads must a man walk down, before you call him a man? – Bob Dylan

There’s a trailhead to Whiteface Mountain in the Adirondacks that starts on an old forest road. It’s probably left over from the days of logging. I haven’t been on this trail in probably 20 or more years. It might be closer to 30. And yet, for some reason I can picture it in my mind almost perfectly. Or at least I think I can. I mean without going back, how can I be sure I accurately remember it? But the reality in my mind is that I recall it perfectly.

I also remember key points along the trail. Sometimes I will wander down this road in my memory and remember the joys of this particular hike. I should do it again someday.

There are many physical roads like that that I travel down in my mind and hope to go back to again someday.

But, at night, as I lay in bed, there are some roads in my mind I find I just can’t travel down anymore. Or at least not now, perhaps in the future. Last night as I was drifting off, I started to remember my father’s property in the years soon after he bought it. It had a number of outbuildings that had been built over the years. I’m still not sure what they were used for, since it was a never a working farm or anything like that, and even so they weren’t the sort of buildings one would use for such a purpose. I do recall one had some old nudes pasted on the wall.  I remember having grandiose plans for turning one into sort of a clubhouse for me and my friends, but for various reasons… life happened and that didn’t.

Travelling down this particular road started to bring up other memories of my father, who would have been 72 this year. And I stare down these lanes of memory and have to stop myself. Some I know I can explore and laugh and smile as I travel down the fond memories, others… well I have built gates across them. The memories are too close and too raw and I fear if I travel down them any distance I’ll get lost in those memories and the pain will be too much. So, I look over the gate and say, “not now…”

Gradually I’ve found some of those gates I can open, but not all.

The Road goes ever on and on,
Down from the door where it began.
Now far ahead the Road has gone,
And I must follow, if I can,
Pursuing it with eager feet,
Until it joins some larger way
Where many paths and errands meet.
And whither then? I cannot say. – JRR Tolkien

My father introduced me to both the poet and author I quote here, but he was more fond of one, and I the other. I’ll leave it to the reader to guess or know which is which.

So, I don’t know how many roads I have to travel down, or how many I can. But they’re there, beckoning.

Too Many Tabs Open

It’s been one of those “busy-slow” weeks. I get these sometimes when I’m consulting. On one hand I’m busy, but work is slow. What do I mean? Well Monday I was on a train all day (literally other than a 1.5 hours layover in NYC) coming back from Atlanta. That’s another story but suffice to say, I wasn’t much in the mood to get work done. Tuesday, when I generally write this blog, I had a couple of customer meetings and was busy, and then the rest of the day busy with non-client work. Same with Wednesday and Thursday.

Finally today, I had a few minutes to catch up on some stuff. I FINALLY took the time to look at one of the tabs I had open in my browser. Admit it, you do it too. “Oh look, that’s cool I want to read/watch/listen to that, but not now, I’ll just keep that tab open.” And then weeks later you’re like, “what is this tab?”

In this case it was a video post by Grant Fritchey on “Why friends don’t let friends upgrade to SQL 2014.”  I was curious about this because at a client I had to recently upgrade two servers to SQL Server 2014. I had preferred SQL Server 2016 or 2017, but the 3rd party software vendor said “no”.  Fortunately nothing bad has happened, but, it’s posts like Grant’s that I appreciate because it helps broaden my knowledge base.

One thing that makes humans incredible is our ability of language and ultimately our ability to create forms of communication that transcend time.  None of us can learn EVERYTHING. But what we can learn is who knows more than we do, or how to access that information. If I want information on query tuning, I’m going to ask Grant or pick up one of his books. If I have a question on Power BI, I might reach out to Kellyn Pot’Vin-Gorman or Cathrine Wilhelmsen. In other words, I don’t need to be an expert on everything, though I’d like to be! I just need to know who to reach out to.

Similarly with my cave rescue world. I’m proud to say I work with some of the greatest people in the world, people who literally have written the book on cave rescue. And yet, at our recent meeting (the reason I was down South), two of my colleagues, Roger Mortimer and Eddy Cartaya reported back on their trip to Europe where they attended the ICARS conference and brought back some great information on how the Europeans are doing some things differently when it comes to cave rescue. This has prompted some discussion between Roger and myself on some medical topics.  Again, none of us are the complete expert on the field, but we know enough to know what we know and don’t know and how to learn more.

So, keep those tabs open and keep adding to them. I know I’ve got at least one video on air plane accidents I need to listen to when I get 30+ minutes. What tabs do you have open?

 

SSMS 2017 RegEx

A short technical post on one thing I’ve found annoying.

Anyone who has worked with computers in the last decade has probably used regular expressions in some form or another, or “regexs” as they’re known as. First (as far as I know) popularized in Perl (though their history stretches back to the 1950s), they’ve become standard fair in most languages and tools and are very useful for complex matching and find and replaces.  And for anyone who has worked with computers for over two decades they often look like line noise when someone would pick up the phone in the house when you were dialed in via an actual modem.

That said, I first learned about their value in SQL Server Management Studio due to a great talk by Sean McCown. (note the post’s byline is Jen’s, but trust me, I saw Sean give the talk. 😉

One of the powerful features is the ability to “tag” part of an expression so you can use it in your replace statement (see the above link for more details.)

But, here’s the thing, somewhere along the line (I think it was post SSMS 2014) Microsoft changed the rules of the game and it can be hard to find the new rules!  They have a post on using regexp in SSMS 2017. But as far as I can tell, it’s the old 2014 info, simply rebranded. Some of it, especially the tagging part does not appear to work for me. If anyone CAN make it work in 2017, please let me know how.

Let me give you an example. Just today I was given a script that had a lot of statements similar to:

DROP TABLE If Exists ##TempAttribute

Let me say I LOVE the new “If Exists” option for DROP Table, but, I needed to run this on SQL Server 2008R2 (I know, don’t ask!) and that syntax won’t work.

I needed to replace it with something like:

IF OBJECT_ID('##TempAttribute', 'U') IS NOT NULL
  DROP TABLE ##TempAttribute; 

Now, I’m naturally lazy and didn’t want to have to find and replace all 100 or so instances of this by hand. So, I reached for regexes… and… well it didn’t go well.

Based on the old syntax my find should look something like for the find:

DROP Table if exists {\#\#[A-z_0-9]+}

And for the replace

if object_ID('\1', 'U') is not null drop table \1;

Except, for the life of me, that wasn’t working. Every time I tried to tag the table name using the braces {} my regex would fall apart.  So of course I searched and got the link from Microsoft above that still suggests tagging with braces.  From previous experience I knew it was wrong, but that IS the official Microsoft page after all, so I kept doubting myself.

But, I was right in remembering things had changed.

The proper syntax is:

Drop table if exists (\#\#[A-z_0-9]+)

and

if object_ID('$1', 'U') is not null drop table $1;

The change to the search expression is subtle, changes braces to curved parenthesis .

The change to the replace is about the same, changing a \ to a $ but I suspect (I have not confirmed) that you’re no longer limited to just 9 tagged expressions.

And before anyone chimes in, I do realize there are some other ways of writing the search expression (such as I could have used :w+ instead in SSMS 2014 that would have worked in my particular case, since there were no temp tables with numbers, but this would not have worked in SSMS 2017), but this worked for me and wasn’t the point of this post. My goal was to focus on the change in tagging expressions.

Regular Expressions are still one of those things that don’t come very easily to me so I often struggle with the syntax and it doesn’t help when Microsoft changes the syntax rules between versions of SSMS (my understand they did so to make SSMS functionality better match Visual Studio, so I’m ok with this), but overall, I find them EXTREMELY useful and if you haven’t played with them, I highly recommend you start learning. There can be a bit of a learning curve for anything too complex, but it’s worth it.

My advice, start with learning how to “grab” the beginning and the “end” of a line and then go from there. This is the most useful thing to me at times when I want to add or remove something at the start or end of every line.

Happy expressing!

Wear their shoes

Last night I had the pleasure of hosting our local SQL Server User Group and having Rie Irish speak. Despite it being a remote presentation, which usually draws a smaller crowd, we had one of our larger crowds in awhile; I was quite pleased.

The topic was “Well Actually… Don’t be THAT guy in IT.” I first saw her present this at the Atlanta SQL Saturday 2018 and knew I wanted her to speak again to my user group.  She had previously presented “Let Her Finish” and this was a good follow-up.

One of the points she makes during this particular talk is that men don’t know what it’s like to be in a woman’s shoes.  This triggered a memory of when I was a wee lad.

Let’s jump back into the old Time Machine and dial it back to early September 1985. It’s evening on the campus at RPI and a young college freshman is hanging out with one or two other guys trying to figure out what evening session for their student orientation they should go to. They see a session provided by the Society of Women Engineers (SWE) talking about women in engineering. One of them says, “Oh that should be fun” in a voice that probably had at least a bit of snark in it. So, this young, intrepid and naive freshman follows along, after all, at a school with a 5:1 ratio, one might as well go where there’s some women.

Now, this young freshman can’t quite remember the entire session, but he did come away with a very different impression than he thought he would. Basically it was an “Oh wow” moment. Prior to that he had no idea the sexism women might face at an engineering college where in theory one was admitted solely on merit. It was eye-opening.

Jumping back into the time machine, we can dial it forward about 18 months and set down at a house off campus where he’s talking with one of his housemates. She mentions she had started as an architecture major but changed majors, for a variety of reasons. But, one thing that stood out was her first day of class where a professor made it quite clear that he didn’t think women should be architecture majors. He was a bit shocked that such attitudes still existed, but by then wasn’t entirely surprised.

Again, jumping in the time machine, he dials things forward about 2 years later. He’s sitting in the backyard of a sorority house talking with his girlfriend and a mutual friend. The mutual friend is a geology major. She mentions how she has gotten into the habit of submitting her homework and papers with simply her first initial and last name. This less naive man doesn’t quite get the reason why at first until she points out that this way, her professor can’t as easily identify her gender, and it makes her life easier and she tends to get better grades that way. He doesn’t want to believe it, but he does, because he figures she has no reason to lie.  It angers him though that she has to do it.

Let’s jump forward now about two decades. Due to his then current work situation, he’s actually staying with the now former girlfriend from college. In the years since they graduated and broke up, she had gone on to become a VP of engineer at a medical devices company before eventually quitting and going into consulting. He’s making dinner when she comes home from a meeting she had with a client. She’s visibly upset.

He asks why. After all, she was simply going there to give her final report on an item she had been asked to review and to get paid for that report.  The client had accepted the paper, and then asked her for a date. What had been a professional setting now became an awkward setting where she was placed in a position of having to say no to something she never expected to come up and to still make sure she got paid.

Jumping into the time machine one last time, we return to the modern day where Rie is still speaking. This no longer young man has to agree.

He’s had glimpses into what close friends have gone through, but, that’s exactly what they are. Glimpses. He didn’t experience them. He has never, as another friend has had happen, been told if he gave a blow job, he would get the job.  He’s never had a door close behind him and a manager awkwardly try to make a move on him.  He hasn’t woken up most mornings wondering, “who will question my credentials today because I have large breasts.”

Today’s takeaway for a number of my readers is: listen to your colleagues and believe their experiences, but don’t for a minute claim to fully understand them. Many of us never can and never will.

Oh, and one more comment: this author is far from perfect when it comes to handling gender and other similar issues. It’s an ongoing process.  I’m still trying to learn and grow.