Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: Compressing...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 45779 of 47034
Post > Topic >>

Re: Compressing syntax/code, a testcase

by dizzy <dizzy@[EMAIL PROTECTED] > May 7, 2008 at 10:48 AM

Christopher wrote:

> On May 6, 10:22 am, dizzy <di...@[EMAIL PROTECTED]
> wrote:
> [snip]
>> How do you people solve similar issues?
> 
> Coding standards per project.
> i.e
> All code in this project will use exceptions for error handling.
> All text parameters will be in the form of const char * ( a string can
> always call c_str() )
> 
> Design decisions
> i.e
> Permissions are a parameter or they aren't.
> If a directory exists, no operation is performed.
> 
> 
> Trying to cover every combination is a wasted and bloated effort IMO.
> You cannot cater to everyone, but you can be consistent.
> Spending too much time and providing that many options for something
> as simple as making a directory would get me fired.

But mkdir(2) is a low level, common need that for sure will be needed for
almost any other project and I intend to reuse as much code as possible
(not have to rewrite mkdir for every different project because it has
other
coding style or design decisions). For mkdir needs I would have used
boost::filesystem::create_directory if that sup****ted privileges on
creation (to avoid an addition chmod system call).

> There is a time when one can program too generically.

I might have reached such a time but the code I write I intend to reuse in
any possible project that would need something like mkdir so I need alot
of
flexibility from it and (as any library code) to achieve the "do not pay
for what you don't need" design principle.

-- 
Dizzy
 




 6 Posts in Topic:
Compressing syntax/code, a testcase
dizzy <dizzy@[EMAIL PR  2008-05-06 18:22:49 
Re: Compressing syntax/code, a testcase
Christopher <cpisz@[EM  2008-05-06 12:47:08 
Re: Compressing syntax/code, a testcase
dizzy <dizzy@[EMAIL PR  2008-05-07 10:48:15 
Re: Compressing syntax/code, a testcase
James Kanze <james.kan  2008-05-07 03:09:24 
Re: Compressing syntax/code, a testcase
dizzy <dizzy@[EMAIL PR  2008-05-07 15:39:35 
Re: Compressing syntax/code, a testcase
James Kanze <james.kan  2008-05-09 02:24:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 3:03:14 CDT 2008.