Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

rarbatrol posted:

Well it probably doesn't compile without the quotes!

Does "int 1 = 0" compile even with the quotes?

Adbot
ADBOT LOVES YOU

Beef
Jul 26, 2004
The real horror is homework assignments being graded in a university-level course.


Related to a few pages back: If you use threads for parallelism, you are doing it wrong. I had many fun discussions on the difference between concurrency and parallelism, so bring it on bitches.

Athas
Aug 6, 2007

fuck that joker

Beef posted:

The real horror is homework assignments being graded in a university-level course.

Is the horror that there is assignments, or that it affects the final(?) grade?

Beef posted:

Related to a few pages back: If you use threads for parallelism, you are doing it wrong. I had many fun discussions on the difference between concurrency and parallelism, so bring it on bitches.

Agreed. Although when doing cluster programming, you have little choice but to spawn a bunch of processes that use MPI.

feedmegin
Jul 30, 2008

Internet Janitor posted:

Apparently the fact that my assignments were entirely new had foiled his plan, and his inevitable failure of this class combined with academic probation for previous failures placed him in danger of expulsion from the degree program. He spent a solid 20 minutes of the final exam on his knees begging me to give him a D and let him pass the course until I threatened to call campus security and have him escorted out of the building. It was the most pathetic thing I've ever seen.

And this guy is probably now writing stuff that contributes to this thread for six figures a year at a Silicon Valley startup :ohdear:

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Beef posted:

The real horror is homework assignments being graded in a university-level course.

Sadly, universities are now being required to do a lot of the stuff that high schools used to do, viz. teaching students that they're responsible for making certain they get poo poo done on time. If students already knew that going into university, then you wouldn't need graded homework assignments, but they need the extra warning (and kick in the pants re: said warning applying to their final grade) if they're to learn.

Plenty of upper-level courses only grade you based on major projects/exams, because the profs don't want to spend every day grading any more than the students want to spend every day on little toy problem sets.

Absurd Alhazred
Mar 27, 2010

by Athanatos
My undergrad in the 2000's had graded homework. It was usually a small portion of the course grade (mostly final and midterm), but it was still there. Some of the more advanced classes either had no homework or they were optional, but I really don't see why that's indicative of a high school mentality.

Hughlander
May 11, 2005

Beef posted:

The real horror is homework assignments being graded in a university-level course.


Related to a few pages back: If you use threads for parallelism, you are doing it wrong. I had many fun discussions on the difference between concurrency and parallelism, so bring it on bitches.

My Undergrad had a weeder course in CS with homework assignments that took on average 40 hours of time to complete. They were due every other week, with a lab that took about 40 hours to complete in the off hours. See: Weeder.

TenaciousTomato
Jul 17, 2007

Interworld and the New Innocence
My computer organization and architecture class had a whopping total of 3 graded assignments last semester. Then, there was bonus points for uploading one lecture's worth of notes. Those points were worth as much as the midterm exam. :wtc:

Whereas, my Data Structures class had 10+ labs, 7 homework assignments out of the book, in addition to programs we had to turn in, and 2 exams. She graded all of our work by the deadline.

What I'm saying is some professors just plain old don't want to grade homework so they assume you know what you are doing. Problem is, if you bomb either exam, you're boned. On the other hand, some professors will assign (and have to grade) lots of work so the student has to do it, or their grade will reflect that. Homework or no homework, the most important thing is the professor using an appropriate grading scale (ie. do not count scanned notes as the same amount as an exam).

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

rarbatrol posted:

Well it probably doesn't compile without the quotes! It's very possible he's gotten by that far through plagiarism; I learned very late in my education that most of my classmates had been given working solutions to many of their assignments, handed down through generations of slackers.

for cs at my school their network drives are indexed by google (because all their department websites are just hosted from the network storage, lol) so you can literally find people's projects on google if they were too dumb to put them in private directories. but, beware the quality of work by someone who doesn't know how to use the private directory.

ErIog posted:

Wow, you're actually at a place that teaches hands-on stuff during first year of undergrad? Is that common?

