Your Coding Teacher
Open in Telegram
Coding, software engineering & #bitcoin technologies. I'll make you a better thinker, not just a better developer | Ex Amazon, Senior DevOps @eBay
Show moreThe country is not specifiedTechnologies & Applications98 126
334
Subscribers
No data24 hours
No data7 days
No data30 days
Posts Archive
"Walking on water and developing software from a specification are easy if both are frozen."
- Edward V Berard
time-of-check-to-time-of-use errors
A program is vulnerable if it makes two file-based function calls where the 2nd call depends on the results of the 1st call.
Since the two calls are not atomic, the file can change between calls.
This is an example of race condition.
Cloud Armor protects your infrastructure from DDoS attacks
You define rules (for example to whitelist or deny certain IP addresses or CIDR ranges) to create security policies
These policies are enforced at the Point of Presence level (closer to the source of the attack)
Arrays
- Constant-time random access. Map to a memory address
- Space efficient. Just the data
- Data locality. Better cache usage (image scanning all elements)
- Fixed size. Overcomed by allocating huge arrays (wasteful) or resizing dynamically (good amortized performance)
It's fun to write code alone, but writing code that is successful is a collaborative activity
Can you find what's wrong with this piece of code?
It's supposed to delete the head of a linked list
void removeHead(Node *head){
delete head;
head = head->next;
}
Use const (in C++) or final (in Java) when something is not supposed to change.
Compilers can detect if you're attemping to change a const/final variable
Humans will understand better the code.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler
Race condition: the end result of multiple operations depends on the sequence of uncontrollable events
Examples:
- Dirty reads/writes: Client X read/overwrites a value ClientY has written but not commited
- Read/Write skew
- Phantom reads
- Lost updates
You are still writing if-else statements and while loops, like 60 years ago.
Never forget the fundamentals
"A computer programmer is a device for turning coffee into bugs."
- Bram Moolenaar
GCP Resource Manager manages
- Organization. Root node in the resource hierarchy. Optional
- Projects. Required to create resources. Prod vs Dev envs
- Folders. Extra level of project isolation. Departments in a company. Optional
- Resources. VMs, load balancers, and so on.
Errors should never pass silently
Unless explicitly silenced
- The Zen of Python
Dijkstra is a greedy algorithm to find the shortest paths between 2 nodes in a graph.
It was developed by Edsger W. Dijkstra in 1956.
In 1968, A* was published. It achieves better performance by using heuristics to guide its search.
Every application or service you want to develop has:
-Functional requirements: what is it supposed to do?
- Non-functional requirements: security, robustness, scalability, and maintainability
Both are important
Classic MATLAB interview question:
What's the difference between A' and A.'?
A' performs conjugate transpose, A.' only tranpose. The results are only different if you're dealing with complex numbers
Object-oriented programming (OOP) is a programming paradigm based on the idea of "objects", which can contain attributes and functions to operate on them.
Simula is considered the first language with the primary features of an object-oriented language. It was created in 1967.
