Give us a Like

Sunday, July 7, 2013

Compiling C sharp programs in Command Prompt

To compile any program via a compiler, firstly we need to edit the environment variables.

Adding the path of CSC.exe ( C sharp compiler ) is troublesome if you really don't know where it resides.

In Windows 8 the path for the compiler is as follows.

"C:\Windows\Microsoft.NET\Framework64\v4.0.30319"




Sunday, December 16, 2012

Google Patents

Seems like Google has everything you want.

Recently Google visited our faculty for a session with our students.At the presentation, an interesting fact that they mentioned was ; "we are not just a search engine company, our focus is to ARRANGE each and every information in an accessible manner". What they meant was, that the motive of Google is to arrange information so that it is way easier to find some information than it was before.

I realized that Gmail, Google maps, Google docs, Youtube etc. all follows the above motive.

Currently I am taking a course on "Intellectual Property" at my university. For the people who have no idea what it is, here's what Wikepedia says about it.

"Intellectual property (IP) is a juridical concept which refers to creations of the mind for which exclusive rights are recognized.[1] Under intellectual property law, owners are granted certain exclusive rights to a variety of intangible assets, such as musical, literary, and artistic works; discoveries and inventions; and words, phrases, symbols, and designs. Common types of intellectual property rights include copyright, trademarks, patents,industrial design rights and in some jurisdictions trade secrets."


In simple terms, It discusses about legal issues regarding innovations and creative ideas. Patents play a big role within the subject. If you need to get a patent for some innovation you did, It has to be the first of such kind in the world. It shouldn't have been patented anywhere in the world before . 

Okay, imagine a situation where you think you have found something new to this world. Are you really sure about it? I mean,that you were the first to invent it? How can you make sure of that? Every country has a separate department regarding intellectual property.  So of course, you can ask from them about the validity of your innovation, but there seems to be an easy way. 

Whoa! Google really did ARRANGE it. It is "Google Patents". All you have to do is to visit the link www.google.com/patents and search the whole database of patents ever invented to this world. They are well categorized, very well documented and easy to understand. ( This basically provides the US patent database,but other patent databases can be accessed via visiting the respective web sites )


This is why I respect Google. They make life easier. It wouldn't have been easier to do this, but they did it. Google patents is not only useful for innovators. I find it very useful to increase our knowledge about the great inventions, coming up each and everyday. 

Nice Work Google. Thank you.

Monday, December 10, 2012

What is Scareware?

I'm sure all of you have heard about 'Malware'...But what about 'Scareware'? Heard about it anywhere?  okay since I'm rhyming, now you might be wondering whether i'm into poetry or something. :D

Even though if you might haven't heard the word, i'm pretty sure you would have been affected by it( assuming that you are a normal Internet user).

Scareware, as its name suggests, is some program used to scare people. It pop-ups some frightening messages telling the user that their system has been affected with some viruses or some other sort of vulnerability. It urges the user to download that specific program into their system, and to scan their system with this program. Many users fall into this trap. They download these software, and some times even pay for them( not in Sri Lanka though; we never pay for digital stuff :D ).

First thing to understand is that the message is fake.You don't have the viruses or vulnerabilities which the program says that you do, but worth to note that you already have some sort of virus now; it is the scareware program itself.




If you were a victim in the future, make sure not to pay. The procedure they use to trap many of the users is, they would allow you to download the software for free, but to remove the viruses which the program says you have ( we know its fake ), you will be asked to pay. Once you give the credit card information it might steal the data and affect you in a very bad way, or else they might deceive you by saying that the viruses have been deleted, but after a month or sometime they might try the same trick on you once again.

If your system is protected with a full version of a well recognized antivirus or Internet security program, you will be safe from these scareware most of the time. If you ever try to install an antivirus program after you have been affected with the scareware, most of the time, it wouldn't even allow to open up the antivirus program. Then you have no luck than trying an online tutorial to remove the scareware or to format your computer and install your operating system back again.

I have come through lots of scareware programs in the past, but I never knew that they were false alarms. I'm sure you would have seen these kinds of fake programs which scared you. I'm sharing a video below, which describes how a scareware would look like.

Thank you for reading through. I hope now you have a fair knowledge to avoid scareware, and to save your system from them.

Watch the video here

Saturday, December 8, 2012

32 bit vs 64 bit

