Is C better than vb
Posted 17 September 2011 - 04:55 AM
Posted 17 September 2011 - 05:07 AM
But anyways, ditch VB, learn C. If you want to be a good programmer, rather than just a code monkey with bottom tier salary, you'll also need to know a few things about Assembly. You don't necessarily need to learn how to program in Assembly, but you need to know how it works to understand C. And if you don't understand C, you won't understand any higher level languages either.
I started learning programming with BASIC, so naturally, I spent some time with VB. Time completely wasted. Yes, I learned many programming techniques, but I also picked up a few bad ones. Starting out with C would have saved me some time.
Old C++ compilers used to compile C++ code into C code, that C code would be compiled into Assembly, Assembly would be assembled into binary "objects", and only these would be linked into executable. In order to be a good programmer you need to understand every step along this chain. You need to be able to look at C++ code and know how you'd write that in pure C. To take a snippet of C and expand it into Assembly code. Assembly to binary isn't as critical. There you just need to have a general idea of what sort of instructions will be generated.
If you understand how this works with C++, you will easily understand how any other object oriented procedural language generates code. Knowing that is important if you are going to write anything worth crap, and that's the only way you are going to land a descent job, be it writing C# code for XNA, writing quality engines in C++, or going back to VB to work on some business software. Regardless of where you'll go with all of this, you have to start with C.
Edit: They really need to handle post queries made after topic has been moved better.
Posted 17 September 2011 - 05:14 AM
|QUOTE (K^2 @ Saturday, Sep 17 2011, 15:37)|
|You can switch to C# over from C++ rather painlessly later on if the job calls for it.|
How? Is it possible if you don't know c++.
Ditch VB it is a basic language if you really won't to be a developer you shouldn't use it. The only time I would use it is if I wrote a program in VB6 and needed to convert it to .NET. Since there isn't much difference (language wise) between VB6 and .NET rewrite the vb6 code/program in .NET then it is easy to convert to any other .NET language.
Posted 17 September 2011 - 05:16 AM Edited by Swoorup, 17 September 2011 - 05:20 AM.
Ok I would start out with C. But I find it very hard to even understand a bit of assembly language. Can you recommend me a book or software that can help me learn it?
Also sir in what aspect C is different from C++?
@Nightwalker I know both of them. I did extensive research on looking for the same functions for both VBs. But I think I have to quit them now.
@K2 How should I start sir
iii) C++ ??
Should I master in each of them?
Posted 17 September 2011 - 05:22 AM
Posted 17 September 2011 - 05:38 AM
Posted 17 September 2011 - 06:22 AM
|QUOTE (Swoorup @ Saturday, Sep 17 2011, 01:16)|
| @K2 How should I start sir|
iii) C++ ??
Should I master in each of them?
You need to master C++. Starting with C++ is an option, but in my experience, people who learn C first are better at C++ later on, so it's better if you start with C. Don't expect to understand all of it right away, and it's not a requirement to start learning C++. But you need to know all of the basics. Nothing you learn in C will be a waste when you switch over, so don't worry about that. Most C programs can be compiled in C++ just like that.
Most texts and courses on C follow a fairly standard order of things. Once you learn binary trees in C, that's a good place to start learning C++. By that point, you would have learned structures, and that's a good introduction to C++ classes. You'll see later that a class is basically a structure with a namespace and some special inheritance rules.
Assembly, you just need to have the basic understanding in. You don't even need to actually do any programming in Assembly, unless you are planning to work engine optimization in the future. If you like it, though, by all means go ahead and learn it. What you need to understand is what happens in the processor when you call a function (subroutine), and how memory is allocated in different situations. Learning a little bit of Assembly is the best way to go about it.
So as far as starting, get a textbook for learning C. Unfortunately, I'm not the best person to recommend anything in particular. I learned C very long time ago. If you have an option to take a course, it's even better. Most courses teach C++. If it's between learning C on your own and starting with C++ in a course, later is better. But in that case, at least look through a C textbook so that you know what the differences are.
As far as VB goes, universities teach it because they get a lower rate of people dropping out from VB course than C/C++ course. VB is far more forgiving of rookie mistakes, and getting code to run on it is not as frustrating for beginners. For universities, this means that teaching VB is more profitable. Fact that your skills are less valuable afterwards is of little concern to them. That is an unfortunate reality of curriculum in all but the top universities. If you want to learn something useful, you'll always have to go beyond and above what the program teaches.
|How? Is it possible if you don't know c++.|
You mean, is it possible to learn C# without learning C++? Of course. The problem is that if you learn C#, you know C#, and switching to C++ will be a pain, because a lot of things just won't make sense. There are a lot of shortcuts built right into C# language which aren't there in C++. Some of them make your life easier, but they always come at a cost of not knowing what your program is really doing. If you just jump into C++ from C#, you don't know how to do without these shortcuts.
If you go from C++ to C#, you already know all the basics. Sure, like with any language, you will still have to learn all the nuances before you are truly proficient, but there'll be a lot fewer things you'd need to re-learn when going from C++ to C# as opposed to going from C# to C++.
There are some people who advocate learning only C# because you'll never need anything else, but that simply isn't true. C# has its uses, but they are limited. If you stick to C#, you'll be limiting yourself just the same. If you learn C++, you'll be able to switch over to C# or Java development if necessary. Learning C++ gives you the highest number of employment opportunities, so it's definitely the best language to invest time in.
It's also important to explore other languages along the way. A good programmer knows at least one esoteric language. And if you plan to work in AI, you absolutely must learn Prolog. That one's a brain-twister.
Posted 17 September 2011 - 06:45 AM
It really makes sense now why the colleges are on to VB now.
And lastly again thanks, I will stick to your points
Posted 17 September 2011 - 07:05 AM
At some point, if you plan to work in game development, you'll need to learn Visual C++ IDE. It's a beast. Some things will be familiar from VB, but a lot of things are specific to C++. There are pages and pages of settings, and you'll need to know what a lot of them mean. You can get an Express edition of VC++ for free. It might not be your-first-program-in-C sort of thing, but you definitely need to learn how to work with it early on.
Posted 17 September 2011 - 07:14 AM
Ok so how do i compile it through cmd?
So which is the best compiler out there? Should i use the compiler that came with dev c?
EDIT: WIll it be fruitful to learn c along with GBA programming? I think it will be interesting tok
Posted 17 September 2011 - 08:07 AM
|QUOTE (K^2 @ Saturday, Sep 17 2011, 16:52)|
|You mean, is it possible to learn C# without learning C++? Of course.|
LOL! No, I meant converting from C++ to C#. I consider myself knowledgeable of C# but I don't know how to code in C++.
Posted 17 September 2011 - 08:19 AM
Posted 17 September 2011 - 08:45 AM
|QUOTE (K^2 @ Saturday, Sep 17 2011, 16:52)|
|There are some people who advocate learning only C# because you'll never need anything else, but that simply isn't true. C# has its uses, but they are limited. If you stick to C#, you'll be limiting yourself just the same. If you learn C++, you'll be able to switch over to C# or Java development if necessary. Learning C++ gives you the highest number of employment opportunities, so it's definitely the best language to invest time in.|
Sadly, that seems to be the way software development is going! Microsoft, etc are moving away of developing programs to interact with hardware and are just concentrating on levels 5, 6 and 7 rather than 2, 3 and 4 (which, if I remember correctly are the hardware layers). I have ask my friend where he got the diagram he showed me with the levels on it.
Posted 17 September 2011 - 09:09 AM
The fact is, there is a serious dilemma. Modern programs are so complex that you cannot write them in low-level language, and so hardware-intensive that you can't write them in a high-level language. You either make a clusterf*ck that's full of bugs, or something that's so bloated it can barely run on high-end machines. Or both.
C# attempts to address that, but does so clumsily. Far better solutions have been floating around for a while. The idea is simple. Take a high-level scripting language, like Python, and use it to string together a bunch of low-level code written in C. You get all the benefits of garbage collection, simple debugging, and easy-to-read code on the top-level, while getting all the performance on the low level.
I've worked a bit with the guys who are building the Grit Engine, and I really liked working with it. It uses Bullet physics engine (C++), Ogre (C++), and Lua ( C ). Some additional custom code to handle numerical computations for physics and rendering is written in C++. All of this is held together with Lua scripts. And it runs damn well.
Basically, what I'm saying, is that you shouldn't be trying to make a Swiss army knife of programming languages. It's not necessary. Cross-language developments show us that there are much better ways to address diversity of requirements for different parts of the engine. Right now, you really can't beat C/Assembly combo for low level stuff. C++ is absolutely fantastic for intermediate wrappers. Number of good options exist for high level functionality. C# is not going to do better in all these areas at once.
The reason I'm not more aggressive against C# and XNA is because I've seen what it can do for indy gaming. Small teams that do not have resources to have several people working on each component of an engine, working in completely different development environments can definitely benefit from XNA platform and C#. For them, C# is a fantastic solution that lets one programmer take care of their high and low level stuff without slowing the code down too much, while XNA provides a number of prefabs to make physics and graphics portions entirely manageable.
Posted 17 September 2011 - 11:43 AM
Posted 17 September 2011 - 02:28 PM
Posted 17 September 2011 - 02:37 PM
Posted 17 September 2011 - 02:45 PM
Posted 17 September 2011 - 03:30 PM
Posted 17 September 2011 - 04:30 PM
The distinction between interpreters and compilers is important. A compiler will produce code to be executed by processor later, while interpreter executes commands as it encounters them. There are also crazy hybrids, like Java. Java program is first compiled into bytecode, which is later interpreted by Java Virtual Machine on target platform. This allows compiled Java code to run cross-platform, so long as the platform has JVM running on it.
As far as writing compilers and interpreters, C tends to be the language of choice, sometimes with heavy use of Assembly. Very few modern programs are written entirely in Assembly, but early compilers obviously had to be. For interpreters, Java is also pretty common, because it allows for the same interpreter to run on different platforms utilizing JVM. Of course, that is very inefficient. A Python script running under JPython that's running on a JVM, that's running under some OS on some physical processor should not be used for heavy computations. But sometimes, computational efficiency isn't what you are looking for in a program.
Posted 18 September 2011 - 12:52 AM
|QUOTE (K^2 @ Sunday, Sep 18 2011, 00:58)|
|The only use of C# is that it's a cross of a high and low level languages. Diluting it further would defeat the very purpose. The problem is that it's realistically not needed. Assembly, C, and C++ fill out the low and mid-level niches perfectly. No reason to mess with that. What could be of some use are better high-level alternatives. Languages like Python are too rigid, and languages like Prolog are too obscure for most tasks. But I really don't think that sort of thing will come from Microsoft originally.|
Although, just using C# would mean you only have that concentrate on that rather than try and juggle two or three different languages at the same time. However, for learning purposes C# and other Microsoft languages don't allow as much as the open source stuff such as Java (yes, I am learning Java too). I just don't like having to learn multiple languages it becomes too confuses for me.
Posted 18 September 2011 - 01:20 AM
Java is a good language to learn, certainly. It's also great if you want to work on mobile applications. Or if you are Notch, apparently. But for PC/console gaming it's not the way to go.
In any case, the more languages you learn, the easier it will be to pick up new ones. At some point, it's not even a matter of whether or not you know the language. Give me a manual and a few days, and I'll be an expert in whatever the project calls for.
Posted 21 September 2011 - 05:07 AM
From what I hear these days from most my friends that IT recession is going low, so there is high demand of IT professionals. I agree with what they said but I want know will it be again ups and downs in the IT field in the near future? How is IT career stable
Posted 21 September 2011 - 09:20 AM
Posted 23 September 2011 - 12:53 PM
Posted 06 October 2011 - 08:25 AM
|QUOTE (Swoorup @ Friday, Sep 23 2011, 23:23)|
|I think even if the industry is down, I think the salary is the same with little ups and downs.|
The differences in both languages aren't that significant anyway! There are companies that have developed software that will convert between the two languages.
Posted 06 October 2011 - 09:10 AM
Posted 06 October 2011 - 12:53 PM
Posted 06 October 2011 - 01:11 PM
Posted 28 November 2011 - 02:08 PM
|QUOTE (Swoorup @ Saturday, Sep 17 2011, 04:55)|
printf("RIP, Dennis Ritchie.\n");
This program in in c not in c++
You can write this in c++ like this..
cout<<"RIP, Dennis Ritchie."<<endl;
or like this also
cout<<"RIP, Dennis Ritchie."<<endl;
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users