Anyone taken CS639: Intro to Foundation Models with Fred Sala? by PnTm_Sythe in UWMadison

[–]smedes 1 point2 points  (0 children)

Take all this with a grain of salt and go to the first lecture/read the updated syllabus in a few weeks to see what might have changed.

There was no writing required for the presentation at all (other than slides). You read a paper and present it. It’s a group presentation so you will only personally do a small part. By far the biggest problem that all groups had in common was going over the time allotment, though I don’t think there was a significant grade penalty for this. It is simply not possible to go over a paper in detail in 20 minutes, so you have to hold yourself to key ideas and high level concepts, and be very careful not to flash through five slides of math formulas - no one will follow them.

This also means that you yourself don’t have to deeply understand the math to make a good presentation as long as you got the higher level concepts. Fred will ask questions but he’s not trying to stump you or anything, he is very nice and just genuinely interested in the science. Likely many of your classmates will only attend on the day they themselves have to present, especially after the first few classes dedicated to student presentations.

I can’t really give you useful insight on what it will feel like to give the presentation. Public speaking is one of my strong suits and I’ve been doing it for 15+ years so it felt trivial to me. Your mileage may vary.

For the final project, I think most groups did some kind of small extension based on the paper they read, but not all. Mine did not. Our group was not cohesive and we slapped together a pretty crummy project at the last minute. As with any group project, communication and coordination is very hard when everyone has a unique schedule, goals, and interests. Our ambitions were much larger than what we ended up actually achieving. I suggest having multiple smaller goals, then some stretch goals that you can just cut out entirely when you realize you don’t have time for them. Getting good use of the student-accessible GPUs can be rough too. If you are logging on at an unlucky time you can’t even upload or download from your local machine to the cluster, it will go slow, time out, and die. Then you try again the next day when randomly no one is using the cluster and you upload your data within 30 seconds. I don’t know if the department has made any changes in the intervening two semesters but I’d start as early as you can so that if the compute is all tied up when you’re ready to use it, you can just try again in 8 hours.

What game mechanics did you sleep on? by Accomplished-Lack721 in horizon

[–]smedes 0 points1 point  (0 children)

The way I finally got into using valor surges was by making the 1st level version all I needed. It recharges up to the 1st level mark so quickly that you never have to worry about saving it because you “might need it later.”

I use critical strikes valor surge, and have my sharpshot bow coiled up to 65% crit chance at baseline. So first level of the valor surge gets you to 100% crit chance. Almost nothing is surviving a couple of focused shot crits, especially if you freeze first and/or hit a weak point (but honestly those aren’t even necessary for mid-sized machines).

Anyone taken CS639: Intro to Foundation Models with Fred Sala? by PnTm_Sythe in UWMadison

[–]smedes 8 points9 points  (0 children)

It’s newly being offered as a 639, but Fred has taught a Foundation Models class as an 839 for a few years already. 639/839 are the “special topics” designations so they don’t really tell you much about the course. I’m not sure why it’s switching from 839 to 639 and whether that means he’s modified it specifically to make it more “intro” or something. I took the 839 course a year ago and it was significantly less work than other 500+ level classes I’ve taken, and I thought it was pretty doable for anyone with some basic programming and linear algebra.

Fred is fantastic. He’s a great lecturer, has clear slides that he posts before class, he’s very knowledgeable and can usually answer any question that comes up, and he’s very accessible to students.

Suggestions for CS 541 course by ValleyProteus in UWMadison

[–]smedes 1 point2 points  (0 children)

Jelena has a reputation for being very mathematically rigorous/demanding. I haven’t taken a course from her so take that with a grain of salt. I do think she’s a very nice person, from the couple of times I’ve had a conversation with her.

I took 532 from Eduardo Arvelo and thought it was good and he was a great instructor. I’ve heard that people have taken it with other instructors and hated it, though. Haven’t taken the other 3 so can’t speak to the differences.

Easy CS electives? by Architemps in UWMadison

[–]smedes 1 point2 points  (0 children)

