Skip to main content
GameDev.net gamedev.net
🔒 Locked

Developers and stagnation

Started by xg0blin Jun 24, 2004 at 1:36 PM 22 replies 2k views
Original Post
xg0blin
xg0blin
What is it with out kind that makes us find excuses to stick with the old and carry a grudge for the new? It's like when we learn a language, we pledge allegiance and swear fealty to said language. Programming language bigotry has been going on for years. I've seen so many language flame threads it's pathetic. I personally have been in many arguments about .NET lately. I was a c-nazi for the last few years, and am just a recent convert, so I guess I understand where people are coming from, but why do we do this to ourselves? We give ourselves many reasons to stick with what we know, and ignore the benefits of what we don't? I hear C programmers all the time talk about efficiency and why they hate garbage collectors. I used to say the same, but now I think, why would I want to have a chance to make a memory leak, plus make myself write more code for allocation/deallocation, make my programs more prone to error for writing more code, so on and so forth? Why is it when something with added benefits comes out, we choose to ignore it for reasons which are often times very negligible? What happened for using the right tool for the right job? Why do we make ourselves lose productivity at work, for wanting to use a harder language that we have to write more code in, for a couple of thousandths of milliseconds increase in speed? For games, yes I can see wanting to use C/C++, because they are the right tool for the job. For realtime apps, I'd almost always go with C/C++. For anything else though, it seems a waste of productivity and more prone to error. I can't answer myself why I took so long to learn something other than C/C++, other than maybe I wanted to give myself an excuse not to have to work at something new (though that's not true because I enjoy programming). Now that I've discovered how great some of these other languages are, I wondered why I ever used C for some of my projects where every little millisecond wasn't an issue (which is just about all of them). Does anybody have a good answer to why programmers are so loyal to something as inanimate as a programming language?
Conner McCloud
Conner McCloud
All people fear change, its in our genes.

I could probably write a huge essay on the subject, but in reality that's all that needs to be said. Its not a developer specific phenomena, its intrinsic in human nature.

CM
alnite
alnite
Pretty much the same reason as in military boot camps or fraternity initiations. The more effort you put in, the more proud you are toward it.

It takes a lot of work to learn C/C++. When you learn C/C++, you learn its powers (memory allocation, pointers, etc); powers you don't find in languages you already know back then. I know now you can find them in almost every language. In addition, it is considered a hard language, a language that not everybody knows. You don't want to lose it, you are proud of it. They use it with pride. Yes, they put C++ on the pedestal.


edit:
damn my rating is hot!
Zul
Zul
I'm the opposite. I've always looked forward to new languages and technologies. I think it's fun to learn how to do something in a new language, or learn some fancy features it has that previous languages I've used didn't.
oh hai
xg0blin
xg0blin
Quote:
Original post by alnite
Pretty much the same reason as in military boot camps or fraternity initiations. The more effort you put in, the more proud you are toward it.

It takes a lot of work to learn C/C++. When you learn C/C++, you learn its powers (memory allocation, pointers, etc); powers you don't find in languages you already know back then. I know now you can find them in almost every language. In addition, it is considered a hard language, a language that not everybody knows. You don't want to lose it, you are proud of it. They use it with pride. Yes, they put C++ on the pedestal.


edit:
damn my rating is hot!


I'd argue that C# is just as hard to learn for a beginner (not for a C or java programmer because the syntaxes are very similar). There are more concepts (indexers, properties, the out keyword, interfaces, delegates, events, etc.), but the code looks cleaner when it's done. I don't think that's a very valid reason. I had a very easy time learning C#, but I woulnd't have if i hadn't already understood most of the concepts from learning C++.
Tron3k
Tron3k
Man, I thought I was a total C++ zealot, but when I tried C# ...

C# is KING

It totally owns C++, and it even beats Java. I mean, in many cases, it's faster than C++! Plus, you can do a lot of things you can do in C++ if you need speed, like have structs on the stack.
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
xg0blin
xg0blin
Quote:
Original post by Tron3k
Man, I thought I was a total C++ zealot, but when I tried C# ...

C# is KING

It totally owns C++, and it even beats Java. I mean, in many cases, it's faster than C++! Plus, you can do a lot of things you can do in C++ if you need speed, like have structs on the stack.


That's what I said as well. The thing that really surprised me though was vb.net. I had to go to a seminar for .NET at work, and they were using C# and vb. I swore I'd never ue vb. VB.net rocks as well. I couldn't believe it. Took my bigotry right away when I saw the things you could do with these languages that would be an excercise in frustration with C/C++. I have to make sure I don't get all loyal to .NET now, so when the next big thing comes out, I won't be so slow to try it out.
alnite
alnite
Quote:
Original post by xg0blin
There are more concepts (indexers, properties, the out keyword, interfaces, delegates, events, etc.),

Well, those are programming concepts. They have nothing to do with programming languages :) It is true when you learn C#, you will be using events sooner than when you learn C/C++. Let's take VB (not VB.NET, but VB6) as an example. VB6 has events, but I didn't find it difficult to learn, and I am sure neither do the majority of VB6 programmers. As long as it's easy to use, every one is happy. And events are easy to use in C# as well.

