Categories
main

7 Things You May (Or May Not) Know About Me

I got tagged. It happens, nothing to be worried about. I found enough excuses not to obey that I was able to delay this moment for almost 2 weeks. But now I feel pressed to go.

The rules

  1. Link to your original tagger(s) and list these rules in your post.
  2. Share seven facts about yourself in the post.
  3. Tag seven people at the end of your post by leaving their names and the links to their blogs.
  4. Let them know they’ve been tagged.

Seven things

1. I was a shrimp.

hawaii-shrimpI’m rather not a very spiritual guy and I have serious doubts regarding all religious concepts, but one thing is damn sure. I was a shrimp. I don’t know how, or why, but in previous life (or pre-previous) I had to be a shrimp.

Some people feel they can think like a cat. That they can easily switch their thinking and understand other sex. I have similar feeling about shrimps. I can think like a shrimp… of course it’s impossible for me to explain that to you because you cannot, so trust me. Shrimps are smart.

I feel some concept of emotional response whenever I see a shrimp, I find them uterly cute and innocent, I easily impersonate, I feel I understand how they spend their lives, I never, ever eat them and I tend to think of people who it them as being cruel. For safety and sanity reasons I have a simple rule of not eating anything that has amoung of “legs” different from 2 or 4 and in case of seafood I’m limiting my food to fishes.

It causes several issues while hanging out with my Mum who loves shrimps.

2. I used to have very long hair, was superskinny, dressed only black and played guitar in a power metal band

ironmaiden-ls02When I was thirteen I was absolutely sure I will be a heavy metal guitar star. I didn’t miss any Iron Maiden concert, had every Running Wild, Manowar, Rhapsody, Blind Guardian album and was suprt skinny. I don’t know how to explain that but I was the kind of a “too tall too skinny” kind of kid. I could not how someone could do sports and get a bit of muscles ever and what for.

Although I dress a bit differently now, I cut my hair and listen to different music most of the time, I still love to play heavy metal, and I definitely would prefer not to miss an oportunity to go for another Manowar concert or finally get to Blind Guardian one 🙂

3. I love irish/celtic folk culture, scandinavian mythology and good fantasy.

stonehange_origiI love to read Tolkien and polish fantasy author Andrzej Sapkowski (who’s first part of the sage just hit the shelves for english speaking readers, and the game The Witcher based on his world received really warm welcome being the first solid polish game for PC. Console version is in works).

And I really mean in. I read a lot of books, I try to watch all the fantasy related movies, when I was fourteen I chose a nickname that somehow stayed, I play celtic/irish folk on a guitar, I play feadóg, I can do a small talk in Sindarin – elvish language from Tolkien, I know how to handle a sword or use a bow (I’ve been in a brotherhood) and the only part that is missing is that I don’t ride horses. Once I lear this, I’m switching to being a knight.

4. I wrote a book when I was sixteen. And a dozen of poems.

They were a mixed bag of fantasy and drama. I’m really proud that exactly one year later I was able to recognize a pure example of teenager graphomania in my work. Well done, gandalf, you’re not an ego-maniac!

5. I’m a city boy.

If you ever watched my favorite series – Northern Exposure – you may remember challenges of a New York city boy in a small town in Alaska. I go through that all the time. I was grown in a world where the source of milk is a grocery store, not some wild animal. I received decent education, so I recognize a chicken from a pig, but you’d have to be there to understand my surprise when by the age of nineteen my friend explained me that nuts are growing on trees…

And don’t get me wrong, I was a scout. I know a lot about survival in the wooden environment. I can set up a tent, find wood in a forest (yup!), ignite a fire or shower in a river. Just don’t expect me to know all those little sneaky details about how exactly cow is different from its male equivalent and what are those different forms of farm creatures that runs around when your in a village. Or types of flower. Or trees. I recognize green ones and bald ones.

6. I train martial arts. UFC kind of stuff.

florian1So, please, avoid commenting the amusing coincidence of this with pact nr 2. I do train MMA in a pretty raw form. It all started when I was 18 and I spent literally 18 hours per day in front of the computer (rings a bell?). It caused me to start looking less skinny and it definitely wasn’t a favorable way of loosing your skinny status. The decision was to find “some sport” around my office and the nearest thing was Karate Kyokushin club. It was a fascinating experience, because the idea of hitting somebody in a face during recreation time wasn’t exactly what I was aiming for at the beginning, but you know… you’re getting used to it 😉

