New Apps

Articles

Tips

Events

Improve Soft Skills

/ / Why To Use C# And When To Prefer Other Languages






Introduction and Background



In many of the websites and forums beginners and novice users are always asking questions like, “Which one to use, C++ or C#?”, and many more similar questions. It is harder to provide an answer to such questions on multiple platforms and to multiple questions. That is why, I thought, why not post a blog post to cover most of the aspects of the question?  In this post I am going to cover a few of the concepts that you may want to understand to choose either language from the most widely used languages:

1. C or C++

2. Java

3. C# (or .NET framework itself)

Basically, my own preference in many cases is C#, but that depends on what I am going to build. I have been using C, C++, Java, and C # in many applications depending on their needs, depending on how they allow me to write the programs,  and depending on whether it is the suitable programming language for this type of project and application architecture.

The way I do that,is just a trick which I am going to share with you in this blog post. Among these a few of the very basic things to consider are:

1. How simple and easy it would be to use this language in the program?

2. What is the productivity of that language in your scenario!

3. Difficulty level and how many people know the language!

I will be talking about these points in this post  to make it clear where to use which programming language. But my major concern in this post will be to cover the aspects of C# programming language.


Productivity of language



The first thing to always consider about the language is the productivity that a programming language can provide your team with.

Productivity of the language depends on many factors, such as:

1. How programs are built in that language?

2. How fast and reliable is it to build the project regularly?

3. Is the program’s source code readable for other members on the team?

4. Is the language itself suitable for the case that we are going to use it in.

Productivity of the language, in my opinion, is the first thing to consider as the valid candidate to always discuss in the team and not just talk about in a back room. You should manage to get your teams up in a conference room, and then talk about a language. There may be many aspects where one language may fall short and other may work well.

There would be many factors that most of the programmers don’t know but in  talking about them one of the geeks would stand up and raise another important point that may guide your team to walk on the correct path to build greater applications.

Let’s talk a bit about graphs.

Productivity graph


Figure 1: Productivity graph of most widely used programming languages

In this chart we can see that C is the most productive programming language in which we are interested; C, C++, Java and C#. C++ and C# are competing with each other, whereas Java is a bit behind  C# and so on.

In the above graph, it is clear that C# is an average programming language. The average doesn’t mean it is below the requirement. But it means that it can be used in any case, and its performance won’t fall as the data increases. The successful run graph shows that C# programs are much successful in many cases. That is why, in many cases, C# proves to be the valid candidate in many cases, since it is a general purpose programming language.

Then the question arises, “Productive in which sense?”

That is the most important part here. Now, this topic may take a bit more time to explain how productive a language is. For that, I have dedicated the topic, “Choosing the right language for the right task." The right programming language for the right task will always help you to elevate the speed of the programming of your team! But among other aspects, the most important ones are:

What sort of project this is?

• Of course you don’t want to use knife to unscrew a screw.

What are the IDE and compilation tools present?

• Even a program written in C can go wrong if compile is buggy or inefficient.

How your team would like to manage the projects?

• Does the language support good software engineering concepts?

• Can it be used to generate good diagrams: Use-case, activity, class and other diagrams?

Thus, you should always consider thinking about the productivity of your development team while guessing which language to be used.

Choosing the right language for the right task


It is always stated to use the best tool for the best jobs! Then, why not use the best programming language for your projects, to get the best possible results? Before I continue any further, there is one thing I want to mention, “There is no best programming language ever built.” Every time a programming language is built for a purpose, another group of programmers jump in to create a new programming language, for the sake of fixing the errors in the previous language. What do you think motivated Bjarne to create C++ when there was C language and Scala already in the market?

In this section, there are many things to consider, from the performance and benefits to the clients, to the perk packages for the employees to the efficiencies of the project repositories and the tools provided for that programming languages.

C# was created by Microsoft and therefore, in my opinion, has, by far, the most efficient tools for programming. I mean, Visual Studio alone is the beast in this game.


Graph of performance to safety ratio

Figure 2: Graph of performance to safety ratio

Now, if you look at this graph, it’s pretty much clear as to what it is trying to guide you with. Of course, as I had mentioned in the starting paragraph here, there is no best programming language.

