Page 1 of 1

Defining Code Purity

Posted: Thu Aug 09, 2007 11:25 pm
by Stoves
This topic is intended to discuss everyone's feelings about the use of tutorials, libraries, and example code when programming.

I personally don't like using libraries at all, but I'll read over the code until I understand it and then implement what I like in my own way. Tutorials with coded examples are great, and I live off of help files. However, if I have to cut and paste from a code example that I don't completely understand, I don't really consider the program completely mine, no matter how creatively I use the foreign code. Also, I hate the idea of having to call assembler code or C code even if I wrote it myself.

When it comes to FreeBasic, I almost feel like it's too easy or that someone else really did all the work, because so much is done for you compared to QB. But I think that's just prejudice from years of QB programming.

What does everybody else think?

Posted: Fri Aug 10, 2007 12:34 am
by Anonymous
I learn from other peoples code and then write it how I need to use it. I prefer to understand the code as much as possible through trial and error before I have to refer to something.

Posted: Fri Aug 10, 2007 1:00 am
by Stoves
Along the same lines of the topic question, what do you think about using libraries like directqb which are written by someone else and often call code written in a different language? While it's not the easiest thing in the world to implement (the manual for directqb is 150 pages), it still feels like cheating to me. :) What's odd is it usually doesn't bother me when other programmers use libraries. (Unless I can't find the .bi file and I'm trying to recompile the source.)

Posted: Fri Aug 10, 2007 3:26 am
by MystikShadows
I can saw that I used to be a very purified purifier of code I wouldn't touch a library like DirectQB not that it wasn't good, back then I wouldn't have even touched a sorting sub either even if I did understand it. (and that was a long long time ago). Today I drew my own line at "reinventing the wheel". ;-)

sure I have my codebase of snippets for alot of routines. But I don't see the point of making my own DirectQB if you get what I'm saying.

Just like DirectX and OpenGL today, not many reasons to make my own OpenGL per se. I might make my own wrapper around it but not much else :-)

Posted: Fri Aug 10, 2007 6:34 pm
by Nodtveidt
The end justifies the means. If you're serious about development, it matters not where the code comes from or if you even understand how it works as long as the product functions as expected. It all depends on what kind of mentality you have: project or product. If you have project mentality, then code purity is going to be more important to you, but one with product mentality cares little about the code and more about what the code produces.

Posted: Fri Aug 10, 2007 7:20 pm
by Stoves
Good point. When I'm not just coding for fun, from a business perspective I'm definitely more of the mindset that anything within legal bounds goes.

Posted: Sat Aug 11, 2007 8:30 am
by Mentat
For me, I don't care if people use my code. But copy-paste from another code takes the fun out of programming. So, I usually look at tutorials and mix with my own style. If you've ever seen my code, it looks like I copied from C (I'm Tab happy :D ).

Posted: Sat Aug 11, 2007 1:33 pm
by Stoves
How about resources? Like sound files and images? If your code can use gifs, jpgs, bmps, wavs, mp3s, or whatever, what do you think about using professional tools to create the images and sound to use in your QB code? Or, what if, like me, you're not an artist, what do you think about just ripping graphics and sound from other sources? :)

Posted: Sat Aug 11, 2007 1:40 pm
by Mentat
I exclusivly use only home grown graphics and I dislike PC music. Also, I don't know how to use libraries. The only copying I do is for things like figuring what chr$() are assigned to arrow keys and such.

Posted: Sat Aug 11, 2007 1:44 pm
by Mentat
And besides, my programs are graphical light weights (And by light weights, I mean feathers :D). I'm more focused on things like AI and custom engines.