Current Events

It has come to my attention that it may be necessary for me to find another job soon. Even if the future isn’t as dire as I imagine, I think I should get more in tune with my marketability. I want to make sure that I’m agile and able to pivot if or when necessary.

So I’ve re-enabled my ‘looking’ status on my linkedin profile and my resume has a fresh coat of paint.

LittleFunGuy

Quest

I recently got a DM from Hired.com. The contacted me to let me know that they were now servicing the Washington DC metro area. I tried to sign up at Hired.com a few years ago under similar circumstances but they rejected my application. At that time they were not servicing employees/employers in the Washington DC metro area. So here we are a few years later and they are re-engaging with me now that they are servicing the Washington DC metro area. I decided to sign up and see what they had to offer.

While refreshing my profile information the site suggested that I take their programming assessment. Passing the assessment would unlock a badge on my profile that may increase my chances of getting picked out by a potential employer. “What the heck!” I thought. An assessment would be a good way for me to freshen up my knowledge of my language of choice. See The Worst Interview Evaarrr for painful details on why I think this is important.

Boy was I in for a treat.

Assessment details

The assessment was composed of two questions that must be answered within 1 hour and 15 minutes. Each assessment question required a programming solution. A syntax highlighting editor was provided and the starting file contained a skeleton solution function that I could fill out.

The solution was evaluated by either pressing a run button or a submit button. The run button would evaluate your solution function against a test framework. As each test was evaluated, the input parameters, output results and the expected results were reported. Pressing the submit button would submit the score. It looked like only the most recently submitted score was used for the final score.

Point Calculation:

100 points = 2 problems * 10 tests * 5 points

It looks like a score of 80 points or better was considered badge worthy.

Distracting thoughts

After getting all this worked out, I only had to answer an ethics question, pick my language and complete the problems.

“No one helped me”

Before starting the first timed assessment there is a required checkbox that must be checked before I was able to proceed. It read something like “I certify that no one helped me with this assessment.”

Do libraries count as external help? When they say “No one” Does that mean that I should start with my own transistors and work my way up from there in this 1 hour and 15 minute quiz?

With some agony I made the following assumptions as to what “no one” really means.

  • I could not pair program this sucker. I could not allow someone to look over my shoulder and give me suggestions… I’m pretty sure that wouldn’t have speed things up anyway.
  • I could use an IDE that enabled me to work faster. The supplied editor provided code highlighting, but at this point in the arch of software development, working without an IDE – especially in Java is silly.
  • I could use libraries if I found that they were going to speed things up. There was some danger here because I didn’t know for sure that importing a library would be allowed by the submission editor…
  • I could learn from my failures. Single most important assumption!

Which language?

After actually starting the clock on the first assessment, I faced the second challenging question – which language to use? I am currently in a delicate position with regards to my strongest programming language. I’ve have been working with Python 3 for over 4 years now. Bouncing between Jupyter notebooks and the repl doing data analysis work as well as developing classes and Flask ORM code for a ReST APIs. Here are a few samples…:

So choosing Python would be the safe choice.

On the other hand, my most recent work has been in Java 8. I’ve been digging deeply into Dremio-oss. Dremio-oss is my first significant Java effort. The application a very large multi module Maven project. Learning Java was easy but building a conceptual model of all the packages and interactions between them in this system is quite a challenge. So choosing Java would be in line with my most recent work.

In the end I decided to go with Python 3.

Now that I had these fundamental issue resolved. I felt confident that I would be able to succeed. Even while the clock was already ticking on my first assessment attempt.

If at first you don’t succeed…

I failed the first assessment. After taking a breather for a few hours, I decided to do a healthy retrospective. What lead to my failure?

I am rusty at Python

Flipping between Python and Java is a challenge. The two languages are quite different. I found that I wasting a lot of time adding curly blocks ({}), declaring variable types and writing comments with the wrong comment keys.

To address this, I spent several hours between my first and second assessment writing Python code. What did I write? Well I wrote simple examples of common data structures in Python. During my first assessment, I realized that it would be very helpful to be familiar with implementations of stack, queue, binary tree, etc. I don’t run into clean recursion cases in practice, so reviewing recursion functions in the binary tree data structure were particularly helpful.

I was fighting my own IDE

More than just the rusty Python, I was not using my own IDE as effectively. The Intellij IDEs (IDEA & PyCharm) do a great job of reducing keystrokes if you let them. For example, use the IDE to write method bodies rather than typing them all out by hand.1 I became a lot more familiar those keystrokes as I wrote code.

I had not addressed distractions

I had to take a hard look at my surroundings and remove all potential distractions. I removed my watch, stowed my cellphone, dropped the lighting, put on the noise canceling headphones. Turn off all notifications on my operating system.

I wasn’t following standard exam strategies

During High-school and College I experienced heavy test anxiety. I overcame that anxiety by actually studying as well as devising my own personal testing strategy.

Read the damn problem several times. Catch all the details early. Bugs found earlier are much less expensive to correct than bugs found later. That holds true with miss-interpreted requirements. Catching a problem nuances while reading the problem will save me some time by not having to diagnose the unexpected behavior during code tests

Review BOTH problems before starting on the easiest problem This is subject to debate, but for me, I chose to do the easier of the two problems first. This gave me some coding warm up to work through on the first problem that will help me flow through to the second problem faster. But this is just a personal preference. The point is to know the nature of both problems before you start work on the first one. Spare threads in the back of my head may be able to make progress on the second problem while I’m working through the first.

Periodically evaluate my solution in the assessment interface

I ran into a frustrating problem on my second assessment run that is worth mentioning. I was ready to run my first code solution in the assessment web editor. I copied and pasted my code from Intellij into the assessment interface and ran it. The assessment interface reported a syntax error. I was thrown because the by the syntax error was reported a line number outside my submission line number. For example, if my submission was 200 lines long, the error line number as at line 300.

I easily wasted 10 minutes trying variations of the cut and paste until I finally realized that the error was in an else expression at the very end of my solution function. I had failed to copy the statement inside the else condition. duh By periodically evaluating the code in the destination web editor, I saved myself a late shock that the code didn’t work in the web editor where it worked in my IDE.

It wasn’t easy

Fortunately, the assessment is a best score out of three attempts within a 72hr window. I used all three attempts and I achieved an acceptable score within the last minute of the last assessment.

All this to answer some fun and interesting problems that have been boiled down to their bare essentials. I’ll admit, I’m a bit addicted to these problems now and will probably keep doing them. Albeit without such a tight clock.

What does it say?

Does successfully passing this assessment really demonstrate my prowess as a Software Engineer?

Yes

A coding assessment does demonstrate that I have a fundamental understanding of at least one programming language and I know some of the most common data structure patterns that exist. It demonstrates that I can think abstractly about a problem and work through the specifics in a programming language and meet a minimum set of requirements.

No

No way. Several things bother me about this assessment.

  • Production code requires full consideration of corner cases2. There is no way I can account for all corner cases given the timeline. My brain is wired to see corner cases. I had to ignore many of them while I was doing the assessment. I was hoping that the test cases didn’t exploit these corner cases 3. I’ve frequently lectured new hires, interns and especially Data Scientists. “You should spend more time coding for exceptions than actually coding for the solution.”
  • Writing code for succinctly described problems with a full battery of valid test cases makes coding a pleasure. As a Software Engineer, I never experience succinctly described problems. There are usually one or two layers of implied or assumed requirements that must be ferreted out.

Summary

That’s about it for this story. I’m glad that it had a successful ending. If you have ever experienced one of these coding quizzes, please let me know how your experience went. Were there any best practices that you believe would help others succeed? You can contact me on linkedin:Bruce W. Lowther


  1. Not that I can’t write them out by hand, but because writing them out by hand is still subject to human error where having the IDE doing it won’t be. ↩︎

  2. Corner case, edge case, exceptional case. Any situation where the code may enter into a condition where the outcome is not well defined by the requirements. ↩︎

  3. I may have run into one of these edge case situations when my final answer encountered an out of memory error. Fortunately that was after I had already achieved a passing score. ↩︎