Pelles C forum

C language => Beginner questions => Topic started by: wallep on October 18, 2012, 02:54:13 AM

Title: Pelles C versus Code::Blocks
Post by: wallep on October 18, 2012, 02:54:13 AM
Hi Members,

I am new to programming.  I have decided to learn the C language and then C++. My primary focus at this point is C.

I would like to utilize an IDE. I see two IDE's that have very good support. They are Pelles C and Code::Blocks.

Pelles C is a lite download. Only about 10 MB or so and has a great forum. Code::Blocks is a 70 MB download and has C++ as well.  Also availability for GUI programming in C++.

I'm primarily using a web site called www.cprogramming.com as a learning source as they offer many tutorials. They recommend Code::Blocks as a their IDE but I'm sure Pelles C would work as well.

Can anyone suggest which one. I understand they are both very good.

Thank you
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 18, 2012, 05:31:09 AM
Hi Wallep...
I've been using Pelles C for 8 years now.  I've was also a regular on cprogramming.com for a couple of years. 

So, here's how I see things...

First of all the tutorials on CProg are way too brief to be of much value as a learning tool.  They are meant as quick introductions for people who are picking up C after working in something like Java or Basic... they are not enough to properly learn the language and certainly not enough to give you a solid base in programming concepts. For that you need something far more extensive; a good book or at least an extensive online tutorial.  I generally recommend starting off with "Teach Yourself C Programming in 21 days (http://www.amazon.ca/Sams-Teach-Yourself-21-Days/dp/0672324482)" for a good general base, then you should follow up with Kernahan and Richie's "The C Programming language (http://www.amazon.ca/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?s=books&ie=UTF8&qid=1350528152&sr=1-1)" for a more indepth understanding. Yes it means spending a bit of money... but it is well worth the money to do this right.
 