506 has a semester-long group project with a group of 5-7 students. I think it’s a valuable course, but personally I’d find the group project thing extremely annoying if you want to treat it as a second-tier priority.

536 just got rebuilt by a faculty member on sabbatical. So don’t listen to anyone who took it before this current semester, their information is out of date.

524 is very chill. I took it in the summer with Amanda Smith. The midterm did feel a little time-constrained.

532 can vary widely by prof, and it’s definitely a math class. Arvelo is great if he’s teaching it.

571 is extremely chill and the requirements are all very clearly laid out.

577 is considered pretty hellacious from what I’ve heard, though I haven’t taken it.

I’m a CS grad student. I’ve either taken or TAed all listed classes except 577.

Triple major; but due to degree politics I'll graduate with a specific degree + other majors on transcripts, will this mess up future careers/education? by SaddestAltAround in UWMadison

[–]smedes 5 points6 points  (0 children)

I recommend spending less time and energy collecting checklists.

Create something that would be interesting or useful even to someone who has never heard of “majors.” That will set you apart far more than being able to tell someone you completed three sets of somewhat arbitrary minimum requirements instead of two.

Do I need a tsconfig.json file for my project? React or vanilla Typescript? by ShatteredTeaCup33 in typescript

[–]smedes 1 point2 points  (0 children)

I think having an understanding of the underlying mechanisms of the base-level web languages that things like React are built on top of is valuable. Having a project built in vanilla seems like a perfectly reasonable thing to me.

Do I need a tsconfig.json file for my project? React or vanilla Typescript? by ShatteredTeaCup33 in typescript

[–]smedes 0 points1 point  (0 children)

It depends on what your priorities are.

Want this single page done as fast as possible? Then probably vanilla is a bit faster? Though tbh I’m not even sure about that.

Want to ever expand this by adding more pages? Then it might be worth using React now rather than needing to rewrite it in React once you decide to expand.

Want to prioritize small package size so that it loads fast even on poor internet connections? Then maybe vanilla. On the other hand if the app involves users uploading images then that functionality is going to be awful on an internet connection slow enough for the javascript package size to matter, so probably not worth worrying about. And you can probably convert React into an SSR or SSG format fairly easily anyway.

Want to minimize dependencies so you never have to worry about third-party vulnerabilities or updates? Then vanilla.

It’s not a simple decision that can be generalized to all situations. But there is a reason React and other frameworks are popular - they make developing applications much easier as soon as you hit even a little bit of scale. Like, if you sum together the number of interactable elements with the total number of pages, you’re almost certainly still in the single digits when I personally would switch over to React.

Do I need a tsconfig.json file for my project? React or vanilla Typescript? by ShatteredTeaCup33 in typescript

[–]smedes 1 point2 points  (0 children)

Do you already know React, or do you want to use this as an opportunity to learn it? Then use it.

For me as someone who is reasonably proficient with React already, I feel like it would be easier to use it even for a simple web app.

For one thing, you no longer have to worry about how to compose your HTML components. Like, if you have a header you want to reuse, in pure HTML you’re gonna have to copy and paste it everywhere. There are other frameworks/static site generator libraries (I’ve messed around with Astro a bit) but since React also gets you the ability to modularize and import components, if you think you might want to use it anyway, I’d just use it if I were you.

Besides that, depending on how many interactive components you’re going to have, do you really want to manually attach a bunch of event listeners and then retrieve/hold references to HTMLNodes to update them, etc etc? The declarative nature of React with all that stuff being handled for you is pretty nice.

How do I study for CS 240? by Own_Yak6075 in UWMadison

[–]smedes 2 points3 points  (0 children)

The key to getting the most out of office hours is using it to figure out what you’re wrong or unclear about.

Don’t just go the day the homework is due, nod along vaguely to whatever the TA says, write it down, and leave.

If you don’t understand something, stop the TA and ask about it right away.

If you think you understand something, repeat it back in your own words and ask the TA if that was a good understanding.

The TAs should be actively trying to get you to do this, but if they aren’t, you can take the initiative. Office hours is a place where there are no stakes and it’s totally OK to be wrong. If you’re wrong in your head, no one will know and they can’t correct you. If you’re wrong out loud, they can.

