Wednesday, March 23, 2022

Coding Tests vs. Accomplishments

This week I was asked to take a coding test for a potential position as a Director of Software Development. I looked at the company providing the test and even ran through a number of sample questions. Ultimately I decided that I really don't want to work for a company that asks everyone to take such tests. I understand that organizations hiring software engineers need to gather some level of proficiency but think coding tests are the wrong way to go about it.

If you look at how world-class software organizations like Google gauge proficiency, they do it with white-boarding sessions. You are presented a problem and write code on a whiteboard, explaining your thought process as you jot things down. This allows the job candidate to ask very important questions. It also allows the interviewers to gain tremendous insight into the candidate's thought process.

One of the questions I was presented on the sample coding test was FizzBuzz. The program asks for an upper integer and then prints the whole numbers from 1 to the upper integer. If the number printed is evenly divisible by 3, then the word "Fizz" is also printed next to the number. If the number is evenly divisible by 5, then "Buzz" is printed next to the number. Finally, if the number is evenly divisible by 3 and 5, the word "FizzBuzz" is printed. There are some variations but hopefully you get the idea.

This is a great programming problem to solve as it does not require a lot of code but does expose some fundamental programming ideas. The first is if you understand the mod function, which returns a division remainder and is usually denoted by the percent (%) symbol. The equation "5 % 3" would return 2 as 5 divided by 3 has a remainder of 2. When you find a number with a remainder of 0 when divided by 5 and/or 3, you can print the appropriate word.

Next you have to know how to do loops in your language of choice. The testing software gave me something like 27 different computer programming languages to choose from. My preference would have been to use a FOR loop and I think most developers would start with that as well. For my sample test I used Python and made sure to set the range from 1 to n+1, where n represents the upper integer limit. Why n+1? Well the FOR loop goes up to but doesn't include the upper number. If you put in the upper limit of 15 and run the FOR loop, it will only go to 14 and so you need to add 1 to the upper limit so it goes high enough.

Both of those concepts being tested are fairly simple and an hour of coding instruction should be all that is needed to get that part of the test correct. Now is where it gets complicated. In my sample coding test, I was only going to be given 30 minutes to complete 5 such examples. My first thought would be to brute-force it an get something running. That would look like a nested IF-THEN-ELSE statement where you test the 3 and 5 first, followed by the 3, then followed by the 5. Then I would move onto the next question.

The advantage of white-boarding this problem is that the candidate can ask some important questions that show even greater insight in his or her experience. For instance, "Is performance important?" IF-THEN and IF-THEN-ELSE statements are very expensive in today's modern processors. You can write the code to use 2 instead of 3, which can be significant when your upper limit is a really large number. The downside is you sacrifice code readability which makes it more difficult for someone new to come in and maintain your code. Unfortunately in an automated test, the candidate is forced to make a choice without any feedback from the testing software.

As I mentioned, I opted not to take the coding exam. It is not that I felt I would do poorly. Instead I feel like having my code running on over 100 Million PlayStation 3's, over 100 Million PlayStation 4's, and over 17 Million PlayStation 5's should give some indication that I know how to write code. I think it is much better than taking a test that favors trivial details and syntax. Perhaps you may disagree.

Monday, March 14, 2022

Apple's Numbers vs. Microsoft's Excel

For the past several months I have been using Apple's Numbers spreadsheet program since I had to give up my work laptop. On my work laptop, I used Microsoft's Excel and even after almost half a year I have to say that I prefer Excel. I'm sure part of that is because I have years of experience with one versus a few months with the other.

I would have to say that my biggest complaint with Numbers is that a new document with a fixed-size spreadsheet. The default is a table with only 7 columns and 22 rows. Sure you can add columns or rows but each addition requires the click of an on-screen button. There also is a button that allows you to grab the lower right corner of the spreadsheet and drag it to as large as you think you will need. I actually prefer Excel's way of allowing you to scroll right or down and having new columns and rows appear.

