Tuesday, December 23, 2008

Cisco code under trouble

WHAM!!!

What a bad luck! Read on.. :)

A chip company had an Ethernet controller chip, and they engaged outsourcers in a Far East country to develop some software drivers for it. They sold the chip, together with the software drivers of course, to a company called Linksys, which incorporated it into the design of their four-port router. It was one of the most popular of the smaller routers. In the process of doing this, Linksys added their own code around these software drivers and then they marketed the unit. It just so happens that the outsourcer the chip company had employed at some point inserted a piece of code subject to a GNU General Public License, or GNU GPL.

One of the properties of the GPL license is that you can use it and you don't have to pay anything, but any code that's written around this piece of code, and any modifications or derivations of the code, also become GPL. That means that you have to make the code publicly available. You basically must open up your code. Now Linksys probably wasn't aware that they had such code. Then, of course, Cisco acquired Linksys and inherited the technology and the router and the code. Cisco then began using the code in other sections of their own products. So, suddenly, a whole bunch of products at Cisco are now 'contaminated' with GPL code, which means that Cisco is in the unenviable position of having to 'open up' their valuable proprietary code to the public.

Saturday, December 20, 2008

Coming up: FRen

I have always been in search of open source tools for file/folder renaming purpose. There was a time when I created one for my own, but that ran in console mode. I googled many time to find good tools but most of them are shareware/adware/paid. Those which I found good/useful were overly complex in user interface. Like this guy - he has done good job and has wonderful ideas. But the tool is so buggy that after few uses I found my songs turned into documents and the videos turned into songs and so on. I find it very useful to lose my documents. Very risky!! Though its in beta, but I find it too cluttered and confusing to be released as beta.

So, I decided to begin from scratch and spin the wheel again. I am following the ideas of Ken's Rename tool only, but highly robust.

Please suggest ideas if you have faced challenges in using such tools and what would you like it to do. Hint: Check Ken's Rename tool.

Wednesday, November 12, 2008

How to configure applications without IP dependency

Many times we migrate machines/VMWare images from one place to another, affecting their domain and IPs. Sometimes we just fancy a different name for the machine. In both cases, the applications installed on that machine which are sensitive to the IP or machine name are required to be reconfigured. Siebel Ent. Applications is one of such products. However, the solution to such situations is very simple.

The problem can be divided in to two situations -
1. IP changes.
2. Machine name changes.

The following trick should be performed before the above changes to keep the matters simple.

In the "host(s)" file (found in etc sub-folder on *nix and %windir%\system32\drivers\etc on Windows NTs), add a new machine name for the same machine IP address. Use this "new machine name" while configuring the applications, wherever required.

1. In case of IP change-
Change the IP for all the machine names in the hosts file for the same network adapter. Replace all the instances of the old IP to new one.

2. In case of machine name change -
Nothing needs to be done!

Wednesday, October 1, 2008

OOO

:)
I am traveling back to home for 2 weeks. Hope to see you here when I come back :)

Take care fellas!

Tuesday, September 23, 2008

Uno in C#

Finally! Such a relief!

I have been trying to create the project on Sourceforge for my game. Somehow, I couldn't upload the source code.. till now. The link to the game project is here.

Right now, I am trying to develop a web site for it =)

Saturday, September 6, 2008

Modifying templates

Donn is definitely confused with new blogger template :D

His question is, "How can I change text comments to something else?"

Before I start, I must warn you that you will be tampering with your blogger's template. Any customization already done on it might be lost. Please take backup of your template before you modify it.


For old template users –
Open up your template in an editor. Search for text <$I18NNumComments$>
Replace it with <$BlogItemCommentCount$> comments


For new template users –
You can replace <data:top.commentlabel> with comment
And <data:top.commentlabelplural> with comments

Notice the plural nature of the latter.


Hope you find the above texts easily :)
Noobs can stop reading here now =P



Caution:
When you replace the texts, try to pad the code with angle brackets with at least one space to its left and right ends. The reason is something like this - HTML is messy.
These patterns in blogger code are not treated nicely all the time.
>>
<<
><

There is high probability of not seeing the results in expected manner.

The correction can be done like this - by inserting a space in between the angle brackets.
>&nbsp;>
<&nbsp;<
>&nbsp;<


Now, just in case you are wondering where the heck is space here, I should tell noobs :P that &nbsp; is equivalent of single space character. Its better to code this way than relying on normal coding because the blogger engine is designed to work this way. Its simple and robust.
If you are not sure what ever code you wrote is going to be interpreted correctly by blogger, then use this site for converting it to blogger friendly (and not so human friendly) code.



You just need to read carefully the template. It would become very easy to modify the content once you take some time to understand the basic structure.
Read this for more help.

Friday, September 5, 2008

Regex problem

Geeeeezz!

It took me so long to understand the difference between \w and \b in Regular Expressions!!!

Although both mark the word boundary, \b is more effective (IMHO). Try search whole word text which is just at the end of a text file. Something like,

....
blah blah blah
....
blah<eof>


If you are searching for text 'blah' (notice the one at the end of file) then \w will skip it. So, better use \b!!

Regex re = new Regex(@"\bblah\b");


Happy coding! =)

Wednesday, September 3, 2008

Google Chrome!

You have to see this!

Check Google Chrome - the latest free browser. Its extremely fast and lightweight, probably because it lacks plugins and many other features (like it failed Java tests). Though it offers spelling correction, it doesn't offer the alternatives yet, leaving user to wonder what is wrong with what he typed.

Mind that it is new and in early stages and that makes it not really worthy of being compared to FF or IE or any other standard browser for that matter. But the speed, light-weight, sleek design make it my instant favourite!

But I am going to stick to FF for the love of extremely customizable interface and its robustness. I must say I missed greasemonkey the moment I started GC.

I really hope Google keeps up the good work and give us more customizable version with the lightness and speed of it's current version.

Saturday, August 30, 2008

Understand. Learn. Progress.



I think this is really of the best lessons ever taught on TED. Simply because, after the problems are reported, very effective solutions have also been suggested. Now only if people open their ears and minds, this would definitely make world a livable place for our children.

Anybody listening? I am!

Friday, August 29, 2008

If you steal...

A must read -> link

A group of people sit and decide that giving away for free is illegal and taking money for it is good. Of course, why not? You get MONEY!!


And then they sell intelligence. Hurry, people, you might be losing your minds!
Buy it!

Tuesday, August 19, 2008

Yippie!!

Telecom regulator TRAI [Telecom Regulatory Authority of India] yesterday allowed ISPs to offer unrestricted internet telephony services, a move that will further boost competition in the domestic long distance segment and lower STD tariffs.

As per the TRAI recommendations, the STD service providers would be connected to ISPs through public internet for the purpose and the two service providers would have mutual agreement for the same.

The move will permit calls from personal computers to fixed line and mobile phones.

Currently, a voice call can travel between two computers but not from a mobile or a fixed phone. This is expected to open huge channels of revenues for Internet Service Providers (ISPs). In India, it is legal to use VoIP, but it is illegal to have VoIP gateways inside India. This effectively means that people who have PCs can use them to make a VoIP call to any number, but if the remote side is a normal phone, the gateway that converts the VoIP call to a POTS call should not be inside India.



The Telecom Engineering Centre (TEC), a technical arm of Department of Telecom, will work out the number plan for the ISPs to enable them to offer telephone services.

Telephone numbers from identified blocks shall be allocated to ISPs, Unified Access Service Providers, Basic Service Providers and Cellular Mobile Service Providers for internet telephony,”. With a view to make internet telephony secure, all ISPs interested to provide unrestricted internet telephony would install “Lawful Interception” equipments, TRAI said.


* This is a fantastic move in recognizing the technical achievements of internet. India is progressing much better :)

Thursday, August 7, 2008

Morons

Its weird. Its late. Its bed time. 8-/

But I had this question in my mind since afternoon when I got the news that my colleague has been given official warning to remove the tons of applications that he has installed in his laptop (which according to IT dept. was the reason of its jerky performance).

Now, this is totally idiotic!! x-(

I mean, we work for software industry and we cannot live without multiple applications sitting in the computer, even though its not even activated 70% of the time. But we need them! Damn the policies - you can't use public chats, no personal networking, no music, no videos. But you can't even use Firefox?? And who the f*ck called it a pirated software???? God! Do you even hear what you say? Darn you managers and idiots in IT dept. - you suck big time.

And I am not any less bull-headed than a real bull. I am challenging them to prove that the softwares we have installed are pirated or not licensed. Ha! You can't do that x-P !! And we are developers. How are you going to stop us from writing our own stuffs and using them without notifying IT of the new-kids-in-town? Yeah, yeah, I heard you say that it would be okay because we wrote them. CRAP! Do you think (L)GPL based sourceforge projects are different from what we write - are they really viruses and trojans put up on public display hoping idiots like us will use them without knowing the risks? Get a f*cking life!!

I think I should start writing my new resume. A company which doesn't feel that they hired responsible employees doesn't grow at all.

But when was it that they ever trusted us? Huh?!!

Friday, June 13, 2008

Recent Comment Widget 2.0

I was recently updating my blog, and wondered if there is a way to know the what recent comments have been made. You can do that if you get the RSS feed for comments.

Beautifulbeta has the tool already made. The link is here. I was very happy to find that serves my purpose.

Then I realized that it could be much better. If I had to check the recent comments widget's output, I had to reload the whole page. It can be real pain if your blog is on bit heavy dose of scripts and widgets.


I understood the code and found that it needs modification for better performance. The idea was to create a link/button which will activate the comment loading function and update that widget only. It took me 4 days to write the code, since I am not excellent at JavaScript.

The final output has been tested and its working on FF and IE. No other browser was tested.

The link to the javascript source is -> updateCommentsNew

You will need to add a widget to the intended place. The details are mentioned here. Once you have installed the original widget, you will need to make few changes. Don't forget to save the customized setting done to the original widget before changing it.

Open the widget code and replace the code with the following -
<script src='http://mywebsite/scripts/updateCommentsNew.js' type='text/javascript'/>
<script style="text/javascript">var numcomments = 5;var showcommentdate = true;var showposttitle = true;var numchars = 100;var standardstyling = true;</script>
<script src="http://<your-blog-address>.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments2"></script>


Then edit the expanded HTML code of the blog. Find the widget that you just added. The one I added looks like this -
<b:widget id='HTML2' locked='false' title='Recent Comments' type='HTML'>
When you have located it, find this text immediately after it -
<h2 class='title'><data:title/></h2>
Now, we will add the button/link next to it. Replace the above text with -
<h2 class='title'><data:title/></h2> <a href='javascript:updateComments();'>Update</a>
** Check update below.

After this, you have to look for this piece of text after the location where you made the change -
<div class='widget-content'

Replace it with this -
<div class='widget-content' id='recentcomments' name='recentcomments'

Notice that the recentcomments is the ID of the widget. If you are already using this ID somewhere else, please change the name to something else. You will also need to change my script which looks for this ID.

In the head of the HTML code, include my script file. For example -
<script src='http://mywebsite/scripts/updateCommentsNew.js' type='text/javascript'/>

Save the changes and reload the blog. Look for the new widget. The comments should be visible there. Whenever you need to refresh it, just click the link/button created (in the above example its Update link).

Hope everything works fine :)

[Update]
I just noticed a bug in the script that I had uploaded. My blog was hard-coded in it. It has been corrected. So, in order to use the modified script, change the "Update" link code to -
<a href='javascript:updateComments(&quot;http://<your-blog-name>.blogspot.com&quot;);'>Update</a>
You can see the widget in action in the sidebar.
Have fun! :)

Tuesday, March 18, 2008

Making IP assignment easy

I got a request from team to create a tool for easy IP address assignment to the networked machine running on windows XP or 2003.

This was easy and great fun to use WMI for rapid development of the tool.

Description
It sets static IP, subnet and gateway to a selected network adapter on a computer running windows XP/2003. Vista has not been tested yet.

If you need to assign static IP to the machines without logging into each system via RDC/VNC, you can use this tool to work faster.

The data about the computers need to be provided though. That can be done in the INI file which comes with the application. The entry in the INI file is like this...
<ip or hostname>=<admin_user_name>,<password>,<domain>


Example -
135.27.117.113=myadmin,mypass,lab

Add all the entries in the [Computers] category only inside INI file.


Note: Keep the INI file in the same folder where you will keep the executable.




Changes from v1.0 -
* Rewritten in .NET 1.1 (v1.0 was in VB6)
* Can work with multiple computers instead of copying the program into each and every one of them (login data still required)
* INI support for faster operation (and not manual logging)

Requirements: .NET 1.1

Limitations:
* Works with windows XP/2003 machines only
* Requires network connectivity
* Password not encrypted

File Link: IPStatic-v2.0.rar