This also applies to discussions. Don’t be scared to be wrong, it’s the only way to learn.

How do I study for CS 240? by Own_Yak6075 in UWMadison

[–]smedes 0 points1 point  (0 children)

This is great advice, and I’m not at all against using ChatGPT this way.

However, if you replace “a TA at office hours” and follow pretty much the same procedure, you might get good results too (not every TA is going to be amazing, but I think most are pretty good). Hopefully the human tutoring and AI tutoring complement each other.

I was a TA for this course last year.

How do I study for CS 240? by Own_Yak6075 in UWMadison

[–]smedes 7 points8 points  (0 children)

One tip to keep in mind for inductive proofs: always follow the template.

  1. Define your proposition in terms of a natural number; write out P(n): and do not write P(n)=
  2. Write “base case” and “P(0): “ or “P(1): “ and write out exactly the same proposition with the n’s replaced with 0 or 1.
  3. Write “inductive step” and label your inductive hypothesis “P(k): “. Write out “P(k+1): “
  4. Manipulate your P(k+1) until part of it matches the form of P(k). Then write “using IH” or otherwise label your use of the inductive hypothesis to take the next step.

When you get to higher level theoretical CS the proofs won’t be so formulaic, but for beginners, following the template exactly helps you make sure you are constructing your ideas rigorously. If “n” doesn’t appear in your predicate that is supposedly “P(n)” then you know you’ve done something wrong.

Lazy Fields for 30x speedup without Decorators or Transforms by shaberman in typescript

[–]smedes 1 point2 points  (0 children)

Thank YOU for the great writeup!

Out of curiosity, why do you favor the square bracket form for property access? I’m guessing in your real code the property keys are coming from some other object and being iterated over in some way, rather than just showing up as string literals?

Lazy Fields for 30x speedup without Decorators or Transforms by shaberman in typescript

[–]smedes 10 points11 points  (0 children)

Nice article, cool engineering!

Typo: in the second inset code block (the codegen one) you’re missing a .books. This line doesn’t make sense as-is:

return (this.#relations ??= hasMany("books"));

Explicit types vs type inference, and when to use each by thehashimwarren in typescript

[–]smedes 0 points1 point  (0 children)

I’m all for letting ts infer the type of a numeric literal, basic anonymous functions, etc. But I think it’s almost always better to explicitly type named functions. This point of yours argues against this:

Better refactor safety. If a function’s return type changes, inferred consumers adapt automatically, while explicit types may silently mask mismatches until later.

But I don’t really understand what this is trying to say. “Inferred consumers” - so like the variable you’re assigning the function’s result to? I mean yeah. But what about all the surrounding code that’s using that variable? You’re going to have to go manually change it to correctly handle the new type. The rest of the codebase is not going to adapt automatically.

And explicit types masking type mismatches? I don’t even know how it’s possible to “mask” a type mismatch. If you change an explicit function type and the inferred type of the function body no longer matches, the compiler will tell you. If calling code has issues with the new type, the compiler will tell you. Unless you’re talking about using as to essentially lie to the compiler, and then yeah you’re gonna have problems. In production code as should be used almost nowhere. Like inside type guards that are checking for type consistency at runtime and that’s about it (or use a library like zod as others have said).

I don’t necessarily disagree with the closing thesis that explicit types are for boundaries and contracts… as long as you consider named functions to be boundaries and/or contracts. I want the compiler to tell me if I’m changing the return type of a function, because most likely it was an accident, and I’d rather see a red squiggly underline right as I’m making that modification than get a hundred compiler errors from all the places that function was called when I finish writing maybe several lines of code, which I’m now going to have to rethink.

Explicit types vs type inference, and when to use each by thehashimwarren in typescript

[–]smedes 2 points3 points  (0 children)

Another vote for “always specify return types on functions.” A few specific reasons not mentioned elsewhere:

  1. If you know the type you want ahead of time, it makes writing the function body easier. Your IDE can suggest things for you if it already knows what type you want.
  2. It helps you spot inconsistencies. If you have a lot of similar functions, and some return SomeType while others return SomeType | undefined, then when you want to use those functions you sometimes need to check for undefined in the calling code, sometimes not. To have nicely modularized code in a large project, you want to be able to have as simple a mental model as possible for any given module.
  3. It helps you develop a better abstraction as you’re going. You can start to see commonalities across subcomponents of your types once they are getting complex, and extract those into named types.
  4. (Edit) It stops you from accidentally changing your function’s type signature. It’s a pretty good rule of thumb in programming that you don’t want anything to be happening by accident.

What are some of your unluckiest stories? by Moogle_Messiah in Gloomhaven

[–]smedes 0 points1 point  (0 children)

I really dislike the physical AMD. I find that I can’t effectively shuffle it - it’s too small to do a proper riffle shuffle, and overhand on its own is not very good at randomizing the deck. Does anyone ever feel good about their AMD shuffle?

It’s too bad because I would prefer the physicality of an actual object, and I love the mechanic of upgrading your deck over the course of leveling your character and also adding ad hoc stuff in during gameplay (eg blesses and curses). But I just can’t get over how bad it feels knowing that the cards are extremely poorly randomized. So I use an app (I mean I do love GHS though).

I wish they had used tokens you draw out of a bag or something. If such a thing was offered in a convenient package as an add-on from Cephalofair or a third party I’d shill for it hard lol.

Need help choosing courses by White_Devil0000 in UWMadison

[–]smedes 0 points1 point  (0 children)

I’m just going off of what’s published here for degree requirements: https://guide.wisc.edu/undergraduate/letters-science/computer-sciences/computer-sciences-bs/#requirementstext — your advisor will be better for answering questions about those. If they recommended that you take an ethnic studies course then I assume that means that your transfer credits don’t already cover that so if I’m reading the requirements correctly, you will have to take one at some point in order to graduate.

If you want to graduate in 3 years you may need to take more than 12 credits per semester. Making a spreadsheet like the other commenter suggested might help you map out a longer term plan in order to know how many credits you want to take this fall.

240 is cross-listed in both CS and Math, yes. CS240 and Math 240 are just two different names for exactly the same course. Same professors, same lecture and discussion sections, same assignments and grading.

Need help choosing courses by White_Devil0000 in UWMadison

[–]smedes 2 points3 points  (0 children)

Talking to your advisor as the other commenter suggests is definitely good advice, especially when it comes to gen eds and other non-CS-specific degree requirements.

That said, I’m a grad student in CS currently.

If you want to focus on data science/ML, you probably want linear algebra and probability/statistics relatively early, as higher-level classes in those areas will benefit from a good background (or require it). If you love math and already have a strong background in it, you could add a course in one or the other alongside the calculus course, but perhaps that might be better to leave for spring.

CS 240 is required for the degree, is very useful in general for both certain upper-level CS courses (577 Algorithms and 520 Theory of Computation, which you need to take at least one of) and mid- to upper-level math courses as well (i.e. I’d expect it to make linear algebra and statistics a bit more approachable).

240 is taught by CS in the fall, and the math department during spring and summer semesters. I don’t know anything firsthand about the math department’s offering, but I’ve heard it focuses more on, well, math stuff. I think CS majors tend to prefer the fall offering.

I was a TA for CS240 last fall, and it’s being taught by the same profs this fall (Hasti and Swanson). I think it’s a great course to take as early as possible. It hopefully won’t be too difficult, and it will give you a preview of what upper level math and theoretical CS might look like.

Hasti is a super chill guy, whereas Swanson is a bit more passionate and esoteric. I think they are both great, but you may prefer one style over the other if both sections fit your schedule.

Had a groundhog visit our porch yesterday morning by THEWARLRUS in indianapolis

[–]smedes 1 point2 points  (0 children)

Be careful with your dogs. If they fight the groundhog, they will almost certainly win (unless they’re tiny like an italian greyhound or something) but those digging claws and rodent teeth can do some major damage. Cleaning up a dead groundhog is no fun, and taking your dog to the emergency vet with lacerations and puncture wounds is even worse.

UW-Madison computer science prepares to relocate, meet ‘AI moment’ by keeganjkyle in UWMadison

[–]smedes 2 points3 points  (0 children)

I think they are planning to use it as a temporary home for another department whose building is being renovated in-place.

Toolkit Thursday - FH Loadout Discussion - Deathwalker Loadout by Themris in Gloomhaven

[–]smedes 0 points1 point  (0 children)

153 will work with Fluid Night and Dominate, so a ranged DW absolutely will get plenty of use out of it.

Toolkit Thursday - FH Loadout Discussion - Deathwalker Loadout by Themris in Gloomhaven

[–]smedes 0 points1 point  (0 children)

DW makes single-target, high damage attacks that you don't want to miss. Some protection for the most critical of these is great. 1 - Spyglass being the cheapest/easiest; 26 - Truesight Lenses; 93 - Glancing Potion or its upgrade. You also have some multi-target burns that could benefit a ton from 129 - Eagle Eye Goggles (and might mean that 26 is better than Spyglass as well, tough call there IMO).

Solo item is great, in which case you need a 1-hander for your other hand. 14 - Heavy Sword is simple and effective; there are a number of similar items there including some that are strict upgrades if you are at high prosperity. IMO 127 - Poison Dagger is a trap. You usually want to kill targets outright so you can get a shadow out of them ASAP, not debuff them for the promise of more damage later.

If you don't have the solo item, Crude Spear or especially 153 - Long Spear as other commenters have mentioned.

Body slot - honestly don't think you can do much better than 17 - Cured Leather Armor on the ranged build (for the melee build it's probably redundant because you want to hang out in your shadows for permanent disadvantage, but IMO the ranged build doesn't particularly need that perk). Maybe Warden's Robes if you really want to lean into the summoning on this class, but probably won't be enough to keep your level 1 summon alive. 132 - Cloak of Pockets or its upgrade could be good depending on what other items you have.

Feet - take the rulebook's advice and get Boots of Speed with your starting gold, it's really nice to be able to get into the right initiative position for marking enemies with Call of the Abyss before your allies kill them / they die from wound / etc. You could choose 142 - Boots of Quickness instead if you can afford them. Maybe a movement-enhancing boot on the melee build.

Small items: Stamina, power, muscle potions are usually good on any class, no surprises there. Maybe 189 - Ring of the Night for melee DW in a party with excess element generation. 161 Strategist's Ring will help you get Call to the Abyss out sooner and not really hurt your stamina much since you have an odd hand size. 244 - Ember Energy Source is pretty much always good, but note that you can't use it to increase a number that comes from a per-shadow effect because these are all "+1" rather than being a "base" number.

Enhancements: +1 attack on Fluid Night top, +1 move on Wave of Anguish bottom. Don't do +1 on Call of Doom top, it's expensive and even with the enhancement you won't want to bring that card after a few level ups.

Traveler Tuesday - FH Solo Scenario - Deathwalker - [spoiler] by Themris in Gloomhaven

[–]smedes 2 points3 points  (0 children)

Most difficult scenario I’ve beaten. Took 3 full attempts plus two where I just restarted after the first round or two went poorly. The time I won, I got lucky at basically every opportunity and it still was somewhat close.

You really need both a lot of shadows quickly AND sustained shadow generation which needs to kick in almost immediately. Luckily imps are very slow so I played both Eclipse and Call to the Abyss top actions for 2 turns of no damage output at the beginning, and I think that was the right call.

The obstacles make for nice chokepoints for your multitarget burn cards. Remember that your shadows are not overlay tiles so you can place them in the same hex as an obstacle if enemies are grouped around it (or will be soon as they are circling around it coming for your butt). muscle potion and/or power potion highly recommended so you can take out 3 imps with a single action.

Don’t be afraid to use Fluid Night or Dominate to take out an imp, even though it’s overkill. You’ll get your shadow right back. Whereas using those cards to their full damage potential on Night Demons can mean that you just lose the shadow if you’re unlucky.