You all might have heard about these different versions of processors,operating systems,applications which are categorized into 16, 32 or 64 bit. What makes these different from others? Why couldn't they come up with a single version of bit system? Which is better? In this post I am hoping to discuss these topics.


First thing to understand is, that there are processors categorized into these bit systems. If a processor is said to be 32 bit, it implies that it is working with 32 bit chunks. As a result a 32 bit processor can support only up to 4GB of physical memory( RAM ) : cs guys, you know why! ( Mostly I will not be getting into details about these because I want everyone who reads my articles to understand what I am talking about)

Okay, Now why did the manufacturers have to design these different types of processors ? why couldn't they design a standard system without changing the number of bits? Below, I have listed down two advantages of increasing the number of bits which a processor uses.


As the number of bits increases there are two important benefits.
  • More bits means that data can be processed in larger chunks which also means more accurately.
  • More bits means our system can point to or address a larger number of locations in physical memory.
So that is why they came up with different systems.

Okay, now let us come to something important. Think that you don't know what your system is( in bit terms ), can you install any version of operating system into it? will a 32 bit processor support a 64 bit version of OS, and vice versa?

 Then what about applications? Can a 32 bit operating system run a 64 bit application? or what about the other way around?

I found a wonderful summary for that. Check the illustration below.




Google Trends

Last week i came through a wonderful feature which Google has given free access to the public. You may be familiar with this feature already, but I guess most of you don't know that something like this exists.

It is called "Google Trends".

This gives statistics about the trends of keywords people use in search. Once you enter a search term and check for the statistics, it will give a wonderful graph which will show how many times, the specific keyword has been searched throughout the history. This is really informative for people who are doing researches about the public. Personally I found it very interesting, and informative. I am really glad that Google has given access for the public to look into this kind of data.


All you have to do is to visit www.google.com/ trends and play around with the features.

I don't want to make this post more longer since I am blogging through my smartphone and I am not a very good at typing for longer using it. Keep in touch!

Thursday, December 6, 2012

The Fundamental Theorem of Arithmetic

I have decided to write a series of articles about Cryptography(Which I am always enthusiastic about), starting off with the "Fundamental theorem of Arithmetic". I will try my best to put it in the most simple way.

okay, let's get the ball rolling.

Computers as we all know, will be dumb without mathematics. There is no way a person can understand how computers really work, without the knowledge on mathematics. Cryptography which is the branch of securing information in computers, uses mathematics effectively in order to fulfill its needs. The fundamental theorem of Arithmetic is such a building block which cryptography is depended upon.

