Related
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
What are the benefits of using C# vs F# or F# vs c#?
After reading some on the subject and watching this video
http://streaming.ndc2010.no/tcs/?id=29649A14-2F1B-428E-BB12-9A43A1676221 where Eric Lippert, Jon Skeet, Mads Torgersen and Neal Gafter discussing the future of C# its pretty clear that C# has some heavy baggage from earlier features added to C#. These features must be supported in later versions of the language even though they add complexity and makes adding new features more cumbersome. Probably why most languages die sooner or later.
F# is a new language and obviously don't have the same legacy to worry about, so since both are general purpose languages it seems tempting focusing more on F#. Do you think F# is going to take over C# as the language of choice within the .net world and in case how soon will this happen?
I know there is a difference between functional and imperative languages so you could argue they are too different to be compared but the fact that c# is getting more and more functional features I have to ask why not just make the jump directly to F#
Firstly, don't think of the division being "functional" vs "statically typed" - F# is still a statically typed language.
Do I think F# is going to take over from C#? Not in many areas. In some niches it will definitely make its mark... but I personally think it's more important for a different reason: it will encourage people to think more functionally.
It's absolutely worth looking closely at F# - in order to improve your C#. You won't find that every task is suited to a functional approach, but it's definitely worth learning to think in a slightly different way.
At this point, I should probably plug Real World Functional Programming - mostly written by Tomas Petricek, with a tiny bit of help from myself. It's aimed precisely at developers who want to think more functionally, with a heavy bias to existing C# developers who are interested in F#. (And today - September 4th 2010 - the ebook is only $15. Use code dotd0904cc at the checkout :)
C# is here to stay. The majority of commercial developers (and almost all commercial .NET developers) are trained in and use C derivative, imperative languages/styles.
I don't think the development world is going to undergo such a radical paradigm shift that imperative OO will vanish in favour of functional hybrids unless of course you count C#'s own move into the realm of a functional hybrid.
(by and large) You just cant hire F# developers, You can't find a job as an F# developer, you can't convince most workaday C#'ers (those who aren't language fans or hobbyist coders in their spare time) that F# is anything more than an academic toy or is simple enough to make it worth their time learning.
I SO wish that wasn't true, the more I learn F#, the more I would love it to be the language I used on a daily basis.
In reply to your question: YES! learn F# as it's a wonderful language, but it's not going to squash C# overnight (or over the next decade).
Should you take a look at F#? Yes, but because F# is an interesting language, and you will learn new things; not because you're playing defense against the chance that "C# is on its way out and F# is the wave of the future". C# is well-established, a great language with a great community and lots of existing assets (tooling, samples, templates, ...) that make it extremely unlikely to be supplanted by any other .NET language in the near future. Learn F# to play offense: to grow your own skillset, and become an overall better developer (even if you still mostly develop in C#).
(Feature creep and legacy do slow languages down some, but not much. From what I gather, C++ is still in use, despite crushing legacy. :) You said that languages die "sooner or later", but I don't recall offhand any language that reached the mainstream but then died "sooner".)
First of all, F# is a more specialized language than C#. Yes, you could write solutions to almost anything in F#, but you'll find it particularly useful at:
Implementing complex algorithms with lots of transformations
Implementing concurrent algorithms
You won't find F# that powerful at things like UI or DB access (it can be done all right, but you won't find that much a difference from using C#).
Second, I don't think that F# will take over C# overall, but there are certain niche markets (e.g. the financial industry) where F# have a real chance of getting prominent above other languages.
Lastly, the functional programming paradigm, as you yourself mentioned, has made in-roads in several other languages/platforms (Python, Ruby, C#, VB.NET, hopefully the next Java), so getting familiar with its concepts is going to be helpful, and right now, at least in the .NET platform, F# is the truest implementation of such concepts.
Short: You probably shouldn't use F# as a general purpose language* like C#, but add it to projects where appropriate.
General purpose problems do often differ too much from the functional paradigm that F# wouldn't really excel, but in some cases, F# is absolutely the right tool. It's worth a close look though anyway, since otherwise you won't be able to actually point out these cases where a functional approach (even if implemented in C#) is favorable.
Nice problems for F#:
Mathematics / Physics / Simulation / Visualization
Data extraction / processing
Reactive GUI
Asynchronous code (events, callbacks)
Parallel execution
Parsing (domain specific languages)
Language-oriented programming (customize the language using it's
own features)
Edit: Clarification after being downvoted. Of course, F# is a general purpose in the sense that you can do everything with it and target the whole .NET framework as C# can, but because it can be used, that doesn't mean it should.
As I said, many "general purpose" applications are not inherently functional, heavily based on changing state or common object-oriented patterns. While you again can use F# there, it doesn't really shine in this cases, being kinda programmed against it's nature.
Why should you use a functional language when you don't solve a functional problem? And since you don't have to, just combine F# and C# where each fits best.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've never really had any experience with programming at all, my uncle told me to come to this site for help from total strangers if I wanted to start programming. I know the names of a couple of languages but I don't really know anything at all. I'm fourteen and I can type fast if that counts for anything. One of my uncles wanted me to learn c#. So my question is, is c# a good place to begin, and if not, where is a good place to begin and how do I learn it?
You may want to look at getting the latest edition of Head First C#. It's particularly suited to newcomers - and it concentrates on "fun" examples rather than business-oriented ones. I'm not personally a fan of that style of learning, but it clearly suits a lot of other people.
Make sure you buy either the latest edition (covering .NET 4) or the most recent printing of the previous edition though: earlier versions had quite a few errors, but those have been rectified over time.
C# is a fine language to begin with.
Here is a good free ebook to get you started. It not only discusses the programming language but also what it means to be a programmer and how to approach it professionally.
As Jon says in his answer - Head First C# is also a great first book (as are all their other books such as Head First HTML).
You can get the Visual Studio Express programming environment (editor with syntax highlighting and intellisense, compiler, debugger and more) for free here - just be sure to select the C# version.
C# is an okay place to begin, but you might find it more fun to write websites instead. It's easy, everyone can see the cool things you do, and you already have the tools to start doing it -- just a text editor and a web browser. HTML and Javascript are also much simpler and more straightforward than C# without being less powerful.
http://www.w3schools.com/ is a good starting point.
In my opinion, there is one critical tool when learning to program or when learning a new programming language. That tool is "a problem that you are sincerely interested in solving."
It may be a game you are interested in writing or a desktop or web-based tool that will actually help you with something in school or in your life.
If you have a real problem that you really want to solve, there will always be free tools, tutorials, and online geeks to help you learn how to solve it.
Learning programming without solving real problems is like learning to build a house with just a hammer and a nail and a short piece of wood. You can learn the basic mechanics of the hammer, but you'll never be a carpenter until you have to confront the problems you'll encounter while trying to build something useful.
After that, I think C# is a great general purpose language to learn programming. And there are some really great free tools available.
I agree with the poster who said experiment with several languages. Solving the same problem with different tools can be a real eye-opener into the different paradigms of those tools.
If one of your uncles wants you to learn C#, he probably sees you as his employee a couple of years from now. So ask him directly if that's his plan and persuade him to help you.
If your uncle has no idea about programming and just dropped this C# suggestion because he heard the term somewhere, he might be doing a very bad favor to you.
If I would be you and I would have free hands to choose what I want, I certainly wouldn't choose C#, because it ties you to a proprietary operating system (Mono is a joke, admit it).
My choice would probably be Python, because it runs on almost any platform. And you have two very valuable tutorials for beginners that approach teaching programming from very different points, so you can pick the one that suits you best: the official Python tutorial and Zed Shaw's Learn Python The Hard Way (don't be afraid of the scary title, the book is very valuable for a beginner).
edit:
After reading the comments, I would like to add a couple more points.
How many of those C# programmers code for fun? Most programmers that use Microsoft technologies, do it professionally - it's their job, they do it for money, most of them don't have guts to admit their job is boring sometimes (even if it is), because such a claim is against the corporate policy that slips into the culture around the infrastructure provided by their (cough!) free programming tools.
Just in a couple of years, the community of users who do programming more or less seriously has literally exploded. Back in the days there was sourceforge - the single monster that was totally programmer related. Today there is launchpad, bitbucket, github (which recently surpassed 1000000 repositories, most of which are small personal pet projects governed by free licenses). How many of those projects are using C#?
Today programming is about reusing or "stealing" (in the good sense) code more than ever. Where are the herds of C# projects, small general-purpose libraries? While some programmers who write proprietary software are not very helpful to newbies (because they see it as consulting, which they can do for money), and while some programmers who write free software are not very helpful as well (because they lack social skills), the code is more important. You don't learn programming only by reading books, you learn it by studying working code. And the free software ecosystem provides much more code to study.
Generally, people who get into programming have two choices:
avoid proprietary stuff, get access to a lot of free software at the risk of being called "anonymous internet elitist"
ignore the proprietary vs free holy war at the risk of feeling what proprietary software means indeed and how it can spoil a good intention, like this guy
There's a lot to programming but it can probably be broken down into a few key elements:
theory
craft
dialects
Theory just takes lots of learning. Books, classes, trial and error, research, etc.
Craft comes with experience.
And that leaves dialects...or rather the particular language(s) you want to become fluent in.
To answer that would require a long list of what kind of stuff you are aiming to do. If you don't really have any particular direction to go in, your 'uncle wanting you to learn it' is maybe as good of a reason as any.
I would say dibble a bit in a few hot languages like C#, Python, Ruby. The reason I say this is, I think liking a language is a bit like developing tastebuds. I know many people who disgusted coding only because of braces and syntatic sugar. All I wanted to save you was from getting intimidated by syntax and throwing it away
I believe C# is a really good starting point. That's pretty spiffy that you're really interested about programming at 14.
I suggest picking up a C# book and reading it. Follow the examples as you come by them.
One of my favorite C# books is by Andrew Troelsen: Pro C# with .NET 4.0 is his latest book. :)
http://apress.com/book/view/1430225491
C# is definitely a good place to start and here is one reason why:
C# is a proper language that will pretty much force you to know what you're doing as a programmer.
I began my programming career with PHP and that language is so loose you almost can't screw up. You can make cool sites and such but never know how terrible they are until you are hired to do something that requires a stronger language. At that time, certain terms and data types that are never used in PHP will broadside you.
As I look back, now that I know many programming languages, starting with PHP was a pretty bad way to begin programming, at least in my opinion. I can't believe I have a job in this field knowing where I began.
Java is also a good place to begin. Any strict compiling language, really. When you know the foundations from a strict compiling language, the loose ones like PHP are a breeze to add to your knowledge base.
Of course, you may want to consider what you're looking to program for. If you want to do web work, C# is a good base, but doubtful that you will use it much for web work unless you're working on something seriously deep. Objective C is used for iphone and ipad development, so you can't go wrong learning that.
Java is good for web and is now a mobile platform, so it is definitely a good investment. The principles of Java will help you write better web code, as well as form a good foundation if you want to branch to C later. Vice versa, I guess.
PHP is very easy to learn and will serve you quite well if you want to get into web development. You should know html, css and get familiar with at least mysql for databases if you go this route. Just FYI, php developers are a dime a dozen in the programming field, so don't count on getting rich doing this unless you want to run your own web company and do the site yourself.
In any case, MVC (model view controller) will be an important thing to read up on. When your code is well structured, it is immeasurably easier to maintain for yourself and anyone else that may have to pick up where you left off.
Have fun.
There's no best approach, but one place to start is here:
Express Editions
They're free and you get lots of choices.
to copy a post i posted here: https://stackoverflow.com/questions/3430705/3432079#3432079 there are two things to get a handle upon:
Academic Knowledge:
Know the Theory - get a great handle on the theory of programming, the theory of language design, the theory behind the architectures you are coding on
Know the Math - all programming eventually boils down to math - know predicate logic, trig, vectors, geometry, (basic) set theory, graphs, basic matrix theory, a little numerical analysis doesnt hurt either - as well as complexity theory
Know your Language - get a book, read it, make notes for reference. Apress titles work well for C# http://www.amazon.com/Pro-2010-NET-Platform-Fifth/dp/1430225491/ref=sr_1_1?ie=UTF8&s=books&qid=1281215548&sr=8-1 is good. Then read blogs and videos, learn to use the Redgate Reflector and MSDN help
Know your Tools - for C# this means Visual Studio 2010 - http://blogs.msdn.com/b/saraford/archive/2010/06/17/video-101-visual-studio-tips-in-55-minutes.aspx is a great way to learn. Also get a decent refactorer - ReSharper is my favorite but there are others.
Know your Ecosysyem - know what libraries are out there, learn how to use one or two of the best
Skills:
Know how to define a projct - no matter how good a programmer you are if you build the wrong thing you will have failed epically.
Know how to design - learn the theory on object orientated design - the Gang Of Four software patterns are classics and every coder should be aware of them.
Know how to document code - this is critical for long lasting code and for working well in a team. Write it, Document it, Test it => Resuse it
Know how to work in a team - work hard, play nice, communicate well.
Know which tool to use - get a feel for as many types of languages, actual languages, technologyies, libraries and so on as you can so that you know which to use in which situations
Know how to learn - from those around you, from the web, from documentation and most importantly from your own mistakes.
I'm sure others can add to these lists ;)
I personally got a great headstart on programming when I started on C++ about half a year ago. I'm about thirteen myself as well. C# is a lot like C++ (there are differences, though), so speaking from experience, I'd say yeah, that's a good language to start out with.
As for references, just grab some books at your local bookstore and start working your way through them. That's what I did. If you want to start with C++, I know for sure that there's an excellent reference called 'C++ for Dummies'. That's where I started.
Whichever language you decide to pick (nothing wrong with C#). Pickup a good book or resource, a few are mentioned here. Once you've done that, make sure to work the examples by hand and then at the computer to concrete them into your melon.
It may be totally obvious, but the more examples you can work, modify and make your own and see how they work, the quicker you'll pick up the language. IMHO this is how you really start to learn and have fun because you can start seeing things happen and begin to solve problems and gain context to issues you wouldn't have just reading...
It is an asset You have made a commitment to prgramming. It is usually advantageous to start from a keen understaning of Your working environment. Ask basic questions like what tools are already available to do Your daily assignments? Have as much fun as You can with them; and when they behave unusual, ask the why? Try finding solution to them on the net. Later on, perhaps You may want to enjoy basic html for sometime; and move all the way around c-sharp or anyother programming language; because at the end You- Yourself will figure out the link between a programmer and programming languages.
Hope it helps
I wouldn't pick C# purely as it isn't completely free and the full visual studio is very expensive.
Have a look at python, it forces you program properly in many ways whilst omitting some of the more annoying aspects of programming ({'s and ;'s).
If you do choose to learn python there is a free site with tutorials on how to make simple text based games. I used it to familiarize myself with the language before starting my current project.
link:
http://pythonbook.coffeeghost.net/book1/index.html
The most used languages are C and Java, according to Tiobe, so I'd almost say you should start there but esr has some good reasons for recommending Python as a first language.
C# is an excellent place to start. One thing I would suggest is think of something cool, but not too complex, that you would like to build the using some of the reference books other people have suggested in this thread go build it. Calculators are fun starting programs to build (Disclaimer: I am a math geek).
Having an ability to type fast using ten fingers is useful as you can do more and more exercises without causing your muscle tired quickly.
The first time I used computer, I just typed using my right index finger only and got tired fast ---typing become a nightmare !
If you have much time, you can start learning the following topics in order:
Computer architecture from hardware and software perspective.
C# (Deitel's C# book may be a good choice since it has much more details).
Any widely used language is a good place to start. Once you have done some useful projects in one language, it will be easier to pick up others because the logic is similar.
I suggest choosing based on what you want to do with it now. For example, let's say you are interested in making a few simple games while you learn (think frogger or maybe 1943 and keep the scope small). You can make 2D games pretty rapidly using an interpreted language like Python or Ruby (both have free game libraries available). With perhaps a little more work you can make them in Java or C, and have room to grow into heftier game features. Or you could make them in Objective-C and Cocoa, which would limit you to developing on a Mac, but open the possibility of distributing your games on the iPhone.
If you want to do business or finance applications, you can find a lot of support based on languages like C#, Visual Basic, Java, C, and the .NET framework (not a language, but applicable to enterprise software generally). It would also be a good idea to practice with SQL for interacting with databases (where business data like sales, customer names, or employee records are likely to be stored).
The most important thing to learning quickly is that you enjoy the projects you are working on, and are extremely interested. It will seem impossible to learn a language if you don't really want to do anything with it. On the other hand, you can be an amazingly good programmer in 6 months if you quickly start working on projects of interest, and are fanatical about solving the problems you set for yourself. Besides, you're 14 so you have the option of pushing your life and career in a direction that will give you both income and enjoyment in the work you do.
OK, is it just me or no one asked him the main question.
What do you exactly want to do ?
Do you want to play with hardware (ie have some board connected to a serial / parallel / USB port and have some LEDs flashing, have some sound coming out a speaker etc) or do you want to develop applications that have a nice user interface connecting to a database or even a game ?
Well, for number one, that will be assembly (ie for ARM SOCs) and C and that would require you to get familiar with hardware programming.
For number 2, I'd say C++/JAVA. I wouldn't recommand a language that is only supported by one OS (like C#) ...
I want to make a program that will involve some faces with various facial expressions. They will change from one facial expression to another based on their "mood" as influenced by user input. I know some java but I have done pretty much nothing with graphics. A friend tells me that it will be easier to do this in C# with XNA than to do it in java.
I have about a month to do this, so I was hoping you folks would help me make a decision. Would I be better off figuring out how to do this in java, or learning C# and XNA and doing it in C#? Is it so much easier to do this in C# that it would be quicker to learn C# than to struggle with doing it in java? Will it probably come out looking much better if it is in C#?
Your best bet would be to download XNA Game Studio (free), and go through some of the getting started tutorials. The graphics APIs are really simple, and the educational resources available are really clear ... so you can decide for yourself:
http://creators.xna.com
In general, I do think that XNA is a great choice to complete this project quickly as you'll be able to learn C# really fast based on your existing knowledge of java
If you already know Java, then I would do it in Java. While C# is very similar, if you have never used C# then trying to accomplish your project at the same time you are learning C# might be overwhelming.
You can use JavaFX or Java2D for animation. Here are some examples of JavaFX stuff:
http://javafx.com/samples/
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 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 4 years ago.
Improve this question
I'm a hobbyist programmer with a fair grasp of Python and I'm currently learning C. Recently I was talking to a colleague who also wants to learn to program. In his case, he wants to learn C++ as a path to Windows game programming using DirectX. Personally, I feel diving straight into C++ as your first language is a bit much - it's hard enough keeping motivated in an easier language, and I think it's better to learn another language to get your head round most of the basic concepts, then go into something like C++.
I found Python worked well as my first language as I'm more interested in network and web programming on Linux/Unix platforms, but for someone mainly interested in Windows game programming I was thinking C# might be a better choice as he could learn using Visual C# Express Edition and XNA, then switch over to Visual C++ when he's ready to start learning C++ and therefore already be in a familiar environment. I think memory management is a lot to take in, and C# at least handles that so he can put that off till he starts learning C++.
What do others think of C++ as a first programming language for this kind of application? Should I recommend he go for C# instead?
C++ should be fine. I think he is best off learning about memory management, pointers, etc. BEFORE jumping up to C# as he will understand how the program is working better. Otherwise, he will just see memory as being magic and the garbage collector will have no real meaning. It's always good to have a solid understanding of underlying languages (C, C++, Assembly, etc.) to produce the best code.
C++ is the main language used for most "serious" gaming titles. If programming for a major gaming studio then he needs to know the dirty little bits of C++.
Starting out with C++ might be a bit much for a complete novice. I would recommend C as a great starting point. You get familiar with the concepts of memory management and the other low level stuff before adding the complexity of C++.
Since C# is managed code, he would not be gaining the insights of the low level memory management. That will not serve him well when having to deal with C++. In this case, starting closer to the metal will help him in the long run.
C++ game programming is great. But unless you like total pain while you are learning to program, you might look at starting with XNA. This will allow you to work on the game content and logic instead of fighting with your engine code.
Now if you like pain go the DirectX and C++ route to start with.
I think it is better to thoroughly learn a language such as Java or C# before taking on C++. The reason I say this is because you can easily get bogged down in the details and intricacies of C++.
I struggled with C++ on and off (as a hobby) for a few years, then at Uni I was taught Java, stopped doing any C++, got a job doing Java for a couple of years, then moved into C++ dev. I picked everything up very quickly because I already knew what patterns and concepts I wanted to apply and it was just a matter of learning the syntax and weirdnesses and getting used to pointers again. I just had to learn HOW and not WHY. Taking on C++ as a first major language is learning HOW and WHY at the same time and it can be very confusing!
XNA is a good suggestion.
Python is good at game programming. See i-want-to-learn-game-development-which-language-should-i-use. Consider learning Pygame.
Pygame is a set of Python modules designed for writing games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system. Pygame itself has been downloaded millions of times, and has had millions of visits to its website.
If he wants to get into the industry, then knowing C++ is vital, as the majority of game engines use C++. (I also developer should at some point lean C or C++)
However, if he wants to write games (as in, finish writing a game) then C++ may not be the way to go. It is very complex and has a lot of pitfalls that make it a slow language to develop in. It is not just the memory management, but things like the horrible stl related compile errors etc that make it very hard to get anything done when first trying to program.
Looking at something like C# or Python would be a better option, as they are far less complex languages and each have some good game library's.
If he decides that C++ is the right way to go, then I would recommend at least a rendering library. Something like Ogre3D at the very least. The reason for this is covered in this article Write games not engines. While writing (or trying to write) an engine from a base API is going to be a good experience, it is unlikely that the game will get finished.
Something you have to consider is existing SDK's, you probably don't want to program everything yourself. For example, there are pretty good 3D engines with different types of licencing that may suit you well.
So you should check outthe existing libraries and SDK's and the few languages you want to stick with together at the same time. Adapting to C++ or C# is not that difficult, the former is more strict and more demanding whereas it gives you more extensive control on memory, the latter allows you to focus on the main development area but takes the memory management in charge (mostly), which means you could have real-time issues.
At the end of the day, what help you can get to build your application will invariably outweight the small differences between those OO languages (to some extent).
There are lots of game engines, most are listed on this page. Of particular interest are, in the free world:
Panda3D (http://www.panda3d.org/), C++ and Python;
NeoAxis (http://www.neoaxisgroup.com/), essentially C# (.NET);
Ogre3D (http://www.ogre3d.org/), C++;
CrystalSpace (http://www.crystalspace3d.org/main/Main_Page), C++ and Python;
Esenthel (http://www.esenthel.com/), ...
Non-free packages include Unity, and others.
If you do not want any of those engines, there are still very good libraries like Qt for C++, that allows scripting - though not directly Python, you would have to embed it yourself - and others for C#, but the listing could get quite lengthy.
Typically, people run out of steam before completing their first game. Therefore, unless your friend has a track record of being doggedly determined, I'd recommend the most high-level option available. If you are choosing between C++ and C#, that'd be C#.
I would prefer XNA and C# for a quick and painless introduction.I would use C++, and a library like DirectX, for game programming after having some experience on the topic.Most of the most successful games have written in C++.
If your goal is to have fun, and actually finish games yourself (or in small teams) that are relatively small in scope, then I say C# and XNA.
If your goal is to work in the industry, on super big budget games with giant teams... Then C++...