2nd year undergrad students being useless was the norm where I went since the first year was filled with liberal arts prereqs, and the small number of courses first year students took in any major were just overview, history of the field, and light theory.

the intro to programming course where i went is literally implementing all the basic data structures in java (lists, trees, etc). what on earth would you have a freshman cs student doing otherwise?

Absurd Alhazred
Mar 27, 2010

by Athanatos

Hughlander posted:

My Undergrad had a weeder course in CS with homework assignments that took on average 40 hours of time to complete. They were due every other week, with a lab that took about 40 hours to complete in the off hours. See: Weeder.

To this day, the only type of challenge I can pull all-nighters for is programming tasks (in my PhD years, mostly involving getting images or formatting to work just right in LaTeX), and I credit (?) it to programming homework having me meet the janitors as I stumble out of the computer lab early in the morning.

Volte
Oct 4, 2004

woosh woosh
We had a lot of homework in our algorithms class (probably the weeder class in my program) that was by-hand computation of algorithms where you had to do like 100+ steps of tree algorithms and display all intermediate steps. Peoples' hands were crippled by the end. Few finished them all. Or they could have spent one evening implementing the algorithms in a programming language of their choice and outputting graphviz visualizations and LaTeX tables at every step. :c00l: Same for the later architecture class that involved a fake assembly language and having to 'execute' (by-hand) a relatively long assembly program and display the state of every internal register and flag at every step. 200 LOC of Haskell and bam, full simulator that does my homework for me. Work smart, not hard. Never work hard.

fritz
Jul 26, 2003

I'm sitting here all :stare: at you people who didn't have homework in college (I had homework all throughout grad school).

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

Volte posted:

We had a lot of homework in our algorithms class (probably the weeder class in my program) that was by-hand computation of algorithms where you had to do like 100+ steps of tree algorithms and display all intermediate steps. Peoples' hands were crippled by the end. Few finished them all. Or they could have spent one evening implementing the algorithms in a programming language of their choice and outputting graphviz visualizations and LaTeX tables at every step. :c00l: Same for the later architecture class that involved a fake assembly language and having to 'execute' (by-hand) a relatively long assembly program and display the state of every internal register and flag at every step. 200 LOC of Haskell and bam, full simulator that does my homework for me. Work smart, not hard. Never work hard.

On the one hand that sounds like a stupid and bad way to teach things to people, but on the other hand there may be a profound lesson about the nature of problem solving in there. Having the mentality of a programmer means always preferring to spend two hours writing a program that solves a task you could've done manually in one hour. If it's something you're doing professionally the "smart" approach is worth it because of the extra flexibility it gives you later, and if it's for school or just for fun it's worth it because of the peace of mind it gives you. In your case maybe you saved both time and effort (and got a better result), but often the tradeoffs are a little trickier to define. The hard part is knowing roughly how long the smart approach will take compared to the dumb one. If the smart approach is only a little slower it's always the superior choice, but sometimes you waste a lot of time trying to be smart when brute forcing the problem would've been more efficient.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

LOOK I AM A TURTLE posted:

Having the mentality of a programmer means always preferring to spend two hours writing a program that solves a task you could've done manually in one hour...

You keep using absolutes where they are unwarranted. The more general formulation of what you're saying is "if you can save time by writing a tool, you should write that tool". But that conditional is loving important. If it's going to take me twenty minutes to get my pattern-matching regex just right to pick out the strings from this 2k-line file, and it'll take me 10 minutes to just read the file and do it manually, and I realistically never expect to need this regex again, then I should just do the thing manually.

I mean, this sounds simplistic, but speaking from personal experience, I really did have a problem when I first started working in industry of refusing to do things manually -- if there wasn't a tool that would do it automatically, I would fixate on creating that tool, rather than on doing the task that I was actually supposed to be doing. Thing is, your job is to accomplish tasks, not to write tools. Sometimes (hopefully, most of the time) your tasks are to write tools, but sometimes poo poo just needs to get done as a one-off, and you should do that poo poo rather than try to "keep your hands clean" or something by teaching the computer to do it for you.

