Categories: "Full Stack Dev & Design"

PHP unpure...

"[...] as I have said so many times, PHP is not about purity in CS principles or architecture, it is about solving the ugly web problem with an admittedly ugly, but extremely functional and convenient solution. If you are looking for purity you are in the wrong boat. Get out now before you get hit by a wet cat!"

-Rasmus Lerdorf, creator of PHP

Makes sense... but just one thing: why is the web problem supposed to be ugly ?

mySQL 3.23 is making me sick!

  • No referential integrity
  • No transactions (at least not enabled by default so hosting providers would have them)
  • No subqueries in DELETE statements
  • No UNION statement (can you believe it?)
  • and of course no triggers of any kind...

Not that I think mySQL is a bad thing... just that I don't understand how this can be called 3.23! Actually, 0.3.23 would be more appropriate! :>>

I'm so close to making 0.4 (some call it 4.0 :>>) a requirement for b2evolution!

Localizing b2evolution

Okay, with the first beta-testers testing b2evolution I am beggining to feel an urgent need to localize the software. I was running most of my pages with french text (like "laisser un commentaire") and the testers want english (that is at least english!) :-/

Right now I just switched back everything to english but I do need to localize this. Actually, I needed this anyway for my own site. I will eventually do it as planned and links like "leave a comment" will be displayed in the current post's language.

On blogs like this one, were posts are mixed in multiple languages (yeah I know it's a little strange, but this is Europe... :>>) that means I must have several languages handy at all times.

So I was thinking about putting the strings into arrays... but this may not be as straightforward as I could have thought, as I need to take care of several things:

  • Make it efficient
  • Make it readable in the source code. Replacing 'leave a comment' with $uistring[49][$lang] won't do it!
  • Make it easy for contributors to translate the whole product

Gotta think about it some more... ;)

Google & BlogNoise: the blogger's responsiblity

We have talked about the annoying BlogNoise problem before. And most bloggers have agreed that Google would probably be smart enough to fix the problem shortly in order to provide a better service to their users.

A great part of the BlogNoise is generated by the fact alone that we - bloggers - have so many unrelated posts/subjects on the same web page. And when we - bloggers - link to each other, we let the indexing robots follow these links and then index a lot of crap at the other end. This is because, most of the time, the permalinks we refer to, just point right into the middle of a monthly archive page with so many different subjects!

I have suggested a technical google-side solution using RSS, but the more I think about it, the more I am getting convinced that it is not Google's job to fix this! It is rather our bloggers' duty to fix this!

We have created crap on the Internet; now we just have to clean up!

The blogger-side solution is actually quite simple: all we need to do is stop using permalinks pointing right into the middle of monthly archives! We need to make the permalinks point to single posts (possibly with comments and trackback). This way, when someone refers to the post, and later the indexing robot follows the link, it will only index a single post. And all the keywords being indexed will actually be related to that post! No more indexing soup mixing hundreds of unrelated keywords from dozens of unrelated posts!

Still, some questions remain:

  • What happens with the old permalinked posts?
  • How do we exclude navigation from indexing? (this is actually a general question about indexing the web)
  • And last but not least: Do bloggers actually want clean indexing? Or rather, do they prefer to continue flattering themselves with all those illegitimate search-result-hits that so easily rocket up their monthly hit counts? And it's even better when you consider unique visitors!

    Let me add that this is very contradictory with another typical blogger trend stating, in the name of interoperability and public's interest, that the only valid markup is the latest XHTML DTD!

PS: I like interop. I like standards. I am doing my best to support them. And I AM working on cleaning up my permalinks. I'll get less google hits... but hits don't matter! What you want from now on is increasing your google-hit satisfaction ratio! You want no more visitors coming to your blog by mistake! :P

mySQL DISTINCT FUNCTION(...) bug

Looks like mySQL is not able to to perform the DISTINCT selection in cases like this:

SELECT DISTINCT YEAR(post_date), MONTH(post_date) 
  FROM whatever1 INNER JOIN whatever2 ON field1 = field2
 ORDER BY post_date

This can be worked around, but it seems ridiculous!...

SELECT DISTINCT YEAR(post_date), MONTH(post_date) 
  FROM whatever1 INNER JOIN whatever2 ON field1 = field2
 ORDER BY YEAR(post_date), MONTH(post_date)