• Home
  • PFC
  • Computer
  • General
  • Personal
  • Posts RSS
  • Comments RSS
Blue Orange Green Pink Purple

Featured content

¡Ves a http://elfiberhabla.net para seguir mi blog! Esta web ya no es activa!

HOWTO: Be a good FPS player

Being the fucking God in any First-Person Shooter isn't an easy task; of course, it requires skill, practice and motivation to carry on playing and improve yourself every day.

Nevertheless, some playing strategy and some options can help you to achieve this task and be a good player, wining more or being more frequently the best player on the field. Let's see some strategy made by Davigetto. I'm taking as example AssaultCube, a free FPS -> Recommended!!!!

  1. Weapons: Any FPS which deserves some acceptance should have several kind of weapons, among them:
    • A submachine gun with fast fire rate for those who don't aim very well at first. Good for finishing off those badly damaged enemies or spreading around. The counterpart is that every bullet does a low amount of damage (at fast rate, of course) and while you are firing on your target, you are showing yourself, exposed to be fired by the enemy. Shotguns are good avoiding this last disadvantatge (you can shot and hide), but aim is needed.
    • A sniper rifle for long distance and players who love playing FPS games with strategy (hide, shot&run, support the team...), have a good accuracy and can kill an enemy in only 1 shot. They are good defending short-ranged team members from other snipers too, or shooting targets which are far away.
    • Shotgun: shotguns are simply fantastic and massive. The have a medium fire rate, but in every shot they usually spread up to ten or more bullets. In long distances the are useless. In short distances they become mortal if all bullets hit the target. Nevertheless it requires acuraccy, unlike submachine guns, but they do more damage in less time. They should defend enemies from snipers.

These are the three minimal weapons for any good FPS (more pistol and a knife).

More advices:

  1. Have some knowledge of the maps you're usually playing.
  2. If you are in a well-organised clan, then make fireteams mixing the previous weapons and keep together.
  3. Use Teamspeak for communicating. This will ensure you more fun and an enjoyable gaming.
  4. Keep always moving and jumping when battling, unless you are a sniper with strategic purposes
  5. The most important for improving your own aim: adjust the mouse sensibility. This will give you more freedom when moving the aiming point (crosshair) with mouse, aiming better and faster if it is well-adjusted. In AssaultCube a sensibility of 5 is rather good, but you must find your own way, testing and looking for the suitable sensibility.

To sum up, aiming, strategy and team-play are the key to maximise the enjoyment in FPS games. Try my advices, you won't be disappointed!

Read More 1 Comment | Posted by Davigetto | edit post

Extreme programming methodology: theory and experience

Theory

Extreme programming (XP) is an agile development methodology, based in programming “inside out”. One of its main purposes is to provide flexibility against changing requirements, rapid releases and not much heavy processes not directly related with programming. It follows a Manifesto:


  • Individuals and interactions over processes and tools
  • Working software over comprehensive documentation
  • Customer collaboration over contract negotiation
  • Responding to change over following a plan

And twelve principles:

  1. Customer satisfaction through early and continuous delivery of valuable software
  2. Welcome changing requeriments, even late in development
  3. Deliver working software frequently (2 weeks - 2 months)
  4. Business people and developers must work together daily
  5. Build projects around motivated individuals
  6. Face-to-face conversation
  7. Working software is the primary measure of progress
  8. Agile processes promote sustainable development
  9. Continuous attention to technical excellence and good design
  10. Simplicity
  11. Self-organizing teams
  12. Regular adaptation to changing circumstances

These ones are shared by all agile development methodologies. Referring more strictly to XP, talking about 4 mainpoints into this methodology is possible:

  • There are four variables to be controlled: Cost, Time, Quality and Scope.
  • Five values to be promoted: Communication, Simplicity, Feedback, Courage and Respect.
  • Five principles that should guide us: Rapid feedback, Assuming simplicity, Incremental changes, Embracing change, Quality work
  • The twelve practises: Planning game, small releases, simple designs, automated testing, continuous integration, refactoring, pair programming, collective ownership, 40-hour week, on-site customer, coding standard, metaphor

Nevertheless, the previous statements are not always true, depends on the team and they don't need to be followed strictly (one of the advantatges of XP is the lack of full strictness against heavyweight programming processes).

These diagrams could be self-explanatories:

As it is said before, XP needs to satisfy customer by early and continuous deliveries. There is a release planning at first. Once all is planned, programmer members do their work, iterating as several times as required. Once the bucle has finished, we have to consider if we have to change something (and replan), or all is OK and can be published. Once a version is published, the project must continue improving, or otherwise the project has ended.

In every iteration (iteration stands for a programming cycle and its acceptance) a little teamwork is defined (not strictly necessary, but highly recommended), and all is programmed and tested. If the code is not accepted nor satisfies the requirements, another iteration is made. Otherwise, the piece of code is tried to be integrated with the rest of the team. If the integration is succesful, the program can be published.

This is the main process in the XP methodology. The practise could be a bit different, but not too much.

As a summary, these two tables explains the differences between an agile methodology and a heavyweight methodology like RUP (where documentation – UML diagrams and other kind of documents made by analizers and designers - is very important in this last one because the teams used to be larger):

Although they are very different processes, an agile process could become a heavyweight development process in time, but it's not the aim of this post covering this.

Practise

Practise is slightly different. In the nwiki process, the process is:

  1. First, there is a customer which needs some requirements which should be satisfied (Moodle 2.0).
  2. Define the tasks in order to satisfy that requirements.
  3. Have continuous reunions with the other teammates, and explain them objectives, purposes, workflow... all things about the project that needs to be developed.
  4. Once all developers have understood the problem and have a minimum idea about de development process (how the project will be done), split the task between them.
  5. Every X time, meet them to see how the state of the work is, changes on requirements, discussing problems, anything else...

Firstly, only a ewiki and old nwiki migration should be done. However, after Moodlemoot event, an ouwiki migration should be done too and ewiki parser will not be longer supported. This changes will be made with less cost than it could be if a heavyweight process was used (a demonstration for the advantatges of XP).

To sum up, a heavyweight programming methodology can be used in clearly defined projects (with an extensive analysis and specification), and projects where there are involved a huge amount of developers, and quality software becomes important. For smaller teams and projects which don't have too much time, Extreme programming could be a methodology to follow.

Read More 1 Comment | Posted by Davigetto | edit post

Part of the migration finished - Documentation

The logical scheme of the nwiki project has changed a bit. The conceptual models of ewiki, nwiki 1.9 and the new nwiki 2.0 are shown below:

In both cases (upgrading from nwiki 1.9 or ewiki) old tables must be saved (renamed as 'old_tablename'). In other versions of nwiki, old tables were transformed only into the new ones. Nevertheless, in this new version we can't do it.

A migration should consider the whole community who will upgrade to the new version of Moodle (and indeed, to the new version of Nwiki). There are from single users to university institutions. The last ones probably have in their databases thousands of entries to migrate (pages, wikis...), and this can be a problem: not only spending too much time migrating from old wikis; server memory could not be enough for such operation, depending on the number of pages.

The solution to this problem is importing wikis and pages dynamically.

