HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Modularity Introduction (opinion)

08-13-2009, 01:21 PM#1
Flame_Phoenix
As you all know, I am making a tutorial that will introduce structs timers and modularity.
In the theory section of my tutorial, I try to explain modularity and add it some of my personal experience on the way.
However I think this is too theoretic ... perhaps I am missing something ...

//================================================================

Modularity

What is modularity?
According to wikipedia the theoritical definition of modular programming is:

Quote:
Modular programming is a software design technique that increases the extent to which software is composed from separate parts, called modules. Conceptually, modules represent a separation of concerns, and improve maintainability by enforcing logical boundaries between components.

Basically this means that if you have a problem, you divide that problem into several smaller problems. Then each smaller problem is a module. In the end, you get all modules together and make a program that solves your initial bigger problem.
In todays programming, modular code also means you need to use other people code. Why? Because other people already solved the small problem for you. If they didn't, then you have to code your module and solve your problem.
Specifically, in wc3, this can be very good or very bad. In the case of structures (that we will study next) there are many codes to solve problems. This codes approved by the community are well documented and try to make a standard with an API. The community responsible for wc3 code standards is www.wc3campaigns.net.
As said before, modularity allows you to turn a complex problem into something easier by using other people code. However in wc3 the standards change some times ... when that happens your code get outdated. This means that you have to update it so it follows the new standard. Updates are sometimes good because they improve things, however they can also be bad because the break backwards compatibility. Also, choosing a code to use in your program can also bring problems - what if the creator is no longer active and the code gets outdated? Who can help you? What if the creator of the code is always changing or what if the creator of the code made a mistake? This things can happen, they happen, and when they do, you are screwed. So this means that you must choose which codes you use carefully, you must know the creator can be trusted. In my case I always use codes made my Vexorian, Anitarf and Moyack. They are all excellent coders that are all active.
When coding spells, modularity comes to a price: you need to import libraries. It is a fair price when they solve the hard work for you. however before you import anything, you should always check if it conflicts with any other library you have.
Modularity is important because, as you will see, a spell is a big problem. We can then reduce that problem to smaller parts.
My first approach will be to make a spell that simply works. Then i will increase the level of modularity. You will see that your spell will require more libraries, however it will also be more efficient, the code will be smaller, easier to update, and you will also gain other advantages.

//================================================================

The message I want to give is: Your spell will require many libraries, but if you choose the wisely, that will be a very good thing.
What do you think?
08-13-2009, 01:23 PM#2
Rising_Dusk
Quote:
Originally Posted by Flame_Phoenix
What do you think?
tl;dr

If you're going to write a tutorial, organize it so people will have the patience to actually read it.
08-13-2009, 01:25 PM#3
Pyrogasm
You are the last person I would want talking about modularity.

Go get grim001 to write a tutorial about it or something.


Edit: Super irony... your post is in no way modular at all; you just junked together a bunch of text without organization and your only link is a Wikipedia article.
08-13-2009, 01:27 PM#4
Flame_Phoenix
Quote:
tl;dr

If you're going to write a tutorial, organize it so people will have the patience to actually read it.
I don't get what you mean ...
And don't worry, there are always people willing to learn my tutorials, I have many students now to prove it, the most recent one is Cheezman (some of you already know him).

Quote:
You are the last person I would want talking about modularity.
I wonder why... Next time you feel like making a post like this one, please make me a favour, and don't post it.
Mmmm, is grim01 still alive ? I haven't seen him for long now ... =S
08-13-2009, 01:30 PM#5
Pyrogasm
He's on AIM all the time.

And don't deny it... I'm sure a lot of people would find it ironic that you are trying to write a tutorial about modularity.



And Dusk is telling you to, you know, make it look like a tutorial. Organization goes a long way.
08-13-2009, 01:36 PM#6
Flame_Phoenix
Quote:
He's on AIM all the time.
I don't have AIM =(

Quote:
And don't deny it... I'm sure a lot of people would find it ironic that you are trying to write a tutorial about modularity.
True ... it took me a LONG time to learn nice modularity and to like xe. I need to write this tutorial so other people don't do my mistakes. If dealing with 1 FP is bad, imagine dealing with 2 or 3 FP that suddenly appeared from THW (like I 1st did). xD

