|
A lot of early computer science education is useful lies, and then you spend the rest of your life learning you were lied too. But usefully.
|
# ? Apr 13, 2023 22:24 |
|
|
# ? May 25, 2024 17:34 |
|
lifg posted:A lot of education is useful lies, and then you spend the rest of your life learning you were lied to. But usefully. Fixed that for you. On a somewhat related note, those of you who get to write in modern languages don't know how good you have it. Our fresh-out-of-college hire doesn't understand binary and we've got a bunch of bit flags I've been trying to teach them about. They're making progress but its slow going. LLSix fucked around with this message at 22:30 on Apr 13, 2023 |
# ? Apr 13, 2023 22:27 |
|
Yeah, nothing special about CS here. If anything it's one of the fields where your undergraduate classes come closest to the truth.
|
# ? Apr 13, 2023 22:30 |
|
So what exactly is "useful" about learning about arrays vs lists, and then later finding out that most "lists" are actually arrays? I guess it's always useful to learn that the world is a gently caress and out to get you at every turn (except apparently Scala)
|
# ? Apr 13, 2023 22:53 |
|
Itaipava posted:So what exactly is "useful" about learning about arrays vs lists, and then later finding out that most "lists" are actually arrays? I guess it's always useful to learn that the world is a gently caress and out to get you at every turn (except apparently Scala) Linked lists are useful to learn about because they demonstrate concepts necessary to talk about trees.
|
# ? Apr 13, 2023 23:14 |
|
Itaipava posted:So what exactly is "useful" about learning about arrays vs lists, and then later finding out that most "lists" are actually arrays? I guess it's always useful to learn that the world is a gently caress and out to get you at every turn (except apparently Scala) A lot of early data structures are mostly useful because they're something you can build/use when you're still getting a grasp on the basic task of getting the computer to do what you want them to do. The real thing being taught is how to be a massive pedant.
|
# ? Apr 13, 2023 23:50 |
|
No I mean what's useful about the lying. Why do they call them lists if they are arrays??
|
# ? Apr 14, 2023 00:14 |
|
When you first learn about arrays v lists you’re only looking at a couple pieces of complexity, mostly time, and at a very theoretical level. The reason a programming language might store lists as arrays is because they’re dealing actual users and modern CPUs and such, and there’s a lot more factors to make trade offs with. Edit: didn’t see your post before I hit post. I dunno on that point.
|
# ? Apr 14, 2023 00:16 |
|
Itaipava posted:No I mean what's useful about the lying. Why do they call them lists if they are arrays?? it isn't lying. usually you're looking at standard list semantics, and being backed by an array is an implementation detail. same reason it's not lying to call it a heap even though it's backed by an array, and it's not lying to call it a hashmap even though collisions are backed by a list instead of next-bucket
|
# ? Apr 14, 2023 00:22 |
|
the reason is locality on them lists is poo poo, which is really a feature of modern compute
|
# ? Apr 14, 2023 00:22 |
|
Itaipava posted:No I mean what's useful about the lying. Why do they call them lists if they are arrays?? The semantics of how you interact with the data structure depend on what type it declares itself to be. In particular, lists provide easy resizing (by adding and removing elements), while arrays generally force the user to perform resizing manually.
|
# ? Apr 14, 2023 00:26 |
|
Fwiw in c# we first had ArrayLists which is an accepted synonym for a dynamic array but when they introduced the generic version they went with List<T>. I don't know why though.
|
# ? Apr 14, 2023 00:26 |
|
4 < 9
|
# ? Apr 14, 2023 00:27 |
|
Probably this. C# has generally avoided the really long namespace + class names of Java, maybe it's even a goal of the designers idk. Never really thought about it.
|
# ? Apr 14, 2023 00:29 |
|
prom candy posted:After reading that I've realized I don't know anything about programming or computers. same i realized 2 years in that i was never going to know anything about programming or computers and would get by on the equally useful skills of "has some common sense and ability to reason"
|
# ? Apr 14, 2023 00:36 |
|
Achmed Jones posted:it isn't lying. usually you're looking at standard list semantics, and being backed by an array is an implementation detail. same reason it's not lying to call it a heap even though it's backed by an array, and it's not lying to call it a hashmap even though collisions are backed by a list instead of next-bucket But then isn't this just goal-post-moving of what "standard list semantics" means? A new grad will think it means "oh lookup by index is linear, but eg insertion at the beginning is constant time"
|
# ? Apr 14, 2023 00:43 |
|
i mean insofar as any language changing is "goalpost moving" i guess are you doing a bit here? it sounds like you have fundamental problems with the way that words have meaning, that communities evolve standards, etc
|
# ? Apr 14, 2023 01:06 |
|
generally semantics of lists is not the internal behavior. it's operating on single items, having certain methods, having no upper bounds that needs to be changed manually, etc
|
# ? Apr 14, 2023 01:09 |
|
I thinking you're taking me more seriously than my meaning here but I do honestly, earnestly think it's interesting that the term "list" means one thing in undergrad and then something else (in some aspects with opposite semantics) in the "real world". You can go on about words having specific meanings in specific communities and all that jazz but my "bit" was just that observation.
|
# ? Apr 14, 2023 01:21 |
|
I would personally not assume any particular implementation of something called “list” like I might about one called “linked list”
|
# ? Apr 14, 2023 01:55 |
|
Happy page 2^9 fellow computer touchers
|
# ? Apr 14, 2023 02:07 |
|
Itaipava posted:I thinking you're taking me more seriously than my meaning here but I do honestly, earnestly think it's interesting that the term "list" means one thing in undergrad and then something else (in some aspects with opposite semantics) in the "real world". You can go on about words having specific meanings in specific communities and all that jazz but my "bit" was just that observation. Perhaps in an undergrad program that's based on what was hip 40 years ago and doesn't teach you anything other than Lisp. Every other undergrad program is going to be pretty clear on what a "list" is and how you can implement a "linked list" vs. other ways of doing it.
|
# ? Apr 14, 2023 02:17 |
|
cool kid lisp nowadays (clojure) has first class vectors and maps
|
# ? Apr 14, 2023 02:19 |
|
Tbh list is a stupid name for resizable array, so it fits that C# and Python both use it. OTOH then you look at C++ and that's even worse
|
# ? Apr 14, 2023 06:52 |
|
it's a list of items. ez
|
# ? Apr 14, 2023 11:05 |
|
Dehumanize yourself and return to Lisp dialects IMO.
|
# ? Apr 14, 2023 14:31 |
|
If you had to define a list, you'd probably want to describe it as a linear data structure, meaning that you can view all of the elements by starting at the head and looking at the next one. Arrays and linked lists are both specific implementations of lists and they come with methods that expose details of their implementations, but the abstraction is still there.
|
# ? Apr 14, 2023 14:59 |
|
Speaking of cool kid Lisp, the intro book for Scheme is still one of my favorite programming books. It's easy to read and learn from.
|
# ? Apr 14, 2023 16:13 |
|
little schemer is third party. sussman wrote the wizard book so thats de facto official intro
|
# ? Apr 14, 2023 16:16 |
|
Getting back into Java. Why create an interface and an Impl class where it's just 1:1 and you don't even implement the interface a second time? Always drove me nuts back in the day, seemed so stupid. Is there a way to get my IDE (VSCode) to go to the actual impl of the method? Getting this on a take home assignment. Seeing @Autowired a lot and then the ability to use the methods non-statically. Why is this better than just a static method? Like a service class that holds no state itself. Comb Your Beard fucked around with this message at 15:39 on Apr 19, 2023 |
# ? Apr 19, 2023 12:16 |
|
Comb Your Beard posted:Getting back into Java. Why create an interface and an Impl class where it's just 1:1 and you don't even implement the interface a second time? Always drove me nuts back in the day, seemed so stupid. Is there a way to get my IDE (VSCode) to go to the actual impl of the method? Getting this on a take home assignment. ctrl+F12 iirc? Anyway can't speak for Java but we do it in c# so we can mock the interfaces for testing. There are other ways to accomplish this but using interfaces for everything seems to be the default.
|
# ? Apr 19, 2023 12:35 |
|
Comb Your Beard posted:Getting back into Java. Why create an interface and an Impl class where it's just 1:1 and you don't even implement the interface a second time? Always drove me nuts back in the day, seemed so stupid. Is there a way to get my IDE (VSCode) to go to the actual impl of the method? Getting this on a take home assignment. In spring and other bean-heavy frameworks it’s a lot easier to just @Autowire an interface with a single impl bean registration than it is to instantiate and pass around instances of the impl.
|
# ? Apr 19, 2023 14:28 |
|
Blinkz0rz posted:In spring and other bean-heavy frameworks it’s a lot easier to just @Autowire an interface with a single impl bean registration than it is to instantiate and pass around instances of the impl. Oh yeah I just asked about autowired above. You can autowire a class instead though, yeah? And skip the 1:1 interface:class part?
|
# ? Apr 19, 2023 15:54 |
|
Anyone have advice for helping someone transition from Java to C (not C++, C)? We have a new hire straight out of college whose only experience is with Java and Javascript but our codebase is C89. They seem to be struggling with the concept of pointers especially. So far I've been having them run through hackerrank C exercises to build skills and confidence while I kibitz and advise. It seems to be going okay during our 1-on-1s but translating that into being able to make changes in our codebase has been pretty slow. The obvious thing would be to go over examples from our codebase with them, but that was the first thing I tried and they weren't able to read a simple 5 line function that returned the sum of a specific array in a passed in struct. We spent most of an hour on it and while they made enough progress to be able to make the necessary one line change, they didn't really internalize it. The new hire is fluent, but English is their second language, and I'm not sure how much is ESL problems and how much is programming stuff.
|
# ? Apr 19, 2023 16:29 |
|
LLSix posted:Anyone have advice for helping someone transition from Java to C (not C++, C)? Ask them about how a machine executes an instruction. The exercises won't build up a reasonable mental model for them. And to understand pointers, IMO it's easiest to understand how the machine is using them and what they mean. Have fun TA'ing a CS class.
|
# ? Apr 19, 2023 16:33 |
|
If you're looking for a project based approach, I'm not sure how you can get through http://emulator101.com/ or https://www.nand2tetris.org/ without understanding pointers.
|
# ? Apr 19, 2023 16:36 |
|
Yeah, I don't think there's a great way to get pointers that doesn't involve looking at how machines execute code. An undergraduate architecture class will work but it's probably overkill. The project-based approach is probably much better.
|
# ? Apr 19, 2023 16:40 |
|
Huge "old man yelling at clouds" vibe coming here, but: what the gently caress are they teaching in cs undergrad courses if graduates don't understand pointers coming out of it???
|
# ? Apr 19, 2023 17:03 |
|
colleges give the implicature real hard that they are quality control for people but they cannot give you a single nine of any reasonable quality that wasnt there before. including the putative ability and willingness to do scut work for 4 years that some peeps talk about, to be honest you get like 40% yield of actual learning from a college class. you can get that up to like 3 nines if you do intensive tutoring but that doesnt happen in stem land. in liberal arts land it happens sometimes but depends upon vicious exploitation of tutors bob dobbs is dead fucked around with this message at 17:17 on Apr 19, 2023 |
# ? Apr 19, 2023 17:14 |
|
|
# ? May 25, 2024 17:34 |
|
bob dobbs is dead posted:colleges give the implicature real hard that they are quality control for people but they cannot give you a single nine of any reasonable quality that wasnt there before. including the putative ability and willingness to do scut work for 4 years that some peeps talk about, to be honest Yeah, it's pretty much this. Colleges want to do quality control but outside the very top end they're so dependent on tuition revenue that they're really challenged to kick anyone out or even discourage them from attending. That's why you have to screen your new graduates so hard.
|
# ? Apr 19, 2023 17:25 |