GSoC-WMLDebugingSupport fakedrake

From The Battle for Wesnoth Wiki
Revision as of 01:13, 21 March 2013 by Esr (talk | contribs) (Hide historical references to Subversion from the wiki search function)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This page is related to Summer of Code 2010
See the list of Summer of Code 2010 Ideas



This is a Summer of Code 2010 student page
Project: SoC Ideas WML Debugging


Contents

Description

fakedrake - WML Debugging

I am most interested in patching the code to output accurate line numbers along with the errors and improving the error messages themselves. After that i most probably will have time to make a schema system.

IRC

fakedrake

SoC Application

WML Debugging Support

A Rough Plan

Schema System

This is going to be a very vague plan as i havent looked carefully into the corresponding code.

There can be a either database that holds all possible tags in wml or read the wml tags from the c++ and lua code, most probably the latter as it will require significantly less effort to add new features to WML later. For each tag there could also be rules as to whether they are in the correct place(eg an [if] tag cannot be in any other tag) and if they have the right syntax

Furthermore each tag entry in the data structure will contain a list of all the mandatory and all optional variables that correspond to it in order to check if all mandatory and no unknown variables are set. Finally the types of the variables should be checked.

Note: Most of the time will be dedicated to this task. Mostly due to the amount of work that it requires and not so much due to its difficulty level.

Definition of done

When the WML parser can locate any mistake in the WML code and identify it as accurately as possible.

Imporving WML error messages

About the quoted string traceback problem, the only way i can think of is changing the wml syntax in the following ways.

  1. add explicit line joining(eg as done in python with the '\' character)
  2. do not allow strings and define substitutions to spread across several lines
eg.
a="this is a test string
that spreads across lines"
is incorrect and will cause an error in line 1
the correct form would be
a="this is a test string\
that spreads across lines"


the conversion of the existing wml code to comply to the changes can be done by a python script or more practically we could have this feature be turned on and off according to the definition of a flag which would have local use for the current file only or globa use for the files that include/are included by the current file. The flag could even be a file in the current directory(recently posted a patch to detect file existence with ifdef). Or even a combination of the above.

Questionnaire

1) Basics

1.1) Write a small introduction to yourself.

My real name is Chris Perivolaropoulos, I am 18 years old and i study electrical and computer engineering in the university of Patras (Greece)

1.2) State your preferred email address.

darksaga2006@gmail.com

1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?

fakedrake for the forum, fakedrake for the IRC

1.4) Why do you want to participate in summer of code?

I consider summer of code to be a great opportunity gain experience with big projects and an opportunity to work with good developers who share my enthusiasm for the subject. I am expecting to to improve my skills while contributing to a fun project and to open source in general.

1.5) What are you studying, subject, level and school?

I am in the first year of the electrical and computer engineering department of Patras university.

1.6) What country are you from, at what time are you most likely to be able to join IRC?

I'm from Greece and i am most likely to be found in the IRC in the night hours generally(10pm-3am UMT +3) but you might find me any time...

1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.

I dont have any commitments for the summer, I might go on a week long vacation some time during the summer but nothing is arranged yet.

2) Experience

2.1) What programs/software have you worked on before?

I have written the PythonGallery ( http://code.google.com/p/pythongallery ) in python(duh) but i primarily code in C/C++. I have most of my coding experience through the greek computing olympiads in which i have been taking place from 2007-2009 and have not been doing bad(places 2007: 14th, 2008: 14th, 2009: 10th), but i have been writing some small text based games with friends just to pass some time and have some experience with openGL, SDL, Qt and less with gtk.

I am also currently working on developing a stable and user friendly way of managing quotas on a linux network with ldap authentication for the computer lab of our departmet(project mentored by prof. George Thomopoulos)

finally i have been following the libmpt project, submitting bugs and hacking it very slightly to suit myself but never actually sent any patches.

2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)

I wrote 90% of pythongallery and have been doing some pair coding for minor projects but i have never been actively involved as a developer in any big projects

2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?

No, i would have applied, but i was too young...

2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.

I have done my fair share of bug reporting on anything i use, done a little code reviewing on Qgrubeditor when it was still developed by the greek PCmagazine community and as i said i have been following the libmtp project for some time now but besides the pythongallery i havent been involved in any projects that anyone took the time to put under a licence.

2.5) Gaming experience - Are you a gamer?

2.5.1) What type of gamer are you?