Quote:
And Dusk is telling you to, you know, make it look like a tutorial. Organization goes a long way.
Please notice this is not the entire tutorial. It is only a small intro modularity. I have organization in mind and I started making the tutorial, if you want I can post it here, but I don't think you will want that ...
08-13-2009, 01:40 PM#7
Pyrogasm
I still didn't read it because it looks like a mass of words; neither did Dusk, and I'm sure neither will a lot of other people.
08-13-2009, 01:49 PM#8
Flame_Phoenix
My tutorials are always big. It is a small mass of words with lots of information. As I said, I can't force people to learn, so if you don't want to, there is nothing I can do.

Personally, I can't think of a better way to define modularity than explaining it the best I can.
08-13-2009, 02:04 PM#9
Pyrogasm
Quote:
Originally Posted by lame_Phoenix
Personally, I can't think of a better way to define modularity than explaining it the best I can.
Right...

And since when does that mean 'write-one-fatass-block-of-text' instead of 'organize your tutorial'?
08-13-2009, 02:07 PM#10
Flame_Phoenix
Quote:
And since when does that mean 'write-one-fatass-block-of-text' instead of 'organize your tutorial'?
Just because my tutorial has text it means it is not organized ?!
08-13-2009, 02:08 PM#11
Rising_Dusk
Quote:
Originally Posted by Pyrogasm
And since when does that mean 'write-one-fatass-block-of-text' instead of 'organize your tutorial'?
This. Look at your first post.
Quote:
Originally Posted by Tutorial
Basically this means that if you have a problem, you divide that problem into several smaller problems. Then each smaller problem is a module. In the end, you get all modules together and make a program that solves your initial bigger problem.
In todays programming, modular code also means you need to use other people code. Why? Because other people already solved the small problem for you. If they didn't, then you have to code your module and solve your problem.
Specifically, in wc3, this can be very good or very bad. In the case of structures (that we will study next) there are many codes to solve problems. This codes approved by the community are well documented and try to make a standard with an API. The community responsible for wc3 code standards is www.wc3campaigns.net.
As said before, modularity allows you to turn a complex problem into something easier by using other people code. However in wc3 the standards change some times ... when that happens your code get outdated. This means that you have to update it so it follows the new standard. Updates are sometimes good because they improve things, however they can also be bad because the break backwards compatibility. Also, choosing a code to use in your program can also bring problems - what if the creator is no longer active and the code gets outdated? Who can help you? What if the creator of the code is always changing or what if the creator of the code made a mistake? This things can happen, they happen, and when they do, you are screwed. So this means that you must choose which codes you use carefully, you must know the creator can be trusted. In my case I always use codes made my Vexorian, Anitarf and Moyack. They are all excellent coders that are all active.
When coding spells, modularity comes to a price: you need to import libraries. It is a fair price when they solve the hard work for you. however before you import anything, you should always check if it conflicts with any other library you have.
Modularity is important because, as you will see, a spell is a big problem. We can then reduce that problem to smaller parts.
My first approach will be to make a spell that simply works. Then i will increase the level of modularity. You will see that your spell will require more libraries, however it will also be more efficient, the code will be smaller, easier to update, and you will also gain other advantages.
What. The. F*ck.
08-13-2009, 02:34 PM#12
Pyrogasm
What I want to know is how you even managed to write that abomination of a text-block without getting lost. Was it like some weird stream-of-consciousness thing?
08-13-2009, 02:41 PM#13
Flame_Phoenix
I don't see the problem ...
organization:
1 - definition of modularity
2 - modularity in wc3 and other people code
3 - community making standard
4 - back to modularity in wc3, good and cons
5 - price of modularity
6 - the final conclusion, modularity is good

Am I missing something ?
Quote:
What I want to know is how you even managed to write that abomination of a text-block without getting lost. Was it like some weird stream-of-consciousness thing?
How can you say it is bad if you simply refuse to read it ?
When i write texts I usually enter another world..
08-13-2009, 02:43 PM#14
Pyrogasm
YOU WROTE WITHOUT LINEBREAKS


HOLY FUCK I HATE YOU
08-13-2009, 02:43 PM#15
Rising_Dusk
Yes, the part where it is ORGANIZED. Try splitting up individual thoughts with extra returns, bolding or italicizing key points, things like that. Make it reader friendly, right now it's just one big eyesore.