Optimization is enticing as an engineer may take some superior knowledge about the langauge you’re writing in, but don’t start optimizing unless you really need to. In the early days of Hadoop, it was common for developers to store data entries as a single line in a file. Every map-reduce job that needed the data…… Continue reading Optimization and When To Do It
Author: 5280incode
Go with Genetic Algorithms
Just for fun, I thought I’d try to learn Go (or Golang as some call it since it’s difficult to Google search ‘go’). I find the best way to learn a new language is to dive in and make as many mistakes as possible. Slowly but surely, the compilation errors die away. What I discovered…… Continue reading Go with Genetic Algorithms
Security though a Simple Django Tweak
Leaving the least amount of information relating to an application’s environment can help prevent data breaches and their headaches. There are plenty of ways attackers try to gain access to sensitive information for websites. By giving up as little information about the platform as possible, we can help limit the number of attack vectors malevolent…… Continue reading Security though a Simple Django Tweak
Genetic Algorithms Part 3: FanDuel Lineup Example
Genetic Algorithms (GAs) can assist finding optimal or near-optimal combinations. They can significantly reduce the development time and execution time to find a good solution. Continuing from Part 2 which shows a concrete example of how to find the minimum of a quadratic using GAs, this section shows one way to find great fantasy-football lineups using data…… Continue reading Genetic Algorithms Part 3: FanDuel Lineup Example
Genetic Algorithms Part 2: Quadratic Example
Genetic Algorithms (GAs) can find the minimum of a quadratic equation given a range. While not the fastest or most precise method, this is a great way to become familiar with how to set up GAs and how they work. Continuing the discussion from Part 1, which details what GAs are and when they are helpful,…… Continue reading Genetic Algorithms Part 2: Quadratic Example
Genetic Algorithms
Genetic Algorithms are a great way to reduce a search-space into a solution space, and an efficient way to find a near-optimal solution, quickly. Genetic Algorithms are cool! I feel no one talks about them even though their applications are wide and their effectiveness extremely powerful. It’s a way to help optimize a search space and…… Continue reading Genetic Algorithms
Stumbling to Package a Django App
Django applications can be packaged individually for reuse. Documentation on how to do so from start to finish seemed either old, sparse, or incomplete. This was my adventure and solution. I’ve used Django to develop a few applications. For one project, I wanted to see how many active users there were interacting with the site.…… Continue reading Stumbling to Package a Django App
The Builder Pattern
Builders make large data objects simpler to create, read, and maintain, and they are a great way to maintain immutable data objects and give default values. This is probably the most-important pattern in Java I’ve used in my career. It would have saved me tens of hours while doing homework back in university, and it’s…… Continue reading The Builder Pattern
Python Properties for Django Templates
Python Properties can make method calls visible to Django templates! I have been developing a website for my wife as she catalogs every brewery, cidery, distillery, meadery, and winery in Colorado. Using Django has been a dream – easy interactions with the database, and templates make rendering data to HTML simple. I wanted to give users…… Continue reading Python Properties for Django Templates
Method Generics in Java
Method Generics are great for making Utility and Factory classes simpler to read and easier to use. Generics are fun in Java; at least some people find them fascinating. Others try to avoid them at all costs from their evil and sadistic nature – there doesn’t seem to be any middle ground. Generics don’t bother me, as…… Continue reading Method Generics in Java