# C# The Next Thing?

53 replies to this topic

### #21Michael

Member

• Members
• 67 posts

Posted 30 September 2004 - 11:22 PM

anubis said:

a) what does it matter here ?
b) i find that c is stricter when it comes to structure of code. maybe you don't... that's the point... it doesn't matter if you start with c++, c, pascal or *insert language of your choice*
I am wondering in which ways C is stricter in your opinion.

anubis said:

you won't use much OOP in the beginning since you are only learning the basic concepts.
OTOH your basic concept could very well *be* OO (which would be the case in Smalltalk, a language usually considered to be very intuitive to learn). The same line of argument can be applied to, for example, the functional or logic paradigm.

### #22SnprBoB86

Valued Member

• Members
• 112 posts

Posted 01 October 2004 - 01:24 AM

C# rocks
Brandon Bloom
http://brandonbloom.name

### #23xeonx

Member

• Members
• 48 posts

Posted 01 October 2004 - 02:51 AM

I don’t think that just because you start out learning object-oriented programming, you will ignore the procedural aspect of programming, if any developer is interested enough in developing for the .NET framework that he would consider how different code is optimized, he or she would look into MSIL... a procedural and low-level language similar to assembly. I know that in my school, we start out students with a IDE which allows for executable UML, and this use of object-oriented programming right-off-the-bat has been largely successful especially when compared to the students who took C++ and just had OOP effectively graphed on as another feature added to C. I have seen the results in action as I haved helped out with many of the classes and students respond well to the former approach. Also, I had started out learning strictly Object-oriented programming, and it is what peaked my interest in developing and has allowed to to grasp systems design far eaiser then my peers who havent. I am also not speaking strictly of C or C++ (though i would not have suggested progressing from one to the other), i mentioned the procedural paradigm, which includes *quite a few* languages. New programmers are lucky enough to be able to concentrate on the high-level design and on abstraction and other object-oriented techniques. But i don’t see why you are suggesting the extraction of OOP from the initial curriculum. It is extraction, because procedural programming is what you will find at the method level, its just *generally* much shorter or more concise then you would find in a non-OOP program. OOP is not only an excellent introduction to programming as a whole, it allows developers to concentrate on the big picture (which is so often missed) and work in parts to complete it. This is no C#-is-better thread (though i did post a hefty list of features), it is more my take on the usefulness of managed in all applications, including games!! Managed languages such as Java and C++.NET or even native C++ are all nearly equally applicable to this rationale.

Michael said:

anubis said:

a) what does it matter here ?
b) i find that c is stricter when it comes to structure of code. maybe you don't... that's the point... it doesn't matter if you start with c++, c, pascal or *insert language of your choice*
I am wondering in which ways C is stricter in your opinion.

anubis said:

you won't use much OOP in the beginning since you are only learning the basic concepts.
OTOH your basic concept could very well *be* OO (which would be the case in Smalltalk, a language usually considered to be very intuitive to learn). The same line of argument can be applied to, for example, the functional or logic paradigm.

I agree, you could just as easily throw out the procedural... until you actually need it. The vast majority of programming that i have done over the last 2 years has largely dealt with data structures, data manipulation, systems design, UI, and API abstraction: all things which lend themselves very well to OOP. Even in something as "flow-centric" as a game engine, you don’t have to use a lot of what is traditionally procedural programming, a object such as the RenderEngine manages where it is at and what is being called or updated, it not just a giant loop with jump statements but the interaction between objects. Instead of procedures, the game is rendered and the world interacts according to rules defined in data, and it would be difficult to define something this dynamic and extensible in just procedural programming. It just goes to say that if you are going to be working with OOP more, then i would learn if first instead of navigate the difficult transition from procedural to OOP, and otherwise (such as if you are working with a scripting language like JScript.NET or python) you can learn it as an after thought. It doesn’t make sense to "work your way up to it", especially if you wont be concentrating on the procedural side of things.

### #24Decibit

Member

