Win a copy of Spring in Action (5th edition) this week in the Spring forum!

Tim Cooke

Sheriff
+ Follow
since Mar 28, 2008
Tim likes ...
Clojure IntelliJ IDE Java
Standard Nerd
Belfast
Cows and Likes
Cows
Total received
286
In last 30 days
2
Total given
654
Likes
Total received
1287
Received in last 30 days
22
Total given
422
Given in last 30 days
11
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt Green check
expand Greenhorn Scavenger Hunt Green check

Recent posts by Tim Cooke

How did you find the tests? The theory was total nonsense IMO, the manoeuvres test was the toughest I'd say, and the on road test was just a nice waft around town for 40 minutes. I had never ridden a bike of any sort before starting out on lessons so was all very new and unusual but now feels great.

Do you have a bike in mind? I have a 15 mile journey to work on a dual carriageway so a Vespa wouldn't really be ideal for that, so I'm looking for something comfortable and nimble that won't try and kill me. Just need to hit some bike shops and see what they've got that I like.
11 hours ago
Hey congrats!

What licence did you have before? A1 or A2? I had nothing but the AM (Moped) that I got by default when I passed my car test back in the mid 90s. Really looking forward to getting a bike now and going out by myself instead of having an instructor in tow all the time.
12 hours ago
It's time to revisit this old discussion because yesterday I gained my full motorcycle licence I'm super chuffed!

In practice I think my motorcycle choice will come down to price, availability in my area, and whatever feels nice enough to ride.
12 hours ago
I've dropped a day behind so today I have 4 outstanding puzzles, this is it, the beginning of my inevitable AoC demise.
12 hours ago
Yes, done. My hunch was right but not exactly as I first imagined it.
My hunch was that the plant state would repeat so didn't need to compute all the generations, but no
Day 12 Part 1, yup no problem. Part 2, dang I got nothing that doesn't take a bunch of time to run. I do have a hunch though, so I'll be back
Part 2 was a bit of an odd one. I still could not get my program to finish in any reasonable time but I got lucky. I had it print out any new highest power level as it found them and after about 5 seconds the output dried up but the program kept running. As it turned out the most recent output was the puzzle solution. I totally got lucky.
This week, we're delighted to have Craig Walls helping to answer questions about the new book Spring in Action (5th edition).


The promotion starts Tuesday, December 11th, 2018 and will end on Friday, December 14th, 2018

We'll be selecting four random posters in this forum to win a free copy of the book provided by the publisher, Manning.


Image from https://images-na.ssl-images-amazon.com

Please see the Book Promotion page to ensure your best chances at winning!

Posts in this welcome thread are not eligible for the drawing, and should be reserved for welcoming the author. Questions posted in this topic are subject to removal.
3 days ago
I think my Day 11 Part 2 needs some revision as it's been running for quite some time now.....
Oh man that's really frustrating Stephan. I liked yesterday's puzzle too as a demonstration that your choice of data structure can really really really make a difference to your application performance. I couldn't find a linked list in Python so ended up with a little hack using a queue that had very fast head insertion and deletion operations.

For today's puzzle I wrote a function that would generate and print the grid of dots and hashes but I made the mistake of having it print out every single iteration and it took so long generating the first grid (approx 100000 by 100000 item grid) that I quickly abandoned that before any output was generated at all. I took a similar approach to you and only printed anything out when the difference in y values was 10 or less. A guess that turned out to be spot on as it only printed one image and was the one I wanted.
Tee hee Bear successfully poked.

I can say nothing, some of my code is truly a crime against the profession.
Recursion and using variables declared outside of the recursive method Liutauras?

I managed to get part 1 done by simply processing the input sequence from left to right also using recursion to collect all the meta values. It was quite tidy even. But then along came part 2 and blew my design out the water and I had to start again
Day 10 was a fun one. It's a pleasant change of tact when you have to use your eyes to solve it rather than getting the computer to do it. The trick was having the computer present you visibly decipherable information but not too much or too little of it. Part 2 was a doddle.