Can i ask some help what is the best editor to use in learning C language....
By the way which is which language, should or i must to learn C or C++ ?.
Thank you in advance.
for the editor notepad++ will do. It maybe not the best out there, but that's what I use all the time and it support programming languages from ADA to YML.. Learning C , before learning C++ would not hurt. In fact, it will give you a really good foundation in coding practices. Please read more here.
On the one hand, I agree with veedoo regarding the use of a general-purpose editor; it is often better to have one editor which you are well-familiarized with, than to jump between different editors based on the language. OTOH, there are always circumstances where you won't be able to use your favorite tools, so being familiar with several may have its place as well.
If I may ask, which compiler are you using? This could influence which IDEs are suitable or available; for example, Code::Blocks can work with several different compilers with little effort, including the MinGW GCC (the default) and the Microsoft and Borland C++ compilers. Others, such as Visual C++, are essentially compiler-specific (it is possible to use it with other compilers, but it is so much work to set up that it's not worth the effort). Also many compilers come with IDEs these days, even strictly C language compilers such as Pelles C.
As for which language to learn first, well, in my arrogant opinion, both C and C++ are languages best learned as one's third or fourth language; you generally want to have a good grasp of basic programming before digging into the lower-level details which C excells at, while C++ is a bit of monster, a giant language which gives you not just the rope to hang yourself with, but the scaffold, trapdoor and lever, too. My experience is that most newcomers can learn a higher-level scripting language, then an assembly language, and then learn C or C++, in about the same amount of time it takes to really master C++ from scratch, and get more out of it along the way as well.
If you really are starting from scratch, my usual recommendation is to learn basic HTML markup before taking on programming at all, as it let's you get familiar with the basic structure of programming languages (and techniques such as indentation and using highlighting editors) while still being a lot simpler than an actual programming language.
From there I would learn a high-level interpreted language, such as Python, Ruby or (my personal preference) Scheme. This gives you a chance to master the techniques without having to worry about details such as memory management, while still having a rich enough language and library to be able to develop real-world programs.
I would then go to the other extreme and learn an assembly language, though I don't really feel that the x86 and x86-64 instruction sets are really the best for beginners... you might want to learn something simpler such as MIPS first, using one of the many simulators available such as SPIM. Learning x86 should still be the overall goal, but once again, learning the simpler system first makes learning the more practical system faster, such that you can learn both in about the same time it would take to learn just the harder one by itself. When you do learn x86 assembly, I would stick to Netwide Assembler, as it is simpler and more regular than Macro Assembler and more widely used than most of the other alternatives.
This is about the time you should consider learning either C or C++... which you want to learn first is a matter of personal inclination, I would say. C is the consummate systems language, being bth simple and very low-level yet capable of fairly complex abstractions. Simplicity is very much a part of the language's philosophy. C++, conversely, is a hybrid of C and early object-oriented languages such as Smalltalk or Simula, and takes a much more expansive, all-encompassing approach while still being tied to many of the advantages (and limitations) of the low-level approach. You'll definitly want to learn one of the two, but they take such different directions that it isn't really relevant that C++ is derived from C - the differences outweigh the similarities. Pragmatically, C++ is more widely used, but C is absolutely necessary if you are intending to learn systems programming, and is the lingua franca of compiler design, algorithms, and operating systems. I would recommend C over C++, personally, but either one would serve you well in the long run - but neither is really a good starting point.
Schol-R-LEA has an overall good analysis. I'll comment on three points.
Regarding more important skills to develop. Quiz: What's the core of professional software development? Answer: documentation. Reading it, writing it, maintaining it. If you don't have good natural language skills, that's going to hurt you far more than any of the thousands of programming languages you don't know. Similarly, if you don't follow good commenting practice and write good design docs, you could write code that outperforms the next guy's by a factor of 1000 and it might not matter. Cheaper hardware will make inefficient code faster. Nothing will make confusing code easier to understand.
Just my $0.02
What's the core of professional software development? Answer: documentation.
That is surely important, but for me the thinking organized way and ability to analyze logically things goes first.
I'm going to partially disagree with you on that point. On the one hand, organization and documentation go hand in hand. Disorganized code can be absolutely undocumentable, and when you find yourself coding or designing something that you don't know how to document, you know when it's time to back up and think things through again.
On the other hand, I'd still rather read oddly designed code that's correctly formatted and well-documented than code that's logically structured but uses variables named
value3 ad infinitum.
We are not particularly in disagreement in that point, as I have been known to say to newbies that actually learning to name variables and indenting/spacing code is more important in long run than just 'get the code run and produce expected output somehow'
Hi,is it okay to use Borland compilers?
No, but it is popular form of torture in some parts of world ;)
Everything has its time, and for Borland C it was in different century.
i like visual studio at work cause it's easy to navigate big project, bot at home i usually use vim, gedit maybe kate. I use notepad++ too sometimes at work, it's great.
That depends on how old the compiler is; if you mean C++Builder XE, for example, that should be fine, as it is a current-day IDE and compiler which has an excellent (if proprietary) GUI library.
However, I would avoid the older MS-DOS Turbo C compiler, if you have any choice in the matter at all. It is now over 20 years old, and badly outdated, both in terms of its capabilities and with regards to the version of the C language it supports. There are much better Windows compilers available for free, such as Pelles C or Code::Blocks, which give full support for 32-bit and 64-bit Windows.
(That goes double for the Turbo C++ compiler, as it predates the C++98 standard which changed the language considerably.)
@pyTOny,what environment should i use to write C code?..I mean just like java,we write code in jgrasp,eclipse,netbeans..and for C language?
If you just want to learn C, you can do it on linux via geedit, joe, or other text editors (vi, vim etc.)
Windows: I prefer Eclipse with MinGW (you can have it packed and ready to go by the version for C/C++ developers as you can find here . It's all free and easy to instal. But I repteat, it's just my opinion.
(Personally I learned C on Linux using Vim, but Eclipse it's ok too. And yeah, eclipse offers packages for Linux and Windows.)
Use any editor you like. I use Textpad, but Emacs is well known, and easier to use than it once was. Learnig C first wouldn't do any harm. Familiarity with C will make it easier to learn C++.
Whether C or C++ would be better depends upon the type of programming you are going to be doing. For applications programming C++ tends to be preferred, but it has an overhead which renders it unsuitable for systems and embedded programming. For that kind of programming C is almost universally used.
My favorite IDE on MS-Windows is VC++ 2010 Express (free), but there are several others almost as good such as Code::Blocks. All C++ compilers that I've heard about also compile C code -- just give the file *.c and it will be compiled as C code, while *.cpp file name is compiled as c++.
Regardless of what programming language you want to learn you will need to have a good grasp of highschool algebra and trig. If you can't add 1 + 1 then you will not be successful programmer. Some types of progrogramming require higher math skills or skills in other subjects such as electronics and physics. Programming is not done in isolation, instead it is always done in conjunction with other fields of study.
@Ancient Dragon, Thank you for your advise.,
can you guide me to build and use CodeBlock compiler???
I have downloaded the below stuffs and launched CB.
1) CB nightly (codeblocks-10.05-release)
Placed both dll in CB location and lanched CB.
When i open CB some Global variable dialog is poping out. I dont know wat to set in this dialog window. When i simply close and build it, its showing debugger is not configured. Its showing the below error in build log.
Goto "Settings->Compiler and debugger...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
I'm new to this CB compiler.i just want to build the code and debug it.
When i googled it i found List of names for global compiler variables for CB. i dont know to which i need to use for wat. Currently i'm using MS Visual Studio 2010 in my system.
Thanks in advance.
You downloaded the wrong version of CB. That version is intended for people who want to modify or enhance the CB ide and could contain bugs, not intended for general programming use. What you want is the binary CB with MinGW compiler. When you run the setup program it will install and configure everything for you. Uninstall what you have before trying to install the binary version.,
use g++ on linux if those ide are too hard to understand with g++ you will have full control
use g++ on linux if those ide are too hard to understand with g++ you will have full control
g++ is not a C compiler. Please make a token effort.
gcc is for C. just install the MinGW one, and you'll be fine regarding the copiling process, but take one of the latests versions.