Focus on the conceptual model of new nwiki:

  • At least, the wiki table must be migrated in the migrate process (all data can be migrated for this table without problem, and this must be done). Further explanations about this migration process can be found below.
  • There is a “wiki_instances" table. This table contains wiki identifier for an instance and who are the owner/users/groups availables to use this wiki. Filling this page at migration time would be a problem (lots of users, lots of wikis...). So at first, this table will be empty. The table will be filled dynamically in the following way:
    • Every time a user accesses for the first time (after a migration) into a wiki, a wiki_instances tuple will be added into the database.
  • “Wiki_pages” is another problem; thousands and thousands of pages. So this table won't be migrated inmediately into the process, too. Every time any user accesses to a page for the first time since the wiki was migrated, it will be migrated. (And synonyms table if it's necessary). That is why the old wiki tables need to be kept. Wiki pages will be migrated using the old wiki_pages tables (probably they will be empty progressively and when the old wiki_pages table is empty, it will be removed.

This is the mainpoint of the migration process.

Now let's see the Wiki table migration:

You can find the code in mod/wiki/db/upgrade.php in the project.

This file only can upgrade from ewiki or from nwiki 1.9. Otherwise, upgrade will not be completed and you will be notified about the problem and recommended to upgrade to nwiki 1.9 first or reinstalling ewiki.

In both cases, old wiki tables will be renamed and new tables installed. Once this is done, the migration of old tables begins. For the upgrade.php, only wiki table will be migrated (because making a full migration would last too much depending on the number of pages and wikis, reasons were explained above).

The migration of wiki table when upgrading from nwiki 1.9 to nwiki 2.0 is quite simple; most fields match in type and concept, so making the relation between fields is direct.

The migration when upgrading from ewiki to nwiki 2.0 is more complex. Some fields are direct, but others aren't. 'wtype' field from ewiki wiki table which says if students must work in groups (group), by their own (student), or they cannot edit the content (teacher). This field has a close relationship with studentmode field from new nwiki 2.0. Depending on the value of groupmode from course_modules table, studentmode value must be 0, 1 or 2:

  • 0 = students in group, users can work together.
  • 1 = separate students, students work on their own and no one except teacher can see each other work.
  • 2 = students visible, students work on their own, but they can see each other.

When wtype is group or teacher, the students must work together (groupmode attribute from course_modules will separate them, not this one), so the value must be 0. If wtype is students, depending on the groupmode attribute, studentmode will have a value of 1 or 2; if groupmode = 0 or 1(no group) then studentmode = 1. Otherwise studentmode = 2.

Another attribute is htmlmode. This attribute describes if the wiki was edited via html code or ewiki parser. It's rather simple.

Finally, in both cases (ewiki and nwiki), in order to avoid running out of memory in server where there are lots of wikis, wiki tuples are retrieved in packets of 100.

Read More 0 comments | Posted by Davigetto | edit post

Candidature for HDC

Well, HDC is an easy-to-pass subject. However it requires some effort and auto-improve spirit to achieve the main objective of the subject: Speaking in public. For that, you need to lose your shame. Be a good boss isn't easy, too, and sometimes having born-capacities seems to be required for. If I get chosen as delegate, I will ensure:

  1. Listen to all your complaints/suggestions and deliver them to the properly government institution.
  2. A good and accurate following of the subject
  3. If you're in a trouble with the subject and you need my assistance, I'll do my best to give it to you. My smile is yours.
  4. If you need some personal speaking with someone to practice your own speaking skills, if I have the chance in the properly moment, I will hear and attend you gladly.

Choose me next Monday. I can ensure you you will not regret your decision :)

Read More 0 comments | Posted by Davigetto | edit post

Bibliography

  • Moodle Oficial Webpage: http://www.moodle.org/
  • Moodle 1.9 API: http://xref.moodle.org/
  • Meaning of Abstraction: http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29
  • Moodlemoot homepage: http://www.moodlemoot.org/
  • Sakai Project: http://sakaiproject.org/portal
  • Google Web Toolkit homepage: http://code.google.com/webtoolkit/
  • Mahara Webpage: http://www.mahara.org/
  • Tutorials of XML, XSLT...: http://www.w3schools.com
  • PHP Oficial Homepage: http://www.php.net
Read More 0 comments | Posted by Davigetto | edit post

My task: The Migration

Well, this afternoon I've met the rest of Nwiki workers, for discussing about how to divide the work and what programming guidelines we should follow, and how the whole work will be done.

At first, we've discussed about which tools we will use to work. These tools are:

  1. GIT: git is a kind of Control Version System, developed by Linus Torvalds. Over SVN it has the advantatge that maintains two repositories: 1 in the local machine and 1 repository on the Internet, so you make changes in your local, and when you feel good, upload all changes to the Internet server. It's quite similar to use as SVN.
  2. Trac: Trac is a Tracker. For now, we will use it to manage ourselves dividing the work (opening tickets) and notifying bugs. Push the screen to zoom it in.

Once the tools are stablished, now we can begin to work. First, we should follow the Moodle Coding Guidelines and some rules for ourselves:

  1. All functions that we program must begin with wiki_
  2. PHPDoc to all function (all function must be well-documented, description, parameters, return...)
  3. For all, functions we make, we should make a PHPUnit and test it. PHPUnit, in single words, are some test games to throw against the function you did to see if it works correctly or not. They all have a similar syntax. Moodle created their own method for testing PHPUnits instead of using a third-party software.
  4. Not using $_POST[] and $_GET[] variables to get values arriving from an external resource. Instead, we have to use optional_param() function to retrieve the value, either GET or POST.
  5. We have to keep in mind that we have to program HTML pieces of code in XHTML 1.0 Strict
  6. All CSS that we could need to add must be added into styles.php file. Moodle fetchs this file for additional CSS parameters if they are included.
  7. All permission which should be assigned must be located at mod/wiki/db/access.php file.

After that, we've discussed the database structure. This is the overall structure:

We must also document the application architecture. Too, we've mentioned some important files to consider:

  • lib.php -> functions that Moodle calls automatically.
  • locallib.php -> functions for internal use.
  • version.php -> for allowing Moodle to notice a DB upgrade
  • weblib.php -> to print screens
  • languages files
  • export folder -> for exporting methods
  • db folder -> install.xml, upgrade.php...

After all this, I've been assigned to do the Database migration from ewiki and older nwiki version to the new wiki (Probably I have to program the upgrade.php file). Pigui told me that it could take me 2 months (omg!). Let's see the hardeness of my task... Time will tidy things...

Read More 0 comments | Posted by Davigetto | edit post

Training: repair an nwiki bug

Well, as a training, before entering into the Nwiki refactoring project, my project leader asked me for repairing an nwiki bug: http://moodle.org/mod/forum/discuss.php?d=107332

This bug is located (into the module directory of nwiki) into db/upgrade.php. The bug is simply understandable: From the previous version of Nwiki to the new version of Nwiki the "wiki" table changed a bit. One of these changes was modifying the type of 1 field from String to Integer (the evaluation field). The previous developer programmed the type change inside out (with a DML function called change_type_field()). However there is a problem. If the table/field is empty, there isn't any problem. But if the evaluation field was filled previously with an string value, the conversion from string to integer cannot be done, and the upgrade fails.

My task is repair this undesired behavior. The way to do this was:

  1. Create a new auxiliar field for the evaluation field in the wiki table, in order to store there the integer value of the string.
  2. Once this auxiliar field is filled for all table tuples, erase the evaluation field and create a new one with type integer. Once this is done, dump all auxiliar field data to this new evaluation field and erase the auxiliar field.

Having DML and DDL Moodle libraries (a libraries used to update-query-manipulate moodle database) it shouldn't be too much difficult. Actually, it isn't. However I needed to use some special update SQL instruction with a WHERE clause, and I've not found any Moodle function to do such a thing, so I've done it with a function called execute_sql(SQL sentence), where you put as parameter an SQL query, and this query will be executed to the database.

What's the matter? All DBMS does not have the same SQL syntax. Functions provided by Moodle DML libraries solves this problem, but as I said before, I haven't found any upgrade function to use with a WHERE clause.

I hope Pigui will give me some assistance. But all my work will be thrown away with Nwiki refactoring, so Pigui will not spend too much time on this. And for me, I've seen I'm capable of doing it and repair bugs with work. I think I'm ready to do whatever task could be assigned to me.

This afternoon all scolarship holders will have a meeting to discuss the methodology we should follow for developing nwiki to fit with the new Moodle 2.0 architecture (probably available in early 2009). This afternoon I'm going to write a summary of the main clues of my meeting.

I post the code I made in order to repair the bug (it is incomplete and fails, but the main idea is clearly visible):

$table = new XMLDBTable('wiki');
$field = new XMLDBField('evaluation');
$field->setAttributes(XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'studentdiscussion');

$auxfield = new XMLDBField('evaluation2');
$auxfield->setAttributes(XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'studentdiscussion');
add_field($table, $auxfield);