In many cases, C# and Java rule over C++ (and C) and in many cases, they rule over C# and Java. There are many factors, like the programming paradigms, performance of the code that is generated; Just-in-time compilation, memory-management delay and so on. While C# and Java may provide the best environment to build “managed” programs in, there are many cases where C# and java don’t work well, like writing a low-level program. Java developers wanted to build a Java OS, but they had to give up because some things aren’t meant to be done in Java.

Always consider searching before making the final call. There are many companies working in a similar field that you are going to work in. There will be many packages and languages built for your own field that may help you to get started in no time!


Top 10 programming languages :



Top 10 programming languages

Figure 4: Top 10 programming languages


But, I think these are a bit backwards. I think, C is on the top because it causes a lot of trouble to beginners, so everyone is searching for “How to do {this} in C” on Google, raising the rankings.

Selecting the best framework



I don’t totally agree with people when it comes to talking about frameworks like, Java, Qt (which I do like in many cases; like Ubuntu programming), and other programming frameworks available for programming applications to be run despite the architecture of the machine. In this case, my recommendation and personal views for .NET framework are very positive. As already mentioned, I have programmed on Qt framework for Android, Ubuntu and Linux itself. It was a really very powerful framework to build applications on. But the downside was it was tough to learn, their compilers were modified, and their C++ was tinkered.

While selecting the best framework for application development my choices are below:

1. How flexible is a framework?

2. What language does it support?


• Some frameworks support multiple languages, like .NET framework, it supports C#, VB.NET, Visual C++, JavaScript applications.

3. Is it cross-platform?

4. If not cross-platform, then does it support multiple architectures, at least?

Java framework is cross-platform, and entirely framework oriented. You simply have to target the framework despite the operating system or architecture being used. .NET framework on the other hand is a very beautiful framework to write applications on. It uses C#, VB.NET and C++ (no Java!) to write the applications, and then the compiled binaries can be executed on many machines that can support .NET framework. This provides an excellent cross-architecture support.

C# however, does not support Mac OS X, at the moment. Microsoft has started to roll out cross-platform binaries for C# programs. .NET Core has been a great success and once it gets released to a public version, I am sure most of the companies will start to target it. That is not going to happen in the near future, in which case, Java and C++ are better than C#.

If you are interested in C# programming on multiple platforms, consider using Mono Project instead. You can read about that, on my blog here: Using C# for cross-platform development.

Top languages and their platforms of usage


Top languages and their platforms of usage

Java may be supported 100% in the rankings, but C# is also supporting multiple platforms and is rapidly growing making the language better than the rest. With the release of C# 6, Microsoft has proved that the language is much better than the rest in the race. 

There are many features that I like in C# 6:

1. String interpolation

2. Getter-only auto-properties as lambdas

3. Improvements to lambdas


Final words :


As I have already mentioned, there is no best programming language out there. One language is best in one case, other is best in another case and so on and so forth. In such cases, it is always better to communicate with your development team and then ask those questions and ask for their feedback. Choosing good tools for your projects is always a good approach and good step in the process of programming.

If your software engineers or software architects are trying to find a good solution, ask them to work on the following questions:

What are the teams and developers qualified for?

• Asking a team of C++ programmers to leave C++ and join Java or C# programming teams is not a good idea!

• Always consider the best approach.

• Time is money — manage it with care.

• Recruit more programmers with skills.

Is the programming language long lived, or a minor one?

Is programming language capable of making your application work?

• I have used many programming languages, and thus I can decide which language to use. This is the job of your software architect to decide which languages to select.

If you follow these rules, you will save yourself from many of the future questions that cause a lot of problems. Many times developers ask questions like, “I have an application in Java, how to migrate it to C#?” Many web developers ask questions like, “I have a PHP application, how to convert PHP code to ASP.NET?” These questions have only one answer: “Re-write the applications.” C# won’t allow you to just convert other programs to it. C# is a powerful and easy language, learning C# won’t take much of your time. Then you can implement those programs in C# itself, Java and C# are similar in many cases. In the similar sense, you can re-write the PHP applications in ASP.NET web applications in no time at all. ASP.NET web applications are provided with templates that provide the starter code in the IDE itself, which you can use to get started. 

There are many things that you should consider before designing the applications. Facebook is stuck with PHP, because it was written in PHP. Even if they wanted to migrate to ASP.NET, they won’t. Instead, they have found a work around  for the PHP bugs and downsides.


References :









«
Next

Newer Post

»
Previous