In fact, I became addicted and went for trainings aproximately 5 or 6 times per week with two or three hours of training per day for around 1,5 year. I did it all only to realize that the better I get the more constrains there are. Traditional martial arts are made of them – don’t do this, hitting like that is forbidden, you can’t block this way, clinch is forbidden, no choking… c’mon! Is it a fighting sport or a game?

6115-stpierreserraufc83So I started extending my scope of interests to Brasilian JuJitsu and boxing and finally met a guy who pointed out that there are training clubs where people fight without all those bounderies. And he didn’t have to repeat twice. Since then I’m doing MMA on all levels, I’m doing stand fight, ground fight, submision wrestling, bjj, I like thai-boxing, kick-boxing, boxing… everything. I’m an amateur, so I don’t get into “show me how good you are” kind of competitions, but I enjoy training and fighting, so if you want to spare, come to my club.

Oh, and because people are becoming confused at this point. To do MMA you don’t have to be a mindless meatmade tank. MMA requires different kind of intelligence (yes, there are many kinds, not only mathematical), reflex, speed and stamina, but gives you a lot of joy that is on the very opposite side of the universum from computer science and social science which makes it a perfect place to relax from former two.

I promise you that nobody from my club would ever mob anyone on the street. What’s interesting is that such kind of people are not used to hard and long training, technique, and they cannot survive in a friendly atmosphere of MMA clubs. So what they do instead is that they spend a lot of time on body building and then use quantity methods to attack in a bigger group. Don’t mix those two groups please 🙂

7. I used to play in youth theatre and was a journalist.

When I was 10 I joined a youth theatre and played there for 6 years. Majority of my interpersonal skills, emotional inteligence, auditorium management, role taking comes from that time. I also found that to be the most inspiring and motivating environment a child can find. I have a strong belief that being in such environment has a great impact on the maturity and ability to maintain child in yourself and self-reflection skills. I recommend parents considering sending their kids for such thing. It was amazing 6 years of my life that shaped a lot of me.

Then I led an air show for teenagers in Radio WaWa for three years and did some internship in polish TV as a journalist. Ultimately I spent a year leading a TV show about computer games when I was eighteen. Its name was “Gamebox”. This one gave me even more confidency at public speeches, but it confirmed that I have a huge problem to act in front of camera when there’s a scenario I have to follow. I so much prefer live dynamic performances.

8. I have ADHD. Twice

If you didn’t notice yet, I love to do things. Any things. And a lot of them. I love to play soccer, read books, fight MMA, dance irish, code, learn elvish languages, study sociology, swim, sail (oh yea, I’m sailing for 8 years now). Except of that, I’m inline skating, biking, playing RPG games, passionate about Mozilla project, I translate software, do work on volunteer communities motivation models, hack Linux (I’ve been using Gentoo for years) and does some basic gymnastics. People tend to tell me I have too much energy and it takes me a concious effort to synchronize with the energy level of the group I’m in. So if you recently spent some time on a small talk with me and it was calm and relaxed, please appreciate how much effort I had to put in this. Thanks! 🙂

Oh, and I write eight points when asked for seven. Don’t give me more coffee! My energy level is violating European Union standards.

Next people

I find it really hard to find people not tagget yet… so let me think about it a bit more 😉

Categories
main tech

KDE 4.2 released

kde42Just a short note. KDE team has released KDE 4.2 today. It’s their first release of KDE4 project they consider ready for public audience.

KDE4 is a fascinating project. It is a great topic for a book. Project that started when KDE started loosing ground inside Linux DE to Gnome, when KDE became less active, less motivated and somehow drown in lack of direction they managed to build a vision, action plan, set up a clear direction and follow it.

What’s even more amazing is that they followed it despite massive criticizm they had to face around KDE4.0 release.

The vision was, and still is, extremely challenging. It’s not about “updating to current standards”. It’s about setting up new ones. They do not “follow” Windows or MacOS. They experiment to the scale rarely seen in Open Source projects which tend to choose evolution over revolution usually.

Categories
main mozilla tech

MCS: Source files released!

Another milestone for MCS project has been reached! And its a big one!

If you open http://hg.mozilla.org/webtools/mcs/file/tip/theme/source/ you will find full source PSD files of the theme.

