Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

04-18-2018 , 07:56 PM
Quote:
Originally Posted by kerowo
I think it's like Algebra, some people have no problem with that substitution and some people just take forever to get past a letter being a number.


That’s not really what I meant though. I meant more that some people seem to think it’s a super critical CS concept that needs to be taught early and in great depth.

Substitution of letters for numbers in algebra is a core concept that needs to be understood early. I don’t think pointers are equivalent.

Edit: So to expand on that, I don’t think python is a bad teaching language because it obscures pointers (which I think is sort of arguable depending on how you look at it) because I don’t think explicit pointers are necessary to teach many core CS concepts.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 07:59 PM
Also this may be elitism but I think there are different paths for different types of programming learners. For someone who wants to do some programming as a hobby or to achieve some goal, you want to get them somewhere where they can Make Stuff pretty quick, web pages or desktop apps or little games or something, even if they don't understand huge parts of the system for a while.

For someone getting a CS degree, imo, this is a HUGE mistake. You need to start with the fundamentals. I would argue that pretty much any first semester data structures and algorithms class could be done in C with out any problem. And arguably the things that a language like python abstracts would not be useful at all, except perhaps for built in hashmaps. But how many first semester algorithms use hash maps?

Keep in mind that your introduction to algorithms are things like "sort an array of numbers in place", stuff that people used to do using *magnetic tape*. Or "calculate a fibonacci sequence" and stuff like that. For loops, while loops, and arrays are basically all you need for a semester or two.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:02 PM
FWIW I think golang is actually also a pretty good first choice
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:04 PM
Quote:
Originally Posted by RustyBrooks
For loops, while loops, and arrays are basically all you need for a semester or two.
I don't actually have strong opinions on any of these topics, but there's a solid argument that starting like this sets you down a certain type of path and thinking. Like how your native language influences how you think.

An alternative path would be focusing on simple functional programming and even using recursion.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:09 PM
I think the massive variety in CS programs is a factor here and what they want to achieve, for instance, at my school (@barrin6 can feel free to correct me on this) I felt was more theory based with some light application, at least the path I took.

The upper division for general CS where I go is almost entirely electives of your own choosing, and I happened to take a path that resulted in pretty much 0 programming outside of the occasional light assignment that required some pseudocode. This is my first quarter in 2 years where I've had to do a lot of programming. I went over a year without doing any programming at all.

Compare that to my lower divs which consisted almost entirely of programming assignments. I don't think it prepared me well for upper division at all, outside of my data structures class, which was a 4th semester course in which we implemented every basic data structure in C++ from scratch.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:17 PM
Totally agree on a lot of these choices depending on the program and what that program is trying to achieve.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:19 PM
I am totally the stereotypical CS grad that can't write a line of code. I don't think that should be an outcome for a good CS program either. I know my CS school is considered really good but I would hate to see the bad, because I have a lot to criticize.

thankfully I have 18 units of programming courses this quarter to shake off the rust before I start my job full time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:21 PM
Quote:
Originally Posted by jjshabado
I don't actually have strong opinions on any of these topics, but there's a solid argument that starting like this sets you down a certain type of path and thinking. Like how your native language influences how you think.

An alternative path would be focusing on simple functional programming and even using recursion.
Maybe. One of the first languages I worked in professionally was sort of a loosey-goosey languages that had some functional programming aspects. Very few people knew it so we'd typically hire programmers who knew other languages and teach them. Invariably everyone would start out writing programs in this language as if it were C, which ends up with bad/crappy/slow/long programs. After a few months, a light bulb would usually go off.

I worked with a bunch of people who all got a CS degree in Italy. Getting an undergrad in CS did not involve touching a computer. Computer Science is like 90% a branch of math really.

I wonder if there are any CS programs that have really dedicated themselves to starting with high level languages only and then working their way down. I've never seen it, usually I've seen the opposite. I dunno, maybe it would work.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:22 PM
Quote:
Originally Posted by RustyBrooks
I personally think people should start with C (not C++!) also. My first class was Pascal but they replaced it with C++ the next year. I actually don't think Java is a very good first choice because it has a lot of complicated and verbose syntax that makes the whole thing look more complicated than it is. C is very bare-bones syntax wise.
Pretty much my path when I was a CS undergrad. They taught us Pascal for data structures, alogorithms etc. to give us a little discipline and assembler to let us hit the metal. Once we had taken those on board they let us loose on C.

