The Joomla! Community Portal ™

Community Blog

Tue

24

Jun

2008

Testing User Interface Code
Written by Alan Langford   
Tuesday, 24 June 2008 23:21

Recently Ross Crawford asked a question on the developer list about testing User Interface code. Little did I know that I'd be putting my response to him into action the very next day.

Today I was adding a module to one of my sites, and I decided that the module list should be alphabetical by column, rather than by row as it is now. A simple change, I thought, why not take a few minutes to implement it.

Naturally my first run at this had bugs. In this case, it was an infinite loop. An infinite loop with infinite output that gave my Firebug-enabled Firefox a really hard time. A restart the browser with 20+ open tabs hard time. Not fun.

There is a simple fix for this, I thought... unit tests! After all I'm going to wind up writing tests for it before I propose it as a change, because being able to prove that a change works is (or should be) one of the best ways to get a change approved.

A couple of glitches with mocking JText and trying to get the Windows CLI version of PHP to not dump captured output to the console, and I was ready to write some tests. A short time later and the time for a revise/test cycle was down to a minute or so, eliminating the painful need to kill and restart Firefox. Shortly thereafter the bug was fixed and everyting was looking good.

Then I decided to validate the HTML with Tidy. It failed pretty badly. It seems a misplaced /> was causing a span element to become unbalanced and an input element to be malformed. I fixed this up, eliminated all of the other warnings that I could, and created a patch.

That's the power of testing. I found previously existing but undetected bugs, significantly reduced my cycle testing times, and now the project has a tool that gives every other developer the same advantage with no additional investment in time.

See the documentation wiki for a discussion of the specifics involved in this type of test.

 

Mon

23

Jun

2008

Making the Most of Your Posts
Written by Ken Crowder   
Monday, 23 June 2008 02:55

Did you know that Joomla! has one of the best forums of any Open Source project? I know, I am biased, but it is true. Occasionally, someone complains that the "support" stinks and that no one is answering their question. There are many men and women who devote many hours of their time to helping other Joomla! members. Some are moderators and others are community members who just want to give something back.

Let's take a look at some things that should help you get a better response rate.

Eric Steven Raymond has a great article called "How To Ask Questions The Smart Way". in which he outlines ways of asking question in a way that will help others help you. I will be pulling the general ideas of his article, however you should feel free to read the whole article is you wish.

 

Before You Post

  • Search the Forum – This is often times the fastest way to find the answer you need. 95% of the questions have been asked and answered before.
  • Stickies – Read the Stickies. They are there for a reason.
  • Documents SiteJoomla! Official Documentation Wiki
  • Dig Around – It is far more rewarding to spend a little time looking in the Administrator for a feature than asking someone else. I find that doing this opens your eyes up to other features that you were unaware of as well.

 

When You Post

  • Post in the Appropriate Forum - Which Forum Should You Post In?
  • Do Not Cross-Post – By Cross Posting (posting the same question twice), you only hurt yourself. Typically, a moderator, who may have had time to answer your question, is not spending that time deleting your posts in another forum. We moderators waste a lot of time cleaning up cross-posts which takes away from time that we could be supporting you and your fellow community members.
  • Ask on the Forum – DO NOT PM PEOPLE FOR SUPPORT UNLESS ASKED TO DO SO! … enough said.
  • First Impressions Count – Do not use a subject of "HELP!" or "URGENT HELP NEEDED". Use a good descriptive subject that explains what type of question is inside.
  • The Language Barrier – Joomla! is a worldwide project. People speak many languages and not everyone's first language is English. If English is not your first language and someone is trying to read your post that does not make sense, you are likely not going to get a response from them. Try rewording a sentence to help reinforce what you were trying to say.
  • Support your question details – Statements like, "It does not work" help no one. Try to give steps to replicate the issue you are having. Or if have tried a solution from another thread and it did not work, please note that. Giving the reader a clear understanding of your issue is key to getting a response. The point is this, if you kind of, sort of ask your question, you can kind of, sort of expect to get an answer.

 

After You Post

  • Thank you! – Do not forget to thank the community member(s) that help you come to a solution. We are all volunteers, a little pat on the back is always good.

 

Forum Rules

  • Yes, we have Rules! Please read them. By following the rules, the moderators are able to spend more time supporting and not cleaning up.

 

Other Thoughts

  • When I first started using Mambo, then Joomla!, I came up with a pretty good system that served me well. My theory was that for every question I asked, I was going to answer two questions. I did just that. In the beginning, I was asking and answering a lot of questions, but it paid off. I learned A LOT by interacting in this way. If every community member did this, we would not have people claiming that we have bad support.
  • For your viewing pleasure: Posting and You

 

 

Sat

21

Jun

2008

New Unit Testing Status Page Available
Written by Alan Langford   
Saturday, 21 June 2008 21:50

