Benefits of Test Driven Development - Confidence to make changes: you've written a nice test suite - Documentation: tests show how to use the code - Force to think about good design: you need to decouple modules in order to unit test them However, it's no panacea
Think twice before you start programming or you will program twice before you start thinking
Things evaluated during a coding interview: - Analytical skills - Coding skills - Communication skills - Experience - Technical knowledge It's not just coding. But it doesn't mean coding skills are not essential.
Don't go blind when you want to optimize your code Profile it first. Execution time follows the 20/80 rule: "Most of the execution time will be spend in a small fraction of your codebase"
Do not reinvent the wheel. Use libraries. But also, do not think that libraries are ideal for everything. Only if they don't meet your needs, think about rewriting them.
5 Random coding tips Be a mentor Review your own code Share your knowledge Commit early and often Submit small PRs
Coding interview preparation tips - When you're solving problems, time yourself - Allow no distractions - If you get stuck, keep trying. Do not give up. - Think out loud - Keep a log of common mistakes you make
There should be one-- and preferably only one --obvious way to do it Although that way may not be obvious at first unless you're Dutch - The Zen of Python
In Javascript, what is the result of the following expression made of primer numbers and different operators? 1 * 2 + 3 == 5 && 7 * 11 > 13
Some C++ notes for my Amazon interviews Create a 2D matrix vector<vector<int>> matrix; Iterate vector (without changing it) for(auto it = s.cbegin(); it != s.cend(); ++it) cout<<*it<<" "; Find max value in vector auto max = *max_element(v.begin(), v.end());
"In computing, turning the obvious into the useful is a living definition of the word "frustration"." - Alan J. Perlis
In addition to Google console, you can interact with GCS using gsutil (cli tool). You can use: - Multithreaded uploads: to upload a large number of small files. The command looks like gsutil -m cp files gs://my-bucket - Parallel uploads: to upload large files.
"Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?" - Brian Kernighan
find vs locate Both find files in a directory But locate searches an index, which implies it is faster than find, but won't find files that were added after the last index update
5 Random coding tips Find a mentor Under promise and over deliver Be proactive Stay curious Continually re-assess your workflow
Dynamic programming, developed by Richard Bellman in the 1950s, is a powerful algorithm design technique to solve problems by: - Breaking them down into smaller problems - Storing their solutions - Combining these to get to the solution of the original problem