Forum menu
I'm sure there's a thread about work ethic and not being distracted by quizzes. I could waste a lot of time with these
Thanks. The fact it works for D1P2 suggests there’s some data nuance I’ve missed.
Probably miscounting at the start/end, and works for p2 because comparing n-1/n+1 happens to give you the right answer despite that.
Out of interest, how long are these taking people?
I can code stuff semi-competently in Matlab but as stated I'm trying it in R. I can think up a possible solution within seconds, but getting it into a script takes time, and there's always some error / troubleshooting to be done (converting numbers to strings is a PITA, and I don't quite 'get' data structures and indexing in R very fluidly). As a result, I reckon each day's challenge probably takes at least an hour.
Out of interest, how long are these taking people?
I think they've all been under 10 minutes so far. Before I've gotten to the bottom of the first cup of coffee, anyway.
The leaderboard times are pretty impressive - 1:32 for the fastest to get to both stars today.
https://adventofcode.com/2021/leaderboard/day/7
It varies for me depending on the nature of the problem. Saturday probably took me an hour for both parts, Sunday only 10 minutes. I'd nearly always be able to do them more quickly in python, but the challenge I've set myself is to do them in FME.
Also, if you've done previous contests, you get to know the style of problems they set so that makes things easier.
Nine times out of ten, if you can brute force a solution for part 1, you'll find part 2 needs a rewrite so you know to start looking for patterns or alternative ways of getting the answer. Today's was unusual in that you could complete part 2 even with a naive solution for part 1
Hmm, that's not making me feel better 😀 Are you guys professionals?
I can code stuff semi-competently in Matlab but as stated I’m trying it in R. I can think up a possible solution within seconds, but getting it into a script takes time, and there’s always some error / troubleshooting to be done (converting numbers to strings is a PITA, and I don’t quite ‘get’ data structures and indexing in R very fluidly). As a result, I reckon each day’s challenge probably takes at least an hour.
The trouble you have there IMO is that you're not "doing advent of code", you're doing advent of code as a part of the process of learning R.
If you had the language details at your fingertips you'd be able to concentrate on the problems and solutions rather than looking up language details.
Are you guys professionals?
Yes.
But yeah, you're learning a new language - trying at all is winning.
Are you guys professionals?
I'm not a programmer/developer but I'm solving them with FME which is pretty much my day job. Although the data wrangling I do day to day is quite far removed from Advent of Code type puzzles.
Yeah you're right. I just did both parts of day 7 in my favoured Matlab code and got it done in about 15 mins. Not lightning quick but waaay quicker.
R is kind of similar to Matlab* but sufficiently enough that I have to look up nearly everything!
* Python is also similar
Just doing the Lanternfish exponential growth one and it's broken my computer! I guess my code was pretty inefficient. 80 iterations ran quickly, and I thought that my code allowed me to simply swap number_iterations=80 for 256 and press run. But instead, I've run out of RAM 😀
But instead, I’ve run out of RAM
640K is all you really need.
I had to do a complete rewrite for part 2 of lanternfish too 🙂
For me so far d4 took the longest, d5-7 not very long, I had to redo the fish one too
They are all in a similar style but how people get sub 2 mins I have no idea
They are all in a similar style but how people get sub 2 mins I have no idea
A lot of it is just having done enough of them, and built up enough of a toolkit to refer to.
I've been doing them pretty leisurely in the morning whilst I'm still waking up, and flipping languages for fun, but if I was taking it seriously, I'd probably be looking at 3-4 minutes for most of them so far.
640K is all you really need.
Can't work out if that's just a computer joke, or whether it's a serious attack on my code optimisation 😀
Oooooohh. Yeah. 😀
(I just worked out how to do the Laternfish one in less than a second of computing time and definitely less than 8Gb RAM)
I made the mistake of trying to read today's puzzle before coffee, took me 5 minutes to work out what they were asking for nevermind solving it!
Stalled on D3 last night. I have a theory but it's testing my PS knowledge. As usual, I'm sure there are inbuilt clever ways to do it but I'm too old skool clunky.
Today's took quite a bit of effort. Hared off down the wrong path trying to be too clever to start with.
My solution today feels clunky but not sure I can make it any more elegant in FME
I think I’ve given up at day 4 having spent the best part of an hour today writing the world biggest nested for loop to get halfway to the answer and then being stumped on where to go next. Maybe next year I’ll have more python skills.
You don't need to complete a day to go on to the next so you can always dip in and out.
Yes didn't get today's figured out before I had to start doing paid work, it's tricky
I too niaively thought I'd just up the iterations for the lanternfish 😁
Loved today's puzzle, right up my street.
yes it was a good one
I'll go back to yesterday's later, I think I need to read it again because I'm not seeing it
Got yesterday's. The way I read it made me think that some clever trick was necessary. In the end I did a big search.
I enjoyed todays; took me back to my youth creating programs to draw graphics in 8-bit micros 😀
Just finished Day3Pt1. I had the logic early on, just getting the code to work for me took way too long.
This is fun / addictve but I don't really have the time!
CBA this year. I've started it the past couple of years, but after about 2 weeks in it tends to require about an hour every day, and the mental energy, neither of which I have.
It is a fun wee puzzle after breakfast - thanks for posting OP. I'm lazy so cheating and just doing it in Java.
I thought today's was quite a bit easier than yesterdays - once I realised my answers were bigger than 2^32 and my scores going negative. Doh..
Nice quick one today
I've got all the stars for days 1 through 10 in FME which is an improvement on last year. I had to resort to a pythoncaller within FME for part 2 of one of the puzzles by this stage last year.
Pleasantly surprised that my part 1 solution today led nicely into part 2
Took longer than d9, but I switched to a style/lang I am less familiar with (excuses, excuses). Got a tidy solution though. I suspected what part 2 would be, so getting the point was easier than figuring the convoluted score!
Doing this kind of thing in what I imagine FME to be sounds horrible
Doing this kind of thing in what I imagine FME to be sounds horrible
Yesterday's was really straightforward in FME as it was essentially a spatial problem and FME was initially developed as a tool for spatial data.
E.g. part two I just had to create a grid, discard the squares with 9 and dissolve the remaining squares together. The dissolve transformer helpfully keeps a count of all dissolved polygons, so then just keep the largest 3

Coming to this a bit late but just written my first ever Python program for the day 1 challenge and I'm impressed with PyCharm IDE. My very first program was written in Basic under the George 3 operating system on a remote teletype with the program stored on punch paper tape. Those were the days!
I prefer spyder. And more recently VS code
Hoping to have some time this weekend to catch up, have chosen to try VS Code (vim for the win normally).
Finding a new editor heavier going than I would hope, am I so slow with it, and I haven't got the perl debugger working either, so there is no advantage !.
Looks like VS code runs on Mac so will take a look.
Spyder is great for datasciencey type stuff. I tend to use it when I’m developing an algorithm or similar as it’s real easy to step in and out, explore variables/arrays etc and graph as you go.
Not managed the last two days in vanilla FME thus far, have had to resort to using PythonCallers. Day 11 I'm pretty sure is possible, not sure about Day 12.
Glad to have something a bit easier in FME for Day 13.
I found 13 quite satisfying and enjoyable, though it didn't require too much thought (probably for the best in my case!).
It was quite satisfying to see intelligible letters appearing at the end :).
Especially after I misread the first part - well ignored the bit in bold - and was running to completion and not just the first step. Confused me as I was sure my code _should_ have been doing the right thing.
Spent all day talking about log4j for some reason
I did d13 - yes a good ending to that one - not sure I'll get time to go back to 11 and 12 as it's going to be busy this week