Company Standards: C # .NET vs. VB.NET vs. Any .NET

Just a question that arose from time to time at my old job when we were considering the possibility of creating our development department with additional bodies. It really matters if you are the home of the .NET development, if your developers have all the code in one language and another.

I probably started as many of the 4 million other people out there with Visual Basic when I returned and then switched to VB.NET. The other developer we had at that time came from the C background and switched to C # .NET. Basically, he was able to very quickly encode his native language, and I was able to do this in my life, and since our projects did not really overlap, there were no problems until our boss basically said that we need to switch to C # ... for no other than standardization.

So, I think the “subjective” part of the question is: is it better to sacrifice productivity for consistency? Now I have to quantify this by saying that we were a LITTLE store, fewer than 5 developers, and gave how most of our design plans were done on cocktail napkins, it’s not like we were going to 6-Sigma in the near future, so it was not like "standards", it was a tough and fast rule.

Thanks.

+4
source share
11 answers

If this helps, I recently wrote an article on my blog, looking back at my decision to standardize our VB.NET development store over C # and how well my various assumptions lingered, and everything that seemed to me retroactively showed me.

Here is the link: " " Retrospective of managers "in C # and VB.NET solution "

Regarding whether the entire store should be standardized in one language. I would say that there are certain advantages. The most obvious is that switching back and forth when you are working on different projects will have some mental overhead in order to re-acclimatize yourself every time. Of course, it will be less if you need to do it often, but to justify the additional complexity there should be some compensating advantage.

Ultimately, my advice is to standardize on one basis or another based on the following criteria:
(1) If you have a large VB code base, there is a good argument for standardizing on VB.NET.
(2) If all else is equal, I tend to C # for a number of reasons mentioned in the above article.
(3) Carefully consider your current team preferences and the general consensus among developers in your market that you are trying to attract to work. Choosing a language is a big deal for morale and hiring.

+2
source

C # is definitely becoming the preferred tool for Microsoft, and it would be wise to choose a language that all developers should use, simply assuming that if developers move between tasks, having projects in a single language (not to mention the coding of the agreement) will facilitate the maintenance of these projects for all participants.

+12
source

I think it makes sense to choose one and get everything on it. Donations in productivity will be short, competent developers will quickly migrate.

Some advantages:

  • your last VB developer and team will be cut ... uh oh.
  • one of the developers is shutting down and you have to take over their code
  • and etc.
+3
source

So, I think the “subjective” part of the question is, is it better to sacrifice performance for consistency?

Of course not. What is the use of consistency in itself? Ultimately, the goal of consistency is performance. With that in mind, I would suggest that in the long run, if every code in one language would be a better way ... in general, in the long run, much more time is spent on modifying and maintaining the code than in writing, and I would think that if people spend time rising time, it would be better than constantly switching back and forth.

+2
source

our boss basically said that we need to switch to C # ... for no other reason than standardization. (...) So I think the "subjective" part of the question is, is it better to sacrifice performance for consistency?

Of course not. The only question is how important is this “consistency” with respect to future performance, because performance is important. Consistency is not in itself a commercial value. This can help you achieve greater productivity in the future.

Several factors must be balanced:

  • (+) Tomorrow people will have to support only one language, the most popular .Net language: C #. (See Note 1)
  • (-) Today you should learn C #, which is a cost to your company if you do not do it for free on weekends. Of course, this is (-) in terms of value. C # learning is good in itself, it just has a cost.
  • (-) Today, after learning C #, you or someone else should switch one project from Visual Basic.Net to C #. This has a cost, depending on the amount of project LOC. In addition, errors may be entered, so you need to re-run your unit tests, sort through all the failures and execute them. In addition, you need to repeat integration testing to ensure that everything will be fine.

You cannot tell what the balance is with this information. But you still don't need to talk, as your boss seems to have the best information and has already made a decision. All you have to do is actually do it.

Note 1: However, this reasoning is dangerously close to "the world would be a better place if VB.NET did not exist", which may be too strong a statement. VB.NET, or a combination of both, may be a good option in some scenarios.

+2
source

I would say that everything works. VB.NET and C # use the same basic structure so that you can read each other's code and with a small number of search queries you could also change it.

I would say it goes for performance. Ultimately, the client will take care if it is written in VB.NET or C # ?? But, saying that you should think about maintanability.

+1
source

We are still a mixed language group where I work; however, mixed with goals. Almost all hardware-related projects are executed in C ++ (and not in the assembly, I know :(), and almost all Windows applications are executed in C #.

Given the popularity and ease of C #, I would say that it is in the company's interests to switch to it when they have new, more environmentally friendly employees.

+1
source

How do you see yourself as a store?

VB.NET is strong in markets that rely directly on Office, possibly client applications, while C # is especially strong in servers and large applications.

Perhaps this is not about following your choice, but making a choice in accordance with the nature of the store.

+1
source

It is important to stick to a single language choice, if possible. Obviously, if you are writing unmanaged C ++ or have some other similar script, there will be noticeable exceptions. Many people have been struck by the effectiveness of uniform language choices as you grow. Most developers that I know will run into performance issues when switching languages, even if they know this inside and out. After coding in C # for several months, if I need to go back to VB.NET to maintain something, there is a good day when I have to consciously think about things that are usually automatic. They are simple things like use against import, type conversion, etc. This does not mean that you forget how it works, but your mind wants to do something the way you did it for a long period of time. It is very similar to the trick of the old salon, which pushes his hands on the door frame for a minute, and then rests next to you. They want to come back because it is a signal that your brain is being used to send.

Another very important conclusion is that this performance factor is also important in code reviews. If you work in VB.NET and need to browse C #, you will have the same stumbling blocks. Of course, you understand the code, but your coefficient or accuracy when analyzing the code will not be the same as if it were in the same language that you are currently using.

There are several additional minor points. Some tools focus on one language over another. For example, Resharper works for both VB.NET and C #, but it provides a larger set of refactoring if you use C #. In addition, if someone in your organization supports the company’s coding standard, they make the changes to these standards half-complex if you need to solve only one language.

0
source

I think this also lasts with coding style standards. Is there a reason why the development team selects 3 spaces for tabs rather than 4? In fact, there is no technical or business advantage for this solution, except for uniformity, and that each code looks the same, so when I switch between files, my brain does not need to adapt to the new formatting.

The same applies to uniformity for C # and VB.net. There are no technical or business advantages to taking one over the other (NOTE: I am sure that if you looked complicated enough you could find something really obscure). But, when each code uniformly helps in the transition from project to project, people should not switch from thinking in C # to thinking on VB.net.

0
source

One of the advantages of using the .NET platform for development is the fact that you have the opportunity to develop in a language that can best express your solution to the problem.

An arbitrary IMO rule should not prevent you from using F # or the DLR language if these languages ​​are more natural than an imperative language such as C # or VB.Net.

This is a more difficult decision to make with VB.Net vs. C # because the languages ​​are so similar, but if you need to work a lot with XML, then VB.Net XML literals can help make the code more understandable, on the contrary, C # s tced syntax and support for anonymous methods can make your intention more clear.

0
source

All Articles