Put another way, nobody cares if you wrote a log parser that can be used to generate reports, if it means that the report you were supposed to provide yesterday is now late.

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

TooMuchAbstraction posted:

You keep using absolutes where they are unwarranted. The more general formulation of what you're saying is "if you can save time by writing a tool, you should write that tool". But that conditional is loving important. If it's going to take me twenty minutes to get my pattern-matching regex just right to pick out the strings from this 2k-line file, and it'll take me 10 minutes to just read the file and do it manually, and I realistically never expect to need this regex again, then I should just do the thing manually.

I mean, this sounds simplistic, but speaking from personal experience, I really did have a problem when I first started working in industry of refusing to do things manually -- if there wasn't a tool that would do it automatically, I would fixate on creating that tool, rather than on doing the task that I was actually supposed to be doing. Thing is, your job is to accomplish tasks, not to write tools. Sometimes (hopefully, most of the time) your tasks are to write tools, but sometimes poo poo just needs to get done as a one-off, and you should do that poo poo rather than try to "keep your hands clean" or something by teaching the computer to do it for you.

Put another way, nobody cares if you wrote a log parser that can be used to generate reports, if it means that the report you were supposed to provide yesterday is now late.

I don't disagree with any of this, and I think it's more or less the same thing I was trying to say with the last sentence of my other post except I said "always" when I should've said "usually". I didn't mean to imply that having the "mentality of a programmer" is always a good thing, although I can see why it looked that way. I'm also guilty of overthinking things sometimes, but I do think it's usually worth spending a little extra time to solve a problem more generally. How much extra time is too much will depend on the circumstances, obviously.

In Volte's post it seems pretty clear that writing a program was less work, took less time and was probably more accurate than doing the job manually so there's really nothing to discuss there, but I think the general principle is interesting because it's kind of what lies at the very heart of engineering.

Hughlander
May 11, 2005

LOOK I AM A TURTLE posted:

On the one hand that sounds like a stupid and bad way to teach things to people, but on the other hand there may be a profound lesson about the nature of problem solving in there.

The point of a weeder isn't to teach things to people. The point is that the course is taught in the largest hall the University has, 750+ people enrolled, and the major has facilities for 100 per year. Spend the first year narrowing down that 1500 to 100. Why yes this was the Dot-Com era...

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

LOOK I AM A TURTLE posted:

I don't disagree with any of this, and I think it's more or less the same thing I was trying to say with the last sentence of my other post except I said "always" when I should've said "usually". I didn't mean to imply that having the "mentality of a programmer" is always a good thing, although I can see why it looked that way.

Yeah, sorry, my post was mostly meant as a screed against people like Past Me who are pathologically incapable of just doing a job. There's a reason my handle is Too Much Abstraction.

Beef
Jul 26, 2004

Athas posted:

Is the horror that there is assignments, or that it affects the final(?) grade?
The latter. That said, I also had (and gave) programming project assignments that were part of the final scoring, but those were typically semester or year spanning affairs. The weeder math classes (Belgium has stupid low tuition fees and no entrance exams) had the only mandatory exercise classes, but still did not count the homework assignments for the final grade.

quote:

Agreed. Although when doing cluster programming, you have little choice but to spawn a bunch of processes that use MPI.

MPI is not threading :ssh: MPI is like the anti-thread, most MPI implementations are not even thread safe. Those that are need some serious hoop jumping to actually load the mp-version. I had some fun times tracking down subtle MPI bugs that were caused by linking an mp-safe version not actually using the mp-safe version at runtime :allears: That said, it's becoming more poopular to parallelize inside an MPI rank using OpenMP, but those are still not doing MPI calls inside parallel sections.

