Thursday, August 21, 2008

Adam's Apple - Apple's Mac

Well... time seems to running on a more speedy phase, relatively to the life before stating placement. Monday starts with a new brief and... then already times-up for friday night pub! Days are so exciting and filled up goes past – really fast – just like a DSL bootup on a uni lab PC! ;)

Working with some fixes for a Mac version of the software found a bit tricky. When Mac creators and it's tiny number of users (tag:stupid) are the only people who take Mac as something serious, at times its a pain to satisfy their kiddish requirements. (not to mention mess between intel based macs and ppcs) And the Sun doesn't seems to bother much over Mac and therefore Mac JVM still has several glitches over how Mac usually work, look & feel.

Recently I had to build up my own customized confirmation dialog by extending JOptionPane just because the JOptionPane doesn't look & feel like Mac even with systems native look and feel. The fact is that developers at Sun doesn't give much shit about Mac, it's ok... I totally understand!

Anyway extending the JoptionPane saved me from extra effort to handle thread execution, etc which I will have to worry about if I started a dialog box from scratch. But then again JOptionPane didnt allowed me to place my buttons as I need, which was a requirement in apple gui to keep safe distance between safe option buttons and the destructive option. :S

Actually imitating the read message pane for a mac app can be done in with a glass pane in java so the message pane would be “fixed” to the relevant window. Apple fans say it is so user friendly because users know which message box is from which application. Quite true… for apple. But for other platforms users are intelligent enough to know what they were doing! [no, don’t worry I wont start on the mac menu bar!]

Well in Apple human interface guidelines they do clearly describe how their own things appears so others are expected to make things that way. Quite detailed and I like it. Despite of all the trouble it takes to re-invent wheels of a bit different shapes, etc... the end results looks quite fine. But not all project can afford that much of extra effort, its not only a game of tech... but a mix of real life too. To think about it... “Lucky developers!” ;)

Wednesday, July 30, 2008

"these software people are crazy..." (tap! tap!! tap!!!)

...obilix would say, if he ever stay tuned with any RSS feeds of the IT industry.
There are so many funny things happening arround,... well...
.. that San Fransisco network guy(name: Childs!) who has changed admin passwords to the whole city network and how officials act/comment on various aspects....
... then cuil search engine.. with indexes 3times bigger than google's, somehow manage to come up with non-relevant results/pics all the time...and whats more... when i searched with my name in the box, it asked me to "try to think of different words to describe your search." :D now im very much greatful to google and yahoo who tops me up with the right results...
... then google knol, finally sees the light, as a complete infant.. reminds of my cousin's baby who smiles for anything u say!
... well there are so much out there... after reading.. most of it comes down to a cartoon i've got via mail long time back (below). Explans a lot of things around.. rite? ;)



(i dont have copyright info for this, but the auther owns it for real for his great work.)

Monday, July 28, 2008

Trainee Software Engineer...

...was found to be an (highly) interesting role. Being new to the real.... "world" and/or "art" of software, there's always some thing challenging and new to learn. One of things you would immediately notice is, the limitations you have imposed to you by yourself on selected technologies is not a real fact anymore. You should be able to get things done, in the right way, using the best technologies for the task. And time for traditional "learning before using" doesn't seems to exist with in practical dimensions.

another thing i noticed is the automatic transformation of attitude towards industrial ethics. Even before you know, you would bind your self to stick to legal use of software,...well basically you don't visit to those bookmarked crack sites the way you used to be... if u not gonna buy it..jus use that foss alternative.

experience n exposure is at ultimate level... only doubt is whether you can slow down in the process to capture the maximum of it. and if gonna write all about it... (scratching head wit a lame smile!)

Well the best part of the whole scenario is... you get paid for doing what you love to do! isnt that just awsome?! :)

Sunday, July 6, 2008

in aeturnum

well... the industrial placement starts!

Aeturnum is a type of place that suits a person like me, i suppose. Middle scale software company that is in mid-early stages of expanding and growth. Different kind of projects that are progressing at different phases and stages. Gives more exposure to various aspects of project life cycle as well as wide variety of technologies. And hopefully, a place where you can do some work that matters.

So at first... out of blue... had to be assigned to some urgent task with a lot of analysis of existing code and producing model documents/specs. Code is a part of a development framework... which made the task challenging and exciting.

Tools used were EA (Enterprise Architect by Sparxsystems) that comes with a really good (built-in) guide that also touches some UML reference. That guide really got me start my work fast, especially bcz i was never been happy learning anything related to model documents during last two years of learning.

So far... life is good... and its good.

Wednesday, May 21, 2008

How to Write & Read from Windows Registry using C#?

So we need to store our settings!

Since writing to INI files is kind of out dated, writing settings to the windows registry seems to be good enough. (its not new, even windows 3.1 had it... and the whole reg thing seems to be getting out dated too... lets forget about that and assume its good for the moment.)


So How to write & read from Windows Registry using C#?

I can straight away give you the code... but that doesn't seem to be not quite satisfying.

For those who are not familiar with Windows Registry, i'd give a simple briefing here.


Windows registry is the hive of logical information where windows OS it self and other applications keep their settings/configuration/etc data stored.


CAUTION: Making un-necessary changes to the existing registry items may cause malfunctioning of Windows OS or other applications. So beware!


Windows registry is designed in a hierarchical structure, with keys, sub keys and different types of values stored inside keys.

Following screenshot is an illustrated view of windows registry, that will give u a basic idea.




[click on image to see in full size]
What you see there is the windows built in registry editor (regedit.exe) u can use it to manually edit/view registry.

Windows registry is separated into several sections catering several purposes.

Sections/hives are as follows:

HKEY_CLASSES_ROOT (HKCR) - stores information about reged applications; file associations, OLE Object Class IDs.
HKEY_CURRENT_USER (HKCU) - stores settings specific to the currently logged-in user.
HKEY_LOCAL_MACHINE (HKLM)- stores settings that are general to all users on the computer. Contains four subkeys, SAM, SECURITY, SOFTWARE and SYSTEM. Subkey, HARDWARE, is volatile and is created dynamically.
HKEY_USERS (HKU) - contains subkeys corresponding to the HKEY_CURRENT_USER keys for each user profile actively loaded on the machine
HKEY_CURRENT_CONFIG - contains information gathered at runtime, compiled at boot; information stored in this key is not permanently stored.
HKEY_PERFORMANCE_DATA - provides runtime information into performance data provided by either the NT kernel itself or other programs that provide performance data. This key is not displayed in the Registry Editor, but it is visible through the registry functions in the Windows API.

So now you can decide where u gonna store your reg values.

Then lets get into business! Here goes the code:
(These code snippets uses, "Microsoft.Win32" namespace.)

Writing a Key to Registry
=========================
///
/// Method to write a key & values to windows registry
///

private void writeReg()
{
// definition of registry key - keylevel node
// notice that here we are creating key in "CurrentUser"... u can alter this to suite your needs.
RegistryKey myKey = Registry.CurrentUser.CreateSubKey("SOFTWARE\\TestKey\\TestSubKey");
// check whether the key already exists
if (myKey == null)
{
MessageBox.Show("Null Masterkey!");
}
// if not
else
{
try
{
// set sample values
myKey.SetValue("MyKey", "MyValue1");
myKey.SetValue("xKey", "xValue-bhooo");
MessageBox.Show("Keys set!");
}
catch (Exception ex)
{
// ops!!
MessageBox.Show(ex.Message);
}
finally
{
// close RegistryKey
myKey.Close();
}
}
}


Reading a value from Registry
=============================
///
/// Method to read a value from windows registry
///

private void readRed()
{
string myregstring = "";
// open key
// notice that here our key is in "CurrentUser"... u can alter this to suite your needs.
RegistryKey myKey1 = Registry.CurrentUser.OpenSubKey("SOFTWARE\\TestKey\\TestSubKey");
// if key does not exsists
if (myKey1 == null)
{
MessageBox.Show("Non exsisting key!");
}
// if key exsists
else
{
try
{ // get reg value into a string
myregstring = (string)myKey1.GetValue("xKey");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
// close RegistryKey
myKey1.Close();
}
MessageBox.Show(myregstring);
}
}


Delete a key from Registry
==========================
///
/// Method to delete a key in windows registry
///

private void delKey()
{
// notice the overloaded OpenSubKey method now uses two arguments.
// second argument: bool writable - if true key will open in writeble mode.
RegistryKey myKey2 = Registry.CurrentUser.OpenSubKey("SOFTWARE\\TestKey",true);
// if key does not exsists
if (myKey2 == null)
{
MessageBox.Show("Non exsisting key!");
}
// if key exsists
else
{
try
{
// delete the given key
myKey2.DeleteSubKey("TestSubKey");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
// close RegistryKey
myKey2.Close();
}
}
}


Delete a key-tree from Registry
===============================
///
/// Method to delete a key and its tree (including sub-elements) in windows registry
///

private void delKeyTree()
{
// notice the overloaded OpenSubKey method now uses two arguments.
// second argument: bool writable - if true key will open in writeble mode.
RegistryKey myKey3 = Registry.CurrentUser.OpenSubKey("SOFTWARE\\TestKey",true);
// if key does not exsists
if (myKey3 == null)
{
MessageBox.Show("Non exsisting key!");
}
// if key exsists
else
{
try
{
// delete the given key
myKey3.DeleteSubKeyTree("TestSubKey");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
// close RegistryKey
myKey3.Close();
}
}
}


There are additional registry fuctions such as; count keys and count values which are not common in use and therefore not discusses here. See MSDN ;)

You can download a sample visual studio solution (C# project) that illustrate these codes from my website. [www.thekalana.net/downloads.html]

If you like to know more about windows registry, i'd recommend you to read: http://en.wikipedia.org/wiki/Windows_Registry

Tuesday, May 20, 2008

How to find IE proxy settings with Visual Studio C#?

In many cases of programming stuff that works with internet, it would be handy to know what are the proxy settings that Internet Explorer uses.

How to find proxy settings with Visual Studio C#? Here is the answer...

private static void CheckForProxy(Uri resource)

{

WebProxy proxy = (WebProxy)WebProxy.GetDefaultProxy();

Uri proxyUri = proxy.GetProxy(resource);

if (proxyUri == resource)

{

MessageBox.Show("No proxy for " + resource);

}

else

{

MessageBox.Show("Proxy for " + resource + " is " + proxyUri.ToString());

}

}

This code allows you to find out what proxy uses for each type of Uri.

Pass any server address for Uri parameter as a Uri object.

Example: ProxyCheck(new Uri("http://64.202.189.170"));

Note: This uses System.net namespace. Don't forget! :)

Saturday, May 17, 2008

FTP file upload with C#

Same as for ftp file download, To upload a file to a ftp server C# provides easy functionality with use of System.Net namespaces.

Following code is a method built upon that which uses FtpWebRequest to upload a file to a ftp server. We are using File streams as well and thats "using System.IO;".

You can download my sample visual studio solution (project) for FTP Uploads/Downloads at my web site [www.thekalana.net\downloads.html]

It is noticed that some proxy connections that allow ftp download not always allows ftp uploads. If you have trouble getting things working... check with that too.
Sample Source Code :

// Dont forget to add: using System.Net;

// SET THESE PARAMETERS FIRST

string ftpServerIP = "0.0.0.0"; // replace with your ftp server IP Address

string ftpUserID = "user"; // ftp server username

string ftpPassword = "password"; // ftp server password

///

/// Method for uploading a file to the specified FTP Server

///

/// - file name of local file

public void Upload(string filename)

{

FileInfo fileInf = new FileInfo(filename);

string uri = "ftp://" + ftpServerIP + "/" + fileInf.Name;

FtpWebRequest reqFTP;

// Create FtpWebRequest object from the Uri

reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/" + fileInf.Name));

// Provide WebPermission Credintials

reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);

// By default KeepAlive is true, control connection is kept alive

reqFTP.KeepAlive = false;

// FTP Command to be executed.

reqFTP.Method = WebRequestMethods.Ftp.UploadFile;

// Data transfer type.

reqFTP.UseBinary = true;

// Notify the server - size of the uploaded file

reqFTP.ContentLength = fileInf.Length;

// Buffer size - 2kb

int buffLength = 2048;

byte[] buff = new byte[buffLength];

int contentLen;

// Open file stream (System.IO.FileStream) to read the file to be uploaded

FileStream fs = fileInf.OpenRead();

try

{

// Stream to which the file to be upload is written

Stream strm = reqFTP.GetRequestStream();

// Read from the file stream at above mentioned buffer size rate

contentLen = fs.Read(buff, 0, buffLength);

// till Stream content ends

while (contentLen != 0)

{

// Write Content from the file stream to the FTP Upload Stream

strm.Write(buff, 0, contentLen);

contentLen = fs.Read(buff, 0, buffLength);

}

// Close file stream

// Close Request Stream

strm.Close();

fs.Close();

}

catch (Exception ex)

{

MessageBox.Show(ex.Message, "Upload Error");

}

}

Friday, May 16, 2008

FTP file download with C#

FTP file download with C# is a piece of cake as C# provides everything at our fingertips. As long as we have "using System.Net;" line at top... we are good.


Here we use FtpWEbRequest, FtpWebResponse (provided in System.Net namespace) and FileStream (System.IO) to get it done. I have done my best to provide as much as comments that would fit in a code! And the code is so simple so i should waste time writing an essay here... ;)


You can download my sample visual studio solution (c# project) for FTP Uploads/Downloads at my web site [www.thekalana.net\downloads.html]


Please note that; this code does not provide functionality to manipulate connecting via a proxy server. Still this will work with in Visual Studio since VS uses the proxy settings in IE. But u should explicitly use proxy manipulations in order to deploy the app. U can find code for capturing proxy settings from IE, in a proceeding post or at my web site [www.thekalana.net\downloads.html].


Sample Source Code :

///

/// Method for downloading a file to the specified FTP Server

///

public void Download(string localpath, string remotepath)

{

FtpWebRequest reqFTP;

try

{

//localpath = <>,

//remotepath = <>

//----- can use this block if neccesary to implement uploading with sub directory structure.

//string derivedpath = remotepath.Replace("/","_"); //remove all backslashes in remotepath and replace with underscore

//MessageBox.Show(derivedpath);

//-----

// Open file stream (System.IO.FileStream) to read the file to be downloaded

FileStream outputStream = new FileStream(localpath + "\\" + remotepath, FileMode.Create);

// Create FtpWebRequest object from the Uri

reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/" + remotepath));

// FTP Command to be executed

reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;

// Data tranfer type

reqFTP.UseBinary = true;

// Provide WebPermission Credintials

reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);

FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();

Stream ftpStream = response.GetResponseStream();

long cl = response.ContentLength;

// Set buffer size

int bufferSize = 2048;

int readCount;

byte[] buffer = new byte[bufferSize];

// Read from the stream at above mentioned buffer size rate

readCount = ftpStream.Read(buffer, 0, bufferSize);

// till stream download ends

while (readCount > 0)

{

outputStream.Write(buffer, 0, readCount);

readCount = ftpStream.Read(buffer, 0, bufferSize);

}

// Close ftp stream

// Close file stream

// Close ftp response

ftpStream.Close();

outputStream.Close();

response.Close();

}

catch (Exception ex)

{

MessageBox.Show(ex.Message);

}

}

Saturday, May 3, 2008

iNFOPOP - Done!


well.. iNFOPOP... E-learning tool is finally done.

Nice!

Nice interface with 8 video preview panes (nice job Loli), support for nearly two dozens of various file formats, FTP uploads downloads and MSSQL backend database (danaa), multi user support for windows user profiles. AND... No design documents, no real database diagrams, oxford english user manual (mark! ;) ), some collected odd content (banda!)... what else....hmm.. its one hell of a good, lil-messed but a successful project.

After all that.. jus tot a few code snippets we used could possibly useful for someone.

So following stuff will be posted next;

- FTP File Upload with C#

- FTP File Download with C#

- Connecting, Reading data from a MSSQL database with C#

- Connecting, Writing data to a MSSQL database with C#

- Capturing proxy information from IE with C#

- Writing keys & values to windows registry with C#

Enjoy!



Sunday, March 23, 2008

E-learning tool >> iNFOPOP

yep.. we came up with a name for our e-learning tool...

iNFOPOP !

its info... learning meterial... that needs to be downloaded in the background... and POP! into users screen when its the right time!

and product iNFOPOP will be proudly presented by ;) ...

SmartZolutions Inc
~ smart people extraordinary solutions ~

sounds good enough.

Saturday, March 22, 2008

E-learning tool. [C# & MSSQL.]

Well that’s some thing to be cooked up with in three weeks.

Dint had any faintish idea how to make it work... till a short sleepy conversation at loliz place a week ago.

Complex things can be taken down in to small pieces.. tiny tricks.

E-learning tool has to be an small app which is running in the background all the time, like those messenger apps do, download "rich" learning content from the main source and present to user in a comfortable way. That’s the basic idea. Content we are dealing here has be "really rich" so we should support variety of video files, audio files, images, animated stuff like flash, text & etc.

First we decided to have minimal user database as the customer(multi-personal syndrome... lol) expected. MSSQL will do fine. Created database design, alone with user data & content detailed stored in several tables with content description plus urls of storage.

Running a app server to facilitate clients seem to be nice,... but is it really needed when things can be done in a simple way? Central database server would be fine... and a good online storage with ftp connectivity.

Both uploading will be also handled by the same client. Hmmm... when it come to security concerns... can make it a bit secure with a lil hash (say md5) checking against files downloaded. Then have to have an hasher in-built to our client. makes sense.

Back stage work will go like that. Have to think about a cool gui that could get all rich content in a neat way. We'll see into that.

Cheers!

SmartE presentations @ PWHC.. whew!

whew ... what a day!

Had presentations of SmartE Notification Framework at PWHC.

Boy... that was the toughest thing i've ever done!

Panel was like few of "the people" in slk IT field. MAS Holdings IT Head, Microsoft Sri Lanka IT Head, BOC IT Head, and some project coordinator of PWHC. Presentation was ok... i guess... dint screw up like first time i did it at iit board room... lol... well of course what else cud expect... that’s the first time i myself read slides from A to Z. lol

Anyways though presentation was ok... they were not seems to be clear about some aspects and where would product will actually fit. True.. we should have limited our scope depending on capabilities of text mining engine.

Then this business issues cam in to the discussion... security of corporate data. No matter how secure, how responsible, how... u name it... still its not good enough so companies would not route their business communication content into a 3rd filtering module (centralized) for data transformation. That’s what they say. :S seems bit fair too.

Then the solution might be... having the module (data mining + transformation) hosted in-house. its a trade-off between cost/overheads & security. Everything has its price!

And then.. "do u have the algorithm u gonna use?" "can u show it working?""...

lol... yeah that’s what they ask... if we have it already we wont go on trouble to get the grant!!! duh!

discussion over a "lengthy" one hour... one hell of a discussion... technical stuff, business rules n practices, etc. We were given a second chance to get solutions for the issues raised. Getting it or not.. that was a good experience.

Moral of the story: Expect the unexpected (though this line contains a syntax error! see?),

Be armed - pack as much as technical details u can,

Solo?..nah - have a pack of people who can talk covering all aspects (business/tech/etc)

Think wider - see/read/experience...

Good Luck Smart-e!

Monday, February 11, 2008

speed .... unlimited

random pick...un-posted.... out of many posts to be posted.

During last 2 or 3 years I had to travel lot between Colombo (where I study) and Bandarawela (my hometown), on Route 99, which is a “Class A” Road. Driving made me bored and sick because of low speed limits being a fan of speed. It hit me so hard, which made me to think further and even made me scribble this.

Read on,.. in this post; u’ll find howz the situation, where this issue is going, and some decent info on Radar Detectors, Jammers & other tips ‘n tricks. [specially for Sri Lankans.]

Road has been developed pretty good (than how it was) and there are many places drivers can maintain a safe good speed. But unfortunately, for the whole journey, from Colombo to Bandarawela the maximum speed limit is 50kmph!!! And that is same for many other roads in Sri Lanka. I was bored to hell; no wonder other drivers are same. And whats more, I've got ticketed twice on the last trip.

Well because of the speed limit anyone can’t fairly maintain, we can see more people tend to ignore the speed limits completely and do it in their own way. All they worry about are cops with Speed Guns (Speed Detectors). All the fines has been revised recently, so the fine for speeding is around Rs.1500/= (approx. $ 14 US). This value can be very low relatively to other countries but when we take it against Per Head Annual Income of the country, which is $ 1300 US (approx), the fine is 1.07%. Well then its worth enough to think about it.

As many people tend to drive over the speed limit which is too low to maintain, they have also found a simple way to avoid getting caught by cops. Most popular one is, drivers who has seen there are cops on the other side of the road, after driving pass them, signals incoming vehicles “hey there are cops ahead” by flashing their head lights (generally two blinks). This has become very common, useful and; say 70% success!!

But people can’t depend on that method because there can be occasions where no incoming vehicle to give the warning. And not every driver will be good (or is it bad?!!) enough to give the warning. So there should be more reliable way.

Rader/Laser Detector & Jammer!

What is a Radar/Laser Detector anyway?

Simply, Radar Detector is a device, which is designed to give you an early warning about cops with Speed Guns (Speed Gun/Speed Detector - the device which police uses to measure the speed of a vehicle).

Before we talk about Radar Detectors, we’ll see,

How Speed Guns works?

If you are familiar with physics, you should know about Doppler Effect. Speed Guns are based on this theory. When a Speed Gun aimed at a moving vehicle operates, it transmits electro magnetic waves (or simply radio waves) at microwave frequency or a laser beam at a certain frequency. Then it captures the waves/beam reflected from the moving object and calculates the speed of the vehicle by using formulas of Doppler Effect theory. Calculated speed is displayed on the LCD panel.

There are many Types of Speed Guns. They can be categorized by the type of operation or by the mechanism.

By mechanism: Radar (X-band, K-band, Ka-band), Laser, Photo (special case!), etc.

By operation, two types: Instant-On & Static.

Speed Guns which use;

Radar – Radio wave based Speed Guns basically comes in 3 types. X-band – which is old and very rare these days, K-band – most used speed detector around, Ka-band – latest and more accurate. (These are called Radar Guns)

Other types are;

Laser – Highly accurate and very quick. Can be aimed precisely at a certain vehicle among set of vehicles.

Photo – Un-manned device, which is fixed on highways, which automatically takes photos of speeding vehicles, including their license plates.

Vascar – A device which calculates the difference of a distance between the vehicle and reader. And then calculates the speed. Special advantage of these is they can be used on a moving petrol car and measure the speed of a speeder, where most other Speed Guns has to be kept stationary.

Pulse – A refinement of K-band, which can be used from a moving vehicle like Vascar.

Instant-On Speed Guns are kept on “hold” or “stand-by” mode and only activated when the cop sees a vehicle. So waves are transmitted at that moment, making it impossible for a Radar Detector to give an early warning.

Static Speed Guns transmits its wave/beam continuously where Radar Detector can easily detect wave/beam already spread in the environment, and give an early warning.

When I got caught, while the police officer writes the ticket, I sneaked up, I took a clear note of his Speed Gun, model and etc. ;) And then after a short research on internet I found this info.

So Sri Lankan Police uses:

Manufacturer: Kustom Signals (USA)

Model: Falcon

Type: True Doppler Radar / Radio Waves

Measurement: Kmph/Mph

Band: K-band

Frequency: 24.15 GHz ±100MHz

Operation: Handheld – Instant-On (ohhh! That’s bad)

Beam Width: 20°

Speed Range: 16 – 320 (Km/h)

Operating Range: approx. <1200m

Operating Temperature: -30°C to 70°C

Hey, all these are just for information purposes, ok? No guarantee! Nor responsibility! (Ok, my hands are clean now!! ;) )

Well there’s another thing you need to know about Radar Detectors.

What are False Alarms and why?

Some times Radar Detectors give false warnings when there’s no speed guns around.. This is happening when device sees a wave which is similar to Speed Guns, but it’s from other sources. Major source is market store doors which open automatically using sensors. These doors also use K-band waves which Radar Detectors get fooled at. Solution for this is getting a better Radar Detector with advanced false alarm detection technologies.

Well, as we know a little about Speed Guns, let’s see what Jammers are.

Jammer: is a device which is designed to transmit counter waves/beam to a Speed Gun, which will “fool” the Speed Gun and force it to indicate a fake speed. Some Jammer models are “Always-on”, which eats up power and others are linked with a Radar Detectors and activates (automatically/manually) only when the Radar Detector gives a warning.

Jammers can be set to transmit a wave/beam which will produce pre-decided speed value on the gun, which can be set by the user. Other Jammers will send random irrupted waves/beam which will confuse the gun, and force to show an “Error!” message on the gun display.

Price & Purchase

Best brands for Radar Detectors are Escort, Cobra & Whistler. And there are many other good devices on the market. Many models are available to choose from with different performance levels and features. But always focus at your need and don’t decide only on the price because, in this case performance matters lot. Price of a good detector will be high as $ 90-200 (US) (Cobra XRS 9930) which will detect both laser and radar speed guns. Cheap ones are around $ 40 (Cobra ESD 6060/ Whistler XTR330) [Approximate prices]. I’ve seen used detectors for sale at online stores for low prices. If you just want to escape from normal K-band radar, a cheap used one will do. Radar Detectors comes with built-in Jammers or you can buy a Jammer separately.

I just don’t know a place to buy this kind of stuff in Sri Lanka. (If you know, plz email me). Ordering online, that’s the best way I see so far. Still this stuff is new to Sri Lanka I don’t think anyone will be checking and upset that u brings ‘em to the country.

So, finalizing; someone may use a Radar Detector to pre-identify the presence of a cop whose measuring his/her speed and use a Jammer to show a fake speed, and avoid getting a speed ticket for driving over-speed driving.

IMPORTANT!! : In many countries using Radar Detectors are prohibited and using Jammers are extremely illegal. (Sri Lanka… I have no idea... anyone?) And speed limits are there for your own & public safety. Everything in this post is for information purposes only. I do not hold any guarantee of information provided, and nor having any responsibility how u use the information. And I do not recommend anyone to break or walk though law enforcements. So think before what you do. And remember, when u r behind the wheel, it’s not only your life you are responsible of.

Be safe! Drive Carefully. Wish u all happy driving with no tickets!

flashbacks.... trying to grow up

Original Post: Wednesday, February 15, 2006

Dealing with a wet phone!

Ok, as i promised... here we go!



Well… as an essential gadget, mobile phones are the devices which are closer to us and share’s our lives than any other tech device. What ever we do, where ever we go it’s there keeping us connected, entertained and organized. Bla bla bla!! As a result there is more probability for your mobile phone than other devices, to accidentally get contact with water or similar liquids which will damage the non-water proof mobile device. Ouch! that’s gonna hurt!

I know no one of you would like to loose that smart gadget, which you have invested hardly-earned $$$. But accidents do happen. Then before you go to the doctor there may be first-aids you can perform, which will increase chances of survival of your device. This blog post (aint calling it a guide! U decide.) is all about that.

Well, let’s see what basic kind of dives a phone can take. Hmmm… It can be just dropping the phone in to your drink (Cocktail? Whiskey? Coke?), falling in to the pool with phone in your pocket, forgot to take out before putting pants into the washing machine, a bunch of friends throws you into sea water at beach with your phone in the belt, etc, etc… they may sounds funny… but u’ll never know till that happens to u! – let’s hope not ;) – Okay… lets categorize. If the device fell into pure water, I say; u r lucky! In swimming pools they add chlorine and other chemicals which will decrease our chances. If it’s a drink, that may contain different chemicals which will enhance conductivity of the liquid, that’s bad. And if its sea water or any other highly active chemical solution… man, it’s a worst day.

How does your device get damaged? Basically it’s not H2O which damages your phone. It’s the combination of H2O and electricity, which causing short-circuit and damage the electronic components. The conductivity of the liquid will depend on the chemical contents. Chlorinated water, for example will damage the device than pure water. And secondly the contact of liquid with your device may cause corrosion of the circuit board and components which will push your device to the world of dead, as the time passes. If its sea water, corrosion will be very high and we can hardly keep a hope.

OKAY! Let’s see what you should do at the first moment, which definitely affect the fate of your device a lot. The most important step is, take your phone out of liquid (do I need to say that?!) and remove the battery (and other power sources, if any) as soon as possible. Take out the SIM cards and any memory modules too. These will stop further power supply and reduce conductivity, which minimize risk of damages caused by short-circuit. I repeat, how quick you proceed this basic step will do change a lot between the chances of your phone, survived. So be quick!

Well… Boyz, then lets get into the real business. You should dissemble… yeah I said DISSEMBLE… the device!! (What on earth this guy is thinking!! OK, OK, I know how you feel!) Well then, before we talk about the dissembling procedures, let’s talk about pros n cons of dissembling the device. First issue is, it will void the warranty of your device. But u can see, it’s not a issue* because no manufacture nor retailer (to my knowledge) will give you warranty which covers damages caused by water/liquids. Second, will dissembling may cause more damage to the device? Well it’ll depend on how good are you and how lucky are you. I believe as it will take at least 5mins to take your phone to a mobile repair point or to a qualified technician. Dissembling it by your self, with care, will increase its chances of survival, as it’s a game of time where your chances are decreasing with the every second passed by while the internal components are with contact of water/liquid. The more it takes, the less chances you’ll have. So why don’t we give it a try, ha! [*:But if you have a phone insurance for the device, and if it covers losses due to usage issues, don’t dissemble the device. Instead, be proud of your self and enjoy thinking about the new device which u gonna buy with the insurance money.]

I guess you are lucky enough that you are reading this now, before a tragedy happens, and you don’t have wet phone in your hand, so you can be ready with necessary tool(s). So what do we need? Well in most cases we don’t want many tools. For most devices on the market, a universal mobile screw driver – Torx T6 will help. You will be able to buy it at your nearest tool shop or at online stores (eBay, etc) for price around $ 3. A must-owned too for a guy (even a girl) who exist in present time which all the tech gadgets. It’s better if you have mini set of Torx screwdrivers at least T5, T6 & T8. Buy a few and keep ‘em in your car cabby-hole, work-desk locker, hiking/safari/off-road backpack, etc. And u may need a small flat screw driver or similar thing (once I had to use a butter knife! ;) ), which you may hopefully find from that place, to help you taking apart housing and other components.

So, you have already removed the battery, SIM & memory modules. Ok let’s start stripping! Make sure you remember how they were fixed and how you dissemble, because you are going to assemble it back later. Now take apart housing panels. You may have to remove screws and un-fasten panels from notches with care. Check for any hidden screws behind logo stickers, etc. Removing the panel on the back, above the battery cover first will make things easy. Carefully take apart the main board and… remove any backup batteries on the main board if possible. We are talking about devices which took dives, not just a splashes, so I assume your main board wet with liquid. If our case is not “a dive in clean water”, give the main board a quick wash in to flowing pure water. Distilled water will be the best but tap water will do. By this, any chemical particles which are more conductive and helps corrosion will be washed away [especially if our case is sea water]. Actually though I mentioned it first, using clean water is the alternative. Best solution is to wash the main board and other components (keypad, housing panels, display unit – if can removed from board with extreme care, etc) with Iso-Propyl-Alcohol, which is also known as surgical spirit or rubbing alcohol, which you’ll find in any first-aid box. Slowly move the board in the solution for better wash off and let solution contact the liquid particles between small components. Using Iso-Propyl-Alcohol will wash away chemicals and make the board dry faster as it evaporates faster than water. Make sure all this washing procedure is very quick. Use a very clean brush to gently brush off the remaining solution. Keep the washed main board and components in flowing wind, under a fan to dry up. Don’t use any heat-guns or heat sources to dry up the main board n components, because heat may damage the electronics directly and increase chemical reactions. Though I say alcohol, don’t use booze as many of you may prefer! Don’t use any strong chemicals, such as Thinner, Turpentine, Detergents, WD40, etc etc. Better put phone back to sea water n drive that 10-wheeler twice over it!!! ;)

Patience! I know that feeling… urge you to fix things together and try out the device whether its working or not. But let it dry, may be two or three days. More you let it dry - more chances you have! See whether is there any dried alien particles visible on the components, if so gently brush them out.

“The” time has arrived. Assemble the device. Here you can have two choices that, you assemble it by your-self (what I would prefer) or taking it to a technician. If you are assembling it by your self; take your time to be careful enough, as there’s no real hurry. Make sure you put everything back properly in their places, and no spares left out! Charge the battery (if can test with a new/other battery - that’ll be better) separately using a rapid travel charger. Insert a test SIM module (a real test SIM, which is very cheap, or a working SIM which you can safely have some risk with) to the device. We’ll leave memory module to be tested later. Fix the battery in. And… Three… Two… One… Press the Power ON button!! If you are lucky, the phone will work exactly like before.

If you are not that lucky, common problems will be, display: dim/blinking/parts missing/ill-coloured/blank/etc, speaker mute, microphone deaf and so on. Sometimes it’ll take some time to turn ON. But if you are too unlucky… there won’t be any sign that device is alive. In both cases go to your technician, tell the whole story, and check whether if its possible to repair. Be sure you check whether the repair cost is worth doing it. For example, if the case is a dive in sea water, a expensive repair will be useless as most likely the device will give-up after few months due to corrosion. And for some devices, buying spares and repairing will cost the same, the price of a new device. And if you are under a phone plan, things will be bit complex to decide between buying a device separately to continue with the current plan or changing the plan. Discuss with your operator, as they may replace the device in to the plan for an additional cost.

This post was based on practical steps which compiles with what technicians do at repair shops. Dissembling a device is not generally recommended for normal users (which makes you a power user!) and has to be done with extreme caution. It will increase chances against un-avoidable odds. The good news is, according to many incidents and repair persons’ opinions; it is proved that more than 75% of wet mid-range devices survives after an accidental dive, if they followed the procedure as quick and accurate as possible. Use your own judgment! Hope you won’t have to use the content of this post. If you have to… Good Luck! :)

[Kalana – kalana.wijesekara@gmail.com]
[Special Credits to Hofo guys.]

posted by theKalana @ 3:44 AM