ID:527522
 
Should the average BYOND developer use libraries?

Things that everyone seems to agree on:
* Libraries make things easier, and sometimes faster
* Libraries encourage laziness, an intentional avoidance of knowledge, reliance on others, and degrade overall quality in the long run
EDIT: Those in support of libraries also seem to agree that libraries should only be used by already competent developers who have a full understanding of what the library will do and how
Thanks for putting this somewhere more relevant.

It has taken me about 15 minutes to understand how Forum's map library works from the documentation (incidentally, Forum, should document that maps.copy() actually returns the MapBase.make()). It would've been even less had I just skimmed the documentation for relevant features and not insisted on reading every definition. Coming up with an elegant API for this kind of thing, implementing it and testing it for bugs would've taken me a couple of hours at least and in all probability I would've ended up with an inferior product. Were I a game developer, I would've preferred to spend that time designing my next dungeon.

Addressing some of your points:

- I don't think libraries encourage laziness. They encourage letting others do the tedious work for you so you can focus on the actual game. If anything, this increases productivity because you get to work on what you find enjoyable.
- I don't think there's a problem with not knowing how a specific piece of code works. If you use a list sorting library and one day find yourself in urgent need to understand how QuickSort works, you can always look it up. Until that point, why should you care? It affects nothing related to the game.
- I suppose there's some reliance, but on the other end, I basically have this guy, the library's maker, fixing my bugs for me and implementing features I'd like to see.
- Not sure it degrades overall quality. What do you mean? Heck, sometimes the library maker does things better than I'd ever think to. And if at some point I find a library no longer suits my needs, I can just modify it.
In response to Toadfish
Toadfish wrote:
It has taken me about 15 minutes to understand how Forum's map library works from the documentation (incidentally, Forum, should document that maps.copy() actually returns the MapBase.make()).
Sounds like you've already run across issues with it, and probably haven't even made heavy use of it, if any at all. These are the kind of issues that an experienced developer should be expecting, and why they should know to avoid libraries, especially BYOND libraries.

Coming up with an elegant API for this kind of thing, implementing it and testing it for bugs would've taken me a couple of hours at least and in all probability I would've ended up with an inferior product.
If you're expecting an inferior product, then you shouldn't just be plopping other peoples work into your game, but instead focus on being able to create the best possible product yourself. As for it taking a couple of hours, that isn't much in the long run of creating a game, and it will leave you with a perfect understanding of the systems, making all further involvement with them smoother, possibly saving you time in the long run, especially if you run into any unexpected fails with the library.

Were I a game developer, I would've preferred to spend that time designing my next dungeon.
Personally, I don't enjoy creating such content, and would much rather spend time programming my own dynamic dungeon generator, or something along those lines.
It's not an avoidance of knowledge in general, you're just using time management to get the most out of your time. You go learn something else with the time you saved.

Some things aren't worth learning. Sure, I could spend a week (or more) reverse-engineering the FBX format and writing a parser for it, or I could just use the API already written and tested to be fully compliant with the format (and it's someone else's job to update it when the format is changed in the future). I get to go on to learning something more valuable with the time I saved, and the quality and maintainability of my project is improved.

Then there are some things that are quick to learn, but take forever to implement. Sure, I could write my own style parser, text kerning system, ect to effectively recreate the DmiFontsPlus library, but 90% of the work would be devoid of any interesting knowledge.

I would also argue that a library is equally valuable for its organization and design as its technical content, which means you can benefit from the creator's experience and the feedback they've received from others (as well as generally more "complete" testing).
Sounds like you've already run across issues with it, and probably haven't even made heavy use of it, if any at all. These are the kind of issues that an experienced developer should be expecting, and why they should know to avoid libraries, especially BYOND libraries.
If you're expecting an inferior product, then you shouldn't just be plopping other peoples work into your game, but instead focus on being able to create the best possible product yourself. As for it taking a couple of hours, that isn't much in the long run of creating a game, and it will leave you with a perfect understanding of the systems, making all further involvement with them smoother, possibly saving you time in the long run, especially if you run into any unexpected fails with the library.

I've run across an issue with the documentation being unclear, but I don't think it's an issue with the library. The fact map.copy() returns MapBase.make() is not a problem (it's the only way the proc will make any sense!).

Now, yes, you are correct. I haven't used it in a game, so maybe I'll run into issues which I haven't thought about yet. However, I am just as likely to do that, if not even more likely, with code I write on my own. Forum devoted much more thought to his library than I would devote to my own equivalent if I just needed to get some dungeon instancing system going on. So I trust he's already accounted for a lot of issues I can't even imagine at this point.

It's not that I can't one-up the library (maybe I can't, maybe I can), it would simply take me a nontrivial amount of time and brainwork, resources which I would rather spend on something else. It's not even an issue of knowledge, I know how the library works. It's just about coming up with an API that makes sense and debugging, debugging, debugging.

Personally, I don't enjoy creating such content, and would much rather spend time programming my own dynamic dungeon generator, or something along those lines.

That actually sounds pretty fun, you know? I think I'd want to create my own dynamic dungeon generator as well, instead of using a library. But there's some features I don't like creating (I don't want to implement A* pathfinding for example. I know how, I did it before. It's just tedious). So I use a library for those and get to jumpstart my magnificent 100-floor underground metropolis generator.

* Libraries encourage laziness, an intentional avoidance of knowledge, reliance on others, and degrade overall quality in the long run

I had not noticed a consensus around this point.
Kinda sounds like you're suggesting all of us invent our own wheels Falacy.
In response to Lugia319
Lugia319 wrote:
Kinda sounds like you're suggesting all of us invent our own wheels Falacy.

The things that you would be "inventing" here are far more complex than wheels, and don't use comparable construction. Its more like I'm suggesting you build you own wheels if you already own a wheel building factory.
This is the kind of thing the Javascript guys went through about 5 years ago I'd say, as they were typically one-man band development teams, like BYOND projects often are (same goes, the access controls on code and potential to side-effect is not too dis-similar to DM). Also, a surprising number of semi-professional Javascript types were fairly incompetent at Javascript in 2005, as we had a big old surge in demand for the skill and people switched to where the money was.

To hopefully save about 50 posts, I shall likn a similar discussion had in Javascript circles, kicked off by someone who likes libraries. Check the comments.

http://davidwalsh.name/ 6-reasons-to-use-javascript-libraries-frameworks

Java's community, by constrast, will heavily hit you on the head for not using frameworks and libraries, as it's an industry that has 10 years of bespoke code written, and all the duplicated effort in fixing the same kind of bugs that came with that. For professional Java these days, you get ahead and get money by having a good working knowledge of Spring, JPA, Java EE stacks etc (You'll also be about the only guy in the team that gets it, and be working on a system that's retro-fitted a library or framework on a bespoke design, so good luck there).
Well, half of his points don't even apply to BYOND libraries, the other half are just wrong, and have already been discussed here (well, in that other topic that started this one). That is barely a discussion, but it seems that in just those few posts, even the original writer was siding against their own article. It also seems like most of the people responding there are either against libraries, or neutral towards them.
When using a library the only concerns I can think of are:

1. How well it's made.
2. How actively it's maintained.
3. How well documented it is.
4. How active its community is (how easily you can ask/get help from another user)

These are legitimate concerns but they don't make a case for never using libraries.

You're not going to find many people with this same idea that libraries make you lazy and deprive you of learning things. No Java developer will tell you "if you use Java's list object you'll never learn how to make your own" because real programming is about using lists, not implementing them.

Falacy wrote:
Those in support of libraries also seem to agree that libraries should only be used by already competent developers who have a full understanding of what the library will do and how

The full understanding isn't necessary but being competent is. Developers who aren't competent at using a language should be focusing on more basic things. The full understanding might be beneficial but often isn't. There's nothing wrong with using an encryption algorithm without knowing how it works. Knowing that you can encrypt data to protect it and knowing what algorithm to use are more important than knowing exactly how the algorithm works.

Edit: I had an idea for an analogy but I'm not sure how well it'll work: Libraries are like machines and programmers are like mechanics.

Knowing how to use a car (turn it on, steer, gas/brake, etc.) doesn't make you a mechanic. A mechanic doesn't need to know how every piece of machinery works. They usually focus on something specific (airplanes, cars, sometimes even certain makes or parts of cars).

Knowing how to use a library (call its functions, output the result) doesn't make you a programmer. A programmer doesn't need to know how every piece of code works. They usually focus on something specific (web development, games, applications, databases).

I'm not sure why, but Falacy assumes that using libraries means that people will only know how to use libraries (which means they're not really programmers). In fact, most people use libraries because they're already programmers - they did their time learning the basics and don't want to waste their time on little details.

An interesting side-node here is that DM's built-in functions can be considered a library. Just knowing how to use step() and locate() doesn't make you a programmer. The people who focus on just learning the DM language and claim to be proficient because they know how to use these built-in procs, they're not really programmers.
Some people, like IainPeregrine, consider BYOND to be limited by its DUNG roots. To me, it's like DUNG is just an un-un-includable library that is forced on everyone to either work with or work around. It doesn't have much to do with this topic, but I prefer to work around, even though that means my project can no longer run at 30fps :/.
I actually remember back when I was quite the newbie with DM, still getting the hang of the language, I hardly knew what a library was, much less how to use it. I don't know when exactly I caught on, but I never did realize you could check the box and then start calling procs from inside that file.

Libraries aren't taught at a very detailed level to new developers, unless they hear about them and specifically seek out information on libraries.

As such, a good amount of those who know how to use libraries have at least a decent grasp of DM, and while they may not be as competent as is spoken of here, they will get there by continuing their studies.

I never stopped trying to learn new things in DM, even after whenever it was I learned about libraries. I realized how helpful they could be, but it still took a while to see which libraries where the good ones, and a bit longer for my undeveloped knowledge to grasp them.

However, I have come far since then, and I'm sure I'm not the only person here with a story similar to this. We got through it just fine.
Looking back, this is a bit of a trick question. The initial question was: "Should the average BYOND developer use libraries?" The average BYOND developer can program about as well as my cat. For a cat, he's a pretty good programmer, but needs a lot of work before he's ready to work on anything significant. When you're learning to program and you're working on simple, insignificant programs, there's usually not a need for libraries.

There's no reason to be concerned with what's best for the average BYOND developer. BYOND is a tool for making games so it's bound to attract lots of people who won't ever have the patience to learn how to program. The number of users brought in by anime games doesn't help with that either. Thinking about how we can help the average BYOND developer become a better programmer is slightly more useful than thinking about how we can help the average BYOND developer be a better astronaut.

Kaiochao wrote:
To me, it's like DUNG is just an un-un-includable library that is forced on everyone to either work with or work around. It doesn't have much to do with this topic, but I prefer to work around, even though that means my project can no longer run at 30fps :/.

I'm not entirely sure what you mean, but it seems like the BYOND staff makes improvements only if there's a current demand for it. Until lots of people are trying to do more than make RP chatrooms, the BYOND staff won't add or improve features to help with making other types of games.
In response to Forum_account
Forum_account wrote:
1. How well it's made.
And how do you plan to determine this? By reading through the entire source code of the library? That seems counterproductive.

2. How actively it's maintained.
Very few BYOND libraries are actively maintained. From the look of it, only yours, and the ones LordAndrew took over.

3. How well documented it is.
This varies, and can be completely different for every library, so I'm not sure how valid of a point it even is...

4. How active its community is (how easily you can ask/get help from another user)
Even the most actively used library will not have the same community as DM itself, so libraries automatically fail this requirement in all cases. If anything, they have the exact opposite effect; people asking for help in public areas, and the general community there having no clue how to use a specific library to accomplish some common feature.

I'm not sure why, but Falacy assumes that using libraries means that people will only know how to use libraries (which means they're not really programmers). In fact, most people use libraries because they're already programmers - they did their time learning the basics and don't want to waste their time on little details.
Flip every accusation made there, and it might be believable. I don't assume that, nor do I even think it is true. Putting effort into learning how to use a library takes almost as much effort as just creating the systems yourself, one of my many many points against them. They also vaguely teach core practices, but leave out important details. Most people who use libraries are NOT already programmers, at least not already competent programmers, and they don't use libraries because they want to save time, they use them because they lazily want everything done for them and/or have no clue how to do it themselves.

Looking back, this is a bit of a trick question.
Not really, the average BYOND users are just that, what make up majority of the community. You have to assume they also make up majority of the people using libraries. Your Map Instancing library, for example, has 250 downloads. I seriously doubt there are that many competent developers on BYOND, or even a 10th that many.
Oh great Falacy, teach us all to be better programmers, so that we may better understand how awesome it is to bask in your glory.
In response to Lugia319
Lugia319 wrote:
Oh great Falacy, teach us all to be better programmers, so that we may better understand how awesome it is to bask in your glory.

Here you go http://www.byond.com/forum/?post=292504
In response to Falacy
Falacy wrote:
Most people who use libraries are NOT already programmers, at least not already competent programmers, and they don't use libraries because they want to save time, they use them because they lazily want everything done for them and/or have no clue how to do it themselves.

This is a separate issue. You're asking if people should use libraries or write things themselves, but the people you're describing here can't do either. These people shouldn't be using libraries because they should be learning the basics (reading the DM guide, reference, etc.). It's not that libraries are bad, it's just that these people aren't ready.

Not really, the average BYOND users are just that, what make up majority of the community. You have to assume they also make up majority of the people using libraries. Your Map Instancing library, for example, has 250 downloads. I seriously doubt there are that many competent developers on BYOND, or even a 10th that many.

For obvious reasons it makes sense to cater to the needs of the majority of the BYOND community - they're the majority after all. But they don't have much potential, there's not much to gain by worrying about them. If the average BYOND developer is still a terrible programmer, what'll help them most is giving them more game source codes to rip.

Most BYOND users won't ever be able to program their own game. It's more beneficial to the website and community to be concerned about the better users. If BYOND doesn't take itself seriously as a game development platform, nobody else will - it's not likely that any decent game developer out there would choose to use BYOND. BYOND has potential. It's not going to ever be like XNA, but it's certainly got potential to be better than it is (and to attract better users than it currently has). All we can do is hope that happens. Trying to help the current users grow into good game developers is a waste of time (BYOND has been around for a long time and it hasn't worked yet).

And how do you plan to determine this? By reading through the entire source code of the library? That seems counterproductive.

From a quick glance at the hub entry, documentation, and the demos that come with the library, you can easily make a pretty good guess. You don't have to play a BYOND game for 10 hours to determine if it's good or not (usually you can tell from the title screen), it's just as obvious with developer resources.

Very few BYOND libraries are actively maintained. From the look of it, only yours, and the ones LordAndrew took over.

That's certainly a good reason to not use a library and it does apply to many DM libraries, but it's not a reason to avoid all libraries entirely.
In response to Falacy
Falacy wrote:
Putting effort into learning how to use a library takes almost as much effort as just creating the systems yourself, one of my many many points against them.

This seems to be the crux of your argument (as the other points depend on specific instances of libraries / users), and I have to say that I generally disagree with it. Any library worth using would take far longer to design, program, and debug your own version from scratch than it would to read and understand the documentation.
This is just another topic where people make a whole bunch of valid point. Also I make things into libraries sometimes so that they don't clutter my project with only half relevant code, If someone else can make use of it great but that doesn't mean my project is inferior.
Page: 1 2 3