• Members
• 34 posts

Posted 01 October 2004 - 03:20 AM

anubis said:

...anyways, i didn't intend to turn this into a "what language is better" discussion. i don't question that OOP is superior and i like C# very much. it's just a matter of which approach will give you the better learning experience...

Right. And the best case is when you are not stuck with a single language or :ohmy: with a single compiler. Turning your favourite programming environment into a religion totally freezes any learning process.

### #25xeonx

Member

• Members
• 48 posts

Posted 01 October 2004 - 04:41 AM

Decibit said:

Right. And the best case is when you are not stuck with a single language or :ohmy: with a single compiler. Turning your favourite programming environment into a religion totally freezes any learning process.

I'm not quite sure what you are referring to, C++ or the .NET framework. C# is just the most effective tool for the job in most of the scenarios that I have encountered. When I worked with data migration, the best tool was Perl so that is what i used, and when working with say writing macros its VBA (though I don’t like VB syntax too much) and if you are writing a driver its C. It’s always best to use whatever is most effective for a given task. I also mentioned Java and Python as being excellent languages and I hardly think that they (normally) use the .NET framework or are even compiled into MSIL. And actually there are technically many compilers for MSIL, 3 for each .NET language (Mono, Portable.NET, and MS .NET) and then an additional 3 for JIT'ing. I was advocating OOP and the dynamic nature of managed languages, not specifically C# and I had previously made a note of this.

### #26Decibit

Member

• Members
• 34 posts

Posted 01 October 2004 - 08:50 AM

xeonx said:

I'm not quite sure what you are referring to, C++ or the .NET framework.

