Thought Exercise - Abstracting MoparCoders from the more Esoteric Parad

Edit:

Consider this more of a thought exerciser


Every Software Engineer, Computer Scientist, Programmer, Code Monkey, w/e has meet ‘That Guy’. You know That Guy who just wrote his first web page in HTML and started proclaiming to the world how awesome his Uber programming skillz are, how he could do what you do in a matter of weeks, maybe even days if he has his favorite IDE (Photoshop) by his side. Yes, we all have meet That Guy.

Well, something that may shock you, they won’t be able to do what you do in a matter of days, let alone weeks. Infact, it would take years. Shocked? Of course not. That Guy isn’t a programmer, and chances are never will be. But that is O.K.

Users were not meant to be programmers. Programmers were meant to be programmers. Users tend to have little desire to learn how something works on their own, little desire to try to fix something (or even think about how one would fix it) before asking someone else or making someone else fix it.

I believe you would agree with me in saying that the majority of the people on this site are not meant to be programmers. That makes the majority of the people on this site are Users.

So, this makes me curious on why exactly we are throwing “all that is programming” at Users. Users don’t care, they just want what they want and they want it now! If it doesn’t work right out of the box it’s broke (so far as not compiled, Java not installed, etc.) and someone needs to help them fix it or fix it for them.

This has caused a lot of butting heads and needs to be fixed. But how?

I was browsing around the forum like I do from time to time just to see whats been going on and I came accross Yz85Racer’s 317Serv. And this peticular line in his post caught my attention.

"I was a little annoyed with all of the wL bases, and people to lazy to use rsd2v, so I began writing a base which wasn't hard to use, but still implied full use of correct Java programming procedures."

IMO that is the most beautiful organization of words I have read on this site. It makes 4 basic points describing the problem.

[ol][li]Users cannot be trusted to program. Who doesn’t die a little inside when they see that 50k line God Object found in client.java?[/li]
[li]Users don’t care about making a correct solution. Why should they bother to learn how rsd2v’s framework is set up? “Thats hard =[, I like client.java it’s soooo easy! Plus I dev faster!!! ^.^”[/li]
[li]I want to attempt to give them a base to work with that isn’t “Hard”. Something they can actually manage[/li]
[li]I still want to maintain my values (Code Quality) when providing them with this ‘base’ that they can work with easily.[/li][/ol]

Perfect! Beautiful! Impossible…

Point 3 & 4 cannot co-exist if you still give the User Java. It’s still going to be hard unless you sacrifise your values. And we know you cannot sacrifise your values, how could you live with yourself? (Not Sarcastic at All)

Well, what I suggest to solve this problem (finally-This guy took forever to get to the point) is some form of End-User Development.

VBA is a very good example of End-User Development. Most of us wouldn’t get caught writing VBA, and for the simple fact that the Users on this site don’t understand why we wouldn’t is the same reason why it’s perfect for them.

VBA provides a very narrow library providing ONLY what the User needs, and that is exactly the opposite of what our Users are exposed to [aka, everything].

Perhaps the first question to ask is what is it that Users do [usually]. The majority of servers only vary from location of shops, commands, models in the cache, messages sent at random intervals of gameplay, etc.

For the most part, I’m against that kind of “Development”. But I have a feeling if there was some ‘base’ that offered that without any Java/XML Files/Txt Files it would greatly reduce the amount of plain crap on this site allowing for something useful to actually be done by the few programmers actually here.

Thoughts?

if you think youre so cool why dont we have a coding competition i use photoshop u use nerdy eclipse

edit:
i love how you edited this from a complaint about moparscapers and turned it into a “thought exercise” XD

I made this topic as more of a thought experiment than anything. It came out of my interest in User Centered Design, so this is something I would do for fun. It wouldn’t even have to be made, I just enjoy talking about the concepts one might use in its design, hearing how other people might attempt something like this.

I also wasn’t planning on using 317serv. I have never tried it personally. It was simply a sentence that caught my eye in his post. I have no idea what base I would actually start with until i looked through them all, it might even call for one to be written from scratch. But that implies actually making it.

As for the capital letters, I don’t see why that matters.

1: I apologize if I insulted you in any way as it was unintentional.
2: You seem crafty enough to actually make Photoshop into an IDE.
And 3: I don’t use eclipse (often)

I agree for the most part, but if users aren’t willing to get dirty then they shouldn’t be getting into RSPS in the first place.

Well, I don’t disagree. The opportunity to just delve into a large code base (whether it be good code or bad code) is still a valuable educational experience. But it can promote some bad habits (given that the majority is bad code) and from what I can see quite a bit of misinformation.

Would you think that the majority would be better off only exposed to only the Model of a server? They are given a few key objects, libraries, and some basic programming functionality to limit how dirty they get.

Lets say we create a script layer on top of our imaginary server. Lets call our script, MoparScript. And of course our server has some way of interpreting MoparScript and change the servers state based on what instructions where issued.

It would be fairly easy to limit what the user is aware of on the script layer. No dealing with Threads, Networking, Bit magic, yeah, basically none of that fun stuff. This would allow the user to be introduced to topics like iteration, recursion, or scope without being intimidated by all that ‘other’ code (which causes a lot of users to ask first instead of trying to figure it out themselves). And of course it would be beneficial to user to be introduced to some more complicated subjects such as Data Structures, perhaps maybe allow them to write objects in Java (or w/e language) and use them in MoparScript. Or perhaps make MoparScript advanced enough to implement some basic Data Structures, or even some concepts of Object Oriented Programming?

Once again, these are just ideas. I think it would be cool to watch the development of a language and the influence those using it have on it. What features they desire, what data they want access to. Even analyzing how syntax effects learning curve would be interesting.

This also would be a great way to standardize things across the board.

Brainstorm anyone? (Remember this isn’t about actually committing to anything, or even creating anything)

Edit:

Also, I realize Networking, Threading, Bit Magic, etc. are the more fun things in programming, but those who have never written a line of code in their life are not ready to be exposed to these things.

Could just use a scripting language like groovy, gives them all of the power of java + it doesn’t need compiled or anything

Just checked it out, looks awesome. I’m passing out, but i’ll look into more in the morning. Also, what objects would you have exposed to a user?

If I were creating a new server, I would separate the project into a bunch of much smaller (and more manageable) projects. They would then control their own layer in a layered architecture. For instance, the application layer, the domain layer and the infrastructure layer. This is usually also a 3-Tier architecture (as a whole), where everything described here relates to the middle Tier.

The infrastructure layer would mainly be used by the application layer, and control things like database CRUD functions and various things that aren’t related to the other layers.

The domain layer would define exactly what can be done in the game (or whatever project), and not what happens when you interact with that exact NPC. It would contain domain logic. Domain logic doesn’t have to be used what so ever. But it exists to support the application layer, so that the application layer can decide what happens when you interact with that exact NPC. Also, it is preferred if the domain layer does not depend on any other APIs. It should be as self-contained as possible, so try to only use POJOs.

The application layer is the actual game (or whatever project). It handles the requests from the user (for instance the RuneScape client), formats it in a proper way and uses the domain layer to do whatever it needs to do. Then it eventually sends back a response. Here you may handle different versions of the game, or even different games, in different ways, if needed. You may even switch between different application layers.

On the Groovy subject, I believe it could work quite well. Perhaps something like this:

import static org.rsps.core.Server;
import static org.rsps.core.Player;

import static org.rsps.core.features.Commands;


def helloCmdCallback (player, params) {

   player.sendMessage ("Hello World! (Player " + Player(params[0]).name + " will see this also)");
   println (player.name + " called the hello command. Just fyi...");
   Player(params[0]).sendMessage("Hello World! From " + player.name);

}


def commandsFeature = Commands.getInstance().addCommand ("hello", helloCmdCallback);

def myServer = Server.getInstance ();

myServer.addFeature (commandsFeature);

myServer.Start ();

I know that code is hell, but shows the idea. I think the average user would be much better off with this sort of setup. It isolates all the code they are actually interested in, provides it in a script form which is easier to learn, and best of all allows them to move to more complex topics.


object, I haven’t thought much on to best setup the architecture on a project like this. After reading your post I had to read up more on 3-tier architecture. I like it! I also found this excellent publication right here. I’m more interested on the Domain-Driven Design white paper, but I haven’t had time to read through it (just a quick glance through). You might enjoy it.

Really, once we start talking architecture we are getting ourselves into a BIG conversation. object, would you mind creating a UML (or UML like) diagram displaying how you would set up the architecture? If you don’t want to/don’t have the time to I understand (a white board would be awesome right now). Ohh, and try and show how you would include the usability concept in it. [Want to write more, but there is lightning… laptop has no battery… long story]

meiscooldude: I have already read the whole book of DDD by Eric Evans a few times. It is a great read. I have also read the introduction PDF file to it (a free version with just a few of the concepts covered). That one is also good.

If I ever will do some UML diagram, that won’t be now - I am quite busy at the moment. But perhaps sometime in the week. I finished the web-tool project I was hired to create, yesterday, and thus got some free time until I find my next job. So it might actually happen. :slight_smile:

I’d say a more popular scripting language would be more helpful, that way they can get help from google, as well as learn something that is actually going to be useful in the future. Something like python (jython) or ruby (jruby?). Groovy is good, but not nearly as popular as the other two.

a proper server architecture would use the IoC pattern and be open for modularity. it would be asynchronous and utilize concurrency, and be built using an event-driven service-oriented architecture.

@object: No hurry, Employment comes first.


@Moparisthebest: Agreed. And in the end it wouldn’t matter what language was used on that level as long as it runs on the JVM. But as a default, yes, one of the more popular ones.


@super_: Reliable concurrency in Java can be headache.Double-Check locking problem with Java. I believe one of the comments on that article say it was fixed with Java 5, but I’m not certain. Little things like these make concurrency over multiple platforms with Java difficult. But hell, its a challenge =).

[Inside Thought: Fuck you Java! If I wanted my code optimized I would have optimized it myself!]

Now as for the IoC pattern you mentioned (someone runs unit tests <.<), I agree completely.

But on the event-driven service-oriented architecture, could you elaborate a bit more? I’m fairly familiar with SOA, but the event-driven part threw me off.

In my server, the actual core API does not have to be modified at all to make the typical changes moparscapers enjoy making. The definitions (NPCs, items, shops) are in XML format, configuration in a custom (easy-to-read) format, and the actual game content logic written in scripts. I actually chose Javascript as the language (Rhino) because of type inference (as with many other scripting languages – that way we avoid topics on ‘whats an int’ and the likes) and because of its syntactical similarity to Java. None of the modifications to these files require recompilation (obviously). Can’t really see it getting any easier than that.

edit: P.S. meiscooldude, I suggest you take a look at the Concurrent API :wink:

the code should be service-oriented and event-driven.

Here is an overview of how I see the architecture. Yeah, it isn’t an UML diagram, but I don’t see how that would show the necessary details. An UML diagram would differ depending on who wrote the code. Whereas this overview would most probably be quite the same.

The application layer, domain model layer and infrastructure layer is just ordered in alphabetical order, so don’t take them for the default layered architecture, where the layer above only calls the layer(s) below.

The application layer handles the incoming requests from the client and sends back responses where appropriate. It also uses the domain layer and the infrastructure layer.

The domain model layer knows only about itself. It contains Repository interfaces that, for instance, the infrastructure layer should implement. But still, in the code it only knows about itself (no direct dependencies to the other layers here).

The infrastructure layer knows only about itself and the domain model layer, where it implements the various Repository interfaces. This layer also contains everything that is independent of the game itself. The application server for instance, which, if done properly, can be reused for any game or even application that requires an application server. Notice, however, that the infrastructure layer includes all 3:rd party APIs or libraries aswell. So don’t see that layer as just one package or just one project. It may actually be any number of projects.

Also, yes, an IoC container would be useful in this type of project. It may be used to inject the Repository implementations so the application layer can use them.

Why hasn’t this been sigged yet.

I’m sure 80% of the users and visitors of this site will be happy to download a GUI that will handle the whole aspect of private server managing. If you completely eliminated programming within the private server scene and just made it an interface with a few “cool” options, I’m sure no one from the downloads section is going to be upset. You said it yourself, they’re here for convenience. No one is patient, and no one has more than an ounce of originality to actually do anything within the server other than a few in the beginning of this scene-- and even then it wasn’t really enough for enlightenment.

This atmosphere has gotten a little more dull every year. However, it’s apparent that there is talent here, just lack of initiative (or motivation to continue). Either way, a year or two ago I looked at the community and made the same assessment as you meiscool. The community only cares about convenience and efficiency. No one could care a less what work goes into a project, how long it takes to make it, or even how incredibly prominent the small components are to making such things work. All they care about is how cool they look when they float around with their modded party hats and ability to abort noobs from their server.
What we need to focus on is the user. Because it is theirs. However, I understand the other side of the argument as well. I came to this forum in search for a way to make a private server. I stayed to program. It’s been fun, and that’s why I stay. That is why we all stay because we enjoy the atmosphere of programming and the members within it. But if we ever decide to reestablish a connection with the users pertaining to making a “revolutionary” private server, I think what we need to do is make it as convenient as possible.

So, lets do something about this then.

When it comes to developing the server we have a few problems, the first problem, the developers. Very few projects seem to stay afloat for more than a few months usually due to it’s developers loosing interest and moving on to something else. (that lack of initiative/motivation to continue you were talking about)

I’m a huge believer that if your starting a project, before you should even think about the code you should consider the “development process”. Most, if not all, projects in this community use the Waterfall method (whether they know it or not.) This, in my opinion, is most likely the main culprit.

I would like to see some derivative of Agile development used in a project.

Perhaps, a project or set of projects that all Moparscape-vets have access to in source control (whether they desire access or not). Check-ins require a review by a different vet.

A Kanban board with a set of User Stories, that can be picked up and moved through development anytime. [Requirements Gathering -> Development -> Done -> Review/Test -> Approved]. Moparscape-Vets would be allowed to pickup User Stories whenever they felt like helping out (Maybe I feel like really helping out this week for w/e reason, but the next 2 months I don’t. This would be okay, it wouldn’t kill the project and I would be allowed to contribute again anytime I desired).

Creating the User Stories should be quite simple. A user story for every feature in RS or currently known bug.

“As a server-side developer, I need a messaging framework for interacting with the client.”
“As a user, I would like to be able to walk.”
“As an administrator, I would like to be able to ban users.”
“As a server owner, I need to prevent my users from walking through walls”
“As a user, I would like to smash other users with a hammer.”

(Of course large User Stories can divided into smaller ones, and some must come before others)

It wouldn’t be a bad idea to have a work queue of lets say, 20 user stories.

Having a ticket system (bug tracking/feature request) that allows some sort of voting to prioritize which user stories get in the work queue (as long as they aren’t blocked by a lesser feature/bug). This should provide a nice stream of work that is fairly self regulating.

Now when it comes to the conversation about application architecture, I feel there would definitely need to be some sort of volunteer committee to have that conversation. (Beware the mythical man-month)

Thoughts on development process?