|
You're right. I was maybe a bit short-handed on C# here. I agree that one has to learn the basics of memory managing, IO, etc the "hard way". What I don't like about C for beginners is that you're allowed to do a lot of odd things, like fiddling with the preprocessor more than necessary, doing manual address computations (where it's not really required), using a bunchload of global variables and stuff like that. That's why I think C# (or Java) may even be a bether choice than C in some ways. But preferably one learns Pascal first, which is as powerful as C but without some of its pitfalls.
|
|
|
|
|
|
In other words if someone has a natural curiosity and is willing to continually learn new things then they will be fine. I guess that goes for a developer's whole career, not just their first steps.
If someone is lazy and incurious then their programming will never get anywhere, regardless of the language they learn on. In my opinion it's from this pool of people that "evangelists" emerge.
Murray
|
|
|
|
|
Tend to agree here.. curiosity has kept me in the game when others were long gone.
modified on Monday, April 7, 2008 11:55 PM
|
|
|
|
|
The noobs must learn the right way to program -- without side effects.
|
|
|
|
|
and whats with F# then he will get it half right
|
|
|
|
|
Where is any functional language?
|
|
|
|
|
In my opinion, the most important aspect of training NEW programmers is not at all making sure they understand the fundamentals. I am talking about the beginning stages, where I feel that getting the student to ACTUALLY CODE must be the first goal.
Once, the student sees results, that may motivate the person to take on more complex tasks and thus realize the need for further understanding of the underlying system. Therefore, it is my belief that any talented/motivated student will automatically seek information about the very basics.
In other words, FIRST make it very cool (motivation), THEN show them the REAL truth (understanding). I am no authority on the subject, but that is how I would train my students, regardless of what they are learning, cooking, drumming, programming, or something different.
With that in mind, I would choose the language that seems the easiest to pick up and use real quick.
Ask not whether it is useful. Ask what it is useful for.
|
|
|
|
|
A voice of sanity in what looks to be a lot of posts that are completely out of touch with the reality of a beginner learning to program.
"The pursuit of excellence is less profitable than the pursuit of bigness, but it can be more satisfying."
- David Ogilvy
|
|
|
|
|
The issue isn't 'what is the best implementation language', but 'how do we best train developers just starting out'.
I've been a software engineer for 24 years.. the biggest gap I've discovered in developers fresh out of school is in understanding the architectural underpinnings of modern languages, and how those languages 'meet with the metal'.. how they work on the hardware in question.
It points to a severe gap in basic understanding of the low level mechanism of the hardware. And note that this isn't just 'nice to know'. Understanding the systems we program at a low level also translates to better approaches in troubleshooting problems that occur, since the programmer isn't restricted to looking at the system 'just through the lens of the langauge he is using'.
To that end, learning the low level is the first step of understanding. In much the same way that an architect is made useful by his knowledge of basic construction techniques, programmers are made effective by their understanding of the hardware and how it plus the low level expression of the software translate into modern programs. No matter how much I see young folks trying to escape this, it remains as true today as when I started.
On the seemingly endless argument on 'ideal language'.. languages have use based on their application, not by nature of their existance. Its why researchers continue to experiment and look for better ways, and why there continue to be a plethora of languages. Ladder Logic on PLCs meets its industrial control needs very well, just as Java and C# meets the needs of its users. Its all about application.
|
|
|
|
|
I think this is due to the fact that most languages live in a "level".. As in "high-level" and "low-level". This because over time, we've "stacked" languages on top of each other..
Consider this layering of languages, from lowest to highest level..
- Processor Machine Code
- Assembly Language
- C
- C++
- Java Byte Code/.Net CIL/Lots of other language runtimes and compilers
- Java/C#/Misc Scripting languages/etc..
- Domain Specific Languages
Each higher level language is implemented in the lower level language, and cuts off it's scope of functionality at it's "layer" (with minor exceptions).
The problem that this creates is that each layer is semantically *very* different from the previous layers. That means that to learn the functioning of a different layer, you need to learn a whole new language, and a whole new functionality paradigm. This is intimidating and very hard to learn. A lot of people never bother to learn it.
What if a single language could be used from top to bottom? What if I could write in C#, and access my x86 opcodes directly, as if I was writing assembly, or re-write the syntax so that I could create my own domain specific language?
I recall, back in the early '90s when I was programming in C, using the Borland Turbo C compiler, who cool it was to be able to in-line assembly code in my C# code. This was a step in the right direction. I didn't need to switch contexts to access a lower level of functionality.. Just put my assembly code in a scoped block (see this article for more info[^]). This can still be done with Visual Studio in C/C++, but not in C#.
C# can also not re-write it's own syntax... F# however, can.
Anyhow, this is only a step in the right direction. What would be even better is if I didn't have to write in a completely different language (even if it is inlined in context), but if I could just do those things within the language directly. C# has some element of this with "unsafe" clocks, in which it can access memory directly in a C/C++ like manner...
But where is the language that lets me use a single language from the most primitive hardware specific low-level calls to the most abstract high-level syntax-customized DSL?
If such a language existed, and was in common use, then the barriers to learning the lower level concepts would be dramatically reduced. Instead of having to learn a whole new language (as well as a whole new set of tools, and switching between environments), a programmer could simply explore within that language the different levels of computer functionality... uncovering new ways to do things, when needed, without impedance.
I think F# is really nice for this, but only in an "upward" manner. It sort of cuts off at the "CIL" layer in the "downward" direction.
"Be liberal in what you accept, and conservative in what you send." - Jon Postel, First Law of Internet Communications
"It's 5:50 a.m., Do you know where your stack pointer is?"
"If at first you don't succeed, you must be a programmer."
http://vanguard-against-confusion.blogspot.com
|
|
|
|
|
Given the outsourcing frenzy, I submitted 'English'.
What does an agnostic, dyslexic, insomniac do?
He lies awake at night wondering if there's a dog.
|
|
|
|
|
In a way I agree with you.
People should be taught boolean logic first. That way they can understand, in very basic terms, what the building blocks of computing machines are about. This is a very interesting topic that most people should enjoy, even if they are not into programming or mathemetics.
|
|
|
|
|
Yes,
There seems to be an implicit emphasis on getting someone coding profitably ASAP. However, if your premise is that the learner is hoping for a career of many years, then these basics are going to make their (and their colleagues') life so much easier and more successful IMO.
Personally I started with Pascal (Programming 101), but in the mid-year break I worked through Peter Norton's Assembly Language Guide to the IBM PC. I have to say that "the penny dropped" in so many ways when the underpinnings of programming languages were revealed. It have no doubt whatsoever that it was the reason behind the perfect marks for all assignments in Programming 102 (exams? I don't talk about them).
I have so far resisted the urge to do what I think most developers do when asked this question and simply recommend what *I* did. However, I truly believe that assembly language should be learnt very soon after learning the first one. I lean towards Pascal for the first language rather than C because of some of the innocent looking time bombs that can slip by in C.
Murray
|
|
|
|
|
Yup, you got my point exactly. What makes us effective is our view of the system, not any one of its pieces. This only comes from an understanding of the underlying machine and how to leverage that machine to 'get it all done'. The more complex things get, the MORE important it is to understand, since so many more things can go wrong in the system.
The aim of training developers is for the long haul, not the moment.
modified on Monday, April 7, 2008 11:54 PM
|
|
|
|
|
I understand the point you are trying to make. I followed probably what you would call the wrong path. Started in BASIC, went to VB6, then learned Assembler, C, Java, and now on to .NET. I will fully admit that after I learned assembler my outlook and view on coding techniques were dramatically changed. However, I feel trying nowadays to get someone from assembler to C to C++ or C# and then finally onto a framework is akin to telling your 16 year old to rebuild his car bolt for bolt before he can take it once around the block.
I fully understand and see everyday the problems of programmers with no mental connection between their code and the machine it is running on, but I don't think forcing a PhD amount of work before they can start doing anything is the right answer either. However, I do well believe all CIS college programs should have an assembler course in their somewhere, which is sadly lacking. I just think there has to be a better way.
|
|
|
|
|
First let me say, I do not like C++ but that is probably because it was not my first language. If you can learn C++ and get to even an intermediate level, then from there you will be able to learn and/or pick up quickly ANY programming language. C++ is the grandfather of all languages, Java and C# both came from C++. C++ has all the good, bad and ugly features in it and it forces you to do object oriented programming(OOP) unlike C#, VB, Pascal, C and even Java
My two cents
|
|
|
|
|
If C++ forced me to do OOP (like C# or Java), I wouldn't be a C++ fan.
To those who understand, I extend my hand.
To the doubtful I demand: Take me as I am.
Not under your command, I know where I stand.
I won't change to fit yout plan. Take me as I am.
|
|
|
|
|
I would say that the grandfather of all languages is C and for me is the best starting language for everyone.
In my opinion, C is the root of all high level programming language.
Once you master C well, you can go trying some programming paradigms more complex like OOP. I do not believe that OOP is the best paradigm for start programming.
|
|
|
|
|
My fault you are right, the grandfather of all languages is C. But from experience, it is harder to go from C to C++, than C++ to C.
My first 4 programming languages were Pascal, VB, C, C++. I had a difficult time grasping the OOP stuff. Now I'm safely back to VB.NET.
This is why I would suggest someone new to start off with C++ with all its pointers and manual garbage collection and not some dumped down language like Java or C# (THESE LANGUAGES WERE CREATED BECAUSE PEOPLE COULD NOT GRASP THE ADVANCE FEATURES OF C++. THIS IS NOT A JOKE BUT TRUE, GO RESEARCH)
|
|
|
|
|
kjmcsd wrote: But from experience, it is harder to go from C to C++, than C++ to C.
That's true, because you had to learn C basics too when you were learning C++ .... So the best way is C to C++ . Is it harder? Good programming is not easy...
kjmcsd wrote: This is why I would suggest someone new to start off with C++ with all its pointers and manual garbage collection and not some dumped down language like Java or C# (THESE LANGUAGES WERE CREATED BECAUSE PEOPLE COULD NOT GRASP THE ADVANCE FEATURES OF C++. THIS IS NOT A JOKE BUT TRUE, GO RESEARCH)
I agree at certain point.
Ok, in .NET Framework (not only C#) you have your code "managed" as i suppose you know. Java the same thing.
Now I don't really know what you mean.
If you are talking about memory leaks, segmentation faults [ ] and so on, i totally agree.
If you are talking OS stuff, i don't agree, because it's not the programming language, but the platform's class libraries.
As I guess you know, you can code to .NET plataform with more than 20 programming languages.
|
|
|
|
|
First, some humor:
the grandfather of all languages would have to be Mix .
To be honest, C is closer to a modern language than to the 'beginning'.. It was invented in 1972. If we are talking earliest languages, you'd have to go farther back..
The first languages were machine language (of course).. but the earliest of the 2GLs were Algol, Cobol and their cousins. They predate C by more than a decade.
And you have it incorrect regarding why C#/Java have become popular. The reason those two languages are popular is that software management became acutely aware that the majority of bugs being introduced by programmers in C++ were memory management/leak type bugs. Since these bugs are both difficult to find and create a high degree of instability when they occur, there was a strong push to get away from systems that allowed them (thereby increasing programmer productivity and system stability). This is the real reason for C#/Java. I programmed in C++ for ten years, and now program in C#.
As to 'could not grasp the advanced features', I don't think so. The current incarnation of C# and Java look very similar to C++ (especially with the inclusion of Generics). And certainly the most difficult area to use well is the OOP portion, which is not just isolated to C# and Java. I can't begin to tell you how many bad OOP designs I've seen in C# that would have been just as bad in C++ or some other OO language.
modified on Monday, April 7, 2008 11:54 PM
|
|
|
|
|
From my point of view C++ is definitely the one , coz for beginners java/c# would be like directly injecting nutritions.......
Regards ,
Nishu
|
|
|
|
|
kjmcsd wrote: C++ has all the good, bad and ugly features in it and it forces you to do object oriented programming(OOP)
C++ does not force the programmer into anything, which is pretty much the reason of its success.
But it is not a good first language - a beginner needs something clean and simple, and C++ is neither.
|
|
|
|
|
I disagree that a beginner needs something clean and simple. That is the problem with some education system. They start off too basic, then when they get to the advance stuff they choak
True no programming language forces you to do OOP, but in some languages you rarely ever see an application that does not use OOP like C++. It lends itself well to OOD & OOP
|
|
|
|
|