Acing the Code Assignment Interview – Tips for Interviewers and Candidates

One of the most common practices today as part of the interview process are take-home assignments. However, though practical and valuable, this practice is tricky and needs to be used wisely to be beneficial. On the candidate’s side, it is not enough to only solve the tasks, as there are a few more things you can do to make your submission shine and impress the reviewers. On the employer’s side, companies have the challenge of creating a good assignment that will help assess the candidates and make the company attractive in the eyes of the candidate.

This week I took part in DevDays Europe Conference!
I was honored to participate in 2 sessions:

I moderated a “Leadership for Engineering Teams in Remote Work Era” session. The recording can be found here.

The session ended up with a few reading recommendations – Radical Candor, Six Simple Rules, Conscious Business, and The Promises of Giants.

I also talked about “Acing the Code Assignment Interview – Tips for Interviewers and Candidates”, sharing my experience from our recruitment process at Lynx.MD. The recording can be found here and the slides are here.

A summary of my tips –

For candidates – plan ahead, document your work, and polish it by proofreading and linting just before handing it over, use version control tools and write tests to emphasize the added value you bring.

For companies – make the test relevant for the position and the candidate, respect the candidate’s time and be available for her. Know your biases both when giving the assignment and when evaluating and giving feedback.

Advertisement

5 interesting things (18/02/2022)

What to Do When You Are Less Productive Than Your Teammates? I know Miri for a while and she has a very unique and sensitive point of view. This post is worth reading even if you don’t share this feeling. It has some advice I find practical and it can help you better understand your colleagues and friends that might feel this way.

https://medium.com/@miryeh/what-to-do-when-you-are-less-productive-than-your-teammates-c5369423de8f

Wordle — What Is Statistically the Best Word to Start the Game With? Wordle conquered the world in the last few months therefore there must be a data science aspect to it.

https://medium.com/@noa.kel/wordle-what-is-statistically-the-best-word-to-start-the-game-with-a05e6a330c13

Bonus – https://mobile.twitter.com/bertiearbon/status/1484948347890847744

How I Discovered Thousands of Open Databases on AWS – In the last few months I have been training my security muscle to be more security aware both from infrastructure and code perspective and this is a great reminder why.

https://infosecwriteups.com/how-i-discovered-thousands-of-open-databases-on-aws-764729aa7f32

Top 10 Tips You Should Know As A Modern Software Architect – lately I tried to avoid such posts because I find

https://ankurkumarz.medium.com/top-10-tips-you-should-know-as-a-modern-software-architect-8e602c6c998f

Optimizing Workspace for Productivity, Focus, & Creativity – I think one of the things covid19 enabled us is to better question and adjust our workspace to our needs. This post shares some research, advice, and tips about the topic. The low ceiling vs high ceiling hooked me and I’m going to use those effects to better navigate discussions. After years of talking about it, I ordered a standup desk last week and I’m eager for it to arrive.

https://medium.com/@juanpabloaranovich/optimizing-workspace-for-productivity-focus-creativity-fcc0f28b6fa9

5 interesting things (29/12/2021)

7 PyTest Features and Plugins That Will Save You Tons of Time– I read many tutorials and posts about PyTest and this is the first time I run into those flags (features 1-5) which I find very useful. As always – if you can use your superpowers to read the documentation directly. 

https://betterprogramming.pub/7-pytest-features-and-plugins-that-will-save-you-tons-of-time-74808b9d4756

Patterns for Authorization in Microservices – I find this post interesting since I currently face a similar problem of setting authorization and authentication architecture in the product I work on that can have complex access patterns such as a user can access multiple resources on different access levels owned by different organizations.


https://www.osohq.com/post/microservices-authorization-patterns

Related bonus – https://blog.miguelgrinberg.com/post/api-authentication-with-tokens


Database Indexing Anti-Patterns – I find this post slightly too high level. Yes, it state possible issues with indexing but a more effective post would be how to detect those anti-patterns on specific databases. E.g measure Mongo index usage on Mongo – https://docs.mongodb.com/manual/tutorial/measure-index-use/


