MySpace is a huge piece of crap
Dear MySpace,
You suck. A lot. Why? Well...
- There's no way that many hot chicks want to be anybody's friend.
- There's no way that many hot chicks want to be anybody's friend the second they happen to log on or edit anything in their profile.
- To customize your profile you shouldn't have to reverse engineer your crappy default templates.
- You are owned by Fox.
Love,
Michael
I don't even know Tom, but he's my "friend". Kind of strange, isn't it?
Testing Habits Are Your Friend
As I've gone farther down the road I've learned the value of testing. My first introduction to unit testing was through JUnit in a Java project I worked on last year. Now, there has been a recent push for testing in PHP web apps that used to be homegrown in the worst ways and need to extend past the typical "what, it works, shutup" approach to PHP testing.
Not testing is not healthy. Sooner or later you'll be wrong, which will make you a huge jackass. And nobody likes being that guy. I know I have been on occasion. It sucks, and it can make people second guess you, which sucks even more down the road.
So cover your ass by making a paradigm shift when it comes to your development habits and approach:
- Create tests that you know would work if you wrote your scripts right -- as best you can, don't go for 100% coverage, just get something up there to mimic the typical "yeah okay it works at least, but not quite" once-overs you do
- Assume what you've written is wrong
- Run your tests, and see if they work
I've been convinced that this approach to programming is much healthier (thanks Shaver) because it forces people to think before writing the bulk of their code -- possibly alleviating problems before they happen. Duh, right? Everybody knows that, right? Well, not everybody does it, and there's a big difference.
I think that ideally, everybody would create tests for just about everything possible, but I do have some reservations when it comes to that.
For one, sometimes you just don't have time. This is a terrible excuse, and I guess it depends somewhat on the scope and sensitivity of your project. But, if your project is planned right you should have the time and resources to get in a fair amount of code coverage without jeopardizing your timeline. And, arguably, if you're already used to a test-oriented approach to development things might actually be faster.
Another thing I've tried to identify is when I'm overdoing it (this is more of a fear). So, okay, you want to test your code as much as you can, but there's a line I wouldn't want to cross. It's the line between having a complete and working end product and having an incomplete product with complete and exhaustive tests. In that case, I'd vote to let some of the testing slide, but not all the way, in favor of a more complete product.
The long tail of development can pick up the slack for more exhaustive tests and bug fixes that you ideally would only fix once -- write a test for the bug, fix the bug, done. Most of it would probably be doable during alpha or beta releases -- it's what they are for. I'd argue that it's also more productive during that time because you might have a better knowledge of your app and be in a better position to spot unforeseen problems and write proper tests.
I'll be honest; for me it's been a bit of a learning experience. A welcome one, for sure, but frustrating at times because you're always going to run into "oh shit, my bad" situations when you're trying to change mindsets and unlearn bad habits. In PHP, I think this is probably a bigger issue than in other languages because it already lacks a bit of structure by nature. There's also the programmer laziness hurdle to overcome. It's a big one.
There are some decent PHP testing tools out there that sometimes gather dust -- especially in PHP. But, if PHP is going to break more into enterprise development, I think they will gain in popularity. Here are some PHP testing links for you:
- PHPUnit
- Simple Test
- Apache::Test - also see Chris Shiflett's blog and his presentation on PHP testing
So -- PHP developers, it's time to stop being lazy and take a serious look at this stuff. If you get an irritated feeling because I said that, it's because you're wrong and you've just gotten used to being wrong.
Comfortable and easy doesn't get you anywhere in the long run.
The Add-ons Landscape
We've been a bit quiet lately because we've been cooking up something new. Shortly after April's re-release of the addons.mozilla.org (AMO) front-end, Mike Shaver came on board. He's given the project some direction and has been mixing things up a bit with new ideas. He's helped us focus and move forward on:
- Drafting policies
- Gathering more complete requirements for future product releases
- Making better performance decisions
- Choosing correct data structures
- Taking advantage of web frameworks and new technology
We've been able to work on all this and still manage to keep things running thanks to community volunteer efforts from people like Mel Reyes, Olive, Nitallica, Alan Starr, Wolf, Pontus Freyhult, Chris Blore, Lupine, Robert Marshall, Giorgio Maone, Mike Kroger, Ed Hume, Daniel Steinbrook, Sethnakht, and Cameron. They have working hard to review add-ons, work with developers, help users, report bugs and submit patches. We all owe them a pat on the back.
Another factor has been the addition of badly needed resources:
- The attention and focus of Shaver, who genuinely cares about our project
- Additional staff to help organize and speed up development -- myself, Wil Clouser (clouserw), Andrei (sancus)
- New developers and volunteers stepping up, like Cameron and fligtar (Justin Scott)
- The ongoing support and direction of Mike Schroepfer (schrep)
With the next major release of Firefox and Thunderbird around the corner, one thing was certain for addons.mozilla.org -- change. Lots and lots of yummy change.
Shaver coined "remora", the shiny-sexy codename of AMO v3. We've set up a public wiki where we've gathered and cleaned up most of your requirements, and posted a project schedule. We even had one of our volunteers create an image for us (it's giving birth to add-ons!):

Our goals are clear:
- Make finding and installing add-ons easier
- Support localization of site pages and data
- Reduce and simplify design and layout with a fresh new look
- Take full advantage of our new hardware resources
- Provide better support through forums and threaded discussions
- Develop with a test-oriented mindset for a more robust and mature application
- Revitalize and streamline our review process to ensure the quality of add-ons
All this should add up to a common goal: extend Mozilla products to make the web better. Period.
So things are looking up! Please read the wiki and join us in IRC if you have ideas or want to participate in the project:
- Remora Wiki Page
- IRC: #amo#irc.mozilla.org
We are looking for help with l10n support. If you are a translator, please find us in IRC! Thanks.
