Showing posts with label Languages. Show all posts
Showing posts with label Languages. Show all posts

Saturday, July 17, 2010

Microsoft Programming Languages


When programming was still new to me, I had no knowledge of any sort of languages by Microsoft, but as time progressed and .NET came into the picture, it became evident that you simply cant do without Microsoft's collection.
All programmers will have to one day work directly with the industry and requirements at that scale require .NET support, which means you need Microsoft products if you need quality...which is obviously non negotiable.

In case you are a programmer and want to code an application of any type then Microsoft has got just the right stuff for you. This article covers those commonly used languages that I have come across personally..

1) Languages you may already know or may have heard of are:

- Visual Basic - Event Driven Language for Rapid Application Developement(RAD) for GUI based needs.
- Visual C# - Microsoft's implementation of the C# specification. It has features very similar to Java like Garbage Collection, etc.
- Visual C++ - Microsoft's IDE(Integrated Developement Environment) for C\C++ code


2) .NET Platform programming languages

- Visual Basic .NET
- Visual C# .NET
- Visual C++ .NET

The above languages are evolved versions of Visual Basic, Visual C#, Visual C++ respectively. These languages have been developed to build .NET Applications and hence include much more features, libraries.
- Managed Extensions for C++ - Extensions for C++ that allow programmers use their existing applications in C++ with the .NET framework.


3) Transact-SQL - It works upon Microsoft's Relational Database Systems.


4) Scripting Languages

- Windows Script Host - Scripting environment that works with all scripting languages.
- VBScript
- JScript
- JScript .NET


5) Extensible Markup Language (XML) - Most useful when it comes to marking meta-data. XML and HTML cannot replace each other, in fact they compliment each other. XML is used to move metadata between systems.


6) Visual J++ - Allows migration of Java programmers to .NET, you can do so by either extending your Java code to .NET or you can use automated tools to convert to C# code.


7) X++ - OOP's based language similar to C# and has applications in building accounting and business management software. It hence used SQL along with the familiar "C++ style" of programming.


8) Alternative Languages
Many comapnies have collaborated with Microsoft to harness the growing power and influence of the .NET Framework. Besides these we also have alternate languages like:

- Standard ML
- SmallTalk
- Salford FTN95 (Fortran)
- Python
- Perl
- Pascal
- Oberon
- Mondrian
- Mercury
- Eiffel
- Dyalog APL
- COBOL

Tuesday, July 13, 2010

Garbage Collection


Garbage Collection is the concept of collecting useless "dereferenced" memory, and freeing it for re-use by the system. De-referenced resources are those objects that are no longer in use by the program but are still allocated for use by it.

Languages like C/C++ could allow programmers to directly interact and play with memory, a responsibility that is often so abused that it does more harm than good... Problems arise when people recklessly allocate large system resources and the due to some mis-management the allocated memory is never freed. This leaves large chunks of unreacheable memory locations that ultimately cause "Memory Leaks". In comes the invention by John McCarthy, which shoulders the responsibility of memory management by de-allocating memory that is not in use by the program anymore. While the concept was initially developed for LISP only, now it has spread to a variety of High Level Languages, including updated versions of C\C++ themselves.
C++/CLI (Common Language Infrastructure), which is Microsoft's language specification has provision for both manual and automated memory management.

Garbage collector is the term used to represent automatic memory management by the system. Garbage collector scans the runtime environment for objects that are accessible directly or indirectly via references. Then it proceeds to discard all remaining objects. Typically, an object's memory is reclaimed when the number of references to it reaches zero. These scans are done in cycles, which are started automatically by the Garbage collector or when explicit calls are made to it.

Garbage collection does not guarantee immunity from memory leaks, and obviously requires a considerable percentage of system resources to run, but definitely helps programmers who have to deal with a lot of memory in their projects. Garbage collection is not commonly used in embedded projects due to their already small resource size but are available on certain platforms like .NET Micro Framework and Java-ME.