CSML

CSML is a little class (PHP5 only) that generates HTML tags from CSS-like selectors.

download-button

Why? Because I hate having HTML mixed up with PHP on my templates. I particularly hate how popular wordpress themes and plugins are coded where is dificult to follow conditional statements and loops starts or ends, because they are all scrambled with HTML tags.

With CSML, you can generate necessary HTML tags using CSS selectors inside your PHP code-blocks without escaping or concatenating long strings. If you already know some CSS, this syntax should be very easy to understand. 

The class has two main methods: csml::tag() generates a tag from a selector and csml::entag() wraps a string into a pair of selectors.

Here's an example:

Included with the class, there are to utility functions: t() and en() wich print the results from csml::tag() and csml::entag() respectively. This makes code even easier to write.

There's more documentation and samples on the project's README

download-button

Filed under  //  csml   opensource   projects  
Posted

WPHashTag

I forgot why I wanted this functionality, but I've written a simple WordPress plugin that takes twitter-style #hashtags in your posts and transform them into links to WordPress standard tags. Pretty useful when you want to embed links to your own content very easily.

The plugin is in the Gist, just because I love Github that much.

Filed under  //  opensource   plugins   projects   wordpress  
Posted

Carta abierta a la AMIPCI

(to my english readers: sorry, this post had to be in spanish)

A quien corresponda:

En twitter hay un gran revuelo por el anuncio de la revocación en el senado al 3% de impuesto a las comunicaciones e internet. Tambien hay mucha gente muy molesta porque ustedes se han adjudicado la victoria de un movimiento colectivo. Para ser sincero yo no se quien tiene la razón, se que hice lo que pude desde mi trinchera (entiéndase: mi cuenta de twitter) para apoyar el movimiento #internetnecesario pero no tengo la intención de reclamar mi 0.00000001% de crédito por la hazaña. Por mi pueden quedarse con la gloria, pero si van a hacerlo, hay algunas cosas que quisiera pedirles.

Su Quienessomos (sic.) dice que fueron fundados en 1999  y que representan a las empresas que representan una verdadera influencia en el desarrollo de la Industria de Internet en México. Traduciendo de marketing-speech  a español, eso significa:  "Vemos por los intereses de las empresas grandes y con dinero" ¿O me equivoco?

Voy a darles un curso básico sobre la web 2.0 en una sola frase: Las personas más importantes y con mayor influencia en la web de hoy en día no son esas grandes empresas, somos los usuarios de internet.  No me crean a mí, Time dixit.

Discúlpenme si en los párrafos anteriores me equivoqué y los juzgué mal. Lo más probable es que ustedes ya sepan que son los usuarios los entes más importantes e influyentes de la web y han aceptado el crédito por el logro de la comunidad de usuarios a nuestro nombre porque nos representan. Siendo así, les aplaudo sus buenas intenciones, pero lo estan haciendo mal.

Estas son unas sugerencias personales con las que podrían empezar a hacer bien su trabajo:

1. De nuevo, reconozcan que las personas más importantes en la web son los usuarios y pugnen por sus intereses antes que por cualquier otra cosa.

2. Luego de los usuarios están los emprendedores y los innovadores ¿Porque no hacer algo desde su posición para ayudarles? Y no, con innovadores no me refiero a los que hacen muy bonitos sitios animados en flash, sino a los que tienen ideas que podrían convertirse en grandes servicios que generen riqueza para el país.

3. Entiendan mejor como funciona la web. A pesar de los flamewars, los trolls y los lolcats Internet sigue siendo una cosa maravillosa que cambia y mejora cada día. Es dificil estar al tanto, pero la comunidad estará feliz de apuntarles la dirección correcta si nos preguntan y nos dejan participar.

4. Hay que ver un poquito más allá. La web es más que comercio electrónico y publicidad en línea.

5. No iremos a ningún lado sin bases sólidas. ¿Que les parece si apoyan, desde su alta posición, los estándares y la open web?

Estás son solamente mis ideas, pero estoy seguro que una buena parte de la comunidad piensa de manera similar y los que difieran no tardarán en decirlo desde sus respectivos foros. Esta es la magia de la web.

