Author Topic: C::B's tutorial  (Read 4968 times)

Offline Freem

  • Almost regular
  • **
  • Posts: 218
C::B's tutorial
« on: August 02, 2011, 09:49:26 pm »
I'd see some questions about basic usage of C::B those last days.
I know that C::B's is not very hard to use for someone who have used another IDE like visual studio or kdevelop, but it seem that some people want to use C::B and never used another.

So making a tutorial could be useful for them. But I have to admit, I don't see more than a few things to write in such a tutorial (so many things in forums and doc...). So I would like some people give me ideas.
As I'm not able to help in C::B's enhancement, maybe I could do that...

I am writing it at the moment, on the wiki of Code::blocks.
I'll add here the url when finished, to allow everyone to give me advices and remarks about it, before setting a link somewhere...

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: C::B's tutorial
« Reply #1 on: August 03, 2011, 12:26:53 am »
(warning, this post is being thought in same time as written, it may be chaotic)

Here is the really beginning: http://wiki.codeblocks.org/index.php?title=Basic_Tutorial

The only thing I've done at this moment is giving the wiki page to install CB, describing the first start, and a presentation of some setting (most but not all of environment and editor).

Next will be the creation of the first project, and it's compilation/run, through the classic command line hello world, a presentation of main options about the command line's projects and their effects on the program.

Then I think I'll see how to create a new class, a quick presentation of the class maker settings.
Will immediately follow how to add existing files, and, obviously, how to remove them.
Setting their priority in compilation, setting if they have to be compiled or not (and so make a brief passage about pch)
With that, I'll probably explain how to split a file in more than one view, and have more than one file visible in the same time (well, it can seem stupid, but I didn't know that some years of using C::B and was saying that it was sad C::B didn't have... Ok, I know, I am stupid :D )

But all that is for tomorrow.

I will make an explanation about the debugger, presenting all it's options I know how to use.
When this will be done, the beginner will know everything of basic usage of C::B, I think, so I'll start the advanced section.

Add a section about workspaces. How and why have more than a project opened, how and why set their dependencies and try to explain what they do.

I plan to explain how to add libraries, too, and make a brief presentation of project's templates.
Then will come the build steps I think.

Then probably presenting the wxSmith plugin, as a RAD tool it is an important part of C::B for me.

Why not the scripting abilities of C::B too, but I'm fear I will have to do some researches to learn this usage before :)

Well, the day everything I wrote here will be done, I won't be able to continue it, as I think it's almost near everything I know about C::B.
I will need some reports about it (writing style, spelling mistakes, content errors, typos, etc...), and ideas about things to include.
About all those things I need help, your help, beginners, will be the more important, as this is for you, and so only you can say if it is accessible, if something miss or is useless, and so on. (But I also need more experienced user's advices, as I am sure I don't know half of C::B advanced functions)

Anyway, all of this will be for tomorrow... Need to sleep

[edit]
before sleep and as a memento, I will speak about navigation (keyboard and mouse) though files, headers/sources, implementation/declaration, after the passage on splitting view and multiple views.

Hope someone will find it useful
« Last Edit: August 03, 2011, 12:36:58 am by Freem »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 4184
  • Interests on OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: C::B's tutorial
« Reply #2 on: August 03, 2011, 05:49:32 am »
The wiki page is quite Good. Thanks.
And I think there are a lot of video tutorials on ‪code::blocks‬‏ - YouTube to tell the beginners how to setup and use codeblocks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1399
Re: C::B's tutorial
« Reply #3 on: August 06, 2011, 04:37:33 pm »
Good job.  I fixed up some of the grammar here.  Feel free to merge any of the changes to your tutorial.

