A Coders Progress Diary Page

Written by on November 26, 2010

Heya all,

I figured I might as well write a bit about the new site coding. Called more or less a page of a diary because I will be talking mostly about my thoughts and idea's. As well with the current progress. Owh and don't worry about technical terms. I will keep those to a minimum.

Most of you might not see me much, or pretty much not at all. Last few weeks there was the new site host, the switch and several bug fixes of the current site. This definitely has put a dent into the new site coding progress.

First thing that I have to say is that I do have a real life and that the new site coding project is HUGE. Really huge, apparently I made quite a few people going 'wow' when they saw how big it was, even though they knew it was huge.

I will go into the basics of the new site first to explain for those who read this for the first time to have an idea about what is going on.

The site is being recoded from scratch, the current site coding is at a level where it is unusable for the new site, save a piece here or there. Same for the database. Some tables are just rubbish or unused ones where you go wonder what is going on. Also a lot of current features are just questionable (like nobody mentioned why the judge test need to be reset? Regardless of that there is a said you can only take once every 3 months on the test page? Double login for the forum? A different site for coverage?). If you take a look at the back side of the current site, it is not far away from being a spider web. A lot of things were added over time and/or hacked into the current site. I believe this is no secret. So what we have is a site with layer upon layer of hacks and fixes, and this does not work well for maintenance. Which is not supposed to be my job even o.O.

Anyway the new site has a few main goals in set:

  • Flexibility

  • Able to easily expand

  • Maintainable

  • Proper features that make sense

  • Able to be used / maintained by a non-professional coder.

This caused the core of the new site to be really really small. Basically every page belongs to a module. That module is called and 'executed' trough the Executor. Which stands at the very core. Around it are the libraries, which contains the common functions, such as the database handling, sessions and templates. Around that are the Modules. The regular ones that handles all of the rest and mostly display stuff, and the System Modules. Which handles specific background functions.

The name of this new core is called 'Black Widow'. It has somewhat a spider web structure as in you can call in anything you want (modules make use of libraries and system modules which in turn may call for more for example) yet still organized and easily to maintain. The Black Widow basically weaves the web. It is able to last for a very very long time. Small core yet efficient and deadly.

Adding in new modules goes very easily and into a fixed setting.

Ok enough of that mumbo jumbo. On to something more interesting, what to expect:

First thing to note is that a lot of area's will get a major overhaul. Some will even be changed completely. This is done to make sure the new site fits all of the needs of the players, judges, and staff. The site is being recoded to make sure all of the goals will be met. New features, existing features either redone or expanded (some even removed). Quick and easy to use while allowing for additions and changes that may come with time.

For starters, no more need to double login for the forum. There is an entire new forum coded. This due to the way it is integrated into other modules, such as news, articles and guides. Basically the 2 are synchronized, meaning that if a news post is being made it will also appear in the forum. Any comments made on the news item itself or trough the forum onto the news will also appear in both places. This has the advantage that both places will be properly moderated and that users can make use of the BBCode in the comments sections. Changing one will change the same comment in the other section.

Private Messages on the site will get a whole new role. As even system related messages will be sent to your private messages, such as new notifications.

The Judge Center has also received a major overhaul. Documents are all now properly listed in 1 section. No more separate links or listed as menu items, just go straight to the documents and select the one you want to see. This gives the judge department to be able to properly maintain everything instead of being constantly bound by limits and all.

The biggest change however is the Penalty system. Which has received a complete overhaul. Both appearance, use and functionality. Basically penalties will now be properly bound to accounts. Players can see the a summary of penalties they have received and will be more aware of their infractions. This will also play a more bigger role for those who want to become a judge.

Most of the above have already been coded and is into beta stage. Where I consider code to be finished but leaving open for additional (minor) functions/additions and bug fixes. But not yet in a frozen state (which means that the code is only open for fixes and no more additional functions may be added which can/may break other code).

Coding is done till about to be finished (aka when I reach about 95%, the last 5% is over for bug fixing and adjustments) then it enters a frozen state and up for testing, once that is concluded and no problems were found or all all of the found problems are fixed it will be put up live. As coding goes there are quite a few phases it goes through, some of these are already finished, some of them even ages ago (making the core that will support all of the site that will be worked with e.g.).

At the moment most all of the community parts are done, aside from articles, guides and downloads (and to a lesser degree, links). Judge Center is reaching initial completion aside from the tournaments section.

Current up coming plans are making a brand new Judge Testing system, Moving on to Ratings and then Tournaments/Decks. I estimate that I am on about 55~60%. So how big is the so far you may ask? Well below are the current stats from the site, from the initial point of writing this article;