Now take events into the C/C++ scope, you will see a huge difference.

These old school programmers have gone through these difficulties learning this darn language. They have created their own event engine. Their own property engine. Their own graphics engine. Their own garbage collector. From scratch. They have lived their lives tasting the bitterness of using C++. They are not going to lose it just as easy as that!

When you graduate from military boot camps, aren't you proud of yourself? You see yourself as a better individual and better than everyone else. You feel tougher than before. You are no ordinary person. You are a soldier. This is exactly the purpose of the boot camps, to make yourself proud being a soldier, not to make you stronger! Once you have this pride, you won't leave the military, and you will fight for your country. Read "Influence: Psychology of Persuasion." If you want people to be loyal to you or your organization, make it hard to get in.


edit:
Ah!!! My rating!! No!! A "6"!
but thanks for improving my rating.

edited several times. I suck at writing.

[Edited by - alnite on June 24, 2004 2:31:14 PM]
Tron3k
Tron3k
Quote:
Original post by xg0blin
Quote:
Original post by Tron3k
Man, I thought I was a total C++ zealot, but when I tried C# ...

C# is KING

It totally owns C++, and it even beats Java. I mean, in many cases, it's faster than C++! Plus, you can do a lot of things you can do in C++ if you need speed, like have structs on the stack.


That's what I said as well. The thing that really surprised me though was vb.net. I had to go to a seminar for .NET at work, and they were using C# and vb. I swore I'd never ue vb. VB.net rocks as well. I couldn't believe it. Took my bigotry right away when I saw the things you could do with these languages that would be an excercise in frustration with C/C++. I have to make sure I don't get all loyal to .NET now, so when the next big thing comes out, I won't be so slow to try it out.
I haven't actually tried VB.Net yet. I figured all the .Net languages were pretty similar besides the actual syntax. What would be the main advantage of using VB?
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
xg0blin
xg0blin
Quote:
Original post by alnite
Quote:
Original post by xg0blin
There are more concepts (indexers, properties, the out keyword, interfaces, delegates, events, etc.),

Well, those are programming concepts. They have nothing to do with programming languages :) It is true when you learn C#, you will be using events sooner than when you learn C/C++. Let's take VB (not VB.NET, but VB6) as an example. VB6 has events, but I didn't find it difficult to learn, and I am sure neither do the majority of VB programmers. As long as it's easy to use, every one is happy.


No, they are part of the programming language. You have a delegate keyword, an out keyword, an interface keyword, an event keyword so on and so forth. There is no property or indexer keyword, but they are part of the language. Let me give an example.

