All posts tagged #imadethis all posts RSS-feed

Prevent ID-mistakes using Rust types

Recently, I've been interested in designing software to make hard-to-find bugs reveal themselves at compile-time. An idea I've read about (I forgot where) that I found fascinating is the use of a special type for IDs in objects that represent database rows. Problem For example, there may be a User table and a Posts table in the database, with each post belonging to one user. Each of these would be mapped to a class/struct in the programming language. Perhaps each... full post»
by Mark,

Java primitives conversion & operations

First, booleans Booleans cannot be assigned to any other types, and you can't do any arithmetic on them. So true doesn't count as 1, nor does 1 count as true. No truthy and falsy in Java. Converting: a = b Some types can only be converted if you cast explicitly. These are usually the cases where a type with a wider or different range is converted to one with a narrower range. If you use explicit casting, you might be... full post»
by Mark,

Efficient overfitting of training data (Kaggle Bowl 2017)

During the Kaggle Data Science Bowl 2017, the leaderboard was based on only $198$ samples. The opportunity for overfitting was quickly understood, but initially only the naive option was mentioned, testing 1 submission per sample taking 66 days (still doable within the competition duration, but less than ideal). But then Oleg Trott got a perfect score in just 14 submissions! topic) I was really curious how he managed to do this. Together with Cas, I found out one way it... full post»
by Mark,

Linear model vs decision tree (in R)

Linear models vs decision trees I’ve used the R statistical language a bit, a long time ago. It was my first real encounter with data science, but future encounters used Matlab and Python. But lately I’ve been picking up R again, as it’s popular in the data science community. As practise / demo, I thought I’d do a simple exploration of the strengths and weaknesses of linear models versus decision trees. This was inspired by Claudia Perlich at kdnuggets. Let’s... full post»
by Mark,

The blag!

#imadethis, #coding, #tools, #bash, #python, #programming-languages, #django, #machine-learning, #chinese, #ubuntu, #music, #learning, #object-oriented-programming, #discussion, #java, #focus, #fortran, #backup, #bug-prevention, #type-systems, #design-patterns, #charity, #javascript, #cross-validation, #china, #what-I-use, #data-science, #data-analysis, #effecive-altruism, #book, #games, #travel, #rust, #order-of-magnitude, #R, #personal


  1. Rainbow colormap in javascript @Mark The post has been expanded to include non-rainbow colorm...
  2. "Invite" someone to ssh into your machine without port forwarding or firewall changes @Mark Added details about how to use the established tunnel in...
  3. Rainbow colormap in javascript @Mark Now finally with color-coded source!
  4. Bye Make, hello SCons (Fortran) @Mark For SCons' own comparison against alternatives, have a l...
  5. Ubuntu macros @Mark Macro locks have been made more reliable, to prevent any...
  6. Dory backup scripts @Mark I've added some functionality to remove old backups! htt...
  7. Ubuntu macros @Mark Updated after moving the files to
  8. Concentration noise @Mark Sorry if you're in China and can't access Youtube. If th...