picture-41

What does it mean? Well, this is another step on the way of making sure that we have a really good theme that is open to everyone according to what we understand as Open. And understanding of it is not that common.

Think of it. How many open themes do you know. There are a lot of themes that you can download for free, but that’s not making them open, right? Next, there are themes that may provide sources, even on open licenses, which makes them technically open but does it make it easy to work with. Its almost like opening sources of a software, but not making the sources readable, not helping with hacking them, not providing documentation, and build environment… If you track all open projects out there, they usually take a lot of time to open their projects exactly because re-licensing sources is not enough. Because it will not make people want to use it and contribute to it.

Because in order to get this kind of activity around your project, there’s much more that needs to be done, and the source files for MCS are exactly doing this. It’s not only theme, it’s a theme with PSD files there, and the PSD files are licensed on Creative Commons 3.0 Attribution Share-Alike and it is ready to be modified. The source has all the layers properly grouped to make working on theme sections easy and natural. It has guidelines that help you keep the scheme in shape while modifying and it makes it easy to change colors or elements that you will likely to want to modify. It is a fully open source theme, and we have an example implementations there to show you, but you can change it however you like and come up with your own implementations.

We will provide tutorials on how to do this, and we hope to see people modify it in creative way and upstreaming their changes to make the theme look even better in result of community effort!

I would like to thank Legal Team in Mozilla (Catherine, Harvey), Tara and Seth for making this possible!

I may be wrong, but I think this is the first case ever of opening the theme this way. I would love to see other examples, but it I think we’re just opening a new chapter with both, Mozilla Community Theme and Mozilla Community Sites – since I think no other project is offering such powerful tools for its communities to develop themselves around their own websites.  Mozilla is leading  🙂

p.s. if there’s someone who knows how to port psd file to gimp xcf without loosing… everything in the file, then I’d love to get your help!

Categories
flock flockblog main mozilla tech

SMIL got sr+ !

I just wanted to share my joy with you! SMIL, animation multimedia integration language – a language that allows easy animations with SVG got superreview from roc a few minutes ago!

picture-32What does it mean? SMIL may find its use in UI animations and will be another step on the way from static UI’s to animated UI’s (which are more natural to human eye when made carefully).

What’s amazing about this project in Mozilla is its story. Brian Birtles started this project in May 2005 as a project for his studies, he quickly crafted basic code and first wiki article, and in November 2005 Brian submited initial patch to Bugzilla.

After that Brian worked on the project till the end of December, finished his term, wrote a paper about Animation in Mozilla and took a break. He picked it up around summer 2006 but did not push too much forward.

A year has passed since Brian sent his patch to bugzilla, and everything started to seem rather skeptical for SMIL. No maintainer, obsolete patch not compiling against trunk and no activity around it… At this point, tor, SVG magician, picked up the patch, cleaned it up, updated to trunk and kept updating for the whole 2007!!! Next, in April 2008 Chris Double picked the patch against and updated once again even adding new features!

In May 2008 Daniel Holbert took charge and started working on the patch to finalize the implementation getting gathering a lot of feedback and reviews from Brian and from Robert O’Callahan. The things started to move faster and around December Daniel proposed the patch for review and super-review. This caused several more rounds of reviews and finally, today, roc gave superrevew which means that he agrees for this architecture of this feature to be implemented into our code base.

While there’s still more work to be done, now we can expect SMIL to land on trunk very soon, and we have Brian back to support Daniel with work on SMIL project.

—-

It’s unique to such open project like Mozilla to have a full open access to working environment for an external student who can pick up his project of choice and lead it, get other peoples help to keep it alive while no leader is around and finally get it finalized by another community member with support from original author who additionally gets hired to work more on his project of choice.

There is such a tremendous variety of ways people are interacting with Mozilla project, such a huge flexibility of relations, its impossible to oversee everything and Mozilla could not operate in any top-down model. It’s such a different structure. Momentum, energy management, focus and global organization direction are being build all around the project on many levels, and being a leader in such organization means something very, very different. We have a huge luck that our l e a d e r s not only understand and incorporate it but also experience it together with us all.

Categories
main mozilla tech

MCS MediaWiki alpha1

After successful launch of the Theme and WordPress, its time for the next tool that your community can find very useful in collaborative work – Wiki.

