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
The systems you design follow the 2nd Law of Thermodynamics They'll grow more complex over time Strive for simplicity Otherwise, you're setting up yourself for failure
How long should it take you to go through a code review? If someone took 3 hours to write that code, I'd guess you'd need a fraction of that time to review it. Hopefully, the author wrote clean code that's easier to follow.
Barriers - Thread synchronization mechanism - Allows threads to wait until other threads have reached the same point, before continuing execution Ex: Sorting a huge array: Split it into several parts, sort each of them in a separate thread and then merge all sorted pieces.
Things evaluated in systems design interviews - How do you deal with ambiguity? - Can you identify the key pieces of the system? - Can you define the scope of the problem? - Can propose a solution that meets the requirements? Because your daily job may look like this
"One of my most productive days was throwing away 1,000 lines of code." - Ken Thompson
If you only know how to do only one thing, it's likely that you have gaps in other areas If you are a front-end dev, learn about backend or dive into the internals of Linux Learn other coding languages Play with machine learning, even if you are an Android developer