Author Topic: Suggested changes to default Configuration of Code::Blocks  (Read 10600 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Suggested changes to default Configuration of Code::Blocks
« on: February 23, 2010, 07:52:49 pm »
Suggested changes to default Configuration of Code::Blocks

Have full compiler logging turned on by default.


Anyone has any thing else to add?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #1 on: February 24, 2010, 02:24:14 am »
+1
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #2 on: February 24, 2010, 02:29:17 am »
I have two:

-for the abbreviation
for the class
 
Quote
class $(Class name)|
{
   public:
      $(Class name)();
      ~$(Class name)();
   protected:
      
   private:
      
};

I think we should change them to something like this:
Quote
class $(Class name)|
{
   public:
      $(Class name)(){};
      ~$(Class name)(){};
   protected:
      
   private:
      
};

note the "{}" should be added.or will get compile error if you do not add it after using abbreviation for class.



-for the codecomplition.


I think the min count should be set to 1 in automatically launch when typing # letters.in current it is 2.

because for a good enough machine.it can handle it well for 1.
« Last Edit: February 24, 2010, 05:56:41 am by blueshake »
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #3 on: February 24, 2010, 04:31:56 am »
« Last Edit: February 24, 2010, 06:00:27 am by blueshake »
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #4 on: February 24, 2010, 05:51:53 am »
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #5 on: February 24, 2010, 11:18:39 am »
"Use Tab charcter" should be turned on in my opinion. If the user presses tab, he normally wants tab, not 4 spaces. Otherwise, why not hit the spacebar four times. The existence of some old broken editor that cannot handle tabs is no excuse in my opinion, and people using tabulators for something they're not made isn't either.

"Ensure consistent EOLs" is something that should be turned on, too. It doesn't really harm (in any case it is not more harmful than "strip trailing whitespace" which already is on by default), nor does it really do anything at all -- except in the rare case when you edit one source under two platforms. In that case it will prevent Subversion from screwing up.

"Use POSIX style" and "Use advanced regex" for searches are probably safe to be turned on by default. This is how most tools like grep work, so it's what users probably expect anyway.

-for the codecomplition.
I think the min count should be set to 1 in automatically launch when typing # letters.in current it is 2.
because for a good enough machine.it can handle it well for 1.
The default is 4, not 2 -- which is a good choice in my opinion. Could even be 5, if you ask me. Code completion being fired up after typing a single character (or 2 characters) not only burns a lot of CPU cycles which will annoy notebook users, but it also does not do anything useful. In any reasonably sized program, typing a single char would cause code completion to show around 5000-10000 matches. What am I supposed to do with that many matches?
Code completion should, ideally, show exactly one match. Maybe two. Of course that is not always possible, but if it consistenly pops up more than 5-8 matches, then it only hinders your workflow instead of helping.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #6 on: February 24, 2010, 11:35:05 am »
"Use Tab charcter" should be turned on in my opinion.
I think it should be the opposite. Why? Everybody that has a different tab size will see text that is screwed up in the case of mixed tabs/spaces. Still in the 21st century there is a lot of files using tabs and spaces mixed together and still everybody prefers a different meaning of a tab in terms of spaces. This looks awful and the only way out it not using tabs from my point of view.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #7 on: February 24, 2010, 11:56:28 am »
"Ensure consistent EOLs" is something that should be turned on, too. It doesn't really harm (in any case it is not more harmful than "strip trailing whitespace" which already is on by default), nor does it really do anything at all -- except in the rare case when you edit one source under two platforms. In that case it will prevent Subversion from screwing up.
My opinion is that this should be Off, but maybe I'm using C::B/svn in the wrong way. Can explain?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #8 on: February 25, 2010, 04:47:52 am »
I vote for 1 or 2 characters.  Reduce max returned results if need be.  I turn my max results down to 32.  If its not in that list I obviously need to type another character.  I also vote for turning tab character on by default.  The fact that someone wants a different size tab means they can adjust that to taste with a single setting instead of having to change their tab width AND set up astyle.  If its a tab character from the start one further change fixes everything to taste if default tab size isnt appreciated.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #9 on: February 25, 2010, 11:22:55 am »
Quote
I think it should be the opposite. Why? Everybody that has a different tab size will see text that is screwed up in the case of mixed tabs/spaces. Still in the 21st century there is a lot of files using tabs and spaces mixed together and still everybody prefers a different meaning of a tab in terms of spaces. This looks awful and the only way out it not using tabs from my point of view.
Well, "tab" and "4 spaces" are not the same thing, actually tab has no "meaning in terms of spaces" at all. The meaning of a tab is "indent one level". This may visually appear to be the same as 4 or 8 spaces, or it may look like 5.35 spaces, or any other possible value. In any case, it does not have any such meaning.
Quite bluntly said, you want to forfeit the semantically correct thing in all your sources even though you know it's wrong because there are some people on this planet who are too stupid to do it right in their sources. That doesn't seem like a good solution to me :)  But well, I guess it depends on what you do and what/who you have to work with.
It is just my belief that supporting wrong behaviour is not going to change it, not in the 21st and not in the 22nd century.

Quote
Can explain?
If you create a source file under Windows and later edit it under Linux (and maybe under Windows again), you will have a source file of which some lines have CRLF and some have LF. Similar problems occur with Mac.
This doesn't matter a lot for you at first sight, since there is no visual difference in the editor. However, under some conditions, the results may be undesirable -- most notably, Subversion will fail to accept your file if you try to commit it.
If "consistent line endings" is turned on, the editor will make sure all endings are the same. If they are the same anyway, nothing is done, so there is no harm.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #10 on: February 25, 2010, 12:30:54 pm »
I completely agree with Thomas.
Use TAB by default.
As Thomas explains, we want to indent, and therefor the tab is the tool number 1 ;-)

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #11 on: February 25, 2010, 02:59:35 pm »
I completely agree with Thomas.
Use TAB by default.
As Thomas explains, we want to indent, and therefor the tab is the tool number 1 ;-)

I agree in principle, but not in practice.  Tabs were originally meant to be a horizontal stop on a TTY machine, and don't really have an analog on a CRT.  Since (in a fixed-width font) a tab is normally the same as 8 spaces, indenting your code more than 3 or 4 levels will make some lines run off the right-hand edge of the screen.  If you are like me, then you want to see as much of your code as you can in one glance, without constantly scrolling right and left.

However, since it is all a matter of personal preference, and has no real effect on compiling the code, any default is fine; the user only needs to change the setting once and it "sticks" for all sessions.

Ringo

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #12 on: February 25, 2010, 03:08:22 pm »
But well, I guess it depends on what you do and what/who you have to work with.
Exactly. And if in one project everybody has a different interpretation for a tab and there is no consistent style it drives you (me) mad to over and over adjust the "meaning" of a tab in terms of spaces. So - for me spaces will be the default. As it is an option I can set it. The default value shall be what most people want. No problem with me.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #13 on: March 05, 2010, 09:51:40 am »
Suggested changes to default Configuration of Code::Blocks
Have full compiler logging turned on by default.
Tim S.
+1
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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Suggested changes to default Configuration of Code::Blocks
« Reply #14 on: March 05, 2010, 02:42:47 pm »
Suggested changes to default Configuration of Code::Blocks
Have full compiler logging turned on by default.
Tim S.
+1
I fully agree.