Make your db readable plz

Lately, I’ve been spending quite a bit of time with Elgg. When it comes to open source it is the best choice for running your own open source based social network. Elgg comes with lots of functionality out of the box. The way elgg allows you to extend functionality is through plugins. You may have heard that OOP is design good, but OOP design doesn’t always translate to good db design. I’d rather have dozens of db tables compared to just a few tables over normalized. To find out a bit of information you end up having to do lots of queries. Having a simple db design also lowers the barrier to new developers trying to learn what the heck your program does in the db. By letting your open source program have lots of tables, you can isolate data and make it easy to export or import data for just a few plugins or modules. OSS developers please make your db readable instead of trying to over normalize it. Disk space is cheap, and simple db design is worth it!

Clearning Dalvik’s cache

If you are running into problems after trying out a new version of cyanogenmod or things are a bit laggy you should try deleting dalvik’s cache: /data/dalvik-cache/*.

adb remount
adb shell rm -rf /data/dalvik-cache/*

After you remove the cache reboot and your phone should feel a bit faster. This helped fix my lag problems with 4.1.99. The adb command used above is part of the tools included in the android sdk.

Reflecting on gsoc program

Last week, MartinL tested the timeline course format and he found a couple of bugs. I got those bugs fixed, and submitted a task to the moodle tracker to get the test site updated. As soon as the test site is updated, I will make a call for new testers. Earlier in the week, I added my course format to the list of moodle plugins. I have also been working on the porting my latest changes to the moodle2.0 version of the course format. The core of moodle 2.0 is actively being worked on, and these causes me to run into bugs or deprecated calls in the core code of moodle. That is problematic when I am working on my course format. I spend time looking at  bugs and they end up being from core. Every time I do a git pull to get new changes, some deprecated calls or bugs are fixed, but I run into new ones.

In this blog post, I wanted to reflect on this summer of code. I had a blast not just writing code, but interacting with the moodle community. I learned a lot from my mentor Martin L. Helen the community manager of Moodle was always there providing support to gsoc students and checking on us. Anthony Borrow, Jordan and Nicolas provided lots of help during my coding process. I wouldn’t have been able to find as many bugs to squash without the help of the Moodle community my course format. My plan is to keep working on my course format, and make sure that it works and it is as bug free as possible before Moodle 2.0 is finished.

Changing gmail account associated to android phone without factory reset

A couple of days ago, while I was in irc I read a good tip that James_B found. You can change the gmail account that the google apps use without having to do a factory reset on the phone. Just go to: Settings>apps>manage apps and clear the data for “google apps”. This works on Android 1.5 .

Actual update on last week’s work

Since I forgot to click on ‘publish’ last week (I got two blog posts today), here’s my actual moodle update for last week:
* Updated code in cvs repo with latest 1.9.x version of course format
* I found a typo in the 1.9.x version of the course format (wasn’t causing a bug)
* Read documentation on how to migrate code to Moodle 2.0
* Created a new branch in git to work on Moodle 2.0 version of the course format
* The timeline course format is working on Moodle 2.0 :)
** I approached this version of the course format by using the topics course format and modifying it
** Works: adding a new section, show all/recent button works, pagination, move sections up/down without js, and displaying hints

My todo items are:
* Check up on moving sections up/down using javascript (I haven’t looked at this yet)
* Test the timeline course format in moodle 2.0 more
* Get a test site up so that community memebers can provide feedback.

GSOC Pencils down is nearing

Last week I spent reading and doing some research on Moodle 2.0. I also fixed a couple of minor usability bugs in the course format. Nothing too big. I tested the course format some more. After reading more in the forums, it looks like I should start to focus on porting the timeline course format to Moodle 2.0. The main outstanding issue or weight on the back of my mind for moodle 1.9.5 is javascript performance. This only affects Internet explorer and Gecko based browsers. I have looked at this javascript issue. The main problem is DOM manipulation. It is hard to modify this because it makes sure that all course formats that are ajax capable have a similar set of buttons in the page. I have tried using innerHTML to add the needed elements, but I ended up having to rely on objects. This proved to be a good exercise, but didn’t provide me with better results.

I mostly have done the gsoc work in a git repository located at: http://repo.or.cz/w/moodle-blog-course-format.git . I love working with git, but people cannot checkout just the timeline course format out of the repo. I also updated last week the cvs copy of my course format so that it contains the updates in the git repo. Thanks to Anthony and Jordan I have access to a cvs directory in contrib where I keep another copy of the course format: http://cvs.moodle.org/contrib/plugins/course/format/timeline/ .

From the activity that I see in the forums and in code development, it seems that it is a good time for me to start moving my focus to Moodle 2.0. I don’t expect porting the course format to be a lot of work. By starting to work in the course format early on, I hope to provide feedback and maybe port some of the features of the timeline course format into other course formats. This would hopefully lead to longer courses and shine some light on performance.

Edit: I guess I forgot to click the published button for this post (bad floppy )

Timeline Course Format Update

Last week on the timeline course format saga:
* I kept testing the course format. I haven’t run into any new bugs
* Updated the cvs repo
* Fixed a small performance bug that affected the course format when only one section was being displayed
* Looked in more detail for ways to fix the performance bottlenecks in the javascript code when we have a course format that is displaying a long course with lots of activities and resources. Dom manipulation is what is slowing down the js code.
* Gathered more feedback from users in the forums. The main comments
are:
** The ’show all sections’ should become a ‘hide all’ or ‘display 10
sections’ when the current user is viewing all the sections.
** Automatically insert a date label when a new course section is
added.

My next steps will probably be:
* Keep testing, and trying to engage more users.
* Look at what is the status of Moodle 2.0. I have learned enough
about course formats, that I’d like to provide some feedback on what
things can be improved in performance rendering as well as ajax.
* Look for some real world examples of long courses.

gsoc update

Last week was a good week. Woot, I passed the midterm examinations of gsoc. I got some coding work done. Thanks to arborrow and Jordan from moodle, I was able to get a demo setup for the timeline course and created a course so that community members could provide usability feedback as well as help find bugs. Users in the community were able to easily find a bug that I missed during my testing. The bug was causing a loop to never terminate :( (bad floppy). It took a while to figure out this bug (I didn’t have a copy of the db while I was trying to find the bug). I also fixed a bug where the first page would appear blank (empty) if the user had chosen to view a single section in a course. I also spent some time testing the course format and I added a simple README file.Thanks to nicolasconnault, I was able to get a copy of the mysqldump of the demo site that had the bug. I tested my fix and ensure that it did in fact fixed the bug in the demo site. My next steps will be to update the demo site. Gather feedback from community users, and start looking at performance bootlenecks.

Moodle Updates

Last week was productive. I tested my js changes some more, and they looked good. Later on I found a couple of bugs and fixed them. Unfortunately that shine the light on more bugs :( . I am still working on them. Javascript sorting of sections is not as simple as it should be. I also talked to Helen (community manager) about getting the timeline course format in a moodle site so that it can be used as demo to get feedback from the users community.

Helen introduced me to Anthony Borrow (CONTRIB Coordinator) so that I could talk to him about my course format. He suggested that a new tracker issue should be created (the old tracker issue had various mockups, comments and it was a bit confusing). He created a new tracker issue and moved the subtasks around. He created an area in contrib where I can place my code and after I requested cvs access it was granted to me in the directory where the timeline course format lives.

I asked in the dev forum if anyone knew who to talk to about getting the timeline course format in a demo site so that community users can test it out. Anthony suggested that I create a ticket MDLSITE-773 , and request that a new test moodle site be created. He made a good point in that putting the timeline course format in the demo.moodle.org site would be confusing since is contrib code, and it might be confusing to new users.

Javascript debugging, weird yoga poses, and more

Last week, summer classes started at Oregon State University. I usually don’t take classes during the summer. I like to take time off from school, homework and just re-charge. Since I’m an international student at Oregon State University, in order for me to participate in gsoc, I have to take a minimum of 3 credits during the summer. Since I am a graduate student, the only classes that I can take that count towards my degree are graduate level classes. Unfortunately, during the summer no graduate level classes are offered. I am taking right now a body sculpting class, and a yoga class. I have been wanting to take yoga for quite a while. I’m a workaholic person who is busy all the time either coding, doing hw/study or trying to learn more about programming.

Yoga has been quite interesting. It is taking me a little time to get used to doing all the various poses, but it has been quite relaxing. I have signed up to take more yoga next week. Hopefully it will help me relax a lot more during my crazy school.

Last week, I also work on adding more hints and instructions for the teacher using the timeline course format that I’m working on for gsoc and moodle. I also was working on a bug where sections couldn’t be sorted correctly in the timeline course format. Getting the sorting and moving sections around in the backend was not very troublesome. Getting things to sort and look correctly in the frontend was the tricky part. I spent a lot of time n that. I feel like I’m now more intimate with that js code.

The course format is getting a lot closer to the point were we can set it up in a demo instance of moodle. This would be really helpful since we can gather lots of feedback and testing from the end users. I will also try and see if I can install a demo instance of moodle in my university webspace that all students get. I will also be testing some of the js fixes with other course formats to make sure I’m not breaking functionality.