Author Topic: Too dumb to get started?  (Read 17577 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5179
Re: Too dumb to get started?
« Reply #15 on: July 29, 2006, 11:33:05 pm »
If you want to read good books about c++ (advanced) which do not turn their head for serious issues and good techniques I can advice you the books of (just check addison wesley or amazon) :

- Scott Meyers
- Herb Sutter
- Andrei Alexandrescu
- Josuttis

Those will teach you real (advanced) C++ !!!

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Too dumb to get started?
« Reply #16 on: July 29, 2006, 11:40:36 pm »
well, that tutorial at cpluplus.com is quite nice
I actually got a few steps further than usual, still Iīm getting to the same point
example:
in the chapter control structures there is a paragraph about "switch" which has an exact equivalent in "if-else"
both do the exact same thing and I really donīt get, for what shall a real bloody newbie learn 2 different things which do the exact same?

I can understand, there are differences for advanced users, Iīm sure there are things which can be done easier or faster by "switch" than by "if-else", or something like that, but for someone like me who wants to learn from scratch, when I find 2 different ways to do the exact same, I start reading the chapter until I find out it wasnīt even neccessary to learn this sh*t, because I already know a much easier way to do the same

Canīt a beginners tutorial be restricted to the easiest way to do something?
Why would it be important to a newbie, whether his very first miniature program requires 10 times more processing power? Whats the fortune of learning about the difference between local and global variables while the entire program Iīm writing requires a total of 2 variables
Why should I learn how to pass variables through functions, while my entire experience is restricted to printing "Hello World!" to the screen?"
Hell Iīm not writing a new OS as my first program
I can find several different ways to get from paris to rome, but if I donīt have a map and no clue where rome is located, why should I learn the route by car and by plane at same time? My goal is to get there and unless I know already how to get there by plane, Iīm not interested at all in the fortunes of getting there by car, for a firsttimer the easiest explanation is the best, regardeless whether or not thats the best way to do it for a pro

However, these things make me bypass the rest of a chapter, furthermore makes me suspicious of several further duplicated ways to do the same, making me skip more and more, just to grab the easy way, which obvioulsy leads to the problem, I donīt get a word anymore in following chapters, because the author of the tutorial expects that I have learned ALL options to do the same thing, rather than the easiest one

uhmmm... from what you say, it seems to me that you "HAVE TO" learn programming, not "LIKE TO" do it...
That's the same problem in every field : if you don't like what you do, no matter how hard you try, you'll never do it well.
That's my humble opinion, of course.
If you really want to learn programming, reading a tutorial and finding 5 ways to do the same thing, the right question woul be : "mhhh, nice thing, let's see if I can use it to make my code work better !" and not "another boring way to do the same stuff"...
Sorry to say that, but if you find "boring and useless" the explanation of difference from local and global variables, or the way to pass parameters in functions, better you choose another job (or hobby).
When you'll reach classes, pointers and templates you'll be sleeping since long...

Ciao

Max

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Too dumb to get started?
« Reply #17 on: July 30, 2006, 12:40:01 am »
max, for one, you got me, there is a good part of I "have to" in  my wish to learn it
its something like, through my web-programming in php, I got to a point where I want to develop something which cannot be done in php
Iīd love to do it, but if I want to do it, I have to learn C/C++ first

For the rest, you got me wrong there, I donīt thing differences between global and local variables are useless, I just think it not neccessary to explain it in the very first chapter for newbies
I donīt think passing parameters through functions is boring, I just think for a real newbie, learning what a function is and how the synatx of an entirely empty function look is way more important

Of course, if I want to develop something good, I will have to learn it all, and Iīm aware it will take its time, I just think packing all options for every tiny detail into the first appearance of it in a plain beginners course is way off target
I like the first 2 pages in the http://winprog.org/tutorial/
First page the hello world program as a win32 application, 2nd page the easiest possible window, including explanations how it is setup and what all the code means
but from 3rd page on Iīm lost
the author doesnīt bother anymore to mention WHERE in the code the next piece should be added every other paragraph says: "IF you donīt understand what this means, donīt worry, its not important for now" and I end up with 100s of compiler errors, because I canīt figure out what belongs where
Iīve tried downloading the source code he provides, but thats totally different from the tutorial, because he is using borland and makefile which isnīt mentioned by a single word in the entire tutorial
However, I managed to figure most of it out after a while, but I was about to give up, when a piece of code he has on the "Dialogs" page to display a dialog box brings up a simple "Syntax error"

Thats the point where I really wonder, is it absolute neccessary to understand resource files, object oriented programming, all types of variables and 100s of other things to pop up a simple dialog box? Wouldnīt it be MUCH easier for a newbie to explain FIRST how to popup a dialog box, SECOND how to modify properties of it and LAST how to implement it into a resource file?
To learn how to use a dialog box, there is no resource file needed at all, it could easy be implemented into main, explain how to work with it and AFTER thats clear explain how to put it into a resource file and how to include the resource into main

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Too dumb to get started?
« Reply #18 on: July 30, 2006, 01:43:47 am »
max, for one, you got me, there is a good part of I "have to" in  my wish to learn it
its something like, through my web-programming in php, I got to a point where I want to develop something which cannot be done in php
Iīd love to do it, but if I want to do it, I have to learn C/C++ first
I don't understand even the simplest line of PHP, not 'cause I think is too difficult, just because I find it boring and I have absolutely no interest on it. Even so for the web-programming.... I do program for hobby, sometimes (very few) for money, but my job is other thing.
I learned programming starting with basic and assembler (apple II), then pascal, then c, fortran, c++.
I did something in Perl because I needed it, but I can scarcely write a 10 lines perl program, and I avoid to do it if I can.

I think that if you must learn some C++ for a single part of a web project, it's better you ask somebody to do the job for you... You'll spend less time and at the end less money for the same job.
If you think you'll need c++ from now forever, that's another question.

For the rest, you got me wrong there, I donīt thing differences between global and local variables are useless, I just think it not neccessary to explain it in the very first chapter for newbies
I donīt think passing parameters through functions is boring, I just think for a real newbie, learning what a function is and how the synatx of an entirely empty function look is way more important
here I think you're wrong. As I said, I don't know PHP at all, so I can't know if it has local/global variables (I think it has), nor if it has function calls, switches, and so on.
The problem is that in c++ those are fundamental parts of the language. If you don't understand what is a function parameter, how is it passed to a function, you can only cut-and-paste some lines of code and pry that it goes, and 99% of the times it will not go.
When you write a line that looks like this one :

MsgBoxA("SomeText");

You know that "SomeText" will appear on screen in a message box you can change "SomeText" whith "Another text", but that's all. Maybe, reading a bit more, you can write :

char *msg = "SomeText" ;
MsgBoxA(msg);

And here you already have a variable (local or global is unimportant here), and a function call with a parameter.
But then you have also a pointer variable. If you'll want to add some more things to your program, you may try something like that :
char *msg1 = "Some";
char *msg2 = "Text";
char *msg = msg1+msg2;    <--- WRONG !!!!
MsgBoxA(msg);

And that'll not work, because you don't know the difference between strings and pointers of chars; as you see, even the most trivial thing like concatenating 2 strings of text requires a lot of knowledge.
Whorse than that, windows works mostly with pointers of data; if you don't know what a pointer is, what are 'new' and 'delete' operators, what's a pointer ownership, you simply can't do anthing with windows.

Of course, if I want to develop something good, I will have to learn it all, and Iīm aware it will take its time, I just think packing all options for every tiny detail into the first appearance of it in a plain beginners course is way off target
I like the first 2 pages in the http://winprog.org/tutorial/
First page the hello world program as a win32 application, 2nd page the easiest possible window, including explanations how it is setup and what all the code means
but from 3rd page on Iīm lost
the author doesnīt bother anymore to mention WHERE in the code the next piece should be added every other paragraph says: "IF you donīt understand what this means, donīt worry, its not important for now" and I end up with 100s of compiler errors, because I canīt figure out what belongs where
That may be a tutorial fault (if they say "don't worry, it's not important for now" is it indeed a tutorial fault) or you may have chosen the bad tutorial.
BTW, if you want to learn how to program a GUI, you must know BEFORE all the basis of the language.

Iīve tried downloading the source code he provides, but thats totally different from the tutorial, because he is using borland and makefile which isnīt mentioned by a single word in the entire tutorial
I did use Borland tools and they used to be quite good. They're even a good starting point to learn c++ because they give many code examples, from the simple one to the complex one. You could download a trial version of c++builder and try some examples. BTW, they use some extension of c++ that, even IMHO they should be added to c++ standard (__property construct is one of the best things they added to c++), they're NOT c++ standard, so you may get a bit confused.
Of course, if you try to compile a sample from borland cbuilder using VCL with gcc or vc, you'll get tons of syntax errors because of those extensions.

However, I managed to figure most of it out after a while, but I was about to give up, when a piece of code he has on the "Dialogs" page to display a dialog box brings up a simple "Syntax error"

Thats the point where I really wonder, is it absolute neccessary to understand resource files, object oriented programming, all types of variables and 100s of other things to pop up a simple dialog box? Wouldnīt it be MUCH easier for a newbie to explain FIRST how to popup a dialog box, SECOND how to modify properties of it and LAST how to implement it into a resource file?
To learn how to use a dialog box, there is no resource file needed at all, it could easy be implemented into main, explain how to work with it and AFTER thats clear explain how to put it into a resource file and how to include the resource into main
Is I said before, if you JUST want to make a dialogbox, that's not needed. But you'll understand that a dialogbox is not a complete program and, as I did show you, to add even trivial things you must know the language.
What I can say to you is : choose your operating environment at first, then try some examples from it (about all integrated environments comes with many samples), and try to understand what code does.
If you use borland, they have some good tutorials. I think also VC has good tutorials. When you don't understand, look before in help, than search with google, or have a c++ book near you.

Ciao

Max

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: Too dumb to get started?
« Reply #19 on: July 30, 2006, 06:23:06 am »
It seems the primary difference between tutorials and books is that tutorials give you a program and describe each part in turn, whereas a book is a bit more dry and just tells you the constructs of the language.  So it really depends on your style of learning.

I learned C through tutorials, but C++ was much easier to learn by reading a book ("The C++ Programming Language" (third edition), Byarne Straustrup).

IMO, you should stay away from C++ until you have a firm grip on C.  Some people, namely Java programmers, will say that it isn't necessary (and it isn't), but in the long run it will give you a better idea how everything is working.  If you already know PHP, then you are halfway there (depending on your PHP coding style).  They have many of the same constructs.