mcsmediawikiWiki technology allows no-entry-cost edition of documents making it possible for many people to contribute to the same set of documents. Such technologies are widely used for projects like Wikipedia, MDC, wiki.mozilla.org or for many projects at Wikia.

In case of MCS, Wiki can be a good place to start a community when you have a group of people who want to collaborate on the vision for your project, or can serve as a place where people can work on documents and statups updates for your community. In today world almost every project in the world is using a Wiki and we believe that your can benefit as well.

Because of its popularity we decided to stick to MediaWiki, as the most popular wiki solution in the world. MCS MediaWiki is a powerfull addition to WordPress or Drupal based website and will allow you to boost participation level accross your community.

This is an alpha release, and I mean it even more than in the case od WordPress. MediaWiki may be a solid wiki solution, but its definitely not easy to customize and theme, so we want to work more on making the theme better for some specific sections of the Wiki (like search or recent changes), but the big thing that is missing here is usability.

We deployed all controls that should be needed, but the UI of original mediawiki is far from being perfect and our theme tries to fix it where possible. I cannot call it a full success yet and I hope those who will want to deploy the theme as well as other usability experts will want to contribute to the project by finding ways to make the UI more intuitive for use.

picture-11

Edit section
Edit section
preview
preview

You can see it live at http://mcs.labs.braniecki.net/mediawiki or download sources from http://hg.mozilla.org/webtools/mcs/file/tip/mediawiki/.

I am aware that MediaWiki 1.14 has not yet been released, but it’s already branched and will get there soon (while it contains some important improvements and our MCS Mediawiki is in alpha version. alpha versions are for people who know what they’re doing, right?) 😉

So, feel free to test it and play around and if you decide to implement it in your website, consider upstreaming your changes so that everyone benefits!

Next is phpBB3 and Drupal 🙂

Categories
main mozilla tech

What I miss after the switch

So, a few months ago Mozilla have switched from CVS to Hg. Initially, I was fully against this switch. As much as I hate CVS and consider it defective by design, I had really bad experience with Mercurial too.

Mercurial in Flock

Basically, in November 2005 I was a proud member of Flock team. One of the most frustrating things we experienced was CVS and as a small, open minded team in a storming stage of project we decided to skip the natural update to SVN and go for something far more challenging. We switched to Mercurial.

Mercurial 0.7 was an interesting piece of software but was simply not mature enough to handle the project. Except of many small issues (sometimes things went reeeaaallly slow) there were a few big ones including accidental revert of checkins on merge without any notice.

I believe the last one was an ultimate reason to accept a failure and switch once again. Trust me, we didn’t want to switch but we couldn’t afford waiting for all those little things to get fixed and having such experience we decided to go for a stable thing – SVN – with all its shortcomings well known and accepted.

Mercurial in Mozilla

Mozilla spent a reasonable amount of time investigating options across Revision Control Systems and ultimately decided to switch to… Mercurial. (IIRC the reason for not going to git was its performance on Windows)

Fortunately, Mercurial matured enough to fix many of the problems we faced at Flock and after half a year with it, we can say that Hg works for Mozilla fairly well. It definitely has a higher entry barrier, it has longer learning curve, its fairly complex (which is a major problem for non technical people facing it) but it is extremely fast and flexible. It is modern, it is distributed and it is progressing which gives it a promise of a bright future.

I must say that my particular favorite things are:

  • distributed architecture. For an average human being with developer skills it means I can code on a plane, in a bus or while at my girlfriend’s aunt house (during an exciting evening of talking about her relatives) without a connection. All the work can be later synced back to main repository and the revision log of such thing is usable.
  • speed. mercurial is fast, much faster than CVS
  • file moving. There are many things CVS was missing, but I believe that “move” is the single most important one. Lack of “move” in CVS is extremely destructive because it builds a habit of not moving files around without a super serious reason. Clean code, sanity and readability is not super serious reason, and in result while in CVS world, your source code gets less readable in one more way. If you decide to use remove/add in CVS to mimic move you’re loosing the whole history of the file which puts the whole purpose of RCS in question.
  • bisect. Ability to go revision by revision to track where the bug has been introduced is extremely useful addition.