The first thing to note is there are two types of numbers, Prime(http://en.wikipedia.org/wiki/Prime_number) and Composite. Each has their own characteristics.

The next step is to understand that any composite number can be built with a prime number adding up several times.

 10= 2 + 2 + 2 + 2 +2
 15=3 + 3 + 3 + 3 + 3
 30= 5+5+5+5+5+5+5
Euclid observed this, and went on building upon that observation.
The next thing he noticed was that a composite number can be expressed with different prime numbers adding up some specific time.It is illustrated below.

30= 2+2+2+2+2+2+2+2+2+2+2+2+2+2+2
30=3+3+3+3+3+3+3+3+3+3
30=5+5+5+5+5+5

With this, we can find the prime factors of that number. i.e 2,3, and 5 are the prime factors of the number 30. Euclid realized that you could multiply these factors a specific amount of times to build that number. In this case each prime factor, once.

30=2*3*5
Take any composite number, this will work. The important thing to notice here is that there is no other way to build 30 by multiplying some other  group of prime numbers together. Every possible number has one and only one possible prime factorization. This gives a unique identification for a composite number. This is known as the  "Fundamental theorem of Arithmetic". Understanding this is very important in terms of cryptography. This idea is one of the main concepts which cryptography has grown on.

I hope you understood what I tried to explain.This doesn't teach you any sort of cryptography, but if you understand this, the rest will really blow your mind.Stay tuned.




Thursday, November 29, 2012

Performance vs Specifications

Consumer electronics have changed our lives. It has changed the way we live. It is embedded into our lifestyle.Now there is no way back.

People are changing from feature phones to smartphones. Pentiums to multiple cores. It is happening way faster than we think. 

What I see in most of the people who are buying these stuff is non other than falling into a marketing hype. Advertisements are prepared in such a way that people will like the product no matter what the product is really capable of. People are too busy to think. They rarely have the knowledge about the technology which powers these products.



Okay. So if a normal person doesn't have the knowledge to choose the best product which matches to his needs, what would he focus on? Specifications? Features? or both?.  

What I believe is there is no product which can give all what we need. There is always a trade off between features and performance. You expect more from the first, you would be disappointed  in the latter. That is how these products work, and also how the nature works.

What most of the average people think is that they should choose the product with the best specifications. Suppose if a smartphone has a dual core processor and another has more cores, people are tend to guess that the latter would be working faster. Which is not always true. It is not the specification which matters to the performance. It is how well the programs have been managed to work in that specific processor. A slow program in a faster processor would take more time than a fast program in the slower processor. There are often times I have experienced smartphones with faster processors getting lagged in running a specific application, and the the phone with the slower processor runs smoothly. The average person doesn't understand this.

I'll quote a comment of some unknown person, who had commented in an article on a social media site.I totally agree with him.

"It's not about how much MHZ or cores processor has, and how much RAM does phone have. It's how fast it works. For all i know it could have 8gig of ram, and 4 cores ? 3ghz CPU. But if it lags, it sucks"

The next thing I wanna talk is about the feature lovers. Features are always great, but I would say performance is inversely proportional to the number of features. Less features is always faster. So one cannot simply expect all the features in his smartphone, and yet expect it to work very smoothly all the time. More features means the processor has more work to do. So it is obvious that it can lag.

What I am trying to point out here is that there is no best smartphone. It is always a trade off between performance and features. If you prefer your smartphone to work smoothly all the time, do not expect every set of features in it, and vice versa. 

There are always people who hate one brand of smartphones over another. My request to them is choose what you love, and let them chose what they love. Your priorities might not be the same with the others. 

Sunday, August 12, 2012

Google is spying on You



"Google has every e-mail you ever sent or received on Gmail. It has every search you ever made, the contents of every chat you ever had over Google Talk. It holds a record of every telephone conversation you had using Google Voice, it knows every Google Alert you've set up. It has your Google Calendar with all content going back as far as you've used it, including everything you've done every day since then. It knows your contact list with all the information you may have included about yourself and the people you know. It has your Picasa pictures, your news page configuration, indicating what topics you're most interested in. And so on."

The above was quoted from a recent article published by CNN.
This article described how powerful Google is; it knows everything about us.

It is a known fact that Facebook and Google knows much about us than our best friends. I know at this point of time you might be wondering why Google has to do this. Some people have raced their voice legally in several countries against this type of privacy issues lately. But I'm not pretty sure how far they have been succeeded.

Why are they tracking on our personal things. The answers have been fair enough from Google's point of view,but not fair enough for a normal user who values privacy.Google says it wants to give a better experience for every user by tracking on their personal interests.

Let me put it in this way.Suppose a person enters a search term "pink" and searches for it. Google knows whether you are referring to the colour pink or the singer Pink based on your behaviour on the internet.Every search term is personalized according to the user.The result I would get when I enter a search term will not likely be the same as when you enter the same term.It uses our information to target ads.It knows us. Yeah it sounds creepy, but that is the truth.

Google, as we all know is a tech giant who can spend millions or even billions to do something. They use powerful algorithms to compute these results which is very complex but at the same time quick enough too. Although they say that they won't be revealing our personal information to 3rd parties, can we trust them??? Or what if some hackers get access to all the contents on their databases? Should we still blame Google? I guess we should because people should be able to chose on what information Google has to store and what to not. Obviously people should have that right.But why haven't they implemented it then??

The response from Google was that "It is too difficult to have two different privacy policies in such a huge company". True.

Saturday, October 15, 2011

When You Delete, Is It Really Deleted?


Computers are being more close to us day by day. Everything is being computerized. Though most of us know the ins and outs of using them, there is a lot more that we have no clue about.

Deleting a file from a storage device (Hard disk, Floppy Disk etc ;) isn’t needed to be taught to us. Everyone knows how to do it, but do you really know what happens when you do it?

In a normal computer, when you click the delete button, the file is moved to the recycle bin. So later if you need the file back, you can restore it from the bin. Suppose you need to delete it completely from your storage, all you would do is press the shift button with the delete key, and assume as, it has been deleted permanently. Though you assume it has been deleted permanently, that is not true.

Then what does really happen? As you know, computers work with bits (1s and 0s). So when you delete something, what happens is the bits are marked as empty (that new data can be put in there), but it really does not throw away the file from your storage. When a new file is overwritten on the same bits later, then the file is truly deleted, but we the normal users, think that the work is already done before it actually happens. If you have got confidential files, and you delete it just because you think someone would view it, there is still a chance that it can happen even after you delete it. Recovery tools are for that purpose. There are also erasure utilities which simply overwrites the data on top of the deleted data to avoid recovery.

What people are less known is, new technologies can recover data even after it has been overwritten. Overwriting means writing on top of something. So there remains something underneath the overwritten data. So then there should be some way to dig up the hidden data underneath. Though it is possible in some cases, it is not practical for a normal user who does not want to spend millions of rupees just to find some data.

All these information is valid only until the storage device remains magnetic.

Wednesday, October 5, 2011

Things That You Should Know


One hundred years ago everyone could have personal privacy, but today, it is really doubtful. In a networked world, interacting with the internet, without being watched by someone is merely impossible. Security experts, mostly known as cryptographers have done their best in order to protect our privacy throughout the cyber space. Most of the work on privacy is done by the effective use of mathematics, and most of the time, the privacy is also broken from the aforementioned mathematics. So there begins a cyber war between the cryptographers and the criminals (Let’s say so).These criminals are not like the real world criminals who commit crimes physically: at least they should be near the victim, but when it comes to the cyber world, the criminal can be thousand miles away from the victim, and still can be successful in attacking his target.

Even though I called them criminals in general, people know them as hackers. An expert hacker can break into a system and steal your private data in no time, and an expert cryptographer could use his empowered algorithms to protect your data from any hacker. Still the war exists. People are informed when the hackers win because that is what makes interesting news. The real story is cryptographers win most of the time.
I would like to explain about an attack mostly used by the hackers. It is called the “brute-force attack”. This is an interesting attack. Think that you have chosen a password for some account. A hacker badly needs to know the password. So what would be his options?  Trying out every possible password that can be typed through the keyboard is an option, but that is really boring. Obviously it is boring and an impossible task to a human, but not to a computer. So someone could write a computer program to do this, and eventually he can be successful. The time spent to the task will be depended upon many reasons. With the current security in the cyber world, a brute force attack is not that easy, a solution for the attack would be, blacklisting the ip-addresses of the users which exceed a limited number of attempts, but a network protected with weaker security can be a victim of this attack.

Assuring hundred percent security to a network is not an easy task. They say “a small hole can sink a great ship”. Same as that, a small error in the security can be the reason for a big crime in cyber space. In the present world “e-commerce” is not a new thing. A lot of money transaction is done through the internet. So a real expert in hacking can be a millionaire in just a bit of seconds. Hundreds of examples can be mentioned. The cryptographers have learned through these mistakes, and that is why today exist much more secured protocols. Experts have accepted that they are secured enough because they have been used since a long time and the holes have been patched frequently. A newly introduced protocol cannot be trusted just because no one could break in at that period of time. It needs years of experiment in public use (this is what happens in a beta version of a software) and approved by accepted security experts. So applying a new protocol to a large scaled industry is highly risky, but that does not mean that they are unsuccessful all the time.

To be a successful security expert, first you should think like a hacker. You should think of every possible way to break into the system and eventually you will end up making a very secured network. Most of the present cryptographers are past hackers. So that simply says the story. When the lion’s share of our security is done by the cryptographers, we also could use some precautions to be secured. Using hard to guess passwords and using different passwords to each account can assure us higher protection. Using the same password to all the accounts has been a trend in the internet. That is really dangerous. We don’t use the same key for our car to open the door of our house. These theories can be applied to the cyber world too.
Digital security is a vast field which needs a lot of experience and knowledge. Expertise of security experts will be highly demanding in the near future for sure. Everything is being computerized. So everything has to be secured.

Monday, August 29, 2011

How does GPS work

I did a small research on GPS through the Internet recently.As i got my uni vacation,I used my free time to find some information about this technology.I was surprised when I found how this thing works.The credit goes to the US government.Although people are used to find faults about US always,at this point I am thankful to them.Because of them we are experiencing the advantages of this great technology.

People have a belief in them that a satellite is what gives all this information,but that is just a part of the real story.The real thing works like this.

It is not just a satellite which does this thing.we need 3 satellites in order to find a 2d location and more to find a 3d location,and in the space,we have got 24 satellites in order to determine the location of different GPS receivers all around the world,and US owns them all.


I was thinking about the difference between 3d and 2d location for a while.Then I came to a conclusion like this.Suppose if you are in the 20th floor of the world trade center.The 2d location finder could find the exact place you are(i.e you are in the world trade center),but not the floor(i.e in how much height you are),but the 3d location finder should give the details above mentioned plus the height you are from the sea level or a reference ground.

GPS receiver is all about measuring time.It sends signals to different satellites and compares the time difference of each signal to reflect back.According to the satellites' positions at that specific time,the GPS receiver determines the location of the user.remember the satellites are not in equilibrium.They orbit around the earth twice a day.If you are interested,find about how the distance measurement works in a GPS.It is just a simple theory of mathematics;the cosine rule.

Wondering about the beauty of Mathematics.




Thursday, August 25, 2011

I thought like a Tutor

This software was developed by me,and I have put so much of hard work on this.This software basically fulfills the needs of a tutor.Currently it is available,only for a teacher who does classes in the science stream,but soon,I will be developing this to other streams as well.If anyone of you or your teachers need this,please contact me.Watch the video and leave the comments.


Saturday, June 4, 2011

What is this security image confirmation?

Most of the people on earth are addicted to the Internet.Obviously me and you are included in that set,and trust me we are loving it because it's making things easier than it could ever be.

The terms "Sign up" and "Sign in" are not something unfamiliar to anyone who uses the Internet.If you need to be a member of any website,you gotta SIGN UP.It means you got to fill up an application which asks you for some details which depends on the website.They ask you the "name" ,"date of birth" and many more.but why this SECURITY IMAGE??






I know you have seen this hundreds of times,but you never cared.It's like,okay you asked me to do this and I did it.Some of you might already know the story behind this.This post goes to the excluded set.

If this security image was not on facebook sign up page, I bet you the facebook server would be crashed within few days or let's say a week.This is not applicable only to facebook;any webpage on earth. This image is used on purpose of identifying whether you are a human or not.Let me explain it this way.

You can write a program(call it a spam) which can automatically generate new users for a certain web page(If you are good in hacking).It can use a fake name randomly with random fake details.So what happens if it continuously introduces new users?"There is a limit for anything" right?So definitely the server would crash.
The solution is introducing a security image(PHP captcha),and that is where the hacker fails;in identifying the letters in the image.Which we believe the identification could be done only by a human.That gives the solution.That is why all the web pages are included with this security image confirmation.Hope you learned something from this post.

"Someday someone is going to hack the security image too" wait and watch.

Thursday, June 2, 2011

Which programming language is the best?

This is a common question which any programmer would encounter.Well I would say there is no answer for this question,but there can be an answer for the below question.

What is the best programming language for ............ purpose?

Now that is what makes the difference.The PURPOSE.There are specific programming languages which perform well in certain cases.All we got to do is to select the suitable programming language for our purpose.For instance,Java is the most commonly used programming language these days,but still,we can not say that it is the best programming language.



A beginner would be more comfortable with Python because of its easy to learn syntax.So when a beginner starts to learn something like Python instead of Java,it gives him a good foundation in thinking like a programmer.That would lead him to adore any programming language there after.So in my point of view,Python or Visual Basic would be the best for a beginner.

"It is not the semicolon which matters,it is the way you think"






Get the maximum use of your jail-broken iPhone

Whenever you hear the word "Apple"all you get in your mind is "Restrictions".Well,actually there are reasons for each restriction which apple has installed in their phones.Let me take a simple example;Apple does not let you share your media files with other users.Now why is that???Has anyone thought about it?Well,when it comes to media,there are copyrights.You just can not share your media files with someone else just because you have it.That was a brief explanation.

However,we are always interested in making things easy,and that is why we need a jailbrake.I'm just gonna explain how you can have many of the paid apps in Appstore just for free.This requires a jailbroken iPhone.
Follow the steps below

1)Go to cydia,Manage and then sources


2)Add this source http://cydia.hackulo.us

3)After the source packages are installed,you can view a new source named "hackulo.us" in your source page.Select it,and install the "instalous" package in that.

4)Now you are almost done.Go back to the main menu,and you will be able to see a new app named "Instalous" in your menu.You can get almost 80% of the Appstore's paid apps for free by entering into this app.