Ethereum Virtual Machine

Blockchains and crypto currencies are an exciting topic, and they are trending right now because the price of crypto currencies are shooting up. You’ve probably heard of Bitcoin, the largest crypto currency by market cap, and probably also heard of Ethereum, the second largest crypto currency by market. What might come as a surprise for you (it did for me) is that Ethereum dos not sell itself as a crypto-currency.

Read More

Python Table Tests

In the go programing language there is a testing pattern called table tests. I want to quickly go over what is this pattern, why I think it’s great and how we can use it in python. What are Table tests In go a simple test would look like this: func TestAdd(t *testing.T) { got := add(5, 6) if got != 11 { t.Errorf("Expected 11, Got %v", got) } } A table test of the same kind will look like this:

Read More

Testing Pyspark

We all know unit testing our code is a good idea. But there is some kind of inertia that keeps most of us from doing it. Part of this inertia, I believe is not knowing how to start. So I am sharing how I write tests for pyspark in the hopes that it will give you the push you need. Testing in python First things first, if you’ve never written a test for a normal python function we need to get that out of the way first.

Read More