Categories: "Full Stack Dev & Design" or "Databases" or "MySQL" or "HTTP/SSL" or "Internationalization" or "Javascript" or "Mobile" or "PHP" or "Syndication (RSS, RDF, Atom)" or "Web Design" or "XHTML/CSS" or "XML"

Screw it, let's reskin it!

I think it was about time I re-skinned this site! 

Since my last post pledging to get rid of the ugliness, I feel I’ve made some significant progress on b2evolution.net (especially the home page) but this personal site you’re looking at right now was really starting to hurt my own eyes! (I can’t believe I actually used to be happy with my old design :p)

So today I just decided to “screw it and re-skin it“.

I’ve been procrastinating on this for maybe two years just because I didn’t have time (or the energy) to actually re-design it – meaning: polishing a new design for it. Making it responsive, etc.

So I finally decided to take a shortcut: use another skin I like and make it fit as fast as possible. And sometimes I actually forget how fast this can be done with b2evolution. Once I had uploaded the new skin, it took me about 30 minutes to set up all the menu/navigation widgets so the site navigation makes sense. And voilà.

Of course, there’s a million details in this skin that need fixing but I think the improvement is massive already! 30 minutes of work vs. 2 years of procrastination. What a shame! :/

Now, there’s a couple interesting thoughts down the road:

  • I just made the 20% of the effort that yields 80% of the benefits;
  • I still have 80% of the work to do to get the details right;
  • Some day this new deisgn will probably feel ugly again… :(
  • How do I prevent letting it slide into ugliness again next time? hum… it feels like I have so many gardens that need constant care… :p

Anyways, Dear Reader, I hope you’ll enjoy this site in its new form! :)

Did I abandon my sites?

2014. Time to wake up, eh?

First off, why have I been blogging so little in the last couple of years?

I guess it's a combination of:

  • Too much work
  • Having a real life (which I might not have had a few years back...)
  • Google did a great job at scaring me off posting "non-useful" content (Shall we call it "Panda angst" ?)

All of these are lame excuses.

  • Blogging is part of my work
  • Don't even get me started on balancing work and real life - there has to be a solution!
  • Sharing ideas, no matter how mundane they might seem at first, has been the beginning of many great projects in my own experience. Plus: it definitely helps to structure a lot of thoughts that would otherwise just swirl around in my head, without ever leading to anything tangible. Moving forward, even small steps at a time is far more important than a particular Google algorythm might think of it... especially on my personal blog (I'm still debating this regarding some other sites :p)

2014. Time to get rid of the Ugly!

The most vexing part in this wake up call is that so many of my (many) websites are just plain ugly... compared to the current web-design state of the art.

I don't recall exactly what led me to this realization but part of it was comparing b2evolution.net to its competitors. Ironically, it's not that the competitors (Free CMS tools) look good. It's actually that those competitors look bad compared to commercial solutions.

Thought: Why does Free software has to look so bad compared to commercial software?

And then of course it dawned on me: why does my software have to look so bad compared to commercial software and other free software alike?

If you know b2evolution, you know it's really powerful. Arguably significantly more powerful than its commercial alternatives indeed. That's the result of 10 years of hard work. But does it show on the surface? Hell, no! It really deserves a packaging that would do it justice! Welcome to the world of (virtual) product packaging!

Ok, I know what you think... But better late than never. And yes, I also realize how late I am now...

And then, the same logic applies to a dozen other sites of mine, all the way down to the one you're reading now.

Where do we go from here?

OK, so I realized the problem. That's always step 1. Check.

Then I blogged about it. Now I feel pressure to do something about it so I don't look like a fool by the same time next year. Step 2. Check.

I started collecting ideas about redesigns and started test implementations on some of them. Those are ok steps 3 and 4 I guess. Check. Check.

The real effective & efficient solution though, would be to hire a top designer... right? One might think, indeed.

However, it's not as easy as it seems:

  • There is definitely a shortage in modern web design talent;
  • There is an even higher shortage in UX design. Graphic design without User eXperience is worthless. The most basic illustration of that is that many graphic designs still use fonts so small they won't be read by anyone. More modern problems are: choosing button sizes, button positions, how many buttons to show at a given time, what to hide, what not... and at some point it starts to overlap with marketing in the sense you need to choose in which order to present the info.
  • And then comes the terrible chicken and egg issue: my sites actually look so ugly right now that pro designers wouldn't want to touch them with a 10 feet pole! :p

So my only possible course of action, I guess, is:

  1. Clean everything up making the best use of my current resources;
  2. Hire top talent once they can see a credible client when they look at my sites!

Ok, 'nuff said. Let's do some implementation!

flush() bug in PHP 5.4

For some reason, nobody seems to acknowledge there is a bug with flush() in PHP 5.4.

In any previous version of PHP, you could just do:

PHP


and the PHP output buffer would be sent to Apache which would in turn send it to your web browser.

We are not talking about any side effects due to compression or charset sniffing here. We are talking about: flush() was working just fine.

And then compes PHP 5.4 and it doesn't work any more. And you revert to PHP 5.3 and it works again. PHP 5.4, broken again. And you can reproduce that to infinity but still, nobody wants to acknowledge it.

So we had to find a workaround. Here it is: just replace your flush() calls with a custom call like flush54() defined like this:

PHP

function flush54()
{
  @ob_end_flush();
  flush();
}

This will restore the initial behaviour...

Live HTTP Header tracking for Firefox

LiveHTTPHeaders is a FireFox extension that lets you look at all HTTP headers for all requests issued by the browser.

I am updating and resurfacing this post today since -- after a long while of being mildly maintained -- this fine plugin seems to have effective backing again. Version 0.17 works on FireFox 9.x.

Even in the days of FireBug, LiveHTTPHeaders is still an irreplaceable tool in a web developer's toolkit. As a matter of fact, LiveHTTPHeaders is the best way to track chains of redirects, which FireBug doesn't display right, as it will often clear the "Net" tab from one request to the next.

The header tracking window can be opened through Tools > Live HTTP Header. It will then capture all requests and display HTTP headers being sent as well as headers being received. Note that it is possible to stop capture at any time so the display stops scrolling. It is also possible to filter out specific requests (for example images) with a regular expression (regexp).

The extension also extends the Page Info windows with a Headers tab, which is useful if you just want to see the headers for the current page.

Finally, it's also possible to edit requests and replay them again, modified. At this time this is still in beta though, and Tamper Data may be a better extension for that purpose.

Why echo is slow in PHP and how to make it really fast

You may have noticed that PHP scripts that echo a lot of content appear to be running with poor performance…

Well, the operative word here is “appear". It is a common misconception that “echo is the slowest PHP command"! :p

The problem is actually just a bandwidth issue! When you try to pump a lot of content though the Internet, at some point you experience “load time"… and at some point PHP actually experiences “send time"!

You may measure the execution time between the begining and the end of your script, and, on a slow connection, it may show you that it took 500 ms to execute. You may even narrow it down to a single echo statement that takes 480 ms to execute. But that time actually includes wait time where PHP cannot send any more data back to apache!

There is a common trick that consists of starting output befering before echoing, like this:

PHP

ob_start(); 
echo $a_lot_of_content;

This will allow PHP to move on and appear to terminate fast. But the truth is, all the content is now in PHP’s output buffer, and although your script is done, PHP is still working in the background to send all that data to your web server (apache for instance).

Full story »