The (X)HTML strict way to open a new window

There has been a fuss on websites that don’t go through validation simply because they have a wrong way of opening a link on a new window. The old conventional way of opening a link on a new window was simply by adding an attribute like:

  1. <a href="http://example.com" target="_blank">My new window link</a>

This was both easy to remember and implement. Since the 4.0 strict specification though this is not considered valid any more. I was against that until I read the reason why this changed. Simply because the meta information an HTML document contains is related to the current window and current site. Should you want to refer to a new window it’s simply not within the scope of this page’s description. That’s why it is considered to fall within the client side to implement through Javascript for example.

I am not sure I agree with that since it doesn’t really interfere with the meaning of the meta description of the page that the current HTML does, it’s simply an easy way to do it. On the other hand, since you want the validation to be successful, the easiest way to do it is by adding a small Javascript on the link. You can do it like:

  1. <a onclick="window.open(this.href); return false;" href="http://example.com">My new window link</a>

It’s not as hard but it’s definitely not as simply as the first way. What do you prefer? Simplicity or validity? It’s really up to you but I usually go with the first…

Automating WordPress

I recently thought about creating a small website where I would post all the apps that I try and like for the iPhone/ iPod. But then again, I knew, that if it was hard to post and maintain it then I’ll probably end up deleting the whole thing after a few months at best. Then I started thinking how could I simplify the process and make it so easy for me that it would actually be fun to post those apps there. After a lot of consideration and some coding, MyFavApps was created!

The idea is simple. I downloaded the WordPress app. Then I created a small plugin where when I post, it scans for the app name I want to review and my ratings and does the rest. It downloads pics, description, price and the other data from the official app store using the API, parses my rating and updates the post with all these data. So, whenever I want to post an app it takes more or less 5 minutes to do so.

My point is that sky is the limit and WordPress is the means to get there… Get creative and surprise the world!

Twitter’s RT vs everything else

Well here is my little dime on the subject. As you all must have noticed, Twitter adopted the RT trend. This actually originally started as a need of the community to share tweets that they like without removing the attribute from the original poster, instead referring to him.

All the programs that actually supported it, what they did was pretty simple. They copy the original tweet adding the “@” reference in the beginning and maybe an RT at the very start (or “Retweet” for a couple of programs). This had it’s drawback. First of all it’s duplication of content. So if, for instance, one 160 character tweet get’s retweeted 50 times (which is a fair amount for a viral tweet) then the storage required for the same piece of information is 5 times higher. Now, you noticed that i said “piece of information” and not tweet. I did that because the tweet might vary a bit with abbreviations that the RTer might have introduced in order to make it shorter. So it’s the same info but in various formats and taking much larger space.

One more problem that a user faces is most of the times having to shrink the original tweet in order to be able to retweet. If you think of it, out of the 160 characters 2 are for the RT and then an average of 5-15 are needed for the original poster. Things are worst if you need to RT another RT… That is a problem i have faced a lot and found it inconvenient.

You can imagine how happy i was to see the feature actually implemented by Twitter. This method requires no extra characters and it takes no more space than the original tweet. It’s like a link. I only have one problem with this method. If i want to comment on a tweet i want to retweet, for instance “LOL this is so funny“, i can’t do it. I know it’s kinda hard to keep everybody happy plus implementing something like that would inherit the problems of the originally used RT but if Twitter was to think of a solution that would be great (maybe threaded tweets or something).

One last thought i’d like to share is with the vendors of the popular desktop applications. I think that they should change the retweet way to the new one instead of the original copy-paste. To be honest, i don’t know if the API supports it yet but this is one thing i’d like to see on a desktop twitter application.

The magic of Posterous and FunnyInbox.net

I know i am late in discovering this service but Posterous,simply put, rocks your socks! I love the way these guys implemented post by mail. I mean i know our beloved WordPress does it, for a long time now actually, but in my humble opinion not quite well.

So i decided to move FunnyInbox.net on Posterous. And you know what? It’s free to have custom domains! Yup. Not like other phonies supposedly “open source” and “all for the community” bullshit. It’s completely free. Period. Now the only problem i have is that it’s kinda slow for now, maybe it will get better. Other than that i am completely satisfied. A problem that i had with WordPress is that i needed too much time to prepare a batch of posts on emails that would come into my inbox. I needed to download, separate, upload, write the post, schedule it… Now, all i do is just forward.

On the other hand i wouldn’t trade WordPress for nothing when it comes to blogging. Not even for some other phonies that are trying to catch up… All in all, for a small site with the niche of FunnyInbox or even as a place for link exchange, i find Posterous to be the perfect solution. Kudos!

Using Windows Sharepoint Services (WSS) to create a new site

To cut to the chase, the process of creating a new subsite using WSS is as follows:

  1. Connect to the main site using SPSite.
  2. Add the new site using the Add() method on AllWebs collection.
  3. Do all kinds of magic using the newly created site.

Here is a small C# code example:

  1. SPSite rootSite = new SPSite("http://testsite");
  2. SPWeb site = rootSite.AllWebs.Add("testsub");

In order to access this site you need to visit “http://testsite/testsub”. Hope this helps!

« Previous Entries