keyongtech


  keyongtech > c > 02/2006

 #1  
02-07-06, 01:02 PM
sailor.gu
Hi all guys,

As an embeded programmer with five year C experience,
I did read many great books related with design, coding,
test,debug,algorithms, compiler, design, os, pm and others.

I always dream to achieve a refined and reusable design and
implementation.

I am very interested with code reuse.
I studied "c interfaces and implementations", "refactoring", "gof's
design pattern"
These days, I go through "head first design pattern" again.
but I am still perplexed with code reuse and design reuse.

I assure great works adopted many classic design pattern or design
experience.
but I found traditional design pattern is face to those OO
language(such as C++, java and etc.)
It seems very difficult to apply those famous design pattern or
experienced princple in C.

Is there any one have the experinece, pratice or suggestion with my
puzzle?

In other word,
How can we dig out and adopt the classic design experience from
experts?

I know code reading and pratice may be a correct way.
but it seems grows slowly.

Is there a better way to improve the design ability?

Any comments is appreciated and thankful.

Sailor
 #2  
02-07-06, 01:16 PM
Vladimir S. Oka
sailor.gu wrote:
> Hi all guys,


<snip lots>

> In other word,
> How can we dig out and adopt the classic design experience from
> experts?
>
> I know code reading and pratice may be a correct way.
> but it seems grows slowly.


I think you're spot on here. Read both good code and good books, and
write lots of your own. It does take time. No great skills come in a
flash. If you were expecting that, you'll be hugely disappointed.

Coming back here with specific questions about C is also a very good
idea, lurking for a good while before you do it even better.

Sail away, Sailor! ;-)

PS
Writing as much Standard compliant C code as possible will help you
greatly if portability and reusability are truly your aims.
 #3  
02-08-06, 02:31 AM
sailor.gu
Thanks for your straightforward comments.

But maybe you miss-understand my meanings.
I never expect obtain great kill without a hard work.

All specific questions about C may not be a great puzzle for me,
I can get solution by my practice or by getting help from other gosu.

But I just feel confused to apply design pattern in C code.
Maybe my post should be not be in comp.lang.c, but I think there are
many experienced c user.
Some of them may have good suggestion for my confuse.

Also I am unsatisfied with my designed works. even I implemented many
modules in embeded os, such as web server, dhcp server, memory pool and
many drivers.

Any gosu can give me some suggestion with my headache.
In other word, how to grow from senior designer into excellent
designer?
Maybe it is a too great topic, but any suggestions is also appreciated
very much.
 #4  
02-08-06, 04:28 AM
Hemant Mohan
As far as my experience in Embedded Systems is concerned, there is no
direct way for code reuse or design reuse, simply because every
embedded system has its own unique requirements which cannot be
satisfied by reuse of code without indulging into extra overheads. The
major difference between normal and embedded systems is that most
embedded systems are resource scarce systems so much so that many time
we even don't write C code but have to stick to assembly. Hence reuse
is out of question at least for such systems
 #5  
02-08-06, 06:35 AM
Ian Collins
sailor.gu wrote:
>
> Any gosu can give me some suggestion with my headache.
> In other word, how to grow from senior designer into excellent
> designer?


Practice, practice and mode practice.

I'd also strongly recommend learning another computer language,
something quite different from C (Ruby, Python, Lisp). Other languages
do things in different ways that can improve your overall knowledge and
skills base.
 #6  
02-08-06, 07:33 AM
sailor.gu
Surely, programmer is just a person to solve customer's different
needs.
Many application or module may is just designed for some specific
customer's need.

but we should admit that some of module can be designed more reusable
and more extendable.
 #7  
02-08-06, 07:58 AM
sailor.gu
strongly agreed with your idea.
and lisp is interesting, I will have a try about lisp, but maybe it is
hard to get some natual case to practice with lisp.
 #8  
02-08-06, 08:13 AM
Vladimir S. Oka
sailor.gu wrote:
> strongly agreed with your idea.
> and lisp is interesting, I will have a try about lisp, but maybe it is
> hard to get some natual case to practice with lisp.


*Please* quote what and who you're replying to. Have a look at:

http://cfaj.freeshell.org/google/

As for lisp, once you're familiar with it, I'm sure you'll see plenty of
`natural` problems for it. After all, it wasn't created for nothing.
Looking at some newsgroups dedicated to it is likely to help, too.

Here, please confine the questions to C.
 #9  
