Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have been a VB.net developer for a few years now but I am currently applying to a few companies that use C#. I have even been told that at least one of the companies doesn't want VB.net developers.
I have been looking online trying to find real differences between the two and have asked on crackoverflow. The only major differences are a few syntax difference which are trivial to me because I am also a Java developer.
What would be a good response to an interviewer when they tell me they are looking for a C# developer - or similar questions?
I've had to interview people for a few C# positions and this is my general advice for VB.Net developers interviewing for a C# position:
Make sure you are clear that you have been working VB.Net. This seems obvious but is something that apparently isn't (in my experience).
Try to give a code sample, if possible. I've seen some horrible VB.Net (and C#) written by VB programmers who didn't seem to learn much in the transition to .Net.
Be able to write in C# during the interview, if asked. I know there aren't many real differences between the two, but I don't want to pay you to learn the new syntax.
For your specific question: I've asked that type of question before and what I wanted to hear about was how the underlying system and framework were the same. If possible, talk about garbage collection, IDisposable, finalizers, the dangers of unsafe code blocks, stack vs heap, etc. All the kind of stuff to show that you really understand the intricacies of the .Net framework. Right or wrong, the heritage of VB brings with it an expectation of a lack of understand of lower level programming and windows in general (which, ironically enough, a c++ developer would have of a c# developer... and so on).
Lastly, how you frame your experience can make a world of difference. If you position yourself as a .Net developer, rather than VB.Net or C#, the stupid, pseudo-religious, banter may not enter the conversation. This of course requires that you actually know both VB.Net and C# at the time of the interview, but that's a good policy regardless.
The truth of the matter is that if you find that the person interviewing you writes you off simply because you've previously been developing in VB.Net, it's likely not going to be a place you want to work at anyway.
Some differences (that are more substantial than syntactical) that suitably catch me out sometimes:
VB.NET does not have anonymous delegates
Unsafe code blocks aren't in VB.NET
I love C# to death, but I envy VB.NET's optional parameters. Office automation in C# is so very, very painful.
I think the truth will-out on this:
I'm a software developer, the syntax of the language is the final part of the puzzle. By employing me, you're getting someone with demonstrable experience of problem solving and logic. I'm experienced with the .NET environment, the CLR and the associated Windows stack, including SQL and Windows server. I don't know the C# syntax, but, I am used to object-oriented approach, I will have no problem getting totally up to speed on the finer points of the syntax within a couple of weeks. You can see from these examples of my code that I'm an experienced developer, I assure you the transition will be seamless. I have already made a start learning the language, I haven't had any problems so far.
#DAC - VB now (in .net3.5) has support for lambdas:
Function(x) x.ToString()
In an interview I'd say that understanding the CLR and what the code's really doing is what's important, and that you're happy to code in either (assuming that you are).
I'm also a C# feller to the death but the differences are not just syntax. There are places where VB wins HANDS down
Optional parameters
Late binding
Working with COM from C# can be a very frustrating affair. (Which is not to say impossible!)
Truthfully? If you're a Java developer too, I'd lead with that. A Java developer with some experience in .NET will generally make a better impression than a VB developer with experience with Java. If you can answer questions on the difference between .NET and Java you should be in good shape.
I'd also recommend you learn the C# syntax ASAP. If you're experienced with VB and Java it won't take long.
A lot of developers have issues with VB and the people that use it. Valid or not you'll have to deal with that reality.
VB or C# both are syntax only diffrent but if you are applying way of logic is same.
Related
I just had a quick phone interview. The interviewer asked me a few questions like:
How does C# work?
What is the CLR and what does it do?
What is C# code converted to?
Other than the CLR question (for which I gave a very vague answer), I didn't know the answers. There were a few others related to .NET that I don't remember, but I didn't know the answers to those either.
I'll admit that my knowledge is more high-level, but I feel like I have a basic grasp of how .NET works. Either way, I got a second interview, but he said I "need to brush up on how .NET works" before my next interview.
So...I'm not exactly sure how to do that...any advice?
I guess I should also mention that I've been out of college for 2 years, and I've been working professionally since then building ASP.NET web applications. Before that, I had no .NET experience.
This article on Wikipedia can give you a good idea about these 3 questions: .NET Framework
I recommend CLR via C#, which is a great book that shows exactly how C# code works "under the hood."
Taking the questions one at a time...
How does C# work?
I would ask the interviewer what exactly he means by this—does he want features of C# such as properties, events, or delegates? Does he want to know how people develop for C#? Does he want a comparison to C/C++? This is a vague question with many possible answers.
What is the CLR and what does it do?
The Common Language Runtime is the virtual machine responsible for execution of .NET byte code (in CIL). It is the .NET equivalent of Java's JVM.
What is C# code converted to?
C# is compiled into the Common Intermediate Language, formerly known as MSIL. It is a type of byte code. To be able to see it and translate it back into .NET languages, you can use a tool like the .NET Reflector to view the CIL code as well as how it would look in C#, VB.NET, etc.
my favourite metaphor/simile is its like having a car, you don't need to know how the engine actually works (water pump, cylinders, spark plugs)... in order to drive a car, but if you did know the extra details it would help your drive even better and be able to actually understand/diagnose some problems you may encounter with the car...
You don't need to know much about the CLR to code an asp.net web site, but if you were to get into the guts of the CLR you might alter the way you code some things to make it even faster to run.
MSDN has reference material on these subjects, e.g.
http://msdn.microsoft.com/en-us/library/c5tkafs1(VS.71).aspx
those should be easy questions if you have realy been working with .net for 2 years,
http://www.microsoft.com/learning/en/us/certification/mcts.aspx
Edit: throwing in my comments bellow, certainly not well known guidelines of any kind... just for discussion
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Ok here is my situation. I've studied Java in my college for 2 semesters. But you know they teach you jack in there, just the basics. We skipped half of our textbook and even then our professors don't teach from section to section of each chapter. I don't blame them. It's hard as it is for new students to understand even the basic concepts of programming. Now this is a community college we are talking about and not Stanford, MIT or Berkeley.
So like I said I've done 2 semester of Java. I really like our textbook because it has some challenging projects to do at the end of each chapter. This textbook is pretty clear and i have no problem understanding it (although 2-D and 3-D Arrays have given me some trouble). I have tried reading a few C# books such as Pro C# 2008 and .NET 3.5 and C# 4.0 in a Nutshell. I found these books to be dry and overloaded with information that put me to sleep (No offense to the authors of those 2 wonderful, according to amazon ratings, books).
Would you suggest I finish my Java textbook, brush up my knowledge of Arrays, Polymorphism, and etc that are universal to most programming languages. And then switch to C#, plus the syntax is very similar so it should be easy to switch. Or should I just start learning C# right now from the very beginning? If it's the latter then could you recommend some free online resources that will keep me engaged and at the same time teach me everything I need to know about C#.
Someone has recommended me to learn .NET first, but I found it to be not the brightest idea. .NET is just a big monster full of libraries. How am I going to apply it if I don't even know the C# or VB!? Anyway back to my question: Master Java and switch to C# or just go with C#?
DISCLAIMER: I don't want to start .NET vs J2EE or C# vs Java flame war. I am going with C#. I've decided that I want to work in a Microsoft shop in the future. .NET is what I want to learn.
Thanks! Will be waiting for the answers.
I found myself in pretty much the same situation as yourself whilst studying Java at community college - I am smiling right now :). That was 10 years ago and D flat, as some wags were calling it, was starting to make some noises.
What I did, was do all of my assignments in both C# and Java, so that I could get to grips with both. I then begged to do my final year project in C#, which they eventually relented on. Getting practice in a couple of languages and doing a major project will stand you in good stead.
I have never looked back. Good luck! :)
Both Java and C# concepts and syntax are very similar.
I would concentrate on the one you expect to use after completing your studies. Look at which is asked for more often in the area you are intending to work.
As a side note, C# 4.0 in a Nutshell is an excellent book both for learning and reference. Suggest you give it another go.
I think I found the answer to your question...in your question.
For now, go ahead and finish your Java book as a way of continuing to learn the fundamentals of OOP.
Next (or while finishing the Java book), shift your focus to C# and the .NET framework (in most business situations, you'll be hard-pressed to find one without the other).
If you want to focus more on language elements of C# rather than a specific framework (such as ASP.NET, Silverlight, Windows Forms, or WPF, to name a few things), you might consider a book on LINQ, such as LINQ in Action from Manning Press. Combine your knowledge of LINQ with trying to solve some problems at http://projecteuler.net and you should start picking up the language pretty quickly.
Personally, I read Illustrated C# 2008 by Daniel Solis. Granted, it's not a textbook filled with lots of fun and challenging examples, but it is a good exposition of the language.
Don't worry so much about any particular language, and "Teach yourself programming in 10 years": http://norvig.com/21-days.html
Since it sounds to me like you don't really know a lot about programming, and this is largely your first major exposure to it, I think it's absolutely in your best interest to stick with something until you have learned enough of it that you are satisfied with your skill level. Jumping now may hurt you later, because you will be covering a lot of concepts you probably already know.. but hidden inside will be something you don't, and thus you will skim right over it.
Keeping yourself "engaged" is only something you can do, not the text. Certainly some texts are more interesting than others, but you have to be committed to reading the material whether or not you find it boring. That's how you learn.
Both Java and C# are syntactically similar at the basic level, but they both diverge from there in different directions and do similar things in different ways. Further, the languages are largely useless without the base class library, and those are often very different between languages.
What you didn't mention was how you are doing in school. Does your school require you to do more java work? If so, then you will have to stick with it. If not, and you are "done" with it, then perhaps starting over with C# from the beginning would not be a bad idea. Just think of C# as a new language you have to learn from the ground up, even if much of it seems familiar.
I found the Wrox book series to be particularly good to learn from, along with the Head First book series. As for which one to continue I would say it depends on what you are tested on. If you have to do written exams and write out sample code. You don't particularly want to start banging out C# by accident.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is it possible to learn C# as your first computer language without any knowledge of the other three languages it combines?
I learned objective-c without knowing c first, but assuming I know nothing of C# or any other language is it possible to learn as a first language?
Yes. It's possible to learn C# as a first language.
It doesn't really "combine" other languages. It takes some inspiration from other languages, but doesn't use C or C++, etc, directly. C# is its own language, with its own syntax and rules.
You can learn ANY language as a first language.. Some are easier than others, and use different concepts. Personally, I think C# is a decent choice for a first language, since it has a good development environment, a great community, and is flexible enough to provide good growth and usage in almost any environment, but easy enough to not be overwhelming.
Yes.
....also (trying not to blow Microsoft's trumpet) Visual Studio is a very good IDE so that + the language will help any newbie get into the swing of things quite quickly
“It is practically impossible to teach
good programming style to students
that have had prior exposure to BASIC.
As potential programmers, they are
mentally mutilated beyond hope of
regeneration.” (E. W. Dijkstra)
IMHO, the importance of a first language is often overstated. E.g., people like to slag BASIC as a terrible first language. However, I was introduced to many fundamental concepts via BASIC (flow control, subroutines, etc.), as well as some more interesting things like:
direct access to and manipulation of memory via PEEK and POKE
self-modifying code! many cool things were done with this
optimizations such as storing data at the end of the code, which taught me a bit about how interpreters work
my first (and, oh, how I wish my last...) infinite loop (10 GOTO 10) - terrifying and beautiful at the same time!
That spurred interest in interrupts and soon I was doing assembly. Later I got into OO via JScript in classic ASP, and then more formally with C#.
I guess what I am saying is, is there is no one true language, and any of them is enough to open the door a crack, enough so you can see the big room filled with light beyond. So, yes, by all means, C#.
Many computer science curricula are using Java to introduce programming. C# is in many ways very similar to Java, so I would think a student could be pretty successful starting out with C#.
If your question is, "Is C# the best language to start out with?" then I think I'll leave that alone - the answer is going to be very subjective.
I learnt C# as my first "serious" language (I knew a bit of PHP and actionscript before, but nothing serious)
And while it wasn't horrible, I'd strongly recommend combining learning C# with learning C.
I learnt C# in school for 3 years, and then learnt C for a year, and came back to C# knowing how everything works MUCH better.
Especially recursion, arrays, pointers, etc. Just like assembler helped me understand C better.
To sum it up: It's not a horrible language to begin from, it's pretty noob friendly, but for deeper understading I'd learn C aswell.
You have to start somewhere. C# is as good a starting point as any.
Of course. C# does not combine languages!
It's a completely self-sufficient language that of course has roots/draws inspiration from Java, C and C++, but that does not mean you have to learn them.
Or do you need to learn Latin before you start learning Spanish?
Yes of course and IMHO it's a good choice.
Yes, C# is a perfectly valid language to learn first.
Yes it is a reasonable choice. Knowing the languages that came before it is interesting and useful, but is not a prerequisite.
See also http://portal.acm.org/citation.cfm?id=948843
It was my first, still using it 99% of the time today, 8 years later.
Certainly. But learn at least one other language too - it will make you a better programmer.
Yes, C# would be a fine first language. You can easily learn spanish/french/english without knowing latin.
C# is rather high level, so it will be easier to start with, and cuts out a lot of the crap you have to deal with with earlier languages (NOT because those langauges are bad! C# owes much of its beauty to its predecessors).
C# will also teach you Functional Programming early, which is becoming increasingly important in our industry as multi-threading becomes omnipresent.
Sure. One of the things that you learn about programming languages is that there isn't really that much difference between them. Once you learn one or two pretty well, you should be able to pick up others in a matter of hours or days - the syntax may change, but the concepts don't. What's challenging is getting the right mindset for programming in the first place and learning the API for getting things done with a particular platform and language.
C# is a perfectly good place to start because it maintains most of the features of more advanced languages while keeping away the most complex parts, and still allows you to develop full-featured GUI applications.
IMO, the ideal learning order should be:
A wide background on Math (strong arithmetics and algebra, good formal logic (a.k.a. Boolean algebra), and optionally some set theory).
A solid background on digital electronics.
A good background about hardware: what a computer has, what can it do, etc.
Machine code/Assembly, because it (machine code) is the only thing the machine really handles (and assembly is the only "sane" language close enough to it).
Some low-level language; probably C because of it's prominence at that level (does anyone build systems with something else than C/Assembly?). This includes going down to interfacing with your platform of choice (for example, building some GUI through the Win32 APIs).
Any OOP language, ideally C++ (because .Net languages and Java normally use intermediate bytecode).
A good interpreted language, like Perl or Python.
Anything you want.
While I really thing this is the best learning order (the knowledge acquired through that path always builds upon the preceding steps, and ends up covering most of the aspects relevant on modern computing), it'd be an utopia. I didn't follow that path (although I have dealt with most of the languages listed), and it's not practical to follow it on modern times: it may involve years of studying before you can take profit of your skills.
Recently, I started private classes on programming and I'm teaching maths (as needed), pseudo-code, and C#. Sincerely, I think C# is the sanest choice as the first language: it takes you quite early into nowadays' most used stuff: GUI, DB, Networking, etc, and it isn't as aberrational as alternatives like VB.
It would also be advisable to dive a bit on other languages spanning different paradigms, just to get a bigger picture about programming. I'd suggest Assembly (preferably on a virtualized system, because bad things happen) and Python or Perl.
Just my opinion.
Yes. The fact that it has syntactic roots in the C family of languages doesn't require you to know C, C++, Java or whatever: you can treat that as a historical curiosity.
Sure, just because it's like another language doesn't mean that you have to know the other language to learn C#.
Heads First C#
I'd go so far as to say that learning another language as a halfway step is more likely to leave you with bad habits than to reduce your C# learn time.
Start with Scheme ..that's what they teach in school first.
In my opinion may be it's possible to learn C# as your first programming language, but it's very difficult (I should say impossible) to learn programming using this language. Using any mainstream (may be it's better to say industrial or production) language. This languages are overloaded by different programming concepts, syntactically complex and has enough "dark places" to confuse newbies in programming...
And it's not only my opinion (of course). Take a look at what Niklaus Wirth thinks about it.
So you can choose another road and learn Component Pascal for example. The only problem on that way is the lack of books. It seems that this book is the only option.
Anyway, good luck!
I'm a C# convert and I freakin' love it when coupled with Visual Studio Intellisense and autocompletion. It's basically the nicest programming language/IDE combo.
I would say that C# is probably one of the best first languages as it teaches you some lower level, C-like programming but gives you an easier to use and manage object/memory platform.
It's a nice, clean language with good software and community support, and I wouldn't say it requires anything a beginner wouldn't have.
That said, I was faced with this question recently in helping a teenager learn to code. I decided in the end to steer him towards VB.Net instead; not because of any preference on his or my part - he didn't ask for anything specific, I use both - but I felt its increased verbosity was beneficial to a beginner. With less symbols and more words, I think most complete novices would find VB.Net a less intimidating starting point for no great difference in results.
Absolutely it is possible. I taught my son C# as his first programming language so that he could do a science fair project. He was 13 at the time.
I think C# makes a great first language for someone who will go into more serious programming or computer science. There has been a movement towards Python as a first language recently, and while I love Python, I think it's a poor choice for a first language because it lacks data abstraction. C# on the other hand, has excellent support for data abstraction (properties is one place where it shines compared to competitors like Java).
It also has a huge standard library behind it that enables beginners to write functional programs that do cool things early on (which is essential to keeping a beginner motivated).
After the student masters the basics of object-oriented programming, C# will also let them add other paradigms to their repertoire without having to learn a whole new language.
C# is a really good language to be learning first... However having learned C and VB .NET at first, in my opinion will give you significant boost :)
I think languages like: C, C++. Are the best languages for beginners - they help you understand how the system works - what is memory, how to use it, allocate, and so on. C# and its garbage collector allows you neglect this things.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Question:
What are some good libraries that've been written in VB.NET? The best would be open source, as that would allow interested developers to take a look at some good VB.NET code and see how the language can be used effectively. But I'd be interested to know about any libraries at all, particularly reputable ones.
Long-winded explanation of where I'm coming from:
Generally speaking, when VB.NET and C# are compared, there is a lot of strong support for C#, accompanied by some bashing of VB.NET until a respected developer comes along and acts as The Voice Of Reason, pointing out that while VB prior to VB.NET had its fair share of issues, VB.NET is really a very strong, fully OOP language that is, feature-wise, right about on par with C# (with the exception of certain things like a full-bodied lamba syntax [pre-VB10] or the yield keyword, as many C# faithfuls are quick to point out).
I myself, having written plenty of code in both VB.NET and C#, fall squarely in the "I prefer C#, but don't consider VB.NET any less of a language" camp. However, one thing I have noticed is that when it comes to respected and/or widely-used libraries for .NET, everyting is written in C#. Or at least that's been my impression. This strikes me as a little strange because, aside from the abovementioned sprinkling of nice features (in particular the yield keyword), I tend to view the VB.NET/C# divide as primarily a matter of personal taste. Obviously, plenty of developers prefer C#. But I personally know some developers (good ones) who prefer VB.NET, which would lead me to suspect that surely some libraries (good ones) would be written in VB.NET.
I'm thinking they must be out there, and I just haven't found them.
I write VB.NET and C# interchangeably (about 50/50) in the apps I manage, and I've always had a slight preference for VB.NET (I've been programming in BASIC-lineage languages for 25 years, since I was 9, but only about 15 years in C-based languages).
That said, I find C# is a better language for libraries.
This has nothing to do with VB.NET's limitations and everything to do with C#'s.
I want my libraries to be easy to call from both VB.NET and C# code. When I write in C#, I tend pay attention to things that matter when calling the code from C#. Two examples of this are C#'s case sensitivity and its lack of optional parameters. But when I write library code in VB.NET, I'm not as tuned-in on issues that could make my API less friendly to C# callers.
Generally speaking, my opinion is that the languages are really the same. It's the convenience of the syntax. Personally, I like that you can have multiple things happening within the same line. Once I switched to using C, Java, JavaScript, Perl, and the curly bracketed languages, I found it easier to understand simply because you could see much more in fewer characters.
As far as good frameworks written in VB.NET, check out anything written for (and including) Dot Net Nuke.
Another good point is that most of the Design Patterns, TDD, DDD, Agile, etc. use Java as examples, which is very much like C#. It's like trying to translate British to English rather than Spanish to English.
BASIC = Beginners All-purpose Symbolic Instruction Code.
Throw a "visual" in there and its still a beginners language ;)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What is the quickest/easiest way to learn Java for a seasoned .NET/C# (more than 7 years) and C++ (5years) developer.
When I say to learn Java - I mean being able to write applications in a "Java way" using base classes library + where needed using a popular Java libraries (it is great that so many of them are open source).
I know that Java development comes in a lot of flavors - enterprise applicatons (Java EE), mobile devices (Java ME), objects hosted in application servers (to my knowledge Java has a buch of these) - however at the moment I am interested in a general Java development - may be with a some emphasis on a integration projects/enterprise development.
So basically - I am a strong, passionate about technology, proud to be a senior C#/C++ developer with a dozen years of experience who wants to dedicate a month-worth (may be more) of evenings to learn to effectively program in Java environment.
Having said that I don't mean I am switching from .NET/C++ to Java - but I would probably have to spend 30%-50% of my development time developing/supporting/whateverstageintheSDLC in Java.
Thank you.
I suggest starting with The Java Language Specification. I don't think there is any quicker or more comprehensive way of gaining an understanding of the language for a seasoned programmer.
Followed by Java Collections Tutorial.
Followed by java.lang.* and java.util.* classes, interfaces and packages.
This will give a good basis for learning and understanding any other branch of Java as it becomes necessary.
I would take a completely different approach to reading books upfront. Simply download an IDE and get coding. The netbeans tutorials tend to get you up and running with a variety to technologies very quickly.
If you can code C# then you should have no problem getting something up and running.
Once you have some code up and running that is when you would then dig out the likes of effective Java.
Karl
Effective Java should be in every Java developer's bookshelf. It focuses not so much on performance as one might think from the title, but rather on how to program Java idiomatically, which becomes subtly different from following the idioms of C#.
Perhaps one of the best ways would be to get a copy of Bruce Eckel's Thinking in Java.
Much more than simply covering the syntax of the language, this book goes into the background - as the title says, "How to think in Java" so you can write pure Java code, not C# (or C++) code using Java Syntax.
I m only speaking for java web app development: i think its going to be quite similar to how you might've done it in C# using ASP.NET, except you don't get the visual drag and drop GUI creation using visual studio. The basic concepts are pretty much the same.
As for libraries, there are a million and one in java, and only time will help with those. But it'll help knowing the common ones, such as apache commons, google collections, spring, hibernate. It might help you get started if you start with something like Appfuse, which is a full java RAD web app framework that munges together all the above common frameworks.
On the build tools side, there are ant and maven as the major players. I prefer ant over maven personally.
Ordered list:
Thinking in Java;
Core Java, Volume II;
Spring reference;