Older Post

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

No comments :

Leave a Reply

Wednesday, April 20, 2016

Why To Use C# And When To Prefer Other Languages






Introduction and Background



In many of the websites and forums beginners and novice users are always asking questions like, “Which one to use, C++ or C#?”, and many more similar questions. It is harder to provide an answer to such questions on multiple platforms and to multiple questions. That is why, I thought, why not post a blog post to cover most of the aspects of the question?  In this post I am going to cover a few of the concepts that you may want to understand to choose either language from the most widely used languages:

1. C or C++

2. Java

3. C# (or .NET framework itself)

Basically, my own preference in many cases is C#, but that depends on what I am going to build. I have been using C, C++, Java, and C # in many applications depending on their needs, depending on how they allow me to write the programs,  and depending on whether it is the suitable programming language for this type of project and application architecture.

The way I do that,is just a trick which I am going to share with you in this blog post. Among these a few of the very basic things to consider are:

1. How simple and easy it would be to use this language in the program?

2. What is the productivity of that language in your scenario!

3. Difficulty level and how many people know the language!

I will be talking about these points in this post  to make it clear where to use which programming language. But my major concern in this post will be to cover the aspects of C# programming language.


Productivity of language



The first thing to always consider about the language is the productivity that a programming language can provide your team with.

Productivity of the language depends on many factors, such as:

1. How programs are built in that language?

2. How fast and reliable is it to build the project regularly?

3. Is the program’s source code readable for other members on the team?

4. Is the language itself suitable for the case that we are going to use it in.

Productivity of the language, in my opinion, is the first thing to consider as the valid candidate to always discuss in the team and not just talk about in a back room. You should manage to get your teams up in a conference room, and then talk about a language. There may be many aspects where one language may fall short and other may work well.

There would be many factors that most of the programmers don’t know but in  talking about them one of the geeks would stand up and raise another important point that may guide your team to walk on the correct path to build greater applications.

Let’s talk a bit about graphs.

Productivity graph


Figure 1: Productivity graph of most widely used programming languages

In this chart we can see that C is the most productive programming language in which we are interested; C, C++, Java and C#. C++ and C# are competing with each other, whereas Java is a bit behind  C# and so on.

In the above graph, it is clear that C# is an average programming language. The average doesn’t mean it is below the requirement. But it means that it can be used in any case, and its performance won’t fall as the data increases. The successful run graph shows that C# programs are much successful in many cases. That is why, in many cases, C# proves to be the valid candidate in many cases, since it is a general purpose programming language.

Then the question arises, “Productive in which sense?”

That is the most important part here. Now, this topic may take a bit more time to explain how productive a language is. For that, I have dedicated the topic, “Choosing the right language for the right task." The right programming language for the right task will always help you to elevate the speed of the programming of your team! But among other aspects, the most important ones are:

What sort of project this is?

• Of course you don’t want to use knife to unscrew a screw.

What are the IDE and compilation tools present?

• Even a program written in C can go wrong if compile is buggy or inefficient.

How your team would like to manage the projects?

• Does the language support good software engineering concepts?

• Can it be used to generate good diagrams: Use-case, activity, class and other diagrams?

Thus, you should always consider thinking about the productivity of your development team while guessing which language to be used.

Choosing the right language for the right task


It is always stated to use the best tool for the best jobs! Then, why not use the best programming language for your projects, to get the best possible results? Before I continue any further, there is one thing I want to mention, “There is no best programming language ever built.” Every time a programming language is built for a purpose, another group of programmers jump in to create a new programming language, for the sake of fixing the errors in the previous language. What do you think motivated Bjarne to create C++ when there was C language and Scala already in the market?

In this section, there are many things to consider, from the performance and benefits to the clients, to the perk packages for the employees to the efficiencies of the project repositories and the tools provided for that programming languages.

C# was created by Microsoft and therefore, in my opinion, has, by far, the most efficient tools for programming. I mean, Visual Studio alone is the beast in this game.


Graph of performance to safety ratio

Figure 2: Graph of performance to safety ratio

Now, if you look at this graph, it’s pretty much clear as to what it is trying to guide you with. Of course, as I had mentioned in the starting paragraph here, there is no best programming language.