I would also suggest not jumping right into Win32 GUI programming if you don't know the basics of C, yet; it is a quick way to get discouraged.  Most windows API tutorials assume prior knowledge of C, and sometimes C++.  It is not necessary to know C++ to program for windows.

The reason tutorials don't just give you a dialog in WinMain is because that is not how Windows applications work.  So how do windows applications work?  It depends on the application.  In general, they register a callback function for events, attach a window(s) to that callback, and then start an event grabbing loop.  The callback procedure can be seen as the "main" function for a given window, so that is usually where all of the "hello world" code will be.

In addition, using resources for dialogs and such is MUCH easier that creating them in code (for most people).

Anyhow, I'm a bit tired, so I don't know how much of this actually made sense or hasn't already been said; but good luck.

« Last Edit: July 30, 2006, 06:25:23 am by kidmosey »
3 years until google knows more than god.

Offline PDEE

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: Too dumb to get started?
« Reply #20 on: July 30, 2006, 05:05:09 pm »
I don't know C. I have asked many people on forums all over the place wether i should learn c first and they nearly all say "don't bother, you will have to unlearn everything when you come to learn C++". So that's what i did. Went straight to C++ and i am doing ok at it. I wanted to learn OOP so that's where i started. I get most of my tutorials online and any questions i have i ask on forums. Works for me but might be different for others. This site is good for advice http://www.parashift.com/c++-faq-lite/

