In 2011, I took photos in front of Google's Mountain View, California office. Wouldn't it be great to also be able to take a look inside? I wasn't able to do it then. But this thought inspired me to join Google Code Jam a year later (2012). The finals were usually held at a Google office anywhere in the world. This was a great opportunity. Add to that the bonus of winning a big cash prize, getting some swag (Google T-shirt & stickers, etc), and getting recognition for my skills. During that time, I was also trying to learn Ruby, and I thought joining a coding competition would be a great way to practice.
Fast forward to 2022, finally there is a local coding competition that I could join, i.e. StackLeague. I saw the tournament as a means to stay sharp as a developer. With the fast pace of technology evolution these days, I needed to stay on top of the latest trends to remain competitive.
StackLeague also offered more chances of winning prizes, as there are many events and categories to join. Winners of all levels can win cash prizes, cool swag, and also gain recognition and possibly tech job opportunities. As a bonus for me, I found their ambassador program incentives a good motivation for me to keep my blog alive and updated.
How I prepared for the coding competitions - then and now
Back in 2012, I prepared for Google Code Jam (GCJ) by practicing on past coding questions which they keep in their contest archive. I also took time to learn my preferred programming language back then (Ruby).
Now with StackLeague, I needed to boost my strategy in order to be in the same league as the younger and more keen challengers. My schedule is packed these days, so I made the most of my time on StackLeague by:
- Trying out the practice challenges,
- Taking on the training courses.
- Setting up an efficient coding environment, including having the right tools and references (more on this later).
- Trying out the main challenges multiple times. As of this writing, I've taken 14 bronze challenges (12 failed, 2 passed)
- Focusing on small wins and alternative ways to win. I knew gaining ambassador status could also win me a cash prize, some swag, and recognition.
Lessons Learned
Here are some lessons I learned so far in joining StackLeague events.
#1 Age doesn't matter
You may think that seasoned developers have an unfair advantage over students, new developers, or career shifters. This is not necessarily the case. If the more mature (a.k.a. "older") developers are not up-to-date with the latest technologies, the newbies can take on them easily. Even as simple as not knowing about the latest features of their preferred programming language could cost them inefficiency. (For example, knowing just the JavaScript of the early 2010's, versus the new features of ES7).
In the same way, newer developers don't have the upper hand either. Tenured professionals have encountered many algorithmic problems of various kinds, that they have the insight to identify the problem and the solution quickly.
My keyboard has a shortcut key for the calculator. |
#2 Use the right tools
The in-browser code editor has the bare essentials. But having a full-featured IDE provides flexibility in attacking the challenges.
- IDEs have features that help you focus on the core problem by automating repetitive tasks. Examples: Code completion, API documentation, code highlighting, shortcuts to find variable references, quick text replace, etc.
- IDEs have more detailed logging. This is especially useful in figuring out why some unit tests failed.
- IDEs have a debug mode to step through code and inspect how variable values change. This is very useful for challenges that involve iterations.
Google Code Jam allowed participants to use their own tools. I believe StackLeague allows it as well.
Aside from software tools, specialized hardware may also help. I do not yet have a mouse with extra buttons (though I might buy one in the future). But my keyboard does have extra shortcut keys -- e.g. to quickly bring up the calculator. I found this very handy.
#3 Learn to focus
I have three monitors for my work from home setup. People say this increases productivity. But there is also a negative effect to productivity in that you might be looking at 3 different things, thus distracting you from the main task on hand.
To counter this, while competing in an event, I have only 3 windows open -- one on each screen, and each window is maximized to full screen.
- Main screen: Code editor in full screen
- Second screen: StackLeague challenge site, also in full screen.
- Third screen: empty browser window for Googling and checking references.
- Notifications and instant messaging apps are turned off.
- Having background music might help. I find it easier to concentrate when I have Lo-Fi Chill instrumental music playing in the background.
#4 Sharpen the ability to identify problems
The challenges I've encountered so far have been related to combinatorics, Number Theory, arithmetic operations, binary operations, strings, arrays, recursion, etc. Being able to identify the type of problem already wins half the battle.
#5 Solve it with pen and paper first
I find it easier to understand a challenge by first simulating it with pen and paper. First solving the problem by hand allows me to find a pattern quickly.
In it to win it
When I joined Google Code Jam in 2012, I didn't pass the qualifying round that year. I either I ran out of time, or couldn't get the code to work for the larger data set. But I just kept practicing and I just kept joining in succeeding years (until 2014). This year as I compete in StackLeague, I will approach it with the same persistence and consistency, but with additional strategies. Join me!
No comments:
Post a Comment