- formatting
- images
- links
- math
- code
- blockquotes
•
•
•
•
•
-
Obfuscating a Function – How not to write Code
A while back, I created a straightforward function to convert an integer into a new format, resulting in clear code. However, I inexplicably chose to obscure its purpose, leading to the following outcome: Read more in this post...
-
Short Notes: Eigendecomposition of a Matrix
The derivation of the eigendecomposition is surprisingly simple. Read more here!
-
Surprising Bank Investment
Discover how investing in a startup turned into a financial rollercoaster. Your bank offers you a chance to invest in a new venture, with the promise of keeping all the profits if successful. Excited, you dive in with $1,000,000, providing 99% of the investment while the bank chips in the remaining 1%.
-
Solving Peg Solitaire with efficient Bit-Board Representations
Many of us might now the board game peg solitaire and might even have one of its many variants at home. Peg solitaire is a one-player game played on a board with n holes and n - 1 pegs. The number of holes depends on the board variant. For example, the English variant consists of 33 holes while the typical diamond variant consists of 41 holes. The rules of the game are rather easy.
-
Choosing a Voltage Divider Resistor for a Light Dependent Resistor
Imagine that you are planning to use a Light Dependent Resistor (LDR) for your new IoT prototype in order to detect whether or not a lamp is turned on in a (otherwise dark) room. A common way to solve this problem is the usage of a voltage divider circuit.