ossu / computer-science

🎓 Path to a free self-taught education in Computer Science!
MIT License
172.71k stars 21.81k forks source link

ops-class.org 's assignments are extremely difficult for me. #633

Closed tcmhoang closed 4 years ago

tcmhoang commented 4 years ago

As the title indicates, I understood the concept he taught in the video and the problems I needed to solve but as soon as I started coding in ASST1. My mind went blank and I could not understand the struct, the syntax that they implemented like kstrdup(name), HANGMAN_LOCKABLEINIT(&lock->lk_hangman, lock->lk_name);

sometimes I saw a parameter like void * in locktestthread(void *junk, unsigned long num)

I have a basic understanding in C but the whole code file seemed very intimidating to me.

Does anyone have any advice for me to improve this situation? Every suggestion will be appreciated !

waciumawanjohi commented 4 years ago

@Artlist-creator It sounds like you are saying that you have a basic understanding of C, but taking this OS course you have found that you need a stronger foundation in the language. So, how do you gain that foundation? I suggest a class focused on C!

My favorite such class has sadly been discontinued. I have hopes that the course will be offered again in some form.

Have you taken the recommended precursor to core systems, the early lessons in CS50?

When I am looking for a recommendation for classes that focus on a specific programming language, I always check out hackr.io. The page for C can be viewed here.

Hopefully this gives you some resources that you can use to get more comfortable in C, so that when you come back to the ops-class you can focus just on the content of the course, not on the syntax.

tcmhoang commented 4 years ago

@waciumawanjohi Thank you so much for your advise. May be I should focus on C first. I am taking CS 250 Computer Architecture in Duke. Do I really have to take CS50 in edx? The course's name make me hesitated. I am looking forward to hearing from you.

waciumawanjohi commented 4 years ago

The reason CS50 is recommended is because it is an intro level course that teaches C programming, including memory pointers. The recommendation is to only take the first part of the course until it deviates away from C. For you, I think you should review the syllabus and see if the topics covered are ones that you are comfortable with, or ones with which you need practice.

spamegg1 commented 4 years ago

Hello Artlist-creator,

It's really not your fault and I would bet it's not your lack of understanding C either. That course is way too extremely difficult and obscure. They do a really terrible job at explaining things. They deliberately obscure things and avoid explaining because "you are supposed to do it yourself". I have watched every single "recitation" video they put there to get some clues, they all keep repeating the same unhelpful "I'm not gonna give away the answer" explanation. My guess is that taking another course in C is not going to help you in Hacking The Kernel course.

In particular the codes you mentioned above have NOTHING to do with a better understanding of C. The HANGMAN_LOCKABLE code is something that the authors of the kernel simulation code wrote, you are not supposed to understand that. It's just there for super technical complicated reasons. I have never used any of the FULLY CAPITALIZED functions.

The kstrdup(name) is just a "kernel version" of the strdup function from C that the authors wrote. Again you do not need to fully understand it, it just allows you to allocate some memory for a string. It's boilerplate code you will have to copy into some of your own definitions.

And you are still only on ASST1... Wait until you get to ASST2 and ASST3. You're gonna wanna bang your head against a wall. In ASST3 they give you NO CODE WHATSOEVER and expect you to DESIGN YOUR OWN virtual memory system from scratch and write 2000+ lines of code into a 30000 line code base with no help, only some vague explanations of "what it is supposed to do."

I spent 6 months on that class and eventually gave up after finishing ASST2. I even "cheated" and looked at other people's solutions on Github, but even that was completely impossible to progress on. Believe me, a "better understanding of C" is not going to help. Other C courses don't include super complicated kernel code.

I am not saying these to further intimidate you. I'm saying that it's not your fault. I am trying to spare you the pain, as someone who already went through it. That course is TERRIBLY DESIGNED and exists purely thanks to its NOTORIETY ("super hard Harvard CS course", "the course that broke Mark Zuckerberg and made him drop out" etc. You can actually see this class in the movie "The Social Network".)

