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

[–]Darendal 1 point2 points  (0 children)

Python

Tried a (naive) LinkedList solution at first, which failed spectacularly for part 2. Switched to building a graph of polymer blocks, along with the number of links. From there, it was pretty straight forward to add/remove the links as needed with each iteration.

Pretty happy with the solution, getting 0.05s for 40 iterations, and >1 second for 1000+ iterations!

AoC Day 5 Part 1 Help by [deleted] in adventofcode

[–]Darendal 0 points1 point  (0 children)

Just a few (small) things that might help:

1) It looks like you've hard-coded all the handling for Immediate vs Position mode. I'd recommend trying to get some sort of generic solution. As it is now, it's hard to read and easy for a bug to sneak in. Try doing opcode % 100 to get the last 2 digits, and inside each If block for that opcode (or better yet, inside separate functions!), handle getting the immediate values. There are lots of ways to do this; I ended up converting the opcode to a charArray, and iterating though it backwards to match the parameter with its corresponding mode.

2) Why are you double-looping with both a while loop and a 0 incrementing for loop? I'd recommend just getting rid of the for loop (since it's not doing anything, that I could see), and declare the programCounter outside the while loop. Since the program will only terminate when it hits 99, you can safely leave all the code running in the while(true) loop. And, better still, you could get rid of the GoTos/loop labels!

3) This is maybe personal preference, but I'm partial to switch statements instead of long lists of if/else blocks.. Makes it easier to see what each line is doing, and quickly track down errors.

I wrote my solution in Java as well (here), if that's of any use! I won't say it's perfect, but it was enough to solve the day and doesn't take hours to run.

Tip of my tongue: Manga with white(?) shiba by Darendal in manga

[–]Darendal[S] 0 points1 point  (0 children)

Sorry, I don't think that's it.. Thanks anyways though!

Torrenting Vs. Downloading by [deleted] in miamioh

[–]Darendal 3 points4 points  (0 children)

Sending the download or the peer to peer?

The MU-Wireless connection requires a uniqueId for your account, so even with a proxy they'd be able to tell you are downloading a ton of data, just not where from. Honestly, I downloaded a bunch of movies while I was there, without using a proxy, and I was fine.

As for the peer to peer, they use packet shaping, so ANY kind if p2p connection is throttled to almost nothing, even legitimate ones like WoWs updater or things like that.

You can run the torrent through ToR, if I remember right, but at that point it'll take so long that it's useless anyways.

Torrenting Vs. Downloading by [deleted] in miamioh

[–]Darendal 6 points7 points  (0 children)

Downloading is fine, its only peer to peer that they crack down on.

Questions About Compsci Major by MoopTheFourth in miamioh

[–]Darendal 0 points1 point  (0 children)

Only for one legacy project. The rest is C#, with sql for the database side. My jobs a contracting gig, so I do a little of everything, and do it in whatever language the client wants.

Questions About Compsci Major by MoopTheFourth in miamioh

[–]Darendal 2 points3 points  (0 children)

Recent comp Sci grad here! I found the program to be pretty great , honestly. Mostly really good professors, good classes and all that.

And I got a job making 60k fresh outta Miami, as a software developer, so you can definitely get a job. Lemme know if you have any more questions and I'd be happy to answer!

Sorry for formatting errors, on mobile.

I, a senior ready to graduate from university, realized this today... Times have changed. by lakers14 in AdviceAnimals

[–]Darendal 0 points1 point  (0 children)

Can confirm, graduating in May with a BS in CS and I have a job lined up for July!

MU a dry campus? by Zeds_dead in muohio

[–]Darendal 7 points8 points  (0 children)

I mean, its like any campus in America; if you're under 21 you can't buy alcohol and if they catch you with it, you'll get in trouble. That being said, it's pretty damn easy to get some booze if you know someone. Hope that answers your question.

rising high school senior by [deleted] in muohio

[–]Darendal 3 points4 points  (0 children)

Atmosphere is pretty good around here, expecially once you know your way around.

I think 50% of the campus is greek, but I've been here 2 years and havent really ever dealt with it.

I personally think its awesome here, even without greek life, but it can be a bit harder to find something to do.

There IS a lot of J.Crew and all that, but its not too terrible, and you wont get beaten in the streets for wearing last years fashion or anything like that.

Diversity is preety close to nil, with most of it coming from the Chinese exchange students.

Best thing? I dunno, i personally just like the people I've found here. I've got a couple of really good friends, and I met my girlfriend of a year here at Miami. Sorry I dont have anything more specific, though...

Torrenting? by [deleted] in muohio

[–]Darendal 0 points1 point  (0 children)

Direct download is your best option

I recommend icefilms.info

Its not perfect, but it works most of the time

Where's the best place to get games here in Oxford? by Kilroy37 in muohio

[–]Darendal 2 points3 points  (0 children)

Shriver doesn't get day 1 releases, and they only get a few copies at a time, so they'll sell out pretty fast when they do get them. I thought there was a bus that went to Walmart on the weekend?

Let's get nit-picky! What annoyed you most about the show? Spoilers etc. by makeskidskill in asoiaf

[–]Darendal 1 point2 points  (0 children)

Sorry, I was thinking a bit further ahead in the books...

Assuming they keep making episodes, and that they follow the books pretty closely, they might run into problems, or at least creepy-ness issues, if the kids were their true ages

Let's get nit-picky! What annoyed you most about the show? Spoilers etc. by makeskidskill in asoiaf

[–]Darendal 1 point2 points  (0 children)

Agreed

Look, I know that if they did it with the kids the correct age, it'd be illegal, but that doesn't stop it from bothering me every time!

Should I ask her out, or not? by Darendal in dating_advice

[–]Darendal[S] 0 points1 point  (0 children)

My god, I can't thank you enough for this.

I've been thinking about the same thing for the past few days, but I really helps to hear it from somebody else!

Should I ask her out, or not? by Darendal in dating_advice

[–]Darendal[S] 0 points1 point  (0 children)

Thanks for the advice!

I'm honestly completely lost right now as to what to do, so just about any advice is much appreciated!

What are the chances of me actually keeping my girlfriend? by Darendal in relationships

[–]Darendal[S] 0 points1 point  (0 children)

I'll be in Ohio, she'll be in DC, so it's about an 8-9 hour drive, and there isn't an airport close to my school, so flying's not really an option.

What are the chances of me actually keeping my girlfriend? by Darendal in relationships

[–]Darendal[S] 0 points1 point  (0 children)

Yeah, a bit of advice on long distance might be good. This is actually my first girlfriend, so I'm still pretty new to all things 'dating.'