This link is part of this post as a periodic reminder to think and take care of those topics before they become issues.
https://towardsdatascience.com/database-indexing-anti-patterns-dccb1b8ecef

How to safely think in systems. – “Effective systems thinking comes from the tension between model and reality, without a healthy balance you’ll always lose the plot.”. I’m not sure if this post should be in the parenting category or in the career \ professional \ management category. 
https://lethain.com/how-to-safely-think-in-systems/

How Improvised Stand-up Comedy Taught Me to Interview Better – “After all, questions in an interview are mostly a means for getting to know the candidate better, just as pulling words out of a hat is just the framework for a show.”. Great post that connects two domains that usually aren’t brought up together.

https://nogamann.medium.com/how-improvised-stand-up-comedy-taught-me-to-interview-better-9f0168be0726

We raised 12M$ seed funding

In the last year and 3 months, I work for Lynx.md. We develop a medical data science platform that bridges the gap between data owners and data consumers while taking care of de-identifications, privacy, and security aspects of sharing data.

10 days ago we announced that we raised a 12M$ seed funding and we are hiring – DevOps engineers, data engineers, data scientists, backend \ full-stack \ frontend developers, product managers. Our tech stack includes – Python mainly using FastAPI, Django, pandas, etc., AWS (but will soon add Azure too), Postgres, elastic search, Redis, Docker. Super interesting challenges with added value. Feel free to reach out if you want to learn more.


Read more about us – https://www.calcalistech.com/ctech/articles/0,7340,L-3924888,00.html

5 interesting things (1/12/21)

Tests aren’t enough: Case study after adding type hints to urllib3 – I read those posts as thrillers (and some of them are the same length :). This post describes the effort of adding type hints to urllib3 and what the maintainers’ team learned during this process. Super interesting.

https://sethmlarson.dev/blog/2021-10-18/tests-arent-enough-case-study-after-adding-types-to-urllib3

Why you shouldn’t invoke setup.py directly – post by Paul Ganssle, python core developer setuptool. TL;DR of the TL;DR in the post – “The setuptools team no longer wants to be in the business of providing a command-line interface and is actively working to become just a library for building packages”. See the table in the summary section for a quick how-to guide.

https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

Python pathlib Cookbook: 57+ Examples to Master It (2021) – I had a post about pathlib for a while in my drafts and now I can delete it since this guide is much more extensive. In short, pathlib is part of the Python standard library since Python 3.4 and it provides an abstraction for filesystem paths over different operating systems. If you still work with os for paths this is a good time to switch.

https://miguendes.me/python-pathlib

10 Tips For Using OKRs Effectively – I think a lot about OKRs for my team and moreover on personal OKRs and how to grow both the team and the product. I found this post (and the associated links) insightful.

https://rushabhdoshi.com/posts/2020-06-18-10-tips-for-making-okrs-effective/

How to Choose the Right Structure for Your Data Team – I started with those posts and soon enough read many more posts by y Bar Moses, Co-Founder, and CEO, Monte Carlo. Her posts have two dimensions that are relevant for me – team building (specifically around data-intensive products) and data engineering. If you find at least one of those topics interesting I believe you’ll enjoy her posts.

https://towardsdatascience.com/how-to-choose-the-right-structure-for-your-data-team-be6c1b66a067
https://towardsdatascience.com/7-questions-to-ask-when-building-your-data-team-at-a-hypergrowth-company-dce0c0f343b4

Other pie chart

This morning I read “20 ideas for better data visualization“. I liked it very much and specially I found 8th idea – “Limit the number of slices displayed in a pie chart” very relevant for me. So I jumped into the plotly express code and created a figure of type other_pie which given a number (n) and a label (other_label) created a pie chart with n sectors. n-1 of those sectors are the top values according to the `values` column and the other section is the sum of the other rows.

A gist of the code can be found here (check here how to build plotly)

I used the following code to generate standard pie chart and pie chart with 5 sectors –

