|
A Festivus Miracle posted:Additional quiz question: This is a pretty terrible question assuming it doesn't give any additional context, but I would say the answer is at most 2. First, never assume a piece of code has an intentional syntax error unless that is one of the answers. The point of the test is almost certainly to focus on the logic. Second, we don't know what code is calling the function, but that code could only ever draw a red rectangle if it was called with `g("red", 7)`. A rectangle isn't a triangle, so you could argue that the answer is 0. And even though most geometry is rendered with triangles, you don't actually know how it works under the hood to make that assumption. And even if you could, you don't know for sure how many it's using. But let's ASSUME a rectangle is composed of 2 triangles, because that's the kind of thing a compsci 101 professor would do. So if that code was called with `g("red", 7)`, it would result in a rect composed of two red triangles being drawn. If it is called with anything else, there would be no red triangles unless you passed in something like `g("0xFF0000", 0)`. It's a bad question. KillHour fucked around with this message at 21:39 on Mar 13, 2024 |
# ? Mar 13, 2024 21:36 |
|
|
# ? Apr 30, 2024 09:00 |
|
If this is a college class this might be a good time to try to transfer to another section where the professor isn't an idiot if possible, before you get more quiz/test questions that are bizarre/nonsensical and/or have incorrect answers
|
# ? Mar 13, 2024 21:36 |
|
e:f,b, and, I didn't even notice the triangle/rectangle inconsistency Dijkstracula fucked around with this message at 21:43 on Mar 13, 2024 |
# ? Mar 13, 2024 21:38 |
|
It's a bad question but if it's multiple choice I'd say 0 red triangles because it's only drawing rectangles
Mind_Taker fucked around with this message at 21:42 on Mar 13, 2024 |
# ? Mar 13, 2024 21:40 |
|
mystes posted:If this is a college class this might be a good time to try to transfer to another section where the professor isn't an idiot if possible, before you get more quiz/test questions that are bizarre/nonsensical and/or have incorrect answers Oh my lord in heaven, you have no idea. This professor is awful. I thought I was just really bad at programming until I looked at her rate my professor and it's just a trail of 1.0s that goes on for pages with everyone universally agreeing she sucks. It's the middle of the semester. I'm stuck with this.
|
# ? Mar 13, 2024 21:40 |
|
I just realized that if you pass in `g("red", 7)`, the code as written will draw a red rectangle and then immediately draw a black rectangle in the same place, covering the red rectangle (assuming the rect function uses the painters algorithm). So the answer is definitely 0. Probably. Maybe. gently caress, I don't know. Good lord, what a terrible question.
|
# ? Mar 13, 2024 21:42 |
|
A Festivus Miracle posted:Oh my lord in heaven, you have no idea. This professor is awful. I thought I was just really bad at programming until I looked at her rate my professor and it's just a trail of 1.0s that goes on for pages with everyone universally agreeing she sucks. It's the middle of the semester. I'm stuck with this. I would point out the issues to the teacher and if they don't issue a correction, go to the department head with that quiz and be like "what the gently caress".
|
# ? Mar 13, 2024 21:55 |
|
I had a teacher for a differential equations course once who was dreadful. Pretty much every lecture followed the same pattern. The first half of the lecture would be her more or less competently explaining the solution to a problem she had failed to answer in the previous lecture. The second half would be her moving on to the next problem she wanted to cover, and either failing to recall how it was supposed to be solved, failing to get the right answer, or coming unstuck because the statement of the problem would be wrong or misleading. She would then spend some time shuffling her papers in confusion, trying to work out in front of the whole class what the correct question and solution were meant to be, and end up promising to show the correct solution in the next class (which to be fair, she would do). In the exam at the end of the course one of the questions asked the candidates to demonstrate that the solution to some problem or other was something specified in the question. I worked it out and got a different answer to what the paper asked for. I spent about 5 minutes puzzling over my working trying to find where it was wrong, before the invigilator made an announcement they had received from the teacher that there was a mistake in the exam paper and it should say the answer I had come up with. There was audible exasperation from all the candidates in the exam hall at the announcement.
|
# ? Mar 13, 2024 23:31 |
|
E: didn't realize I wasn't on the last page
|
# ? Mar 14, 2024 00:34 |
|
Reminder with the rectangle/triangle question, there's a difference between how many requests there are to perform a drawing action versus how many shapes appear on the result. In this case, all rectangle drawing commands fill the same region, so you can call f() a trillion times and you'll still only have a single rectangle. (But as written you have zero until g is called). But triangles? Always zero since a triangle with base and height 100 necessarily has an irrational hypotenuse, which can't be drawn on a digitized medium. (cf the student thread, since such a response will drive any instructor into an uncontrollable rage) Does the question literally say "0, 1, 2, or 3"? They may be expecting "0 if g is never called, 1 for g(orange,2), 2 for ..."
|
# ? Mar 14, 2024 01:54 |
|
it's obviously a trick question asking you to iterate over bresenham's
|
# ? Mar 14, 2024 01:56 |
|
The answer is 2, because you should always just pick C for multiple choice if you don't know the actual answer. It's a safer bet.
|
# ? Mar 14, 2024 05:53 |
|
Cs get degrees, after all
|
# ? Mar 14, 2024 06:14 |
|
Yeah the road to receiving my Cs degree was chock-full of C's
|
# ? Mar 15, 2024 02:10 |
|
csammis posted:Yeah the road to receiving my Cs degree was chock-full of C's
|
# ? Mar 15, 2024 02:13 |
|
Dijkstracula posted:Cs get degrees, after all Until you hit grad school, then it's a B (not B-) average. You can get some C's but you'll need to offset them with A's. At least that's how it was in the made up business schools I attended. Comp sci. Might be different. Anyhow, I have a C# question related to grad school. I'm thinking of revisiting C# again but in the previous 3 times I've done it for classes or whatever, it didn't seem like there was a great endgame for it as far as the language by itself. I remember I wrote programs to connect to SQL server to run queries and active directory to reset passwords, but it seems to me that the road leads inevitably to web app development and needing to know HTML/JavaScript/CSS/ASP.NET in addition. So my question is that if I worked on C# in my spare time, what kind of useful things (not unity) could I do in say, a year? I need to start thinking about dissertations for business school (lower standards than comp sci PhDs) and need to do something applicable rather than theoretical. AI is obviously the low hanging fruit right now but I was hoping for something physical or related to the real world. I have a copy of VS2022 ENT, SQL server 2022 standard, server 2022, etc. and access to money and tools.
|
# ? Mar 15, 2024 15:08 |
|
repsnake posted:Until you hit grad school, then it's a B (not B-) average. You can get some C's but you'll need to offset them with A's. At least that's how it was in the made up business schools I attended. Comp sci. Might be different. line of business applications in .NET anything backend web dev in .NET games in unity, stride, etc what kind of useful software could you work on in java. its the same question. the answer is "a lot" to the point the question itself isnt that interesting. what problem domains are you interested in working on? (apparently not games, but that leaves a lot on the table)
|
# ? Mar 15, 2024 15:18 |
|
repsnake posted:So my question is that if I worked on C# in my spare time, what kind of useful things (not unity) could I do in say, a year? Godot supports C#, and supposedly Unreal Engine will soon But more seriously, the reason you see so much webapp stuff is because a huge proportion of software development effort is spent on webapps. I don't know the percentile breakdown, but I'd guess it's easily over 50% and certainly over 90% of the "visible" (i.e. non-B2B) work that software developers do these days. Every serious language is going to have a web stack, and that web stack is going to show up fairly frequently in discussions around the language. That doesn't mean that you have to do web in that language. As for what specifically to do, in a year of work, you could probably do some reasonably useful data analysis program of some kind. Ingest a database of facts (stock prices, baseball stats, demographics, whatever), perform queries on that database according to user parameters, emit results of those queries. You can do it on the commandline if you want a zero-UI setup, and then if you need a UI, either build a desktop application, or go the webapp route.
|
# ? Mar 15, 2024 15:19 |
|
repsnake posted:Until you hit grad school, then it's a B (not B-) average. You can get some C's but you'll need to offset them with A's. At least that's how it was in the made up business schools I attended. Comp sci. Might be different. Agreed with the other posters: you're thinking about things backwards. As opposed to "what pieces of technology are the ones I should learn", start instead with "what do I want to create?" and work from there; I think you'll find that as a piece of tech the .NET stack will very likely suit your needs just fine. Dijkstracula fucked around with this message at 15:56 on Mar 15, 2024 |
# ? Mar 15, 2024 15:53 |
|
Dijkstracula posted:in CS grad school there's a minimum grade for a class to count towards your courseload but there's no overall GPA requirement, so, stack up those minimum passes! (edit: my gpa in grad school was a 4.0 though ) All the programs I've seen will boot your rear end if you get a second C. You had a GPA? How quaint.
|
# ? Mar 15, 2024 16:58 |
|
ultrafilter posted:All the programs I've seen will boot your rear end if you get a second C. You had a GPA? How quaint. in my program there seems to be only one way to get booted and that's if your advisor decides to make your life sufficiently unpleasant that that's the only remaining move to make (not speaking of my experience or my advisor, to be clear, but I've seen the "marginally unproductive semester to funding pull to "hey I haven't seen so-and-so around"" pipeline in action and mannn )
|
# ? Mar 15, 2024 18:01 |
|
In practice, if you’re getting C’s in grad school, you need to move on with your life. It’s not like there’s a ton of breadth requirements in grad school. In CS, they’re going to ask you to take Algorithms and show up to the colloquia, and basically everything else will be from your specialization. If you can’t get your poo poo together enough to pass classes in your own specialization, what are you even doing in grad school? There’s almost nothing in life that requires an advanced degree in CS; you’re doing this because you want to. Your motivation problems are not going to be any better once the classes are done with.
rjmccall fucked around with this message at 20:17 on Mar 15, 2024 |
# ? Mar 15, 2024 20:14 |
|
counterpoint, which I don't necessarily agree with but one that I've heard advisors explicitly tell their students: the only thing that matters in grad school is your research output, so the right play is to only take grad classes where the workload is trivial and put in only as much work as you have to in order to satisfy your degree requirements, in order to focus on getting papers out the door.
|
# ? Mar 15, 2024 20:24 |
|
Depends on how seriously they take the qualifying exams. The university where I did my master's used those to weed out the PhD students so doing well in the classes related to them was very important.
|
# ? Mar 15, 2024 20:28 |
|
Advisors definitely don’t want you to spend a ton of time taking interesting and engaging classes instead of working on research projects. The nice way to put this is that some students need to be broken out of the mental habit of just following a preset program and passively learning stuff. The rude way to put it is that some advisors think you’re only there to advance their research. Regardless, they don’t actually want you to slack off in your classes; they want you to get them over with.
|
# ? Mar 15, 2024 20:33 |
|
Academia has the same problem that toxic companies like Amazon/Tesla/etc. have - they know you're passionate about what you do, so they expect to be able to run you into the ground. "You chose to be here so you need to put in 80 hours/week of effort for my benefit" is not an acceptable attitude for literally anything. Any field where it's expected that you give up having a life outside of that field, even temporarily, is inherently predatory.
|
# ? Mar 15, 2024 20:43 |
|
Limping through grad school in CS sounds like a tremendous waste of time and money. It's just not a degree with a particularly good ROI if you already have a bachelor's in CS.
|
# ? Mar 16, 2024 03:34 |
|
I made the mistake of doing The Math vis a vis staying in industry a few months ago and realized that grad school has been a million dollar experiment for me
|
# ? Mar 16, 2024 04:44 |
|
Dijkstracula posted:I made the mistake of doing The Math vis a vis staying in industry a few months ago and realized that grad school has been a million dollar experiment for me If you're paying a million dollars for grad school, they drat well better let you graduate with a C average!
|
# ? Mar 16, 2024 07:13 |
|
(to be clear, this is opportunity cost vis a vis total comp from my previous Bay Area SWE job, but given the post-pandemic market bull run seems to be officially over maybe this will level out as I slouch closer to graduation )
|
# ? Mar 16, 2024 16:13 |
|
I went to grad school for a masters in cs while working a full time job doing software test automation. Three grad school classes at once and a full time computer-toucher job was a lot of hours a day of doing computer poo poo let me tell you.
|
# ? Mar 16, 2024 18:25 |
|
I've made a terrible mistake and started playing Sixty Four, (which I encourage no one else in this thread to do but that's aside the point,) and it got me to thinking about how to solve the question of "what is the most efficient way to place your machines so that they can crush blocks the fastest?" The game is basically a Cookie Clicker esque game, with a 2D grid visualized in 2.5D, where you click blocks to break them apart. Over time, you can build new machines to place, which will make the blocks easier to break, or will click on them for you periodically, or will allow new blocks to appear more quickly, or will click on machines for you (but must in turn themselves be periodically clicked manually), etc detc. The price in blocks for each machine increases exponentially, meaning that you can only place so many of each type before they become too expensive. So, you will need to balance the space to fit these machines, the cost for each new instance of a specific machine type, the opportunity cost if it is placed on a spot a block could be placed (each Block Pump makes a 3x3 grid centered on itself, but can be upgrade to 5x5). Additionally, if you can expand this to take advantage of adjacent block pump placement, that's great (e.g. placing a block breaker on an edge, so that it will break both your blocks and a neighbor's blocks). I'm just a simple software engineer, formal proofs confuse and frighten me. This doesn't seem like the knapsack problem, or bin packing. Maybe chip placement? This feels like an NP or worse problem, but I don't know specifically what kind of problem, or how I would go about trying to solve it aside from graph paper and saying "hmm" a lot. I would appreciate suggestions on where to look towards for an answer. e: For a more constrained subproblem, I have four machines: Converter A, Converter B, Catalyzer C, and Power P. These machines are placed on a 2D grid. C and P interact with machines that are directly adjacent in the 8 grid directions.
I've come up with a layout that looks like this: pre:BBPBBBPBB BCCCCCCCB BPABAPABB BCCCCCCCB BBAPABAPB BCCCCCCCB BBPBBBPBB Volmarias fucked around with this message at 19:21 on Mar 16, 2024 |
# ? Mar 16, 2024 19:08 |
|
Volmarias posted:I've made a terrible mistake and started playing Sixty Four, (which I encourage no one else in this thread to do but that's aside the point,) and it got me to thinking about how to solve the question of "what is the most efficient way to place your machines so that they can crush blocks the fastest?" This sounds like it can be formulated as a zero one integer program but it's not entirely obvious that the size of the resulting problem is polynomial in the input size. I wouldn't be surprised if it is, in which case you're looking at something that's NP-complete at worst. For small instances it'd probably be tractable and there are good enough off-the-shelf solvers that it's a worthwhile approach.
|
# ? Mar 16, 2024 19:14 |
|
It's fine to go to college just because, but it's generally a bad idea to do a graduate degree without a really specific reason, and what's a good reason depends a lot on whether you're looking at a master's or a PhD. From a pure financial standpoint, a master's degree can make sense but a PhD almost never does. Some good reasons to get a master's in CS:
|
# ? Mar 16, 2024 19:23 |
repsnake posted:So my question is that if I worked on C# in my spare time, what kind of useful things (not unity) could I do in say, a year? There's money to be made in porting .NET Framework stuff to .NET Core, and also in expanding previously Windows-only code to multi-platform support. As a more simple straightforward proof-of-concept / resume padding type of thing, all sorts of Azure services have free/cheap pricing tiers you can build fun stuff with. Embedding based searches in AOAI, OCR tech using Document Intelligence, etc. Pretty much everywhere you go will have something useful.
|
|
# ? Mar 18, 2024 15:11 |
|
ultrafilter posted:The only good reason to get a PhD is because you want a career in research or some other area where having a PhD is necessary. (I went back for a phd because my last gig in industry in 2019 was as an software developer at MSR, and then during the pandemic (after getting said contract canceled when the world shut down) I started teaching as a sessional lecturer, but then learned that in practice research is slow and boring and lonely, and being excited about teaching is actively discouraged to the point where getting assigned a TA position is your advisor trying to punish you)
|
# ? Mar 18, 2024 15:24 |
|
Research is actually good stuff, very exciting, and wow I miss it, but really it mostly disappeared in 2005ish and has never recovered. Oh sure sure there are "new things", but in the world of theory we're still implementing a lot of things from the 50s and 60s. Research is the first thing to get blamed/cut when revenue drops 0.01%, so it's something of a thankless endeavor in an industry where "planning ahead" reaches out to the 9mo mark, which is about the point that the fastest research starts showing results.
|
# ? Mar 19, 2024 00:33 |
|
I think I've mentioned it before, but there is some joy to be found in research fields where the IT is the means instead of the end - I work in bioinformatics, and there are CS and Maths people here who have drifted in. They seem to enjoy the wide unexplored space of biology problems they can apply modern tools to - even if they aren't breaking any real new ground on the CS side. On the other hand I just spent the evening writing a utility package in R to generate JSON manifests for a middleware solution, so take the above with some salt.
|
# ? Mar 19, 2024 02:57 |
|
Volmarias posted:I've made a terrible mistake and started playing Sixty Four, (which I encourage no one else in this thread to do but that's aside the point,) and it got me to thinking about how to solve the question of "what is the most efficient way to place your machines so that they can crush blocks the fastest?" I'm not really sure I understand the game as you've described it, but, you may wish to look at how Factorio levels were solved with successive iterations of a SAT solver. To give you a sense of how you might want to buid up constraints, I imagine you'd want to encode what your post described into logical statements in a manner similar to how they do it. I had an earlier post that described how to use such a solver for a simpler game but I can't seem to find the post. edit: aha, here it is, but I don't think you gain much by using any of the solver's non-boolean theories so I donno if this is actually useful to you. Volmarias posted:This feels like an NP or worse problem Dijkstracula fucked around with this message at 15:43 on Mar 19, 2024 |
# ? Mar 19, 2024 15:41 |
|
|
# ? Apr 30, 2024 09:00 |
|
Dijkstracula posted:I'm not really sure I understand the game as you've described it, but, you may wish to look at how Factorio levels were solved with successive iterations of a SAT solver. To give you a sense of how you might want to buid up constraints, I imagine you'd want to encode what your post described into logical statements in a manner similar to how they do it. E: Nope, this is actually a different problem. This solves the question of "is it possible to take these X conveyor belts, with Y required splits, and fit it into space Z (and if so, how)" My question is "given object types A, B, C, D, which interact with each other in certain ways, whose cost is exponentially increasing per object of that type used, what is the most efficient way to place them on this 2D grid?" I can come up with an arrangement myself, but it's not necessarily the optional one. There are no specific constraints on how much space is used, but there is a constraint on the number of objects of type A used. As a concrete example, this is what I actually originally wanted to solve: https://sixtyfour.game-vault.net/wiki/Endgame_Irradiator_Setup If I can only place 10 irradiator buildings due to their cost, is this the most efficient form to place them in, 2 at a time? Or is there another, more efficient configuration? Volmarias fucked around with this message at 16:32 on Mar 19, 2024 |
# ? Mar 19, 2024 16:22 |