Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #11906

Re: .h and .cpp

From ralph <nt_consulting64@yahoo.net>
Newsgroups comp.lang.c++
Subject Re: .h and .cpp
Date 2011-11-28 14:24 -0600
Organization Aioe.org NNTP Server
Message-ID <n9o7d7d94cfth7p4ord3cphfrc6quum94c@4ax.com> (permalink)
References <d30834a8-3bf4-49a4-b1eb-b66aef965475@i8g2000vbh.googlegroups.com> <3lk7d7ds9k4h654fveq10cfftbj5pm8nbe@4ax.com> <ad50180d-04cd-4ca6-a24e-b0bbbda72ec7@d17g2000yql.googlegroups.com>

Show all headers | View raw


On Mon, 28 Nov 2011 10:48:17 -0800 (PST), Christopher
<cpisz@austin.rr.com> wrote:

>> Sounds like a group out-of-control.
>>
>> Sadly you either have the authority to enforce coding standards, or
>> you do not. If you do then "just do it, its the thing to do" OR *its
>> your job* is the only reliable answer. Otherwise, live with it chewing
>> away as opportunities present themselves, or seek other employment.
>
>I am beginning to think that might be the case, but if the boss says
>"I beleive you, you just have to give some reasoning aside from I said
>so." Then I wanted to at least try before joining the "I am looking
>for employment" group again.
>
>> Number 8 above
>> "8) Every .cpp file should compile into a .obj file without error
>>  or warning on its own"
>> can be corrected with daily builds and penalties for "breaking the
>> build".
>
>Not really, because the build in its entirety brings in other .cpp
>and .h files as well as precompiled headers, in which things were
>defined in the wrong places, but the compiler remains happy. It just
>ends up being a fragile build that breaks often, because standards
>weren't followed. When compiling just one .cpp by itself, everything
>has to be defined and correct.

I was thinking of intermediate or validation "builds" as part of the
daily build. Which is something I often enforce with large projects,
ie, no translation unit gets through with warnings and errors. Even
so, as you noted, the build is fragile and will destruct sooner or
later. Making those responsible for breaking the build - responsible
for repairing the build, will go a long way to getting the message
across.

Also frequent Code Reviews will help.

Setting up and maintaining an enterprise level development effort is
not a trivial exercise. It encompasses more that just "coding
standards".

As others noted not all your rules are "unquestionable". Few *best
practices* are. There are always exceptions, though as the proverb
says "it is the exception that makes the rule".

You have to start somewhere. Having a good reason to break a rule is
very useful in gaining an understanding of why the rule was there in
the first place.

Hold on. Chew away. Be happy if you can make a change. Don't beat
yourself up when you can't. (ie, don't take it home with you. <g>)

-ralph

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

.h and .cpp Christopher <cpisz@austin.rr.com> - 2011-11-28 09:20 -0800
  Re: .h and .cpp Leigh Johnston <leigh@i42.co.uk> - 2011-11-28 17:30 +0000
    Re: .h and .cpp Christopher <cpisz@austin.rr.com> - 2011-11-28 10:39 -0800
      Re: .h and .cpp Tobias Müller <troplin@bluewin.ch> - 2011-11-28 19:09 +0000
  Re: .h and .cpp ralph <nt_consulting64@yahoo.net> - 2011-11-28 12:37 -0600
    Re: .h and .cpp Christopher <cpisz@austin.rr.com> - 2011-11-28 10:48 -0800
      Re: .h and .cpp ralph <nt_consulting64@yahoo.net> - 2011-11-28 14:24 -0600
      Re: .h and .cpp yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-11-30 11:24 +0000
        Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-12-01 21:42 +0000
          Re: .h and .cpp Rui Maciel <rui.maciel@gmail.com> - 2011-12-02 02:03 +0000
            Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-12-02 20:59 +0000
  Re: .h and .cpp "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-28 19:45 +0100
    Re: .h and .cpp Leigh Johnston <leigh@i42.co.uk> - 2011-11-28 19:03 +0000
      Re: .h and .cpp "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-28 20:36 +0100
    Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-28 22:52 +0000
      Re: .h and .cpp yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-11-30 11:39 +0000
        Re: .h and .cpp Juha Nieminen <nospam@thanks.invalid> - 2011-11-30 12:50 +0000
          Re: .h and .cpp yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-11-30 13:57 +0000
            Re: .h and .cpp Juha Nieminen <nospam@thanks.invalid> - 2011-11-30 15:06 +0000
          Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-30 16:21 +0000
        Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-30 16:12 +0000
  Re: .h and .cpp Goran <goran.pusic@gmail.com> - 2011-11-28 10:58 -0800
    Re: .h and .cpp Christopher <cpisz@austin.rr.com> - 2011-11-28 13:30 -0800
      Re: .h and .cpp Tobias Müller <troplin@bluewin.ch> - 2011-11-29 06:44 +0000
      Re: .h and .cpp Goran <goran.pusic@gmail.com> - 2011-11-29 01:17 -0800
      Re: .h and .cpp Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-11-30 00:53 -0800
    Re: .h and .cpp "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-29 10:57 +0100
    Re: .h and .cpp yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-11-30 12:05 +0000
  Re: .h and .cpp Rui Maciel <rui.maciel@gmail.com> - 2011-11-28 20:07 +0000
  Re: .h and .cpp Geoff <geoff@invalid.invalid> - 2011-11-28 12:17 -0800
    Re: .h and .cpp Ian Collins <ian-news@hotmail.com> - 2011-11-29 11:41 +1300
      Re: .h and .cpp gwowen <gwowen@gmail.com> - 2011-11-29 07:37 -0800
    Re: .h and .cpp Goran <goran.pusic@gmail.com> - 2011-11-29 00:08 -0800
    Re: .h and .cpp Daniel <danielaparker@gmail.com> - 2011-11-29 08:31 -0800
      Re: .h and .cpp ralph <nt_consulting64@yahoo.net> - 2011-11-29 14:49 -0600
        Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-30 00:21 +0000
  Re: .h and .cpp Andy Champ <no.way@nospam.invalid> - 2011-11-28 21:30 +0000
  Re: .h and .cpp Paavo Helde <myfirstname@osa.pri.ee> - 2011-11-28 18:05 -0600
  Re: .h and .cpp Paavo Helde <myfirstname@osa.pri.ee> - 2011-11-28 18:27 -0600
  Re: .h and .cpp Juha Nieminen <nospam@thanks.invalid> - 2011-11-29 07:55 +0000
    Re: .h and .cpp Christopher <cpisz@austin.rr.com> - 2011-11-29 12:15 -0800
      Re: .h and .cpp Leigh Johnston <leigh@i42.co.uk> - 2011-11-29 20:19 +0000
        Re: .h and .cpp Christopher <cpisz@austin.rr.com> - 2011-11-29 12:31 -0800
          Re: .h and .cpp Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-30 00:31 +0000
        Re: .h and .cpp Juha Nieminen <nospam@thanks.invalid> - 2011-11-30 09:43 +0000
      Re: .h and .cpp Ian Collins <ian-news@hotmail.com> - 2011-11-30 09:23 +1300

csiph-web