Unfortunately, Mercurial is also carrying many shortcomings. Some of them are especially painful:

  • No svn:externals. It’s becoming a major flaw to me. In MCS project we have tons of small modules that link to each other but should be stored separately. Many CSS/JS files should exist in one place and be linked from specific themes. Lack of externals is not only costing time (I have to apply patch against 5 places) but it also hits user experience (I cannot let someone just pull a repo, he has to manually go into one dir and pull another). It could really help out L10n repo to point to each external locale repo from l10n main repo.
  • Mercurial does a poor job with directories. It may be a matter of habit, but it happened to me that I did “cd ./repo/dir1/dir2;hg revert -all” to revert the whole directory and got the whole repo reverted. Same with commits and other commands. I find it very counter intuitive.
  • It also has a problem with pulling directories. I failed to find a way to get a particular directory cloned or pulled from a repository. In result directions for users are getting even more complex (pull this repo, then get this directory and copy it there)
  • It requires a separate commit to merge. I’m not an expert, so maybe its deeply rooted in logic, but it looks like a dirty hack. (pull clone1, pull clone2, work on clone1, commit, work on clone2, pull to merge… commit the merge.)

Also, our hg.mozilla.org webview is limited comparing to websvn in many areas:

  • you can only download full repo. If you go into particular directory and press “zip” or “bz2” you will download whole repozitory. wrong!
  • you can only link to the whole repository or to particular revision. I need ability to link to “latest” revision of one file or directory (in a branch).
  • you cannot diff between two given revisions (only diff to previous one)
  • you don’t see the revision number until you open a diff to previous revision.
  • you cannot list checkins for given time frame.
  • search sux. only 10 results, no way to get more, not sure what it really includes in results and what not.
  • workflow is screwed. When I’m viewing one file, and I click on revisions, and then browse, I land on the root of the repo for the revision, not in the file I’ve been viewing before.
  • summary shows you whatever branch has been updated lately. It caused several localizers to get scared to death when they updated branch and saw it in what they thought will be tip. It’s very confusing and may cause people to react randomly.

Some of them are minor, some of them are major. I’m particularly desperate to find a replacement for externals and directory exporting cause its important to give clear instructions for MCS project, and without those two the instruction is getting long and clumsy. 🙁

Categories
flock flockblog main mozilla tech

MCS WordPress 1.0alpha

One of the major efforts during last 2 weeks was to prepare working application using Mozilla Community Theme.

The first app that got MCS support is… WordPress 2.7.

wpmclove

WordPress 2.7 is a modern, flexible CMS system, that is best known as an excellent blogging platform. Because of its clean design, easy maintainance and many plugins its also used by many websites as a classic CMS. For example polish community – Aviary.pl – is using  WordPress and it proved to be very stable and solid platform for small websites.

Because one of the primary goals of MCS is to help our small communities get a shiny website with minimum effort WordPress was an obvious choice for the first app to be implemented.

Today, I believe we have a quite stable and usable theme for WordPress together with one custom plugin and support for another.

That’s how it looks in its full glory:

picture-4picture-5

I call it Alpha, because there’s some work to do. JS code requires optimization, Theme should provide admin configuration panel, and it needs some experimental implementations with bug squashing before we can call it stable.

You can install it togther with OpenID to gain full OpenID support. It uses vanilla WordPress 2.7, so feel free to give it a try, and if you’re familiar with WordPress theming/plugins take a look at the sources and… you know… we’re accepting patches 🙂

