I’ll admit, sometimes I’m a curmudgeon. Sometimes I miss the old ways. Last night was a case in point. My wife asked me to look at her computer. For some reason suddenly all her Office Apps had stopped working after a reboot. I tried a few simple things and sure enough I’d get a pop-up saying “This App can’t Open” every time. Googling brought up a page that seemed helpful and had a number of recommendations. I resisted the 2nd option of creating/using a new Microsoft account because I’m not keen in extra accounts, etc. I’ll save you the trouble of reading the rest of this post and say, I finally did that, using MY existing Microsoft account and magically everything started working. I then removed my account and things seem to continue to work.
But I’m frustrated. I miss the old days where one installed software and it well, frankly, stayed installed. I really don’t think one should have to worry about software like Office suddenly breaking because an online account isn’t available or the like. I’d be ok with certain features not being available (e.g. saving to the cloud automatically) but basic functionality shouldn’t suddenly break on a reboot.
I’ll admit there are days I miss DOS when things were really pretty simple.
Of course the irony is I’m writing on this one a dual screen computer running 16 gigs of memory with an ungodly number of programs open and an even larger number of tabs in browsers open. So I’m not entirely against new things. But I do want basic stuff just to work.
Thanks to Deb Melkin for hosting this month’s T-SQL Tuesday and developing the topic. Instead of calling this a rant, perhaps I should call it a “I told you so.” There’s a common refrain among DBA of “It depends” when asked a question. And that’s generally accurate. But this is the case of me saying “it doesn’t depend, do as I say” and being ignored.
Ironically when I took my Database class in college, it was long enough now that the idea of a “Sequel Database” (that along should tell you how long ago this was) was basically described as an up and coming technology that perhaps had a future. Talk about a bold and accurate prediction! That said, one of the things then that fascinated me, and still does, is that SQL (in general, not the product SQL Server) is based on work done by Edgar F. Codd and has a fairly strict mathematical basis. (Which is another reason I rail against those who claim that RDBMS and SQL will eventually be replaced. That’s like saying Algebra will be replaced. There may be other branches of mathematics developed that are far better for their specific domains, but the validity and usability of Algebra will never go away.).
In any event, one of the key concepts that Codd developed was that of “a table”. A table has several particular parts to its overall definition. The one critical for this blog is that a table itself has no implicit order. Now, many folks will do a query multiple times and always get the same results every time. But that’s more a factor of how SQL Server happens to handle reads. At my last full-time job, I was easily able to prove to the programmers that a query on the UAT box would result in a different order than on Prod because of the number of CPUs and disks. But that’s not what I’m here to talk about.
My “I told you so moment” goes back further to a table that was about as simple as you can get. It had a single row. Now, I think we can all agree that a single row will always return the same order, right? I can’t recall exactly why the developer felt that this table was the solution to his problems, but I pushed back. I asked at the very least he put in a where clause. He felt that would impact performance too much and besides, with one row, it would always return his results. I of course asked, “What happens if eventually the table has two rows?” “Oh, well my row will return first anyway.” “No it won’t.” Well he wouldn’t budge and I had bigger fish to fry. At the time there really was no reason to expect this table to grow. But I tucked it away in the back of my mind.
Sure enough, about a year later, which was 3 months after the developer left, we started to get really weird results on the webpage that was relying on that table. It seems that another developer realized this table was a perfect place for him to store the data that he needed (I’m assuming it was some sort of config data, but it was honestly so long ago I can’t recall) so he added a row. Now HE was smart enough to add a where clause to his query. But the original “Don’t worry about it query” still had no where clause. And sure enough, sometimes was returning the new row instead of the original. Fortunately this was a 5 minute fix. But I can only imagine how long it would have taken to find the problem if I hadn’t remember it in the first place.
So, while as DBA I will often say “it depends”, I will always be adamant in saying that tables are unordered by definition and you absolutely need a where clause or an order by if you want to guarantee specific results. Though, I suppose it depends, if you don’t care about the order or need a specific set of data you can ignore my rant. There are cases where that’s valid too.
After a long weekend I’m sitting here on a cool morning rather relaxed. For the first time in 6 weeks I don’t have class today and I have to say what a long strange journey it’s been.
As I’ve mentioned, one of the prerequisites for even applying to PA School was to take Organic Chemistry, often simply called O-Chem. At the end of May I wrote about my hopes and fears.
Well, I’ll be upfront. Forget the humble brag. I’m going to outright brag. Going in, I figured “if I get at least a C, that’s good enough for the places I’m applying for.” Obviously I wanted to do a bit better than “good enough” but I was realistic. Or so I thought. I got back my first test and well, the grade was disappointing. But I reminded myself, “Well she drops the lowest of the 4 exam grades. But even with that, I’m at least on my way to a solid C.” But then she threw a curve at us. “If by tomorrow you submit the correct answer and WHY it’s correct, including the what slide it was on, or where in the book you found the answer, I’ll give you up to 1/2 the points for each answer. But, I’m allowing that for this first test only.” Well “game on!” Some quick reviewing that night and writing up corrections I submitted them and waited. When I got the test back with my submitted corrections, I now had a solid 92 on it. Now I was starting to think about a possible B in the class.
The second test came along and I studied hard for it. In some ways, to me this was the most important chapter exam. I figured if I I could do well on this one, it would set the tone for the following exams. It was also the only test where we covered 2 weeks of material instead of just 1 week. I was completely stressed about this exam because of this. And with the extra credit I got a 94. I’m still kicking myself on that 1 point I missed. (For those who care, she had given us a diagram of the Taxol molecule and we had to label all the chiral bonds. I missed one.)
Now I was starting to feel good. That B was looking pretty solid and I had glimmers of an A in my mind.
Then we hit all the various reactions, SN1, SN2, E1, E2, and more. Now my brain was really starting to fry. I tried to set up a study group at my place, but no one could make it. I was pretty stressed about the 3rd exam. It was honestly the hardest material we covered all class, even the professor agreed with this thought. I think I spent 30 hours over 3 days studying for it. I walked in confident I could pass, but not much beyond that. I walked out feeling like I had been hit by a Mack truck. I saw the eyes of my fellow classmates who had finished before me, and the eyes of those coming out after me. We all felt the same. Well, you can imagine my surprise when we got the test back the next day and I received a 95 on it (this includes the extra credit). I can’t recall the last time I was so gobsmacked. I had figured I had probably gotten a 75 with an outside chance at an 85. I swear I sat at my desk for about 1 minute just staring at the score. I started to process what this meant. Since the professor was dropping the lowest of the 4 chapter exams, it literally meant the next exam didn’t matter. Sure, I could try to get a high grade on it and bring up my average a bit, but it wasn’t critical. I walked into that 4th exam the most relaxed of the 4. And walked out with a 90. I’m still kicking myself about overthinking one of the questions (Yes, an ROOH can represent a carboxylic acid. But it can also be an ether!)
But in 6 weeks, there’s no time to lay off the brakes. We had to go right into prepping for the Final which was literally 48 hours after the 4th chapter exam. And I had to finish all my lab reports. Fortunately the lab professor had said that basically “as long as you submit them by Friday night in the format I’ve specified, you’ll get a 100.” Of the ones I submitted, I had so far gotten a 100 on each one.
Now for the final, several of us got together both after class on Tuesday and then took over the classroom on Wednesday (since there was no class that day). And here I realized something. I basically knew my shit. I was leading the study sessions. I was helping my fellow students with them. They were asking me questions. This felt good. There was one nagging feeling in the back of my mind which did prove true. I should have been asking for more help on a few of the questions myself. But again, I wasn’t overly worried. I had done the math. In theory, assuming my lab professor upheld his end of the deal, I could get a 72 on the class final and still get an A in the class. I got an 86. (had there been the standard extra credit I would have cracked 90.)
Now I’m still awaiting the official grade, but unless something went completely sideways with my lab grade, I earned an A in O-Chem. Yes. I got an A in O-Chem. The class I had feared for years. The class that just over 7 weeks ago I was dreading and hoping that I could pull off a passing grade in, I got an A in! Yeah, forget the humble brag. I’m damn proud of myself.
I’ll add something else too. At least one of my fellow students who I studied with says I probably helped her pass the final with a high enough grade that will also allow her to continue her plans to apply to PA school this year. Moreover, on the Tuesday after the 4th chapter exam, she was supposed to meet her tutor (who apparently charges as much an hour as I do for SQL consulting) and after 30 minutes together decided she was getting more from my tutoring than she did with him and cancelled her session with him and stopped using him. So I’m pretty proud of that. She’s also looking to become a PA student locally so I suspect we’ll run into each other in the future (though she’s on track to apply a year earlier than I am.)
And to top off the day, after the final exam the college was hosting a cookout that even one of the vegans in my class enjoyed.