From 4fe83183e197458dcc45ab69a5834a949689e8ac Mon Sep 17 00:00:00 2001 From: red Date: Wed, 21 Feb 2024 10:29:21 +0100 Subject: [PATCH] Chore: Fix documentation --- README.md | 4 +++- year_2015.md | 4 ++-- year_2016.md | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fcbf0d1..2229392 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ Notes for solving: Install dependencies with `bundle install`. If you are in a hurry, just install [RSpec](https://github.com/rspec/rspec-metagem) with `gem install rspec` and run `rspec` in the root directory. # Regarding RuboCop rules -I use my [own set of rules](.rubocop.yml), which I try to be as close as possible to the official style, but [some rules just don't make sense to me](https://github.com/rubocop/ruby-style-guide/pull/176), and RuboCop's default rules are here to [enforce a single style](https://github.com/rubocop/ruby-style-guide/pull/176#issuecomment-18670208). However, [consistency for the sake of consistency is widely agreed to be plain dumb](https://github.com/rubocop/ruby-style-guide?tab=readme-ov-file#a-note-about-consistency), so I reserve myself the right to disable rules when required. +I use my [own set of rules](.rubocop.yml), which I try to keep as close as possible to the official style, but [some style rules just don't make sense to me](https://rubystyle.guide/#leading-dot-in-multi-line-chains), and RuboCop's default rules are here to [enforce a single style](https://github.com/rubocop/ruby-style-guide/pull/176#issuecomment-18670208). + +However, [consistency for the sake of consistency is widely agreed to be plain dumb](https://github.com/rubocop/ruby-style-guide?tab=readme-ov-file#a-note-about-consistency), so I reserve myself the right to disable rules as I require, for the sake of easier code reading. # Testing guidelines The tests are written with [Test-driven Development](https://en.wikipedia.org/wiki/Test-driven_development) principles by using the input and results provided by each exercise's samples. The full input is then used in the tests, and the expected results are validated on the website. diff --git a/year_2015.md b/year_2015.md index df73a25..1512b21 100644 --- a/year_2015.md +++ b/year_2015.md @@ -227,7 +227,7 @@ Year2015::Day13 correctly answers part 2 ``` -Again, refer to [Day 09][##day-09] because we are in a similar configuration, with the exception that we must rejoin our starting point at the end. Nothing too complicated. +Again, refer to [Day 09](##day-09) because we are in a similar configuration, with the exception that we must rejoin our starting point at the end. Nothing too complicated. Second part is just adding another node with a 0 relationship to all nodes. Surprisingly, it seems our presence lowered the general happiness... @@ -366,7 +366,7 @@ Year2015::Day22 ["Any sufficiently advanced bruteforce is indistinguishable from Dijkstra's algorithm"](https://en.wikipedia.org/wiki/Clarke%27s_three_laws) -As for this exercise, a key lesson is: make commits BEFORE you rewrite your code. In that occasion, rewriting my code made it unworkable, no matter how many times I tried, and I must have made the same input mistake many times because my second day results is always off by twenty, even when [carefully copying an algorithm that works](https://github.com/rHermes/adventofcode/blob/master/2015/22/y2015_d22_p02.py). I will leave it like that for now. +As for this exercise, a key lesson is: make commits BEFORE you rewrite your code. In that occasion, rewriting my code made it unworkable, no matter how many times I tried, and I must have made the same input mistake many times because my second day results were always off by twenty, even when [carefully copying an algorithm that works](https://github.com/rHermes/adventofcode/blob/master/2015/22/y2015_d22_p02.py). In the end, it all boiled down to an off-by-one error. ## Day 23: Opening the Turing Lock diff --git a/year_2016.md b/year_2016.md index 9f6bcd0..d328ad8 100644 --- a/year_2016.md +++ b/year_2016.md @@ -1,4 +1,4 @@ -# Notes for solving 2015 +# Notes for solving 2016 ## Day 01: No Time for a Taxicab ```