/*Substitution*/
$evaluation_values = get_records('wiki','','','','id,evaluation');
foreach ($evaluation_values as $key => $single_value) {
//TODO: let's substitute the evaluation string for the integer value.
//To pigui: Falten el valor dels strings
if ($single_value->evaluation == '') {
$a = 0;
}
else if ($single_value->evaluation == '') {
$a = 1;
}
else {
$a = 2;
}
$quer = 'UPDATE '.$CFG->prefix.'wiki SET evaluation2 = '.$a.' WHERE id = '.$single_value->id;
execute_sql($quer);
}
//Now, drop table evaluation, and recreate it as an Integer field
drop_field($table,$field);
add_field($table, $field);

//Dump all evaluation2 field into new evaluation field
$quer = 'UPDATE '.$CFG->prefix.'wiki SET evaluation = evaluation2';
execute_sql($quer);

//Drop aux field
drop_field($table,$auxfield);
Read More 0 comments | Posted by Davigetto | edit post

Sequence diagram about OpenSyllabus integration in Moodle

Now, I've finished the sequence diagrams. Push "read more" to see the diagrams of each operation I've implemented. All comments and explanations are made into the diagram itself:

  • This is the Main operation:

  • XSLT transformation operation:

  • Zip compression operation:

  • getFileValue operation:

  • The definition() operation in syllabi_import_form class:

Read More 0 comments | Posted by Davigetto | edit post

Class diagram about OpenSyllabus integration in Moodle

Well, I've finished doing the class diagram for the plugin I developed for Moodle:

Explanations

Previously in moodle existed a class called Moodleform. This class is intended to be subclassed, as it works as a template for all forms in Moodle. So I subclassed it in order to make my own form for OpenSyllabus plugin. The functions (all their sequence diagrams will be posted in my next post) I needed to redefine were:

  1. definition(): this operation is called by the constructor and builds the form with the fields you define on it
  2. definition_after_data: for making some validations or instructions after data is submitted.
  3. getFileValue(): this operation retrieves the name of the uploaded file.
  4. validation(): this operation makes some validations before the form is accepted. In my case, as I only had to make a prototype, I redefined it empty.
  5. add_action_buttons(): adds the "submit" and cancel buttons to the form.

As I said, I will provide sequence diagrams later. Once I defined the form, now only we must bind this form to our Main process and the logics of our problem is finished. It's easy to understand, it isn't?

Read More 1 Comment | Posted by Davigetto | edit post

The importance of UML in the software programming world

It is well known that one of my preferred fields in computer enginering world is software enginering. I love read and make UML diagrams, because it is an easier way to understand and make programs than following a methodology properly called "eXtreme Programming" (consists on programming inside out).

Indeed, it's easier understanding a 1-sheet diagram where you see a box with some letters inside and some arrows than "public class TEXT { A b; B a; etc etc;}". Learning process about how a program/project works is done extremely faster. And that is why I prefer reading some UML diagrams than reading code.

However in my PFC, Moodle lacks about a good UML documentation in order to make programmers to work easier. That has disappointed me a bit, because I expected I would apply all my software enginering knowledgement and improve my skill in that field. I made the OpenSyllabus prototype (and learn how to do it) with some file examples of Moodle project.

I will propose to Marc (or Pigui) that in my next work in DFWiki refactoring I want to document in UML all my work (if possible). I feel ready to do it and I've leant some basic PHP, enough to do a good job (and, of course, understood Moodle modules, format course, blocks, thinking about the ID substitution, it should not be too much hard but it requires spending some time...).

My objective about this proposition is having a deeper knowledgement about Software Enginering and working methodology. In order to achieve that, I was preparing my PC to make nice class diagrams and sequence diagrams.

The "Free Software Market" about UML isn't too much good. I've tested some programs and very few ones completed my needs:

  • ArgoUML: It lacks of a very intuitive interface and some basic functionalities that I find vital, and it doesn't allow me to do things in the way I want (bad class diagrams, bad sequence diagrams)
  • Violet: It is not updated to UML2, so I couldn't do some stuff like fragments in sequence diagrams
  • UMLet: It would be really good if it had a simple, but very necessary tool: a ZOOM!
  • BoUML: You can't do constructors in sequence diagrams.

So, after some research, I found 2 programs which fit on my needs:

  • SDedit: Probably the best sequence diagram editor I've ever seen. It is not a WYSIWYG editor like the others, you have to know some easy-to-use code (read the program's help) to make sequence diagrams. You type a simple code, and the diagram is drawn while you're doing that. Once you are used to it, the sequence diagram production speeds up in a considerable way, and the diagrams it makes are really nice.

    As it is not a WYSIWYG program, it introduces us to a new philosophy: Dragging&dropping, mouse moves... it's rather slower than simply typing some short lines with keyboard. I leant this concept and idea, and I find it well-builded in empirical demonstrations. I, for instance, I can make sequence diagrams fastly. With a "drawing" (WYSIWYG) editor I spend more time. I can assure you this.

  • Dia: SDedit is a program that has sense: Sequence diagrams are just this, sequential. They can be builded and all drawn objects can have a fixed position in the diagram and it will be well shown; in class diagrams it's not possible to do that (or it is really harder), because you can position your items and classes in many ways and are all pretty or more understandable.

    I was looking for a program to design class diagrams as I design sequence diagrams in SDedit, by code; nevertheless, for the reasons explained above, I have not find any program such that (or I'm so stupid that I am not able to find it), so I had to give up and use a decent WYSIWYG editor. I found Dia for this, it's a great program, similar to Visio, it allows me to do very nice class diagrams in UML. It is far better than all described above, but by default it doesn't allow to create associative classes (it's not a huge problem but it could be good to have them), and last time I tried it, after forcing a bit the program capabilities, I recived a Segmentation Fault, loosing my time. It was not very happy, but I will give him a new try.

Read More 4 comments | Posted by Davigetto | edit post

Blocks, modules and discovers

Well, today I've been working on how to make 'foo' blocks and modules.

Making blocks has been quite easy because in moodle wiki there is a very well explained page about how to make blocks for Moodle: link to the page. I upload the block I've programmed so anyone can see 'in life' the progress:

Foo block

As you can see, making a block in Moodle it's very easy. But making modules... it's rather harder than blocks. There isn't documentation as good as blocks, and the template they give you it's a bit confusing, specially for the database managing.

While trying to learn how can I program a foo module, I think I've learnt accidentally how I can manage databases in Moodle. For the module, I need to create a database table in one of the files of module, but I don't know where and how... I expect that the following libraries I've found will be useful to me:

In the lib folder of Moodle, there is 2 libraries: ddllib.php and dmllib.php. The first one contains functions to alter the main structure of the database (create and alter tables, for instance). The second one is used to access data (like inserting new rows, retrieve values, delete values, etc).

Let's follow working on it... I've not finished yet :)

Read More 0 comments | Posted by Davigetto | edit post

15th September: Meeting with Marc Alier: the IDea

Well, today I've started classes at UPC again (finally, I just wanted it :D), and after my first class in "Web Application System Design" and looking for my scolarship holder table (OMG, it was an enormous and dirty table, but I've cleaned it; I hope I will find it as clean as I left it tomorrow), I met Marc.

The objective of the meeting was to show him the OpenSyllabus integration in Moodle prototype I made and "look for" more work.

After Marc took a look into my work, he noticed something he didn't like: Lesson outlines (see image) are all wikis (1 wiki per lesson). This was the unique way I found to solve a problem:

  • Marc wanted me to make only 1 wiki, and the lesson outlines were mere links to a wiki page from that wiki. The problem is that links are stored in the Moodle course XML files as static links.
  • These links have a number parameter, the wiki identifier. (For example, ID 10). When restoring a course, moodle assigns a different ID automatically to the new modules of the course, so the wiki will have probably another ID different than 10. But the lesson outline link has the ID 10 as parameter!!! (static link).

So, what can I do now? Well, Marc told me that I have to find the way to change the ID of these links to redirect to the current wiki ID. How can I do this?