Perdonen la mala redacción, hubiera querido tener más tiempo para ordenar mis ideas pero me moría por iniciar la conversación.

Les toca.

Posted

On being a hacker

Over almost every conference, book or podcast about entrepreneurship I've read or heard there's this idea about not doing anything that's not related to marketing and making money. Even among some of my friends, whenever you ask them what they are doing, they'll say "I don't design/program/draw/whatever anymore, I'm just focused on the business side of things". And you know what? That really annoys me.

I'm a hacker and I can help it.  I will never be Linus Torvalds or David Heinemeier Hansson but I know I'm a hacker. And as much as I'm see myself as an entrepreneur and as much I want to make money I will never stop being a hacker. I like to try new stuff. Expand my mind and my capabilities and learn new stuff everyday.

I'll never stop trying to reverse engineer some cool script to go and learn yet another traffic leading technique. My mind can't handle it. Maybe I'm simply not wired to be a business person.

I will always be a hacker.

Posted

I loved this cover

Single Ladies Cover by Pomplamoose.

via (Garret Murray)

Filed under  //  music  
Posted

Wordpress Debacle?

My relationship with WordPress has been a love/hate one. I was happy maintaining my personal blog with an outdated version of MovableType despite the horrendous build times and spam attacks just because I loved its interface and hated the design of every alternative blog system.

I even lost the massive exodus that happened when SixApart changed its MT license model and only two years later I've made the migration to WordPress, once their interface was tolerable to use.

Nowadays WP's interface is beautiful, also it has been evolving from a blogging platform to a full fledged CMS and its community has grown an incredible ecosystem around it. Even I have a business built around it.

But the problem with WordPress today is security. This month a nasty worm attacked a lot of old (and by old I mean one decimal of a version behind) WP installations and for a lot of people –me included– our faith and love for WordPress declined some points.

That's why I'm checking some other options and that's one of the reasons that tonight I'm writing a blog post on GMail.

What do you think? Is this the beginning of the end of the WordPress reign?

Filed under  //  blogs   security   wordpress  
Posted

Custom domain… kinda working

I'm completely sold on posterous (5 posts today!). So much than I even set my personal domain to point here from Dreamhost. The only problem is that, while http://armandososa.com is working well,  www.armandososa.com (note the www) is still pointing to the limbo. I don't know how to fix this because my DNS knowledge is near to zero, but I will try to find out tomorrow.

I'll be happy If somebody tells me the answer though.

 

update: It's working now thanks to my friend @andresb who is ninja master of DNS.

Filed under  //  domain   dreamhost   posterous  
Posted

Not worthy to learn, but I'm doing it anyway.

I'm not a real programmer by any means, but since I was like 17 I've been very interested in programming languages. I've never learn one of those major languages like C or Java but in those days I was very good writing DOS programs with Basic, Pascal and –sigh– Clipper.

Why was I writing DOS software on a 8088 machine in 1997? Well, that's a story for another time. But then when I have my first Windows machine (a Pentium II circa 2000) I was completely lost. Then I grabbed a pirated copy of Borland Delphi and tried very hard to make Windows software but it was so much a whole new scary world to me that I finally gave up. That was also the time when I've discovered Photoshop and Adobe Illustrator and decided to go for the fancier bezier-drawn and gradient-filled design path.

Back In 2002, while working as a junior designer on a print shop, I've stumbled on the with a Webmonkey's article about ASP and I became immediately interrested. In the next two or three months I learned ASP and wrote my first CMS (which I never actually used) and in the years coming I slowly  learned CSS, PHP and Javascript. It was a natural progression form me and even if sometimes I found it frustrating, it never felt lke something new and scary.

Now I'm decided to learn Cocoa programming because I'd like to write software for the mac. Just for fun.

And you know what? It scares me to death. Objective-C, it's syntax, and all that high concepts like the interface pattern, the object messages, the delegate objects, garbage collection sounds like stuff so smart that a  not-a-real-programmer-but-former-print-shop-junior-designer like me is not worthy enough to understand.

But I'm decided to try anyway, because thats how much attention deficient I am.

Posted