Stephan van Hulst

Bartender
+ Follow
since Sep 20, 2010
Merit badge: grant badges
Forum Moderator
For More
Cologne, Germany
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Stephan van Hulst

What I meant was: Tell us more about your application. What is the purpose of your application? What are you trying to achieve with your code? Why are you storing user credentials at all, instead of relying on established identity providers?
3 weeks ago
I don't think that link is very relevant.

Sure, the hashCode() method used in Java and SHA-256 are both hash functions, but they operate differently and serve wildly different purposes. Never confuse a hash function used to index a hash table with a cryptographic hash function.

While SHA-256 *could* be used in some way in the implementation of the hashCode() method, it's inconvenient and unnecessary. More importantly, the hashCode() method should NEVER be used in cryptographic operations.
3 weeks ago
Welcome to CodeRanch!

Client IDs and client secrets have nothing to do with users. They belong to client applications. So no, you shouldn't combine them with user credentials.

Maybe you can give us more details on what you're trying to achieve.
1 month ago

Junilu Lacar wrote:I was never big on matrix operations even back when I was in school a few decades ago.


Linear algebra was one of the few subjects in uni where I managed to get a perfect score on an exam. It's a bit of a pity that it's found almost no application in my professional career, and I've gotten quite rusty at it, but I still enjoy it when vector spaces and matrices pop up in programming puzzles.

Bhaskar Bantupalli wrote:Did you check whether the solution yoh found us satisfying the original equation, otherwise you need to fiddle with zero renainders and modulus


In my case, I plan on reusing a Fraction class that I've written in a previous year. I will perform all matrix operations using fractional numbers, and only at the very end determine if the solutions to the linear equations are natural numbers.
Due to (not entirely unforeseen) circumstances, my AoC run this year is mostly over. I might attempt a puzzle or two in the coming weeks, but I doubt I'll be back in the top 3.

It's good to see we have such a strong new contender. It's nice to have you join us, Bhaskar Bantupalli.
I recognized quite early that this puzzle involved solving a system of linear equations. I will admit that it's been a while since I did it, but thankfully I still had my textbook from Uni lying around, and I still had a Matrix class from previous years that I could use to solve this problem.

Due to some unrelated circumstances, I haven't gotten round to finetuning my application for part 2, but it really shouldn't be a big issue. I just need to find the time.
Same situation here. My workday has begun though, so I'll see if I can crack it this evening.
The interesting thing about day 10 was that in my first attempt to solve part 1, I got a wrong number, and that wrong number turned out to be the correct answer for part 2.
The interfaces that I've written for AoC work almost exclusively with BigInteger.
2 months ago
So far so good. The last few days were fairly straightforward. I could lean on some utility classes that I had already built in the previous years, so generating a permutation, for example, didn't take a long time.

I see Junilu is really giving everyone a run this year. I'm still banking on the December rat race catching up with him (although I'm hoping he keeps it up).
2 months ago
Here's the core class that I ended up with after part 2. I will wait for more puzzles to be published before I decide whether to refactor it:
2 months ago

Tim Cooke wrote:Daughters trump AoC, I suppose 😁, congrats Stephan that's wonderful news.


Thanks Tim!

Junilu Lacar wrote:Congratulations! Is she an Aries or a fellow Taurus?


An Aries, just like me. We're only two weeks apart.

Sleep is overrated, especially when you have time to watch your daughter sleep and wonder at the miracle ;)


Trust me, I try to get every possible wink of sleep in. When Emilia sleeps, that's when I sleep. But yeah, she's an absolute joy, and I didn't expect to have so much fun being a parent. Still, on some days it's harder than anticipated. Having kids really isn't for the faint of heart!

So far, she has aided me in the advent though: She wakes up just before the next puzzle is published, and falls asleep not long after, meaning I'm up and about just in time. I expect things to change as the puzzles take longer than an hour or two to solve, because when she wakes up "for real", I won't have much time on my hand.

Tim Cooke wrote:Looks like Sree is back in the game this year so it'll be a battle for second for the rest of us. Historically she will be hard, near impossible, to beat.


Every year I have the idle hope of beating her, but not only is she quicker, she's much more persistent as well. I'm happy she's joined us again this year.

Liutauras Vilda wrote:for most of us excuses kick in sometime sooner


My excuses have already kicked in!
2 months ago
You declared two Alien classes. You should instead declare two differently named classes and have one extend the other.
2 months ago
I don't think that's valid syntax. Object properties must have names.

Regardless, there is something to say for wrapping a list into an object. The object is your "Response" type, with the list just being one of the possible properties. If you ever want to add additional properties to the response, you can. If your return type is just a homogenous list, you don't have the luxury of adding additional properties to the response later.
2 months ago
I had resolved to take the month December off from work, specifically in order to give this year's advent my full attention.

In April however, my daughter was born. She takes up most of my free time, so i suspect that my participation will be lower than in previous years. I will still make an attempt though.
2 months ago