I spent years learning C and C++. At first I was very suspicious to newly appeared managed languages. But that doesn't mean they aren't effective tools. I wanted to say that anybody should at least try .NET Framework (C#) even for their traditional tasks. So I discovered for myself.

### #27anubis

Senior Member

• Members
• 2225 posts

Posted 01 October 2004 - 11:28 AM

xeonx : i think we are just seeing two approaches to the problem here.

Quote

I don’t think that just because you start out learning object-oriented programming, you will ignore the procedural aspect of programming

i didn't claim that you did. i just said that i think that it is good to know how your computer operates first and then abstract from that. i've seen many students at my university who learned java in the first two terms and to them the computer is still some kind of magic box that you feed some java code and out comes the result. they have no clue what the computer really does at all and chances are that they will never get it. you might probably say that you don't have to know about this when you start out but that is the exact point where i think differently. chances are that once you totally adjusted your mind to OOP programming you will leave out lower levels for the pure reason of lazyness

Quote

Also, I had started out learning strictly Object-oriented programming, and it is what peaked my interest in developing and has allowed to to grasp systems design far eaiser then my peers who havent.

software architecture wise you are right. you will learn those aspects better using OOP. there is no doubt about that. when designing a specific algorithm though you have to understand how you computer processes data and not how your brain does it. a good grasp of low level concepts is crucial here. most likely you will be taught about processor architecture, assembly and other low level stuff as well in your first terms in university. for me it makes sense to program the computer at a similar level at that time or students will plainly forget about it again.

Quote

I know that in my school, we start out students with a IDE which allows for executable UML,

so your school is teaching software design and not computer science ?
If Prolog is the answer, what is the question ?

### #28Michael

Member

• Members
• 67 posts

Posted 01 October 2004 - 12:27 PM

I think my point would be that you can get a "complete enough picture" both bottom-up and top-down.

Senior Member

• Members
• 785 posts

Posted 01 October 2004 - 05:49 PM

If they were truely teaching computer science rather than software design then we wouldn't be working in real computer languages at all, but would be working with mathmatical proofs and lambda calculus. His school just had a different way to approach practical computer science.

I would really like to know which program allows executable UML. I think this could be quite fun, and perhaps a good way to introduce youngins to programming similar to how Logo Writer introduced me to programming. http://www.cattanach...logowriter.html
Jesse Coyle

### #30Tufty

Valued Member

• Members
• 115 posts

Posted 01 October 2004 - 08:09 PM

On the games programming degree I just started, one of our first year modules is C/C++ Programming. It's a 2-part module, and we've been told by our main tutor that we're basically ignoring object oriented stuff until the second part. To the point of skipping the parts in the official course book that deal with it. Quite a few of the other students are confused already - I'm not, because I studied C last year, and I've been reading up on C++ since then. Having read through this thread now, I think it'd be better all round if we were covering object oriented programming from the start. Not least because then I wouldn't be on the verge of falling asleep in lectures :P

Anyway, to get moderately back on topic, I've also looked into and used C# a bit. One of my side projects is a .net version of a web photo gallery program my friend is developing in Java. I like it a lot, the only thing preventing me from taking it further is lack of time at the moment.

### #31Michael

Member

• Members
• 67 posts

Posted 01 October 2004 - 08:52 PM

I would really like to know which program allows executable UML.

Maybe he is talking about Together.

Senior Member

• Members
• 785 posts

Posted 01 October 2004 - 09:29 PM

I am assuming you mean Borland's Together.

It is difficult to tell exactly what this system is capable of beyond UML modeling. Can you actually use it to form simple complete programs without any code?
Jesse Coyle

### #33xeonx

Member

• Members
• 48 posts

Posted 02 October 2004 - 02:58 PM

I am assuming you mean Borland's Together.

It is difficult to tell exactly what this system is capable of beyond UML modeling. Can you actually use it to form simple complete programs without any code?

or programming will allow for this kind of visual construction of programs, but it is still a difficult concept to grasp, and well the technology and interest just isn't there right now. What Together does is allow you to create properties, methods and classes in the UML diagram and have them creating in your code-base, you can quickly update, prototype, refactor, or test complex systems (and even smaller applications) this way and it allows you to quickly and effectively assess the cohesion and coupling of different classes and systems. Together also automatically updates your UML diagrams according to changes made in your code-base. This is called "round-trip" code generation in other UML utilities, but Together does it real-time, instead of having to update periodically. It also *updates* or *refactors* your code instead of replacing it with an empty shell of a class (which is fairly useless when refactoring). The application that I was referring to is BlueJ, a free Java IDE which actually integrates the same features that I described for Together. The problem is that this is not a very full-featured IDE and is simplistic since it is designed students new to OOP or even programming altogether. It is very impressive though and allow students to quickly grasp OO concepts and has even been used in many cases for just designing or evaluating larger systems and since it is written in Java, it is fully cross-platform.

### #34xeonx

Member

• Members
• 48 posts

Posted 02 October 2004 - 04:40 PM

anubis said:

i didn't claim that you did. i just said that i think that it is good to know how your computer operates first and then abstract from that. i've seen many students at my university who learned java in the first two terms and to them the computer is still some kind of magic box that you feed some java code and out comes the result. they have no clue what the computer really does at all and chances are that they will never get it. you might probably say that you don't have to know about this when you start out but that is the exact point where i think differently. chances are that once you totally adjusted your mind to OOP programming you will leave out lower levels for the pure reason of lazyness

Well if it is the case that students are too lazy to learn about something as critical as understanding how something works, then you would simply have C++ a prerequisite for the Comp-Sci degree. Learning the OOP side of things is the most important thing to prevent them from being lazy in though, so instead of having them learn C++ and just be lazy in Java class, it is better to force the practical on them if OOP is what they will indeed be working with in their intended vocation. I would suggest that Comp-Sci students learn C++ because they may actually have to work with it (at the very least interop or using JNI for Java), but if what you are considered about is that they learn about how the Run-time environment in managed languages interacts with the OS API, then they would take a Computer Seminar type class or an advnanced Java or C# class which deals with the MSIL or bytecode. This is useful for understanding the optimizations for a given language. But I hardly think that forcing on students of managed languages to memorize the Windows API for a C++ class is an effective strategy. When programming in C++ or C#, the main thing that differs from the practical standpoint is the API. This API is very complex, cryptically-named, and for the most part with a linear (non-OOP or hierarchal ) in C and C++, but is very intuitive and well-documented in C#. If you understand programming, learning a specific API is trivial, but it is a very large task in C/C++. Also, you can learn C/C++ without learning about how it works under the hood, so all you would be teaching is the API and about pointers and unmanaged code (which you could learn about just as easily in a class on C++.NET).

My school doesn’t teach about software development, we have Computer Seminar, Intro CompSci, and AP Comp-Sci classes. If you wish to be a good programmer, you would research software-development, OOP, and how the low-level stuff works anyways. I think that classes should be geared towards students who are actually interested in the topic and intend to dedicate some time to it, not just for the lazy ones who don’t care about how things work. I think that teaching OOP helps to give an understanding of how the application works and allow them to focus on a more abstract level and then on the individual implements of its methods (which is the object-oriented standard for implementation). You will cover “procedural” programming to the extent that it is needed when implementing the needed methods. Why make things more difficult or harder to read and understand by inlining everything and using jump statements and procedural programming when you could simply factor them out to other methods. Procedural programming is covered to the extent that is needed when the first few programs are written involving just the Main() method (and after that for larger applications it is replaced by OOP because it becomes nothing more then cumbersome). Teaching OOP does not inherently cause students to not understand how the computer works, it just allows them to effectively design and implement a program that is easily maintainable. You could teach it in C++ just as easily. I think that skipping over sections of a programming book that deal with OOP (or application design) is a horrible method of teaching. I think NomanRock his it right on the head: at that point you are simply dealing with algorithms, not effective software development (which is the point of Comp-Sci or programming). If you intend to work strictly with low-level hardware design or programming then you won’t be taking OOP or managed language classes. If you are dealing with simple web-programming or other script-based solutions then you also wont likely be dealing with OOP.

### #35xeonx

Member

• Members
• 48 posts

Posted 02 October 2004 - 04:41 PM

It boils down to this: if you aren’t using OOP (very low-level or script-based development), and if you intent to develop a complex application larger then a couple printed pages of code, then you should. Now if you are learning OOP… then you should probably learn how to think that way. If you wish to delve into the advanced topics of how it is implemented then more power to you, but this is not as critical as actually being able to work with what you need to in your intended vocation. If programmers are too lazy to understand how a computer works then that is there style and they will have a difficult career ahead of them. Other then that I don’t think that learning to do something in a *very* old and *very* ineffective way first helps you in any way. That’s like saying you should learn and develop an application in assembly or machine code before you work with C++, its just not very useful beyond giving you a different perspective and is very tedious, wasteful, and time-consuming way of doing even that.

### #36anubis

Senior Member

• Members
• 2225 posts

Posted 06 October 2004 - 09:32 AM

i just read an article in a german computer magainze about the usefulness of pascal in universitys today. the cited a study, comitted by the us board of didactics, on this very topic. they concluded that procedural programming should be first and even that starting with oop is harmful. sadly they only mentioned the study to support their pascal arguement and didn't really go into depth about it. also i don't know exactly what the us board of didactics is but i'm trying to find out. surely they have a web page
If Prolog is the answer, what is the question ?

### #37xeonx

Member

• Members
• 48 posts

Posted 06 October 2004 - 09:43 PM

Other then citing one study for pascal, do you have any comments about my earlier posts. Procedural programming is simply a highly unorganized method which both lends itself to spaghetti code and it not practical for any kind of large application of system which is modeled after the real world. You will find procedural programming within the actual methods so i hardly see a problem with not learning it. You are mixing two different arguments. You said that because people learned java and didn’t understand their computer that they should have learned procedural first. Java is a high-level language which abstracts you from specific calls into the OS's API. OOP is a way of organizing code to be easily maintainable, debuggable, and extensible. You can not cite members of a java class not understanding how their computer works to substantiate the argument that you should learn OOP first. Also you should probably know what an organization is and what the study covered before citing that. What exactly are you advocating anyway, learning procedural programming first, or learning a low level language like C/C++ first. If you intend to work with a particular style of programming i would suggest learning that first, especially if it is easier to learn and the alternative won't even be used in your intended vocation. And if you check the US Department of Labors 2004 Statistics for "Average Anual Salaries in Software Development" you will find that Object-oriented programmer make $68K (the highest of all soft-dev jobs listed) while non-OOP programmers make$59K (the lowest of all listed jobs). This may tell you something about which you might want to be learning.

f you are interested in how valuable the big contenders in software development view learning OOP first (and they really should have the best judgment of the subject) then you can consider how Microsoft and IBM worked together in created a new college which caters exclusively to Object-oriented programming and does not even have simple procedural programming in the core curriculum. They go right into OOP because these two companies as well as their 2 best software developers have designated it critical to jump right into OOP and start thinking that way. Frankly the fact that a college was started by them with this specific intent is *very* supportive of learning OOP first to say the least!!

Senior Member

• Members
• 785 posts

Posted 06 October 2004 - 10:14 PM

Procedural programming is not highly unorganized any more than a bedroom is highly unorganized. It may often be that way, but it is the result of the person not the room or the language.
Jesse Coyle

### #39Michael

Member

• Members
• 67 posts

Posted 06 October 2004 - 10:26 PM

Fully agreed.

Also, don't neglect the fact that you can program non-procedural style in a procedural language - in quite a concise way, actually, given a certain set of linguistic abstractions.

For instance, consider programming OO style in C or Pascal (or to a lesser extent, simulating generics using the C preprocessor).

### #40anubis

Senior Member

• Members
• 2225 posts

Posted 06 October 2004 - 10:39 PM

Quote

Other then citing one study for pascal,

it wasn't on pascal it was on beginning with OOP vs. procedural programming in universities.

Quote

What exactly are you advocating anyway, learning procedural programming first, or learning a low level language like C/C++ first

i advocate learning procedural programming first.

Quote

Other then that I don’t think that learning to do something in a *very* old and *very* ineffective way first helps you in any way

it's not very old. it is how your computer does it. today.

Quote

This API is very complex, cryptically-named, and for the most part with a linear (non-OOP or hierarchal ) in C and C++, but is very intuitive and well-documented in C#

that problem is specific to the windows API ? (counter example OpenGL)

Quote

And if you check the US Department of Labors 2004 Statistics for "Average Anual Salaries in Software Development" you will find that Object-oriented programmer make $68K (the highest of all soft-dev jobs listed) while non-OOP programmers make$59K

what exactly does that have to do with wether it is better to learn procedural and build OOP on that or the other way round ? i told you before, i'm not questioning OOP. why do you constantly keep attacking me on that ?

Quote

You said that because people learned java and didn’t understand their computer that they should have learned procedural first

i based that observation on operating system courses we had to take in later semesters. you could easily see that they had difficulties in understanding what happend because they had little understanding of what the computer actually did so far.

you know... i have the feeling that all that you are concerned about is application writing. i even agree with you that when you are only dealing with business world programming and writing apps in that area you are better of with never careing too much about low level things besides how you can write efficent code for your CLR. but there are other things to do than that. people do write code for the linux kernel and people do design low level network logic or programm AI into robot (or write high performance code ala Nick's swshader/softwire). about all research projects, my university is involved in, require skills in object oriented programming as much as writing specfic assembler code or work at lower levels that don't permit the luxury of object orientation. so you have two sides that both need to be covered and the question that remains is how you should teach about both of them. we have different opinions on that and that's ok

ps : i'm really sorry that i couldn't find an online verison of that study. i couldn't even find the website of the us didactic boards (do they exist ? i don't know... mike's pawnshop has a website... so you'd expect them to have one :) ). anyway...
If Prolog is the answer, what is the question ?

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users