akulumbeg / adventofcode

My takes on the annual https://adventofcode.com event, programmed in R (and soon also Python)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code

My take on Advent of Code, programmed mostly in R. Currently focusing on 2020, the other years (and languages) will slowly be added later, but it will take some time.

Philosophy and Rules

General

I do not participate in AoC to be the first or to come up with the best solutions. To me, AoC is about having fun and learning something new, while having a small goal every day. You have to enjoy the little things, after all!

My code chunks are simply representations of my programming thinking. They help me to make my programming ways more efficient by learning new ways of handling everyday code problems. And maybe they will help someone else too.

R

  • Only base R if possible
  • Avoid loops if possible
  • Code as short, efficient and non-verbose as possible
  • However, instead of one-liners, I sometimes try to break things down for clarity

R is my "native" language and the primary choice for the AoC. I am well aware that many of my solutions can be done much faster using e.g. tidyverse, but within AoC, my personal challenge to make code as efficient as possible using only "pure" R. Once I have more time, I might do alternative solutions that will focus on keeping the code to the absolute minimum, regardless of packages used.

Python

  • Shortest code possible

While I am somewhat familiar with Python itself, I want to learn about the environment and the packages. I will focus on the code efficiency, but I will allow myself to use any package and focus on making the code as short as possible, with one-liners.

C++

  • No rules
  • However, trying to be efficient

C++ is a language that I intend to learn without any prior knowledge, therefore, I will not be limiting myself in any way, in order to get familiar with the code. Any way of achieving the result is allowed, but I will try to write concise code.

Progress

2021

R      [==============           ] 14/25
Python [                         ] 0/25

2020

R      [======                   ] 6/25
Python [                         ] 0/25
C++    [                         ] 0/25

2019

R      [                         ] 0/25
Python [                         ] 0/25
C++    [                         ] 0/25

2018

R      [                         ] 0/25
Python [                         ] 0/25
C++    [                         ] 0/25

2017

R      [                         ] 0/25
Python [                         ] 0/25
C++    [                         ] 0/25

2016

R      [                         ] 0/25
Python [                         ] 0/25
C++    [                         ] 0/25

2015

R      [====                     ] 4/25
Python [====                     ] 4/25
C++    [                         ] 0/25

About

My takes on the annual https://adventofcode.com event, programmed in R (and soon also Python)


Languages

Language:R 78.5%Language:Python 21.5%