PDEE

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5179
Re: Too dumb to get started?
« Reply #21 on: July 30, 2006, 05:16:44 pm »
I don't know C. I have asked many people on forums all over the place wether i should learn c first and they nearly all say "don't bother, you will have to unlearn everything when you come to learn C++". So that's what i did. Went straight to C++ and i am doing ok at it. I wanted to learn OOP so that's where i started. I get most of my tutorials online and any questions i have i ask on forums. Works for me but might be different for others. This site is good for advice http://www.parashift.com/c++-faq-lite/

PDEE

Quoting Bjarne Stroustroup : "It is better not to learn c first, it's better to learn c++ and then c (if you really need it)".
My personal opinion : you can skip c, it might indeed help, but actually it's a subset of c++, so during the course of c++ you learn nearly the same thing directly with the extra c++ features.

sethjackson

  • Guest
Re: Too dumb to get started?
« Reply #22 on: July 30, 2006, 06:31:19 pm »
I don't know C. I have asked many people on forums all over the place wether i should learn c first and they nearly all say "don't bother, you will have to unlearn everything when you come to learn C++". So that's what i did. Went straight to C++ and i am doing ok at it. I wanted to learn OOP so that's where i started. I get most of my tutorials online and any questions i have i ask on forums. Works for me but might be different for others. This site is good for advice http://www.parashift.com/c++-faq-lite/