As a first requirement, I can make an abstraction:

  1. First, I have to found, in the restoring process, where the new wiki ID is given and restored.
  2. Then, after the piece of code I found before, I have to retrieve the new ID value.
  3. Then, I have to locate the code where the link resources are restored.
  4. Finally, I have to modify every link that will be restored in the previous founded code, retrieving the current link direction, and modifying the id parameter to the previous retrieved ID value from wiki.

I hope it won't be so hard to perform, however Marc's purposes for this piece of work are merely for my own learning and education.

Marc has explained to me that I will work on DFWiki code refactoring (lot of work is coming OMG), so as a training he demanded me to program a "foo" (example) Moodle format course, Moodle module and a Moodle block. This job has priority for me over the "ID" job explained previously.

In Moodle wiki I remember founding something related with that (some module/block/course format templates), so I'm going to take a look immediately.

Ok guys, let's work!

Read More 0 comments | Posted by Davigetto | edit post

Next round: The XSLT part

Once I've programmed the PHP part of the prototype, I had to program the other part of the project: the XSLT file.

Let's go back for a while; the main purpose of the project is, having a syllabi (OpenSyllabus XML course file), I have to make a moodle course automatically according to that syllabi.

Moodle courses can be saved as XML files and be restored with that XML file. With this premise, and knowing that syllabi are also XML files, we can see that we need to transform in some way the syllabi into a Moodle course. The way for doing it is called XSLT (eXtensible StyleSheet Language Tranform).

The process for making the XSL file:

  1. First, having a syllabi example, I've made manually a Moodle course.
  2. Then, I've stored the XML file into my computer to work with it (making a backup of the course). Now, the objective is to transform the syllabi XML file into a Moodle XML course file with the aid of XSLT language.

(in the previous entry of my blog I wrote about the PHP part and his relantionship with XSLT part).

I never did any XSL transformation or programmed a XSL file, and I needed learning some advanced XSL features immediatelly not recommended for a newbie who wants to learn XSL as a hobby :). Also I had to adapt the xsl syntax to moodle, because Moodle needs "special" considerations:

  1. Moodle xml files have very separated parts in the document. However, some parts have a very close relationship, and this relation can only be linked with an Identifier. But this identifier needs to be independent of the XML syllabi, so after some heavy research, the XSL function I needed for this was "generate-id" (this function generates a unique ID for a node, ideal for the lesson bucle).
  2. I didn't know why Moodle, after the point 1 application, gave me errors didn't allow me to create a course. The explanation was that generate-id generates an id like "id7623472". Moodle only reads numbers, not strings!, so I have to discard the "id" string with "substring" xsl function.
  3. In bucles, I needed incremental variables (aka i++ :)). Nevertheless, "variable" xsl element doesn't allow changing his first assigned value (OMG, problem!), because XSL is a declarative language, not a procedural one like C++ or PHP. The first and valid approach I found to solve this problem was the "number" xsl element. In a bucle, it makes something like a counter, from 1 to N being N the number of iterations. I found it a rustic and 'vaste' method, but valid for my purposes :)

After all these ones, and spending some time, finally I've finished the XSL file and it works perfectly. But this XSL file is built over a syllabi prototype, not over a final version, so I will have to modify it a lot when I recive it.

Now, I've finished all my work on OpenSyllabus integration prototype for Moodlemoot for now until "new external requirements" (probably they will arrive soon).

As you can see, in my blog entries I'm writing about XML files and other kind of resources, but I don't put any example to allow you understanding me clearly. Once I finish the project I will upload all those files and will modify all posts adding to them the mentioned ones (or until my teacher tells me that it could be good to upload them while they are in process).

Read More 0 comments | Posted by Davigetto | edit post

Next round: Implementing the OpenSyllabus integration we've though for Moodle

Finally, the requirements for OpenSyllabus integration into Moodle are clearly defined. The main purpose: having a Syllabi (an OpenSyllabus XML file), Moodle has to process this XML file by means of an XSL file, which transforms the original Osyl XML file into a Moodle XML course file, and then process it to have a new Moodle course ready for being used.

However, I only have two more weeks to finish the work (all must be ready soon for Moodlemoot).

The main abstraction (God heavens, I love this word!) is (the main tasks):

  1. Create a new administration option, called 'Import OpenSyllabus course'.
  2. That option will link to a Moodle Form, where the administrator will be able to upload an XML file.
  3. Once the user has selected an Osyl XML file, and he submits it, the file is uploaded.
  4. After that, the uploaded file will be parsed with an XSL parser, who will transform the original XML into another Moodle readable XML course file.
  5. In order to reuse some original Moodle code (concretely the course restoration code) the output XML file needs to be zipped.
  6. Once the file has been zipped, now is the time to invoke the restoration process with the zipped file as parameter.

Until here, all seems to be tidy and clear. Yes, it is. This is the main specification however, I've found some personal problems (the design, how can I made it? how can I implement it?):

  1. I've no idea about PHP (I'm a pure Java developer, I've never touched PHP).
  2. How can I add a new link (which points to the import form) in the Moodle admin block?
  3. How can I create a form for allowing a user to upload a file compatible with Moodle?
  4. How can I retrieve the file? And the name of the file?
  5. How can I store a file into an specific folder in PHP?
  6. How can I process a XML file with an XSL parser with my XSL file to transform it into another XML file in PHP?
  7. How can I zip files in PHP?
  8. How can I reuse the restore implementation?

Well, all these questions have their proper answer. But where can I find the answers and understand them? Afortunately I've already found them, however, it has not been easy:

  • Or I'm stupid and I can't find it, or Moodle lacks of a good developer documentation (such as complete class diagrams, specifications, sequence diagrams, proper explanations...). It only has an API over hundreds of files composing Moodle (omg, finding something has been really hard).
  • I'm tired of searching concrete functions among the API files. Is the Moodle API useful or useless? Can I do my job with brute programming? Or has someone implemented what I need yet?

After some days of desperate study:

  1. PHP is an Object Oriented language, so a port from Java should not be too difficult. PHP is rather different than Java, however it has some similarities (like classes, attributes...), so with some practice, learning PHP should be easier (in fact, I believe I know now PHP and now I can program better than some time ago)
  2. I've found the admin block is implemented in admin/settings. I've located my option link in courses.php file:

    $ADMIN->add('courses', new admin_externalpage('osylimp', get_string('osylimp', 'admin'), $CFG->wwwroot . '/course/osyl.php'));

  3. Moodle has a superclass for forms, called moodleform (located at lib/formslib.php). Using a form example (edit_form.php located in course folder), I've created a new subclass, called syllabi_import_form.

    But the form example doesn't have a field for uploading files. How can I make one? After lot of websearching and coffees, I've found that I can add a line into the definition function of my new class:

    $mform->addElement('file','syllabi', 'XML course file','maxlength="150" size="20"');

    There were lots of similar lines in the document, however, replacing the first parameter with 'file' I've created a field for uploading files.

  4. For retrieving the file value, exists a moodle function for forms: getElementValue. Passing as parameter the name of the file, it will retrieve the value entered by the user. Nevertheless, the value returned by getElementValue for the file field was an array. Arrays in PHP are rather different than Java:

    For expressing an array, in Java we use this expression: namevariable[integer]. In PHP, is something similar, but different. Arrays can be used in many ways, like hash tables, priority queues, stacks... so you can use also strings into the [], and mapping a key to a value in the array. See PHP documentation for further explanation.

    Finally, I could retrieve the name of the file :)

  5. For retrieving the file and store it, Moodle forms have a method for storing into an specific path all files the user wants to upload: "save_files".
  6. There are lots of XSL parser for PHP: the most interesting I found was Sablotron. However, I couldn't get it working, so I've used the built-in XSLT parser (libxslt library). In PHP documentation about XSL I've found some functions to get it working. This is the main procedure:

    $xp = new XSLTProcessor(); //First we create a XSLT process
    $xsl = new DomDocument; //Then, we must load an XSL file
    $xsl->load('../OsylCourse.xsl');

    $xp->importStylesheet($xsl); //After that, we must import the XSL file
    //to the XSLT process
    $xml_doc = new DomDocument; //now we have to load the XML file
    $xml_doc->load($CFG->dataroot.'/3/backupdata/'.$file['name']);
    /*finally, we have to apply the transformation to the document and
    save it to a file*/
    if ($xml_out = $xp->transformToDOC($xml_doc)) {
    $xml_out->save($CFG->dataroot.'/3/backupdata/moodle.xml');
    } else {
    trigger_error('XSL transformation failed.', E_USER_ERROR);
    }
  7. Zipping a file is quite easy:

    $zip = new ZipArchive(); //First we create an instance of a Zip file
    /*Then, with open system call we create a zip file*/
    if ($zip->open($CFG->dataroot.'/3/backupdata/course.zip', ZIPARCHIVE::CREATE)!==TRUE) {
    exit("cannot open");
    }
    //Add as many files as you want (also directories)
    $zip->addFile($CFG->dataroot.'/3/backupdata/moodle.xml', 'moodle.xml');
    //Close the zip file
    $zip->close();

    For further information see PHP Documentation for ZIP.

  8. Reuse the restoration code is easy. Simply pass as a parameter the recently zipped file.