(full info is here: http://pastebin.com/sbMG2hJY )

  •  # of Files:                182

  •  # of Lines:               14361

  •  # of Words:             47873

  •  # of Characterss:  471032

When I say that writing a few book is easier then coding this site I really do mean it :P. This counting does not include downloaded scripts. Those were excluded. (And there are quite a few of those).

For in the future a couple new features are also planned that I can share: The site is build flexible. Meaning that is easy to admins to administer the site, if needed they can shut down specific parts or just let the site enter maintenance mode. It also means a lot of functions are set through admin pages. And not hardcoded settings. The other meaning of that is that new parts can be added without hacking current code. An example of this that is planned is to able to allow new tourney styles to be easily added. We currently have sealed, RFT for example, but adding swiss would be a major pain since it would need to be hacked into the current site badly. For the new site these new additions will go trough a plugin system. Every tourney type their own plugin. And yes this does mean swiss is incoming. Just insert the plugin and voila judges can select that as their type of tourney. Same will happen for decklists. As more and more applications are coming up it is just a matter of time when the 'new mws' will surface to take the new place of the king of play applications. So being able to upload a deck for every application and download for every application is something that also will be supported.

That does brings me to a new point. A personal opinion. For players, judges and all it is more easier to set 1 application as a default for use. We cannot do/advertize this thanks to wizards, what we can do is accept an application that works for several TCG, and most importantly does not break any patent. That is what I do hope that will come, we can set a default to work with and it takes a lot of annoyances away from players. And we have no worries about any C&D being sent.

Anyway back to what I was saying. A lot of other new features will come along with decks and tournaments, deck lists will get a new overhaul as well. Well mostly the index currently, of the lists of the current played decks in recent major tournaments. The biggest overhauls will mostly happen on the back side for administrators.

The new site makes a lot of use new scripts and all and makes even more use of Javascripts, for the new site javascript is a must. Turning it off will be cause you to be unable to use the new website. Recently AJAX also got put into the mix for a few handy things (autocomplete!). A lot of new security will be put in place to give people who use several accounts a much much harder time. There will be a new warning/ban system. Players can get warnings and these will accumulate into bans. They do vanish over time though and will be archived.

The site coding is still being worked on as much as possible, but as you can see this is by far not easy. I do think in a way that I do have toughest job of all the staff members. I do not know when I will be finished. That depends on how the coding will go and how my RL will go :) :P.

Overall the site coding is coming along nicely I think, I think I put around anywhere between 20~50 hours a week into it, assuming there are no other things coming in between (like the switch of our hosts recently and the bug fixing that I had to do coming after that, or RL stuff). This is by far my biggest project to date and it won't be done for quite a long while.

So I will repeat the last line one more time, to answer the question that I get asked the most, there is, not will be, nor ever will be, an ETA.

Back to Magic: the Gathering Articles

by HBB_Maligno on 2010-11-26 19:30 CET

ETA??? what's ETA?

by Weedmonkey on 2010-11-26 20:55 CET

ETA = Estimated Time of Arrival

by Counterlife on 2010-11-26 21:00 CET

Thought this was about the new Magic client. Hohum.

by TacoMaster on 2010-11-26 22:20 CET


by jfc on 2010-11-26 22:59 CET

gline god

by Sebas_ on 2010-11-27 01:03 CET

Great Job Azania, i dont understand anything still good job i love you =)

by GoneBananas on 2010-11-27 02:37 CET

I will not troll the comments of an article lest I wish to find myself banned

by obiadmin on 2010-11-27 04:12 CET

Hey Azania let me know if I could help any on the site. I have complete understanding on any programming language with any database. I'm always looking for volunteer work to keep up on my programming. Raymond

by on 2010-11-27 10:39 CET

obiadmin: shoot azania a pm in irc, or contact him via mail. You are more certain to get a reaction that way. 20 to 40 hours of programming a week, on top of his other activities don't leave much time for him to read anything else than that :)

by YvesHenri on 2010-11-28 01:01 CET

14k lines arent that huge... my first game was 40k lines rofl
however, it was pretty nub coded....
what language are you going to code in?

by on 2010-11-28 01:13 CET

14k lines may not be a lot, depends on the project and the design. You mentioned these 2 factors, one is noob code and the other is a game. Now depending what type of game and on what platform (and whether it is 3d or not) It will have an impact, a simple thing such as a not coding a function for a common piece of code could easily result in a lot of lines.

Also another factor is howmany people were coding on it and if it was done in an assignment for a company. All of this will affect things a lot.

However in the context of a website that is being coded as effectively as possible, for something that isn't initially even that big it is a lot. Granted if the new website was coded horribly it would prolly reach a lot more. But that is not the case.

Now I really do not want to start a discussion about line count. I merely used this as an indication. How one may see this can differ greatly from one another.

The new site is coded in PHP, making use of javascript, jquery and ajax.

by NahHolmes on 2010-11-28 04:48 CET

tl:dr version- Coding is hard, swiss tournaments coming someday.

I approve of this.

by Boogaloo on 2010-11-28 06:10 CET

Yeah swiss!

by Sebas_ on 2010-11-29 08:05 CET


by Taodd on 2010-11-30 08:00 CET

Go Azania!

All content on this page may not be reproduced without written consent of Magic-League Directors.
Magic the Gathering is TM and copyright Wizards of the Coast, Inc, a subsidiary of Hasbro, Inc. All rights reserved.

Contact Us | Privacy Policy
Join Swagbucks!