PDEE

Quoting Bjarne Stroustroup : "It is better not to learn c first, it's better to learn c++ and then c (if you really need it)".
My personal opinion : you can skip c, it might indeed help, but actually it's a subset of c++, so during the course of c++ you learn nearly the same thing directly with the extra c++ features.

Yeah I agree. :)

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: Too dumb to get started?
« Reply #23 on: July 31, 2006, 05:47:20 am »
I have asked many people on forums all over the place wether i should learn c first and they nearly all say "don't bother, you will have to unlearn everything when you come to learn C++".

I don't know what exactly you would have to unlearn, considering C++ is just an extension of C.  You are essentially learning C first, anyhow, even if it is included in the C++ tutorial.  In unversity, they taught us "C++", but it was really C using the STL... It wasn't until the third term that we actually got into namespaces, classes, overloading, templates, etc...

However, after waking up, I do realize it is likely better to learn C++, as long as you learn it from a decent source.  Bjarne Stroustroup's book is actually the only C++ book I've read (Besides "Teach yourself C++ in 21 days"), so I don't really have anything to compare it to.  I suppose the fact that I haven't *needed* to read another book is proof enough at how good it is.
3 years until google knows more than god.

Offline kagerato

  • Multiple posting newcomer
  • *
  • Posts: 56
    • kagerato.net
Re: Too dumb to get started?
« Reply #24 on: August 01, 2006, 04:27:23 am »
Quote from: kidmosey
I don't know what exactly you would have to unlearn, considering C++ is just an extension of C.

What people actually mean to say when they mention something like this is that C and C++ are different programming models.  C is functional whereas C++ is object-oriented.  While you can write functional-style code in C++, it can be a serious mistake to do so.

It's not that you'll have to "unlearn" functional programming to do object-oriented programming correctly.  It's simply that the two models are very dissimilar, and it's generally not worth learning how to do the former if what you ultimately intend to use is the latter.  This is especially true for graphical userspace application developers; it's rare to need functional programming techniques in this area.  On the other hand, if one intends to become a systems programmer (developing a kernel or a low-level library, for instance) it may be extremely helpful to know functional programming.

C++ is fairly often criticized for allowing the mix-and-matching of the functional and object-oriented paradigms, especially by developers who come from languages that don't permit it (these include Java, C#, modern VB, and quite a few others).  It's uncommon to find these kinds of points being raised by developers using Python and Pascal derivatives because their languages were architected to be flexible, just as C++ was.

Quote from: Newbie0815
Canīt a beginners tutorial be restricted to the easiest way to do something?

The easiest way is not necessarily a good way.  Programming tutorials are not written to show people how to do quick fixes -- you really shouldn't be writing programs if your goal is the most hackish, fastest possible solution.  A well-written tutorial (or book) will inspire, at the very least, decent programming practices.  Then, when your program has grown from 2,000 lines to 20,000 (or even 200,000), you won't be stuck with a nightmarish quagmire.

Quote from: Newbie0815
I can understand, there are differences for advanced users, Iīm sure there are things which can be done easier or faster by "switch" than by "if-else", or something like that, but for someone like me who wants to learn from scratch, when I find 2 different ways to do the exact same, I start reading the chapter until I find out it wasnīt even neccessary to learn this sh*t, because I already know a much easier way to do the same

The If...Else construct is much easier than Switch?  Sure, if you only have a few values to enumerate.  With win32, there's a ridiculous number of window messages (WM_*), and sometimes you need to catch more than a few.  In any case, Switch is pretty simple.  So long as you remember to use the break statement properly, it behaves just as If...Else would -- except the code is cleaner.

Quote from: Newbie0815
this effect multiplies with every further chapter, there is maybe one tiny little detail per page which is new, the entire rest the author spends on explainig how many different ways this new detail now offers in order to adchieve the same goal, or in other words, the part where I learn something new is reduced to a tiny little fraction of the time invested, the progress I make in learning is < 1% of my working time and I spend 99% of my time reaching the same goal from all possible directions

If 99% of your time is spent doing nothing of significance, there's two things to consider:

a.) is this tutorial/book/teacher any good?
b.) am I actually trying to study or learn from the material to the best of my ability, including studying and modifying the provided source?

Quote from: Newbie0815
Iīm not saying its wrong, Iīm not saying its bad, Iīm not saying its not neccessary, Iīm saying this bothers me so much on start, that I never even get started because I give up before I get anywhere due lack of progress