Well, that's all for now. However, there are plenty of bugs. For now, I'm only making a functional prototype for Moodlemoot... Doing things well requires time :)

Read More 0 comments | Posted by Davigetto | edit post

The 3000 most important words of English - v1.1

I've uploaded an improved printing version of the 3000 English word list. Due to problems with Openoffice and Excel, I've done my work with Word. Also I put a PDF version.

Doc version PDF version

Read More 12 comments | Posted by Davigetto | edit post

The 3000 most important words of English

Finally, after lots of hours of working, I've finished translating to Spanish the 3000 most important words of English (I found them in the Oxford dictionary CD). These words are the most necessary ones to speak and write English, so I'm sure they will be useful to many people interested on it.

I publish "the Excel", and you can edit, modify and distribute it if you want, nevertheless I wish you keep the name of the original autor (me) on the file.

Link to the file

Read More 4 comments | Posted by Davigetto | edit post

The right way of my project

I've had a nice conversation with Marc last Tuesday. Maybe it has been the most interesting meeting I've had with him. We have defined a good path I must follow (finally!).

From the XML file created in OpenSyllabus (the syllabi file) we will make a port to the Moodle courses. Nevertheless, how can I make this port?

Marc's idea is making a new option for Moodle in Moodle course creation. Now Moodle can make courses from Moodle course backups (these backups are also XML files). So we have to make a new option, called "Import OpenSyllabus course", where the user can select an Osyl XML syllabi and import it into Moodle.

Once imported, this course will have all information the XML syllabi defines.

