ID:153541
 
Im sure people will have conflicting opinions on this subject. I realize that demos and libraries were created for the purpose of being used by programmers to better their game(s), but are they beneficial in the long-run in that sense? Personally i beleive that demos and libs should be used as more of a reference and created that way. Comments and explainations on how the programs work are just as important if not more important then the actual code, that is why I take the time to comment all of my programs very thoroughly because understanding the code is crucial to becoming a better programmer. I beleive that using libs and demos in your program(s) is perfectly fine and a lot quicker then doing it yourself, but to use a lib/demo you should fully understand how the lib/demo works enough so that you could recreate it, but why bother when the code is right infront of you? On the otherhand, I've seen a lot of games that were demo's and libs thrown together and the creater has no clue how half of their game works. If more people disected the libs and demos thoroughly until they understood how they worked, the currently, relatively small circle of great programmers would grow larger rapidly. Thats just my opinion.

Trog
I pretty much agree with your conclusions...

Libraries are a good resource to use, but only if you understand what they're doing (even if you only semi-understand them)...

I wouldn't necessarily say that you should only use libs that you could code yourself from the ground up, but that would certainly help...

It doesn't really do a programmer any good to just throw a bunch of libs together, and try to make a game with them... What happens if they hit a snag? They've got no idea how to fix it, and they need help...

And what happens when two libs conflict with each other, but the programmer doesn't realize this until it's too late? Even worse problems...

So it is definitely always best to attempt to understand the tools that you're using before you try to use them... And even better if you try to only use the right tools for the job (rather than seeing a lib that sort of does what you want and slapping it into your game, you should only use those that do exactly what you need, or close enough that you can tweak them to fit)
Personally I love libraries, as long as the person using it could make it themself.
There is no point re-inventing the wheel, unless you don't know how a wheel works and your building a car.
It's been stated before that the goal of BYOND is not to build a community of programmers. It's to build a community of game designers. If you can slap together a few libs and a couple of demos and have a working game, that's great. That means that we're getting closer to the ever-distant goal.

However, with that aside, I'll approach this from a programming perspective:

  • Libraries are designed to cut down on programming time and effort by providing standard procedures and interfaces. It's been said before, and will be said many more times - 'why re-invent the wheel'?
  • Libraries are intended to be modular. I should be able to pull one library out and slap a new one in, only replacing specific calls to that library's procedures
  • Demos are just that, demonstrations on how to do something. They are not done in a standard format; rather, they are intended to showcase that something can be done and how that individual did it.


Dream Maker and other high level programming languages, are libraries themselves. You know how to use Dream Maker, but could you disect it? Would you want to? Do you need to know how it works inside to use it?

I would not want to have to create my own network functions. Dream Maker takes care of it for me, and I'm grateful. I could, if I wanted to. However, I'd really rather not. I make heavy use of network libs when I program in C++. I have no idea what's going on internally, and I have no desire to learn at the moment. If it stops doing what it's supposed to, I first look at my code. If I can't find the problem there, I will then start disecting the library. 9/10 times I can spot the problem without fully knowing how the library functions.

For those of you who are a little rough on your geometry (like me), do you care how Abyss.BasicMath draws a circle? As long as it draws it like it's supposed to, it's all good.

I apologize if I seem to be beating down the idea. I just don't understand why libraries are in debate here when it's assumed that you'll use libraries in professional programming.

The real issue here is that BYOND is a community of game designers, not programmers. The problem then arises that in order to make a game with BYOND, you must be able to program. Unfortunately, not very many designers on BYOND understand how to properly program and/or have difficulty understanding the flow of data. This is further compounded by the fact the most common answer to this is 'figure it out and do it yourself'. This applies to programming and icon/graphics making.

I've see people getting reamed on the forums when they advertise the need for a coder. The common philosophy seems to be 'well, if I'm programming and he's doing icons, what are you doing?'. This is all wrong from a game development point of view. The person programming is not garunteed nor are they required by description to be able to come up with storylines, system ideas, or in any other way be creative aside from how s/he implements such ideas into the code. Nor is the icon artist held to anything more than drawing 32x32 pixel graphics. A development team needs a programmer. It needs a graphics artist. But most of all, it needs the creative ideas and guiding force; the game designer. More often than not, the game designer doubles as a programmer. In fact, the common thread of thought her on BYOND seems to be that programmer is synonymous to designer. The fact that many design teams have one person performing all three tasks does not help the mindset.

-Bottom Line-

Games need the following in a development team:
Designer - makes the dream
Programmer - makes the dream into reality
Artist - gives form to the reality

Programmer != Designer
Designer != Programmer
Designer != Artist
Artist != Designer

I personally feel that it is ludicrous to expect a games designer to be able to program AND design icons. It's a good thing if they can perform one or the other duties, but it is NOT a requisite.



I apologize for getting a little off topic. I feel that it touched on the core of why there even IS a debate, and it's something that's been bugging me for a while.
In response to sapphiremagus
Thank you for your imput Sapphire, I wasn't trying to create a heated debate i was just interested in other peoples point of view on their uses of libraries and demos.
I agree with you in the sense that, I don't know how dream maker works nor do i have any desire to disect it or fully understand it, but to become a better programmer in DM and in any other language I personally feel obligated to understand how the libraries and demos i use work to better myself. I understand that the goal of BYOND is not to build a community of programmers, but me being not a terribly good artist, nor can I compose music, I have to rely on my programming abilities and imagination to create games. That is why I feel that by understanding libs/demos i can take my ideas with ideas from the libs/demos and program them. I use demo's and libs as a reference in a sense that it gives me ideas on possible additions, and how to add them to fit my personal projects. In some cases demos and libs dont fit exactly to my project and by understanding how they work i can easily edit them to fit my needs. I agree there is no reason to re-invent the wheel, but if you understand how it works, theres alway the oppurtunity to create a more efficient one.

Trog
In response to Troglodyte
Troglodyte wrote:
Thank you for your imput Sapphire, I wasn't trying to create a heated debate i was just interested in other peoples point of view on their uses of libraries and demos.
I understand that the goal of BYOND is not to build a community of programmers, but me being not a terribly good artist, nor can I compose music, I have to rely on my programming abilities and imagination to create games. That is why I feel that by understanding libs/demos i can take my ideas with ideas from the libs/demos and program them. I use demo's and libs as a reference in a sense that it gives me ideas on possible additions, and how to add them to fit my personal projects. In some cases demos and libs dont fit exactly to my project and by understanding how they work i can easily edit them to fit my needs.


I have no argument with you wanting to understand and learn from libs. In fact, I do the same myself and quite often.
However, the following paragraph from your first post indicates that you feel this view/attitude should be adopted by all.
Particularly 'but to use a lib/demo you should fully understand how the lib/demo works enough so that you could recreate it'.
That statement says to me that if a person doesn't understand the library enough to re-create it, they shouldn't use it. It is that mindset/philosophy that I greatly dislike, and that is what flavored the majority of my response. I apologize if you did not intend it to be read the way that it does, but your use of possesives and pronouns addresses the audience instead of presenting the way you personally do things.

Now for the paragraph :P To keep things semi-on topic, I will respond to your statements with my own opinions on the matter.


Personally i beleive that demos and libs should be used as more of a reference and created that way.

I disagree. I agree that demos and libs can and should be used as reference when learning, but I do not believe that they should be created as such material.

Comments and explainations on how the programs work are just as important if not more important then the actual code, that is why I take the time to comment all of my programs very thoroughly because understanding the code is crucial to becoming a better programmer.

I agree that comments are a greatly overlooked aspect of programming. I would say that they are as important as the code, not more than. You can figure out what a program does without comments and you can create a new program using comments as a guideline. The real value of comments lies in being able to drop a project for a while (a long while) and come back to it knowing what everything does at a glance. In the professional world, they are also crucial because you often work in teams of programmers where you pass program files back and forth. It's much faster for me to read your comments than try to translate your programming style into mine.

I beleive that using libs and demos in your program(s) is perfectly fine and a lot quicker then doing it yourself, but to use a lib/demo you should fully understand how the lib/demo works enough so that you could recreate it, but why bother when the code is right infront of you?

Run-on sentence aside :P, I agree that libs are quicker than doing it yourself. However, as I stated above (ad nausea), the idea that you should understand a lib, such that you could recreate it, before using it is ridiculous.

Please note that this applies almost soley to libraries. Libraries are intended to be included in a program/project and perform a standard function. Demos are not standardized by any sense of the word, and should not be used to start a project. They should definately NOT be used as libraries, as they often are. Demos are the one thing that I agree with you on. They should be used to learn from, and should be understood enough to design your own system before doing just that.
In response to sapphiremagus
Libraries would just be like the windows .DLL files. The only thing is, you get the source of the libraries, whereas with windows programming, it's highly unlikely you get the source of the .DLLs. You don't see people learning C/C++ in windows trying to reverse-compile the windows .DLLs, and then giving up at programming because they don't understand in the slightest what windows does when they call any of the functions, like the one that creates windows.

I'm not saying that I don't want people to be able to view library source anymore. Being able to see it allows it to be modified/fixed/adapted if necessary. Although someone may not understand a library enough to be able to re-create it, from scratch or not, they should still use it in their projects. Why re-invent the wheel a million times if the first wheel was everything you'd ever need? If you ever decided that you'd need a new custom wheel, however, then looking at the old one would help a lot.
In response to sapphiremagus
'but to use a lib/demo you should fully understand how the lib/demo works enough so that you could recreate it'.