One of the hold ups for getting some momentum in the unit test process has been not quite knowing where to start. Part of the problem is that there has never been a easy place to see what needs to be done.

This has now been addressed with the Unit Testing Status page on the documentation wiki.

Manual attempts to get this page started haven't been all to successful, to today I wrote a program that creates it automatically. It identifies all the non-legacy classes in the "Joomla!" trunk, matches them against classes in the unit test tree, and produces a report.

There are three tables in the report. The first lists all the classes in alphabetical order, along with the number of test files for that class and the source file for the class. The second lists the same information organized by directory. The last table lists tests that aren't class-based, and tests for classes that don't exist.

The next job is to get rid of the sea of red (classes with no tests) on this report. There's a lot to do, but at least now it's easier to pick a place to start.

 

Fri

20

Jun

2008

The best ingredients for a nice Pizza
Written by Wilco Jansen   
Friday, 20 June 2008 21:17

We're very close to the second Pizza, Bugs and Fun (PBF) event. As you might have noticed, we have extended the PBF event for a second weekend and now have participants from almost every continent. If you are able to join us at one of these venues, we would love to have you. If you can't come to a venue but you still want to help, you can just sign in from your location.

Joining in is fairly easy but only Bug Squad members have access and can manage the tracker. We might consider opening it up for the PBF event, but somehow we think that will become a major mess ;-) Like the first PBF event, we set up an easy way to join the PBF participants. When you arrive in the pizza shop, check into the Bazaar by doing these things:
  1. Sign on to the IRC channel (#joomlapbf on freenode) and introduce yourself to the others. Never used IRC? Learn more here and here.
  2. Join in the discussion and get to know everyone. If you have any questions, feel free to ask! At any point, if you have questions, this is where to ask!
  3. If you plan to help with testing bugs or creating patches, register on JoomlaCode so that you can add comments to the artifacts.
  4. You also need to register on the shared Google Document. When you want to get registered, please ask in IRC and the PBF team will contact you to get your e-mail(g-mail) account.
  5. If you plan to assist with documentation, register on docs.joomla.org so you update to Wiki.
Read more...
 

Thu

19

Jun

2008

Creating the Crust for your Pizza
Written by Jennifer Marriott   
Thursday, 19 June 2008 22:30

I am so excited about the Pizza, Bugs and Fun event that is coming up that I though I would share with everyone some info to help get themselves set up and ready to participate.  There are only two main ingredients that you need.  The first is a local server environment.  The second is an SVN client.  Don't think it is too big a slice to take on.  Dig in.

Local Server Environments

A local server environment is basically a web server that you run on your local computer. Lots of people test on live web servers, but you don't have to test on a live server to participate.

WAMP - (Windows, Apache, MySQL, PHP)
For general information on what WAMP is you can check out their Wikipedia entry: http://en.wikipedia.org/wiki/WAMP, and you can compare different WAMP software on Wikipedia also: http://en.wikipedia.org/wiki/Comparison_of_WAMPs
WampServer: http://www.wampserver.com/en/download.php
You can find FAQs and Installation help here: http://www.wampserver.com/en/

MAMP - (Macintosh, Apache, Mysql, PHP)

MAMP at Wikipedia: http://en.wikipedia.org/wiki/MAMP
MAMP by living-e AG: http://www.mamp.info/en/download.html
You can find FAQs and Installation help here: http://www.mamp.info/en/dl_info.html

XAMPP - (Multi OS, Apache, MySQL, PHP)
XAMPP Project: http://www.apachefriends.org/en/xampp.html
You can find FAQs and Installation help here: http://www.apachefriends.org/en/faq-xampp.html
XAMPP is available for Linux, Windows, OS X, and Solaris.

XAMPP is the one I use on both my Mac and Windows systems, but I also like WampServer on Windows.

SVN Clients

The next ingredient for excellent pizza is to have an SVN client. This will allow you to keep your testing Joomla! files up to date as changes happen.  It will also allow you to test patches easily. Wikipedia has an excellent page with information as to what SVN is and how it is used:http://en.wikipedia.org/wiki/Subversion_(software)

EasyEclipse is a good choice for Linux, OS X and Windows: http://www.easyeclipse.org/site/distributions/php.html.  Nur Aini Rakhmawati has an excellent video tutorial on using JoomlaCode SVN with EasyEclipse here: http://developer.joomla.org/gsoc2008/16-overall-project/99-joomlacode-svn-with-easyeclipse.html

Another Windows choice is TortiseSVN: http://tortoisesvn.tigris.org/  It is available for download here: http://tortoisesvn.net/downloads.  You can find support manuals and FAQs on their site.  Details on how to work with the JoomlaCode repository are located on the Developer site: http://developer.joomla.org/code.html

With these tools you will now have the foundation or "crust" for your pizza.  Have fun!

 


Page 131 of 135