The threads comment was more to highlight that directly using (p)threads to achieve a parallel speedup is a pretty big red flag. It is so hard to get right (NUMA, thread pinning, weak memory models) let along fast enough and there are tons of good libraries and frameworks (OpenMP, TBB, CilkPlus, ...) that make sure you do not have to directly deal with threads. Seeing someone directly dealing with pthreads for doing parallel work either _really_ knows what he is doing (and probably working on a library/framework) or _really_ does not know what he is doing.

Jewel
May 2, 2009

:allears:

https://twitter.com/c_nich/status/734203210043293697/photo/1

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



LeftistMuslimObama posted:

the intro to programming course where i went is literally implementing all the basic data structures in java (lists, trees, etc). what on earth would you have a freshman cs student doing otherwise?

Then do them recursively :) We had a maze solving one - that was kinda fun.


Beef posted:

The latter. That said, I also had (and gave) programming project assignments that were part of the final scoring, but those were typically semester or year spanning affairs. The weeder math classes (Belgium has stupid low tuition fees and no entrance exams) had the only mandatory exercise classes, but still did not count the homework assignments for the final grade.

On the one hand "oh god my test anxiety :psyboom:" but on the other I guess if I didn't have a then-unimaginable sum of money at stake the test might not make me so anxious.

Beef
Jul 26, 2004

quote:

what on earth would you have a freshman cs student doing otherwise?

Some examples of first year CS student programming projects that I was a TA for:
- cellular automaton generator/builder
- tamagochi (using microcontroller + sensors + buttons)
- mini dance-dance revolution game (microcontroller again + buttons + nokia screen)
- model train control system + GUI

The barrier in doing cool stuff for first year students is
A) language accidental complexity and
B) TA time and effort.

Starting in some educational language (Scheme in our case, Python is used for non-CS students as a compromise between industry-relevant and educational) means you can assign 100% of the student's brain power to learning the basics, without any of that 'ignore that static string main thing for now' bullshit. Anything that gets in the way of the student typing '1+1' and getting '2' makes it slower to learn actual programming essentials. Getting them to grok recursion/iteration and lexical scoping is the most crucial in my experience. You can always spice that up by having them manipulate family trees or something, who the gently caress would enjoy reimplementing the java standard library datastructures :suicide:.
B) is essentially the effort you need to put into working away the accidental complexity that stands in the way of doing fun stuff. We managed to have students program microcontrollers using Scheme by spending way too much time modifying and extending an ARM7 Scheme interpreter. But in the end they could just do "(put-pixel 39 488)" or "(set-pin! Button-1)" over a tty to get stuff done.



All I'm saying is, Java for freshmen CS is the real horror here.

xzzy
Mar 5, 2009

The real issue with Java in university is for a long chunk of time, any time you hired a new CS grad it took almost a year to train them away from thinking Java was the hammer that fixed EVERYTHING. Needed a web page to schedule downtimes? Java applet! Needed to rotate some logs? Java! Wipe your rear end? Java!

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Our freshman CS classes did a little bit of everything, from basic loops and control to basic data structures to unit tests to 2D drawing to GUIs to multithreading, all Java when I was there. They were basically surveys so that none of the basics were completely new when it came time to do data structures or networks etc.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

xzzy posted:

The real issue with Java in university is for a long chunk of time, any time you hired a new CS grad it took almost a year to train them away from thinking Java was the hammer that fixed EVERYTHING. Needed a web page to schedule downtimes? Java applet! Needed to rotate some logs? Java! Wipe your rear end? Java!

I've spoken with a number of profs from my alma mater about this, and one of the things they pointed out is that the intro CS courses aren't just for CS students. If you're going to be a physicist, biologist, chemist, engineer, etc. nowadays you need to know how to code, and you can only spare one or maybe two courses to acquire that knowledge in. So they had to make language decisions based on what was best for STEM students as a whole, not just CS students. For a decently long while, the best language option was Java, precisely because it's so domain-agnostic. Nowadays they use Python.

Mind you, our first CS course was a basic "learn to program", but our second was a language survey course, which spent 2-4 weeks on each of a bunch of different languages.