I'm sorry mine reads like that. Perhaps its wrong but i alway thought that by taking away "i think", "i feel", and "i beleive" that your argument would sound stronger, and you would sound more sure of it. Maybe thats totally wrong but whatever =)

Oh and thank you for catching me on that run-on, I do that sometimes.

Trog
In response to Troglodyte
Taking away the 'I' does make for a stronger argument. However, using 'you' simply switches the focus of the argument directly to the audience. Now, if you intended to say that your opinion is that everyone should understand a library before using it, then you worded your statement correctly. And my looong counter-point stands :-P

However, if you were simply trying to voice how you do things, using 'I' is perfectly ok. In fact, your second post read much better (to me, at least) because it was obvious that you were referring to yourself.

A good way to describe something without putting to much focus on the audience is to use non-specific nouns and pronouns.

For example, for one to understand BYOND programming, that person should first attempt to understand the principles of Object Oriented Programming.

That clearly states my opinion, without directly addressing the audience. In that opinion, it is clear that I feel that anyone who wishes to learn DM should at least try to understand OOP.

Anyway, the point is this:
If you want a strong argument, use the essay format which avoids direct references to self and the reader, or the first and second person (I, we and you).

If you are voicing your opinion, use the fist person (I, we). Instead of 'you should <blah>' use 'I feel that you should <blah>'.


I apologize if I come across as preachy. I've just been part of too many debates and opinion discussions where views were not presented correctly and general confusion ensued.
In response to sapphiremagus
Hey, no problem, and thanks for clearing that up, atleast I know I can come on this forum and discuss things intellegently instead of some of the forums..
*cough*
Well anyone else have anymore thoughts on how to use libs/demos more efficiently?

Trog
First I will address the demos. They are never intended to be included in your source like a library is. Demos are mearly for tutorial use.

My view on libraries is that those who do not know how to create a similar effect themselves should go ahead and use them. When programming in c++ I use libs like iostream, stdlib, stdio, string, time, fstream, windows and math. Although I would certainly love to be able to recreate something like that on my own I simply cannot do that yet.

When it comes to byond, I never have used a library (excluding the fact that DM itself is one giant library); but that does not mean I am opposed to it. The reason I do not use one is that I can recreate the effects of any library I have seen on the hub. When I code, I try to get everything exactly how I want it, no compromising. The only library that I have seen for byond that has ever done exactly what I was looking for is Crispy's Fullban. Where all other libraries are concerned, they did not do what I wanted to the tee, so I made my own code to do what I wanted.

When it comes to not using them because you don't understand them, well that's just counter-productive. Unlike saphire, I would love to know what is going on in every library that I use when I'm programming with c++. I value my knowledge of the code higher than the project using that code, I want to soak up all the know-how I can. But you have to take things one step at a time, and in the beginning you have to use libraries just because you need a stepping stone to get yourself started.
In response to sapphiremagus
Run-on sentence aside :P, I agree that libs are quicker than doing it yourself. However, as I stated above (ad nausea), the idea that you should understand a lib, such that you could recreate it, before using it is ridiculous.

There is, however, a difference between understanding how a library works, and how a library does what it does.

To be able to use iostream, for example, you need to know that it sends output to the console via the use of the stream << operator. You need to understand that you can't add two char* strings together, in addition to many other things (like converting doubles and floats to a displayable non-scientific number via the use of the different functions).

However, the intimate details of the assembly code it uses to get the hardware to output bytes to the hardware console (or an emulation of that console) is entirely unnecessary to know.

Thus, knowing how the library works is necessary. Knowing how exactly the library does what it does is unnecessary.

The easiest way to explain it is as the difference between a client program and a server program. The client has to know how to interface with the server. However, the client can remain entirely clueless as to how the server calculates the data and gives information to the client.
In response to Spuzzum
Correct. My point is that you do not need to understand it enough to re-create it.
In response to sapphiremagus
Yep, I wasn't contesting that point. I was just adding information that other readers might not have grasped. ;-)
In response to Spuzzum
I also wasn't saying that to use a lib it was necessary to be able to re-create the lib, but I personally think that by understanding how libs I use work and to have the ability to re-create them betters me as a programmer.

Trog
In response to Troglodyte
Sure, I agree. If you want to learn how a library works, then you can look at it and figure it out. Especially in BYOND, where libraries are by definition open-source. (You hear that OFD? Libraries help people to learn! =P But back on topic...)

Let's make a fun analogy. You don't need to know how a car works in order to drive it. But if you want to repair it when it breaks down, or modify it so that it runs better, or get a better understanding of how it operates so that you might get some insight in how to drive it better, or maybe you're simply curious; in any of those cases, then learning how it works is a very good thing. Especially if you then go on to build your own car, and develop your mechanics skills.
In response to Crispy
Now that's what I call an analogy!

Everyone is going to have their own way of doing things, but I doubt anyone can argue that by studying libs/demos you're broadening your knowledge of programming. Whether it be grasping certain aspects of DM that you were unsure of before or coming up with new ideas for your project(s) derived from the libs/demos you were disecting. Either way, I beleive it's more beneficial to the programmer to really understand exery aspect of the lib/demo they are using in their project(s).

Trog
In response to Troglodyte
Everyone is going to have their own way of doing things, but I doubt anyone can argue that by studying libs/demos you're broadening your knowledge of programming. Whether it be grasping certain aspects of DM that you were unsure of before or coming up with new ideas for your project(s) derived from the libs/demos you were disecting. Either way, I beleive it's more beneficial to the programmer to really understand exery aspect of the lib/demo they are using in their project(s).

You'll have to use a lot of things you don't understand to program for learning purposes. You probably have no idea how BYOND works but it doesn't mean you can't use it. When learning to program C you use printf and many other commands frequently without knowing how they work, but it isn't until much later, after learning asembly and how the computer works on a low level before you can understand how it was implemented.
In response to Crispy
Libraries are generally composed of code, but that does not make every piece of code a library.

You don't need to know how a program works to run it. But, if you want to tweak the program for your own uses, then you should have some idea how it works. To many of my projects, that's all there is to it, just the concept. If you understand the concepts (and assuming that you have a decent knowledge of programming) then you'd be able to make it yourself. If I didn't think it was possible for other people to figure it out then I might release the source code to something, but I am yet to make something in BYOND that is that difficult to understand.

Also, you keep talking about libraries and me releasing source code in the same sentences, paragraphs, or posts. Yes, if I made a library I would release it, however, I have never made one. You cannot just include TRN.dm in your project and instantly have an isometric game. If I made libraries and never released them, then I could understand people bugging me to release the source code to something. Ok, I could release it as a demo, but that'd be useless. Unless the demo is simple then its just something for someone to build a game around.

Seeing a game running should give you a huge idea as to how it works. I even supply some documentation and diagrams for the less obvious details. Its harder to figure out (harder than being handed the source code) but at least you'd understand it. If you have any questions about how one of my programs works then e-mail me, you wouldn't be the first. If you don't make an effort to try and figure it out, then I see no reason why I should release the source. More people have whined about wanting the source than have e-mailed me, so I get the impression that people want the code but don't care to figure it out. And if people aren't making much of an attempt to figure it out, then I doubt that they'd look through the source to figure it out once they go the code in their greedy little hands. I don't think there is anyone on BYOND that could figure out how a program of mine works by looking at the code, but couldn't figure it out by seeing it run, reading about it, and seeing diagrams about it.

Note: In case its not clear, when I say "you" I am not specifically referring to Crispy, its just a general reference to the BYOND community.
In response to OneFishDown
Amen!

To comment on the whole TRN source code thing, those that think it is rude of OFD not to release his source are (in my oppinion) the rude ones for not respecting his decisions. I had thought about making such a system for byond at one time, but I didn't even bother because I assumed it would be much too slow. I now know that I underestimated byond's capabilities seeing what OneFishDown had done. Seeing how he proved me wrong and created a 3D world on byond without it producing too much lag, I have set out to do the same. I agree with him on this matter, this is one of those things that is complicated enough to do that you should be able to code it from scratch yourself just by seeing it in action if you are able to code it at all.

Sure, maybe having it as a demo would speed up some people's understanding of it, but it would probably confuse just as many people and set them back instead of ahead. And like OFD said, 90% of its use would most likely be from those greedy people that don't want it to learn by and couldn't care less how it works, and those people will simply try to include it as a library which will screw their game up since it would conflict terribly with other things.

Just so you know, when I get mine finished I won't be releasing it either. Rather, I would attempt to point others, those that think they can tackle it, in the right direction. As I have said in other posts, computer programming is my artform and I take it seriously. I help most all people who ask for it (And believe me, I get tons of pages and messeges via AIM asking for help.) but I usually do not give hand-outs. Especially to the advanced coders, who I stear onto the right path and let them discover for themselves (I believe this is the best way to learn.) The only code that I have actually handed out recently to a decent programmer, that I can think of at the moment, would be to Airjoe for one of his current projects. And even then, I only did so because he had an idea of how to accomplish what he wanted but could not implement his ideas correctly.

So, to wrap this up, I believe that demos and libraries can help people learn; but only if they are able to comprehend the things that are in it in the first place. With something like a 3D engine, you need a bit of trigenometry knowledge as well as advanced "hud" knowledge; and this means that, by the time you are competant enough to learn how to code it, you are competant enough to code it with little to no help or example.
Page: 1 2