i already thought that javascript was terrible, but holy gently caress this book is eye opening
|
|
# ? Jan 7, 2013 05:09 |
|
|
# ? Jun 11, 2024 11:08 |
|
Toady posted:stack memory, references, and so on aren't taught from the start, so it's a bunch of fundamentals dumped suddenly into people's laps via ugly memory diagrams that look as complicated and computer sciencey as possible One of the many problems with explaining pointers within a language like C(++) is having to deal with things like code:
EDIT: Having to learn about stack vs. heap, how stack frames work wrt function calls, the concept of function calls themselves, or even just how assignment works is hard for many people. Trying to teach all of this at once in an introductory CS course is a good way to cut your numbers down quickly, but it in no way separates the bad from the good. Instead, teach a Python or a Ruby and ways to deconstruct problems in the intro course; leave pointers to a data structures or architecture class. There's this habit of engineers/science types/etc. to look down on people who don't immediately grok concepts in their particular field, when usually their understanding comes from previous experience. If you don't shame these people (like in every other discipline) you usually find that they can/will do as well as the people who knew all of the introductory information beforehand. FamDav fucked around with this message at 05:40 on Jan 7, 2013 |
# ? Jan 7, 2013 05:19 |
|
Stanford has a course dedicated 100% to explaining the concept that programs run on hardware
|
# ? Jan 7, 2013 06:45 |
|
i had a course like that, they teach you about processor clocks and ram chips and stuff but my course was hilariously outdated and taught by a really old guy. the labs were in GNU-ARM assembly, I couldn't find any trace of the software we were using on google, and I remember the prof saying something like "so then these ram modules get chained together to make huge reserves of ram, 64 megabytes, maybe even more in modern pcs"
|
# ? Jan 7, 2013 06:48 |
|
Socracheese posted:i had a course like that, they teach you about processor clocks and ram chips and stuff the computer architecture course is taught by this greek prof who mumbles the last part of every sentence, thank god i never had to take that one
|
# ? Jan 7, 2013 06:51 |
|
FamDav posted:Diffeqs was fun because there were a bunch of bio or chem or whatever people in it and they were all bad at math. chemistry people aren't bad at math <>
|
# ? Jan 7, 2013 07:43 |
|
college status: accidentally enrolled in a java security class, too late to fix that. barely know any java. should be fun.
|
# ? Jan 7, 2013 08:13 |
|
I wrote a sudoku solver in Dylan, and it's a pretty nice language overall, but prefix-dylan would probably be a lot nicer. With deeply nested function calls I think it's easier to read when the brackets delimit complete function calls rather than just the arguments. The verbosity is a turn-off, too, and if you're using lots of lambdas then having those 'end's sprinkled everywhere looks pretty bad. Even for a simple (contrived) example, I thinkcode:
code:
Obviously I'm just sperging about silly syntax things, and it's a really nice language in the ways that actually matter, but it's just super ugly compared to how it would look with a less verbose and more Lispy syntax.
|
# ? Jan 7, 2013 08:28 |
|
so i tried a lisp that wasn't lisp and wanted lisp
|
# ? Jan 7, 2013 09:52 |
|
tef posted:so i tried a lisp that wasn't lisp and wanted lisp do your parents know you are lispian?
|
# ? Jan 7, 2013 13:00 |
|
https://github.com/billiob/bfb/blob/master/code.bfpp
|
# ? Jan 7, 2013 13:18 |
|
how long has it been since someone pointed out perl owns? cause perl owns.
|
# ? Jan 7, 2013 17:34 |
yeah
|
|
# ? Jan 7, 2013 17:35 |
|
EVGA Longoria posted:perl owns.
|
# ? Jan 7, 2013 17:44 |
lol if you code your irc bots in anything but perl
|
|
# ? Jan 7, 2013 17:49 |
|
perl's pretty cool. its back burner for me this spring though. its java time
|
# ? Jan 7, 2013 17:50 |
Jonny 290 posted:perl's pretty cool. its back burner for me this spring though. its java time you'll be back before long, and when you are, don't expect any special treatment from us.
|
|
# ? Jan 7, 2013 17:52 |
|
Notorious b.s.d. posted:i never understood what was so hard about pointers. if pointers are hard, how do people manage to learn java or perl or whatever, where almost everything is a pointer all the time Because most programming courses go something like this: * Hello World * 100 bottles of beer * Variables are allocated on the stack and pointers reference data allocated on the heap, to allocate memory on the heap use malloc and release it with free. Go implement a red-black tree * Everyone who doesn't already know how to program drops out. Of course in a non-C course it goes more like: * Hello World * 100 bottles of beer * This language doesn't have pointers, rejoice because we have freed you from the tyranny of malloc and free. Go implement a red-black tree * Everyone who doesn't already know how to program drops out.
|
# ? Jan 7, 2013 18:04 |
|
when is school going to be back in session so there will be people who want to talk about prolog again?
|
# ? Jan 7, 2013 18:49 |
|
Zombywuf posted:Because most programming courses go something like this: When is "Towers of Hanoi"?
|
# ? Jan 7, 2013 18:53 |
|
prefect posted:When is "Towers of Hanoi"? that's 102 because you need recursion
|
# ? Jan 7, 2013 18:54 |
|
prefect posted:When is "Towers of Hanoi"? At my uni it was in AI class. We used Prolog.
|
# ? Jan 7, 2013 19:05 |
|
Jonny 290 posted:perl's pretty cool. its back burner for me this spring though. its java time the other real perl developer here is starting to get on a groovy kick, so there's a good chance i'll be playing around with that before long, then i have to remember the bits of java i taught myself when i was a youngin and see how terrible it is
|
# ? Jan 7, 2013 19:56 |
|
OBAMA BIN LinkedIn posted:lol if you code your irc bots in anything but perl ps someone should take over the lovely perl irc bot i wrote years ago that lives in #cobol and a couple other channels probably because i don't feel like paying for my vps any more
|
# ? Jan 7, 2013 20:00 |
|
Sneaking Mission posted:when is school going to be back in session so there will be people who want to talk about prolog again? Prolog is p based. based god swag jerry rice cookin' cookin' cookin'.
|
# ? Jan 7, 2013 20:03 |
|
My guess is that people have more trouble with C and C++'s type notation for pointers and arrays than the concept of pointers themselves. I don't remember people in my class seeming to struggle too much with either allocating or deallocating or constructors and destructors except a few simple gotchas, but I remember them being annoyed by -> vs. . to access members of a struct/class, or trying to use arbitrary sized multidimensional arrays as arguments whatnot, and especially being tripped up in the bit where an array is a pointer but not really. Similarly, I remember people having a decent understanding of many data structures, but struggling with C++ to implement them more than anything. I'm thinking the problem with understanding pointers is more "how the hell does C and C++ do them" rather than "what are they?". I don't think the concept is extremely hard in either cases, but it is certainly harder in C and C++ than other languages.
|
# ? Jan 7, 2013 20:05 |
|
MononcQc posted:My guess is that people have more trouble with C and C++'s type notation for pointers and arrays than the concept of pointers themselves. I don't remember people in my class seeming to struggle too much with either allocating or deallocating or constructors and destructors except a few simple gotchas, but I remember them being annoyed by -> vs. . to access members of a struct/class, or trying to use arbitrary sized multidimensional arrays as arguments whatnot, and especially being tripped up in the bit where an array is a pointer but not really. This actually reminds me of Plangs the class, wherein the first thing we did in each language we looked at was implemented a BST. When we had to do it in say-ploos-ploos the entire class just shut down and assumed the fetal position. My one friend who is otherwise competent poo poo out this 300 line monstrosity of unworkable C++ trying to implement left pointer right pointer value.
|
# ? Jan 7, 2013 20:14 |
|
Pascal is probably a good language for teaching pointers
|
# ? Jan 7, 2013 20:17 |
objective c, where almost everything is a pointer
|
|
# ? Jan 7, 2013 20:21 |
it's a horrible first language through and what I learned on when i got back into programming
|
|
# ? Jan 7, 2013 20:22 |
|
Notorious b.s.d. posted:i never understood what was so hard about pointers. if pointers are hard, how do people manage to learn java or perl or whatever, where almost everything is a pointer all the time well theres some crazy pointer garbage sometimes where some code allocates a giant chunk of memory and does crazy things with pointer arithmetic and filling it where it does long *my_thing = ((long *)foo)[1]; thats not possible in java or p langs they restrict you to actually writing good code
|
# ? Jan 7, 2013 20:31 |
|
pointers are useless unless you're programming in some antiquated language that makes you manage your own memory
|
# ? Jan 7, 2013 20:33 |
|
Sometimes just to gently caress with people I check in member function pointers and they just fuckin stare in code review.
|
# ? Jan 7, 2013 20:33 |
|
like i had to explain to this old dude i work with (worked on tribes, p cool actually) where the variable declaration was.
|
# ? Jan 7, 2013 20:34 |
|
int (*gently caress) (char *c, const char * const *syntax[]);
|
# ? Jan 7, 2013 20:35 |
Tiny Bug Child posted:pointers are useless unless you're programming in some antiquated language that makes you manage your own memory
|
|
# ? Jan 7, 2013 20:37 |
also that is basically only C
|
|
# ? Jan 7, 2013 20:38 |
|
Suspicious Dish posted:int (HeteroEarth::*gently caress) (char* c, char const * const * syntax[]); better. Also member pointers are actually useful but they have similarly confusing syntax, e.g. C++ code:
FamDav fucked around with this message at 20:44 on Jan 7, 2013 |
# ? Jan 7, 2013 20:42 |
|
MononcQc posted:My guess is that people have more trouble with C and C++'s type notation for pointers and arrays than the concept of pointers themselves. I don't remember people in my class seeming to struggle too much with either allocating or deallocating or constructors and destructors except a few simple gotchas, but I remember them being annoyed by -> vs. . to access members of a struct/class, or trying to use arbitrary sized multidimensional arrays as arguments whatnot, and especially being tripped up in the bit where an array is a pointer but not really. Back when I learned C the biggest difficulty with pointers was simply that "*foo" is a value, "&foo" is a pointer to foo and "int *foo" is the declaration of a pointer to a value. I wonder how different the history of programming languages would be if "int &foo" was the syntax for pointer declarations.
|
# ? Jan 7, 2013 20:47 |
|
|
# ? Jun 11, 2024 11:08 |
|
best way to read C/C++ types: Clockwise/Spiral Rule
|
# ? Jan 7, 2013 20:49 |