Your Coding Teacher
371 subscribers
10 links
Coding, software engineering & #bitcoin technologies. I'll make you a better thinker, not just a better developer | Ex
Amazon, Senior DevOps @eBay
Download Telegram
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
"Perspective is worth 80 IQ points" - Alan Kay
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.
The best things are simple, but creating simple things is not easy
Simple is better than complex - The Zen of Python
"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
Complex is better than complicated - The Zen of Python
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.
Sparse is better than dense - The Zen of Python
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