ExcessBLarg!
Sep 1, 2001
The appeal of Java to educators is a lot of what has made it appealing to enterprise: long-term support for language versions, ownership by a not-going-anywhere company, and sustaining market relevance. This allows them to build a curriculum around Java that will remain generally relevant for five, maybe ten years. This is especially appealing to textbook publishers who don't have to constantly make changes to appeal to the whims of Van Rossum (of course, they do like to publish updates, but not material changes).

Both Python and Scheme (and many other) languages are far better than Java to teach at an introductory level from a pedagogical perspective.

ExcessBLarg!
Sep 1, 2001

TooMuchAbstraction posted:

I've spoken with a number of profs from my alma mater about this, and one of the things they pointed out is that the intro CS courses aren't just for CS students.
Some programs have "CS for non-majors" for precisely this reason. It might also be better to have a programming course taught in Sciences or Engineering departments that's not actually listed as a CS course.

Fortunately Python does have a lot of overlap these days and is a reasonably decent language. Ten years ago there was a good chance that an engineer might learn programming exclusively with MATLAB.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

ExcessBLarg! posted:

Ten years ago there was a good chance that an engineer might learn programming exclusively with MATLAB.

There is no :gonk: that is :gonk: enough.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

TooMuchAbstraction posted:

There is no :gonk: that is :gonk: enough.

My wife took a programming class for civil engineers that was taught in MathCAD.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Beef posted:

who the gently caress would enjoy reimplementing the java standard library datastructures :suicide:

Definitely not Google

Absurd Alhazred
Mar 27, 2010

by Athanatos

ExcessBLarg! posted:

Ten years ago there was a good chance that an engineer might learn programming exclusively with MATLAB.

Heh. 10+ years ago the intro to programming for Aerospace Engineer at my alma mater was in FORTRAN.

yippee cahier
Mar 28, 2005

Munkeymon posted:

Definitely not Google
:lol:
:golfclap:

Beef
Jul 26, 2004

Munkeymon posted:

Definitely not Google

:boom:

Goddamn

And get the pleasure of getting sued for about 6b.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

ExcessBLarg! posted:

The appeal of Java to educators is a lot of what has made it appealing to enterprise: long-term support for language versions, ownership by a not-going-anywhere company, and sustaining market relevance.

Mind you, Java's owner did go somewhere, and Oracle could easily have put all of Java on life support the way they did client-side Java or various server products.

ExcessBLarg!
Sep 1, 2001

Subjunctive posted:

Mind you, Java's owner did go somewhere, and Oracle could easily have put all of Java on life support the way they did client-side Java or various server products.
Perhaps, but it would have been silly for them to do that. People actually care about Java on the backend, but not applets. Similar to how Oracle didn't actually kill MySQL

Personally I'm not a fan of a language "owned" by a single company (and coincidentally the very one pushing for a strict definition of ownership in the courts). But given how Pascal (died in industry) and C++ (fragmented feature support across vendors and historically slow standardization process) worked out, I can understand why Sun's control of and commitment to Java was appealing at the time.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
Why, yes, xCode: having to use invisible spacer views to get auto-layout to distribute three things with equal spacing makes a whole bunch of sense! What a really swell design decision that was.

Toady
Jan 12, 2009

PT6A posted:

Why, yes, xCode: having to use invisible spacer views to get auto-layout to distribute three things with equal spacing makes a whole bunch of sense! What a really swell design decision that was.

Take a look at UILayoutGuide/NSLayoutGuide.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Toady posted:

Take a look at UILayoutGuide/NSLayoutGuide.

Those are only available programmatically, not through Interface Builder for some reason. Perhaps I should just stop using Storyboards altogether, but ultimately using dummy views is faster even if it's a fairly inelegant solution.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

PT6A posted:

Why, yes, xCode: having to use invisible spacer views to get auto-layout to distribute three things with equal spacing makes a whole bunch of sense! What a really swell design decision that was.

UIStackView

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

pokeyman posted:

UIStackView

Welp, apparently I'm the coding horror.

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
foo.split(""[0]);

Where do people come up with these crazy ideas?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply