# Posts

• ### What A Great Way To Ask A Technical Question!

August 1, 2017

Browsing around to get an answer about a technical question, I stumbled unto an unusually well-structured StackOverflow question by Martineau which had a corresponding unusually helpful and thorough answer. This made me go if only my questions were this well-posed, I would’ve gotten better quality help, so allow me to share it.

• ### What Are Unit Tests For?

July 26, 2017

I was really confused about this, so I talked to Victoria Kirst who teaches Computer Science at Stanford and was a Google engineer in the past. She really elucidated unit tests for me! Here are my takeaways.

Unit tests are to make sure you haven’t broken anything in the program when you change it. In order words, unit tests are there to prevent regression in your code.

• ### What Is Lambda Calculus?

July 4, 2017

Forget the name calculus and maybe even lambda. A lambda calculus is the smallest Turing complete language using only one operation: evaluationAlso known as $\beta$-reduction. , and one object: functions.

The way the lambda and the calculus comes up is the following: we typically name the functions starting with a $\lambda$ (lambda) symbol, and we say it’s ‘‘calculus’’ in the sense of a particular method or system of calculation or reasoningSource: Google. .

So how do we write functions, and what is this way of reasoning?

• ### What Is A Cryptographic Hash?

June 9, 2017

Cryptographic hashes play a fundamental role in the structure of blockchains, which is what Bitcoin is built on.

Essentially, hashes act as digital fingerprints for data. If you have a person and a fingerprint, it is easy to verify that the fingerprint belongs to the person, but a fingerprint alone tells you very little about someone. We will later see that this property is useful for verifying the authenticity of a blockchain.

Let’s explore this more formally in this pre-introductory post to Bitcoin.

• ### Remap Caps Lock to Backspace in macOS Sierra in 1 Second

May 27, 2017

This is useful for Colemak users.

There’s a direct way to remap keys in Sierra from command line.

To remap caps lock to backspace, copy paste this command line (without the $sign). $ hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x70000002A}]}'


That’s it.

blog - Hang Lu Su