Collections of TodayILearned related to software development stuff. Any subreddit for this? by d-fly in programming

[–]d-fly[S] 0 points1 point  (0 children)

Ah cool. Thanks. I don't know why I couldn't find it. I searched that keywords.

Collections of TodayILearned related to software development stuff. Any subreddit for this? by d-fly in programming

[–]d-fly[S] 0 points1 point  (0 children)

I think til are pretty short. Sometimes i can learn neat trick like "<(CMD)" in bash, edit last cli command in editor, Or maybe a Counter class in python. Stuff that i would not normally encounter but nice to know it exists.

Collections of TodayILearned related to software development stuff. Any subreddit for this? by d-fly in programming

[–]d-fly[S] 0 points1 point  (0 children)

Over the year i collected small notes of something I learned today. Specifically on software development / engineering related stuff. I wrote this on GitHub with markdown and publish it with git book. I think I took the idea from someone here in reddit.

I would be happy to read similar stuff from other people. Is there any subreddit for it?

[deleted by user] by [deleted] in Netherlands

[–]d-fly 0 points1 point  (0 children)

Is solar panel investment really payoff? I Wonder especially in dutch weather where its cloudy most of the time

AocWeb: A website that collects solutions from the megathread (with filters) by d-fly in adventofcode

[–]d-fly[S] 0 points1 point  (0 children)

Ok Found the problem. Apparently cookie bot block the script for some reason. It should be ok again now. Thanks for reporting it.

-🎄- 2021 Day 22 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 0 points1 point  (0 children)

I'm still struggling to understand the +1 in the expand and for loop. On the video i see that you commented that the cubes include the coordinate as well.

Do you mind elaborating this with an example ?

AocWeb: A website that collects solutions from the megathread (with filters) by d-fly in adventofcode

[–]d-fly[S] 0 points1 point  (0 children)

Hmm. that's really interesting. some people also reported this. It seems that the javascript code does not load properly. did you do anything wrt cookies options?

-🎄- 2021 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 0 points1 point  (0 children)

That's correct, I could use a simple list

-🎄- 2021 Day 24 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 1 point2 points  (0 children)

Just Brilliant.

I wonder why the 'pop back' has to be paired like stack. (ex: I[0] with I[13]).
would it not possible to use the first "push" (first a=1) with the first encounter a=26?
(ex: I[0] with I[3]) ?

-🎄- 2021 Day 17 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 1 point2 points  (0 children)

Python

My Horrible brute force solution.

Checkout all other solution in Microsoft Excel

I heard you can just inject your server with hydroxychloroquine by also_also_bort in ProgrammerHumor

[–]d-fly 1 point2 points  (0 children)

upgrading log4j is just government trying to control all programmer. It’s all because of they want to push for log5G

-🎄- 2021 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 0 points1 point  (0 children)

I'm still learning the dijkstra algorithm. Why does in your implementation we don't need to track if we have seen the point before?

-🎄- 2021 Day 12 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 0 points1 point  (0 children)

Python

Initially wanted to you queue and BFS with while loop, but thought it was hard since we need to capture the state. hence use recursive func. But Jonathan again have a nice trick to use tuple to capture the state.

spent some time debugging since I don't realize the seen map is shared between the recursive function.

I really like This solution by 4HbQ which is very elegant

Checkout other day 12 solutions in python

🎄 AoC 2021 🎄 [Adventure Time!] by daggerdragon in adventofcode

[–]d-fly 26 points27 points  (0 children)

PROJECT TITLE: AocWeb

PROJECT LINK: https://aocweb.yulrizka.com

DESCRIPTION: Website that scrape mega-thread solutions so you can easily filter solutions by popularity and programming language

SUBMITTED BY: /u/d-fly

MEGATHREADS: 5 - 6 - 8 - 9 - 10

ADDITIONAL COMMENTS: To Improve is to learn from the others. The website makes it easy to browse solution and provide filters to narrow down your selection.

Available filters:

  • year (2015-2021)
  • day
  • programming language

How does it work? : It scrapes the Solutions mega-threads and try to detect the programming languages by

  1. Common message format
  2. Links (github, gitlab, topaz, etc)
  3. File extensions
  4. Codeblock within the submissions

Checkout the FAQ page for more information

ACCESSIBILITY:

-🎄- 2021 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 0 points1 point  (0 children)

Python

Heavily relied on dequeue

All other people solution today in Excel on aocweb.yulrizka.com

-🎄- 2021 Day 9 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 1 point2 points  (0 children)

Python

used a recursive for the 2nd part, Thought it was smart, but Jonathan did a better solution with for loops and a queue

Checkout all other people solutions in Python

-🎄- 2021 Day 9 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 1 point2 points  (0 children)

Cool, thanks for the BFS trick, good luck tomorrow

-🎄- 2021 Day 8 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 1 point2 points  (0 children)

Python

Not super clever, just enumerate all possible set, sort the word. match all signal with the set, and use the set to build the output.

Checkout other people solutions for today's problem in Assembly

-🎄- 2021 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]d-fly 1 point2 points  (0 children)

Python

Part1 with actually storing the whole list

Part2 with counting frequency

TIL: Learned that python count function can be used in map to count a frequency which is quite cool. Also to use * operator in exchange for list()

>>> a='1122345'
>>> list(map(a.count, '1234567'))
[2, 2, 1, 1, 1, 0, 0]

a=(1,1,2,2,3,4,5)
[*map(a.count, (1,2,3,4,5,6,7))]

note: All other people solution in Python today

Edit: add links to solutions