本文介绍了代码重用和设计重用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


作为一名拥有五年C经验的嵌入式程序员,

我读过许多与设计,编码相关的好书,

测试,调试,算法,编译器,设计,操作系统,下午和其他。


我总是梦想实现精致和可重复使用的设计和

实现。


我对代码重用非常感兴趣。

我研究了c接口和实现,重构, ; gof'的

设计模式"

这些天,我经历了头脑设计模式再次。

但我仍然对代码重用和设计重用感到困惑。


我保证伟大的作品采用了许多经典的设计模式或设计

体验。

但我发现传统的设计模式面向那些OO

语言(如C ++,java等)

在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 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

推荐答案




我认为你就是在这里。阅读好的代码和好书,

写下你自己的很多。确实需要时间。

flash中没有出色的技能。如果你期待的话,你会非常失望的。


回到这里,关于C的具体问题也是一个非常好的想法,burking在你做得更好之前一段时间。


航行,水手! ;-)


PS

尽可能多地编写符合标准的C代码,如果可移植性和可重用性,将大大帮助您获得
真正的你的目标。



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.




这篇关于代码重用和设计重用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 03:00
查看更多