Anything that can go wrong will go wrong
Anything that can't go wrong will go wrong anyway
Anything that can't go wrong will go wrong anyway
Software is more like science that mathematics.
You cannot prove that you'r software is correct (no bugs).
You can write a bunch of tests to show that your code hasn't failed (so far).
You cannot prove that you'r software is correct (no bugs).
You can write a bunch of tests to show that your code hasn't failed (so far).
It's possible to "increase the available RAM" on a Linux machine using disk.
The Linux virtual memory system can move data from memory disk and viceversa, in a process called swapping.
The disk area used to store memory pages is called swap space.
The Linux virtual memory system can move data from memory disk and viceversa, in a process called swapping.
The disk area used to store memory pages is called swap space.
The first 90% of a project takes 90% of development time.
The last 10% takes the other 90% of the time.
The last 10% takes the other 90% of the time.
In C++, to prevent resource leaks, use RAII
Resource Acquisition Is Initialization
Acquire resources in constructors and release them in destructors
Resource Acquisition Is Initialization
Acquire resources in constructors and release them in destructors
"Debugging is like being the detective in a crime movie where you are also the murderer."
- Filipe Fortes
- Filipe Fortes
Python's list comprehensions provides a concise way of creating a list from another.
For example:
cubes = [x**3 for x in a].
In general, they are clearer than maps and filters built-in function.
For example:
cubes = [x**3 for x in a].
In general, they are clearer than maps and filters built-in function.
Message queues in a tweet
- Allows for asych processing
- Stores messages that servers will read and process
- Adds reliability (no message is lost)
- Dead-letter queue: receives messages that couldn't be routed to their destination
- Ex: SQS, Kafka, Rabbit MQ, Pub/Sub
- Allows for asych processing
- Stores messages that servers will read and process
- Adds reliability (no message is lost)
- Dead-letter queue: receives messages that couldn't be routed to their destination
- Ex: SQS, Kafka, Rabbit MQ, Pub/Sub
In GCP, you can use preemptible virtual machines to save up to 80% of your costs.
They are ideal for fault-tolerant, non-critical applications.
You can save the progress of your job in a persistent disk using a shut-down script to continue where you left off.
They are ideal for fault-tolerant, non-critical applications.
You can save the progress of your job in a persistent disk using a shut-down script to continue where you left off.
"There are no significant bugs in our released software that any significant number of users want fixed."
- Bill Gates
- Bill Gates
The best thing about a boolean is even if you are wrong, you are only off by a bit
"The language in which we express our ideas has a strong influence on our thought processes."
- Donald Knuth
- Donald Knuth
Instead of trying to figure out what's the next incremental improvements for a slow algorithm,
sometimes it's better to try a complete different approach
sometimes it's better to try a complete different approach
4 JavaScript interview questions
What is a Callback function?
What are Arrow functions?
What is the usage of Function.prototype.bind?
How to check if a value is null?
What is a Callback function?
What are Arrow functions?
What is the usage of Function.prototype.bind?
How to check if a value is null?
We live in a world governed by distributed systems.
From small intranets, to share printers, to the Internet
From small intranets, to share printers, to the Internet
Bit-level operations on an integer x
x |= 1<<7 -> set bit 7 (the first bit starts at index 0)
x &= ~(1<<7) -> clear bit 7
x ^= 1<<7 -> toggle bit 7
mask = ((1<<8)-1) -> create an 8 bit mask
(x >> 16) & 0xf -> extract bits 16 through 8
(x >> 7) & 1 -> test bit 7
x |= 1<<7 -> set bit 7 (the first bit starts at index 0)
x &= ~(1<<7) -> clear bit 7
x ^= 1<<7 -> toggle bit 7
mask = ((1<<8)-1) -> create an 8 bit mask
(x >> 16) & 0xf -> extract bits 16 through 8
(x >> 7) & 1 -> test bit 7
I've also wasted long hours debugging issues that came from:
- Reading the wrong configuration file
- Using outdated information from an internal wiki page
- Problems with someone else's code
- Copy-paste related errors
When things go wrong, check your assumptions.
- Reading the wrong configuration file
- Using outdated information from an internal wiki page
- Problems with someone else's code
- Copy-paste related errors
When things go wrong, check your assumptions.