import plotly.express as px
df = px.data.gapminder().query("year == 2007").query("continent == 'Europe'")
df.loc[df['pop'] < 2.e6, 'country'] = 'Other countries' # Represent only large countries
pie_fig = px.pie(df, values='pop', names='country', title='Population of European continent')
otherpie_fig = px.other_pie(df, values='pop', names='country', title='Population of European continent', n=5, other_label="others")

And this is how it looks like –

Pie chart
Pie chart
Other pie chart

5 interesting things (21/10/21)

4 Things Tutorials Don’t Tell You About PyPI – this hands-on experience together with the explanations is priceless. Even if you don’t plan to upload a package to PyPI anytime soon those glimpses of how PyPI works are interesting.

https://blog.paoloamoroso.com/2021/09/4-things-tutorials-dont-tell-you-about.html

Responsible Tech Playbook – I totally agree with Martin Fowler statement that “Whether asked to or not, we have a duty to ensure our systems don’t degrade our society”. This post promotes the text book about Responsible Tech published by Fowler and his colleagues from Thoughtworks. It also references additional resources such as Tarot Cards of Tech Ethical Explorer.

https://martinfowler.com/articles/2021-responsible-tech-playbook.html

A Perfect Match – A Python 3.10 Brain Teaser – Python 3.10 was released earlier this month and the most talked about feature is Pattern Matching. Read this post to make sure you get it correctly.

https://medium.com/pragmatic-programmers/a-perfect-match-ef552dd1c1b1

How I got my career back on track – careers is not a miracle. That’s totally ok if you don’t want to have one but if you do and have aspirations you have to own it and manage your way there. 

https://rinaarts.com/how-i-got-my-career-back-on-track

PyCatFlow –  A big part of current data is time series data combined with categorical data. E.g., change in the mix of medical diagnosis \ shopping categories over time etc. PyCatFlow is a visualization tool which allows the representation of temporal developments, based on categorical data. Check their Jupyter Notebook with interactive widgets that can be run online.

https://medium.com/@bumatic/pycatflow-visualizing-categorical-data-over-time-b344102bcce2

Growing A Python Developer (2021)

I recently run into a team lead question regarding how to grow a backend Python Developer in her team. Since I also iterated around this topic with my team I already had few ideas in mind.

Few disclaimers before we start. First, I believe that the developer also has a share in the process and should express her interest and aspirations. The team lead or tech lead can direct and light blind spots but does not hold all the responsibility. It is also ok to dive into an idea are a tool that is not required at the moment. They might come in handy in the future and they can inspire you. Second, my view is limited to the areas I work in. Different organizations or products have different needs and focus. Third, build habits to constantly learn and grow – read blogs and books, listen to podcasts, take online or offline courses, watch videos, whatever works for you as long as you keep moving.

Consider the links below as appetizers. Each subject below has many additional resources besides the ones that I posted. Most likely I’m just not familiar with them, please feel free to add them and I’ll update the post. Some subjects are so broad and product dependent, e.g. cloud so I didn’t add links at all. Additionally, when using a specific product \ service \ package read the documentation and make it your superpower. Know Python standard library well (e.g itertoolsfunctoolscollectionspathlib, etc), it can save you a lot of time, effort, and bugs.

General ideas and concepts

  1. Clean code – bookbook summary
  2. Design patterns – refactoring bookrefactoring gurupython design patterns GitHub repo
  3. Distributed design patterns – Patterns of Distributed Systems
  4. SOLID principles – SOLID coding in Python
  5. Cloud
  6. Deployment – CI\CDdockerKubernetes
  7. Version control – git guide
  8. Databases – Using Databases with Pythondatabases tutorials
  9. Secure Development – Python cheat sheet by SnykOWASP

Python specific

  1. Webservices – flask, Django, FastAPI
  2. Testing – Unit Testing in Python — The Basics
  3. Packaging –  Python Packaging User Guide
  4. Data analysis – pandas, NumPy, sci-kit-learn
  5. Visualization – plotly, matlpotlib
  6. Concurrency – Speed Up Your Python Program With Concurrency
  7. Debugging – debugging with PDBPython debugging in VS Code
  8. Dependency management – Comparison of Pip, Pipenv and Poetry dependency management tools
  9. Type annotation – Type Annotations in Python
  10. Python 3.10 – What’s New in Python 3.10?, Why you can’t switch to Python 3.10 just yet

