This post was started a while back when Apple sued HTC and their use of Android Mobile Operating System. Since then Windows to has sued Mobile Phone Makers that has used Android (and not Windows).
This whole patent “shit” is driving me more or less insane.
When I started this post I was reading the lawsuit from Apple on the HTC Android software and just read the breach of the 721 patent.
And seriously it really pisses me off. I am this -><- (possibly 1mm) close to apply for a pattern on how to move sprites interrupted which I did on my Commodore 64 back in the days. That breach in which Apple is putting their lawyers to work with is really that stupid.
According to the claim the 721-patent is: “the 721 patent relates generally to means of allowing computer programs running one process to access objects that are located within a different process”
If you are a developer I have a feeling that you are in deep shit at the moment. Reading the different patent breaches in the claim from the BAD Apple I am wondering if it is really safe to write object oriented programs or do procedural programming.
So many of these breaches is so stupid that I mean the judge has to be more like a kindergarten teacher telling the BAD Apple to calm down, rather than having to be a judge.
I really, really, really, REALLY hope that BAD Apple is loosing this lawsuit. Not because I am an Android phone owner, but because I am a developer, and I don’t want to find a new job just because an idiot from California who hasn’t written a program in his life is sitting on a few stupid patents. And I really, REALLY hope it does something really, REALLY bad to their reputation.
Now we’ve also gotten the BAD Oracle to the table as well. They are suing Google for developing a branch/fork (whatever) of Java in order to come up with the Android Operating System. Oracle has bought all rights to Java from Sun and are now doing what they can to get some of their investments back.
I read somewhere that some of the patents that Sun (and their developers) have registered related to Java are of the sort ‘I wonder if we could pattent this’, and so undermining the whole IT-patent (industry?).
Again, I hope that all these lawsuits related to Android/Java/Linux comes to an end. Some say that it is there to protect their intelligent property (now, what’s intelligent about a file system that does not allow you to copy/move a file larger than 4 gb (as in Fat32)) and their investment in developing their fantastic system…
What these last lawsuits has shown is that the pattents is not there to protect intelligent property, but the (already) wealthy wallets of large IT corporations (like the BAD Oracle, the BAD Apple and the BAD Microsoft).


PHP-Tip: Commenting your code
This really isn’t a PHP-tip, but more like a programming tip. But since I do most of my development in PHP (and some in C#, and some on VB) I put it up as a PHP-tip. So there.
This post is all about commenting. Some do it, some don’t. I tend to do it. Sometimes I even comment to much. But that’s sometimes better than not doing it at all.
Why should you comment your code:
I posted this on twitter and I got an answer from Frank W. Zammetti (fzammetti): “The person that wrote this is a grade A a**hole… oh wait, it was me!” I wrote that one once.
I just couldn’t stop laughing.
This is my style of commenting (example in PHP/C/C++/C#-style)
My first line in the file is always the name of the file. This is a habit I’ve grown to use. It is smart when you are editing code in e.g. VI where you not necessary get the name of the file in the titlebar.
// name-of-file.php
Next comes a general description of what the code in the file shall do:
/**
* This file is used to create and edit blog posts
*
Eclipse, Komodo-IDE and NetBeans (And probably other IDEs) supports @todo in the comment. By adding this "tag" you add tasks to your tasks list.
I tend to add tasks in the beginning of the file.
* @todo: This file need some work.
* @todo: Fix the code related to creating blog posts
In the same area I also write out bugs that I have fixed, or tasks that I have completed:
* FIXES:
* 01.01.2010: Fixed a bug related to updating a blogpost
* 17.05.2010: Translated all of the comments from Norwegian to English
*/
(note/suggestion) I wouldn't mind if the IDEs could have a @fixed element that I could add to the end of the line so that the IDE could mark out the task as completed.
Then in the code I can comment like this (note that PHP-example is just as an example here):
// Fixing the string so that it is ready for SQL-input
$string = mysql_real_escape_string($string);
// Creating a string for a dropdown-menu.
foreach ($this as $that) {
$string .= $that;
}
I also sometimes use comments to clear my head or to get a clear overview of the task at hand. This is especially important when you feel that the task is complicated.
An example could be:
/**
* In this section we shall create the tree-view.
* We must remember that all nodes starting with W shall be at the top
* And that we shall mark posts with pictures with a (p) or a small icon
* Also remember that no lines can be longer than 25 characters. Check the left syntax in mySQL...
*/
This is also good practice when you sometimes do not return to the code in a couple of days. An example could be:
/**
* continue here on Monday.
* The idea behind the following section is ... .... .. . . ..
*/
Hope this post regarding commenting your code is of any help for you. If you have any great examples of self criticism in your code, please do post them as comments... (No pun intended)