GUI programming, particularly using win32, is tedious.  That's all there is to that.  The win32 API is almost entirely C, and thus if you intend to use it directly you will have to do things the functional way.  That means creating and initializing a bunch of structure instances, and calling a lot of functions directly one after another.  Win32 is not fun, there's no doubt about that.  I would never recommend someone begin learning programming by building straight win32 programs.

Quote from: Newbie0815
As some wise guy once said (not sure who it was) "If you want to learn how to fly, you first have to learn how to walk"

These tutorials are teaching walk and fly simultanous

Since it's quite impossible to learn how to fly from walking, that's some horrible advice.  I think perhaps your analogy is supposed to reference walking and running, no?  In any case, it's not an apt comparison -- with something like the If...Else and Switch constructs, it's two separate means of branching.  Neither is dependent on the other; you could learn either first and it is most certainly possible to effectively learn both at once.  The difference is all syntax, nothing more.

Now, to introduce branching mechanisms before describing statements, types, and the basic operators -- that would be foolish.

Quote from: Newbie0815
max, for one, you got me, there is a good part of I "have to" in  my wish to learn it

its something like, through my web-programming in php, I got to a point where I want to develop something which cannot be done in php
Iīd love to do it, but if I want to do it, I have to learn C/C++ first

C and C++ are not the only programming languages on Earth.  If you weren't aware, you can access C libraries from essentially any language (a programming language that can't interface with C is rarely worth using for application development).  The vast majority of win32 consists of C libraries -- hence if you want to use win32 you can do it from whatever language is most comfortable.

C++ libraries are a different matter.  Only a handful of languages can access them properly, because 1.) the C++ ABI is not as stable as C's and 2.) C++ is a much more complicated language, period.  Python is a good example of a language that interfaces very well with C++; you might consider it if you need a C++ library like wxWidgets or Qt.  A language like Object Pascal, on the other hand, requires an additional interface layer (whose purpose is to essentially translate the C++ interface to a usable C interface).

Quote from: Newbie0815
I like the first 2 pages in the http://winprog.org/tutorial/

First page the hello world program as a win32 application, 2nd page the easiest possible window, including explanations how it is setup and what all the code means

but from 3rd page on Iīm lost

The code snippets in theForger's tutorial can become confusing.  You really must examine the full source to see how the code fits into context.

Other than that, what's so confusing?  Handling messages is a very basic part of win32 programming, and it's absolutely essential.  He didn't stick it into the third section just to annoy people.

If you're getting sidetracked by the ridiculous number of typedefs, that's normal.  Microsoft decided, for whatever asinine reason, to create about a thousand 'distinct' types which are actually all typedefs of standard types (mostly integers).  Furthermore, they decided to name them all with pure caps -- a convention normally reserved for constants.  It's one of numerous problems with win32, and has nothing to do with C++ or any other libraries.

Quote from: Newbie0815
I've tried downloading the source code he provides, but thats totally different from the tutorial, because he is using borland and makefile which isnīt mentioned by a single word in the entire tutorial

The compiler is highly irrelevant to C code.  In terms of software, the C standards are ancient.  Any Windows C compiler can build that code.

By the way, DSP files are provided for each of the code samples.  These are Visual Studio projects, that can be built very easily.  Borland's toolchain is not required, although you could use it to easily build everything at once.

In any case, these applications are so simple that they can be built from the console with a single command.  Consult your compiler documentation if necessary.  For those that use win32 resource scripts, you have to use a resource compiler like GoRC to turn the script (*.rc) file into a compiled resource (*.res) which can easily be linked into the final application.

Quote from: Newbie0815
Thats the point where I really wonder, is it absolute neccessary to understand resource files, object oriented programming, all types of variables and 100s of other things to pop up a simple dialog box? Wouldnīt it be MUCH easier for a newbie to explain FIRST how to popup a dialog box, SECOND how to modify properties of it and LAST how to implement it into a resource file?

What does object-orientation have to do with win32?  The win32 API is functional (or procedural, if you prefer that term).

It's not necessary to learn how to use resource scripts initially.  That's why theForger's tutorial doesn't use them initially; it's section five that introduces them.  Without resource scripts, you can't intelligently build any halfway complicated dialog with win32.  You certainly won't get to building any serious application with pure code driving your windows, unless you want to deal with pure hell.

Modifying dialog properties doesn't belong in a separate section from the basic concepts.  One, it's quite simple itself -- changing the value of a single structure's field, generally.  Two, without modifying any of the default values, you won't be building anything the least bit useful (or interesting, for that matter).

