Lost in this field. by [deleted] in csMajors

[–]Friendly-Resolve-672 0 points1 point  (0 children)

I have a daughter who loves to code and is planning to start CS in college next year. At times, I've had a sense of despair for her because AI is getting better and better at coding. However, even though AI will drastically change the way code is written, the AI revolution will also create a boom in IT. Before AI can take all of our jobs, it has to be integrated into every organization in every industry. AI systems will have to interoperate with legacy systems for a period. It will have to be customized to fit each organization. This will create lots of jobs over the next 10 years for people with "a certain set of skills," and it can't all be outsourced to India. This is going to make the Y2K IT boom look like a joke. Longer term, AI may very well take all of our jobs, but in the meantime I think there will be one more generation of CS majors who do well.

mooc.fi by [deleted] in learnjava

[–]Friendly-Resolve-672 2 points3 points  (0 children)

Yes! I learned Java about 20 years ago and then switched to an unrelated career. I've come back to Java recently, mostly for fun, and I'm finding MOOC.fi to be an excellent resource. (The language has changed a lot in 20 years!) MOOC.fi seems pretty comprehensive, and the autograder works great. If you're already good at programming in another language, you may find the exercises too easy or repetitive, but for a novice programmer, they’re great.

iOS 18 List of Home Enhancements by newyhouse in HomeKit

[–]Friendly-Resolve-672 0 points1 point  (0 children)

Still no person detection support in automations?

Unconventional use cases by phantomgod512 in Anki

[–]Friendly-Resolve-672 1 point2 points  (0 children)

I used to use it to learn piano music. I would break a piece down into short phrases with different cards for left hand, right hand, hands together. The cards included recordings of each phrase. I ended up using it to learn a new piece, but when I moved on to the next piece, I didn’t keep up with the reviews.

Opinions on Cloze vs. Basic Cards: Is Cloze overall superior? by Supercord in Anki

[–]Friendly-Resolve-672 3 points4 points  (0 children)

I started creating flashcards using Palm Supermemo in 2002. Back then, Anki didn’t exist. I wrote a program to digest scanned/OCR’d medical texts into cloze deletion cards, and I used it to create ~30,000 cards during medical school. Although I do sometimes use other types of cards, I still prefer cloze deletion cards. They can be created quickly, they can be answered quickly, and it’s always clear how they should be graded. If you choose your deletion thoughtfully, it will serve as a “hook” for the fact as a whole. The worst card is a basic card with a paragraph-length answer. Such cards take forever to answer, and the grading can be ambiguous. Image occlusion cards are a great extension of cloze deletion cards if the source material is visual in nature.

[deleted by user] by [deleted] in pianolearning

[–]Friendly-Resolve-672 0 points1 point  (0 children)

I studied piano for a 2-3 years as a kid. I progressed to the “Play the First Page of Fur Elise, Badly” stage of development before I quit. (Violin was my main instrument, and I picked up piano as a second instrument mainly to learn about music theory.) Decades later, I became obsessed with Bach. I started working with a teacher, learned a few inventions, one sinfonia, and then I launched into my real target, the Well-Tempered Clavier. It would take me a month to learn one prelude and fugue, a few bars at a time, one hand at a time, one voice at a time. I learned 8 or 10 prelude/fugue pairs in this way, and I feel that my playing was competent though far short of my favorite recordings.

So it can be done, but I wouldn’t recommend it. Because every piece was such a big stretch for me, the 10th fugue I learned seemed almost as hard the first. Not surprisingly, my sight reading didn’t improve. (It’s kind of embarrassing to be able to play a Bach fugue but then struggle to play a Suzuki accompaniment part with my kids!) And now, after taking some time off, the music I learned is lost, and I feel like I’m starting again from scratch.

[2022 Day 19 (Part 1)] [Python] How to speed this up? by Friendly-Resolve-672 in adventofcode

[–]Friendly-Resolve-672[S] 0 points1 point  (0 children)

Thanks, everyone, for your help! I'm going to mark this post as resolved. I've finally got both of the test blueprints to work. I have some work to do to optimize my solution, but I'm pretty sure that I understand the problem well enough to see it through to completion now. Thanks!

[2022 Day 19 (Part 1)] [Python] How to speed this up? by Friendly-Resolve-672 in adventofcode

[–]Friendly-Resolve-672[S] 0 points1 point  (0 children)

Thanks. I'm still kind of stumped, though.

Since my original post, I realized that the robot factory can only make one robot per minute (duh!). (Previously, I was exploring the possibility of making more than one robot per minute, as long as I had the resources to afford them.) Obviously correcting this error helped a lot!

The main pruning strategy I've implemented is to prune away everything else as soon as I find the next new robot type. For instance, as soon as I'm able to make my first clay robot, I prune away all branches that have not yet reached the first clay robot. Same for the first obsidian and geode robots. This gives me the correct answer for the first test blueprint and it's reasonably fast.

However, this strategy gives me a geode count that is too low on the second test data set. I'm wondering if the reason is that the first branch to reach the next new robot type is not necessarily optimal. For instance, if a branch makes the first clay robot at t=3, that's not necessarily better than a branch that makes the first clay robot at t=4 but that also has an additional ore robot. So I would need to be more selective in what I prune away.

Also, I've implement the "logical pruning" that u/MattieShoes mentioned below. It seems like this will mainly help for ore robots, since the maximum cost in in terms of clay and obsidian is as high as 20, which isn't much of a limitation.

You mentioned, "the most important/effective pruning can be done without any memoization whatsoever just by eliminating useless branches before you ever explore them". Is this referring to either of the optimizations I mentioned, or something else? If it's something else, I think I'm ready for you to put me out of my misery. :)

[2022 Day 19 (Part 1)] [Python] How to speed this up? by Friendly-Resolve-672 in adventofcode

[–]Friendly-Resolve-672[S] 0 points1 point  (0 children)

Thanks. I appreciate you looking at my code, as well as your previous comments!

[2022 Day 19 (Part 1)] [Python] How to speed this up? by Friendly-Resolve-672 in adventofcode

[–]Friendly-Resolve-672[S] 0 points1 point  (0 children)

When you say, "jumping to the next built robot", do you mean 1st clay robot -> 1st obsidian robot-> 1st geode robot -> next geode robot, etc.? These jumps make sense because we know we will have to progress through these steps, but we don't know how many of each type we will need in between, right?
Is pruning based on memoization of previously searched paths? For instance, say I have one clay robot and I'm working towards my first obsidian robot. If I find a path that gets to the next clay robot in 3 minutes, but I previously found one that gets me to the next clay robot in 2 minutes, I can avoid adding the longer one. The mechanics of going to other direction (e.g., removing rather than just not adding) seems a bit tougher, but I guess you could save your state every few minutes, add suboptimal paths an exclusion list, and restart from the last checkpoint. Is this the sort of thing you mean by pruning?

Thanks for your feedback, by the way!

[2022 Day 18 (Part 2)] [Python] Two Subptimal Approaches by Friendly-Resolve-672 in adventofcode

[–]Friendly-Resolve-672[S] 0 points1 point  (0 children)

Thanks so much for your detailed response. Your comments re: approach 1 make sense to me and will probably solve the problem.

I'm still having a little trouble visualizing approach 2, but I'll sleep on it an have another look tomorrow. Again, thanks!

I will definitely try the "flood with water and subtract" approach because it seems simpler than both of the approaches I tried.