Additional resources

  1. Podcast.__init__ – The weekly podcast about Python and its use in machine learning and data science.
  2. The real python podcast
  3. Top 8 Python Podcasts You Should Be Listening to
  4. Python 3 module of the week
  5. Lazy programmer – courses on Udemy mainly AI and ML using Python
  6. cloudonaut – podcast and blog about AWS

5 tips to ace coding interview assignments

Now days, it is a very common practice to give a coding home tests as part of interview process. Beside solving the task you are ask to I believe there are few additional things you can do in order to impress the reviewers and ace this step of the process.


1. Push the code to a private repository and share it with the reviewers – this creates a two fold advantage. First, it demonstrates the reviewers that you are familiar with version control tools and second it shows your working process and that you keep track of your work. Don’t forget to write meaningful commit messages.

2. Write README file – the readme file gives a context to the entire project and reflects the way you understand the assignment. One of the annoting things as a reviewer is to guess how to run the code, what are the requirments and so on. Beside packaging or building the code in a way the runs smoothly (e.g in Python if using pip add a requirements.txt) a README file should help me find my way inside the project. In such assignments where you don’t have a direct communication with the reviewers the README files also serves as a place to document your decisions and thoughts.

What should you include in the README file? Short introduction explaining the project purpose and scre.  How to install and run or use it, preferably with some snippet that one can just copy-paste. How to run the tests (see next section :). Additional sections can include explainations about choices you made architecture wise or implementation wise, charts, performance evaluation, future ideas, dependencies, etc. This will help the reviewers get into your code quickly and run, understand your thinking and show that you are eager to share your knowledge with your peers.

For ease of use, check the template suggested here.

3. Write tests – usually unit tests are enough for this scope. This will help you debug your code and make sure it works properly. It will also signal the reviewers that you care about the quality of your code and know your job.

4. Run linters, spell check and do a proof reading for everything – make sure your code uses the common conventions and style for the tools you are using (e.g PEP-8 for python). Bonus points if you add the linters as pre-commit hooks to your repository. This make your code smoother and easier for the reviewers to read. The formatted code indicates that you are used to sharing your code with others and the hooks signal that you are productive and lazy by automating stuff.

5. Document everything – the idea behind this tip is not to annoy the reviewers by letting them guess what you meant. That is document what each module, function and parameter does. For example, in Python, use type annotation and docstrings.

5 interesting things (22/09/21)

Writing a Great CV for Your First Technical Role – a series of 3 parts about best practices, mistakes, and pitfalls in CV showing both good and bad examples. I find the posts relevant not just for first rolls but also as a good reminder when updating your CV.

https://naomikriger.medium.com/writing-a-great-cv-for-your-first-technical-role-part-1-75ffc372e54e

Patterns in confusing explanations – writing and technical writing are superpowers. Being able to communicate your ideas in a clear way that others can engage with is a very impactful skill. In this post, Julia Evans describes 13 patterns of bad explanation and accompanies that with positive examples.

https://jvns.ca/blog/confusing-explanations/

How We Design Our APIs at Slack – not only that I agree with those advices and had some bad experiences with similar issues both as a API supplier and consumer. Many times when big companies describe their architecture and process they are irrelevant to small companies due to cost, lack of data or resources or other reasons ,but the great thing about this post is that it also fits small companies and relatively easy to implement.

https://slack.engineering/how-we-design-our-apis-at-slack/

Python Anti-Pattern – this post describes a bug that is at the intersection of Python and AWS lambda functions. One can say that it is an extreme case but I tend to think it is more common than one would think and may spend hours debugging it. It is well written and very important to know if you are using lambda functions.

https://valinsky.me/articles/python-anti-pattern/

Architectural Decision Records – sharing knowledge is hard. Sometimes what is clear for you is not clear for others, sometimes it is not taken into account in the time estimation or takes longer than expected, other times you just want to move on and deliver. Having templates and conventions make it easier both for the writers and the readers. ADRs answer specific need.

https://adr.github.io/