Thursday, November 26, 2015

What is CLR, CTS, CLS in .NET ?

A Brief Introduction To IL code, CLR, CTS, CLS and JIT In .NET


Before explaining these terminologies, I would like to explain how .NET code gets compiled. The developer writes source code in any .NET language i.e. it may VB.NET or C# or VC+++.NET, etc. The source code is compiled to Intermediate code known as IL code by the respective compilers for example for C# it is csc.exe compiler, for VB.NET it is vbc.exe compiler, etc. This half compiled code is then given to JIT(just in time compiler) by CLR which converts IL code to machine specific instructions which then gets executed. In this way a .NET code gets compiled. For better understanding have a look to following diagram :
IC15013
Now we ll have a close look to above terminologies one by one. We will start from IL code.
  • IL Code : The word IL Code stands for Intermediate Language Code. It is a CPU independent partially compiled code. When we develop our .NET  application, we don’t know in what kind of environment our code will run i.e. on which operating system it will be finally hosted, what will be the CPU configuration, etc. So for this purpose we have IL code which is compiled according to machine configuration. IL code is given by Language compiler which is different for different languages for example csc.exe compiler for C#, vbc.exe compiler for VB.NET, etc.
  • CLR : CLR stands for Common Language Runtime. It is the heart of our .NET Framework. CLR performs following tasks :
  1. Garbage Collection : When we run our .NET application, many objects are created. Garbage collection is a background process which deletes the objects which are not in use by the application and frees memory.
  2. Code Access Security(CAS) and Code Verification(CV) : CLR checks the whether the code has access rights and it is safe and authenticated to be used.
  3. IL to Native Translation : The main task of CLR is to provide IL code to JIT to ensure that code is fully compiled as per machine specification.
  • CTS : CTS stands for Common Types System. In .NET we have various languages like C#, VB.NET, etc. There may be many situations where we want code written in one language to be used in another. In order to ensure that we have a smooth communication between different languages, we have CTS. CTS ensures that datatypes defined in two different languages get compiled to a common data type so that code written in one language can be used by another.
  • CLS : CLS stands for Common Language Specifications. It is a subset of CTS. CLS is a set of rules or guidelines which if followed ensures that code written in one .NET language can be used by another .NET language. For example one rule is that we cannot have member functions with same name with case difference only i.e we should not have add() and Add(). This may work in C# because it is case-sensitive but if try to use that C# code in VB.NET, it is not possible because VB.NET is not case-sensitive.
  • JIT : JIT stands for Just In Timer Compiler. It is the internal compiler of .NET which takes IL code from CLR and executes it to machine specific instructions.

Reference from : Link

Thursday, November 19, 2015

THINGS YOU SHOULD NEVER EVER SAY IN A JOB INTERVIEW


1) Sorry, I am late!
Firstly, do not reach late for the interview. If you do, do not let your interviewer get to know about it. 'Sorry I am late' is the worst sentence you can begin your interview with, as it goes without saying that punctuality is the key. Do not give a bad image of yourself by saying this and letting him/her know.

2) Do not lie
Do not lie about anything as if you get caught you are left nowhere. Even if you do not get caught the very moment, it may backfire in the future. So always try to be honest in everything you are being asked.

3) I hate my ex-boss
Never make the mistake of saying anything bad about your ex-colleagues or ex-boss or your job. It gives a poor image of you and you look like a complainer. You can always talk about the challenges you faced but the focus should be on the positive aspects of it.

4) What I like about you
No matter how much you like the interviewers watch, shirt, glasses or whatever, never start complimenting him/her on the first go. It looks like you are flattering them in order to get the job. Do not make the situation awkward and avoid complimenting him/her.

5) Do not threaten
When asked the question 'where do you see yourself in the next five years?' do not answer by saying working in the same company at your position. Do not threaten the interviewer on his position. Just say I want to see myself growing and learning a lot from the experience I will gain from this job which will help me reach higher in future.

6) I don't have any questions
When the interviewer asks you if you have any questions, do not reply with 'no I don't'. Always make sure you clarify all the doubts you have by asking. Do not keep questions in your head and stay quiet. Try and make the interview interactive and not one-sided.

7) I want a job... any job
Do not show your desperation for a job. Relate your interests and your strengths with the job profile you are applying for. Tell them what makes you interested for the job. Do not make them feel that you applied for the profile only because that's what you were getting.

8) My weakness is...
On being asked your weaknesses, do not start telling them a list of your weaknesses. Tell them about one weakness which is not related to the job and twist it in such a way that it turns out to be your strength. Tell them about a weakness and let them know how you worked on it and now it's no more a weakness.

9) Do not ask unreasonable questions
Just in order to make the interview interactive, do not start asking unreasonable questions like what perks will you get? How often do you guys give promotions? How much will be my salary? How much vacation time do I get? These questions are not supposed to be put up so early. Give a break to your level of curiosity.

10) I want to start my own business soon:
Do not make the mistake of being frank as well. Do not share all your plans with the interviewer. Do not start telling them everything when you come in the flow of talking. Make sure you tell them what they want to hear. Tell them you want to gain experience but not why you want to gain experience. Keep a control on your tongue!

Reference: Jobbuzz

Tuesday, October 27, 2015

Thursday, October 22, 2015

What's the difference between Core i3, i5 and i7 processors?

Confused about which Intel processor you need? Click below link to explore the differences between the Core i3, i5 and i7 range !!

Reference Link

Monday, October 5, 2015

Faster Shutdown your PC

The shutdown process in Windows operating system requires three clicks and a menu. Here’s how you can make the shutdown process faster.

All you need to do is right-click on any open space on the desktop, then click New > Shortcut. A Location field will appear on the screen. Paste the following in the location field:

%windir%\System32\shutdown.exe /s /t 0

Then, click on Next and complete the shortcut setup.

 /l         Log off. This cannot be used with /m or /d options.
 /s         Shutdown the computer.
 /r         Shutdown and restart the computer.

 /t xx    Is the timer parameter followed by numeric value as second

For more help you can go to command prompt and type "shutdown /?"

Wednesday, September 9, 2015

Calculate Experience in Year and Month

Mostly I get question from friends about calculating Date difference for calculating there job experience. So decided to show how you can get it.

Below is the simple example for this:




Sunday, August 16, 2015

Black screen after latest win 8.1 updates



1) sfc /scannow
and
2) dism.exe /online /cleanup-image /scanhealth

to see if there is any corruption.

If none, then try updating after disabling all non-windows services and all startup programs listed by Task Manager (reboot after disabling and then update).