Yes, every programmer should eventually learn about the things you're talking about. But C is a terrible first language.
So I totally agree. Python probably makes sense if most undergraduates don't have programming experience any more. And the ones that do probably have experience in JavaScript.
*CPython's list type is really a dynamic array, and it works better as a stack. However the interface is similar enough to a typical linked list, that it gets the point across.
You might as well start with the stuff that is common to most of (contemporary) programming.
That is the point. This isn't for comp. sci. students, this is for engineering students.
I know that in America, unlike other countries, "engineer" is a non-protected term and that lots of guys who don't actually have engineering degrees (such as comp sci majors) call themselves engineers.
But "actual" Engineers, i.e. the people who have engineering degrees or are in engineering programs, the people to whom this article pertains, are applied scientists. By definition, their professional concerns aren't the inner workings, or developing a holistic understanding of computers. That's for a specialist, i.e. a computer scientist who has more appropriate training. An engineer's job is to develop a solution that surpasses the design requirements (physical as well as budgetary) by the minimum amount. As a crude example, anyone with a high school education could, with unlimited funds, build a bridge that would stand up. But only a trained structural engineer can build a bridge that will just stand up.
I'm a mechanical engineer, and for people in my field the programming aspect is most often a means to and end; you're writing a simulation to give you better insight into solving a physical problem, or you're writing a program to crunch a shitload of data, or you need to plot things and present them in a particular way or output the results to a particular tool, etc. The performance of the algorithm or your code is not really paramount. If it's "good enough" then it's good enough, because the code you write is just another tool in your toolbox along with your digital multimeter, your impact driver and your wrench.
I recently wrote a quick one-off to iteratively determine the asymptotic limit of a set of physical functions with many interconnections and shared variables, subject to 4 different constraints and involving numerous irritating physical constants.
To write that program successfully, I don't have any need whatsoever to understand the intricacies of file IO, the specifics of how libraries are linked at compile time, or how the print function actually prints to the screen. All I need is for it to print a number to the console so I can compare it to my far rougher hand calculations. Anything else is a waste of my time.
Had I written that one-off in python, the knowledge that "print prints things to the console" would be perfectly adequate for me to do what I need to do in order to move on to more important things. The inner details just aren't important.
Then again... You mention that the job of an "engineer" is to "develop a solution". Well, that's pretty much what a software developer or software engineer would do. They're all grey, and it sounds like you're not quite sure of your own definitions. I can't tell if you're just confused about what all these terms mean to you, or you're just hurriedly trying to justify your own internal view of superiority over "non-engineers" because you're a "mechanical engineer" and don't like being on the same plane as them.
All in all, I should probably disclose that I've had this argument a few times with "engineers" in the physical sciences. They all had a vested interest in protecting the term engineer because if they didn't, it would devalue their worth and the degree they hold. And the government-body given "accreditation" that they lord over people for higher pay.
I am.
>Then afterwards you go on to claim that computer scientists aren't really "engineers" by your definition.
They're not.
At least, not in Canada. It's against the law to call yourself an engineer if you don't actually hold an engineering degree from an accredited institution.
>I can't tell if you're just confused about what all these terms mean to you, or you're just hurriedly trying to justify your own internal view of superiority over "non-engineers" because you're a "mechanical engineer" and don't like being on the same plane as them.
That's your problem. I'm not confused in the slightest nor do I feel superior. Different skills for different areas of focus.
I specifically referred to computer scientists as "specialists" having more appropriate training. If you're upset because you can't legally call yourself an engineer in my country then that's not my problem.
> They all had a vested interest in protecting the term engineer because if they didn't, it would devalue their worth and the degree they hold. And the government-body given "accreditation" that they lord over people for higher pay.
Sounds like you're the one with an inferiority complex here. I like how you put "accreditation" in quotes as if to imply that accreditation is not really worth anything. That's very mature. The term Engineer is protected in my country due to very real issues of public safety. You don't want someone certifying a skyscraper as safe, only to find out they are an architect, not an engineer, and therefore weren't trained in structural dynamics, metal fatigue, stress analysis, etc. If that architect wants to be able to certify buildings they need to demonstrate competency to the regulatory authorities by completing an accredited program.
You know how they say "don't roll your own crypto, leave it to the experts"? Same thing.
I am.
I think that's just a ridiculous way of referring to engineering. If we're going to be strict about the term engineer, we might as well be strict about the term scientist and pounce on anyone calling themselves a scientist, applied or otherwise, if they haven't submitted articles for peer review. How many members of your graduating class of applied scientists have been peer reviewed?
They're not. At least, not in Canada. It's against the law to call yourself an engineer if you don't actually hold an engineering degree from an accredited institution.
Protection of the term engineer in Canada, for any old BSE, is ridiculous and is inconsistent with conventions in most of the rest of the developed world. It's largely ignored by industry, frequently 'violated', and protects no one - certainly not the public at large, at least. What really needs protection is the title P.Eng, which actually is important to the safety of the public.
The term Engineer is protected in my country due to very real issues of public safety
P.Eng. yes - but a BSE? Should the full force of law really be brought to bear on someone who might be confused with having earned a BSE by calling themselves an engineer? Who does this protect?
You don't want someone certifying a skyscraper as safe, only to find out they are an architect, not an engineer
Yes - and that would be a licensed, legally entitled, and legally cupable P.Eng., not some random BSE.
Edit - for the uninitiated, P.Eng. or Professional Engineer is a legally protected (in Canada and the United States at least) title given to a graduate of an engineering program who has been through an industry mentoring process, has taken competency exams, and has taken a professional oath of ethics. These are the men and women who keep our bridges from falling down by saying 'no' when someone wants to cut corners or reduce expenses. Many projects, especially in civil engineering, require the sign-off of a P.Eng. A P.Eng. is also legally culpable if they knowingly approve of something that they shouldn't.
A BSE is someone who graduates from an undergraduate engineering program.
I think it's pretty obvious that I meant P.Eng but didn't want to get into it for brevity. Not everyone knows the difference.
Sorry you're butthurt.
That's a pretty major thing to omit considering the argument you were trying to make. Keep shifting those goalposts.
>Sorry you're butthurt.
For being an engineer, you're certainly very immature and appear to lack the critical thinking skills required to engage in an argument with valid points.
Above all, get them interested. If you capture their imagination, they'll be receptive to--even independently curious about--the details.
I'm speaking anecdotally now, but please do not bore young students. There's no way I would have stuck with it if C was my first language. Javascript and Python are excellent starting points that easily let kids create games and websites and fun things.
We probably wouldn't start someone off with Haskell, but to me C seems on the same level of impracticality for a young beginner.
Python suffers from this less than C, but still much more than Scheme. I really can't imagine advocating for something other than some dialect of scheme (maybe racket) for an intro undergraduate course.
For kids I can see choosing something like Javascript (as terrible as it is) just for the immediate feedback that someone before me mentioned.
a = [1,2,3]
b = a
b += [1]
=> a == [1,2,3,1]
a and b point to the same piece of memory even if you don't have to explicitly deal with pointers, you need to reason about themThese students are there to learn programming as a tool to help them solve problems. The elegant recursive algorithm isn't really a goal they have. Their goal is to get a reasonable answer to a problem so they can move on with more important things.
Those things I mentioned are how you solve problems though. What I was getting at is learning the low level details of how a computer, or at least C, works isn't problem solving.
Agree 100%
Some isolation is necessary. I doubt that I could completely explain how either print or printf turns the pixels on and off on the display.
You could just give
from __future__ import print_function
import os
def main():
print("hello world from:" + os.name)
if __name__ == "__main__":
main()
as the hello world that covers functions(main/print), entry points(python runs the code top to bottom defining classes and functions at the top level and running any other code it encounters, to allow importation of libraries we put the code we wish to run in a special block that only runs it when the script is the only being directly run, not imported), we imported os and used os.name to demonstrate a library, + is an operator.