The combination meant we applied some good practices in our C code, while being able to easily understand what was going on underneath the hood when it came to pointers, function pointers, endian-ness and the like.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:26 PM
Regarding pointers and their importance, I know a lot of veteran programmers who are kind of hazy on the difference between the heap and the stack.

ETA: I don't mean the data structures called that, I mean the way that memory is stored in programs
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:28 PM
Quote:
Originally Posted by RustyBrooks
Regarding pointers and their importance, I know a lot of veteran programmers who are kind of hazy on the difference between the heap and the stack.

ETA: I don't mean the data structures called that, I mean the way that memory is stored in programs
wow, that seems kinda important because generally heap allocation is way slower than stack allocation, at least in C
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 08:36 PM
The dirty little secret of programming is that 90% of jobs do not require you to be able to write highly performant code. Usually there are other bottlenecks. I have spent way longer in my career optimizing SQL queries than I have optimizing code. It should be noted that the 10% of jobs which do require you to be able to do it are the lucrative ones, so I'm certainly not saying it's useless to know.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 09:33 PM
Quote:
Originally Posted by saw7988
What a ridiculous conversation. Verbose boilerplate code that doesn't need to be explained to beginners is like the last reason to choose a language
It's not only code verbosity and not knowing what you're typing, it's that Java shoves OOP down your throat, which eventually a new programmer has to unlearn if they want to do anything outside of Java/C# well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 09:34 PM
Quote:
Originally Posted by jjshabado
I worked with a prof that used Scheme as a beginner language and one big reason was that students could completely understand everything in the code he showed right from the start.
SICP?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-18-2018 , 09:43 PM
i wanted to buy that book after i just read the wiki but ugh scheme/lisp. nope nope nope
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 12:20 AM
Quote:
Originally Posted by :::grimReaper:::
SICP?

Sort of based off of it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 01:00 AM
I agree starting with C is a good idea. I started with Fortran which is kind of in the same vein.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 03:59 AM
MIT has been staring high level for a while. Used to be scheme I think and currently uses python.

Having taken introductory courses in Pascal, C++, and then nearly a decade later in python the latter is far superior. I do think that lower level languages should be worked into the curriculum fairly early, but I strongly believe that first exposure should be with a high level languages.

This allows you to focus on things like algorithmic thinking, basic control flow, etc without immediately running afoul of things like pointers, static typing, or manual memory management. Ideally you get students exposed to what you can do with these tools first and then start to teach how it all works. This helps with keeping people in CS programs. Stumbling across pointers right off the bat scares a lot of people away.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 06:23 PM
it could easily be argued there are too many people in CS programs.

I get what you're saying, that the low level annoying stuff can get in the way of early problem solving.

But, there's nothing stopping a professor from providing helper functions to do that kind of stuff if it's really an issue.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 06:32 PM
I don't know how to use pointers. I don't know offhand a stack or heap.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 07:28 PM
^ same but I don't care
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 07:55 PM
Quote:
Originally Posted by Grue
^ same but I don't care
lol, this
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-19-2018 , 10:47 PM
I can't imagine how unfulfilled I would be if I hadn't spent all that time learning about dlmalloc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-20-2018 , 02:13 AM
Quote:
Originally Posted by Victor
I don't know how to use pointers. I don't know offhand a stack or heap.
Quote:
Originally Posted by Grue
^ same but I don't care
Quote:
Originally Posted by PJo336
lol, this
You do you probably just call it a reference instead...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-20-2018 , 07:47 AM
I think its important that people can understand something like this and figure out where the bug (assuming this isn't the desired functionality) is:

Code:
>>> def foo(n, l=[]):
...         l.append(n)
...         print l
>>> foo(1)
[1]
>>> foo(2)
[1, 2]
>>> foo(3,[])
[3]
>>> foo(4)
[1, 2, 4]
But I don't really care too much about deeper pointer / reference knowledge. Or like the "Is Java pass by reference or pass by value" arguments. If you know and understand how the code actually works, I don't care too much about your semantics.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m