20 November, 2008

Firebug – The ultimate tool for the web designer

Many of my friends were saying firebug could do that and firebug could do this. Recently, I decided to see for myself what it could and what it couldn't do. And , I must say I'm very pleased by what I saw. Firebug comes as an add-on with Firefox. Simply visit http://addons.firefox.com and get your firebug add-on. It sits just above your Firefox status bar, making it non – obtrusive and really helpful whenever you need it.


 

But the area where firebug really shines is its ability to highlight elements of the page you are viewing. Just click the "inspect" button on firebug, and wherever you take your mouse on the HTML page, the corresponding markup will be highlighted. This is really useful and priceless for a web page designer because this would save a lot of time and help you learn how someone else has coded his webpage. If you see a nifty CSS trick that you could use, just take your mouse over the element and its corresponding markup would be shown. You would be amazed to know that this works even with Javascript generated content. For example, if you generated a button at runtime. Now if you go into inspect mode, you can see the code for the Javascript that made the button what it is! This way you can get to debug your pages on the fly.



 

19 November, 2008

Is it time microsoft started making antivirus software?


 

If you use windows, you would probably have come across hundreds of security loopholes, and viruses trojans, and what not! With all this in mind, you gotta ask yourself, isnt it time microsoft started making antivirus software? I mean, windows is microsofts own creation, so no one else knows windows better than microsoft, right?


 

Confronted with the above, any microsoft employee would tell you that microsoft doesn't make application software. True, but I still think microsoft is the best company to make antivirus softwares, and it would easily rise to the top in the antivirus market.


 

With that said, why not build an antivirus along with the OS, so its fully interoperable with the OS? We windows users are anticipating the release of windows 7 in 2010. I would love to see the antivirus feature with that version of windows.

18 November, 2008

Using VS2005 IDE regular expressions for find and replace

Suppose you have redundant information such as :

, (11,12,1,5,75,1,1,'2008-10-19 00:00:00')
, (11,13,1,6,200,1,1,'2008-10-19 00:00:00')
, (11,14,1,7,50,1,1,'2008-10-19 00:00:00')
, (11,15,1,8,100,1,1,'2008-10-19 00:00:00')
, (11,16,1,9,25,1,1,'2008-10-19 00:00:00')
, (11,17,1,10,60,1,1,'2008-10-19 00:00:00')


You need to replace the first two integer fields with say 7.


Hit Ctrl + F to bring up the find and replace dialog. click on Regular expressions.


Find : [(]:z:z,:z,

Replace with : (7,

Heres a nice page about VS 2005 IDE's regular expression comparison with other regular expression 'standards':

Coding horrors take on VS IDE regular expressions


Result:
, (7,1,14,75,1,1,'2008-10-19 00:00:00')
, (7,1,15,60,1,1,'2008-10-19 00:00:00')
, (7,1,16,10,1,1,'2008-10-19 00:00:00')
, (7,1,17,25,1,1,'2008-10-19 00:00:00')
, (7,1,18,150,1,1,'2008-10-19 00:00:00')
, (7,1,19,100,1,1,'2008-10-19 00:00:00')

Net Packets Out Of Order - Expected ( xxx ), Received ( y ) error in Toad:

Toad is one of the most versatile front ends I have seen for an efficient database such as MySQL. But toad does have its rough edges. The error message "Net Packets Out Of Order - Expected ( xxx ), Received ( y )" pops up whenever the client has been opened for many hours together. There is something about the situation that makes me feel that the toad front end was made to be specifically timed with the number of packets that were recieved after a transaction is complete. That is, it estimates the number of packets that are to be recieved whenever a transaction is completed. If at all the number of packets recieved after a transaction doesnt match up with the ones expected, the above error is seen.

The problem not only arises for specific transactions but also for transactions involving a series of transactions involving a large number of unions. Yes, this is a fact.

The solution:

> The first possible solution is to copy the query and execute it in the mysql command line client. You will be happy to see that it works.

> The second solution is to restart the PC and hope that Toad is back to its helpful self again.

>
The third and last solution is to modify your query to involve fewer number of joins, or unions. This would surely solve the problem.

17 November, 2008

Simple ExtJs Grid Example 2

var store;
var temp;
Ext.onReady(function()
{

var arr=document.getElementById("hdnField1").value;
var splitter=arr.split("|");
var myData = [[splitter[0],splitter[1]]];
// create the data store
store = new Ext.data.SimpleStore
({
fields: [{name: 'Name'},{name: 'Designation'}]
});
store.loadData(myData);
// create the Grid
var grid = new Ext.grid.GridPanel
({
store: store,
columns: [{header: "Name", sortable: true, dataIndex: 'Name'},{header: "Designation", sortable: true, renderer: 'Designation'}],
stripeRows: true,height:320,width:240,title:'Array Grid'
});
grid.render('grid-example');
});

var clicked=function()
{
var TopicRecord = Ext.data.Record.create(
{name: 'Name', mapping: 'Name'},
{name: 'Designation', mapping: 'Designation'}
);

var myNewRecord = new TopicRecord({
Name: 'Do my job please',
Designation: 'noobie'
});
store.add(myNewRecord);
return false;
}

Basic structure of an ExtJS grid

Ext.onReady(function()
{
var arr=document.getElementById("hdnField1").value;
var splitter=arr.split("|");
var myData = [[splitter[0],splitter[1]]];
// create the data store
var store = new Ext.data.SimpleStore
({
fields: [{name: 'Name'},{name: 'Designation'}]
});
store.loadData(myData);
// create the Grid
var grid = new Ext.grid.GridPanel
({
store: store,
columns: [{header: "Name", sortable: true, dataIndex: 'Name'},{header: "Designation", sortable: true, renderer: 'Designation'}],
stripeRows: true,height:320,width:240,title:'Array Grid'
});
grid.render('grid-example');
});


Of course, to make this work, you have to have the extJS libraries included first.Include them as follows:

>view your HTML code, and add the Javascript tags .The ExtJS path goes into the src property of the JS tag. I will be posting many more examples of ExtJS forms here. Be on the prowl until then...

12 November, 2008

Official Gmail Blog: Say hello to Gmail voice and video chat

Official Gmail Blog: Say hello to Gmail voice and video chat

The peeps at Google just launched video and voice chat from within Gmail. I really am waiting to criticize them for this move. Turns out, the app would be using H.264 encoding so external apps can choose to speak to this service. The implementation would no doubt involve a flash player on the front end. Im yet to really see an implementation of the flash player which can capture both voice and video from the client side at the same time not making the app sluggish (which im sure Googles' newest product WILL be!) .

10 November, 2008

Rest in peace DVD?

Do you use DVDs to backup your stuff? How much can you backup in 4.5 GB of media? 4 movies (compressed)? or 2 average games?

Move over DVD, 'cause this is the age of the Blu-ray disc and the flash drives. With hard disk drives getting cheaper by the day, and the advent of the Blu-ray disc's the DVDs are set to do a vanishing act ala the floppies. It is said the Blu-ray discs can hold upto 25 GB in a single layer disc, or 50 GB in a dual layer disc. Whatever the case, all digital storage will be replaced by bigger , better , and faster media in the coming days.

Or, better yet by flash drives. You can get a flash drive these days for as low as $3, or 150 rupees. We are on the cusp of the digital age. This is when the information bubble bursts and all media, information is gonna be exchanged freely.

Better still, why do you need to backup something when its permanently available online?? What with operating systems such as you OS, coming online. You can store your music , movies and games (?) online. With the advent of megabit broadbands, all of us can expect this medium to spill over into the portable device scenario too.

08 November, 2008

What does Wikipedia want $6 million for??...Simply Outrageous!!!

I was a fan of wikipedia, and its open mind theology until 3 minutes ago. I saw a banner on the site which said "Wikipedia:Making life easier", with a Donate Now button. It also showed a progress bar marking $2 million and odd, and that its goal was to raise $6 million!!!

Please interrupt me if Im wrong here, but arent all of wikipedias' articles written by commoners like you and me? So, its a collective effort isnt it? They shouldnt be asking for donations unless to pay for server bills!! SO, WHAT DO THEY HAVE TO DO WITH $6 MILLION?? Are you donating to wikipedia? If so please STOP!! Stop this insanity in the name of free knowledge.

Wikipedia has 20 odd workers, all doing what.. building a CMS thats wikipedia. Sure, its a good source of information and all, but do they REALLY deserve $2 Million???

If your answer is YES, please check in to your nearest mental hospital. You are in need of medical attention.

07 November, 2008

Is Google really a leader in technology?

Its a common misconception that any company that does things differently is supposed to be leading a certaing segment of technology. This seems to be true in the case of Google. Now, it may be a technology giant, but the products they make are far from perfection. Each and every one of their flagship products except other than their propreitery search engine technology ofcourse, is still in BETA. Do you know what that means? The services may go offline anytime, and may be entirely scrapped if not for Googles' ad based exploits. Most of their products are plagued by inconsistensies, and lack of basic support for their other products.

Take Google Chrome for example. Its supposed to be a a "revolutionary" piece of software, and they havent yet integrated their own Google notebook with Chrome.Google offers better support for IE than for chrome right now. Now, does that say anything about their competancy, and their development practices?Clearly, Google is very farsighted in its business practices and would be outstaged and outplayed in the coming years for sure.

06 November, 2008

Blogger VS Wordpress

Last week, I decided to try out wordpress because of all the eye candy. The themes there are pretty good. The sign up page was enticing and a good experience I must say, but after that things started going downwards. The following is a list of things thats wrong with wordpress:

>Wordpress serves its own ads on your blog instead of letting you earn money by blogging. Who runs a blog just to pass time anymore,anyway?

>Doesnt let you edit your CSS unless you pay $26 per month.

>Doesnt stop serving ads until you pay for the hosting, and that too without your own domain. So, basically you'll be stuck with yourname.wordpress.com for the rest of your life!

Things blogger lacks(that wordpress revels in):

> Themes. OOO shiny blog.Me like shiny blogs!

> closeness to the user. The ambience around the site is well maintained, and welcomes the user to try out things out on his own.

Well, thats it! It also allows for importing your "OLD" blogger blog into your wordpres blog, but I wont mention that because of anomolies in the posts when importing them

02 November, 2008

Are we all ready for multimedia compression?

If you download pirated games, and warez, youll already be familiar with UWE HERKLOTZs' UHARC. If you arent, look it up on the web. Its the highest ratio compression technology ever! It can compress games of around 1 GB to around 150 MB. Thats why its called multimedia compression in the first place. I havent found songs, and other media compressed with this. I have been using it to compress data that I dont really need right now, and burning such stuff off to DVD's for later use.But you gotta ask, if its such a good compression technology, why wont WinZip or Winrar use this?

>For one, it takes a whole day to bring down 1.5 GB of data to 150 MB, not all of us may be THAT patient.

>It eats up all your processors' bandwidth to do its job.

>Compression sometimes depends on the amount of RAM available. Since Winzip and winrar are used by people who may choose to work on pentium 3's, its not gained importance...yet..

>There is absolutely no guarantee that the output would be the same as the input. Though it works for a majority of the cases, it may fail too.

27 October, 2008

Calling JavaScript functions from C#

There is perhaps no way available to do this, nor should there ever be one. This is because your C# code runs in the code behind, a repository of code to handle post backs, while your JavaScript is executing on the client side. If at all client side javascript was let to be executed from C# code, then it would be similar to AJAX RPC's! A better way to call Javascript functions is by using hidden fields. The following logic demonstrates how:


|
|-->set a hidden field


|
|-->check the value of the hidden fields for changes, if any write logic which has to execute.

Reverse the above logic, and put the javascript hidden field check so that it executes when the page gets loaded, and VOILA, you have an answer to your solution.

10 October, 2008

i = i + 1 : A ridiculous way to say increment I !

How many of you have coded in C, C#, Java or even JavaScript for that matter? If you have, then you'd probably know i=i+1 as one of your best companion when dealing with loops. Yet, I call the practice ridiculous...Why do you think that is?

For one, any programmer with a basic understanding of math would have puzzled over this question: isnt i->i+1 more meaningful than i=i+1 in a programming context? Why then do all programming languages follow the pattern of variable = variable +1?? I have no clue whatso ever, but I would reckon it is a reminiscent of the age when there were no standardized charecter sets for various programming languages and all vendors defined their own charecter sets, and standards.

And, to add to this mess, every programmer, no matter how experienced uses the counter variable named i, instinctively. Of course, he'd have to use an alternate variable to nest loops within other loops, he'd have to use another variable, and the second variable would instinctively be named j. I do not know if the collective conciousness of all programmers is at play here, for I have seen the same pattern repeating with every coder I have met over the past decade or so.. Even with me ! As we all pave way for new programming languages and techniques, I also hope that this hideous practice will be stopped, for all our sakes.

08 October, 2008

The environment?...Naah, who cares...

We humans are a filthy lot. I say this because from time immemorial, there hasn't been any one species which has filthed its own nest.. Until now. Humans are everywhere. With the unknown world shrinking and even the most remotest of remote places being explored, we arent far from colonizing every habitable patch of land on the planet. "Just because we can, we will" seems to be the attitude of our beloved fellow homosapiens.

Between all the colonization and resource exploitation, we all manage to turn a deaf ear to the environment which is literally crying for help around us. Utter stupidity if you ask me. If there is no earth, there are no humans.

We dont know half the things there is about earth that we ought to know, and yet, our kids know a lot more about alpha centauri than our earth. There have been talks of migrating out of earth and taking the human race with us, because by the time this plan solidifies, earth will be all but a nuclear waste ground. With all this knowledge and profoundness, we still continue to haunt the earth, and pollute the environment with reckless abandon. All this being said, even I myself am one of the filthy lot.

I don't use a public transport because I would then lose my convenience. I still travel to work everyday in a bike which guzzles up more fuel than the neighbors car. Im writing this in my blog because we humans will always be selfish. We never admit our mistakes and will surely not do anything to rectify what wrong we have done. All that being said, I wish all of us could switch onto more efficient means of energy such as solar / hydroelectric / Nuclear energy, all of which are limitless. But until our scientific communities can put their differences aside, and the pope can agree that physical attraction is not a crime, we will all just delay our days in cold hell...

03 October, 2008

Wow..what a life!!!

I just bagged myself a job in the .net domain... I landed a job in a company called Asclepius (name of the greek god of medicine) consulting. And I must say I was very overwhelmed by the work environment. Everyones very friendly, and people dont make a fuss of everything. This actually goes against conventional corporate culture where you are just a sheep in the crowd, and thus, no one knows you. When you enter a big company, chances are you would be oblivious as to what to do, or whom to ask...

That is just not the case with Asclepius. The timings are very flexible, and all the bosses(YES, there are three founders) are asking is for me to do my job and go home. Currently, the companies is expanding rigorously, so theres no doubt about job guarantee and some such thing. The bosses said they wanted me to be with the company for atleast 2 years. There is no concept of control at all in the company. All in all, Im very happy that the tech lead knows my name and is happy everytime I speak...

What more would you ask in a company when its your first job?

14 September, 2008

Alternatives to resource hungry programs

Who better at a job, to use a tool, than a man who created the tool right? WRONG! I have seen many cases of this.

>First off, is Adobe's acrobat reader. The resource hungry proggie does little to enhance readability, and takes long times to load images within a PDF file. Moreover, the reader doesnt even provide a PDF "document printer", that other open source proggies provide, which enable users to "print" into PDF files from any other format. I stumbled on a software called "Foxit Reader". Better than Acrobat Id say...

>This isnt an isolated case. I have found OpenOffice .org to be much more flexible than MS office, simply because it is free, and platform independent. So, I dont have to use an emulator on a virtual machine within my linux box to get the same environment.

>Adobes' Photoshop finds a worthy alternative in Gimp, which comes bundled with most Linux distros these days. Its free, as in freedom :) in addition to being very fast, and responsive..


So, tell me brothers and sisters of cyberspace, would you go about using a proggie that hogs up all of your memory, and is not free, as opposed to open source, FREE alternatives that are both fast, and compatible with their paid rivals' file formats?

12 September, 2008

Googles Chrome

Chrome? Nice nomencleature for a sub-standard browser Id say. What do you want in a browser? Not a funky GUI, not a browser integrated with an advertising campaign, to make the parent company richer by a million dollars, and certainly not a DOM inspector! Googles chrome is less of a browser and more of an advertising campaign if you ask me! It has Googles search engine built-in, and you get to search and type in URLs in the same bar, but whats the use? Its like re-inventing the wheel... Chrome doesnt have what firefox and IE or even Opera for that matter, havent had yet.. Google claims its faster than all other browsers, and even goes onto give a "task manager" option which shows the memory consumption, possibly per tab of both Chrome, and all other browsers that are open. But I could SWEAR that the chrome was a lot slower than Opera. Im not an opera fanatic or something like that, but yeah, Opera is simply THE BEST window to the world wide web around. It uses full bandwidth when browsing, and even has a built in download manager, and adding to this, is its bit torrent protocol support ! Opera even has an option to pause downloads, even though, rarely, the downloads dont resume properly, but a decent attempt has been made! Now, what would you equate Chrome to? Show of hands kids?? "JUNK".. very good!!

01 September, 2008

Just got myself a job in the Java/J2EE, AJAX domain!

I am elated that I found a job in a company called kingslake. Its based out of Sri Lanka and is looking for a foothold in India. It has major clients in Malaysiya and Singapore...

The US recession is nothing but hypothetical in a sense that not all software firms have run out of business, and not everyone is asking their employees to leave. I was appaled at the fact that Sapient didnt even ask us to go in for training, as it was running out of projects. And to think, I hadnt been recruited through some walk in interview. I had been recruited on campus. I didnt go to them, they came to me. This further testifies the appaling conditions of jobs in India, especially jobs in the software domain. BPO s have been the major winners in this race because a majority of people who find it hard to get into a software firm would get into the BPO jobs. Thanks a lot America!

My base salary might not be THAT good, but I have some hopes pinned on the future. I enjoy working with AJAX and this will provide me with an excellent opportunity to work with it, adding some weightage to my resume/ CV.

23 August, 2008

Time Scale theory: Are software companies producing obselete software?

First of all, I would like to thank IOLO for making a wonderful software (System Mechanic). But with new versions getting released everyday you have GOT to ask yourself. Is the software you're buying worth the money? Sure, you get future upgrades for free. Im not denying that. But what is it about the future upgrades that makes you WANT to buy the software so much? Possibilities:

> Better user interfaces

> Better functionality

> Faster (?) than previous versions

> Supposed "overall" upgrades

Personally, I just stick to the first version of any software I use (that is barring windows of course!). Similarly, I was very impressed with System Mechanic 6.0 when it first came out. Even though IOLO came out with System Mechanic 7.0 and version 8 is on the docks, I still love the UI in System Mechanic 6.0 . Why? Due to the simple fact that I found this software worthwhile, unlike its
successors. This isnt just the case of IOLO and System Mechanic. Its the same with Nero 8. The software is jam packed with features that I dont use, and these end up hogging memory, installing shell extensions that I dont use, and in turn, I have to labor hard to uninstall these to keep my installations to the bare minimum. So, Why not just stick to the previous versions?This goes for each and every software I have used.
There is a theory I recently made up. Its called the "Time Scale Theory".It goes something like this:

"There is a peak in every software company's production cycle. At this peak, the software company has built up enough reputation to sell its most endorsed product in quantities of millions. It makes a lot of money and repute. After this peak time is over, the company merely survives on its earlier reputation. Any software produced henceforth will be completely obselete and will add features to make users' experiences worse than the previous versions."

The same thing goes for IOLO(System Mechanic 6.0), MicroSoft(Windows XP-Current, excluding windows Vista), IBM(The peak time seems to be neverending!, but it will end nonetheless!), Google(In its peak right now).