The French translation appears to be going on here.  The last page should have links to the most recent version (I myself have not tried it though).
« Last Edit: August 06, 2011, 04:44:12 pm by Alpha »

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: C::B's tutorial
« Reply #4 on: August 10, 2011, 01:54:08 pm »
I'm sorry, I didn't have time to continue it those last days (when I'm not at work, I let my mind be free, and it happen that it go very far from me).
I'll try to have some time after work to complete.

Thanks for corrections and the little complement, Alpha, I will integrate all of them.

Offline hurricane

  • Newcomer
  • *
  • Posts: 2
    • More about HostGator coupon
Re: C::B's tutorial
« Reply #5 on: August 17, 2011, 04:30:12 am »
As a newbie, I appreciate the tutorial. thanks!

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: C::B's tutorial
« Reply #6 on: August 18, 2011, 03:09:55 pm »
As a newbie, I appreciate the tutorial. thanks!
Thanks for your return.

I don't have so many time since last weeks I'm sorry to didn't have finished it.

Just for know, do someone know an offline editor to use wiki syntax? I could continue this doc in train... (I have near 3 hours by day, so I could use my notebook to finish it.)

Just after this post, I'll send the small add I made since the last time after my work, and use the nice corrections Alpha give me.

[edit]
Added a part about creating a project, and show how the workspace/project/target system work.
Target's part is not finished and I need to modify many things. I just this work to avoid it to be loss on my computer in my usual mess :)
I will need to finish this part, and then probably read everything, I'm sure there are some "refactoring" doable, to make all of this smaller and easier to understand.


[re edit]
I just noticed that alpha made something about that, so I'll look everything carefully and see what I should remove of my text.
« Last Edit: August 18, 2011, 03:24:59 pm by Freem »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 6665
    • Jens unofficial debian-repository for the Code::Blocks - IDE
Re: C::B's tutorial
« Reply #7 on: August 18, 2011, 03:57:03 pm »
@Freem:
as first many thanks for your work.

I did not (yet) read the article (no time at the moment), but there is one point I would like to be changed.

To enhance readability, I would prefer to see the images not in original site, but as thumbnails.
Another advantage of thumbnails is the loadspeed of the articles, if users do not have broadband connections (like me at home, just ISDN, 64kBit  :( ).
The syntax is quite simple, you can see how it is done on the article about wxWidgets cross-compiling on linux, I wrote a few years ago: http://wiki.codeblocks.org/index.php?title=Cross_Compiling_wxWidgets_Applications_on_Linux .
Regards

Jens  Debian - nightlies (and release) : http://apt.jenslody.de/ Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies : http://rpm.jenslody.de/

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: C::B's tutorial
« Reply #8 on: August 18, 2011, 04:43:31 pm »
@jens:
I didn't yet include screen-shots of any kind.
I prefer to first know what I need to tell and then, helping comprehension with images, when needed. (or sometime remove text and replace it with an image, but it's not truly the thing I prefer)
Ok, I have to admit, too... I'm not already familiar enough with tools like xpaint to make good screenshots quickly :D

I don't really like images, although I know they are usefull.
I don't like them because I don't have a big bandwith (my maximum download at home is 126kps), and, I have like to read :)

I think you thought you where on another post: http://forums.codeblocks.org/index.php/topic,15146.0.html
This page was written by alpha, and contain images.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1399
Re: C::B's tutorial
« Reply #9 on: August 20, 2011, 05:45:06 pm »
I just noticed that alpha made something about that, so I'll look everything carefully and see what I should remove of my text.
Sorry, I should have mentioned I was working on the earlier.

The "Keywords sets to additionally include" adds all the words defined in the "Syntax highlighting" "Keywords..." sets (the ones which are selected, that is) to the list of words CC suggests from.  (I had added a comment to the wiki page, but I forgot to tell you.)

The next section is good so far. (I had a bit of time for some more grammar fixes if you would like to add them.)

One tip you might want to add somewhere is parallel compiling for multiprocessor machines.  (Settings->Compiler and debugger->Build options "Number of processes for parallel builds:")

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: C::B's tutorial
« Reply #10 on: August 22, 2011, 10:40:17 am »
Quote
Sorry, I should have mentioned I was working on the earlier.
Not a problem, because I have really few time those days...

Quote
The "Keywords sets to additionally include" adds all the words defined in the "Syntax highlighting" "Keywords..." sets (the ones which are selected, that is) to the list of words CC suggests from.  (I had added a comment to the wiki page, but I forgot to tell you.)
I will work on your comments in train after the work, I've founded something like a wiki editor: zim it seem it will be useful to work off-line (I had give it a little try, it might also replace my usual note software)

Quote
The next section is good so far. (I had a bit of time for some more grammar fixes if you would like to add them.)
Thanks again for fixes! It seem I really need english lessons :lol:

Quote
One tip you might want to add somewhere is parallel compiling for multiprocessor machines.  (Settings->Compiler and debugger->Build options "Number of processes for parallel builds:")
It's planned, but I didn't finish this section too :)

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: C::B's tutorial
« Reply #11 on: September 22, 2011, 12:16:40 pm »
I have made some updates.
Adding missing parts about configuration (but it is always full of holes, because I am not a CB guru)
Changing some words that I didn't like
Cut some sections.

I also think I should split the page, as it is not truly a basic tutorial, it is more like an exhaustive (but sadly limited by my low knowledge of CB) presentation... And it could make some parts usable independently, too, without exposing unusable parts.
What do you think of it?

(And, sorry for the time I take to do it... I would like to go quicker, but days are so short...)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1399
Re: C::B's tutorial
« Reply #12 on: September 24, 2011, 12:58:46 am »
I also think I should split the page...
I think that would be a good idea; each section could contain general information, and have a link like
Code: [Select]
<span style="font-size:.9em">''Main article: [[Configuration]]''</span>
right after section headers to access the more detailed parts (the main page uses the same idea).

(And, sorry for the time I take to do it... I would like to go quicker, but days are so short...)
Days are definitely too short...