Monday, August 8, 2022

Life: Encouraging People to Learn to Code/Program/Develop

There is a lot of context to baseline here. By people, I mean the general population. By coding, I mean software programming like assembly, C#, or C++ on a very basic level. And the issue I am try to address is why many people find programming too difficult to want to learn.

Although easy and hard are relative, I am going to generalize that when most people say that it is hard, they mean that they do not want to bother learning or even understand it. Yet, they can follow the most complex story lines, office politics, and so many non-standard social norms on a regular basis.

We are in an era where technology is being embedded everywhere. Knowing how to code will likely be needed everywhere whether you are a waiter, box mover, design, doctor, lawyer, president, etc.

To me, the odd part is that coding uses a very tiny subset of our language yet executes the result nearly 100% of the time. So it should not be difficult to at least understand. In some ways, it basically is a simulation of logic.

The troubling part when I hear people not wanting to understand coding is that I "hear" them say that they don't want to understand logic and leaving that for someone else to fix.

Wednesday, August 3, 2022

Work Life: Zoom vs MS Teams. Able to Point on Screen Share Host Screen

There is one feature that I really miss on Microsoft Teams (as of 7/21/2022) that is available on Zoom is the ability to point at things on the host screen.

This is a super handy feature for demos or training. I have the ability to just point directly where I am either asking questions about or tell them where to click or look at.

Why is this super handy? Because I seem to be terrible at explaining things with words to people. I have really tried to do my best. "Your mouse/cursor is directly on it" and you watch them move the mouse to look for their cursor (at least I assume they lost it even though they were moving it around). Or I ask "move 1 inch to the right" and I see them move all the way to the right side of the screen. Then you ask them to go back and you watch them go no where near where they were before. I tried to get them to go to an object I know they found before and suddenly they have no recollection of the name, object, or even why we are having the call to begin with. Yes, I am starting to use hyperbole but I think any online trainer will understand the pain.

Interview

Maybe this should be the interview question on how to follow directions? :D

This would have been a wondrous way to make someone even more anxious when they realize they cannot understand simple directions (which may or may not even be their fault!). "Point there! No, not there! Lower, lower, lower.... too low! Higher, a bit higher... no, no, no... too far!!"

Thursday, July 21, 2022

Work Life: MS Sql SMO Script StringCollection, Understanding why result is a StringCollection

Understanding StringCollection with MS Sql SMO Script took me some time to understand better. For some reason it did not occur to me why there are multiple lines. I initially did not care, so I did some workarounds.

Initially, I didn't care because I was using it to compare the same objects across multiple servers so as long as all environments were consistent it did not matter, so I just joined it all together or removed the first two values.

I was then put in charge of managing the source control. The script that was generated for database project did not include the ANSI_NULL or QUOTED_IDENTIFIER options. There are over 10k objects so I cannot possibly manually remove them.

I tried to find a ScriptionOption to remove them but all the answerers bypasses the question by saying that it is required (or at least highly recommended). Most questioners problems are that they are missing the GO command.

Although there are plenty of questions to remove, I could not find any answers that removed them. I have gone through many versions of the same unsatisfying answers. The best is just to add it to the code to ignore those lines or add GO after each record.

Summary

Each record in the StringCollection is a SQL command. Although satisfying to know the answer, a little disappointed in myself that it took this look to figure it out.

I still don't like that none of the Microsoft solutions are ever consistent though. SSMS includes not only ANSI_NULLS and QUOTED_IDENTIFER but also the USE [DatabaseName]. While the SMO Script method includes the ANSI_NULL and QUOTED_IDENTIFIER but does not include the USE. And then the database import into Visual Studio or Azure Data Studio do not include ANSI_NULLS and QUOTED_IDENTIFER but includes a GO at the end.

Run as Script

Join all the rows with a GO command between each record:
myStringCollection.Join("\r\nGO\r\n");

For Source Control

Because database project does not include the ANSI_NULL and QUOTED_IDENTIFIER, I remove all those records. Requesting multiple objects is more troublesome, so I just request one object at a time. The reason it is more troublesome is because there is no strong correlation between the script and the object it is for without assuming it is in the same order as the request or parsing the script. Because this is for source control, it is not worth the risk of pulling the incorrect script.