Defining Code Purity

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply

How anal are you about the purity of your code?

If I even THINK about hitting the F1 key, I exit without saving and start from scratch!
0
No votes
I use help files and google hardware component memory addresses, but that's about it.
0
No votes
Learning from other people's code is great, though I never cut and paste.
4
67%
My code is a patchwork quilt of code I may or may not understand.
2
33%
I routinely slap my name on programs I find on the web and republish them in QB forums.
0
No votes
 
Total votes: 6

User avatar
Stoves
Veteran
Posts: 101
Joined: Fri Feb 10, 2006 12:24 am
Location: Nashville, TN

Defining Code Purity

Post 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?
Anonymous

Post 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.
User avatar
Stoves
Veteran
Posts: 101
Joined: Fri Feb 10, 2006 12:24 am
Location: Nashville, TN

Post 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.)
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post 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 :-)
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post 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.
User avatar
Stoves
Veteran
Posts: 101
Joined: Fri Feb 10, 2006 12:24 am
Location: Nashville, TN

Post 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.
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post 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 ).
For any grievances posted above, I blame whoever is in charge . . .
User avatar
Stoves
Veteran
Posts: 101
Joined: Fri Feb 10, 2006 12:24 am
Location: Nashville, TN

Post 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? :)
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post 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.
For any grievances posted above, I blame whoever is in charge . . .
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post 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.
For any grievances posted above, I blame whoever is in charge . . .
Post Reply