# Posts

• ### 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.

• ### How To Start Programming Like a Pro: Mindset and Tools

May 23, 2017

My fundamental goal for RC is to learn how to think and work like a programmer in a professional environment.

My programming background has been coding for a few research projects in SageMath, which is basically Python with pure math library functions, and a couple foundational CS courses. I’ve never worked in industry or managed a large code-base.

Today I had the chance to learn about what constitutes a good programming setup from Saul Pwanson, who’s programmed his whole life (that’s over 30 years).

blog - Hang Lu Su