Thursday, May 31, 2007

Microsoft's Suing Threat



If Microsoft is facing unfavorable market trends, guess what they need do is to put on their creative hat and innovate instead of litigate as they are planning to do with their threat to "take on" free software based on uncertified allegations of patent infringement.

We know vista isn’t doing superb. We know that the desktop isn’t the gold spot it used to be; the internet is and the value resides there now. And we know that Microsoft is fighting tooth and nail plus everything else to get a share of this sumptuous market (Microsoft’s biggest acquisition ever: aQuantive, attest to this).

But putting up a fight and acting threatening is not the way to go, in fact it is a bad idea.

Microsoft needs to understand that the monopolistic era is over and acting like a bully who single-handedly snuffed Netscape out of the market won't be of much help in recent times. The landscape has changed.

Cue should be taken from a company like sun. A company that was faced with unfavorable market trends some couple of years back with the core solaris operating system. Instead of putting up a fight, threatening, fuming and bluffing (like the Redmond behemoth seems to be doing); they reevaluated their business model and reconsidered their source of value. They recreated part of their business model. In other words, they were creative.

They are now better for it today. The community behind openSolaris is growing, ODF is gaining greater adoption and Java is finding its way into almost everywhere (learnt javaONE is today’s world's largest open source developer conference).


Microsoft might just find itself dying off with this entire attitude that is pro-monopolistic and ‘anti open source’ in nature because in today’s world, the community (which open source initiative enjoys) is a major propagator of value.

Microsoft needs to take this into serious consideration.

Monday, May 21, 2007

Toggling tinyMCE



Downloaded tinyMCE (V.2.0.8) and went straight to the docs to see if or better still how I can initiate the editor instance such that it toggles on and off with the clicking of a button or another event for that matter.

After going through the docs that came with the download, learnt that the editor instance is initiated with the following codes:

tinyMCE.init({
mode : "textareas"
})


And the mode determines the method I have for calling the editor instance. So I looked further to see the different options/modes that I have. According to the docs I have just three options which are:

  • textarea: which converts all textarea elements to editors when the page loads.

  • specific_textareas: Converts all textarea elements with the ‘textarea_trigger’ attribute set to "true".

  • Exact: Converts only explicit elements, these are listed in the elements option. These elements can be any kind for example textareas or divs.


Which, apparently does not include any option for what I want to achieve; a toggle-able text editor instance. After further ransacking through the docs I realized that there was no provision for what I wanted, I decided I was left with one option; which is to tweak the codes to get what I wanted.

So I looked at the initiating code and since it’s just Javascript, I thought if I wrap it in a function and attach the function to an ‘onclick’ event then I will have achieved my aim. I was so wrong. Instead of it working I got myself a blank and frozen page each time I clicked the button.

Since this post is to show how to toggle tinyMCE with a click, and not to lament about my travails, I will save you all the unpleasant details of what I went through trying to tweak the initiation and just go straight to the point.

So how do you do it?

After my futile attempts I decided to ask around for a solution. This is when I found out that there is a fourth 'mode option' apart from the three specified in the docs. This is:

tinyMCE.init({
mode : "none"
})

It is my finding of this mode option and two other methods that solved the problem.

This is how to use the two methods in creating a toggle-able editor:

First method adds the editor instance.

tinyMCE.addMCEControl(element to be toggled, id given to the editor instance);

Where element to be toggled is the element that will be converted to the tinyMCE instance and the other parameter is the id to be given to the editor instance. This parameter is useful because it will be used in getting a handle on the editor when it is to be removed.

Second method removes the editor instance

tinyMCE.removeMCEControl(id of the editor)

Where id of the editor is used in determining the editor instance to remove and it can be returned by this method: tinyMCE.getEditorId(EditorsID) where EditorsID is the second parameter that was specified for the tinyMCE.addMCEControl() method. I.e. it is the id given to the editor.

Having seen the two methods, here is how the final offering will look like:


var tinyMCEmode = false;

function toggle(editorsId)
{
//check if there is already an instance of the editor
if (tinyMCEmode)
{
//if yes then remove it
tinyMCE.removeMCEControl(tinyMCE.getEditorId(editorsId));
//indicate that editor has been removed
tinyMCEmode = false;
}
else
{
//add the editor instance
tinyMCE.addMCEControl(document.getElementById('geekabyte'), editorsId);
//indicate that editor has been added
tinyMCEmode = true;
}
}

Where ‘geekabyte’ is the id given to the html element that will take on the editor instance. The HTML attached to the following script may look like this:

<body>
<div id='geekabyte'>
</div>
<form>
<input type='button' value='toggle' onclick='toggle("newgeekabyte")'/>
</form>
</body>

Breezing Away With Miles Davis



For the past couple of days now, I have found myself listening to Miles Davis back to back. The dude so soulfully, jazzy and smooth. I have been silently wishing for more tracks of his; and well, you know what they say about the universe responding to your wishes? I just found out my new neighbor is also a big fan of Miles, and he just happily shared with me a trailer load of tracks: more like a discography!

Well, when music so soulful, you will always want more!

And for you folks who don't know who Miles Davis was, you can read up on him here

Monday, May 14, 2007

Problems With API's

Timba has a blog post where he made mention of the unreliability of API’s, expressing his reluctance to build applications on them since most platform vendors have this obnoxious habit of not making newer versions of their API’s backward compatible; Breaking applications that already exist on older versions.

I quite agree with him. Facebook isn’t the only one guilty of this crime. Amazon and Google are other API providers who have, on the sudden release of new and backward incompatible versions of their services, caused developers to scramble to rescue their applications from the hands of vagrant APIs.

Guess we are having such scenarios due to the fact that providing API isn’t much of serious business yet and as such, platform vendors don’t take into consideration applications already built on top of their services. The maturity needed to warrant such consideration has not yet set into the service vending model. So you can have a platform vendor change the structure of their API overnight without notification, after all, you didn’t pay a dime.

Not that having a free service should authorize such thoughtless treatment on the part of those who consume them but having a paid service will do a lot in instilling a level of maturity into the model. And when we have more of API’s being pushed to market a larger service, just like Microsoft is doing with their video streaming services, we will have more stable API’s.

Generally I feel it’s pathetic and unethical for vendors to be such a pain.

Dare Obasonjo also has a blog post on this issue in which he stated that:

“One of the primary goals of a platform vendor is to ensure that the lives of developers on their platform are as easy and smooth as possible. This means releasing a new version of the platform should not cause developers who have taken a bet on the platform to have to rewrite their code.”


He then went ahead to propose guidelines that might help in preventing the issue of backward incompatibility. His post makes do for good reading.

Preaching the Gospel of Technology…




I’ve been away for a while.

Yeah after spending some period of idleness in Ibadan, I decided to move to Ife to get some work into my system. And sure, I've found myself in one activity or the other ever since i got to Ife; the talks I've being giving being inclusive.

Apart from the saddled task of designing a new look and feel for my college website, I have been present at seminars and workshops organized to sensitize youth corpers on the need to embrace Information Technology. Making them see the change information Technology has wrought and the reason to have a destructive mentality according to the words of Tom Peters in his book: Re-Imagine!

It has been a good time: enjoyed myself and enjoyed showing my audience that their jobs are at the risk of been snatched away from them, to be given to computer software or handed over to folks residing on the other side of the globe. And it has been fun getting the initial Luddite reaction which then always leads to questions on how to move up on the skill-chain or how to be the folks catching jobs been flung from the other side of the globe.

I look forward to having more of these seminars. But wait, while I was away, what was it about Microsoft buying Yahoo! And then again, what is this d*mn thing called Silverlight that folks are hollering about?