As for the best learning strategy... give THIS (http://forum.pellesc.de/index.php?topic=4644.msg17797#msg17797) a read.
 
As far as IDE's are concerned, the best I can tell you is that I started on POIDE and have repeatedly gone out and looked for a better tool to use for my work.  There isn't one. If there was, I would be there. Code Blocks is bloatware that comes with the MIN-GW flavour of C++ and is missing a lot of helpful tools for Windows programming, such as resource editors, message table editor, etc.  Also be aware that MIN-GW, while a perfectly sound implementation of C is primarily intended for C++ and is thus not entirely standard C.  You want to learn C-99 and C-11 the two currently active standards (Both supported by Pelles C)... you can learn about the variants later.
 
Also, learn your way around the Pelles C help file... it's one of the best I've ever seen. All C keywords and library functions are fully documented as well as all the various aspects of the IDE and command line tools.  F1 is your friend!
 
Pelles C is an excellent C compiler. Currently there are some problems with the optimizer so, while learning, you should build your projects with Optimizations set to NONE in Project -> Project Options. I've used it for commercial as well as private software for a long time and, like the IDE, I've repeatedly looked for better without finding it.
 
There are a couple of AddIns you will find helpful in organizing and maintaining your projects. You should probably install the Workspace Manager (http://forum.pellesc.de/index.php?topic=4616.msg17675#msg17675)  I wrote to provide a more flexible organization of projects and workspaces. When you get to C++ you will likely want to try the VC++ AddIn (http://forum.pellesc.de/index.php?topic=4235.msg15598#msg15598) which, although not perfect is certainly enough to let you get your feet wet in the new language. There are dozens of AddIns... Installation is easy, read the FAQ (http://forum.pellesc.de/index.php?topic=4692.msg18087#msg18087).   

For CProgramming.com forums... one word: "Politics"... Programmers are pretty direct --often blunt-- people. They criticise one and other very directly, mistakes are pointed out in flat terms, bad ideas are tagged as such. But, on CProg there is a core group who basically make sure everyone either does it their way or gets picked on mercilessly... including some who carry outright prejudices about things like Windows API and C. To me this is not an atmosphere condusive to learning. It's a fiefdom. You need helpers who will be honest and direct with you about the best ways to do things and correcting your mistakes... and you should be grateful for the criticism. Don't expect that on CProg.
 
About  C++, well, what can I say? It's a different language. While the underpinnings are C the language and it's programming paradigm are totally different.  I'd suggest you spend a year or two with C, get good at it, absorb as much programming concept as you can... then move to C++ with an open mind. Comparing the two is a mistake. You'll be learning all over again.  Probably the best book for that is "Thinking In C++" Volume 1 (http://www.amazon.com/Thinking-Introduction-Standard-One-2nd/dp/0139798099) and Volume 2 (http://www.amazon.com/Thinking-C-2-Practical-Programming/dp/0130353132) which I found to be very helpful.  Just remember, OOP in C++ is an entirely different mindset than procedural or functional languages like C... and you have to treat it as such.
 
Throughout this keep in mind that Programming is about 70% research and planning, 10% writing code and 20% fixing your own mistakes. It's not a profession for people with fragile egos or enormous pride. Coding will take that out of you in no time flat. But if you presevere and get good at it, programming and overall software development can be an extremely rewarding career or hobby... Just don't expect to do it overnight.
 
Welcome to the forums... and the coding game.
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on October 18, 2012, 07:12:00 AM
Well, I can wholeheartedly agree with the statements about cprogramming.com. I think this is a very bad resource, specially when interested in learning to program in C, as pretty much everything is in reference to C++ or at best C with a C++ compiler. It's very easy to pick up a lot of C++ specifics which can cause endless headaches for newbies on a plain C compiler.

On that note, people need to realize that C and C++ (and C# for that matter) are different languages, with the later having only a few basics still in common with C.

If you are in fact interested in learning C, I would strongly recommend Pelle's C, as it is a plain C compiler. But it should also be noted that it is a plain C compiler for Windows, so what works here might not work the very same way in Linux/Unix or Mac OS X...

Didn't know about Code::Blocks before, just had a brief look at it and I am less than optimistic about it. It seems to focus primarily on C++ and the GCC/MingW compiler chain, which I personally despise (YMMV). And I am not sure how up to date this is kept, even the note of their "nightly builds" doesn't look quite convincing to me. Pelle has long phases of apparent non-action only burst out with a new version to everyone's surprise... :P

If I had to do some C++ work in recent years, I have used Orwell's DevC++ (http://orwelldevcpp.blogspot.com/) (not the original Bloodshed DevC++, that is dead), which works actually quite nicely...

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: AlexN on October 18, 2012, 09:37:53 AM
Pelles C is a lite download. Only about 10 MB or so and has a great forum. Code::Blocks is a 70 MB download and has C++ as well.  Also availability for GUI programming in C++.
If you read the forum of Code::Blocks you will see, that Code::Blocks is only an IDE. There are downloads boundled with the GNU-GCC compilers and debugger but it is only an IDE.
Pelles C is complete package with IDE, debugger, compiler, resource editor and ...
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 18, 2012, 09:59:45 AM
Pelles C is a lite download. Only about 10 MB or so and has a great forum. Code::Blocks is a 70 MB download and has C++ as well.  Also availability for GUI programming in C++.
If you read the forum of Code::Blocks you will see, that Code::Blocks is only an IDE. There are downloads boundled with the GNU-GCC compilers and debugger but it is only an IDE.
Pelles C is complete package with IDE, debugger, compiler, resource editor and ...

One of my big grumbles with Code::Blocks is that it comes with a bunch of pre-configured compiler setups that you cannot delete or replace... leaving you to dig through a 30 item menu when you have only 1 compiler installed.  Actually there's several cases like that, not just compilers.

Of course I have the reverse grumble with POIDE... Can't easily add more compilers...


Title: Re: Pelles C versus Code::Blocks
Post by: wallep on October 18, 2012, 08:56:27 PM
Hi CommonTater,

Thank you very much for the detailed reply. I truly enjoyed reading and learning from your post. I did read your suggested thread titled, "How to learn C....so it sticks". The thread was extremely educational. It is very difficult to find such honest and flat-out 'plain vanilla' advice in regards to taking that first step.

I posted this same question on the Code::Blocks forum to be sure I'm receiving the opinions of both sides.

Perhaps I need to further explain what my programming intentions are.

I have experience in HTML and CSS web page coding albeit at a very basic level. Although this is not related to 'C' programming, it's just something I have some experience with. That's all.

Please see my most recent web page that I created.
(yes,I am a musician as well)
http://education.heliohost.org/elizabethreed/index.html
 
I am currently running four operating systems GNU/Linux (Debian), Win7, WinXP, and win2k. I'm primarily on the win7 and win2k system all day. I dual boot Win2k and Debian on the same system.

I enjoy working in windows and have for many years. My goal is to 'eventually' to be able to program in both GNU/Linux and Windows using a cross-platform IDE although using separate IDE's or compilers for both OS's is always an option. That is why I originally considered Code::Blocks which to my understanding is cross platform.

I am just learning the interface 'GNOME' on Debian and slowly learning how to maneuver around in this new environment. The programming tools for Linux are amazing from what I've read.

My search for a compiler and IDE started with this well detailed wiki page: Specifically the comparison section titled, "C/C++".
http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments

I have briefly used Code::Blocks and found it very helpful but would like to consider something more 'plain vanilla'. I also tend to work better in a smaller environment with a core group of people.

A hurdle with some of the bigger IDE's (for a new programmer) is that they are too good! They include most everything. I get lost wondering why I'm at a specific location accomplishing a specific task. In other words, I would like to understand the function and structure of the tool prior to programming code.

I understand that to learn some aspects of structure coding is required. However, beginning the process by following a hello-world tutorial is certainly a wonderful beginning but I would also like to learn the the tool itself (what files need to be created for a project, what the files are used for and why they are needed, what is a Bitmap, a string table, a table editor and libraries etc. etc.). I have searched google and found answers to some of my questions.

I do watch programming videos, read, study and pick up bits and pieces to help answer some of my questions.

QUESTION #1 please:
Would you recommend learning Visual Basic first prior to learning the 'C' programming language? Or do you recommend starting with the 'C' programming language immediately? I'm certainly not a complete newbie to programming but I have run across this topic from time to time.

I have also been studying Linux for the past couple of months and have finally installed my first Linux OS (distro). I am very happy to have succeeded at this. During my studies I have become fairly familiar with GNU, GCC, emacs, MinGW, wsWidgets, GTK+, etc.. However as one dreams to program on a cross-platform basis, and utilize the tools that work in both environments (Linux and windows), the setup time, configuration, familiarity of the interfaces as well as the learning curve can be quite an uphill climb.

QUESTION #2 please:
At this point, I simply prefer to 'back-up a bit' and start learning how to program in windows. That is the level I am most fluent.
 and familiar with. After all, I've been using windows since 1993. It's just where I'm at now. Also the language of 'C' doesn't change if applied to Linux or Windows. 'C' is 'C' no matter where deployed? Is this correct?

Then there's the question of "what programming architecture".  Is it Win32, .NET, wxWidgets, GTK+ on and on. It becomes daunting to someone just entering the programming field. And then there's Linux! I have briefly worked with MS Visual Basic Express 2005 and have found it to be a very helpful IDE but I wanted to learn just plain 'C'.

QUESTION #3 please:
Eventually as I become familiar with Linux and coding in both Windows and Linux, I can simultaneously work with a cross-platform IDE and learn to install GNU tools and begin to experiment. Or as I mentioned earlier, utilize separate IDE's or compilers and text editors that are geared for a specific OS and design architecture. Correct?

Many people on the Linux side are just as helpful as you have been on this thread. Complete professionals with a knack for quality advice and support.

> Code Blocks is bloatware that comes with the MIN-GW flavour of C++ and is missing a lot of
> helpful tools for Windows programming, such as resource editors, message table editor, etc.

I did read on particular forum this:

**Begin**
The big advantage of PellesC over Code::Blocks is the IDE features. If you go with Code::Blocks and MinGW you will need to find your own Resource, Dialog, Icon, Bitmap, String Table and Message Table editors, all of which are included in PellesC from the git-go. (And good luck finding a free standing Message Table editor!)
**End**

**Note**
I also read that if a programmer embeds tools such as ResEd into Code::Blocks that it can make Code::Blocks a very powerful IDE.

QUESTION #4 please:
Any opinion please on the above statements? Does it affect me at my level of experience (as in just starting to learn 'C' programming)?

> I generally recommend starting off with "Teach Yourself C Programming in 21 days" for a good > general base, then you should follow up with Kernahan and Richie's "The C Programming
> language" for a more indepth understanding.

Yes I do already own, "Teach Yourself C Programming in 21 days" but it is the 1995 'premier edition'. Not the current 6th edition. Not sure if this is a huge difference but it is a bit hard to follow but a very thick book full of info. Just not sure if it is C-99. I don't believe so as it is dated 1995.

I have also heard about, Kernahan and Richie's "The C Programming language" as well as Petzold's book on programming in windows. Thank you.

I've read much about which language is the best to start with and I was convinced (actually educated) by some articles and links that suggested 'C' is the place to start. , I have also known for years that languages written closer to machine language such as 'C' language (besides Assembly Language)  can be more powerful and stable (if correctly coded).

http://crasseux.com/books/ctutorial/Introduction.html#Introduction
http://crasseux.com/books/ctutorial/Advantages-of-C.html#Advantages%20of%20C
http://www.gnu.org/prep/standards/html_node/Source-Language.html#Source-Language

He also promotes 'Lisp' as a language to consider as well but I don't want to get over indulged in choices. It becomes too overwhelming. To my understanding every other language -at some point- branches off 'C'.

Alex Allain's article on www.cprogramming.com was also inspiring.
http://www.cprogramming.com/whyc.html

> Also be aware that MIN-GW, while a perfectly sound implementation of C is primarily intended > for C++ and is thus not entirely standard C.  You want to learn C-99 and C-11 the two
> currently active standards (Both supported by Pelles C)... you can learn about the variants
> later.

QUESTION #5 please:
I'm glad you brought that to my attention. I did not know about certain standards such as you mentioned. I did read this article below but not sure of the date. I assume 1999 Standard C is abbreviated C-99 and 2011 Standard C is abbreviated C-11 ?  Yes, that is what I need to hear...."you can learn about the variants later."

QUESTION #6 please:
As mentioned earlier, I already own, "Teach Yourself C Programming in 21 days" but it's the 1995 'premier edition'. Not the current 6th edition. Not sure if it is C-99. Is this version still usable?

Articles I found very helpful:
http://www.gnu.org/prep/standards/html_node/Source-Language.html#Source-Language
http://www.linfo.org/create_c1.html

I have also looked and Lcc-Win32
http://www.cs.virginia.edu/~lcc-win32/

QUESTION #7 please:
My understanding is the compiler in Pelles C is based on Lcc albeit in a much upgraded capacity. Is Lcc-win32 still a popular program used by programmers?

> Pelles C is an excellent C compiler. Currently there are some problems with the optimizer so,
> while learning, you should build your projects with Optimizations set to NONE in Project ->
> Project Options. I've used it for commercial as well as private software for a long time and, like
> the IDE, I've repeatedly looked for better without finding it.

Ok, I will be aware of that. Thank you

> For CProgramming.com forums... one word: "Politics"... Programmers are pretty direct --often > blunt-- people. They criticise one and other very directly, mistakes are pointed out in flat
> terms, bad ideas are tagged as such.

Fully aware. Thank you

> But, on CProg there is a core group who basically make sure everyone either does it their way > or gets picked on mercilessly... including some who carry outright prejudices about things like > Windows API and C. To me this is not an atmosphere condusive to learning.

Yes I understand. I try to ignore it, learn what I can and move on.

> It's a fiefdom.

Now there's a new word!  Fiefdom  - Something over which one dominant person or group exercises control.

> You need helpers who will be honest and direct with you about the best ways to do things
> and correcting your mistakes... and you should be grateful for the criticism.

Yes, I understand. In my experience, I find there exists those who are true professionals who help build-up your self-esteem and your character to think a problem through and conquer it. They are the best support that one can experience.

> About  C++, well, what can I say? It's a different language. While the underpinnings are C the > language and it's programming paradigm are totally different.

QUSTION #8 please:
The reason for C++ (I thought), was to create GUI programs.  Apparently GUI programs can be constructed using 'C'  but at a more difficult level ?

> I'd suggest you spend a year or two with C, get good at it, absorb as much programming
> concept as you can... then move to C++ with an open mind. Comparing the two is a mistake.
> You'll be learning all over again. 

Question #9 please:
Ok, thank you. Is there any advantage to knowing 'C' prior to learning C++? I read opposing views on this.

> Throughout this keep in mind that Programming is about 70% research and planning, 10%
> writing code and 20% fixing your own mistakes.

Now that's an eye-opener!

Thank you very much
Title: Re: Pelles C versus Code::Blocks
Post by: wallep on October 18, 2012, 09:39:08 PM
Hi Bitbeisser,

> It's very easy to pick up a lot of C++ specifics which can cause endless headaches for newbies
> on a plain C compiler.

Ok, that is good to know.

> If you are in fact interested in learning C, I would strongly recommend Pelle's C, as it is a plain
>  C compiler. But it should also be noted that it is a plain C compiler for Windows, so what
> works here might not work the very same way in Linux/Unix or Mac OS X...

That is OK. I'm simply looking to begin the process of learning to code in 'C'. Coding in Linux can begin at a later point and with different tools if need be.

> Didn't know about Code::Blocks before, just had a brief look at it and I am less than optimistic > about it. It seems to focus primarily on C++ and the GCC/MingW compiler chain,.......

Question please:
The whole C and C++ combination in a compiler is actually confusing me. If a compiler is written in C++ and compiles in C code then what is the difference as oppose to a compiler written in C that compiles C code ?

I'm sure they are fine to the experienced programmers who are familiar with their quirks (if any) but I'd much prefer to work -at the very least- in a pure 'C' environment and simply begin the learning process.

Thank you for helping.

Title: Re: Pelles C versus Code::Blocks
Post by: wallep on October 18, 2012, 10:12:01 PM
If you read the forum of Code::Blocks you will see, that Code::Blocks is only an IDE. There are downloads boundled with the GNU-GCC compilers and debugger but it is only an IDE.
Pelles C is complete package with IDE, debugger, compiler, resource editor and ...

Hi Alex,

That is good to know. Thank you.

Question please:
I guess my first clarification is to further understand what components are included in a software developers tool kit that would classify this toolkit as an IDE or simply as separate tools?

Or rather, how does a 'feature rich' IDE compare to a 'no-frills' IDE and then comparing both to utilizing separate tools such as a separate text editor (i.e. notepad++) and a separate compiler. This is the most confusing part when beginning the process of learning how to program (when initially searching for tools or a pkg. that contains a combination of tools).

I did read this and found it very helpful:
http://en.wikipedia.org/wiki/Integrated_development_environment

Thank you Alex
Title: Re: Pelles C versus Code::Blocks
Post by: wallep on October 18, 2012, 10:31:00 PM
Hi CommonTater,

One of my big grumbles with Code::Blocks is that it comes with a bunch of pre-configured compiler setups that you cannot delete or replace... leaving you to dig through a 30 item menu when you have only 1 compiler installed.  Actually there's several cases like that, not just compilers.

Yes I did see the long list of choices in Code::Blocks when I compiled some basic 'newbie' test programs. However it was not a problem for me when I was trying it for the first time. If I remember correctly, the default compiler I utilized always appeared at the top of the list. But then again, I was using the latest version 10.05.

Thank you CommonTater
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on October 19, 2012, 03:17:53 AM
Quote from: CommonTater
But, on CProg there is a core group who basically make sure everyone either does it their way > or gets picked on mercilessly... including some who carry outright prejudices about things like > Windows API and C. To me this is not an atmosphere condusive to learning.

It's a fiefdom.
Of course, what he neglects to mention is the reason he hates cprogramming.com, and that's because the "do it my way or be criticised" mob largely consisted of himself. When he couldn't peddle his misinformation and bad techniques onto people who didn't know better without being pulled up on it by people who did, he proceeded to threaten the members (http://cboard.cprogramming.com/general-discussions/140513-happy-birthday-mario.html) and was summarily banned. (http://cboard.cprogramming.com/general-discussions/149727-tater-banned.html) But then again, I'm sure he'll say it wasn't him despite the astronomical odds of two Canadians called ******* (google it for some hilariousness) each choosing the same forum user name.
I have never posted on that forum and in general can only concur to his assessment of cprogramming.com overall.

And it looks you fared at least as bad as he did if not for worse. And there is no reason, what so ever, to do what he already mentioned over there that you come in here now and keep stalking him. Please consider yourself warned...

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 19, 2012, 03:32:21 AM
I enjoy working in windows and have for many years. My goal is to 'eventually' to be able to program in both GNU/Linux and Windows using a cross-platform IDE although using separate IDE's or compilers for both OS's is always an option. That is why I originally considered Code::Blocks which to my understanding is cross platform.

Worry first about learning programming _at all_.  A lot of the basics work everywhere, what you will need when you start cross-platform work is the differences, and those you can pick up later.

Quote
Would you recommend learning Visual Basic first prior to learning the 'C' programming language? Or do you recommend starting with the 'C' programming language immediately? I'm certainly not a complete newbie to programming but I have run across this topic from time to time.

No. It's a completely different scenario, again. All you're going to do is confuse yourself.
 
Pick a language and master it.  Then you can think about your next step... As they say on the watermellon farm: "One at a time is good picking".
 
Quote

 At this point, I simply prefer to 'back-up a bit' and start learning how to program in windows. That is the level I am most fluent.
 and familiar with. After all, I've been using windows since 1993. It's just where I'm at now. Also the language of 'C' doesn't change if applied to Linux or Windows. 'C' is 'C' no matter where deployed? Is this correct?

The language is the same, but the methodology is quite different under *nix systems... Starting with windows humble little console is a good way to learn.  Later you can look at the differences, as I mentioned above.
 
Quote
Then there's the question of "what programming architecture".  Is it Win32, .NET, wxWidgets, GTK+ on and on
.
 
At the risk of bringing another screaming idiot over here... Stick with C and Windows API at first. 
 
The big laugh is that GTK, WX etc. at some level all have to communicate with windows through it's API... it's kinda like driving from Chicago to New York on your way to LA.
 
Quote

Eventually as I become familiar with Linux and coding in both Windows and Linux, I can simultaneously work with a cross-platform IDE and learn to install GNU tools and begin to experiment. Or as I mentioned earlier, utilize separate IDE's or compilers and text editors that are geared for a specific OS and design architecture. Correct?

That is going to depend almost entirely on what you are doing... Experience will guide you.
 
Quote
The big advantage of PellesC over Code::Blocks is the IDE features. If you go with Code::Blocks and MinGW you will need to find your own Resource, Dialog, Icon, Bitmap, String Table and Message Table editors, all of which are included in PellesC from the git-go. (And good luck finding a free standing Message Table editor!)

Now that's funny... go back over to (you know where) and take a look who wrote that!
 
Quote

Any opinion please on the above statements? Does it affect me at my level of experience (as in just starting to learn 'C' programming)?

Simple answer... don't be a scatterbrain.  Concentrate on learning the language and basic programming skills. Worry about the rest of it later.  A Big plan is nothing but a whole slew of little plans executed sequentially.
 
Quote
I'm glad you brought that to my attention. I did not know about certain standards such as you mentioned. I did read this article below but not sure of the date. I assume 1999 Standard C is abbreviated C-99 and 2011 Standard C is abbreviated C-11 ?

Nope... I have no idea where they get the numbers from but it's not related to dates.  (Or if it is these guys are sure as shootin' slow on the uptake, since C-99 wasn't widely adopted until about 2006.)
 
Quote

 As mentioned earlier, I already own, "Teach Yourself C Programming in 21 days" but it's the 1995 'premier edition'. Not the current 6th edition. Not sure if it is C-99. Is this version still usable?

It'll get you started... but be sure to work the the Pelles helpfile to find the areas where what it teaches may be superceded or non-standard C.
 
Quote

My understanding is the compiler in Pelles C is based on Lcc albeit in a much upgraded capacity. Is Lcc-win32 still a popular program used by programmers?

Yes and no... It's still available, but I have no idea how many people are using it.
 

Quote
> It's a fiefdom.
Now there's a new word!  Fiefdom  - Something over which one dominant person or group exercises control.

And today you met the Sherrif.
 
Quote
The reason for C++ (I thought), was to create GUI programs.  Apparently GUI programs can be constructed using 'C'  but at a more difficult level ?


I don't find it all that difficult... just voluminous... but then you adopt the strategy of knowing how to look stuff up when you need it. With 20,000+ functions in the API no one person has any hope of remembering even a significant part of it. Just know where to find the info when you need it.


Quote
Ok, thank you. Is there any advantage to knowing 'C' prior to learning C++? I read opposing views on this.

Probably not.  They are different languages.  I think the reason so many people suggest one over the other is the same reason why some like Chocolate and others like Strawberry.
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on October 19, 2012, 03:43:36 AM
I'm glad you brought that to my attention. I did not know about certain standards such as you mentioned. I did read this article below but not sure of the date. I assume 1999 Standard C is abbreviated C-99 and 2011 Standard C is abbreviated C-11 ?

Nope... I have no idea where they get the numbers from but it's not related to dates.  (Or if it is these guys are sure as shootin' slow on the uptake, since C-99 wasn't widely adopted until about 2006.)
Sorry Tater, but wallep is basically right, it's the year of the release of the respective C standard.
 C99 refers to ISO/IEC 9899:1999 (http://) and C11 refers to ISO/IEC 9899:2011 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf).

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 19, 2012, 03:52:35 AM
The whole C and C++ combination in a compiler is actually confusing me. If a compiler is written in C++ and compiles in C code then what is the difference as oppose to a compiler written in C that compiles C code ?

At the bottom of it, it's all machine code... registers and opcodes.

However; to get certain things to work properly in C++ they had to change the underlying C language a fair bit, leaving you with incompatibities that are not always obvious.  (Google is your friend on this one!)
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 19, 2012, 03:54:13 AM
Sorry Tater, but wallep is basically right, it's the year of the release of the respective C standard.
 C99 refers to ISO/IEC 9899:1999 (http://) and C11 refers to ISO/IEC 9899:2011 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf).

Hi Ralf ...  Yeah I sorta knew that but the slow uptake thing does make me wonder.  :D 
Mostly I was trying to inject just a bit of humour into an already messed up situation.

Sorry if it didn't come out that way...
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on October 19, 2012, 04:39:56 AM
Sorry Tater, but wallep is basically right, it's the year of the release of the respective C standard.
 C99 refers to ISO/IEC 9899:1999 (http://) and C11 refers to ISO/IEC 9899:2011 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf).

Hi Ralf ...  Yeah I sorta knew that but the slow uptake thing does make me wonder.  :D 
Mostly I was trying to inject just a bit of humour into an already messed up situation.

Sorry if it didn't come out that way...
Just wanted to stick to the facts...  ;)

Slow uptake or not, IMHO, as I mentioned in a previous thread regarding this issue, I don't really consider anything in C99 or C11 a real worthwhile improvement over older "ANSI C" (aka as ANSI X3.159-1989/ISO/IEC 9899:1990, aka C89/C90).
A bit tighter typing maybe and the use of "//" style comments...

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on October 19, 2012, 05:22:16 AM
I am currently running four operating systems GNU/Linux (Debian), Win7, WinXP, and win2k. I'm primarily on the win7 and win2k system all day. I dual boot Win2k and Debian on the same system.

I enjoy working in windows and have for many years. My goal is to 'eventually' to be able to program in both GNU/Linux and Windows using a cross-platform IDE although using separate IDE's or compilers for both OS's is always an option. That is why I originally considered Code::Blocks which to my understanding is cross platform.
Well, yes, in theory. In practice, it isn't always that easy as this seems however.
I am working on a cross-platform project myself (with targets being Windows (XP/7/8), Linux and Mac OS X) and can tell from experience that there is no such thing as easy cross-platform development. Having the advantage of wxWidgets (fka wxWindows) can level a lot of the GUI part, but then you might run into a lot of more low-level issues like string encoding (the lovely Unicode/UTF/blablabla fun stuff) and basic file/folder conventions. That's where the real fun (or not) begins...  ;)
Quote
I am just learning the interface 'GNOME' on Debian and slowly learning how to maneuver around in this new environment. The programming tools for Linux are amazing from what I've read.
Well, start using them and then re-assess that statement...  :P
Quote
I understand that to learn some aspects of structure coding is required. However, beginning the process by following a hello-world tutorial is certainly a wonderful beginning but I would also like to learn the the tool itself (what files need to be created for a project, what the files are used for and why they are needed, what is a Bitmap, a string table, a table editor and libraries etc. etc.). I have searched google and found answers to some of my questions.
Well, that comes down to what I referred to in different threads in this (and other) forum(s) before. IMHO, People need to learn programming basics before the start dabbling in any specific language.
Quote
QUESTION #1 please:
Would you recommend learning Visual Basic first prior to learning the 'C' programming language? Or do you recommend starting with the 'C' programming language immediately? I'm certainly not a complete newbie to programming but I have run across this topic from time to time.
Neither nor. Start learning by programming Pascal. Real programmers DO program in Pascal... <BFEG>  ;D
Quote
I have also been studying Linux for the past couple of months and have finally installed my first Linux OS (distro). I am very happy to have succeeded at this. During my studies I have become fairly familiar with GNU, GCC, emacs, MinGW, wsWidgets, GTK+, etc..
:o emacs? I hope you washed your eyes and hands properly after that...  ???
Quote
However as one dreams to program on a cross-platform basis, and utilize the tools that work in both environments (Linux and windows), the setup time, configuration, familiarity of the interfaces as well as the learning curve can be quite an uphill climb.
And that's just the beginning. But again, if you are familiar with the basics, building on that can easy all those little steps...
Quote
QUESTION #2 please:
At this point, I simply prefer to 'back-up a bit' and start learning how to program in windows. That is the level I am most fluent.
 and familiar with. After all, I've been using windows since 1993. It's just where I'm at now. Also the language of 'C' doesn't change if applied to Linux or Windows. 'C' is 'C' no matter where deployed? Is this correct?
Well, that's what some people are trying to tell you. In reallity, this simply is not the case as I mentioned before. There are a lot of low-level tripwires that you will stumble upon, and that can be an issue regardless which programming language you are using...
Quote
Then there's the question of "what programming architecture".  Is it Win32, .NET, wxWidgets, GTK+ on and on. It becomes daunting to someone just entering the programming field. And then there's Linux!
If you are serious about cross-platform and using C, anything that is using wxWidgets is probably your best bet. It levels a lot of of teh GUI stuff, but as mentioned, it also still leaves a lot of low-level stuff to consider to "get it right"...
Quote
QUESTION #3 please:Eventually as I become familiar with Linux and coding in both Windows and Linux, I can simultaneously work with a cross-platform IDE and learn to install GNU tools and begin to experiment. Or as I mentioned earlier, utilize separate IDE's or compilers and text editors that are geared for a specific OS and design architecture. Correct?

Many people on the Linux side are just as helpful as you have been on this thread. Complete professionals with a knack for quality advice and support.
It really depends on what your goals are and how comfortable you are/how easy it is for you to learn. The overall task that you seem to have in mind is not a small one, so you can't expect wonders...
Quote
QUESTION #4 please:
Any opinion please on the above statements? Does it affect me at my level of experience (as in just starting to learn 'C' programming)?
IMHO, get somewhat proficient in C first, independent from any OS. It doesn't help you programming in any GUI stuff, be it Windows, Linux or any other OS, if you do not know your way around the basics of the language, like pointers, pointers to arrays/strings, string handling, etc,....
Quote
Yes I do already own, "Teach Yourself C Programming in 21 days" but it is the 1995 'premier edition'. Not the current 6th edition. Not sure if this is a huge difference but it is a bit hard to follow but a very thick book full of info. Just not sure if it is C-99. I don't believe so as it is dated 1995.
Doesn't really matter IMHO. The basics of C are still the same. K&R is a bit dated as it precedes ANSI C (as in C89/C90) and can lead to some bad habits that pretty much all newer (post K&R) compilers by default might not take that lightly...
Quote
I have also heard about, Kernahan and Richie's "The C Programming language" as well as Petzold's book on programming in windows. Thank you.
As mentioned, K&R is a bit dated. Programming for Windows on the other hand is not directly related to programming in C, though it uses it a lot for it's examples IIRC....
Quote
I've read much about which language is the best to start with and I was convinced (actually educated) by some articles and links that suggested 'C' is the place to start. , I have also known for years that languages written closer to machine language such as 'C' language (besides Assembly Language)  can be more powerful and stable (if correctly coded).
Well, any language, if correctly coded can be powerful and stable. I personally still use Pascal (in one form or another) for all my own everyday programming tasks...  ;)
Quote
He also promotes 'Lisp' as a language to consider as well but I don't want to get over indulged in choices. It becomes too overwhelming. To my understanding every other language -at some point- branches off 'C'.
Well, not by a longshot. And please, don't program with a lisp...  ;D
Quote
QUESTION #7 please:
My understanding is the compiler in Pelles C is based on Lcc albeit in a much upgraded capacity. Is Lcc-win32 still a popular program used by programmers?
I had once a look at it, but did not see any reason to get involved with it. When I was looking for a specific project a few years back for a freely available C compiler, that's when I stumbled upon Pelle's C and think for plain C programming in Windows, it's simply the best choice...
Quote
QUSTION #8 please:
The reason for C++ (I thought), was to create GUI programs.  Apparently GUI programs can be constructed using 'C'  but at a more difficult level ?
C++ directly has nothing to do with GUI program. It was just a development by Stroustrup to bring object oriented program to a more or less vaguely C like programming language. Some things like basic stream input/output are completely different (and I personally despise that <</>> syntax).
What made C++ (beside at that time "en vogue") appealing to GUI programmers is that it by design supports threads, which in a multi-tasking/threading environment like most GUIs is a main feature to deal with. This is where plain C needs to use some crutches IMHO to achieve the same functionality. But that doesn't make it impossible either....
Quote
Ok, thank you. Is there any advantage to knowing 'C' prior to learning C++? I read opposing views on this.
Yes and no. As mentioned somethings are completely different, specially if you properly use OOP techniques in your programming. IMHO this is also the point where a lot of people completely fail in their attempts to do simply "over do it" with a completely impenetrable maze of classes/methods/etc...
Quote
> Throughout this keep in mind that Programming is about 70% research and planning, 10%
> writing code and 20% fixing your own mistakes.

Now that's an eye-opener!
But oh so true. A lot of people, specially in Open Source projects, make the mistake to just sit down and hack along. It really shows and makes it a lot of time unnecessary hard for outside people to follow what was done for what reason. And just  don't get me started on that stupid "the documentation is in the code" mentality....  >:(

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 19, 2012, 06:21:12 AM
Slow uptake or not, IMHO, as I mentioned in a previous thread regarding this issue, I don't really consider anything in C99 or C11 a real worthwhile improvement over older "ANSI C" (aka as ANSI X3.159-1989/ISO/IEC 9899:1990, aka C89/C90).
A bit tighter typing maybe and the use of "//" style comments...

Agreed.  Some of the extra library functions are nice but there's not much we couldn't concoct on our own.  One of the nice parts about working this close to the metal is that we can easily create almost anything we need.
Title: Re: Pelles C versus Code::Blocks
Post by: AlexN on October 19, 2012, 07:54:56 AM
If you read the forum of Code::Blocks you will see, that Code::Blocks is only an IDE. There are downloads boundled with the GNU-GCC compilers and debugger but it is only an IDE.
Pelles C is complete package with IDE, debugger, compiler, resource editor and ...

Hi Alex,

That is good to know. Thank you.

Question please:
I guess my first clarification is to further understand what components are included in a software developers tool kit that would classify this toolkit as an IDE or simply as separate tools?

Or rather, how does a 'feature rich' IDE compare to a 'no-frills' IDE and then comparing both to utilizing separate tools such as a separate text editor (i.e. notepad++) and a separate compiler. This is the most confusing part when beginning the process of learning how to program (when initially searching for tools or a pkg. that contains a combination of tools).

I did read this and found it very helpful:
http://en.wikipedia.org/wiki/Integrated_development_environment

Thank you Alex

I work with both.
When I want to create a little program, I use Pelles C. It has an editor, a resource editor, a compiler, a debugger, libraries and header files - all what you need. :)

Code::Blocks is a great editor (and I use it, when I must use a compiler without an IDE), which can integrate a compiler (with libraries and headers) and a debugger. If you want resources you need an extra resource editor or you use the wxWidget-plugin but then you must use C++ (and I don't like C++). So you have a great IDE and many components which are more or less well integrated and if you have questions you must look for the right forum.  :-\
Title: Re: Pelles C versus Code::Blocks
Post by: czerny on October 19, 2012, 10:20:33 AM
Hi wallep,

I got the intension that you, as a beginner, want to do (learn) too many things at once!
Try to reduce that considerably. Try NOT to learn a little bit in every corner, try to learn something good, in the very detail. Try to learn ONE programming language at first, and learn it good. Focus on ONE operating system.

Question #9 please:
Ok, thank you. Is there any advantage to knowing 'C' prior to learning C++? I read opposing views on this.

You can't learn C along the way. Try to find out, if C OR C++ is YOUR language. It is a matter of personality!
A C programmer likes to know what is going on in every detail. He is not happy to have some essential things happening behind the scenes, hidden in some objects or sort of 'helpfull' frameworks, etc? An alternative to C is only assembly language, not C++.

QUSTION #8 please:
The reason for C++ (I thought), was to create GUI programs.  Apparently GUI programs can be constructed using 'C'  but at a more difficult level ?

Gui programming is not more difficult in C than in C++. It is an other way to do it, and there are fewer examples in the web, how to do it.
What is more difficult is to work with COM-objects. Here is, in my opinion, a real difficulty with pelles C. A idl-compiler is not available. But it is doable.

Hope you can reduce your wishes. Fewer is sometimes more.
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on October 19, 2012, 03:58:16 PM
Hi czerny ... good post...
 
Wallep,
czerny makes a very good point here. 
 
There's an old saying you may have run across: "Jack of all trades : master of none."
 
It laments the slow death of true craftsmanship in our world. Over the last half century we have slowly moved from a skills based economy to a consumer based one in which very few people hold true skills anymore and technology, advanced as it may be, is slowly becomming an appliance trade wherein almost everyone is using tools (and toys) they understand at only the most superficial levels.
 
Couple this with the growing ease of access to information and you have a new mindset that is now beginning to emerge. Today's craftsman is not a true craftsman in the old sense. They don't spend the time or make the effort to be especially good at any one thing. Instead they are trying to jump directly from "layman" to "engineer" without completing the intermediate steps. Most are all over the board trying to play multiple games at once and most often they are considerably less skilled at any one thing than their predicessors.
 
And it shows!
 
What each of us is suggesting, in our own ways, is that you must not fall into this trap; and it is a trap.  We call these guys "Skript Kiddies".  Typically they will produce astonishing amounts of mediocre code that is almost entirely made up of snippets of code taken from other sources (the web, other pojects, other programmers, etc). Often they work with code they don't understand, simply using it and hoping it works as expected, racing to find other snippets when it doesn't. While this sounds like a great way to produce a ton of code, there's the jaws of the trap... these guys are so scattered, so invested in borrowed code, they are unable to debug or improve their own products because they don't actually understand how they work!
 
Instead, we are suggesting that you settle down, pick one focus... "I want to ______" and get yourself really good at it.  In the days of true craftsmanship you would have bought a table from Fred because Fred makes excellent tables, but you would have gotten the chairs from Dave because Dave's chairs are the best. This is not because Fred doesn't know how to make chairs... it's because Dave spent the time to learn how to make a really good chair... something nobody does anymore.
 
Sales pitch aside... the suggestion is that you pick one language, select the best tools for the job, and become a master of the skill before you even think about moving on to something else. Trust me on this, the ability to honestly write "Expert in C programming with Windows API" will be a far bigger selling point than " Programming experience in Basic, C, Fortran, Pascal C++ and Forth". 
 
It's your choice, of course but I would always prefer craftsmanship over the facade of productivity.
 
Title: Re: Pelles C versus Code::Blocks
Post by: DMac on October 19, 2012, 07:58:10 PM
I guess I'll throw my hat in the ring.

My first serious attempt at programming something began with a need.  Without that I would not have sojourned in the programming field these 10 years.  I was an electrical draftsman and I wanted to program AutoCad to model twisted strands of wire harness in an assembly.  The first language I seriously attempted to learn was AutoLisp.  I learned it because that was the tool furnished by AutoCad to do what I needed to do.

I didn't read a book; I didn't have an IDE.  What I did find were online archives with thousands of AutoLisp snippets written over the years from the early 80's to the late 90's.  I searched out code that did something similar to what I wanted to do (modeling chain for instance) opened them in notepad and spent a day or two reading and trying to understand how they worked.  I remember having an ah-ha moment and then I began to write a routine copy pasted from many different examples and then refactored it until everything worked the way I wanted.  ("Refactor" was not in my vocabulary in those days but that is what I did.)

My next serious attempt at programming something began with a need.  Without that I would not have continued to program these 10 years.  I was an electronics bench technician primarily occupied with design verification test activities.  We had a lot of programmable equipment in the lab and eventually we wanted to automate data collection.

I had at my disposal Visual Studio and a vendor provided framework in VB.NET that simplified instrumentation communications.  I took a 1 semester night school class at the university to learn VB.NET and then dove into the project.  The course taught me how to work Visual Studio and to recognize VB.NET syntax, a year of working it everyday under deadlines launched my career.

Now the vendor provided framework didn't do all of the things I needed it to do.  Code samples and snippets that I found to work around the limitations were written, sometimes in vb6, sometimes in C#, and sometimes in C.  Often the language depended on the year something was written and the sub-discipline of programming.  Thus, low level parallel port interactions - C, dot NET graphics - C#, general instrumentation - Standard Commands for Programmable Instruments (SCPI or Skippy) in vb6, 5, 4 & etc...  I learned to read and translate from these languages as the need arose, Google was my friend.

Eventually I wanted to know what was going on under the hood.  VB.NET was floating on an abstraction layer above windows.  I had found BCX, the Basic to C Translator, helpful to understand what was going on inside of standard basic (and by extension Visual Basic) to wit, commands, structs, pointers, memory allocations, message operations... C - the language of the operating system, the pavement upon which all the rest stood.  At this time I found Pelles C to be the best tool to do Windows API coding.  For windows and C, Pelles beats even Visual Studio.

Each serious attempt at programming something begins with a need.  And the need will dictate that you learn something new.  The language and the tools are dictated by the need.  Therefore determine what you want or need to do, pick the simplest tool to get you started and just do it.  If there's a deadline behind the need, all the better, you'll persevere, not even giving place to the desire to quit, lest you be trampled by the bulls.
Title: Re: Pelles C versus Code::Blocks
Post by: wallep on October 19, 2012, 08:56:06 PM
To All,

I am very humbled. What amazing posts!! I have never been so informed and/or advised on any other forum. Especially at this level of professionalism.

All I can say at this point is "Thank you All so very much". Just incredible advice. I needed to hear the recommended suggestions. Hopefully I will soon find the time to kindly respond to each post and obtain some further details in my quest for knowledge.

Yes for now, I would like to simply take your advice, stay focused and learn 'C' using windows API or win32. In the meantime, I can certainly learn to navigate around the world of Linux using my newly installed Debian operating system and begin to become familiar with this new OS while simultaneously applying all my programming studies in a windows environment (as a start).

I am a musician and life-long student of music theory, musicology and tuning theory. I am also a veteran of the stock-market and have been a stockbroker and investment adviser for approximately 23 years. I left the industry after the 2008 world-wide mortgage debacle and I am now searching for a different 'more stable' path.

I have gained much knowledge in the financial investment markets and in music theory and would like to begin the process of learning to "code" small programs that accomplish small tasks in those mentioned areas of interest.

The "need" that initially caused my desire to want to pursue the path of programming was born the day I downloaded a program called, 'Tune Smithy'. The program was created by an inventor, software developer and musician named Robert Walker. All his programs are written in 'C' for windows. To see the power of programs written in C for windows, check out the links below.

See:
http://robertinventor.com/software/main/index.htm

I am amazed at his fine work and what the programs can accomplish. I share the same interest as this inventor and software developer. We both enjoy music theory (why and how music works) as well as tuning theory (why a piano, flute, guitar or any instrument is tuned a particular way and why these instruments utilize the notes they so choose in their scales among the infinite choices available).

Please see my inspiration here: All programs are written in 'C' for windows:

http://robertinventor.com/software/tunesmithy/music.htm
http://www.bouncemetronome.com/
http://robertinventor.com/

If any 'Pelles C' forum member has an inspiration story, I'd like to hear about it and/or check out the recommended links (if any).

Be Well and Thank you         p.s.  now onto reading the Pelles C 'Help File'.
Title: Re: Pelles C versus Code::Blocks
Post by: inobor on November 08, 2012, 10:26:59 AM
Hi wallep,

Before you start learning C and then C++ you have to realise: C++ is very difficult and big
language. To feel its taste and make your weapon you'll spent 10 times more of your time
and energy than plain C. Its much faster to learn/play/exercise C than C++.

But if C++ is ultimate goal, you better forget about C entirely and start straight from C++.
Why? Because C++ is object oriented language, C is not. If you start with C, it will
"handicap" your learning of C++.

My personal view: it is better to hold and know the knife, than holding and NOT knowing
the kalashnikov
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on November 08, 2012, 10:49:30 AM
Ummmm.... you do realize that most C++ compilers will also compile C programs, don't you?
For Example: The Mingw that ships with CodeBlocks will do either with equal ease as will VC++ from Microsoft.  Frankly you might be amazed to know how many people have learned C on C++ compilers....

Yes C++ in objective mode is more difficult and it definately just keeps on coming... but at the root of all programming are a core set of principles that hold true no matter where you go.  Programming isn't "if this then that" or "while fred do jane"... it's a set of operations on data.  The means any given language uses is irrelevent (so long as you understand it) what matters is two very crucial points: 1) That the needed manipulations are *accurate* and 2) That operators find the work we produce to be both easy and convenient to use. 

As programmers our main job is to make incomprehensibly difficult tasks easy for the end user to perform. 

Take a look at a typical data operation... word processing... On it's surface it's typing, backspacing, inserting, replacing etc.... at the programming level it's a series of surprisingly complex operations on a data set... adding new characters to a data buffer, removing characters and moving everything forward, inserting new characters after moving everything back, maintaining memory, drawing in appropriate fonts and on and on and on... Our job is to take all that and make it easy for the end user.

There are only so many things you can do with data ... you can add, copy, delete, revise, sort, etc. ... these are the programming fundimentals that we can take from one language to the next.  We don't have to forget everything, we just have to adapt to the new environment.



Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on November 08, 2012, 07:21:07 PM
My first serious attempt at programming something began with a need. 

Hi DMac...
Hope you don't mind a late response.  I was planning to toss in my own story but got sidetracked by some family stuff.  Today's a quiet day, so here goes...
 
I came to programming out of curiosity, mostly.  I was seeing the various micro-computers coming onto the market, written up in my electronics magazines and decided to give it a try.  The first one (http://oldcomputers.net/imsai8080.html) came as a KIT (yikes!) that took me most of 3 months to assemble and get working and then the joy of binary coding... actually entering my first program from the front panel switches.  I learned a lot from that machine, and eventually turned it into a service career.
 
Then it was on to a new home computer (http://oldcomputers.net/sorcerer.html) that gave me my first exposure to actual programming languages, Basic and Assembler. I had a ton of fun learning everything about this machine and then writing a couple of "patches" for the IOS (no operating system, per se) that saw some general use in my immediate area, passed from dealer to dealer.
 
About then I got hooked into one of the first personal computers (http://oldcomputers.net/victor9000.html) for business use and I ended up training technicians and looking after the machine's service in Canada, until they went under (on strength of their own stupidity, I might add). I got into compiled languages with this machine, learning GWBASIC and BASCOM as I wrote diagnostics and intra-corporate applications for it.
 
From there the whole thing took on a life of it's own... The PC was out, Pascal was the hot ticket and I went right for it.  Developing a series of Point of Sale and Inventory programs for electronic parts suppliers and hardware stores.  Unlike yourself, I'd say this was the first time "need" entered the picture... I needed money and my bosses were bankrupt!
 
I managed to keep free-lancing for a long time. I got real lucky and was never more than a couple of weeks without a project on the go.
 
The rest has pretty much happened here... When Borland introduced Delphi and abandoned Pascal, I was left hunting for a new programming language... Pelles C... I translated my Inventory package to Pelles, wrote a couple of other applications, did a lot of "too small for the big guys" projects and stayed with it until this summer, when I sold the whole shebang to a very bright programmer who was looking for a start...
 
Quite a haul ... and now I'm back, full circle, to doing this stuff out of curiosity and as part of other projects (EG. Remote control of Headless PCs, as part of a Home Theatre project...)
 
 
Title: Re: Pelles C versus Code::Blocks
Post by: migf1 on November 25, 2012, 12:00:13 PM
Hello,

I'm with inobor at this one. If your basic aim is C++, then in my opinion you'll be benefit the most if you start right away with C++. They are 2 different languages, and for some time now C has stopped being a complete subset of C++... so no, not all C programs will compile and/or work correctly under a C++ compiler.

On another note, since you mention you are really interested in cross-platform development, then neither Pelles-C nor Visual Studio can provide you that. Ideally you should install Cygwin, which is essentially a Unix layer on top of the Win32 API, but using native Windows executables (that means it is not a virtual machine, and it also means that you can develop *almost* native Win32 API application... almost, because you need to distrbute a cygwin dll along with your programs, for them to run under Windows, in the case the user does not have Cygwin installed on his/her machine ).

If you are not up-to it, then MinGW is the 2nd best alternative for developing x-platform programs without moving to a different OS (than Windows I mean)... actually MinGW is a minimalistic fork of Cygwin, paying more attention in Windows development (it also uses the Microsoft runtime by default). In other words, it makes it easier to develop native WIndows apps and harder to develop cross-platform apps.

Both compilers are up-to-date as far as the C99 standard is concerned, while they already provide some C11 support too (GNU has announced their plans to support the vast majority of C11 features in the upcoming release, 4.8 I think.. Pelles C already does that, Pelles C is considered - and it is - among the best C compilers available for Windows programming, and certainly the best free one for that purpose).

Regarding IDEs, Code::Blocks is an excellent IDE. It's not mandatory to download it with MingW, there's a separate download if you want that. The main download is just the IDE, which you can then configure to use whichever compiler you already have installed on your system. If my memory serves me well, you can even configure different compilers for C and for C++ (but I may be wrong, since it's been a long time since the last time I used Code::Blocks). You will have the same interface no matter the platform you work on.

CodeLite and Orwell Dev-C++ are also two attractive options, however a bit inferior to Code::Blocks if you ask me (although I have made the Greek translation of Owrell Dev-C++, along with Pelle's C 6.50 and 7 ;) )

In any case, it is counter productive to start with an IDE for learning C and then switch to another IDE for learning C++. The above mentioned IDEs save you that hassle... although, as I pointed it out above, imho it's also counter productive NOT to start immediately with C++, if that's the language you are aiming to.

That being said, if you are interested solely in Windows programming, then the best options are Pelles-C for C and Visual Studio for C++ (Microsoft has abandoned their C compiler to the C89/C90 standard + some C99/C11 features that are common between C99 and C++11).

Another option is the .net framework (pure or usnig its Posix port called Mono). C# is currently the hottest language in that area among professionals, with VB.net being used more widely among the rest.

If you go this way, then for the Windows platform Visual Studio is the top option. But since it comes with a high price and its free version (Express) lacks some really interesting features of the full-blown version, you may take a look at the open-source SharpDevelop (also spelled #develop).
For x-platform .net development, there's just one option I am aware of: MonoDevelop. But keep in mind, that Mono cannot keep up with .net's updates so it may take it a while before the Mono guys ports them. Also, the Windows version of MonoDevelop does NOT seem to be that stable under Windows.

Best regards.
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on November 25, 2012, 06:55:09 PM
Hello,

I'm with inobor at this one. If your basic aim is C++, then in my opinion you'll be benefit the most if you start right away with C++. They are 2 different languages, and for some time now C has stopped being a complete subset of C++... so no, not all C programs will compile and/or work correctly under a C++ compiler.
I am pretty sure that every C++ compiler out there is able to compile C89/C90 programs.

If C++ compilers have problems with compiling C programs that's is very likely that those are programs that use C99/C11 features. One more reason why I don't use really any of those features, you can do quite well without them IMHO...

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: migf1 on November 25, 2012, 09:51:17 PM
I am pretty sure that every C++ compiler out there is able to compile C89/C90 programs.

If C++ compilers have problems with compiling C programs that's is very likely that those are programs that use C99/C11 features. One more reason why I don't use really any of those features, you can do quite well without them IMHO...

Ralf

That's perfectly fine by me, but not everyone is happy to be forced to write legacy C code even 12 years after C99 debut.

Languages usually evolve for good reasons, and although it's fully understandable to stick with ancient history for some time, say because you must maintain tons of already written legacy code, I'm quite confident that sticking to C89 simply because you prefer to compile your code with C++ compilers instead of C compilers, it's not a very solid argument. Neither a productive, nor a safe one I would add ;)

C and C++ are 2 quite different languages, a fact that gets more and more apparent after every new standard is established for either one of them.

As I have already mentioned, C++ is NOT a complete super-set of C for quite some time now. By saying C, in a 2012 context, the point of reference is most certainly not the 22 years old ANSI C89/ISO 90, but at the very least the ISO C99 version.
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on November 25, 2012, 10:20:10 PM
Ralf, ah loves ya man... but I'm seriously starting to think you're stuck in some kind of time warp...
Title: Re: Pelles C versus Code::Blocks
Post by: Bitbeisser on November 26, 2012, 08:34:57 AM
Ralf, ah loves ya man... but I'm seriously starting to think you're stuck in some kind of time warp...
Why, because I just don't follow all the new "shiny, shiny" and rather stick to stuff that's tested and proven?  :-\

Has served me very well for the last 36 years and I am sure it will serve me well for many years to come...  8)

Ralf
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on November 26, 2012, 12:36:36 PM
Ralf, ah loves ya man... but I'm seriously starting to think you're stuck in some kind of time warp...
Why, because I just don't follow all the new "shiny, shiny" and rather stick to stuff that's tested and proven?  :-\
Has served me very well for the last 36 years and I am sure it will serve me well for many years to come...  8)

See, now that I can agree with... I'm no victim of fads either and I certainly don't run out to get the very latest of anything.  That said... there is reasonable precaution and there's something approaching either "too lazy to upgrade" or "too paranoid to change" that we must guard against. 

Like you I stick to pretty basic code I'm not deliberately trying to do anything "the C-11 way" but at the same time if there is a function or procedure available that does what I need then, well shucks, I'm gonna use it!  Moreover; I'm not going to care if it's 30 minutes or 30 years old.  (Hint: Once it's compiled and working... it's all just machine code, anyway.)

Getting back to the specific thing about loading files in Hydronium's thread... That whole business about reading files line by line or character by character is an artifiact of 64k RAM systems that has somehow gotten carried forward through computer class after computer class.  Many files in modern use are to be used as a single entitity... images being an excellent example but there are tons of others.  These files *have* to be in one piece in memory or you're not going to use them.... what's the advantage of loading them character by character vs one ReadFile() call?  There isn't any... The only reason to read a 5mb BMP file character by character is that "I've always done it this way" and that's a plain terrible reason, my friend, ... especially when there's a single function that can copy the file at full disk speed. 
 
I absolutely agree with playing it safe... but in my experience there's no correlation between "old" and "safe" in fact one can make the argument that older functions --particularly those relying upon guestimated buffer sizes-- are far less safe than many of the newer ones.
 
Finally; I see no reason to be all bent out of shape over "muti-platform" or "multi-compiler" compatibility.  To the best of my knowledge, none of the code I've written has ever been compiled on anything but Pelles C... and I'm betting that is the case with the vast majority of programmers' code... They sweat and struggle with broadest common denominator concerns, costing themselves weeks in development... then in the long run they are the only person ever to compile the code. I couldn't care less about all this "needs to run on freeBSD" crap... those guys weren't my customers and the odds of my professional source code being ported anywhere are exactly 0 since it never leaves my posession.
 
Anyway, Ralf, I mean no offense whatsoever and, for sure, we've had this discussion in various forms before... My friend, we're going to agree about precaution... but not to the level you take it.
 
Title: Re: Pelles C versus Code::Blocks
Post by: CommonTater on November 26, 2012, 12:44:03 PM
That's perfectly fine by me, but not everyone is happy to be forced to write legacy C code even 12 years after C99 debut.

Hi Mig... The reason I suggested starting with C in Console mode was not so much because C++ is a simple step... it isn't.  It's more for the purpose of starting off with simple methodology and helping someone get their head around some of the more fundimental programming tasks before throwing them in with the sharks :D.

(Good to see you back posting!)

Title: Re: Pelles C versus Code::Blocks
Post by: migf1 on November 26, 2012, 03:46:24 PM
Ralf, ah loves ya man... but I'm seriously starting to think you're stuck in some kind of time warp...
Why, because I just don't follow all the new "shiny, shiny" and rather stick to stuff that's tested and proven?  :-\

Has served me very well for the last 36 years and I am sure it will serve me well for many years to come...  8)

Ralf

No argument there, you know better than anyone what serves you best. But I don't agree on generalizing based on one man's needs ;)

For example, before version 2010, the Visual Studio was not supporting <stdint.h>/<inttypes.h>. Thus if you needed your code to use guaranteed fixed size types, no matter the platform you compile your code on, you had to go through a hell lot of a tedious coding, trying to do it with strict C89/90 (mostly defining your own types, based on CHAR_BITS in <limits.h>, with or without using the TYPE_MAX/TYPE_MIN constants).

You could always copy <stdint.h> and/or <inttypes.h> from a C99 compliant compiler, and start using it directly, but in that case it would be like using C99 in the first place (saving you all the C89/90 hassle).

C99 is not an experimental standard. It is mature, well established, well tested and well supported for a long time, by most (if not all) major C compilers.

I would fully agree if we were talking about C11, which is indeed way too early to accept it as a mature/reliable standard. It is not, it is not even supported by most compilers yet (it took years for C99 to be established, so I assume the same will happen with C11).

@Tater:

Hello buddy, glad to be back :)

I think we both suggested the same thing, that the console is an excellent way for any beginner to start learning the language and its mechanics.
Title: Re: Pelles C versus Code::Blocks
Post by: andre104 on November 27, 2012, 05:38:49 AM
Hi walep,

Both Pelles C and Code::Blocks are, IMO, excellent tools in their own rights.
If your plan is to use only C in Windows, then use Pelles C.
But if you are looking for cross-platform, configurable IDE, then go for Code::Blocks.

I don't see a reason to use one and discard the other.  :)