Hunter S. Thompson once said, “Anything worth doing, is worth doing right.”
There’s been some pushback on this that I think has merit with some folks saying “Anything worth doing, is worth doing poorly.” In other words, sometimes attempting something, and perhaps not fully succeeding is still probably worth doing. If I decide I want to bake some bread, but I’m convinced I need to use only artisanal hand-ground flour and yeast I’ve harvested myself to do it “right”, I may never get a sandwich. But if I’m willing to settle for some cheap white flour and yeast I bought at the store, I’ll probably get that loaf baked a lot sooner. It may be a poor substitution for my original goal, but I’m at least no longer hungry.
But, I’d argue, even then it’s worth making that loaf well and with some care.
When I first started this blog, one of my goals was to focus on how I approach problems and look into thought processes. Yesterday I was reminded of this. It was a small ask, a process to monitor if new rows were being inserted into a database daily. If there were no rows, it meant the logging process had broken and probably needs to be recycled. Now, let me be clear from the start, that this is not a life critical process. It is right now, much more a “nice to know” process.
So, first I wrote a query, nothing special, basically:
declare @count int
select @count=count(*) from bar.dbo.report_logs where date = cast(getdate() as date) if @count = 0 exec msdb.dbo.sp_send_dbmail @recipients=’email@example.com’, @subject=’No rows’, @body=’check out the foo process!’
Now, my first instinct was to put that into a scheduled task and be done. But then I thought, “this should really be a stored procedure”. So I wrapped it in some code to turn it into a stored procedure.
Then I realized that I should really probably at least put a few comments in, namely who wrote it, when, and most importantly why. While it’s obvious WHAT it does, it wasn’t clear why we’d want this.
It’s at that point that I had the thought that if I were going to do this, I’d do it well.
So, what’s the difference between doing this well and right? In a more perfect world, I might actually have this process cycle the service in question. But then I’d have to have code to handle situations where the service doesn’t come up. And we’d have to file a change order to introduce a process that potentially would have an impact on a service. And we’d have to wait until the end of the month freeze window, and, well the list goes on.
So, while I’m not going to do all of that, I’m going to make sure the part I can and will do is done well, commented properly, and documented properly. The rest can wait until we really need it.
If you are going to do something, even if you do it poorly, do that part well.
There’s an old joke: “what’s the difference between a chef and a cook?”
“A cook cleans up kitchen when they’re done.” If that’s the definition, then I am definitely a cook, not a chef.
That’s ok, because I really do love to cook. There’s something creative and powerful about taking a bunch of ingredients and turning it into a meal that’s ideally nourishing and enjoyable. That said, sometimes I end up with meals that are more nourishing than they are enjoyable.
A recent Facebook exchange with a pair of #SQLFamily members and others reminded me of that. About once a month I will make homemade pizza. I’m a big fan of this since I can experiment with toppings. I generally use King Arthur Flour recipe (though somehow I was able to print mine by mass of ingredients, not volume) or, as in this past weekend the Sourdough version. For me, the way I knead it and let it rise, I’ll end up with a fairly fluffy crust, so if you want a thin crust, you’ll have to try something else.
Now, generally I end up making 2 pizzas (unless I’m in non-covid times baking for a larger group in which case I’ll double the recipe). Almost always one of those is a typical pepperoni pizza. If I’m feeling healthy, I’ll use the turkey pepperoni, but more often lately I’ve been using real pepperoni I’ll slice myself. I almost always use store bought mozzarella, but if I have the time and the motivation, I’ll make my own.
The second pizza can vary. Above is a white pizza I made this summer with some basil from the garden.
But, why stop there? My personal favorite is a “Thai chicken” pizza with Thai seasoned chicken, peanut sauce, snow peas, and red onions.
Or one with bacon, sautéed onions, sliced Granny Smith Apple, and some sun-dried tomatoes. That has a nice mix of flavors. I think it’s my wife’s favorite and the favorite of a friend of mine.
Or cheddar cheese with bacon, black pepper and towards the end 1-2 eggs cracked over the top. I call this my breakfast pizza.
Or a BBQ pizza.
Or… well you get the idea. I like to get creative.
But this weekend I wasn’t feeling particularly creative and decided to try something different. I had heard about folks who have air-fried pizzas, so I decided to take a crack at it. I took the 2nd half of the dough and divided it into 4ths and told each member of the family it was up to them to create their own pizza. I par-cooked the crusts a bit first in the air-fryer before they topped them. I also setup a “toppings bar” for them to pick from (nothing super creative this time though).
Now, let me stop by saying, no experiment is truly a failure. As a friend of mine who worked on the InSight Lander made a point of saying, even the fact that drill head got stuck and did not complete it’s original goal, we learned something about the soil of Mars.
While these were far from my best pizzas, I learned something about making them in the air-fryer. They came out a bit dryer than I might prefer, but I wasn’t really surprised, I did kind of expect that.
I still far prefer a really hot oven and pizza stone (huge hint: give the stone a good 30 minutes or more to come up to temp, otherwise it will actually end up insulating the bottom of your pizza and it won’t cook well). But, I’ll probably try again, perhaps with a moister dough and drizzling the edges with garlic butter or olive oil (hey, any excuse to use those, right?)
I’ve also bought some King Arthur 00 Pizza Flour and will start to experiment with that. My first attempt I made some mistakes, but I’m looking forward to another attempt, especially this summer when I can use fresh basil and tomatoes.
In the meantime, I’ll keep experimenting with the air-fryer.
Now, I will say, air-frying wings DOES work well and is my preferred method now. Still moist and very tasty, but far fewer calories and in theory a bit healthier.
I’ve determined getting decent steak fries isn’t worth it (too thick and bulky to get the inside cooked without overcooking the outside), but I’m honing in on getting pretty decent shoestring fries out of it.
And putting a final crisp on our veggie burritos is often quite pleasing.
In any event, before I get too hungry I’m going to stop now. But I’ll encourage everyone to experiment in the kitchen. It can be fun and who knows, you may even enjoy it!
I’ll admit, I was sitting here, struggling for a topic when I received an email alerting me to Deborah Melkin’s latest blog post. So, to take a phrase from Pablo Picasso “Lesser artists borrow; great artists steal”. To be clear, in this case, I’m borrowing an idea from Deborah, a great artist, I’m not. At least not in this case.
In the past few months I’ve come to realize how much I missed travel. I think many of have. But instead of listing real places I want to visit, I’m going to change things a bit and talk about a few fictional places I might enjoy visiting.
Firstly, Middle-Earth. Some may know that my twitter handle is @stridergdm. This came out of my youth of hiking parts of the Appalachian Trail. It’s common when signing into logbooks to adopt a trail name. Being a huge fan of The Lord of the Rings, I adopted Strider. I still use it. But online, I found Stridergdm was pretty much guaranteed to be unique. So, back to Middle-Earth. It is still one of the richest most fleshed out fictional worlds and there’s too much to see. But I suspect I would want to ride the plains of Rohan as dawn rose over the horizon. Sail up Anduin towards Osgiliath in its prime. Perhaps look over the fallen foundation of Barad-dur and then travel back to the First Age and see Gondolin. (yes, I’d want a bit of time travel too.) But simply put there is so much to see there.
Earth-Sea – To sail from the Gont to Havnor and visit some of the islands in between. I always found Ursula Le Guin a unique world, a world of only islands, no continents.
Dune – deserts have always fascinated me, but to visit a world that is entirely desert and life is focused on the lack of water intrigues me. Perhaps to enter Sietch Tabr in the evening as the Fremen are waking up, with the sunsetting at my back, casting my long shadow ahead of me. To break bread and share water with Stilgar and others. Then leave on a Highliner and visit the polar opposite, the ocean world of Caladan.
Mid-World – Of Stephen King’s The Dark Tower series. This is very much a broken world, not just the buildings of Lud, but physics itself where sometimes the Sun doesn’t rise in the East and time seems to flow strangely. But to perhaps visit the Halls of Gilead in their prime and then ride The Drop and overlook the Clean Sea, but finally to walk among the field of roses at Can’-Ka No rey and enter the Dark Tower itself.
Ringworld – it may be unstable, but is probably arguably the largest “world” of any I would want to visit. To look up at the Sun, always at Noon and to realize one could walk multiple lifetimes and still barely make their way around the world. It’s big enough that it has 1:1 maps of Earth and Mars.
Narnia – C. S. Lewis and Tolkien were comrades in arms and members of the inklings but had very different ideas of world-building and different ideas on the proper place for allegory. Tolkien was never a huge fan of Lewis’s Narnia because it hit the read over the head too much with allegory, but I still think it would be interesting to sail on the Dawn Treader to the edge of the world.
One Hundred Acre woods – Technically this is based on a real woods and one could visit it, but not with Pooh and Piglet. This place has a special place in my heart. It’s the first “real” book I ever owned. As a young child, I want to say 3 or 4, a friend of my father’s loaned it to me. More accurately to my father to read to me, but that’s just technicality. After it was read, I tried to return it as I had been taught, after all, it wasn’t mine, it was only loaned. But the owner (who I can’t recall) looked at me gravely and asked me if I enjoyed it and I affirmed I did. “It’s yours then. Keep it.” And I did. And I have since given it to my son.
Stephen King’s Maine – this is a fascinating world filled with a town taken over by vampires and where Mrs. Toad can find shortcuts. What else wonderful and scary things could be found there?
There are almost certainly other worlds, but I think I’ll stop here. While I can never visit any of the above places in reality, the beauty is I can visit time and time again anytime I pick up a book.
This post is the result of several different thoughts running through my head combined with a couple of items I’ve seen on social media in the past few days. The first was a question posted to #SQLHelp on Twitter in regards to if a DBA came into a situation with a SQL Server in an unknown configuration what one would do. The second was a comment a friend made about how “it can’t get any worse” and several of us cheekily corrected him saying it can always get worse. And of course I’m still dealing with my server that died last week.
To the question of what to do with an unknown SQL Server, there were some good answers, but I chimed in saying my absolute first thing would be to make backups. Several folks had made good suggestions in regards to looking at system settings and possibly changing them, possibly re-indexing, etc. My point though was, all that could wait. If the server had been running up until now, while fixing those might be very helpful, the lack of fixing things would not make things worse. On the other hand, if there were no up to date backups and the server failed, the owner would be in a world of hurt. Now, for full disclosure, I was “one-upped” when someone pointed out that assuming they did have backups, what one really wanted to do was a restore. I had to agree. The truth is, no one needs backups, what they really need are restores. But the ultimate point is really the same, without a tested backup, your server can only get much worse if something goes wrong.
I’ve had to apply this thinking to my own dead server. Right now it’s running in a Frankenbeast mode on an old desktop with 2GB of RAM. Suffice to say, this is far from ideal. New hardware is on order, but in the meantime, most things work well enough.
I actually have a newer desktop in the house I could in theory move my server to. It would be a vast improvement over the current Frankenbeast; 8GB of RAM and a far faster CPU. But, I can’t. It doesn’t see the hard drive. Or more accurately, it won’t see an OS on it. After researching, I believe the reason comes down to a technical detail about how the hard drive is setup (namely the boot partition is what’s known as a MBR and it needs to be GPT). I’ll come back to this in a minute.
In the meantime, let’s take a little detour to mid April, 1970. NASA has launched two successful Lunar landings and the third, Apollo 13 is on its way to the Moon. They had survived their launch anomaly that came within a hair’s breadth of aborting their mission before they even made orbit. Hopes were high. Granted, Ken Mattingly was back in Houston, a bit disappointed he had been bumped from the flight due to his exposure to rubella. (The vaccine had just been released in 1969 and as such, he had never been vaccinated, and had not had it as a child. Vaccines work folks. Get vaccinated lest you lose your chance to fly to the Moon!)
A routine mission operation was to stir the oxygen tanks during the flight. Unfortunately, due to a Swiss Cheese effect of issues, this nearly proved disastrous when it caused a spark which caused an “explosion” which blew out the tank and ruptured a panel on the Service Module and did further damage. Very quickly the crew found themselves in a craft quickly losing oxygen but more importantly, losing electrical power. Contrary to what some might think, the loss of oxygen wasn’t an immediate concern in terms of breathing or astronaut health. But, without oxygen to run through the fuel cells, it meant there was no electricity. Without electricity, they would soon lose their radio communication to Earth, the onboard computer used for navigation and control of the spacecraft and their ability to fire the engines. Things were quickly getting worse.
I won’t continue to go into details, but through a lot of quick thinking as well as a lot of prior planning, the astronauts made it home safely. The movie Apollo 13, while a somewhat fictionalized account of the mission (for example James Lovell said the argument among the crew never happened, and Ken Mattingly wasn’t at KSC for the launch), it’s actually fairly accurate.
As you may be aware, part of the solution was to use the engine on the Lunar Module to change the trajectory of the combined spacecraft. This was a huge key in saving the mission.
But this leads to two questions that I’ve seen multiple times. The first is why they didn’t try to use the Service Module (SM) engine, since it was far more powerful and had far more fuel and they in theory could have turned around without having to loop around the Moon. This would have saved some days off the mission and gotten the astronauts home sooner.
NASA quickly rejected this idea for a variety of reasons, one was a fairly direct reason: there didn’t appear to be enough electrical power left in the CSM (Command/Service Module) stack to do so. The other though was somewhat indirect. They had no knowledge of the state of the SM engine. There was a fear that any attempt to use it would result in an explosion, destroying the SM and very likely the CM, or at the very least, damaging the heatshield on the CM and with a bad heatshield that would mean a dead crew. So, NASA decided to loop around the Moon using the LM descent engine, a longer, but far less risky maneuver.
Another question that has come up was why they didn’t eject the now dead and deadweight, SM. This would have meant less mass, and arguably been easier for the LM to handle. Again, the answer is because of the heatshield. NASA had no data on how the heatshield on the CM would hold up after being exposed to the cold of space for days and feared it could develop cracks. It had been designed to be protected by the SM on the flight to and from the Moon. So, it stayed.
The overriding argument here was “don’t risk making things worse.” Personally, my guess is given the way things were, firing the main engine on the SM probably would have worked. And exposing the heatshield to space probably would have been fine (since it was so overspecced to begin with). BUT, why take the risk when they had known safer options? Convenience is generally a poor argument against potentially catastrophic outcomes.
So, in theory, these days it’s trivial to upgrade a MBR disk to a GPT one. But, if something goes wrong, or that’s not really the root cause of my issues, I end up going from a crippled, but working server to a dead server I have to rebuild from scratch. Fortunately, I have options (including now a new disk so I can essentially mirror the one disk, have an exact copy and try the MBR->GPT solution on that one) but they may take another day or two to implement.
And in the same vein, if it’s a known SQL Server, or an unknown one, you’re working on, PLEASE make backups before you make changes, especially anything dramatic that risks data loss. (and I’ll add a side note, if you can, avoid restarting SQL Server when diagnosing issues, you lose a LOT of valuable information in the DMV tables.
So things CAN get worse. But that doesn’t mean there’s any need to take steps that will. Be cautious. Have a backout plan.
I’ll admit I was tempted to just have a blank page here and say I’m starting 2021 with a blank slate. But that seemed too easy.
But with hope in hand, I will set some goals:
Continue to write for Red-Gate! I enjoy this and have to admit, the little extra spending money isn’t so bad.
Expand my client base. A concern I’ve had for a few years, and 2020 really reminded me of this, too much of my current consulting depends on one large customer. I want to change that. I’ve already reached out to some colleagues in regards to possible clients and will continue to do so. Part of my goal is to really define my business model here.
Have a successful NCRC Weeklong Cave Rescue Seminar here in NY. This was originally planned for 2020, but in light of the risk of becoming a super-spreader event, we postponed. Right now it’s still not clear if we’ll be able to safely host the event, but the odds are slowly improving. I’ve been monitoring my Facebook feed and it’s amazing how many folks I know already who are in the process of getting vaccinated against Covid-19. If this continues at this rate, we’ll be able to have an event!
Continue blogging. 2020 was my best year year, but I hope to improve in 2021. Of course I have to admit my numbers were helped when Brent Ozar mentioned one of my posts. So, I guess the real secret is to get Brent to retweet my blogs! Seriously though, I enjoy blogging and as much as I often do it for others, I’ll admit, some of it is really just vanity for me, but also serves as a practice to keep up on my writing and creative skills.
Travel! Once it’s safe to travel again, I hope to do a LOT more this year. One benefit of being an independent IT consultant is I basically can work any place I have a steady Internet connection. I hope to take advantage of that.
Continue biking. This probably means finally getting a new bicycle. I had hoped to replace my Trek 520 that is now 30 years old this year, but due to Covid basically avoided bicycle shopping. But after 1300 miles last year, I think it’s time to seriously consider a new one.
Hike more. I loved my overnight trip last year. I hope to complete the section of the Appalachian trail in Massachusetts I haven’t done yet and then perhaps finish Connecticut or Vermont.
Continue to enjoy life. I mentioned yesterday that as crappy as a year it was, I actually enjoyed much of the year. If anything, Covid forced me to take stock and focus on enjoying life. I want to continue to do this.
And, most of all, make it through another year with you all.