Your Coding Teacher
372 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
A heap: - Finding its max/min is a O(1) operation - Can be built in *linear time* - Adding elements is O(logn)
Design patterns in 1 tweet Command: Encapsulate a command request as an object (with state information if necessary) Ex: Ordering food at a restaurant The command has all the information the chef needs to start preparing the meal Commonly used for undo/redo operations
Atomic operations refer to operations composed of multiple steps where either all the steps are performed or none are performed. This is a mechanics to deal with multiple processes/threads accessing the same resource where the order of operations may change the end result.
"The number of programmers doubles every 5 years. That means, at any time, half the world's programmers have less than 5 yrs experience" - Robert C. Martin
Use zip to iterate multiple lists in parallel. for name, age in zip(names, ages):. print(name, age) In Python 2, you should use izip instead (to use less memory) Use zip_longest if the lengths might differ.
"I simply have no clue how to do that." Step by step. "There is only one way to eat an elephant: a bite at a time"
You're not finished when "it works" You're finished when it's "right" Otherwise, you're setting up yourself for failure in the (near) future
In 1970, PASCAL was developed by Nicolaus Worth Compared to prior languages Pascal was easy to learn and was favored when teaching programming. It was designed to encourage good programming style and structure program HelloWorld; begin WriteLn('Hello, world!'); end.
- Horizontal scaling: add more machines to your pool of resources -> scaling out - Vertical scaling: add more power (CPU, RAM) to an existing machine -> scaling up
As a software developer, writing working code is only part of your job You have to write working code that you AND *other people* can : - Maintain - Understand - Use - Extend Otherwise, as soon as requirements change, it'll become useless.
Cloud DNS is Google's managed Domain Name System (DNS) host, both for internal and external (public) traffic. It is the only service in GCP with 100% SLA – it is available 100% of the time.
"In a society in which the educational system is used as an instrument for the establishment of a homogenized culture, in which the cream is prevented from rising to the top, the education of competent programmers could be politically impalatable" - Edsger W. Dijkstra
I don’t see why developers make six figures, all they need to know is: - Linux - Bash - Go - Python - JavaScript and frameworks - Git - Docker - Kubernetes - Terraform - Distributed Systems - AWS - GCP - Prometheus - Grafana - Being On-call - Security
Amazon EC2 - Provides virtual servers - Supports multiple OS - Resources optimized for different workloads: memory/CPU intensive, storage, etc
Test doubles lingo - "Fake" implementation of real services (eg: in-memory db) - "Stubs" return certain values when invoked - "Mocks" keep track of interactions (eg: number of invocations) - "Spies" verify interactions with and/or mock some parts of a dependency
"Most people find the concept of programming obvious, but the doing impossible." - Alan J. Perlis
If you want to confuse your enemies, give them the source code. If you want to really confuse them, give them the documentation.
Have pride in solving problems Not in writing code
Decipher the classic Java public static void main(String args[]) - public: anyone can call this method - static: function belongs to class, not to a particular instance - void: return type - main: function name - String: argument type - args[]: array of strings
Scripts (like tests) are part of your system. You need to version-controll, maintain, test, and refactor them. They will make you go fast in the mid/long term.