Quote from: Newbie0815
To learn how to use a dialog box, there is no resource file needed at all, it could easy be implemented into main, explain how to work with it and AFTER thats clear explain how to put it into a resource file and how to include the resource into main

The MessageBox function, a basic window, and messages are all introduced before resource scripts.  I'm wondering what order you think would be comprehensible, if this isn't?

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: Too dumb to get started?
« Reply #25 on: August 01, 2006, 04:56:33 am »
Quote from: kidmosey
I don't know what exactly you would have to unlearn, considering C++ is just an extension of C.

What people actually mean to say when they mention something like this is that C and C++ are different programming models.  C is functional whereas C++ is object-oriented.  While you can write functional-style code in C++, it can be a serious mistake to do so.


Okay, that clears it up.  Thanks :D

And as for the rest of your article... Well said!

3 years until google knows more than god.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Too dumb to get started?
« Reply #26 on: August 01, 2006, 10:00:20 am »
Just to be precise: C is *NOT* a functional programming language. It's an imperative (or procedural, if you like this word more) language. Functional programming languages are languages like Haskell or Lisp.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline PDEE

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: Too dumb to get started?
« Reply #27 on: August 01, 2006, 03:46:04 pm »
Wow kagerato, great post. I learnt something from that. Thanks

PDEE

dopyiii

  • Guest
Re: Too dumb to get started?
« Reply #28 on: August 01, 2006, 04:21:24 pm »
I just thought I'd throw in my 2c.  There's a really good free e-seminar at http://www.mindview.net/ done by Chuck Allison called Thinking in C (currently in Beta 3).  It's basically a series of audio lectures (with slides and example code) on C for those who already know how to program in other languages.  It gives them what they need to know about C in order to effectively program in C++ and/or Java (kind of a warm-up to the Thinking in C++/Java books).  It makes sense since C++ is built on C and much of what Java is comes from C++.

I had Chuck as a professor and I can vouch for his knowledge and teaching ability.  The whole thing takes a few hours, but it would be time well spent.  If you know everything that's covered in this e-seminar, you should have few problems stepping up to C++ or Java.

Hope that's helpful.

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Too dumb to get started?
« Reply #29 on: August 01, 2006, 06:51:15 pm »
first let me say, Iīm impressed how many real nice and helpful answers Iīm receiving here, thanks to everyone for that

now let me give you a bit update on my progress
in plain console C I got far enough to understand most of the beginners tutorials I found
Iīve written some applications, up to a pocket calculator, pretty unpractical within the console, but it complies without errors and works as expected, so for that part Iīm quite proud, even though I sure am still a beginner

So I dared to look into tutorials for win32 applications, which is somewhat an entirely different world
I got lost almost right away, mostly because there are no 2 tutorials for the same compiler, from videos at MSN how to write applications in visual C++ to plain C++ code I can use in CodeBlocks, they are not compatible, CodeBlocks allows me to import almost any format, but mixing them doesnīt work
Iīve tried learning by taking small pieces of code from the tutorials, pick out what I can use for my plan, modify it to my needs and repeat that with always new modifications so often, until I understand what that piece is actually doing and why

As my first project, to learn by doing, Iīve picked the idea, I want to write a simple chatserver where clients can connect to exchange messages, call it a huge goal for a beginner if you like, I like huge tasks and I got plenty of time, so I figured having a huge goal, involving all kind of tasks is the easiest way for me to learn
Of course I donīt want to download a ready made one, I donīt even need one, I just want to learn how to do it
Of course Iīve downloaded a few examples, just to pick a few ideas out of them
Iīve noticed, most of them are written in VB or VC, Iīve even downloaded and installed Visual Studio Express, but for one the code is so way different from gcc, almost an entirely new language and the options are pretty much limited to what the compiler offers
Iīve tried to translate some code to gcc, but that appears way beyond my skills
So I went back to plain gcc, and I got quite far, Iīve got both, client and server developped to the point where only connection and message exchange is missing, which Iīve replaced by simple message boxes while I have not yet learned how to make the connection

Thats where Iīm stuck now, I found just ONE tutorial that explains it short and easy at http://www.c-worker.ch/tuts/wstut_op.html (in german) but that one is written for borland and my attempts to translate it to gcc have failed so far, meaning I canīt even start implementing it into my project
Maybe someone here can help me out? How to mix code written for different compilers or how to translate it?
The source for both, is direct available on the page
Client: http://www.c-worker.ch/tuts/sock.c
Server: http://www.c-worker.ch/tuts/socksrv.c