Author: ryanohs

In this talk, Gene Kranz, Flight Director at NASA during the Gemini and Apollo missions, talks about building a culture of teamwork on the mission control team and recounts the events of Apollo 13. His talk starts at the 6 minute mark.

In order to prototype some circuits I thought it would be a good idea to build some boards which had NOR, NAND, AND, and OR gates pre built to speed things up. I bought about 300 through-hole transistors and resistors and started building the first board on a perforated board from RadioShack. It turns out this is a terribly slow way to prototype. I spent 8 hours soldering on the first board (only 13 NOR gates) and it’s not finished yet. I’m getting a lot better at soldering small connections though! I only had to break out the solder wick twice.

Instead of building these boards with perfboard, I’m going to stop and learn how to use KiCad to design a printed board using surface mount components. I’ll have to order the boards online but I’ll reflow solder them myself. I’m going to start with the same prototype board designs so I can learn how well this works.

There’s a new makerspace in town about ready to open up. They have a circuit board printer so I may look into that route eventually.

When I started mentoring junior developers, I had a bad habit of saying things like “you should…<my opinion>”. When giving directions, it’s direct to the point, however I don’t think phrasing directions this way helps new developers learn as quickly as guiding them in a way that requires them to make decisions themselves. Today I find myself replacing those “you should” moments with phrases more like “Have you considered…?” or “In my experience…” or pointing them towards an article or specific MSDN page. Sometimes they’ll be able to explain what they want to do but don’t know the technical term for it. By supplying one it’s much easier for them to google for more resources. Once they have some good context on the problem, I’ve found that simply following a Socratic line of questioning about the details of the problem is very effective. Usually they interrupt with me with “Oh I have an idea now!”

I was trying to find all usages of a variable in a SQL script today, however the script contained many similarly named variables. Simply searching for @Foo would also find @FooBar and @FooCat which was cluttering up the search results. To get around this I used the regex search feature in Visual Studio. In the find usages window, check the “Use Regular Expressions” checkbox and then include the word boundary escape code (\b) in your search. I searched for @Foo\b which will only return @Foo and even find it in cases like @Foo<space>, @Foo) and @Foo=.

I’m curious as to why the insert and update commands in SQL have different syntax. So far I have been unable to find any satisfactory explanation. I personally have a gripe with the insert syntax in that the column names are separated from the inserted value. In wide tables this makes it difficult to alter existing stored procedures since you have to manually count fields or come up with a commenting scheme. Even then, you aren’t guaranteed you’ll find a bug at runtime.

In Java there is a feature called the Catch or Specify Requirement. This feature requires that each method specify what exceptions it may throw. Any caller to that method must either include a catch block for the exceptions or specify that it can pass the exceptions up the call chain. A Java application will not compile if all exceptions are not handled.

C# does not have any similar feature. When working with unfamiliar system classes, I typically refer to MSDN to learn what exceptions they may raise. Unfortunately if I miss something, the C# compiler does not provide any warning.

C# does provide the ability to document the exceptions using the <exception> tag, but this is only used to generate documentation and provide intellisense in Visual Studio. There is a ReSharper add-in called Exceptional which warns you about uncaught exceptions. I have not tried it, but according to feedback on Stack Overflow, it generates too much noise to be useful.

My general practice is to use generic exception handling blocks at the highest level of my code so errors can at least be caught, logged, and feedback given to the user.

Elle Luna is a speaker/writer that I like to return to often as a reminder of what’s important. Her viral blog post “The Crossroads of Should and Must” is a hugely inspiring piece about finding your calling in life. Here is a talk she gave in advance of her book release covering many of the same topics.

I have this 8×8 LED screen which I picked up a while ago. I’m going to hook this up to a Raspberry Pi and a D-pad and write games for it. Until I have the correct parts, I’m emulating the screen using HTML5 canvas.

Last night I wrote an implementation of Snake. I have a few more I wrote today which I’ll put on github.