p.s. we currently do not provide bundles, so to download the elements you either have to use mercurial (hg export http://hg.mozilla.org/webtools/mcs) or go to http://hg.mozilla.org/webtools/mcs and click on “bz2” or “zip” to download the package. Then follow instructions in ./wordpress/INSTALL.

Categories
main mozilla tech

MCS Theme 1.0beta2

10 days after first beta of MCS Theme – core element of the Mozilla Community Sites project, the next iteration is coming!

MCT 1.0beta2
MCT 1.0beta2

MCS Theme 1.0beta2 brings many improvements:

  • Tomer Cohen contributed initial support for right-to-left locales! (thank you!) 🙂
  • several lists are now <ul> (footer link list, article list etc.)
  • fixed nasty bug with right sidebar positioned below content due to Gecko bug by adding a wrapper div with display: table-row in #middle. (dbaron pointed out the solution)
  • fixed another nasty bug that caused middle row to shrink if #content was (almost) empty. (.aside is now display: table-cell by default)
  • fixed IE7 CSS hack. Now the theme will look good in IE7 when left-menu/right-menu is hidden
  • jQuery JS code split into modules
  • JS login box supports states (login, logout, register etc.)
  • cleaned up the use of .headline vs. .title classes
MCT in Right To Left mode
MCT in Right To Left mode

You can download sources from hg.mozilla.org/webtools/mcs directory theme/html and theme/php.

You can also preview Beta2: HTML mockup, HTML rich mockup, PHP mockup, Builder.


This release brings us near to stable version with many elements being in place and working well.

Right now, my main focus is on webtools using the theme, so if you want to play with it a bit, and you’ll find any bug, please let me know!

Categories
main mozilla tech

Mozilla Community Theme v1.0beta

Happy Holidays!

I will use this moment to introduce you the first release of my latest project. Over two months ago I presented the revision version of Mozilla Community Theme.

MCT is an element of a wider project – Mozilla Community Sites (MCS) that will help start a new community and maintain a website without much effort.

The Theme and its implementation are major part of the project and for last two months I have been working on creating a powerful, generic implementation of the theme, several small tools for making the theme easier to use and many tiny updates that should result in the higher quality of the theme.

On Monday we finalized the draft of the licensing guidelines which was the final step to release the theme to public.

Today, I’m proud to present you all the first revision of Mozilla Community Theme (click to test a mockup live):

picture-2

From today I’m starting a serie of blog posts about various aspects of Mozilla Community Theme, but for those of you who want to dig on your own you can just start reading wiki.mozilla.org/MCS documentation.

Logo

mctlogoThe very first element of the new theme is a Mozilla Community logo. The logo is a new element that we hope will become a unifying element of all community building efforts. We spent a lot of time thinking about how to license it and I believe the result is a very relaxed policy that allows you to do whatever you want with the logo, while leaving us ability to block malicious use.

The logo may be used by any community that wants to express its relationship with Mozilla project. We do not try to create a new brand out of it, we try to give you ability to show what you stand for. In result the logo can even be modified (!) to adjust it to your website, but please, try not to overuse this power. The logo means something and I believe its extremely cute, but can be easily devaluated by misuse.

Theme

Mozilla Community Theme is an open source theme (the sources will be provided soon) that provides polished and high quality solution for anyone willing to start a new community website but lacking designer skills.

We provide highly customizable theme that can be used in different color palettes, with different backgrounds, layouts and widgets. The theme was created basing on dozen of current community websites with an intention to match all major components of those websites. It is possible to take the theme as it stands and use it for your website without changing a single line, but if you want you can modify everything. Its up to you and the further you go from the original design, the more you’re on your own in terms of quality 😉

Example implementation

The theme itself is a huge step forward, but the real benefit only starts there. As a part of MCT we provide ready to use implementations of the Theme in several forms.

The very first form is a clean XHTML/CSS/JS mockup which presents the semantic structure of the website and its style documents.

Another is a PHP version, which may look similar but provides an example of how to use several tools and deploy the theme into PHP application.

The third is a small cutomization tool – PHP Builder, which is a proof of concept of what you can modify in the theme with simple CSS file (generated out of GUI). You can customize the theme, download custom.css file and replace it in HTML version to get your custom theme!

picture-3

At the moment Builder is pretty rough, but it already allows to create tens of versions of the theme. Ability to generate custom color palette (select custom and type any HEX RGB color) makes the amount of possible result infinite. In the future Builder should be able to provide more features and layout options.

App implementations

In a few days I will release first Theme implementations – wordpress and mediawiki, and drupal should follow shortly. The app implementations will not only contain the theme itself but also set of extensions that will provide unified set of features across multiple applications (think: OpenID, Single Sign On). We will also work on adding unique Mozilla related extensions that will allow your website to present the data directly from websites like QMO, SUMO or MDC.

MCS Admin Panel

The last step will be to provide single admin panel for installing/updating Mozilla Community Theme powered applications to run a complete website. The panel should allow someone with no prior experience in running a website to painlessly install and maintain his website, learning with no rush how the whole thing works.

Now it is YOUR time!

Working on such project inside Mozilla has, among others, one more benefit. I’m surrounded by web experts. Every single person who is reading this blog post has some unique knowledge and experience with coding HTML/CSS/JS or usability or accessibility or cross-culture design. Everyone can take a look at the sources provided with the whole implementation and find all the bugs I made and all those stupid mistakes. You can help make this project better.

My dream is to have this theme be a pure example of excellence in HTML/CSS/JS website development. Clean, modern code, flexible beyond recognition. During those two months I probably missed many opportunities to get nearer to my goal. Many elements may be not polished or may require some patience and love. If you think you found something like this, you probably did. So please, take a moment to share the feedback.
If you find the project interesting, and have some experience with web development, themes/extensions for WordPress/Drupal/phpBB/punBB/MediaWiki and want to help, email me (zbraniecki _a_t_ mozilla dot com) please. I could use some help 🙂

Credits

I would like to thank people who have helped me with this project. Especially Seth for an incredible patience and support in removing road-blockers, and The Royal Order of Design for a great design they prepared 🙂

Also, Szymon Piłkowski contributed first round of reviews, Wojciech Szczęsny provided initial insight into IE6 compatibility (not ready yet) and Szymon Błaszczyk contributed first usability review.

Plans

After getting the first round of feedback, I will remove “beta” from the release status, tag it and call it official. You can take it today and start using right away, but there may be some changes in the CSS basing on the volume of bugs discovered by peers.

During next days (after some christmas rest with my family)  I will be working on finalizing wordpress implementation (you can take a look at the current status) and mediawiki. I will also shed some light on the PHP code I wrote for this project and present you CSSLib and Style class.

Finally, I hope to spend some time discussing with you your feedback and implementing fixes to the code and helping first brave souls implement it for their new community websites!

So… how do you like it? 🙂

p.s. if you have ideas you would like to see, or you would like to work on, contact me or list them on the MCS:Brainstorm page.

Categories
main mozilla tech

PHP pixel mapper story

While working on Mozilla Community Sites project, I encountered an interesting challenge.

snapshot-2008-12-21-00-55-44

This Poll Box may look nice, but there’s a hidden trap for anyone trying to use this on his website. How to make the cute bars look nice and present real value in it? The intuitive response is to create a small PHP script that will be drawing the bar depending on the input value.

It would be easy to do if only the bar itself is a simple green/red dual color rectangle but in this case, it’s something more sophisticated. Because the bar can be used on different backgrounds, I had to extract it from the source and create a translucent PNG file with representation of blends, shadows and smooth edges. The file looks like this:

pollbar

Great. Now we have the bar, and we can present it on any customized background, but it’s somehow static and cannot be used to present real values, right?
So the next step is to take it into PHP world and here were the trap is hidden. How to take a complex PNG image into PHP file? Unfortunately Google failed to help me here, so I started playing around with GD library (after an hour of searching for how to take alpha value from pixel in Gimp – it’s impossible) and crafted a plan.
I could create two dimension array of pixels (rgba) representing left edge, right edge, green line and red line and bundle it into a bar like this.
Alternative approach would be to cut PNG file and load elements into PHP script on each load, but it will have to cost much more (load file, decode, operations, encode, write) so I sticked to the pixel array map idea.
I was also initially considering trying to create such bar algorithmically (take green, red rectangles, then do the math for shadows, rounded corners, opacity etc.) but even ignoring how much time it would take to write it, the performance of such script would be definitely not satisfying.

So I needed two scripts. First, to take PNG file and build a PHP Array map of pixels. Second, to take such array and paint it on PNG file.

The script with those two functions is my svn repo.

At the top of the script file is an example Array map that will paint the example bar. drawpixelmap() is a function that can take such map as an argument and create PNG image from it.

getpixelmap() is a function that takes PNG image and creates string with PHP Array map.

In result you can take PNG image, save it in PHP, operate on it and draw the final result.

In case of my quest I had to cut the Array map into pieces (left edge, right edge etc.) and do a little bit of math.

The result looks like this:

http://labs.braniecki.net/pollbar.png.php?v=50

http://labs.braniecki.net/pollbar.png.php?v=30

http://labs.braniecki.net/pollbar.png.php?v=75

Of course, any other value from 0-100 range for $v is possible.

So, if you will ever need to dynamically modify PNG file by pixels, those scripts may be useful for you 🙂

btw. I’m writing it from Victoria, where it is snowing for the third day in a row. Not sure how to explain it, but the snow in Canada is different from the one in Europe. Is it possible that its a kind of eggnog influence? 🙂