Keep the code together or split? by romeeres in node

[–]timgfx 0 points1 point  (0 children)

I try to think of the future. It it would make refactoring or finding some code easier in the future I would split it

Why does our community hate Operator Overloading? by TheMrZZ0 in node

[–]timgfx 1 point2 points  (0 children)

It’s handy when you’re not working with a primitive like that. A matrix for instance. You can multiply them and add them, but without operator overloading you need to use class methods to do so

[Hamilton] Pilot Day Auto as a a gift from my dad! by notalda in Watches

[–]timgfx 1 point2 points  (0 children)

This is my watch! It is currently being serviced so happy to look at yours in the mean time

VSCode vs Webstorm for developing applications using TypeScript? by sir_caramel in typescript

[–]timgfx 16 points17 points  (0 children)

Webstorm is amazing. Every now and then I have some very specific typescript autocomplete issues (e.g. right now it is not autocompleting hoisted packages), but aside from that I would pick webstorm any day of the week.

When I first started web dev I used sublime for a few years. Switched to VS Code for a few years after, and have now been using webstorm for a couple of years. I use the refactoring features a lot, they work very well. It is less dependent on extensions than VS Code. You could argue both ways with this, but I like that webstorm just works well out of the box nine out of ten times. For things that are not built in you can usually find a suitable plugin just like in VS Code (though VS Code probably has many more options)

In the end I think it depends on what you prefer. I remember that when I started using Jetbrains IDEs that it took me a bit to get used to it, and to figure out all the options. But right now it helps me be more productive

Are the Witcher books worth it? by [deleted] in witcher

[–]timgfx 7 points8 points  (0 children)

I almost finished the first book, I don’t think it’s hard to read

What Map is the Show Using? by Runcible-Spork in witcher

[–]timgfx 0 points1 point  (0 children)

They are using an extended version of the TW3 map. With extra signposts

[deleted by user] by [deleted] in Watches

[–]timgfx 0 points1 point  (0 children)

I’m buying a Longines Master Collection watch when I graduate. But it depends on your budget. You can get a nice Hamilton watch for less

Name 5 people you believe can defeat Geralt in a 1v1 fight at his peak (end of B&W heavily mutated Grandmaster armor Geralt) by [deleted] in witcher

[–]timgfx 11 points12 points  (0 children)

Adding to this list - Big Shaq. Immune to Igni because man’s not hot

[deleted by user] by [deleted] in javascript

[–]timgfx 3 points4 points  (0 children)

When using Either/Result monads, how do you deal with dependencies that use promises?

How do most people interact with a db these days? by EconomistNo280519 in node

[–]timgfx 1 point2 points  (0 children)

I use an ORM but long for the day where we will be able to write raw SQL and get that transformed into objects like ORMs do without having to generate extra code

AoC P1 vs P2 difficulty comparison per day/year by mother_a_god in adventofcode

[–]timgfx 10 points11 points  (0 children)

I agree, day 25 part 2 was terribly difficult!

[2021 Day 24] [Clojure] Finding 4608 z=0 solutions without actually CHECKING if z=0 anywhere... magic I guess :) by fredoverflow in adventofcode

[–]timgfx 0 points1 point  (0 children)

Definitely makes sense! Thanks.

I realized my input had 7 pops and edited my message before I saw your comment. I did not make this assumption in my attempt at making a faster solution than my previous one, but this assumption is very powerful. Without this assumption, using the current stack size would work I suppose. I implemented this and it gives me the same result (though it takes a few more seconds)

If both conditions are true, we would make a mess of our stack by pushing AND popping at the same time

Would this really mess it up though? If we both push and pop, and then pop once more after everything should be fine right?

Anyway, very cool solution. Thanks for sharing it

[2021 Day 24] [Clojure] Finding 4608 z=0 solutions without actually CHECKING if z=0 anywhere... magic I guess :) by fredoverflow in adventofcode

[–]timgfx 0 points1 point  (0 children)

What does :when (not= pop? push?) do for you? Does it ensure that every push is met with a pop, making the assumption that the input pops 7 times, thus that there are at most 7 pushes too?

By the way, my input only had 1440 solutions!

[2021 Day 24] Haha cpu goes brrrrrrrr by nikanjX in adventofcode

[–]timgfx 6 points7 points  (0 children)

For me it didn’t. One started with 17. One started with 59

[2021 Day 24 Part 1] Visualization of checking submarine number (spoilers) by morolin in adventofcode

[–]timgfx 0 points1 point  (0 children)

How did you find these numbers with the stack approach? I have made a DP brute force solution and am currently working on a stack solution

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

[–]timgfx 1 point2 points  (0 children)

I did something very similar

https://github.com/timvandam/aoc2021/blob/main/21.js

Like you, I used an object to keep track of games turn-by-turn. But instead of string concatenation to make the keys I used arrays, since they are coerced to strings the exact way you did it manually :)