I play games for 3 reasons 1. is to release some steam 2. for eduactional reasons: to look at the code afterwards if its opensource 3. social reasons In other words i am not much of a hardcore gamer, i look more to the tecnical aspect of the game i am playing.

2.5.2) What type of games?

I have played a varietey of games most of which i didnt like(if i wanted awesome graphics and nothing more i would rent a dvd) but the following 4 are always installed in my windows partition: Unreal Tournament 2004, Painkiller(just the first one without the expansion), medieval total war 2 and vampire the masquerade: bloodlines(fanatic of the pen n paper one).

I also adore the monkey island series, mame games(marvel vs capcom and metal slug ftw) and a Risk game that i found recently that spares us the hundrends of calculations the physical board game needs xD

finally i have spent some hours on wesnoth.

2.5.3) What type of opponents do you prefer?

i prefer AI opponents. If i have to play a game with some friends I'd rather it is a pen n paper rpg. And also i hate 14 year olds on the other side of the world who have rooted on their pc so much playing a game that i have no chance beating them(or i am just a coward :P)

2.5.4) Are you more interested in story or gameplay?

gameplay

2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.

havent started the campaign, not finished yet, and havent played multiplayer...

2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our S­­V­­N (during the evaluation period or earlier) please state so.

no i just joined the community

3) Communication skills

3.1) Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.

I was born and lived in the US for 5 years but my parents are greek so although i can write and speak pretty fluently my english are a step behind of my greek. I also have the ECPE with pretty good marks...

3.2) What spoken languages are you fluent in?

greek, english

3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.

i think i will make it...

3.4) Do you give constructive advice?

I dont think i am the one to judge that but i try not to speak up when i hevent looked thoroughly into the subject in question.

3.5) Do you receive advice well?

If i disagree with a piece of advice i try to talk it over an convince or be convinced but in any case i try never to be rude.

3.6) Are you good at sorting useful criticisms from useless ones?

I try to consider everything and reject anything not genuine or logical

3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project want

Most of the code i have ever written was for purely educational reasons so i am pretty used to having my code thrown away regardless of its quality. Id rather code something and have it thrown away than not code at all. I do however value time and the opinions of others so i think there is a fine line that i shouldnt cross about this.


4) Project

4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?

i would love to work with spritesheets, but i see many people do so i would also love working with AI, networking wouldnt also be too bad. (I feel like a kid in an ice cream truck in this project xD)

4.2) If you have invented your own project, please describe the project and the scope.

-

4.3) Why did you choose this project?

I believe that improving WML in general would make wesnoth much better in the long run since most of the game's charm comes from the variety and content of the game settings, and better WML will give campaign an scenario designers more creative power. In addition to the above debugging is a very crucial aspect of a language. Personally i have never worked with parsing before but i am quite interesting in looking into it and implementing so i consider this a good chance.

4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".

4.5) Include as much technical detail about your implementation as you can

After a first (and maybe immature) glance at the code(and especially the preprocessor code) i have some things in mind:

  • re-implementation of some preprocessor things. Some parts of the code are a bit fumbled which makes them difficult to debug and modify.
  • make some minor improvements regarding the preprocessor tokens.
  • Maybe we should redistribute the function declarations/definitions in this part of the code... far from urgent though

[Obviously more to come]

4.6) What do you expect to gain from this project?

i expect to gain mostly knowledge and also i hope to meet people with the same enthusiasm in coding as me

4.7) What would make you stay in the Wesnoth community after the conclusion of SOC?

i most probably will do so if everything goes as planned.


5) Practical considerations

===5.1) Are you familiar with any of the following tools or languages?

  • Sub­­version (used for all commits)
  • C++ (language used for all the normal source code)
  • STL, Boost, Sdl (C++ libraries used by Wesnoth)
  • Python (optional, mainly used for tools)
  • build environments (eg cmake/autotools/scons)
  • WML (the wesnoth specific scenario language)
  • Lua (used in combination with WML to create scenarios)===

I am with all but the latter 2 (i use autotools as a build enviromet)

5.2) Which tools do you normally use for development? Why do you use them?

Geany or kdevelop for editing and autotools for compiling... i dont really rely on tools, i would work with anything as long as i have its documentation... i use s­­v­­n because i hevent tried anything else and i think it's ok as a tool...

5.3) What programming languages are you fluent in?

mostly c/c++ and python but i can code decently in bash, php and javascript... I have worked with other languages too but most are far from my favorite.

5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of "there is no way to contact you" does arise!

ok...

This page was last edited on 21 March 2013, at 01:13.