02-08-06, 09:38 AM
CBFalconer
"sailor.gu" wrote:
>
> strongly agreed with your idea.
> and lisp is interesting, I will have a try about lisp, but maybe it is
> hard to get some natual case to practice with lisp.


What idea? Whose? You need to include context. Google is not
usenet. Most readers of this (or any other) newsgroup may never
have received, and may never receive, any previous articles. You
must make each article stand by itself. This requires context and
attributions. See below, and READ THE URLs, for means to acheive
this even with the foully broken Google interface.
 #10  
02-08-06, 12:31 PM
sailor.gu
> "If you want to post a followup via groups.google.com, don't use
> the broken "Reply" link at the bottom of the article. Click on
> "show options" at the top of the article, then click on the
> "Reply" at the bottom of the article headers." - Keith Thompson
> More details at: <http://cfaj.freeshell.org/google/>
> Also see <http://www.safalra.com/special/googlegroupsreply/>

Thanks for your advise.
 #11  
02-08-06, 07:41 PM
Keith Thompson
"sailor.gu" <sailor.gu> writes:
>> "If you want to post a followup via groups.google.com, don't use
>> the broken "Reply" link at the bottom of the article. Click on
>> "show options" at the top of the article, then click on the
>> "Reply" at the bottom of the article headers." - Keith Thompson
>> More details at: <http://cfaj.freeshell.org/google/>
>> Also see <http://www.safalra.com/special/googlegroupsreply/>

> Thanks for your advise.


And please don't delete the attribution lines (the ones that say
"so-and-so writes:"). It's easier to follow the discussion if we know
who said what.
 #12  
02-08-06, 09:32 PM
Jordan Abel
On 2006-02-08, Keith Thompson <kst-u> wrote:
> "sailor.gu" <sailor.gu> writes:
>>> "If you want to post a followup via groups.google.com, don't use
>>> the broken "Reply" link at the bottom of the article. Click on
>>> "show options" at the top of the article, then click on the
>>> "Reply" at the bottom of the article headers." - Keith Thompson
>>> More details at: <http://cfaj.freeshell.org/google/>
>>> Also see <http://www.safalra.com/special/googlegroupsreply/>

>> Thanks for your advise.

>
> And please don't delete the attribution lines (the ones that say
> "so-and-so writes:"). It's easier to follow the discussion if we know
> who said what.


I'm not sure that an attribution line applies properly to a signature -
since it's inserted automatically.
 #13  
02-08-06, 11:55 PM
Keith Thompson
Jordan Abel <random832> writes:
> On 2006-02-08, Keith Thompson <kst-u> wrote:
>
> I'm not sure that an attribution line applies properly to a signature -
> since it's inserted automatically.


I don't understand; there was no mention of signatures.
 #14  
02-09-06, 12:17 AM
Jordan Abel
On 2006-02-08, Keith Thompson <kst-u> wrote:
> Jordan Abel <random832> writes:
>
> I don't understand; there was no mention of signatures.


The line snipped immediately before the quoted text:

>--


see?
 #15  
02-09-06, 01:38 AM
Keith Thompson
Jordan Abel <random832> writes:
> On 2006-02-08, Keith Thompson <kst-u> wrote:
>
> The line snipped immediately before the quoted text:
>> see?


Yes, I see that sailor.gu was quoting CBFalconer's signature; I hadn't
noticed because sailor.gu didn't quote the "-- ".

But I don't see any reason to snip an attribution line even if you're
commenting on a signature. Do you?

Similar Threads
How to Use Templates to Reuse Design Elements?

Hi everyone, I've noticed a lot of discussion and posts online about using templates to easily reuse design elements, and by using data binding, having each instance of the...

Reuse and software design

Okay, so I've been running things through my head recently, and wondering about opinions on this. I spoke yesterday evening to the Pikes Peak Java Developers Group, and...

perplexed with code reuse and adopt design pattern in C

Hi all guys, As an embeded programmer with five year C experience, I did read many great books related with design, coding, test,debug,algorithms, compiler, design, os, pm...

Reuse paramter list and reuse connection

I can't seem to find where to reset the parameter list. Dim objCmd as New SqlCommand(CommandText,objConn) with objCmd.Parameters .Add("@StateCode",SqlDbType.Char,2).value =...

FrontController Design Pattern and Code Reuse

Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for...


All times are GMT. The time now is 06:26 AM. | Privacy Policy