Evil Hangman

I learned about Evil Hangman a while ago when I was reading my professor’s blog (Don’t judge me. I’m sure you googled your professors too. The Onion wrote about it.). I never got around to write this game until today when I woke up and decided that I should do something with my life.

Evil Hangman is like normal Hangman — players try to guess a secret word by entering different letters. But in Evil Hangman, players are (almost) guaranteed to lose. I said “almost” because Evil Hangman is a program with a deterministic algorithm. If a player knows how it works, they can guess the letters in a way to maximize their chance of winning.

Continue reading “Evil Hangman”

Advertisement
Evil Hangman

Translating MATLAB to C code

As a low level research assistant in a lab, I have recently been assigned the task of translating a chunk of MATLAB code to C. When I contacted my brother for guidance, he looked at me blankly: “Why? Who does that?” I never thought code translation was a thing. Why don’t people just write their programs in their desired language from the beginning? Why must they come up with new ways to torture these poor research assistants? Warning: this post contains some nerdy information that you shouldn’t be concerning yourself with unless you unfortunately have to.

Continue reading “Translating MATLAB to C code”

Translating MATLAB to C code