Tuesday, July 28, 2020

T-SQL Tuesday #128: Learn From Others - July 2020 - Part 2


T-SQL Tuesday
So I thought about this one a little more, and I think I'll make it into an unintentional two-part T-SQL Tuesday post. In my initial post, I expressed my gratitude to AirborneGeek (t/w) for bringing me into the madness that is databases. But I didn't really tackle the intent of his topic for the month. 

Kerry, you know where I came from. You know my aviation background. So you know that I 100% believe in the importance of being able to learn from other people's mistakes. It's a big part of how pilots learn not to break things. 

I didn't set out to be a database person. I didn't intend to be in this place. But I can't exactly say that I didn't ask for it. I'm apparently more masochistic than I thought. I mean, when I met you, I was a ColdFusion developer...... Now I'm a DBA. I could have had a much lower-stress life if I'd just stuck with being a pilot. Sometimes I question my life choices. But it is what it is, right?

I submitted late this month, and I wish I hadn't procrastinated. I think your topic was excellent, and it is something that I completely understand. The global airline industry had to suffer some very hard lessons before they realized that knowledge-sharing, especially of the bad stuff, was actually an extremely good thing. 

I spent years as a Flight Instructor. You don't learn from perfection. There have to be mistakes. That's what "learning" is. But, sometimes, it's better for you if someone else had to learn the hard lessons first. Just so long as they tell you about them. And if you listen to what they did wrong, maybe you won't go down the same path. 

I could probably write pages about how to assess a risk and how to manage that risk after you've assessed it, but it always starts at the same place: you have to be able to IDENTIFY that risk first. And no matter what the topic is, you don't know what you don't know. Murphy understood that. And I'm willing to bet that anyone who has worked with any sort of system for longer than a few months understands that sometimes things break unexpectedly. Most businesses that I've ever been associated with work at a pace that's much more appreciative of your ability to quickly find the solution on Stack Overflow. I'm willing to gamble that most people would prefer not to be the first person to write a blog post about what they found out and how they fixed it.

Honestly, off the top of my head, I can't think of any unique problem that I've run into that I haven't been able to Google my way out of. I'm also fortunate to have an exceptionally good team that is able to cover the subject areas that I'm not an expert in (like the network). I got a rather late start in the DBA game, so I don't have Bertrandian levels of experience as the Guardian of the Databases. But when I was primarily a programmer, I was grateful that I wasn't that person when a database went sideways, and I've also come to appreciate that I used to be an extreme database abuser. I never really would have had the opportunity to ask Kerry silly questions if I hadn't been. 

In answer of this month's T-SQL Tuesday, I don't really have my own individual story to share, but I can affirm the importance of both sharing information that you probably wouldn't want other people to know and of accepting that information without any sort of judgement. There's a reason that people warn about making sure that you have a WHERE clause when you DELETE something, or the joys of accidental Cartesian JOINs on large tables. At some point in a career, everyone has done it. Or they will. 

It's really hard to top a willingness to talk about what went wrong when your error cost millions of dollars and possibly hundreds of lives. But, if an airline can talk about how they screwed up, then no company should have even a tiny problem recapping the decisions they made that caused a multi-terabyte database to go poof at 4PM on a Friday. 

And no DBA should be too remiss to learn from (and not repeat) those mistakes.



Monday, July 27, 2020

T-SQL Tuesday #128: Learn From Others - July 2020

T-SQL TuesdayI don't write enough here. I let myself get too busy, and I often miss things that I want to write about. I have several articles that I've started and dropped and several ideas that I never even started. I do a great job of lurking and not a good enough job of participating when I should. So it's no surprise to me that I've been sitting on this post for a week and missed the deadline to officially participate. 

T-SQL Tuesday #128 for July 2020 was hosted by a friend of mine; someone I worked with a few years; and the person who is directly responsible for my transition from just a ColdFusion Programmer to also a SQL Developer (and now a DBA). 

When @AirborneGeek came to work with me, I was primarily a programmer who knew just enough SQL to literally be dangerous. I could get a query to return the data I wanted, no problems there. I had fallen into the normal trap of "My queries are slow. It's gotta be the database's fault." Or Network. But we all know the network is the cause of 99.9% of all problems, right? 

I think one of the primary reasons we even created his team was because we were an application running off of millions of records, with NO database experts, and our applications were slow. 

