Skip to content

Getting into coding with the help of Advent of Code

License

Notifications You must be signed in to change notification settings

krohnta/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

I have no idea what I’m doing, but thanks to @scy, I just stumbled upon Advent of Code.

It looks quite scary, and I’m not sure whether I can motivate myself enough to get through, however, I cannot say I never tried :)

Progress Tracking

Solution written in:

  • Java: ★

  • Python: ☆

year

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

2015

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

2016

★★

★★

★★

★★

★★

★★

2017

2018

2019

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

☆☆

Mood and Motivation Tracking

2019-11-24

To anyone more experienced than I am, my code must look like a complete mess, however, I found examples where people copied their input directly into the code instead of reading it via file. It seems I’m not as bad as I had expected (though of course I needed to google how to read in a file in Python – at least, in the meantime, I don’t only read it but transform it directly into the wanted data structure with RegEx etc.).

My main issues are definitely in the 'how can I do such a thing in Python?' – well, not that I’d know how to do it in any programming language… – and less in the 'I don’t understand the problem' department. And there’s the issue that I’m familiar with big-O notation, so I know that my solutions are inefficient but do not have the ability to improve this. Yeah, well. Keep calm and carry on. And every now and then, stumble upon a shortcut handling stuff in a more elegant way (while not being the kind of elegant that I don’t understand).

2019-11-30

One week, and I’ve gotten 22 points so far for 2015. And now I’m really getting to the point where I don’t understand the problem (i.e. day 7 with logic gates and bitwise operations) or have an idea about a useful data structure but don’t understand how to handle that structure (i.e. day 16 with Aunt Sue where I’d like to use dictionaries - I understand the theory but I have serious issues in implementing even reading the input data).

I guess I’ll pause 2015 for now and wait for 2019 to begin tomorrow morning.

2019-12-07

Work takes its toll, and while I often got to read the puzzle in the morning, I did not have the time to think about it during the day. And in the evenings, there was other stuff to do or I was already too tired to think about anything anymore. However, today I wanted to get day 3, part 2 to work (after lots of trial and error during last week’s evenings), and it took me almost an hour of fiddling around with my code until I needed to google some Python functionality – and then notice that I have no internet access. Enjoy the little things :) And yes, that code is still far from enjoyable. I should probably do more list comprehension.

2019-12-19

Current challenge at work would be to get some basic knowledge in Java (well, wanted to learn object-oriented programming anyway, so there’s that), however, all those intcode puzzles were quite demotivating for me because of the abomination I used to solve the first intcode puzzle on day 2. Today, I was finally able to refactor day 2 to make it extendable to day 5, part 1, and even though I can see the room for improvement regarding my code, at least, I got another star. So currently, I have two things to decide between: basic Java during the next three weeks (so until my vacation ends) and more Python with AoC. I tend to focus a bit more on the Java stuff because this would force me to use object-oriented programming which might improve my Python later. And the current AoC puzzles are way over my abilities anyway (I do understand the problems but I have no clue how to implement any of the solutions).

2019-12-28

Due to a spontaneous case of overconfidence, I started AoC 2016 – in Java. Well, day 1 got me one star, and while it took me about one hour to get the correct solution, I’m not even sure if I should be proud that my main issues were algorithm-related (i.e. off-by-one errors, wrong directions due to wrong order of expressions). And of course, it is not very object-oriented (apart from what Java provides and enforces).

2020-01-05

Funny how much one can learn if one only begins :) I even introduced object-orientation into my Java solutions without any necessity but just for fun. I think I have reached a basic understanding of how all of this works. Next step would probably be to get my Python more object-oriented.

Several hours later: I have a running Intcode program for 2019, day 5, part 2. Yes, I’m a month late, but when I first read day 5, part 1, I already thought I’d never solve it. And after I had solved it and read part 2, I had exactly the same thought. I didn’t even understand all of it. Theoretical knowledge about Turing machines does not solve assembly-like puzzles, obviously. I have not yet taken a closer look at the next Intcode puzzle, but I’m afraid I’m going to think that I will not be able to solve it when I do…