Your Coding Teacher
380 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
Some C++ notes for my Amazon interviews Iterate map: for (auto &itr : my_map) f(itr.first, itr.second); Random number in rage v= rand() % 30 + 100;// 100-129 Flip boolean b= !b; stable_sort vs sort -> guarantees that equal items retain their original order
In coding, it's not only about choosing the right technology. Putting good practices into place is key.
When working with objects and data structures, remember Demeter's law: - Objects should only talk to their friends; don't talk to strangers. equivalently - Objects should not rely on the inner workings of the objects they're interacting with
"Brevity is the soul of wit." - Shakespeare
Timsort, derived from merge sort and insertion sort, was implemented by Tim Peters in 2002 for Python It finds subsequences of the data that are already ordered and uses them to efficiently sort the rest (merging them) Best-case time complexity is O(N), average is O(NlogN)
Optimal substructure: the optimal solution to a problem of size n, can be derived from the optimal solution of the same instance of that problem of size smaller than n. Divede & conquer: a problem that can be solved by combining optimal solutions to non-overlapping subproblems
"Watch what people do, not what they say" In the software development realm: "What people say" -> The comments "What people do" -> THE CODE Code never lies
"Intellectuals solve problems. Geniuses prevent them." - Albert Einstein
Higher-order functions are functions that: - Accept other functions as arguments or - Return a function Higher-order functions are useful to abstract over actions, not just values.
The broken windows theory is states that visible signs of - crime - anti-social behavior - civil disorder create an urban environment that encourages further crime and disorder, including serious crimes. Stay on top of broken windows in your code (and your life).
Concurrency 101 - Two events are concurrent if we cannot tell by looking at the program which will happen first. - Concurrent programs are often non-deterministic -> it is not possible to tell, by looking at the program, what will happen when it executes.
A GCP role is a sets of permissions - Primitive. Apply to the entire project. 3 concentric roles: Viewer, Editor, and Owner - Predefined. To access to specific services, for example, storage.admin - Custom. Lets you create your own roles, combining the permissions you need
Some books that helped me when I got started - Code Complete - Clean Code - Programming Pearls - Effective C++ First 2 are almost language agnostic, focusing on principles The other 2 in C and C++ There's also Effective Java and Effective Python
Never attribute to malice that which can be adequately explained by stupidity.
Beautiful is better than ugly - The Zen of Python
Programming is hard It's not just a lot of if and while statements put together It's about creating systems made of small components that can be understood and easy to maintain and extend. This takes lots skills
Powerful problem-solving technique: Transform a problem whose solution you don't know to a problem that you can solve. I saw it in the context of mathematical proofs but it applies everywhere.
5 Random coding tips Learn to accept constructive criticism Be open-minded Try pair program Keep learning Build your own toolbox
Microsoft Visual Basic was created in 1991 It is object-oriented and type-safe and it has its roots from the family of C languages such as C, C++ and it is similar to Java Module Module1 Sub Main() Console.WriteLine("Hello World!") End Sub End Module
List comprehensions in Python may consume significant amounts of memory and crash your program Ex: reading files or working on streams of data User generators instead, which return an iterator that can be advanced one step at a time to produce the next output
"I don't have a CS degree"

Me neither.

But realize that you might just be a couple of textbooks away from what you need to know to perform well:

- OS
- Networking
- Databases
- Data structures and algorithms