This is a sample from a real application I started on a few years ago, the sample above is from the earliest skeleton version of the application, and is (only) the SQL data model and some utility functions.
Others were asking about Coding interviews and this is our version of it.
So, take your time, read it through, explain it and see if you can tell me:
-
What does the webapp do?
-
How do the views look?
-
Why does this code exist?
Cracking the code interview code review
It doesn’t work. Just converting to a set destroys information you need. For example consider “aba”, “a”. You’re halfway on the rails but you didn’t pick quite the right data structure.
You can use a - b rather than a.difference(b). Maybe you don’t have to, either, just making sure you know.
People will advise not to use string as a name since Python has a builtin module named string. I personally would use s, t (for string and next string, a la i,j,k,… for index and next indexes) but there are those who don’t like the mathy variable names too so it’s a judgment call. Regardless, I don’t like string_edited as a name. The string isn’t an edited string. It’s a candidate edited string.
For those of you who got hired to work with Python, what coding challenges did they have have you do during the interviewing process?
Code review interview preparation
When I was getting ready for a tech interview I used Pluralsight. You’ll get either 20 or 30 days free and has great training videos instead of just trying random videos when doing searches in YouTube etc. It also helped me fill in any holes I had for what I was going for. I’ve been coding for close to 30 years and you’ll always be learning. Plus I’ve been on probably 10 interviews and biggest thing is speaking clearly. Have lots of notes etc printed around you. If it’s video stick them on the wall where you can see them. Lastly talk like you don’t need the job so you can relax. As long as you know the tech you should be fine.
More on reddit.com