• Forum
  • Lounge
  • Using Libraries VS. doing everthing from

 
Using Libraries VS. doing everthing from scratch

Im developing my own library very seriously, a multimedia engine/game engine and im in awe at how complex things can get. You have memory management, file io, thread handling, graphics, sockets, and gui. It feels insane to even code gui wrappers in-house for each platform as well as Opengl loader functions for each platform. I'm doing this all myself and it doesnt seem practical to code certain things. Right now I have typedefs and compile time determinent procedures right now it seems that it is best for me to use GLEWT for Opengl loading and a library maybe for gui maybe. I also have a simple math lib for vectors, points, and matrices.

Right now, I would like to learn several ways to do proper memory management. I know of the boost library, but I would prefer learn a bit more Comp Architecture before I integrate another library for anything such as Memory Management. Right now my lib has smart pointers and ref-counting but I need a Memory manager that can keep track of what can be read or written and what can't

When do you guys draw the line between doing it yourself and using a third party library? BTW im 19 and this is what I'm in college for so I still have time to learn and this is why I'm reluctant to use a library which may eventually become deprecated.
Last edited on
It's a whole lot of work to do this type of thing and keep up on maintenance. It seams like your learning a lot, so I think it's worth it for you.

In the long run you could open source it. Or maybe it would be a good learning experience joining an existing open source project.

If you just want to develop games or multimedia programs, you would be a heck of a lot more productive using a good existing library.
Last edited on
@iseeplusplus what open source project could you suggest that is similiar for what im trying do/learn about. Also as far as open sourcing it i've thought it and it is not yet worthy. While i'm following oop and state based design principles I have not yet come up with any diagrams. I've also thought about starting a team but then I would have to handle the legality part, and copyrights. If it gets big enough I will consider help. Right now its small, about 1mb of c/c++ code.
When do you guys draw the line between doing it yourself and using a third party library?
If it exists, it's good, and using it doesn't contradict project goals (e.g. I wouldn't use libvorbis if the point of the project is to make a libvorbis alternative. I wouldn't use an extremely large library if keeping the binary small is a priority), then I use it. There's little point in solving the same problem twice when there's a world of unsolved problems out there.

I'm reluctant to use a library which may eventually become deprecated
What do you mean "deprecated"? Libraries don't just poof out of existence.

Also as far as open sourcing it i've thought it and it is not yet worthy. While i'm following oop and state based design principles I have not yet come up with any diagrams.
Again, what do you mean?

I've also thought about starting a team but then I would have to handle the legality part, and copyrights.
Oh, I wouldn't worry about that. You'll have enough problems just finding people willing to work on your project (well, for free, anyway).
What do you mean "deprecated"? Libraries don't just poof out of existence.

^by deprecated I mean that the library has no community support and very few updates.


[quote]
Also as far as open sourcing it i've thought it and it is not yet worthy. While i'm following oop and state based design principles I have not yet come up with any diagrams.
[ /quote]
Again, what do you mean?

I mean I have a standard set of conventions set inside of my code for coding. How object are to interact, what to and what not to do; For appropriate file naming, type-naming, structure usage, states vs modes, aggregation and inheritence; basically a set of guidelines and a log of to do's. All i need is to organize these things into uml diagrams and possibly keep a repository of them to speed up and clean up my method of developing.
Last edited on
When do you guys draw the line between doing it yourself and using a third party library?

The standard library and boost are used always, the rest depends on the project and on the library.
Last edited on
^by deprecated I mean that the library has no community support and very few updates.
That by itself is not a bad thing. zlib is updated very infrequently, but it's a great library. Like it there are many other examples.
As for community support, that's not something that just goes away overnight.

I mean I have a standard set of conventions set inside of my code for coding. How object are to interact, what to and what not to do; For appropriate file naming, type-naming, structure usage, states vs modes, aggregation and inheritence; basically a set of guidelines and a log of to do's. All i need is to organize these things into uml diagrams and possibly keep a repository of them to speed up and clean up my method of developing.
What's any of that got to do with opening the source?
^ im implying that before I open the source I've got some diagramming to do. I don't want to make it open source if its not concrete/stable enough to be used in an application. I feel that diagramming and documenting will help to achive this.

edit:
@helios you make some good points with the community support part, i just prefer to use something current that is of decent quality and has timely support. just my preferences, and thanks all.
Last edited on
i just prefer to use something current that is of decent quality and has timely support
That's just fine. What I'm saying is that if something is very popular now, it's not likely to suddenly become unpopular.
For example, you're now using OpenGL. Are you worried that everyone in the world will get up tomorrow, switch over to a different library, and abandon OpenGL completely? No, you're not, because enough code depends on it to make that possibility so wildly unlikely that it's not even worth considering.

The argument that a piece of software may become "deprecated" so it's better not to depend on it, is just flawed.
While I understand what you're saying Helios, it's difficult to tell if that argument is applicable to the types of libraries he is looking for. There may not be anything with any sort of long standing support and dependency that will meet his requirements.
Topic archived. No new replies allowed.