Specifically the reason why I became somewhat fascinated with SQL was because I ended up being responsible for an internal report that had to be run overnight because it ran for HOURS. I can't remember if I was the original author of said report or not (wouldn't be surprised), but it didn't really matter since it was my responsibility now. I thought it could do better, so I approached our new database team to see if they were smarter than me. Everyone knows that programmers are smarter than DBAs anyway, but I figured "What the heck?". I gave him my query. 

He held onto it for a couple of days, and when he handed it back to me, it looked nothing like what I had given him. But it gave me the same data and ran in only a few minutes! 

It may have been Voodoo, or it may have been Black Magic. Regardless, if not for my silly internal fault of always wanting to know "Why?", I'd be on a MUCH different career path.

Over the next couple of years, I had plenty of questions for him and the rest of the Database Team. The more I learned about how the database was supposed to work, the more I came to realize how wrong I had been doing things. That team taught me about how to do proper JOINing, proper indexing and generally how to make things faster and much more efficient. Also about how important it was to not accidentally write a Cartesian JOIN on a 10M row table.  ( Just FYI: That can apparently discover the memory limits of your SQL Server and earn you a desk visit from the DBA.) 

I know that my questions for @AirborneGeek probably seemed very basic to him. He always showed me patience when he answered my questions. He never treated me like an ignorant programmer, though in hindsight, I realize now how basic some of my questions must have seemed. So, What Can I Learn From Others?