In many cases, C# and Java rule over C++ (and C) and in many cases, they rule over C# and Java. There are many factors, like the programming paradigms, performance of the code that is generated; Just-in-time compilation, memory-management delay and so on. While C# and Java may provide the best environment to build “managed” programs in, there are many cases where C# and java don’t work well, like writing a low-level program. Java developers wanted to build a Java OS, but they had to give up because some things aren’t meant to be done in Java.

Always consider searching before making the final call. There are many companies working in a similar field that you are going to work in. There will be many packages and languages built for your own field that may help you to get started in no time!


Top 10 programming languages :



Top 10 programming languages

Figure 4: Top 10 programming languages


But, I think these are a bit backwards. I think, C is on the top because it causes a lot of trouble to beginners, so everyone is searching for “How to do {this} in C” on Google, raising the rankings.

Selecting the best framework



I don’t totally agree with people when it comes to talking about frameworks like, Java, Qt (which I do like in many cases; like Ubuntu programming), and other programming frameworks available for programming applications to be run despite the architecture of the machine. In this case, my recommendation and personal views for .NET framework are very positive. As already mentioned, I have programmed on Qt framework for Android, Ubuntu and Linux itself. It was a really very powerful framework to build applications on. But the downside was it was tough to learn, their compilers were modified, and their C++ was tinkered.

While selecting the best framework for application development my choices are below:

1. How flexible is a framework?

2. What language does it support?


• Some frameworks support multiple languages, like .NET framework, it supports C#, VB.NET, Visual C++, JavaScript applications.

3. Is it cross-platform?

4. If not cross-platform, then does it support multiple architectures, at least?

Java framework is cross-platform, and entirely framework oriented. You simply have to target the framework despite the operating system or architecture being used. .NET framework on the other hand is a very beautiful framework to write applications on. It uses C#, VB.NET and C++ (no Java!) to write the applications, and then the compiled binaries can be executed on many machines that can support .NET framework. This provides an excellent cross-architecture support.

C# however, does not support Mac OS X, at the moment. Microsoft has started to roll out cross-platform binaries for C# programs. .NET Core has been a great success and once it gets released to a public version, I am sure most of the companies will start to target it. That is not going to happen in the near future, in which case, Java and C++ are better than C#.

If you are interested in C# programming on multiple platforms, consider using Mono Project instead. You can read about that, on my blog here: Using C# for cross-platform development.

Top languages and their platforms of usage


Top languages and their platforms of usage

Java may be supported 100% in the rankings, but C# is also supporting multiple platforms and is rapidly growing making the language better than the rest. With the release of C# 6, Microsoft has proved that the language is much better than the rest in the race. 

There are many features that I like in C# 6:

1. String interpolation

2. Getter-only auto-properties as lambdas

3. Improvements to lambdas


Final words :


As I have already mentioned, there is no best programming language out there. One language is best in one case, other is best in another case and so on and so forth. In such cases, it is always better to communicate with your development team and then ask those questions and ask for their feedback. Choosing good tools for your projects is always a good approach and good step in the process of programming.

If your software engineers or software architects are trying to find a good solution, ask them to work on the following questions:

What are the teams and developers qualified for?

• Asking a team of C++ programmers to leave C++ and join Java or C# programming teams is not a good idea!

• Always consider the best approach.

• Time is money — manage it with care.

• Recruit more programmers with skills.

Is the programming language long lived, or a minor one?

Is programming language capable of making your application work?

• I have used many programming languages, and thus I can decide which language to use. This is the job of your software architect to decide which languages to select.

If you follow these rules, you will save yourself from many of the future questions that cause a lot of problems. Many times developers ask questions like, “I have an application in Java, how to migrate it to C#?” Many web developers ask questions like, “I have a PHP application, how to convert PHP code to ASP.NET?” These questions have only one answer: “Re-write the applications.” C# won’t allow you to just convert other programs to it. C# is a powerful and easy language, learning C# won’t take much of your time. Then you can implement those programs in C# itself, Java and C# are similar in many cases. In the similar sense, you can re-write the PHP applications in ASP.NET web applications in no time at all. ASP.NET web applications are provided with templates that provide the starter code in the IDE itself, which you can use to get started. 

There are many things that you should consider before designing the applications. Facebook is stuck with PHP, because it was written in PHP. Even if they wanted to migrate to ASP.NET, they won’t. Instead, they have found a work around  for the PHP bugs and downsides.


References :








No comments:

Post a Comment

Social Impact