开发者

Libraries vs Original Code?

I'm working on an LGPL game engine library and I prefer to code without dependencies. So far I have windowing code using Xlib and OpenGL code. But I'm worried that eventually I'll need to use libraries anyway. This may be the case, I can write my own image loading stuff and much more, but I can't write audio code or networking code.

Now, I'm wondering, is it best to do it all myself for the learning experience? I'm sure I could figure it out, but what I'm really worried about is having bugs in my code that libraries have solved.

Now, if I do use libraries, that'd make it pointless to write original code and just use libraries.

I'm sorry i开发者_运维知识库f this is a hard thing, but I have OCD and it's either one or the other or some kind of solution like writing original code and having libraries as alternatives (since everything is abstracted anyway).


I do use libraries, that'd make it pointless to write original code and just use libraries.

Right.

Notice that everyone seems to use libraries of other people's code.

Download a few dozen large, sophisticated open-source projects and look at the dependencies.

You can climb higher by standing on the shoulders of giants.

Use other people's code early and often. The "No Dependencies" life-style can't exist unless you write your own OS and language.

but I have OCD and

Doesn't matter. Keep your personal issues to yourself. Seriously. If you refuse to make a technical decision based on the technology, consider another line of work.


Personally, I write original code before I use a library to do it for me. I like to know how it works and I learn best by actually doing it. Some people can understand it better by simply reading through the libraries. It depends on what suits you best.

I would definitely use libraries for large projects to help avoid bugs though.


The libraries are there for us to use. There is no point in stressing yourself out to do something that is already done.

If there's something the libraries aren't offering, then you write your own code to satisfy that specific need. It is much faster and efficient to do it this way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