Lessons learned from building a “simple” Django application
7 min read
My friends and I had an idea for a website where we could build and showcase our cool visualization ideas. I thought, “oh yeah, that should just be a simple Django app”.
Go Web Application Structure - Part 4 - Database Migrations & Business Logic
10 min read
Frameworks like Django and Rails are able to generate migration files based on the data models you define. Gorm doesn't have this feature, however, it does have some interfaces to make our lives easier when creating migrations.
Published in Go
Go Web Application Structure - Part 3 - The Database
6 min read
The database is a fundamental part of any application, whether you're using a simple database like sqlite or a graph database like neo4j, the data for our application must be persisted somewhere.
Published in Go
Go Web Application Structure - Part 2 - Routing/Serving
10 min read
Now that we have the skeleton for creating command line commands, we can start by creating a new "serve" command. This is similar to Django's "manage.py runserver" and Rails's "rails server".
Published in Go
Trie autocomplete
6 min read
User experience (UX) has become a large industry and many companies are now looking specifically for UX engineers. Autocomplete has been…
Published in Python, Algorithms
Refactoring is not just moving code around
2 min read
Modern text editors and IDEs allow for easy ways to “refactor” the code we (or someone else) wrote. Is it really refactoring if you just…
Counter in Golang
2 min read
Continuing with “Python in Golang”, the next interesting data structure to dive into is the Counter. In Python, this class is also in the…
Published in Go, Algorithms
OrderedDict in Golang
1 min read
One of the most interesting data structures Python has built-in is the OrderedDict. It allows for O(1) lookups via a dictionary, while…
Published in Algorithms, Go
Converting jpeg to png with Golang
1 min read
A project I’m working on called “Comix” deals with comic images, and they’re not always the same format. To help keep the code consistent…
Published in Go
Go Web Application Structure - Part 1
5 min read
When writing Go applications, especially web applications, there isn't much documentation on how to do it the right way. This is both a blessing and a curse.
Published in Go
Becoming a better programmer
7 min read
When I was younger I played a lot of different sports, from football to Tennis to speed skating. Nowadays, I get my exercise from the gym…
Slow down your website, it’s the law
1 min read
Google and Amazon have some of the fastest websites on the internet. In fact, the government has decided that they are too fast. Even with…
Class structure in Python
3 min read
tl;dr: If it overrides some default or expected behavior, put it at the top.
Published in Python
A Story of Cannabis and Security
6 min read
Earlier this year (April 20th to be exact) an article appeared on Google news from Mic.com that piqued my interest. The news website…