As another pilot, I completely agree with the premise that piloting and DBAing have a LOT of similarities (disasters differ in magnitude, but are very similar in remediation, and a lot can be learned from other people's "Uh-oh" moments). 

My post really isn't so much about how I've learned to deal with SQL disasters, but about how I've learned to be grateful for the people who got me here. 

I can't say it enough, "Thank you, Kerry."



Though I guess I should also point out that the curiosity that was sparked has also led me to learn more about certain types of disaster remediation and recovery than I ever really wanted to know. So "Thanks again, Kerry."

Sunday, April 26, 2020

Come To Adobe ColdFusion Developer Week!

Just short and sweet... Adobe ColdFusion Developer Week is coming up. May 18-22, 2020. 

Hubble: A 30 Year "Failure"

Way back in the primitive days of post-WW2 America, astronomer Lyman Spitzer wrote a paper discussing the benefits of a space-based telescope. He spent the next couple of decades trying to convince anyone to help with the development of this telescope.

After many funding problems, a bunch of technical issues, an extreme delay caused by a Space Shuttle disaster (that traumatized almost half of U.S. school kids, including yours truly) and a sky-rocketing budget, on April 24, 1990, NASA finally launched the Hubble Space Telescope into orbit.

Hubble has had a somewhat difficult history. It was a very ambitious undertaking with a lot of moving parts that had to be precise to an extremely small degree. It had plenty of naysayers, and the cost overruns made it an easy target for jokes about NASA and budgets.

But the HST is an instrument that is going to significantly improve our abilities to look further into space than we've been able to, and we were going to get back some AMAZING pictures.

And then....

Credits: Left: E. Persson (Las Campanas Observatory, Chile)/Observatories of the Carnegie Institution of Washington; Right: NASA, ESA and STScI
Credits: Left: E. Persson (Las Campanas Observatory, Chile) /
Observatories of the Carnegie Institution of Washington;
Right: NASA, ESA and STScI
The initial results were quite a bit underwhelming. The jokes took on a whole new life, even prompting Jay Leno to joke that Hubble should be shot down and put out of its misery. The project was a bust. 

But fortunately, NASA has some pretty smart, persistent people working there. They realized that there was a problem with the mirror, and, since HST was designed to be manually serviced, they set out to do just that. It took a few space walks to get the mirror fully corrected, but after just the first fix in 1993, they got...

Credits: NASA
Spiral Galaxy M100 - Before/After 1st Fix
Credits: NASA
Hubble was working a lot better. 

In the ensuing years, Hubble has been upgraded and significantly improved. It has made over a million impressive observations, made numerous discoveries, significantly increased our knowledge of our universe, given us stunning images to look at and sparked an interest in space. Hubble is a pretty impressive redemption story and has become an unimaginable success. Not too shabby for a project that was only supposed to last for 3 years.

The James Webb Space Telescope has some pretty large shoes to fill. 

Happy 30th "Birthday", Hubble!


Hubble's Deployment
The Hubble Space Telescope, seen from the space shuttle 
Discovery during the observatory's deployment 
on April 25, 1990.   (Image: © NASA)

Jupiter Moon Transit, January 24, 2015
(Image credit: NASA/ESA/STScI)
Cosmic Reef
Hubble took this image, titled "Cosmic Reef," 
released April 24 to celebrate its 30th anniversary.  
(Image credit: NASA/ESA/STScI)

And a big THANK YOU to NASA, the ESA, the Goddard Space Flight Center and everyone else involved with Hubble.

Friday, April 17, 2020

Goodbye to an Old Friend

Today, I said goodbye to one of my oldest friends; a friend that has been with me for almost two decades.

This friend came along at the beginning of my software development career and has seen me through the many ups and downs of my path as a professional geek. When my youngest child was born, this friend was already there. Many years ago, this friend was destined for permanent retirement; thrown out like common refuse. Worthless. Headed for oblivion. But I saw value. I came to the rescue.

Home to home and half way across the state, this friend has followed me. It has been a rock and a comfort for me. I have battled many dangerous enemies with this friend. It has witnessed many of my adventures. This friend has helped me to face many challenges.

Sadly, it's time to say goodbye.

When I first found this friend, it was in a professional setting. Over the years, the friendship has moved to mostly leisure time.

The COVID-19 Quarantine has given me a chance to reconnect with this friend in a way that I haven't really experienced much in those ensuing 20 years. The last three weeks of Work-From-Home have given me the chance to spend a great deal of professional time with this friend, as opposed to the countless hours of fun and games this friend has been there for.

But the decision was made to move on before this craziness began. Commitments were made. Other companies were engaged to implement this split. I feel a little bad trading this friend in for a newer, younger model. But it had to be done.

My friend of 20 years will be leaving me today.

Old Friend
Goodbye, old friend.

I am frankly quite impressed that it has made it this long. Only ONE of its siblings survived this far, and that one met its end about 3 years ago. I wish I remembered the brand. I believe my brother and I purchased office furniture at Office Depot. We bought several of these chairs, and then a couple of Executive Chairs. All of them lasted MUCH longer than I ever expected them to. Whatever it was, it was a very impressive brand.

But, alas, it is time to move on.

New Friend
Hello, new friend.

I can only hope that this new chair is able to form the same long-lasting bond that the other one did. It's not as fancy as the old one was, but, so far, it's comfortable.

Time will tell.

Friday, March 13, 2020

What A Week!

Last Tuesday morning (March 3,2020), a little after midnight, my phone alerted me that there was a Tornado Warning in the area. I turned on the TV just in time to watch the News Channel 5 station get hit dead on by a tornado. ( and there's the Reporter's view ).

Shortly after that, it started raining pretty hard at my house, and the lightning flashed to a green sky. I knew it was coming our way.

I ran to get my wife out of bed and get downstairs with our son. We made it about halfway there before we lost electricity. The tornado touched down about a thousand feet from my house. It was over pretty quickly.

It was late, but my neighbors were out checking on each other. It was really too dark to see the full extent of the damage, but my block fared better than just a block over. Amazingly, I don't think anyone was seriously injured, but we did have a lot of downed trees and damaged houses.

We got electricity back yesterday.

Community response has been TREMENDOUS!

The day after the tornado hit, a friend of mine came over to help me cut up some trees. While we were doing that, another guy came up with his chainsaw to help cut. He didn't want money. He just wanted to help. Then we had volunteers from all over come into the area to help with cleanup. They finished cutting up my downed trees and hauled all of the stuff out to the street. All within just a few hours. The city has been coming by to haul off the debris.

Nashville Electric Service has put in a HEROIC effort and got our power back on.

My wife and I have been living out of hotels this week. I have some very good things to say about one, and some not so good things to say about another. When I get a chance this weekend, I'll post up some of the photos I took and videos I found, and I'll add a little more detail to my post.

There's still a lot of cleanup to do. The school my wife teaches at was severely damaged and classes had to be relocated. And there are other houses and areas of town with A LOT of damage still. A neighborhood just a few miles away from me was pretty much flattened.

We got lucky.

And despite the destruction, the people here are another reminder of why I love living in this town.

Thank you, Nashville.

Saturday, February 29, 2020

Happy Leap Day!

To be today, a year has to:

- Be divisible by 4
- NOT be divisible by 100
    - UNLESS it is also divisible by 400

Since 2020 meets the requirements:


HAPPY LEAP DAY!!!


... or as it's known to some who are finding out today that they messed up a date calculation somewhere,
March 1.