For achieve that, I will do a simple task: adquire a complete XML file for testing purposes, and manually build a Moodle course with all information I can see in that XML file (wiki's, lessons, title, description...).

Tasks:

  1. Obtain the DTD of Osyl XML syllabi.
  2. Obtain a complete XML syllabi for testing.
  3. Make manually a course with that XML.
  4. Compare the XML backup of that course and the XML file and build a XSLT for transform the Osyl XML into a Moodle readable XML file.
  5. Define the requirements which can be needed for the "import OpenSyllabus course" tool.
Read More 0 comments | Posted by Davigetto | edit post

Es la memoria nuestro más preciado talento?

Con este post, sólo pretendo generar un poco de reflexión filosófica hacia lo que yo considero como nuestro bien más preciado: la memoria.

Imagina que estás soltero. Cuando estabas solo y te sentabas debajo de una palmera, estabas solo sentado debajo de una palmera (sí, así es xD).

De repente, la mujer de tu vida aparece y mientras estás con ella, eres el hombre más feliz del mundo. Pero claro, no puedes estar con esa persona siempre pegado, y se tiene que ir a hacer un viaje.

Luego, mientras tu chica está de viaje, te sientas otra vez debajo de aquella misma palmera. Otra vez solo, debajo de esa palmera. Si tomaran una foto de esa situación antes y una foto de esa situación después, sería exactamente la misma foto. Estás exactamente igual. Significa que has perdido tiempo de tu vida conociendo a esa persona? NO!

Realmente no estás exactamente igual, hay un pequeño detalle que ha cambiado. No se puede ver desde el exterior, pero sí desde el interior. La sombra de esa chica flota por encima de tu cabeza. Mientras estás sentado, la estás recordando. Notas como el tiempo ha avanzado, notas como el tiempo te ha hecho cambiar y estás distinto, notas que realmente estás vivo.

Y es que la memoria es la única manera que tenemos de poder percibir el cambio, la única manera que tenemos de poder evolucionar, de poder vivir como humanos, de poder aprender y crecer mentalmente.

Pero qué ocurriría si una enfermedad como el Alzheimer nos despojara de este don?

Read More 2 comments | Posted by Davigetto | edit post

Realmente uno puede ser feliz y estar autorrealizado trabajando?

Ayer me fui a dar una vuelta por Girona con Helena, y mientras íbamos caminando, por alguno de esos casuales que tiene la vida, me encontré con mi amigo Eric (Sarge para los ogamers, el que hasta hace poco era moderador de ahí) y mi amiga Sandy. Con la carisma típica que le caracteriza, pues entablamos distintas e interesantes conversaciones, entre ellas, EL TRABAJO.

Siempre he creído (y creo!) que el trabajo humaniza (tal y como dijo Karl Marx). En un trabajo aprendes y con él, mejoras y te realizas como persona (hasta un cierto punto, immediatamente remarco eso). Por supuesto, hay trabajos que de autorrealización, para mi gusto, tienen poco y son más trabajos "para sobrevivir" (por ejemplo, como el que mencionamos, señora de la limpieza).

Puedes estar trabajando de algo que te mole mucho (mecánico, diseñador de programas o incluso jefe de proyectos), cobrando un pastón. No obstante, en esa clase de trabajos llega a un punto en el que dejas de aprender tanto como antes (o prácticamente, ya has aprendido todo lo que debías) y ya no te realiza ni te mola quizás tanto como antes: entras en la monotonía y ese trabajo no te realiza más (se convierte en una simple fuente de ingresos).

También un trabajo, a menos que tengas un horario de puta madre, puede llegar a ser una putada. En un trabajo tienes una serie de obligaciones y una serie de horas a las que tienes que ir y una serie de horas que por cojones hay que ir. Ya puedes estar en el trabajo que siempre has soñado y cobrando una pasta ,que si los horarios que tienes impiden que puedas ver cada día a la esposa que tanto amas, ese curro pasará a no ser tan "de ensueño".

Así pues, cómo ser superfeliz según yo?

  1. Trabajar en sitios donde cada día puedas hacer cosas diferentes e interesantes para ti, y que cada día aprendas más y cada día te sientas mejor, más a gusto con tu trabajo y más autorrealizado (Eric dice que esto es imposible).
  2. Tener un horario que te permita compatibilizar ese trabajo con todo lo que quieres en esta vida (ya sean amigos, ya sea pareja).
  3. Un sueldo que te permita vivir de forma holgada.

Sí, un trabajo perfecto debe cumplir esos 3 perfiles. Pero... EXISTE??????

Eric dice que no, todos los trabajos acaban siendo monótonos, sea el que sea. Yo digo que sí; aunque sólo conozco 1 trabajo que pueda ser así: Profesor de universidad (que a su vez, sea investigador).

Ser profe de universidad es la reostia en bicicleta (almenos profe de la FIB, y para ello me voy a basar en el profesor Marc Alier). Parece que él es totalmente feliz: Cada día se pasa viajando arriba y abajo -gastos pagados- (que si Alemania, que si Burkina Faso, que si Las Vegas...) y se lleva a su mujer, con lo cual se lo debe pasar bomba viajando. Luego, dando clase, las da de una forma que no sólo se lo pasa bien él, sino que además se lo pasan bien los alumnos. Y luego, dirige una serie de proyectos que no solo generan conocimiento y ayudan a expandir el conocimiento (Moodle, DFWikiLabs...), sino que además siempre está dando conferencias y asistiendo a ellas y aprendiendo cada día más y más sobre este mundo que cambia tan rápidamente, y conociendo a gente importante del mundo de los sistemas de información, comilonas, etc. Vamos, todo un lujo y todo un estilo de vida que, almenos a mi y visto así, me resulta envidiable (por dios, que alguien me corrija si me equivoco).

Almenos esa es mi "excepción" con la que pretendo decir que el trabajo puede realizar SIEMPRE. Por supuesto, estas cosas así son poco comunes. Normalmente todos los trabajos son los típicos de pasarte 8 horas dando el callo como un cabrón, aprendes lo que sea y luego ahí te quedas para mantener a tu família, y luego los horarios no coinciden con los de tus hijos cuando terminan el colegio / con el trabajo de tu esposa.

Es chungo buscarse una vida así, pero para ello, hay que sacrificarse un tiempo y... estudiar?

Read More 1 Comment | Posted by Davigetto | edit post

FICS and Battle for Wesnoth

As someone know, one of my favorite games style are strategy games. I have always loved these kind of games (my curriculum can talk alone: Worms Armageddon, Age of Empires II, Warcraft III -the best game I've ever played-, etc.). I've played another game genres that sticked me on my chair (Final Fantasy series, Need for Speed...).

However, I have lot of work in the university, and now I can't play all games I played in the past.

Nevertheless,I want to mention two GNU Games that you can enjoy a lot (I've enjoyed them): One of these is chess and the other, Battle for Wesnoth.

Everyone knows what is chess. However, there is some people who doesn't have a partner for playing it every time he wants. 1 GNU chess server exists, called FICS, where you can play for free with other players (or your friends). This server has his website in http://www.freechess.org.

For playing on this server, you need a chess client. Lots of interfaces/clients are avaible for all platforms (the most used is Jin, an interface you can you on the web or in your PC, written in Java and is compatible with all platforms). However, as a Linux user, I use eboard.

Regardless the interface you choose, you have to create a FICS account to play on the server in the main website. (It's quite easy and it's free), or playing as guest.

Once you connect to FICS, you will be ready to play chess with other people. Interfaces often has a “seek graph” where you can see all people that want a match. If you want to play with someone, write the command “seek 2 12” (for example, for a 2 minutes and 12 increment game). Read the help for more help (or ask me).

If you want to talk on a chat channel or to an user, use the command “tell user/channel text to say”.

Ahhh, also, write the following command to add me to friends: “+notify davigetto”. I will be notified if you add me to friends and if you wish, we can play some matches :)

The following game is Battle for Wesnoth. The main website is http://www.wesnoth.org. Again, this game can be played in all platforms. It's a turn-based strategy game with a fantasy theme (with orcs, elves, dwarfs...) where the main objective is “destroy the opponent”. It's quite easy to play this game, and when you catch “the feeling of the game” you can be attracted strongly, so be careful :)

Once again, if you want to play with me at this game, send me an email or a comment to this post. However, in this game, opposite to Warcraft III, matches often are very long, so often I prefer playing the campaign mode.

Also, if you wish, I can play with you to the mythical Warcraft III... for remembering oldies purposes :)

Read More 1 Comment | Posted by Davigetto | edit post

Mahara e-Portfolio and OpenSyllabus: Fuuuusion-ha?!

Well, until now, I have been talking about OpenSyllabus, their benefits and their objectives, ideas about how me and my partners could integrate it into moodle, how can we use and interpret the XML file that it generates, etc.

I recived a call from Marc telling me that the important question about OpenSyllabus is the idea behind it, not the technology behind it. Also, he told me about Mahara Portfolio, and that he is also interested on it. I should think about how we can integrate into Moodle Mahara Portfolio and OpenSyllabus.

Mahara is a CMS Project developed by Catalyst IT, a brother project of Moodle (they have between them some collaborations). It objective is similar to Moodle and Sakai, create social learning networks and share resources between members (The typical web 2.0). It has a interesting tool, called Portfolio. I will explain it in detail immediately.

Yesterday I invested the whole afternoon in install on my PC Mahara (I followed the guide in the oficial webpage, but it was quite difficult) and make working OpenSyllabus into Eclipse (omg, 3 hours for making it working good!). Regardless, now I have a full working mahara and OpenSyllabus on my PC and I can take a look to code when I want.

After that, I could explore what is Mahara, and what is Portfolio. And O-M-G! It seems to be a nice CMS and Portfolio a nice tool! (I say seems because I have only tested it one day, however I can see interesting uses for myself :D). You know what is a portfolio, right? The typical folder where you store your drafts, currículums, learning resources... Well, Mahara implements something similar:

  • First, it has a complete and interesting user profile (where you can put your personal information, like other CMS systems). Nevertheless, it's different in Mahara. In your profile you can define your own Curriculum Vitae (Certifications, books and publications, education history, employment history), your academic/career goals, and what are your skills. Moodle doesn't have an user profile as great as Mahara.
  • Portfolio allow users to upload files (their notes, pdfs, even source code) in a structured way (in folders). Also it allows creating view pages for every user (blogs, etc...). However, it's bugged for now.

So, Mahara Portfolio is a good tool to allow students having their own Curriculums and notes in a structured and organized way.

Now, How can we integrate Mahara and OpenSyllabus into Moodle once we know what are their advantatges and disadvantatges? I've got some ideas. I write one of them:

  • Modify the Moodle user profile to make it equal to Mahara user profile and Portfolio. With a good user profile, users and students would be engaged in organizing their notes and their curriculums, sharing them among other students. This will improve their learning experience and their learning performance.
  • Add/embed OpenSyllabus to Moodle for creating easy and uniform syllabi, and allow teachers to create courses in a very easy way. This would improve the organization of courses and their upgrading.

Well, in 21th I'm talking with Marc and Pigui about all of these.

Hey, I'm really enjoying this project! :D

PD: I attach two screens about Mahara profile and portfolio.

Read More 0 comments | Posted by Davigetto | edit post

A summary of my Osyl crusade

Well, I will write some lines about my "adventures" through OpenSyllabus in a kind of Summary.

As I did the last days, I don't have to research too deep into technological aspect of OpenSyllabus for trying to get a path for integrate it into Moodle. Technology often can be incompatible (Sakai OpenSyllabus uses GWT -Java- and Moodle uses PHP). My research, as Marc told me, must be looking for what there are behind Opensyllabus, what is their 'working flux'. In simple words, 'HOW HAVE THEY DONE IT?'

Now I've stopped reading the books of all programming languages and related technologies I was reading. Now is the time for open my 'client agenda' and make some calls (messenger, mail, phone...) and have some conversations with the staff of Sakai community (Jacques Raynauld and cia). I have until 21th July to get all information I can.

I've recived a good amount of information in my mail/MSN conversations. Jacques sent me Powerpoints and PDFs explaining what is OpenSyllabus, its objectives and its technology. Nevertheless I want to extract some points which try to refer as little as possible to technological part:

  • The syllabi around all universities have a common structure. However, information in a Syllabi can be redundant. What solution can we use? Osyl uses XML files for achieve that, XML files that have a structure that Sakai can represent. I wonder if a database could be used in the same way XML is used...

    So, XML exchange is used to represent data. Does it mean that in the local machine, a little copy of Sakai is stored to get asynchrony?

  • I got an account for testing the OpenSyllabus they have implemented into Sakai. QUÉ GUAY! (Parezco un anuncio de juguetes...). Also I got the source code of Sakai (omg, 400MB file!!!!)
  • The architecture is something like this:

  • In Moodle, when you build a course, you have manually to add all resources that can be needed (wikis, blogs, exercises...). In OpenSyllabus, through the Syllabi defined from one subject (for example, ES2), meanwhile the course is advancing in date, wikis, exercises, lessons and all required data is automatically published (well, it's what I understand). I believe that Sakai does that in that XML file and with a good code.

Maybe there are more points that I've eluded, I will think of them if I have the chance.

Also I am now trying to get running OpenSyllabus in my machine through Eclipse. However I have some problems with GWT Libraries. I sent Claude Coulombe, one of the Sakai 'masters', a mail asking for some help (yes, I know what you think, but after talking, you must know that I have tried to do all I was in my hands and I can't make it working).

Read More 0 comments | Posted by Davigetto | edit post

OpenSyllabus and the path to Moodlemoot

Well, in these days, I've been very busied trying to understand and manage a tool for creating syllabi, called "OpenSyllabus". Jacques is one of the managers of this project. I told with him to know what is OpenSyllabus.

After that appointment, my task will be embed this tool into Moodle, and make a lecture and a demonstration in Moodlemoot event. For that, now I'm reading some books of:

  • PHP
  • AJAX
  • Javascript
  • HTML/CSS/XHTML
  • XML

I have lot of work for now...

Read More 1 Comment | Posted by Davigetto | edit post

My PROP project: Restaurant

Well, I've uploaded my PROP project. Compilation an execution instructions are included in the tar.gz. The program is written in Java, so it works in all OS platforms.

Enjoy playing with it :D: Restaurant Project

Read More 0 comments | Posted by Davigetto | edit post

My experience among Java, C, C++ and PHP: How to learn a language?

Learning a programming language is easier than it seems. But if you claim to learn any language without spending lot of time, you need a good scheduling and a little organization.

It's logical, a building can't start from the roof: We need a solid base where we can begin to build a house; However, the methods I learnt from my University 3 years ago were not the best method to begin.

I begin learning Java, a full Object Oriented programming language. Omg, that was horrible for me! OO languages are great, fantastic, but are horribly for beginners, especially if you've never programmed before. In OO, there are lots of concepts that at first, they may be "innocuous" (Inheritance, Polymorph, Encapsulation...).

When I began, teacher spoke to us about unknown words: class??? method??? (I understood the word method like 'methodology', not 'function'!), and bad explanations about that... I was really disappointed and I lose my heart.

  • If you really like programming, and you want to do great things, be patient, keep going, the world was not made in seven days!
  • If you are a really beginner, please, don't start with a full oriented programming language like Java. Begin with something simpler, like C or PHP, where you don't need to apply the object oriented concepts (reserve memory space with news, pointers, class, attributes... more complex concepts for a beginner).
  • Read! Read! Read! Be used to read! For your mother, read! For you, read lots of manuals and tutorials until you understand the concepts! You can find them around de WWW!

All programming languages have little examples for testing. The most popular and simplest example in all programming languages is "Hello World" (or "Goodbye, cruel World" xD). This example will give you a simple and basic concept about how the language works.

  • Practice, practice a lot, it's the most effective way to learn a programming language!

Doing this, you will get some notions about language syntax, but it's pretty harder to be a good programmer. Making programs requires lot of logic, a heavy and solid mental structure (where I must put a while? Where I must put a condition?). For me, acquiring this mentality required more than 1 year (omg! you could say). Well, be a good programmer requires a lot of time, a lot of reading and a lot of acknowledge (practice, too) for acquire this mentality. But there are strategies to accomplish this.

Programs can be crazy for you: you open a program, and usually, you will ask yourself: How has this program been made? You must divide the problem in more little parts: Which operations are hidden? Which data must be shown? Which parts is this part of the program composed? Here we enter in a basic and, maybe, the most important word in programming world:

ABSTRACTION

Abstraction, in simple words, means "Divide a problem in less difficult problems that you can solve easily".

EDIT 20:34

Read tutorials and manuals about how to be a great programmer (It's easy, the only requirement is motivation).

My counsels:

  1. Begin programming with a language like PHP or C (in his single form, without touching OO).
  2. After that, try to do any interesting program, or be practiced.
  3. After that, try an object orientate language, like C++ or Java. Learn the meaning of inheritance, polymorph, software changeability... You can find lots of manuals about these languages, but if you want to understand the benefits from Object Oriented languages (I can't live without them) read Software Engineering books, and understand the design patterns.

In the future, I will enter harder with this theme through my project (probably), but I love Software Engineering and sure I will write lots of articles about this world.

Read More 1 Comment | Posted by Davigetto | edit post

HTML and CSS: a really useful tools

Well, as I said previously, I need to learn for Moodle Project some web design languages. 2 of them are HTML and CSS. I am reading a book called "HTML, XHTML and CSS Bible" (extremely recommended reading it if you're interested in learning about this).

I've discovered some interesting things:

  • Learning these languages does not require lot of time. I've learned the basis and I could practice the acknowledge I've acquired in no more than 2 days.
  • I deduce the most part of HTML tags are equals (except for, maybe, html, head and body tags), the only difference among them is that they have been built with the language in with different styles (Please, anyone correct me if I've made any enormous mistake and I'm wrong).
  • Making your webpages pretty is easy if you use CSS. You can create new tags for HTML using CSS declaring them with an style, or the existing tags (body, ul, table... for numbering something else) you can define for them new styles and have a new look&feel for them in your webpage (you can use also in CSS inheritance, as Java!).

I will follow reading this book. You can download it easily from emule. I'm also reading a book called "PHP5 and MYSQL Bible", from the same Editorial; Really good book, I will talk soon about PHP, when I finish reading it and I learn enough PHP.

Ohhh, I was at point to forget it, I am writing this post entirely in HTML language, not using the editor as I made :D

Read More 0 comments | Posted by Davigetto | edit post

Some screens of my ArchLinux with KDEmod

I put there some screenshots I have made in ArchLinux with KDEmod, for people feels curiosity about this distribution and how is his look&feel. Enjoy them, I will make some explanations in every screenshot:

Here we have my Desktop clear. From top left corner to top right corner:

  • Kmenu, Home, Show Desktop, an applet for docking apps for fast accessing, Desktop switcher, Taskbar, a CPU/Memory/Swap monitor, and opened apps, clock and close session/shutdown button. Preety, right? :D

Also we can see the links in the desktop. Don't you like the icon Style? :D


Here, the same Desktop with Konqueror opened and Yakuake dropped down. Yakuake is a very beautiful Console for me, and look at konqueror: windows colors fit with background without any problems, and the icon theme Tango is the most beautiful icon theme I've ever seen.





Well, this is my Desktop, and also, the default theme of ArchLinux's KDEmod. Try it!!! You will not be disappointed with him!

I hope you'll try it and you will email me saying you've successfully installed it :D

Read More 3 comments | Posted by Davigetto | edit post

Building a Moodle module

Today I'm reading how I can build a Moodle module in a Wiki Page of Moodle. Along all day, I will edit this post with some comments and conclusions about what I have read.

Edit at 12:13

This morning I have been preparing the environment for begin to develop Moodle as soon as possible.

My favorite IDE for programming is eclipse (well, I now it seems a Switzerland knife xD, but it's very useful and runs perfectly on my Arch and it is easily pluggable), so I was looking about how I can prepare a web environment in eclipse.

Looking for on the Moodle Wiki I have found a concrete page explains perfectly what I have to do to work with eclipse for developing Moodle: Wiki page on Moodle site for Eclipse.

Now, following the previous instructions, my Eclipse is now ready to use (it was a quite hard but finally I have got it).

Also, for this afternoon, I have downloaded a template for programming modules for Moodle. This is the link I have followed to read about module development and download the module template: Link.

Read More 0 comments | Posted by Davigetto | edit post

Señores de RENFE: Han perdido 1 cliente de AVE

Cada dos por tres, tengo que ir a Madrid (por asuntos que no vienen al cuento). Como joven y estudiante que soy, no trabajo, no tengo ingresos y no puedo permitirme grandes lujos por ello.

Antes ir a Madrid, con Altaria, tardaba 4-5 horas, al precio de 55 € con tarifa web (un 60% de descuento respecto al precio original). Iba a la página web de RENFE, realizaba allí la compra, me molestaba en buscar la tarifa web puesto que no ponían visiblemente qué tarifas ni ofertas habían para un tren concreto (porque el que algo quiere algo le cuesta), y yo, sin mucha dificultad, obtenía mi billete tarifa web al precio antes mencionado. Hasta aquí guay, yo era feliz.

Ahora, con la entrada del AVE y el cambio de página web, me resulta imposible poder viajar a Madrid como joven:

  • Ahora en la página web muestran visiblemente, para todos los trenes, qué ofertas son las que quedan (Estrella, Web...), con lo cual la gente que no deseaba esforzarse a buscar la oferta ahora encuentra tarifa web con muchísima facilidad, y vuelan, y cuando quieres darte cuenta, no tienes tarifa web en las fechas que a ti te gustaría.

  • Los precios... SE HAN DUPLICADO! Un viaje en Altaria me costaba 55€ con 60% de descuento y 4 horas de viaje. En AVE, 3.5 horas de viaje hasta Madrid (algunos 2.5 pero pocos), con 60% de descuento de la tarifa web (si es que tienes muchísima suerte de haberla encontrado por lo antes mencionado), 96€ ir y volver de Madrid!!!!!!!! Ustedes, despiadados señores de RENFE, se piensan que somos tontos? Creen que a mi, media hora de mi vida en tren cuesta 96-55 = 41€??? Y eso con tarifa web!! Porque sin ella, la diferencia absoluta se dispara. Perdonen que se lo diga con estas formas, pero ustedes se pinchan.

Siempre decían: “Ohhh el AVE, es el futuro!!”, qué prisas por tener AVE ehhh? Cuando pensaba en AVE, creía que iban a mantener algunos Altarias, o almenos el tren Estrella hacia Madrid, que seria lo más lógico y lo mejor para los jóvenes. Ahora, la única forma de poder viajar en tren hasta Madrid es con AVE, ya no hay ni Altarias/Alvias ni Estrella. Tienes que pagar un ojo de la cara por el AVE.

Cuando muestran fotos del AVE, en las noticias ponen reportajes del AVE, etc... Siempre, lo único que se ven sentados como clientes son tipos trajeados con corbatas... EJECUTIVOS!!! Ustedes se piensan que nosotros tenemos los sueldazos de esa gente? Porque me temo que a un chaval como yo de 20 años y estudiante no lo habrán todavía fotografiado en el AVE a menos que le paguen el viaje sus papis.

Así pues, me veo obligado a tener que renunciar a ustedes y sus servicios de Larga Distancia y a tomar otras alternativas como el bus. Son 8 horas de viaje hasta Madrid (no las 2 y media del AVE ni las 4-5 del Alvia), pero cuestan 48€, y eso me lo puedo permitir. No comprendo porque han tenido que quitar de forma tan drástica esos trenes que en un pasado me iban tan bien y abusar de su propio monopolio.

Espero que con este escrito mi profunda desolación, decepción y descontento con ustedes haya quedado patente, y haberles dejado totalmente claro que han perdido a un cliente potencial de AVE.

Atentamente,

David, usuario de RENFE como miles de españoles

Read More 3 comments | Posted by Davigetto | edit post

The birth of a Project: My PFC

I am grateful to announce I begin the Final Career Project Today, 2th Jun 2008. I've gone to meet my project's Teacher, Marc Alier, for agree the last things, offer to me the way I want to follow for my project, and getting an idea about what I must do in this project. I chose to be a Moodle developer. He also offered me to participate in mobile phone projects. Moodle is a great e-learning and free software project. The whole free software world is really interesting. An opportunity like this is hardly ever offered to all people. Maybe the first part of the project is the easiest. I have the whole month of Jun to learn some required acknowledge:
  1. I have to look in the Moodle wiki and learn how I can develop a module for Moodle and integrate it to the moodle platform (I have done that before in a PHP-Nuke, I hope it will not be harder...)
  2. Having a blog to use it as a logbook to write my experiences and changes. I will use this blog for that task.
  3. Installing Firebug, a Mozilla Firefox extension used for debugging web.
  4. Managing Subversion (when I did ADA in the university, Analysis and Design of Algorithms, I learned to use it).
  5. And the most huge part, learning the development web languages: PHP, HTML, Javascript, CSS, XHTML and XML. For a programmer like me, it would not be a really difficult task, but it requires some time, especially learning and understanding their syntax.
Jordi Piguillem, and official Moodle developer, will be "my master". I will begin soon to learn all this tasks. I have installed Firebug and next step will be reading the moodle Wiki (I have moodle installed in my machine as localhost). Ohhh, I also asked for making the whole project (memory and documentation in English). I can :D, a great opportunity to learn a lot. It promises to be a really exciting project. Let's see it!
Read More 0 comments | Posted by Davigetto | edit post

The Cathedral and the Bazaar

I put here an e-book with GNU rights, called "The Cathedral and the Bazaar". Recommended reading for all this people that love computer world and want to learn more about GNU world. I am reading it now, it seems interesting :)
The Cathedral and the Bazaar - Upload a doc
Read this doc on Scribd: The Cathedral and the Bazaar
Read More 2 comments | Posted by Davigetto | edit post

Leading, Emotional Intelligence and Team Management

Here I put the powerpoint our GSI group did when we did the presentation about Leading, Emotional Intelligence and Team management.

I hope it will be useful to somebody.

SlideShare | View | Upload your own
Read More 0 comments | Posted by Davigetto | edit post
Newer Posts Older Posts Home

The FIBer Talks

  • About
      I'm using this blog as logbook for my PFC
  • facebook

    Facebook

    Who is Davigetto?

    My photo
    Davigetto
    View my complete profile

    Blog Archive

    • ►  2009 (7)
      • ►  May (1)
      • ►  March (3)
      • ►  February (2)
      • ►  January (1)
    • ▼  2008 (37)
      • ▼  December (1)
        • HOWTO: Be a good FPS player
      • ►  October (6)
        • Extreme programming methodology: theory and experi...
        • Part of the migration finished - Documentation
        • Candidature for HDC
        • Bibliography
        • My task: The Migration
        • Training: repair an nwiki bug
      • ►  September (7)
        • Sequence diagram about OpenSyllabus integration in...
        • Class diagram about OpenSyllabus integration in Mo...
        • The importance of UML in the software programming ...
        • Blocks, modules and discovers
        • 15th September: Meeting with Marc Alier: the IDea
        • Next round: The XSLT part
        • Next round: Implementing the OpenSyllabus integrat...
      • ►  August (2)
        • The 3000 most important words of English - v1.1
        • The 3000 most important words of English
      • ►  July (7)
        • The right way of my project
        • Es la memoria nuestro más preciado talento?
        • Realmente uno puede ser feliz y estar autorrealiza...
        • FICS and Battle for Wesnoth
        • Mahara e-Portfolio and OpenSyllabus: Fuuuusion-ha?!
        • A summary of my Osyl crusade
        • OpenSyllabus and the path to Moodlemoot
      • ►  June (7)
        • My PROP project: Restaurant
        • My experience among Java, C, C++ and PHP: How to l...
        • HTML and CSS: a really useful tools
        • Some screens of my ArchLinux with KDEmod
        • Building a Moodle module
        • Señores de RENFE: Han perdido 1 cliente de AVE
        • The birth of a Project: My PFC
      • ►  May (4)
        • The Cathedral and the Bazaar
        • Leading, Emotional Intelligence and Team Management
      • ►  February (3)
    • ►  2007 (12)
      • ►  December (1)
      • ►  September (1)
      • ►  August (2)
      • ►  July (2)
      • ►  June (3)
      • ►  March (3)

    Labels

    • Computer (8)
    • database (1)
    • Diary Life (1)
    • General (6)
    • Information Systems (1)
    • Me quejo (2)
    • Miscelanea (1)
    • moodle (4)
    • opensyllabus (1)
    • Personal (7)
    • PFC (26)
    • php (2)
    • Poetry (6)
    • restore (1)
    • Testing (1)
    • Web (1)
    • xml (1)
    • xslt (2)
    • zip (1)

    Last Comments

    Loading...




    • Home
    • Posts RSS
    • Comments RSS
    • PFC

    © Copyright El FIBer Habla. All rights reserved.

    Back to Top