Flappy Bird built on top of SIMple Mechanics
Flappy Bird built on top of SIMple Mechanics
SIMple Mechanics allows users to graph properties of an object; the graph on the right shows y-position

Lately I’ve been working on SIMple Physics, a set of educational physics simulators meant to help teach and learn physics intuitively without expensive lab equipment or in person classes. Each simulator allows users to import and export scenes and potentially add some more advanced functionality through Lua.

Until recently, the Lua scripting was fairly limited. It could be used to add/remove objects and change variables such as but crucially it could not affect objects once they were created.gravity, and there was also an update() function which ran every frame.

-- this example instantiates a multicolored grid of circles for row…

From ReactJS, Vue, and Angular to Golang, ExpressJS, and ASP.NET, there are endless combinations for a frontend and backend framework to use when building a web app. Svelte and Haskell are two of the most unique choices for frontend and backend technologies. Svelte, unlike the ubiquitous ReactJS and many of its competitors, doesn’t use a Virtual DOM (VDOM). Haskell is purely functional, as opposed to the primarily imperative Golang, C#, and Java.

I’ve been considering rewriting my personal website from Go to Haskell for a while. While Go is a great server side language, it’s painfully boring. This is an…

Photo by Ludde Lorentz on Unsplash

Whenever I learn a new language, some of the first things I write are some simple Fibonacci sequence functions, one recursive, one iterative, and one to make a sequence of the Fibonacci numbers up to n. These three problems usually reveal a good bit of the difference in philosophy between languages or demonstrate some of the different ways to approach a problem within a language. Here are some of the coolest Fibonacci functions I’ve found.

Traditional Recursive

Here’s the standard recursive Fibonacci function in Python. We’ve all seen it before; it’s pretty boring and incredibly slow.

def fib(n): if (n < 2)…

Whether you’re a frontend engineer, sysadmin, or even a video editor, chances are that you spend a lot of time typing on your keyboard. Typing is a pretty unavoidable part of daily life in the modern world, especially since the pandemic, and RSI or carpal tunnel are almost an expected part of life for programmers. Since many schools are now online and students now spend many hours a day on their computer, regardless of age, even children have to worry about keyboard ergonomics.

That’s right. The most important improvement you can make to your workflow is buying an ergonomic keyboard.

An ergonomic keyboard
An ergonomic keyboard
An ergonomic keyboard. Source: /u/Slavfot on Reddit

Keyboard Ergonomics Crash Course

Photo by Jefferson Santos on Unsplash

One of the most important aspects of a programming language is its complexity. Languages that are too simple are often thought of as unexpressive and long-winded, while languages that are too complicated are hard to learn and result in incomprehensive codebases. As such, programming language designers have to take a stance on complexity eventually. For example, simplicity is arguably Go’s most important feature, whereas C++ seems to add pretty much any language feature that becomes popular.

The perceived complexity of a programming language isn’t just a function of how many languages features it has or how many ways there are…

This is somewhat of a followup to my post on Lua integration from a few days ago.

As one part of my high school senior research project this year, I wrote a universal gravitation simulator meant to help learn/teach physics. The goal was for it to be as accessible/useable as possible, so I spent 90% of the time on UI. One of the main features of the project is that you can save and load preset scenarios, for example, a grid of equal mass bodies or a dual star system.

The project is written in Rust, so during the year…

I’ve recently been writing a Go server for my my website at mikail-khan.com. I’ve never used Go, and I’ve never deployed a server to a domain with https using essentially just a Linux server. Here are a few steps I had difficulty with:

1. Pointing an HTTPS domain towards a singular EC2 instance

There’s plenty of guides around for, especially in the AWS docs, for routing the domain to an Elastic IP using AWS Load Balancers etc., but given that I don’t want to pay anything, I just wanted to route everything to a single EC2 instance.

The first thing I tried was to just use the public IPv4 address…

Mikail Khan

Math+CS Major at Purdue University, https://mikail-khan.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store