class Stuff{    private int stuff_;    //this is a property. Instead of making a function     //to handle getting and setting private members, you can    //use properties to get and set them, without giving     //anyone access to the actual member, and allowing them to    //set it as normal, giving the user a nice interface, and     //still allowing you to do error checking like you would in    //the function.     public int Stuff    {        get        {            return stuff_;        }        set        {            if(value > 0 && value <= 100)                stuff_ = value;        }    }}


An indexer is also for giving a nice interface. Let me give an example of that as well.

class NumberList{    private int MyList = new int[10];    public int this[int index]    {        get        {            if(index > 0 && index < 10)                return MyList[index];        }        set        {            if(index > 0 && index < 10)                MyList[index] = value;        }    }}Now that I have that, I can do thisclass App{    public static void Main(string[] Args)    {        NumberList MyNumberList = new NumberList();        for(int i = 0; i < 10; i++)            MyNumberList = i;        MyNumberList[2] = 7;        // By my code, it does nothing even though its out of        // bounds, so program is OK        MyNumberList[12] = 5;     }}


So you see, they are indeed part of the language and not just concepts.


Quote:
Now take events into the C/C++ scope, you will see a huge difference.


Agreed.


Quote:
About the syntax. C/C++ has insane syntax if misused: pointers to pointers to an address of a function pointer. You can just keep going as much as you like. Now, these old school programmers have gone through these difficulties learning this darn language. They have created their own event engine. Their own property engine. Their own graphics engine. From scratch. They have lived their lives tasting the bitterness of using C++. They are not going to lose it just as easy as that!


That shouldn't stop them for using a better tool on their next project.

Quote:
When you graduate from military boot camps, aren't you proud of yourself? You see yourself as a better individual and better than everyone else. You feel tougher than before. You are no ordinary person. You are proud being a soldier. This is exactly the purpose of the boot camps, to make yourself proud being a soldier, not to make you stronger! Once you have this pride, you won't leave the military, and you will fight for your country.


Perhaps, but that's still no reason. That doesn't preclude you from going to say BUDS to be a navy seal and then calling boot camp inferior.
xg0blin
xg0blin
Quote:
Original post by Tron3k
Quote:
Original post by xg0blin
Quote:
Original post by Tron3k
Man, I thought I was a total C++ zealot, but when I tried C# ...

C# is KING

It totally owns C++, and it even beats Java. I mean, in many cases, it's faster than C++! Plus, you can do a lot of things you can do in C++ if you need speed, like have structs on the stack.


That's what I said as well. The thing that really surprised me though was vb.net. I had to go to a seminar for .NET at work, and they were using C# and vb. I swore I'd never ue vb. VB.net rocks as well. I couldn't believe it. Took my bigotry right away when I saw the things you could do with these languages that would be an excercise in frustration with C/C++. I have to make sure I don't get all loyal to .NET now, so when the next big thing comes out, I won't be so slow to try it out.
I haven't actually tried VB.Net yet. I figured all the .Net languages were pretty similar besides the actual syntax. What would be the main advantage of using VB?


It's about the same, just with a slightly different syntax. There isn't really much difference. They both run about the same speed and have the same things. I was just surprised that vb.net was the same, so as powerful, as c#, so I learned it a little as well.
Raduprv
Raduprv
I use C because I like it. I didn't even move to C++, because I don't like the C++ concepts. I like to use global variables. like to use local variables too. I love allocating and dealocating my own memory. I don't need the program or OS to do that for me. I rarely had memory allocation problems, and they are very easy to spot.
I don't think I'll move to C# in the near future. I don't think that it will make me write code faster. Writting code is not what slows me down. What slows me down is designing the engine, architecture, and LEARNING NEW STUFF.
So give me a good reason to move to C#. What can I do in C# and I can't do in C? (objects and such doesn;t count, because I don't like them in the first place).
Besides, I can hardly believe C# is as fast as C.
Integra
Integra
The reason you are noticing VB now and not just laughing at the language is because it was fundamentally changed. I mean if you look at VB6 and VB.NET the changes are just staggering.

To be honest, when you look at VB.NET it really is basically C# with a different syntax, and a few other various differences.. but there are probably more similarities than differences.
xg0blin
xg0blin
Quote:
Original post by Raduprv
I use C because I like it. I didn't even move to C++, because I don't like the C++ concepts. I like to use global variables. like to use local variables too.


Ok. I like those things too.


Quote:
I love allocating and dealocating my own memory. I don't need the program or OS to do that for me. I rarely had memory allocation problems, and they are very easy to spot.


Why would you love that? It's extra code you get to write, and that just slows you down. Adding more code also gives you more chances for serious errors. That lowers productivity and it is more error prone. Not all memory allocation errors are easy to spot.

Quote:
I don't think I'll move to C# in the near future. I don't think that it will make me write code faster. Writting code is not what slows me down. What slows me down is designing the engine, architecture, and LEARNING NEW STUFF.


Well, c is all about performance, and you still have to write more code with c. Of course the design takes longer than the coding. The real time taker though is maintenance, and C# is easier to maintain (at least in my opinion).

Quote:
So give me a good reason to move to C#. What can I do in C# and I can't do in C? (objects and such doesn;t count, because I don't like them in the first place).
Besides, I can hardly believe C# is as fast as C.


Well, you can do basically anything in c. That doesn't mean that there aren't things you can do that are easier. Try making a web service sometime with c, if you want to get the idea.

Why would you not like objects? I like the code reuse. I actually use it quite often. I like the design better with OOP. I like encapsulation, polymorphism and inheritence. If you can't be sold on OOP, then it's hopeless to try to sell you on .NET. Why don't you just go back to assembly, it sounds like it would suit you better??

I didn't say it was as fast as c. I said in some areas it is as fast or faster than c++ (not in all, or even most areas, but some). The speed difference, other than when using STL type stuff, is negligible.
Integra
Integra
People should note that there is a major reason that some large C# applications actually run faster than the C/C++ equivelent.

It isn't due to language or constructs, but due to forcing good programming style and design, and not allowing as many mistakes to be made. In my opinion when using C# you have to think more about design.. actually with any OOP language that is pretty much my take on it.

I mean if you look at Axion vs. OGRE for example, you notice the C# engine running faster in many cases, but you will also notice some difference in design and implementation. Some things were fixed in the Axiom version, and better design was forced on that application.


I mean it's quite obvious that well written C# code is going to be faster than horribly written C code. Just in the way that wel written C code will be faster than horribly written C++ or C# code, etc. The only difference you'll see is that by forcing better structure, not allowing for as many errors, and by making the engineer think more on the design you will see faster applications.
CoffeeMug
CoffeeMug
Quote:
Original post by Raduprv
I use C because I like it. I didn't even move to C++, because I don't like the C++ concepts. I like to use global variables. like to use local variables too. I love allocating and dealocating my own memory. I don't need the program or OS to do that for me.

Well, nobody is denouncing your preferences. Many people like to play around with low level code. I used to pick computantionally expensive algorithms and optimize it in assembly for fun (and learning experience). You can pretty much do anything you like as a hobby but when you move on to a commercial setting, things change.
Quote:
Original post by Raduprv
I rarely had memory allocation problems, and they are very easy to spot.

That's because you're the only one writing the code. When you have a team of 20 people with everyone having different ideas on how memory should be allocated and freed, you're going to run into a lot more trouble. It's enormously hard (bordering with impossible) to enforce a single memory handling standard across the whole team. This is why commercial grade C/C++ software often has memory leaks.
Quote:
Original post by Raduprv
So give me a good reason to move to C#. What can I do in C# and I can't do in C?

To be honest, as long as you write your code alone, it doesn't really matter. The moment you get into a team larger than two people you'll start running into problems. C# constructs will let you have a much more "maintanence friendly" architecture. I guess it's impossible to really explain... Just open your mind, pick a well designed OOP engine (like Axiom) and spend a month learning it. Spend another month extending it. By the time you're done it's very likely you'll have a different opinion about OOP and managed languages (unless you have a really thick skull [smile]). If your opinion doesn't change, what did you lose? You spent two months learning something new. If it does change, think about how much you're loosing now.
Raduprv
Raduprv
As Integra said (and as I also noticed by reading a C++ book) designing in OOP takes more time than designing in C.
You have to spend loads of time deciding what should be friendly, what should be private, global, etc. Then what objects should do what, what kind of classes to have, and many other things you don't really need to worry in procedural progamming.
Since the design is waht I really don't like, I don't mind spending a little more time on coding.

Quote:

That's because you're the only one writing the code. When you have a team of 20 people with everyone having different ideas on how memory should be allocated and freed, you're going to run into a lot more trouble. It's enormously hard (bordering with impossible) to enforce a single memory handling standard across the whole team. This is why commercial grade C/C++ software often has memory leaks.


Umm, sorry, but this is totally not true. Linix is a HUGE project, written in C (and asm). FreeBSD is the same. Quake3 is another example. Maybe HUGE projects are written in C, and huge teams work at them.
The Eternal Lands client is open source, and there are like 4-5 people working at it (plus those who submit patches, every once in a while). And we are doing very well, no one complained it's hard to mentain.

Quote:

Why would you not like objects? I like the code reuse. I actually use it quite often. I like the design better with OOP. I like encapsulation, polymorphism and inheritence. If you can't be sold on OOP, then it's hopeless to try to sell you on .NET. Why don't you just go back to assembly, it sounds like it would suit you better??

I can reuse code without objects, thank you very much. In fact I did that quite a few times.
As for encapsulation, polymorphism and inheritence, well, I don't see any way they would make my life easier. I can live without them, and do a good job without them.
And yes, I do like ASM, and I even plan to use it again soon (to optimize some stuff on my server, such as the path finding). When you need like 400 paths/second you really don't want polymorphism and virtual functions and such.
Raduprv
Raduprv
Quote:
Original post by CoffeeMug
Just open your mind, pick a well designed OOP engine (like Axiom) and spend a month learning it. Spend another month extending it. By the time you're done it's very likely you'll have a different opinion about OOP and managed languages (unless you have a really thick skull [smile]). If your opinion doesn't change, what did you lose? You spent two months learning something new. If it does change, think about how much you're loosing now.


Spending two months doing that means two less months of working at my game, which means less chance to make money. And why would I do that, when my engine works quite well, and has all the things I need?
xg0blin
xg0blin
Quote:
Original post by Raduprv
As Integra said (and as I also noticed by reading a C++ book) designing in OOP takes more time than designing in C.
You have to spend loads of time deciding what should be friendly, what should be private, global, etc. Then what objects should do what, what kind of classes to have, and many other things you don't really need to worry in procedural progamming.
Since the design is waht I really don't like, I don't mind spending a little more time on coding.

Quote:

That's because you're the only one writing the code. When you have a team of 20 people with everyone having different ideas on how memory should be allocated and freed, you're going to run into a lot more trouble. It's enormously hard (bordering with impossible) to enforce a single memory handling standard across the whole team. This is why commercial grade C/C++ software often has memory leaks.


Umm, sorry, but this is totally not true. Linix is a HUGE project, written in C (and asm). FreeBSD is the same. Quake3 is another example. Maybe HUGE projects are written in C, and huge teams work at them.
The Eternal Lands client is open source, and there are like 4-5 people working at it (plus those who submit patches, every once in a while). And we are doing very well, no one complained it's hard to mentain.

Quote:

Why would you not like objects? I like the code reuse. I actually use it quite often. I like the design better with OOP. I like encapsulation, polymorphism and inheritence. If you can't be sold on OOP, then it's hopeless to try to sell you on .NET. Why don't you just go back to assembly, it sounds like it would suit you better??

I can reuse code without objects, thank you very much. In fact I did that quite a few times.
As for encapsulation, polymorphism and inheritence, well, I don't see any way they would make my life easier. I can live without them, and do a good job without them.
And yes, I do like ASM, and I even plan to use it again soon (to optimize some stuff on my server, such as the path finding). When you need like 400 paths/second you really don't want polymorphism and virtual functions and such.


This is the point I'm trying to make with the topic. Why are you so dead set against trying new things? You're against something that you have admitted you have not tried. Why are some programmers so closed minded about learning new languages?

As for the next post you made, there is no way it'll take you two months to learn c#'s syntax if you already know c. It's almost the same as C++ which is almost the same as C.
Raduprv
Raduprv
I am not willing to try it because I don't have time. I have other, more important things to do.
As for C++ being like C... hmm.. It is, but it has the entire OOP thing, which I don't like. I did read about it, seen programs using it, and it just doesn't fit me.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.