Dream Maker Design Ethics 1: Computational Thinking
{ In this topic I am hoping to share some Software Designing Ethics, or in less informal/inaccurate term: code designing principles. The main two aims of this topic are first to provide a clear structure that you may take into consideration when designing your code, and bringing it to life in a very consistent form, or manage your already existing code and increase its efficiency. The other aim is to hopefully suggest possibly commonly shared ideas that perhaps can take Dream Maker one step ahead, and yes, I am pointing at the core. This topic is just the introduction to these ethics. It is just some effort based on my studies experience, and when it comes to designing expect tense debate - this provides good example of how each programmer is unique from one another -obvious but amazing fact-. Please help me in making this topic a helpful one by fixing any mistake you spot, and excuse my describing style if it's weird for you. }
The interesting part starts from here, and first things first. BYOND engine's language is just another language, one of hundreds of languages out there, some are main languages and some are literal jokes. This powerful engine provides you with many many options to drive your software to its early form. This system is not responsible for shouting at you nor interfering with your logic, no code following the system's structure is considered "correct" nor "wrong". Now you go out there and 'Design' your work's form, whether it is good looking or tempting, ugly or sad, as long as the system-bio brought it to you as you wanted, that is it. Many people are simply blinded from their code's form, which is just like a baby - it needs attention and continuous effort, otherwise it is your child 'who' went wild, explanation follows.
Logic, Algebra and Thinking
These three are the Space, Materials and Sun in this 'galaxy'. The definition behind it all, and what actually make Algorithms (Earth) a prosper land. A quick look at the history of this galaxy: in the 9th century, a man called Al-Khwarizmi (an Iraqi mathematician) had discovered, or rather set clear/invented Algebra. Skipping details, this has evolved to mean all processes for solving tasks. "Algorithms" are sequence of finite instructions, step-by-step problem-solving procedure, it accomplishes some end. Now many languages nowadays disagree with some details here, but nothing made that possible except this galaxy, to begin with - it is part of this galaxy after all.Elegance = Simplicity + Convenience + Effectiveness
You may be questioning this, and why on earth would you list an english dictionary to start talking about specifically DM coding.. I am trying to set the frame for you before starting to draw. What we are concerned about is the characteristic of Algorithms: performance, reliability and Elegance. Software designing is nothing but a paranoia based on this "Elegance" noun.. I would say 'theory' if you agree. Programming your code and making sure it works as I mentioned, is like bringing this form of thing to life. Just the first step into it. Designing however is concerned about how this form will grow up: scalability, how it will continue living: reusablity and most importantly the characteristic balance of this form: neatness and understandability.No matter how much humans share with one another, they remain Unique!
Imagine baking a cake, think of the steps needed to do that, what could they be? In circumstances like this one, one would assume resources, skip obvious steps, and achieve same goal with different taste and decor. A pro cook may explain that in one large procedure (and I know a mom who can say it in two words when I ask her to make one myself.."bake cake-dough"!). Let us consider these steps: firstly mix flour milk and two eggs, secondly add the desired amount of sugar, then stir and as an option add nuts, finally bake for 30 minutes. These steps taken will indeed result in a baked cake, but how did we managed to do it? That is the question. We have suggested fixed number of eggs. Why bother with nuts if we wanted a sponge cake? And in this case, will it be a cake assuming we have added very little milk or sugar? It is not as clear or efficient as it could be. Algorithm as we said is a sequence of steps, just like the step-by-step procedure that resulted in the cake being baked, it is straight-forward and give the wanted result, however these steps might not be the best way to do it, there may be flaws which could be dealt with and a more efficient technique to do it. A good algorithm would optimise the solution, and is much more convenient. It does not go through general steps whenever it is possible to avoid doing so. This is what is called Algorithm's naïve-ness and complexity*. Now that is what software designing suggests, the evaluated procedural approach, quality code. In DM, an object oriented, good design is not just about a rarely buggy game (or say perfectly working system/game engine), it is also about the code which players will almost never see or touch. It is all about You, and your future You, most likely people who will take and work with your code too. You sure do not want to permanently delete your source code once you have written it and got people play your game do you? Sad story, many 'programmers' shoot their game right on its release day, some programmers abandon their desperate child on the day of its birth.My Fully-Functioning Game is Soulless, Starting from Release Date!
Why.. why you ask? Game designing might look like tweaking and tiding your code but it is more than that. Remember what I said about the 'system-bio form'? Ok, this needs to evolve, live healthily, and have a reasonable spoken language. Game or Software Designing specifically makes sure your game's code can be reused, can be extended or can be replaced/totally deleted, without affecting the whole form - if this form had an accident, taking off the arm for a surgery will not kill it. What will happen to your game, if a certain aspect in BYOND has been changed.. how far will it suffer? Well.. as much as it is dependent on that (something like that will hopefully not happen). Do not misunderstand the idea, no code is totally independent, however designing the code is much about making it all "manage itself without much interference". For this, I have many points that I will hopefully demonstrate later on, critisising some aspects in our beloved engine (no promises with my tight schedule though..)."No worries, my code came alive and would keep walking even if I took its stomach out.. and is maintainable, living a happy long life.", ummm.. not yet. We have only discussed a small portion of the magical word, Elegance. Although I am considered a beginner in Dream Mak-ing, I have seen much and many desperate forms flying around, with source codes for games here and there, I rarely found one which meets my designing principles and schemes standards. Some of the nightmares I have seen include a dirty form which lists every happy-together-code-chunks in one place, another one generalise some or most of its code parts' characteristics, a code that lives on CPU and virtual registers, the worst so far is.. (a pause here and a leap of faith).. is a code which creates a weird library, just another sub-sub-away-language that it is almost encrypted, before using it for the actual game. I would confront the developer and mention that in future, he might never be able to tell what his code does, no, not with his decent comments.. not with possible future updates.
Elegance.. and what is with all that fuss behind it. An important aspect derived from this magical word is how neat/lovely/cute is your code. Would others understand it? Love it? or just deal with it as an acquaintance form? Would our lonely form stay single forever..? *scratching eyelids*.. It all depends on your designing skill - how good are you with code decoration.
This leads to mentioning many many.. never ending designing views and principles, and how people would deal with their own form's character. Pointing on topics that hopefully, will be discussed, such as Duplication, Cohesion, Re-factoring, Coupling and the thing I wanted to talk about so badly: Encapsulation, Visibility and Responsibility-Driven Coding.
{ If you are reading this without having skipped, congratulations! I hope this was a fairly explained introduction to Computational Thinking, analysing Software Designing from logical perspective (with my decent describing scheme), and the principles which have been the sole topic for Software Designers. I wanted to achieve the second aim of this topic, but perhaps the right time is not just yet.. I did not expect myself to introduce the idea of 'Design Ethics' topics in such a long topic, but I hope it was worthwhile and I really wish to have the opportunity to continue writing, in my tight schedule, and would be honoured, if managed to help developing the engine, even with the very least idea. I appreciate all fair comments and if there is something specific you would like me to talk about in detail later on, I will try my best.}
* Thanks to Magnum2k for suggesting this to be added.