Another thing that takes a bit of getting used to in Numbers is the right-side format bar. I feel like this should give me greater control of how the spreadsheet is formatted. Unfortunately it feels more like wasted space. I like how Excel puts all the format control at the top of the spreadsheet allowing for more visible columns.

Where the two spreadsheet products are similar is with a lot of the calculations and functions. The formula "=sum(B2:B14)" works equally well in both programs and that is important. I would hate to have to learn a new way of entering formulas.

I moved a lot of my personal spreadsheets from my work laptop to my personal computer and Numbers does a pretty good job of reading them. There are some missing fonts that I keep getting errors about but I can deal with that problem easily. The error I get is "This spreadsheet has missing fonts." I think a bigger problem would be functions that are not supported and I haven't seen any of those.

I will continue to use Numbers as I like the price: FREE. It is included with the MacOS and updated regularly. Perhaps I will learn to embrace the differences in the future but right now I see them as annoyances.

Wednesday, March 9, 2022

Getting More YouTube Views

For the past 5 weeks I have been trying to put out one new video on my YouTube channel every week. The reason is that I wanted to see if frequent posting of content changes the number of views my videos receive. It does and the numbers are interesting.

YouTube provides analytics that I can check whenever I want. Looking at those statistics I see that I used to get roughly tens of recommendations by YouTube for my videos on a daily basis. That means that of all the viewers on YouTube looking for skiing or adventure videos, only ten or so will have the chance to see one of mine. That's not a lot.

When I started posting more videos, that number shot up significantly. As long as I posted weekly, YouTube recommended my content around three to four hundred times per day. Yes some of that can be attributed to the fact that I have more videos to choose from and so I looked at another statistic. I waited 8 days before I posted my video last night. Before posting that video, the number of times YouTube recommended my content had dropped down below a hundred. After posting it, the number of recommendations increased significantly again.

So what does all of this mean? Simply posting content more frequently gets you more views. I am now trying to figure out a way to post more frequently. Evidence suggests that posting daily would dramatically increase my audience. Unfortunately I put a lot of work into each of my videos and a side-effect of posting more frequently would mean a reduction in quality. I hope that isn't the case as that would mean a bunch of short junk videos would gain a larger audience than longer well-crafted ones. I hope that viewers would be somewhat discriminatory with what they watch.

I will see what I can do to post more frequently without a reduction in quality and see if the data agrees with my hypothesis or not. In any event, I am learning a lot and that is the whole reason I am creating videos.

Tuesday, March 1, 2022

Creating Your Own QR Code

Creating your own quick reader or QR code is actually very simple. I have been creating a YouTube video every week for the past few weeks and in an effort to drive traffic to my channel, I created a QR code and am having them printed on business cards. I can then hand out those cards as I ride up the chairlift with other skiers interested in my Top 5 Ski Areas of North America video series.

A QR code is simply a 2-dimensional bar code that translates into text. You could make a QR code for your name but it is more useful to make one for your website. In my case I looked at the URL for my YouTube channel and dropped it into a QR-Code generator that I found doing an Internet search. I didn't feel the need to add a logo in the middle or anything fancy like that but had the option if I desired.

Once I had the QR code, I saved it as an image file and can now add it to any number of places. I originally thought about making my own business cards and picked up some Avery printable sheets that could be separated into 10 cards per page. Unfortunately my color laser printer jams with thick paper and so I had to print them using my ink-jet printer that I really only use as a scanner. The ink tends to run when it gets wet and so it is not something I want to carry around in my jacket pocket on a snowy day. Instead I went to Vistaprint and had 100 cards printed inexpensively.

Today I spent my morning skiing at Snowbird and handed out a few of my sample cards that I created. When other skiers find out I am making videos they are interested in watching them and having a QR code makes them easy to view. As the QR code is for my channel and not a specific video, I don't need to update the cards every time I release a new video. In a few weeks, I'll be able to see if they help drive any traffic.