[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Indentation
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2005-03-05 15:52:58
Message-ID: 200503050853.03963.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 05 March 2005 08:05, Anne-Marie Mahfouf wrote:
> Hi,
>
> A developer looked into my code (KHangMan in kdeedu if you want to look)
> and fixed a bug (that was cool) but he also wrote me that he never saw such
> an indentation mess before.

he's either lieing or hasn't seen much code then ;) either way, that's kind of 
a rude and non-useful thing to say to someone bout their code :/

> He did not tell me what editor he uses, I use 
> Kate and thought my indentation was quite OK. 

probably because kate doesn't visually show tabs... if you use an editor that 
does (and have that option turned on), you see something like this in some 
parts of the code:

void KHangMan::loadSettings()
{
    *   // Language
    *   selectedLanguage = Prefs::selectedLanguage();
*       if (m_languages.grep(selectedLanguage).isEmpty())
*       *       selectedLanguage = "en";
     *  setLanguage(selectedLanguage);
    *   // Level
    *   currentLevel = Prefs::level(); //default is easy
     *  // Show/hide characters toolbar
   *    m_bCharToolbar = Prefs::showCharToolbar();
   *    if (m_bCharToolbar)
*       *       secondToolbar->show();
  *     else
*       *       secondToolbar->hide();
    *   //see if language has special accented letters
    *   setAccentBool();
    *   m_view->accent_b = Prefs::accentedLetters();
    *   if (m_view->m_accent && m_view->accent_b)
*       *       changeStatusbar(i18n("Type accented letters"), IDS_ACCENTS);
    *   loadDataFiles();

*       setLevel();


the stars are tabs... so, there's a mix of spaces and tabs in some areas. it 
doesn't make thing align wrong, but looks a bit odd if you view the tabs. if 
you really feel like it, you could strip the leading spaces quite easily with 
a regular expression and be done with it. not that it's a big issue though =)

(personally, i don't use tabs in my code. i use all spaces. but that's largely 
a personal preference)

-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic