Here we'll talk about technology. Ask questions about technology and I'll answer the questions and will post them here! Any questions can be mailed at techbiztalk@gmail.com

Thursday, February 5, 2009

Earth dives into the Ocean Depths

Well... Google did it again! The article here talks not about our earth, but the fun faceted addictive geographical software by Google - Google Earth.

I already said Google earth is really addictive. It's not been long since Google started exploring the heights of the sky... you could see the universe, explore the constellations, our solar system etc. But that's not all.

Google had explored most of the earth capturing almost every place in it's maps. I myself have so many times used the earth to trace my way back home from wherever I am. Then, with Google coming with it's maps with mobile version, every person who's fond of using GPS navigation one way or other takes help from Google's intelligent software.

Now that Google covered most of the ground, and also the skies, it's now the turn to explore the water bodies. As each one of us knows, 70% of our great planet Earth is surrounded with water, how could Google contain itself to only the rest of 30%. I knew it won't sit quite until it had made the world see the whole 100% of the Earth.

In an announcement the California Academy of Sciences, in San Francisco, the latest version of the software that's Google Earth 5.0, lets users dive deep below the surface of the sea to view ocean-floor topography. Furthermore, they can click on icons that describe aquatic ecosystems and watch, for example, videos of killer whales eating seals. "We have extended the map of the world to include the ocean parts of the world, as well as the land parts," said John Henke, Google lead for the project, in the announcement.

One of the most important persons in the latest development is Sylvia Earle, who's a renowned oceanographer and former chief scientist at the National Oceanic and Atmospheric Administration (NOAA). Earle demonstrated a number of new Google Earth features. A user can, for instance, view the migration patterns of the great white shark and see the sort of underwater terrain that the shark sees on its long journey. Earle also showed how the different ocean surface temperatures can be tracked. "You can track the importance of temperature in how El Niño and La Niña form," she said.

"The ocean data added to Google Earth includes more than 50,000 separate measurements, such as the elevation of underwater terrain and more than 20,000 extra pieces of information, including videos, pictures, and text excerpts", said Henke. "This information can be added to the virtual map using a taskbar in the software.

Eric Schmidt, Google's CEO, says that the software is more than just a fun visual demonstration. With all the information that it provides, "it's a platform for science and research, and literally understanding the future of the earth."

courtesy:
www.technologyreview.com

 

 

 

Wednesday, April 30, 2008

Detecting Browser Back Button using "javascript"

To start with, "there is no method in javascript to detect a back button pressed in browser".

The above statement is good enough to scare anyone who wants to have some functionality specifically when a user clicks on the BACK button in their browser. But I am here to tell the solution to this problem. So here it goes.

Well.. the above statement is true in case of a website where no server side code is to be used. We can implement a solution with both Server side code (like ASP/JSP/.NET/PHP etc.) and client side (i.e. javascript or vbscript)

The solution is simple. Whenever we are on a page, add that page URL to a session or an request variable as current page. Now whenever we move to another page, get the current page from session/request, save that as previous page in another session/request variable and save the current page again as current session/request variable.

Now checkout the onbeforeunload event of javascript. This event is fired whenever the page is about to unload to give way to another page. This could happen whenever a refresh button is pressed or back or forward button or any submit event from page or even clicking on a link.

When the event is fired, check whether the javascript object document.referrer is having the same value as the previous page variable in session/request. If it is, definitely back button is pressed.

:)

Following is the code in JSP and javascript.

JSP
currPage = session.getAttribute("currPage");
prevPage = currPage;
currPage = request.getRequestURI();
session.setAttribute("currPage", currPage);
session.setAttribute("prevPage", prevPage);



javascript:
var prevPage = "<%=prevPage%>"
onbeforeunload = function() {
if(document.referrer == prevPage) {
alert("Back Button Pressed");
// Do Whatever here
}
}


Enjoy.....

Labels: , , , , , , , , , , , , , , ,

 

 

 

Tuesday, April 8, 2008

SVN | Best Practices

Don’t use versioning like it were a backup tool.
I’ve heard this question too often: “Have you put your code safely on SVN?”. That’s a bad question. Storing code to an SVN server is not meant for safety, i.e. for fear of losing it. You are talking about something else, and that’s called backup. A faulty hard drive can still make you lose all your work, of course. That’s why you have to do backups, of course, but they don’t have anything to do with versioning. Hence, committing to the repository once a day, before taking off home, e.g., is not an acceptable practice, especially if you work in a team. Doing that would be like making a daily backup. An SVN commit, instead, has to have a meaning of some sort, not just “Ok, let’s store to the SVN server the work of today”. Moreover, sometimes, if the schedule is tough and the cooperation is tight, you need to commit very often so your peer will keep up with you all the time, and not just find out, at evening, that he’s got dozens conflicts after checking out your code.

Commit as soon as your changes makes a logical unit.
How often should you commit? Theres no such thing as committing too often, or too rarely. You should commit each time your changes represent a logical unit, i.e. something that makes sense. Usually that happens because you’re following a plan, when coding (because you are, aren’t you?). So, you find out a bug in the trunk, plan a strategy about how to fix it, fix it, and then commit. This makes sense because that’s a commit that fixes a bug. So that revision X is buggy, while revision X+1 is not. Don’t be shy about committing too often. Should you just find an insignificant typo in a debug string, or in a comment, don’t be afraid of committing just to fix that. Nobody will be mad at you for being precise. Consider the extreme situation in which, after months and months, you may want to remember “What was the revision where I fixed that typo in that debug string?”. If you dedicated one signle commit for the actual finite logical unit of correcting the typo, you can just scroll back your changelog and find it. But what often happens, is that people will be doing something else, and, while doing that something else, will notice the type, and correct it, and basically merge that correction with the rest of the commit, making that thing losing visibility. To make it simple: your SVN comments shouldn’t explain that you did more than one thing. If your SVN comment looks like “Fixing bugs #1234 and #1235″ or “Fixing bug #4321 and correcting typo in debug sting” then you should’ve used two commits.

Be precise and exhaustive in your commit comments.
The second most annoying thing ever is committing with blank comments. If you’re working in a team, your peer developers will be frustrated about it and possibly mad at you, or will label you in a bad way; possibly publicly humiliate you. If you’re working alone, you will experience what you’re hypothetical development companions would have: frustration in not being able to easily track down what a certain commit did. Comments in commits are important. Please be precise and explain in detail everything you did. In the optimal case, I shouldn’t need to read your code.

Never ever break the trunk.
This is probably the most annoying thing when dealing with people who can’t use versioning. Breaking the trunk is an habit that will quickly earn you the hatred of your colleagues. Think about it: if you commit a patch that breaks the trunk, and then I check it out, what am I going to do? The project won’t build so I either have to fix it, or come to your desk and complain to you. In both cases I’m wasting some time. And consider the first case again: what should I do after fixing your broken code? Commit it? Sending you a diff? If I’ll commit, chances are that you’ll have conflicts when you checkout, and you’ll have to waste time in resolving them. Maybe sending you a patch would be the best way, but still it’s a waste of time for the both of us. So the thing is: before committing, ALWAYS double check! Make a clean build and make sure that it builds. And don’t forget to add files! It’s a very common mistake: committing good code, but forgetting to add a file. You won’t realize, because the thing builds, but when I’ll checkout, I’ll have troubles, because of missing file(s).

Branch only if needed.
There are some ways to handle branches, but here’s my favorite. The most of the work should happen in the trunk, which is always sane, as stated by the previous practice, and the patches should always be small, so that they can be reviewed very easily. If you find yourself in the situation of needing to write a large patch, then you should branch it. In that way you can have small patches that will break your branch over the time, but they can be easily reviewed. After the process is completed, i.e. you’ve achieved your goal of fixing a bug or implementing a new feature, you can test the branch thoroughly, and then merge it to the trunk.

Labels: , , , , , , , , , , , , ,

 

 

 

Thursday, April 3, 2008

Nanotechnology

These days, there is too much hype about the NANO TECHNOLOGY. But what exactly is this NANO Technology?

Let's explore this technology today!

The term "NANO" refers to the mathematical exponent 10-9. Nanotechnology is a multi disciplinary field which is drawing from fields such as:
Applied Physics
Mechanical Science
Interface and Colloid Science
Device Physics
Supramolecular Chemistry
Self replicating machines and Robotics
Chemical Engineering
Mechanical Engineering
Biological Engineering
Electrical Engineer
Nano Technology is an extension of the existing sciences on a "Nano" scale.

There are two main approaches that are used in the Nanotechnology:
Bottom-Up: The materials and devices are built from molecular components which assemble themselves chemically by principles of molecular recognition.
Top-Down: The Objects are constructed from large entities without any atomic level control.

Several instruments provided aid in research and development of the nanotechnology. The developing interests in Intefaces and Colloid sciences and the use of such instruments like atomic force microscope, scanning and tunneling microscope, combined with certain refined processes for device fabrication like electronic beam lithography and molecular beam epitaxy, acted as a major development catalysts for the nanotechnology.

This developing technology is a future of present day technology.

Nokia is having a concept phone called "Morph" based on this technology. Certain examples of the same can be seen at following link:
http://www.nokia.com/A4852062

Want to watch the conceptual video of the Morph Concept? Here you go!
http://www.nokia.com/A4879144

Labels: , , , , , , , , , , , , , , , , , , ,

 

 

 

Friday, March 21, 2008

Tips and Tricks on Skype

For those who aren't aware yet, Skype is a dedicated software for making phone calls over the internet to another PC or to landlines. PC-PC calls can be absolutely free where as the PC-Landline calls come with a nominal charge. Here's a look at few tips n tricks which can enhance your Skype experience.
Checking Audio Quality
To check how you sound to the person at the other end, click on the Address bar at the bottom of the Skype window and enter echo123. Press [Enter] and the call will be made. Then whatever you'll speak, the voice will be played back. You can use this to tweak your audio recording settings.
Using PC's Internal speakers as Ringer
When your PC is in mute mode or you are using a headset for Skype, there's no way for knowing about a skype call when you are not wearing the headset. A trick is to set the Internal PC Speaker as the Skype ringer. To do so, Go to:
Tools > Options > General > Audio Settings
Under the ringing section, check the Ring PC Speaker box and click Save
Enabling Keyboard Shortcuts
Keyboard shortcuts for Skype are disabled by default. They can be enabled by selecting Tools > Options. Click Advanced and then on Hotkeys. Check the box saying Enable keyboard shortcuts. This should allow you to be able to control Skype without having it in focus.
Source: Digit (Feb 08) Tips and Tricks

Labels: , , , , , , , , , ,