My advice would be: finish ASST1 (not too difficult; ignore code you don't understand, only focus on the "blanks" that you are supposed to fill), take a look at the rest, and if it's too incomprehensible then just move on to the next course. Don't waste months like I did.

I believe this course should be either removed or put into Advanced Systems. It is BY FAAAAAAAAR the hardest course in the entire curriculum. It's much harder than even Advanced Applications, or even Specializations.

starry-m commented 4 years ago

I am so sorry for it.I have gained another course.Thanks for your care.

---Original--- From: "spamegg"<notifications@github.com> Date: Sun, Feb 16, 2020 19:53 PM To: "ossu/computer-science"<computer-science@noreply.github.com>; Cc: "Subscribed"<subscribed@noreply.github.com>; Subject: Re: [ossu/computer-science] ops-class.org 's assignments are extremely difficult for me. (#633)

Hello Artlist-creator,

It's really not your fault and I would bet it's not your lack of understanding C either. That course is way too extremely difficult and obscure. They do a really terrible job at explaining things. They deliberately obscure things and avoid explaining because "you are supposed to do it yourself". I have watched every single "recitation" video they put there to get some clues, they all keep repeating the same unhelpful "I'm not gonna give away the answer" explanation. My guess is that taking another course in C is not going to help you in Hacking The Kernel course.

In particular the codes you mentioned above have NOTHING to do with a better understanding of C. The HANGMAN_LOCKABLE code is something that the authors of the kernel simulation code wrote, you are not supposed to understand that. It's just there for super technical complicated reasons. The kstrdup(name) is just a "kernel version" of the strdup function from C that the authors wrote. Again you do not need to use those functions yourself directly (at least in ASST1).

And you are still only on ASST1... Wait until you get to ASST2 and ASST3. You're gonna wanna bang your head against a wall. In ASST3 they give you NO CODE WHATSOEVER and expect you to DESIGN YOUR OWN virtual memory system from scratch and write 2000+ lines of code into a 30000 line code base with no help, only some vague explanations of "what it is supposed to do."

I spent 6 months on that class and eventually gave up after finishing ASST2. I even "cheated" and looked at other people's solutions on Github, but even that was completely impossible to progress on. Believe me, a "better understanding of C" is not going to help.

I am not saying these to further intimidate you. I'm saying that it's not your fault. I am trying to spare you the pain, as someone who already went through it. That course is TERRIBLY DESIGNED and exists purely thanks to its NOTORIETY ("super hard Harvard CS course", "the course that broke Mark Zuckerberg and made him drop out" etc. You can actually see this class in the movie "The Social Network".)

My advice would be: finish ASST1 (not too difficult; ignore code you don't understand, only focus on the "blanks" that you are supposed to fill), take a look at the rest, and if it's too incomprehensible then just move on to the next course. Don't waste months like I did.

I believe this course should be either removed or put into Advanced Systems. It is BY FAAAAAAAAR the hardest course in the entire curriculum. It's much harder than even Advanced Applications, or even Specializations.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Alaharon123 commented 4 years ago

It's worth noting that on campus, the course is curved hard because it's a notoriously hard and time consuming course. The wiki recommends this book alongside it http://pages.cs.wisc.edu/~remzi/OSTEP/

spamegg1 commented 4 years ago

@codeisbeauty-m Glad to help! Save yourself 6 months and pain and suffering.

@Alaharon123 That textbook is AMAZING! I actually had to stop taking the HTK course (lectures/recitations are AWFUL) and instead spent a few weeks reading the book from cover to cover and doing all the homework/coding assignments, and checking with the solution codes on the author's website. Not only it explains concepts FAR BETTER than the course, it is also a FREE TEXTBOOK! I learned far more in 2-3 weeks of that book than the 6 months I wasted trying to do the assignments in HTK. And believe me, I totally understand all the concepts very very well. Doing the assignments has nothing to do with understanding.

I know all about the "notoriety" bullshit. I taught college math for 10 years. It's meaningless infliction of pain and suffering turned into "tradition". I've had it inflicted on me by asshole professors in graduate classes. "Notoriety" and "difficulty" is used as excuses for bad design, bad teaching, poor learning.

The HTK course could be made soooooo much easier by just a little bit more effort on their part. Follow in the foot steps of OSTEP, break down the gigantic monolithic programming assignments into smaller chunks, help the student by providing some skeleton code, "fill in the blanks" type of stuff like in ASST1, that's it.