Pros and Cons of the C# Programming Language

I’ve programmed in C#.Net for a while now, and I have grown to like it (even over VB.Net). While I do not believe in dismissing other programming languages (e.g., VB.Net) just because people “don’t like them”, I do prefer C#.Net over VB.Net for my new projects I work on.

Please note that these “pros” and “cons” of C# are my own opinions and do *not* necessarily reflect the average C# programmer out there.

Pros to using C#

  1. Learning C# will help you later on if you decide to learn harder programming languages (e.g., C or C++). The programming style of C# is very similar to other C languages.
  2. Since people usually see C# > VB.Net, you should have an easier time finding a C# job, instead of a VB.Net one.
  3. Most online examples for .Net languages are in C#.
  4. If you are looking to work with other programmers (commercial or open source), then knowing C# will be a benefit to you.  This is because many programmers out there pretty much have coded (and still do code) in some kind of C language.
  5. The C# language is less verbose (not as wordy) in comparison to the BASIC language. This is more the programmer’s preference than anything else.

VB.Net Verbose Code Example:   Dim  calculations  As  Decimal

C#.Net Non-Verbose Code Example: decimal  calculations;

Obviously the C# code example has much less to type. You may not think this is a big deal, but if you have 1,000 (+) lines of code to write, you will then understand why a less verbose language is faster to write in.

Cons to using C#

  1. C# would not be the best programming language for newcomers to start programming with (C# is a more complicated syntax).  I would rather start them out on VB.Net, and later on introduce them to C#.Net.
  2. In C#, you have to use semi-colons [ ; ] at the end of each line of code you write. You get used to it after a while, but it is an extra step that you do not have in VB.Net (and many other languages).
  3. The C# language is case-sensitive.  You can have the variables dateofbirth, dateOfBirth, and DateOfBirth all at the same time. This can overtime cause confusion, if you are not careful.
  4. C# is not the same as VB.Net in capabilities (they are practically the same, but not necessarily 1:1 on every detail).  In other words, if you try to convert a C#.Net project to a VB.Net project (or vice versa) you may encounter difficulties. Please make sure to choose the programming language you really want to use to start with.
  5. In C#, the switch clause requires a “break;” command every time you check for a value. The case clause in VB.Net does not require this (less to type in VB.Net). Please note that the switch clause in C# is not exactly the same thing as the case clause in VB.Net.  There are differences.
  6. C# uses curly-brackets { }  that define the beginning and the end of things like functions, for each statements, if statements, etc. Curly-brackets can become messy unless you are careful to not confuse them with other curly-brackets that are for something else in your code. There is software out there than can highlight curly-brackets for you while you are coding, so you have less of a chance of becoming confused.

So in the end, which programming language do I recommend for you to use? Well if you are new to programming on the computer, I would first start out on VB.Net. Later on, you can move to C#.Net.

If you already have gotten your feet wet with programming, I would go ahead and start learning C#.Net. In the end, you have to make up your own mind. 🙂

Remember the more programming languages you learn, the more valuable you will be to other people who need your programming skills. Also please remember that VB.Net is not evil (regardless of what people may say). It is ok to go ahead and write software in VB.Net if you want to (or need to).


Posted in Computers, Programming

Pros and Cons to Web and Desktop Applications

Last Updated: 09/29/2019

Pretty much everyone who has used a computer has used a desktop application (e.g., Microsoft Word, VLC Player, Notepad, Adobe Photoshop, Internet Explorer, etc.) Desktop applications can be found just about everywhere for just about every kind of use.

However, over the past (roughly) 10-15 years, another kind of application for users has come about. They are called web applications. Web applications, simply put, are programs that users can interact with using their web browsers. Users also do not have to install web applications. They are already “installed” on the server you are accessing with your web browser.

Now many programmers feel passionate about both. I have written several desktop and web applications alike. So, I have a good enough feel for both to give some insight into the pros and cons of both. You must remember there is no “one size fits all” when it comes to the desktop or web. Both have their strengths and weaknesses. Anyone that says (or at least implies) otherwise, does not know what they are talking about!

Features

Desktop Applications

Web Applications

 Rapid Development

Designed from the beginning to be a quick and easy solution to building graphical user interfaces (GUIs), especially when using Windows Forms in Visual Studio for Windows.

Never was designed for rapid development. Using the MVC (model, view, control) architecture is typically seen as the “correct” way to create web applications.

 

I have spent hours and hours looking into this and the closest thing to “rapid development” for web applications I have found is ASP.NET WebForms.

Of course, I am aware that WebForms is not a solution for everyone, since it is designed to run on a Windows Server.

 Security

Since the user keeps his or her data on their own computer systems, this makes it harder for hackers to gain access to people’s data.

 

There are some desktop applications (usually for businesses) that connect to a central database server to get and store its information.

In that case, the desktop application would be like a web application.

Since all the user’s data is stored online, technically there is a greater chance of the users’ data being compromised.

 Available Controls

Desktop application developers have a whole buffet of user-interactive controls to choose from. This goes for the out-of-the-box controls (e.g., Visual Studio for Windows) as well as 3rd-party controls.

No real controls “out-of-the-box” to speak of, except for HTML controls (e.g., text boxes, buttons, check boxes, etc).

 

While you can add controls via jQuery or something else, these are not as mature as the desktop equivalents (in my opinion).

 Flexibility

It is very easy to write desktop applications that take advantage of the user’s hardware (such as:  scanners, cameras, WiFi, serial ports, network ports, etc.)

Web applications do not compare to the flexibility of desktop applications.

 

If you want to write a web application that interacts with the user’s hardware, you are doing it wrong. Just stick with a desktop application for your program. You will be happy you did.

 Portability

Desktop applications can be portable, but most are not portable and require manual installation from the user.

Web applications have desktop apps beat here.

 

Web applications are very portable and will work with just about any computer with a decent web browser.

 Maintenance

Desktop applications usually need to be updated either automatically or manually.

Web applications have desktop apps beat here…again.

 

End-users do not have to install any updates. All the updates are already taken care of by the web application administrators.

 Performance

Usually you will find that well-written desktop software running on a decent computer runs faster than web applications.

Web applications usually have slower performance than desktop applications, due to having to transmit data across the Internet.

 

The Internet (and web browsers in general) were never designed with huge web applications in mind.

For example, if Adobe created a full-blown Photoshop (all features, nothing removed) that ran in the web browser, I would say a lot of people would have trouble using it.

For one, web browsers would not be optimized for such a web application.

Secondly, most people would not have enough Internet bandwidth to run it smoothly, not to mention many broadband subscribers have a monthly bandwidth limit that they would easily go over if they used such a web application.

 


Posted in Internet and Servers, Software

Even More Windows FUD

I received this comment that someone posted online. In case anyone is wondering, I try to keep the authors’ names and/or usernames of different comments, articles, blog posts, etc. I respond to anonymous.

The comment was riddled with misinformation and untruths about Windows. I will place the comment author’s comments below in red. My responses are in black. Please note that I mean no disrespect to the comment’s author in anything I say.

It is funny because if you walk into any major company, even Microsoft, you will find a majority of the servers running Linux.

While there are a lot of companies that make use of Linux (and probably have several Linux servers), I highly doubt that Microsoft uses many (if any) Linux servers themselves. Do you have a source to verify this?

It is also funny that they think Windows is more secure.

What makes you think Linux is any more secure than Windows? You did not provide any technical arguments.

Windows has not fixed any major security holes in years because it is impossible to do so. The software runs in the operating system instead of a sort of run time container.

  1. To say that Windows “has not fixed any major security holes in years” would mean that Microsoft does not give security patches to Windows. This is, of course, a false statement.
  2. Why would it be “impossible” to fix major security issues in Windows? You gave no technical arguments to backup your statement.

Open Source ensures that any security holes found can be fixed within minutes of finding them. Windows has to officially release patches for every fix and those fixes can only be made by Microsoft.

Not true! The Bash ShellShock vulnerability took days to get all the official patches out.

“Initial solutions for Shellshock do not completely resolve the vulnerability. It is advised to install existing patches and pay attention for updated patches to address CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, and CVE-2014-6278. Red Hat has provided a support article with updated information.”   —   Source:  https://www.us-cert.gov/ncas/alerts/TA14-268A

In other words, the current patches are not a 100% guarantee that the ShellShock vulnerability has been completely patched.

I don’t think you understand fundamentally how the Windows operating system works from the perspective of a low level developer. If you look at the Windows source you will see that it has almost not been touched since XP.

Not true!  Windows 7 alone had the following features added to the OS such as:

Final point is that Ubuntu, which in the Linux community is considered Windows with a custom theme, has that title for a reason. Besides being pure Linux on the backend, the front end is basically the same as Windows.

Ubuntu Linux is not a complete replacement for Windows. There are many programs (such as:  Adobe Photoshop, Microsoft Word, Visual Studio)  that either have no Linux equivalent, or the “equivalent” software program is not up to par.

It is also one of the biggest Linux communities in the world. If you have a problem, you can find a solution normally within a few minutes by asking online in any Linux community weather it is programming or general usage. I should know because I use Linux as my main OS.

You can usually find quick answers to Windows questions online.

You have the question as well, infrequent tested patching or ultra frequent fixes that can quickly be refined by a large userbase that puts it through actual non-simulated testing. The answer is obvious.

Community testing of patching (a.k.a fixes) is a good way to know if what you fixed is actually fixed! However, this does not mean that professional testers are “worse” than community testers. In other words, don’t assume community software testers are “better” than professional software testers.

————————————-

Of course I use both Windows and Linux myself and am not a Windows fanboy, but it is a pet peeve of mine to hear incorrect Linux statements made from people as well as Windows FUD spread by people who do not know what they are talking about.


Posted in Computers, Operating Systems

More Windows FUD (Fear, uncertainty and doubt)

Today I received a notification containing a comment someone posted to one of the OS talk websites I have visited before.

This person commented with an obvious bias against Windows and really did not make good arguments for Linux. By the way, this is in no way a “Windows is better than Linux” blog post (I use both Windows and Linux myself), nor do I mean any disrespect to the comment’s author.

Here is the comment (word for word) posted in red:

on hardware support, you may think Windows is better, but it’s not. Windows is worse, MUCH worse. it does have ok hardware support, and there are a lot of devices that support it, but it’s not the manufacturers writing the drivers, it’s the community, and it’s built in to the kernel. Linux does support more hardware and supports them better. a good example is the graphics driver. on Windows, the default graphics driver is pretty bad, 3D Acceleration is not supported, OpenGL doesent work and, Colors on some chipsets are terrible (Like 4 or 8 Colors), and the resolution is low. the worst you will get with most linux distro’s is a low resolution, but most distro’s work pretty good out of the box.

I am going to respond to this a little bit at a time. My responses will of course be in black.

————

“on hardware support, you may think Windows is better, but it’s not. Windows is worse, MUCH worse.”

How is Windows “much worse” in regard to hardware support? Almost all consumer-grade hardware (from the last 20+ years) have / still work with Windows. You need to give a source for what you claimed. I suspect this argument is FUD.

“it does have ok hardware support, and there are a lot of devices that support it, but it’s not the manufacturers writing the drivers, it’s the community, and it’s built in to the kernel.”

Pretty much to get the optimum performance out of your hardware, you need to use the manufacturer’s drivers for your hardware (that goes for Windows, Linux, UNIX, etc.)   Community reverse-engineered drivers probably will not cut it.

“Linux does support more hardware and supports them better.”

While Linux does support more hardware on paper, realistically most of the hardware everyday people and businesses use will work with Windows. Windows is not limited to x86 hardware. Both Windows Phone and Windows Embedded Compact work with ARM processors. Also, Windows Embedded Compact works with MIPS and SuperH architectures as well.

Saying that Linux “supports them better” is a blanket statement that should not be made without credible proof. I suspect this argument is FUD.

“a good example is the graphics driver. on Windows, the default graphics driver is pretty bad, 3D Acceleration is not supported, OpenGL doesent work and, Colors on some chipsets are terrible (Like 4 or 8 Colors), and the resolution is low.”

While 3D acceleration is not supported out of the box on Windows (referring to Microsoft’s Basic Windows Display Driver), you should be going ahead and installing the video card’s manufacture’s drivers anyway.

Yes, I know about nouveau on Linux (nouveau is an attempt to build an open-source Nvidia compatible video driver, by reverse engineering Nvidia’s proprietary Linux drivers), but this does not work as well as Nvidia’s proprietary video drivers.

Also, I am not sure what you mean by “Colors on some chipsets are terrible (Like 4 or 8 Colors)”. Most modern hardware (even back 10 years ago) would not be that bad out-of-the-box on Windows. I suspect this argument is FUD.

“the worst you will get with most linux distro’s is a low resolution, but most distro’s work pretty good out of the box.”

Same goes for Windows.


Posted in Computers, Operating Systems