473,503 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Good C Practice

This is my first post to this group so please take it easy.

I'm no C expert but I've been coding in it for a while, I always ask
myself what's the best place to see/read good C, by good C I mean
projects that use C effectively in a "modern" and concise way.

How can I judge what's a good practice ?
Where can we find it ?

For example, glib2, the low level API for the gtk framework uses C in a
OO fashion, full of callbacks and types, providing loads of layers of
abstraction. But each project is completely different from the other in
this aspect.

So what's the *cool* thing ? the right thing and/or the *wrong* thing ?

Sep 3 '08 #1
8 1701
Christiano Farina Haesbaert wrote:
This is my first post to this group so please take it easy.

I'm no C expert but I've been coding in it for a while, I always ask
myself what's the best place to see/read good C, by good C I mean
projects that use C effectively in a "modern" and concise way.

How can I judge what's a good practice ?
Where can we find it ?
If you are looking for something recent, manageable and well structured,
have a look at the Solaris ZFS source:

http://opensolaris.org/os/community/zfs/source/

--
Ian Collins.
Sep 3 '08 #2
On Wed, 03 Sep 2008 13:59:30 +1200, Ian Collins <ia******@hotmail.com>
wrote:
>Christiano Farina Haesbaert wrote:
>This is my first post to this group so please take it easy.

I'm no C expert but I've been coding in it for a while, I always ask
myself what's the best place to see/read good C, by good C I mean
projects that use C effectively in a "modern" and concise way.

How can I judge what's a good practice ?
Where can we find it ?
If you are looking for something recent, manageable and well structured,
have a look at the Solaris ZFS source:

http://opensolaris.org/os/community/zfs/source/
Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?

Sep 3 '08 #3
Pilcrow wrote:
On Wed, 03 Sep 2008 13:59:30 +1200, Ian Collins <ia******@hotmail.com>
wrote:
>Christiano Farina Haesbaert wrote:
>>This is my first post to this group so please take it easy.

I'm no C expert but I've been coding in it for a while, I always ask
myself what's the best place to see/read good C, by good C I mean
projects that use C effectively in a "modern" and concise way.

How can I judge what's a good practice ?
Where can we find it ?
If you are looking for something recent, manageable and well structured,
have a look at the Solaris ZFS source:

http://opensolaris.org/os/community/zfs/source/

Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?
Years ahead!

--
Ian Collins.
Sep 3 '08 #4
Pilcrow wrote:
>>http://opensolaris.org/os/community/zfs/source/

Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?
ZFS is a file system, Linux is an operating system kernel.

Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"... the industrial-capitalist mode of software production
was doomed to be outcompeted from the moment capitalism
began to create enough of a wealth surplus for many
programmers to live in a post-scarcity gift culture."
-- Eric S. Raymond
Sep 3 '08 #5
Ian Collins wrote:
>Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?
Years ahead!
Saying ZFS (a filesystem) is years ahead of Linux (an OS kernel) is
is somewhat silly.

Saying "The OpenSolaris platform" is years ahead of "The Linux
Platform" is just as silly because there is at least one area
where OpenSolaris is about a decade behind the commonly used
Linux distros.

Erik (who once worked at SUN but never drank the Koolaid)
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
The word "Windows" is a word out of an old dialect of the
Apaches. It means: "White man staring through glass-screen
onto an hourglass..."
Sep 3 '08 #6
Erik de Castro Lopo <no****@mega-nerd.comwrote:
Ian Collins wrote:
Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?
Years ahead!

Saying ZFS (a filesystem) is years ahead of Linux (an OS kernel) is
is somewhat silly.
Not if you're talking about programming style. SunOS was years ahead of
Linux in solidity and style decades ago, and still is.

Richard
Sep 3 '08 #7
Erik de Castro Lopo wrote:
Pilcrow wrote:
>>http://opensolaris.org/os/community/zfs/source/
Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?

ZFS is a file system, Linux is an operating system kernel.
I think OP's question was regarding C programming style.

--
/"\ Join the ASCII | Thommy M. Malmström
\ / ribbon campaign | AB Hardeberga IT
X against HTML mail | Skiffervägen 23, 224 78 Lund
/ \ and postings | +46 70 969 57 93
================================================== =====================
http://www.at-hardeberga.com thommym (at) at-hardeberga.com
================================================== =====================
"The box said 'Windows 2000 Server or better', so I installed Solaris."
================================================== =====================
Sep 3 '08 #8
Thommy M. Malmström wrote:
Erik de Castro Lopo wrote:
>Pilcrow wrote:
>>>http://opensolaris.org/os/community/zfs/source/
Very interesting link. Pardon what may be a stupid question, but how
similar/different is this from linux?
ZFS is a file system, Linux is an operating system kernel.

I think OP's question was regarding C programming style.
So were my replies.

--
Ian Collins.
Sep 3 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
3544
by: matty | last post by:
Go away for a few days and you miss it all... A few opinions... Programming is a craft more than an art (software engineering, not black magic) and as such, is about writing code that works,...
3
3777
by: Erik De Keyser | last post by:
Hi group, I have a couple of projects with up to 8 forms. On most projects I write the code on each form with no modules. The last project I use 1 module and minimal code on each form , in fact...
7
2593
by: zalzon | last post by:
Is it good practice in C++ for a member function to return data or is it better that data is stored in private member variable and printed in the member function? should i be using int...
1
1764
by: trebor | last post by:
I'm learning dotNet, although I first learned programming back in the days when structured programming was all the rage. In both my books and courses, I've seen something like this: Public Class...
150
6320
by: tony | last post by:
If you have any PHP scripts which will not work in the current releases due to breaks in backwards compatibility then take a look at http://www.tonymarston.net/php-mysql/bc-is-everything.html and...
13
3050
by: PromisedOyster | last post by:
Many in our development team have came from a C++ background and are in the practice of prefixing private class variables with an underscore to improve readability and avoid naming collisions with...
66
3654
by: KimmoA | last post by:
Hey! Some questions about C that have been bugging me for a while... 1) Is inline a valid C keyword or not? I was kind of surprised of not finding it in C, to be honest. My "The C Programming...
8
7496
by: SM | last post by:
I've always wonder if there is diference when declaring and initializing a varible inside/outside a loop. What's a better practice? Declaring and initializing variables inside a loop routine,...
6
2543
by: MLH | last post by:
I have frmMainMenu with the following two code lines invoked on a button click... 2420 DoCmd.OpenForm "frmVehicleEntryForm", A_NORMAL, , , A_ADD, A_NORMAL 2440 DoCmd.GoToRecord , , A_NEWREC ...
1
3102
by: dan | last post by:
Hi, I think I need a gridview, formview, another gridview, and another formview on a single page. There is a parent-child relationship between the first gridview and the formview and then...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.