Can I start programming with C? [closed] - c

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I want to begin programming i have no previous programming experience so can is start programming with C ?..Some people told me to start with perl or python .. So can i start learnning it without learnning python or perl first ?..And if so is the "Programming in c" book by steve kochan good to start with ?..http://goo.gl/Jh6bE

I'd like to contradict all the other answers given by my fellows: before you go off using OOP stuff or higher level languages, you have to know what's going on under the hood of all the fancy garbage-collection-template-multiple-inheritance-whatever-voodoo or you will get into trouble sooner or later.
It is absolutely essential to know that every single memory allocation is expensive and that you have to take care of your memory, for example.
I started programming using C and find it quite easy to learn new languages with my C background. Programming isn't about creating fancy user interfaces by dragging-and-dropping controls from a toolbox: that is just the topping. But before applying topping, you need some cake to put it on. If you don't know how to bake the cake, you'll never create a fancy one.
C is a simple language where you learn how to code some loops, conditionals and so on. It has – aside from pointers and sick #defines – almost no weird language constructs. Once you know how to set up the basic stuff, it'll be easy for you to transfer that knowledge to any other language.
I think, learning C is the first step to become the Duct Tape Programmer. If you're not interested in that, then it would be perfect to start programming with BF, Whitespace, FALSE or any other language...

I would not recommend starting with C. C wasn't designed to be a teaching language, and some aspects of it aren't very intuitive. It introduces a lot of complexity up front, and you'll be spending more time asking why something isn't working the way you want it to than actually getting things done.
As introductory programming languages go, Python is much friendlier and easier to get started in.

Entire generations of programmers started with C, no reason you can't either.
Python is an overall easier language to learn however than is C, so you might be able to learn the basic principles more quickly than you would starting with C.
As to the book you mention, I've never read it so can't comment on it.

I would recommend learning to program in a higher-level intepreted language such as Perl, PHP, Python... if you then want to go lower-level and learn C, you'll have a good basis, and won't have been "thrown in the deep end" so much. You'll also likely find more junior development positions for those languages, if you're looking to start a career.
Having said that, knowing some C can be helpful to give you an understanding of what's going on "under the hood".

You can start programming with C, although C isn't perhaps the best choice for learning. I personally recommend Python since it was designed in part for novices. Perl is probably a bad choice for novices given its interesting syntax. If you need to get close to the machine, or you're going to programming in micro controller space then you will likely need to learn C, but its probably not a good first choice.
I can't comment on Programming in C, but I can recommend The C Programming Language if you're a motivated self learner.

You could do, but I really wouldn't recommend it. Most active software development occurs in vastly, vastly different languages like C++, Java and C#. You'd be learning a language whose heyday is many years past, and whose best practices are decades out of date.

You can start programming in C. However, if you've never programmed before, it's almost certainly going to be much easier to learn a higher-level language to begin with. And unless your interest in programming lies in a few narrow areas like operating systems, it's unlikely you'll want to use C in the future.

The answer is of course "Yes", but C may not be the best choice as a first language.
You've to master some fairly advanced concepts before you can do the most basic things.
There are other laguages that are much friendlier such as C# and Java. If you know folks with Perl and/or Python experience that will help you, then go with either of those (I'd pick Python as a first language, if I had to choose between Perl, Python or C.
Personally, if I had to help someone get started with Programming I'd get them started with C#, but that's because I work with it everyday, and you can make it as simple or as complex as you like.

Short answer: yes.
Since you have no previous experience, when you learn your first language you are learning two things actually:
1) The syntax of the language, where it wants its commas, curly braces, and stuff like that
2) General programming principles
The reason people tell you to try something simpler, like Python (or PHP would be my suggestion) is that some languages make you type in a lot of stuff that has nothing to do with the problem at hand or what you are trying to learn. In other words, you spend too much time with some languages learning things that are specific to that language, making it hard to learn general programming.
Anyway, my suggestion would be PHP because they have great tutorials, you can get some programs going that do things, and learn the basics fast.
Also remember: all committed programmers know multiple languages and learn new languages fairly regularly, so the first one you pick will not determine your destiny. Pick the one that is appealing to you for your own reasons.
...and enjoy! Welcome to programming!

Related

I wish to learn to code 3D Games. How do i start? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Well, where do I start.
I am a newbie in the programming world. I barely know the basics of C(and am lacking quite a lot).
I wish to start coding games with C, not with C++ because I have found out that C++ is much harder than i assumed it was.
I checked out the recently disclosed source code of Doom3 and it was written in C++, I didn't understand the code as it was quite OOP(ish).
I did not find the entry point of the game, however I found multiple int main in the source and was baffled.
I read up on game engines, however I still cannot understand them even after multiple reads.
I actually don't want to do 2D games, 3D is what i want to do, but I do not know how. How are the graphics made,when you walk how come an object is still there and not disappearing to be redrawn again,how is gravity simulated, and much more.
I am sorry if my question is confusing, I always write whatever pops in my head.
Hit the books.
Learn to program.
This often surprises people, but game programming is not magic. It is a specific subdiscipline within the programming field.
And that means that you can't start with it. You have to learn to program before you can learn to program games. Just like you have to learn to program before you can learn to program word processors or web browsers or operating systems.
And just like you have to learn to drive before you can learn to drive a bus or a race car.
So start from the basics. Learn to write simple programs that are not 2D or 3D games. They might be purely text-based games, or they might not be games at all, or they might not produce any text output at all.
Learn programming. Don't try to skip ahead. Don't think that "now I know how to write a small simple 40-line program in C, so I'm ready to tackle a 3D game".
There are no shortcuts.
I have found that the best place to start is either 3DBuzz or Marek-Knows. Both sites offers video tutorials that explain every single step. Marek-knows is purely C++, where 3DBuzz give you the option of choosing between more. It also has the best Unity tutorial on the web.
get yourself MAYA, and learn how to box model first, this is an enjoyable learning curve, then later learn some animation, and then once you have a good idea of what you are doing you can learn more about texturing and physics.
If you were to work for a large gaming corporation, say Playstation for example, It is highly unlikely you would both program and model at the same time, so the real decision is what side of 3d gaming do you want to get involved with?
First, you need to learn programming. For that, C might not be the best language. I would suggest a statically typed language like Ocaml, and/or a dynamically typed language like Python or Scheme (the great SICP book uses it).
After you learned some programming, you can try to learn C. Better first code simple command line programs.
Learning several different programming languages and paradigms is important.
After you learned C, you can try to learn how to use some graphical library or toolkit.
You'll learn a lot by using GNU/Linux, because all the programs involved are free software and you can study and improve all the software you use.
Enjoy, learning what you want takes a lot of time (months or years), but is very fun.

Would a novice learning C and Scheme simultaneously be considered bad practice? [closed]

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 1 year ago.
Improve this question
I've been on and off with the C language for the past year(?) until two months prior to present day when I decided to take my learning a bit more seriously. In some areas of the language I feel comfortable, but I know that by anyone's terms I'm still considered an amateur and have much, much more to learn.
Recently, I've heard nothing but good things about how helpful taking an approach in different paradigms is to gain perspective, so I figured maybe trying to learn another language would be nothing but beneficial to the areas I'm weak in with the C language and possibly programming concepts in general.
SICP is considered one of the most influential books every programmer should read according to stackoverflow and plenty of amazon review comments, so naturally I chose it - just recently purchased the hardback. I'm excited to learn in hopes of coming out with some much needed experience, but my only concern is whether it would be a problem for someone at an early stage as I am to attempt learning two languages with different paradigms at once. I'm hoping learning Scheme and the concepts from this book will help me to think differently and more abstractly with C rather than confusing me.
Any insight would be great - whether it be to continue with these two languages, perhaps choose another language to aid my C or drop the second language for now. I just need insight from a seasoned person on the matter.
Learning both will give you a good appreciation for the strengths and weaknesses of both langauges, as well as two very different problem solving approaches.
Have fun!
I think you'll be okay. It's similar to learning maths and chemistry at the same time, and most people manage just fine. (Except for people who don't understand maths and chemistry, and enroll into liberal arts ;) )
If you are new to programming, I would urge you to start with HTDP. Yes, it is scheme based, and focuses on recursion, but its goal is to give you a framework for approaching problems that is generally applicable. It may seem boring at first, telling you stuff you think you already know, but don't skim. The disciplined approach they take to approaching problems translates easily away from scheme and recursion, and is a useful tool in general.
There is no reason not to learn both languages at the same time. They are sufficiently different that you are unlikely to get confused. If you have time to learn only one, C is probably more generally useful, but they are both (by modern standards) very simple languages, so learning both should not be a problem.
Most academic environments (university, specifically) expect you to handle multiple new languages at the same time. (And there's hardly an earlier stage than "still in school.") Each subject is going to have its own preferred language in terms of features that benefit that subject, and each teacher is going to have their own preferred language and, well, they're the teacher so you just have to deal with it :)
As long as you can keep them separate, it's not really the language itself that's the important part. Focus instead on what that language does and what you can do with it.
Back at my school, it was easy to tell the freshmen from the seniors. The formers would talk about what languages they know, the latter would talk about what designs and abstract concepts they've used.
Remember, the language is just a tool. Development should be more language-agnostic, focusing more on the job at hand and just using the right tool for that job.
I disagree with some of the other answers. This is not like studying two different subjects simultaneously: you generate the same output (a useful computer program) in C or in Scheme, but you go about it in very different ways. Universities may have students taking classes using different languages at the same time, but those curricula are, in theory, curated by a thoughtful department that is trying to avoid confusing students.
While it is certainly possible to study both C and Scheme at the same time, they may turn out to not be complementary for you. I would recommend proceeding as you wish, but as soon as you hit a rough patch you may want to consider focusing on one at a time. Following HtDP is a great idea if you are new to programming. If you are comfortable programming in general and want to learn C -- a good goal to have! -- then you can focus on how you write programs in C. The key is that you first want to learn how to write programs, then you can focus on learning specific languages.
learning a programming language is no different than learning any other language. If you can handle learning spanish and french at the same time, you can handle C and Scheme.
Another reason to be familiar with both C and Scheme is the Foreign Function Interfaces (FFI) provided by almost all Scheme implementations. You can quickly prototype a product in Scheme (or some other Lisp) and then you may find that you need to optimize some portion of the code for speed. You can re-write that part in C and invoke your fast C function from Scheme using FFI. Or you may need to interface some library (GUI, database etc) with Scheme. Your C expertise coupled with the FFI will help you here.
Learning C has made me a better Scheme programmer and vice versa. After spending years with Scheme and Common Lisp, I've spent a year programming almost exclusively in C. When I go back to Scheme, it is much easier to express myself because I know the kinds of things the machine is good at; C has helped me develop a good sense for algorithms. Knowing Scheme before going into C allowed me to develop certain nonstandard idioms while learning the standard ones. I think that since the two are completely different ways of doing things, and they both have their advantages, they are the two best languages to master.

Does any programmer have to know C? Yes, why? No, why? [closed]

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 8 years ago.
Improve this question
since I was at the first year of my University I always envied my fellows (mainly coming from a tech-oriented professional school) for knowing C. I came from a natural-sciences-oriented lyceum and never had programming experience or courses but some summer work with PHP learned from a teach-yourself-PHP-in-7-hours (and my programming interest was very recent). I want to know ... was it a legitimate envy? Does any programmer have to know C? Does C provide deep understanding on how a system works or how programming has to be carried out? I know that when programming C you have to have a strong understanding about buffers, memory, and so on. So I want your opinion on it.
No, you don't have to know C. But knowledge of C (or any other "close to the machine but not assembler" language) greatly enhances your potential as a programmer. Because you will understand a lot more of the inner workings.
And of course knowledge of assembler is also valuable. But in the above paragraph, I wanted to target the low end of computer language. Just because in modern languages, we take so much for granted (OO, extensive libraries, garbage collection to name a few). And yes it helps us programmers to work more efficiently. But it hides some of the machine aspects that we sometimes need to see and that's why it is so important that we need to know the inner workings.
While I think it is important to understand memory allocation, pointers, registers, ... I would say that too much experience in C can also be a barrier to grasp higher level languages, or OO languages. C tends to make you think procedurally and that can be a bad thing in some cases ...
I would definitely not recommend C as a first language, but it can be of great help to do some C at some point...
As a side note, I think that assembly can be much more useful to help you understand basic principle. At the same time assembly is far enough from any language that you would use (unless you work in a very specialized field). That will help you keep a different mindset when doing assembly than when using a higher level language.
This is a quite discussable topic. I personally think that knowing C enhances your ability to work with other languages too when you understand what's going on under the hood. But you don't have to know C to be able to produce high quality code.
Eric Sink has also once thought of that question.
Something I find missing from most of these answers is that C is a very easy language to learn. Everything you'll ever need to know about the syntax is contained in one thin, concise book (K&R), and that includes all the standard libraries. So I'd encourage you to at least skim a book and see what it's all about, even if you don't intend to use it.
That simple C syntax only gets expanded for most modern C-based languages (C++, C#, Java). You can't say you really know those languages until you've mastered at least a subset of the hundreds of libraries that come with them, and that can take months or years of experience.
What's tough about C is that it can expose you to the true nature of the machine underneath. If you really want to grok how a computer works, you need to understand things like pointers, memory allocation, and stack vs. heap vs. executable code. You can learn basic C syntax in a few hours, and that puts you on the road to understanding much more. Saying "I'm a C expert" is just a proxy for saying, "I really understand how a computer works."
You don't necessarily have to know C, but imo every programmer should know about basic machine architecture and how applications interact with the OS and the hardware.
Obviously if you're going to study this, C is a good choice for a language, but not the only option.
Another good reason to know C is that a lot of code is written in C so if you want to learn from others code, it will be very helpful.
In addition to Gamecats answer, in my experience working with people in other languages, there is a difference in skill between the guys that know C and the guys that don't. I work primarily in Java and certainly appreciate having spent a few years working with C before I did. On top of that I also did quite a bit of Perl work as well. I would say knowing as many languages as possible helps to give you different views on your work and applying different paradigms
C is not my language of choice, but even to this day, C is everywhere.
When I do some small code in Lua using LuaCurl, I use a C library. Lua itself is written in C.
When I do some Seaside Web application in Squeak Smalltalk, I use a VM generated in C (the Squeak VM is written in Smalltalk, and then it generates C code as a portable assembler).
So I would not start learning programming with C (see this thread for other choices), but as a programmer, knowing C is very handy even if it is not your language of choice.
In the same way that not every mechanic needs to know the inner workings of an engine to fix a car, not every programmer needs to learn C to produce code.
however, the ones who do, acquire a better understanding of the craft and ultimately achieve a higher level of success.
I share the same sentiments as the others in this thread, however, to answer the question that was asked:
The only programmers that have to know C are C programmers.
All knowledge is useful, so yes, you should envy their knowledge. You should also envy people who are AI nerds and know LISP, etc. The best mix would be a dynamic language, a functional language, SQL, a low level language and an object oriented language.
If you want some stranger to make some recommendations, I would go Python, OCaml, SQL, C and Java/C#. But, find your own path :-)
I think you have.
Languages have their own evolution. They developed within a very intriguing and fast evolution of computer systems. CPU power grew, features grew, Assembler got more complex... everything got more powerful.
Thing is: if you never saw the low level and "easy" beginnings, and you start with some high-level languages like C#, C++, or Java, you won't understand the elegance or backend perspective of these very powerful languages.
I think you don't need to learn LISP, because if differs a lot from common C-like languages. But some C is a must-know. It's for developers from developers, very near to machine code. Know what the machine does when you program it.
Memory allocation and pointers.
After getting to handle C and C++, even if only in school, you have a better understanding of what needs to happen in memory in order for you to throw objects and references around and you get a better appreciation of what, for instance, garbage collection implies.
Also, in school, starting with Pascal and then C allowed us to learn "programming" first, the old way, and then move to more advanced languages (OOP, etc) on top of that.
Have to know/learn C? Probably not, although it might make learning some concepts easier. Understanding something about memory allocation, structures and pointers of all kinds is worthwhile and C is a good language to use to gain that understanding. Plus, to be honest, "straight" C is really not complex. Tricky to get right, sure, but not in itself complex. I'd advise getting hold of a compiler that wasn't a C++ one too, that way can lie madness. (Fond memories of Quick C For Windows)
Have to know/learn C++? Definitely not.
I would use a metaphor: Knowing C for programmers is like knowing latin for (western languages) writers. It is not something you need, especially if you just write sports columns or cooking recipe books, but if you want to refine your craft it is something that I would consider nearly mandatory. But it will not be useful for daily work on ordinary software.
Or knowing mechanics for a car pilot, or how to build sails for a sailor. At some level of expertise, you need to know how the things you use are working internally.
If you learn C, try to master the pointer concept, and the way they map to the hardware. That's really the point of learning C. Do not spend time on the rest of the language.
Maybe it was just my particular educational experience, but I hated C/C++ in college and haven't touched it since. I'm thankful for learning about the concepts involved, like pointers and memory allocation, but trying to accomplish anything with the tools that were available to me was too cumbersome for me to want to bother. I hope your experience is better.
("slightly" tongue-in-check) You should learn it if, for no other reason, than it will make you love whatever language you're working in at that moment.
I don't call myself a C programmer, but I can write code in C. It has helped me a number of times in my career. I've spent a lot of time working with Visual Basic, and there are some things you just can't do with VB. It's been very handy to drop down to C to do things like windows hooks. It's made me the "hero" a time or two.

Should .NET developers *really* be spending time learning C for low-level exposure? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
When Joel Spolsky and Jeff Atwood began the disagreement in their podcast over whether programmers should learn C, regardless of their industry and platform of delivery, it sparkled quite an explosive debate within the developer community that probably still rages amongst certain groups today. I have been reading a number of passages from a number of programmer bloggers with their take on the matter. The arguments from both sides certainly carry weight, both what I did not find is a perspective that is uniquely angled from the standpoint of developers focused on just the .NET Framework. Practically all of them were commenting on a general programmer standpoint.
What am I trying to get at? Recall Jeff Atwood's opinion that most of the time developers at such high levels would spend would be on learning the business/domain, on top of whatever is needed to learn the technologies to achieve those domain requirements. In my working experience that is a very accurate description of the work life of many. Now supposing that .NET developers can fork the time for "extra curricular" learning, should that be C?
For the record, I have learnt C back in school myself, and I can absolutely understand and appreciate what the proponents are reasoning for. But, when thinking things through, I personally feel .NET developers should not dive straight into C. Because, the thing I wish more developers would take some time to learn is - MSIL and CLR.
Maybe I am stuck with the an unusual bunch of colleagues, I don't know, but it seems to me many people do not keep a conscious awareness that their C# or VB code compiles in IL first before JIT comes in and makes it raw machine code. Most do not know IL, and have no interest in how exactly the CLR handles the code they write. Reading Jeffrey Richter's CLR via C# was quite a shocker for me in so many areas; glad I read it despite colleagues dismissing it as "too low level". I am no expert in IL but with knowledge of the basics, I found myself following his text easier as I was already familiar with the stack behaviour of IL. I find myself disassembling assemblies to have a look at how the IL turns out when I write certain code.
I learn the CLR and MSIL because I know that is the direct layer below me. The layer that allows me to carry out my own layer of work. C, is actually further down. Closer to our "reality" is the CLR and MSIL. That is why I would recommend others to have a go at those, because I do not see enough folks delving at that layer. Or, is your team already all conversant with MSIL?
Of course you should. The greatest way to become overly specialized and single-minded (and, correspondingly, have limited marketable skills) is to only work with a single type of language and eschew all others as "not related to your current task."
Every programmer should have some experience with a modern JIT'd OO language (C#/Java), a lower-level simpler language (C, FORTRAN, etc), a very high level interpreted language (Python, Ruby, etc), and a functional language (Scheme, Lisp, Haskell, etc). Even if you don't use all of them on a day-to-day basis, the broadening of your thought process that such knowledge grants is quite useful.
I already know C and that helped me during the 1.1 days where there are a lot of things that are not yet in the .NET base libraries and I have to P/Invoke something from the Platform SDK.
My take is that we should always allocate a time for learning something that we don't know yet. To answer your question, I don't think it is essential for you to learn C but if you have some time to spare, C is a good language to learn and is just as valid as any other language out there.
True, C is way below the chain. Knowing MSIL can help devs understand how to optimise their apps better. As for learning C or MSIL, why not both? :)
.NET developers should learn about the CLR. But they should also learn C. I don't see how anybody can really understand how the CLR works without some low-level understanding of what happens on the bare metal.
Spending time learning about higher-level concepts is certainly beneficial, but if you concentrate too much on the high-level at the expense of the low-level, you risk becoming one of those "architect" people who can draw boxes and lines on whiteboards but who are unable to write any actual code.
What you learn by learning C will be useful for the remainder of your career. What you learn about the CLR will become obsolete as Microsoft changes their platform.
My take is that learning some compiled language and assembly is a must. Without that, you will not get the versatility required to switch between languages and stacks.
To be more specific -- I think that any good/great programmer must know these things by direct experience:
What is the difference between a register and a variable?
What is DMA?
How is a pixel put on the screen (at low level)?
What are interrupts?
...
Knowing these things is the difference between working with a system you understand and a system that, for all you know, works by magic. :)
To address some comments
You end up having two different kinds of developers:
people that can do one thing in 10 ways in one or two languages
people that can do one thing in one or two ways in 10 different languages
I strongly think that the second group are the better developers overall.
I think of it like this:
Programmers should probably be actually working in the highest-level language appropriate. What's appropriate depends on your scenario. A device driver or embedded system is in a different class from a CRUD desktop app or web page.
You want your programmers to have as much practice as possible in the language in which they are working.
Since most programmers end up working on generic desktop and web apps, you want programming students to move into the higher level languages as soon as possible during school.
However, the higher-level languages obfuscate a few basic programming problems, like pointers. If we apply our principle of using what's appropriate to students as well, those higher level languages may not be appropriate for first year students. That throws out Java, .Net, Python, and many others.
So students should use C (or better yet: C++ since it's "higher-level" and covers most of the same concepts) for the first year or two of school to cover basic concepts, but quickly move up to a higher-level language to enable more difficult programs earlier.
To be sufficiently advanced in writing C#, you need to understand the concepts in C, even if you don't learn the language proper.
More generally though, if you're serious about any skill, you should know what goes on at least one abstraction level below your primary working level.
Coding in jQuery should be paired with an understanding of JavaScript
Designing circuits necessitates knowing physics
Any good basketball player will learn about muscles, bones, and nutrition
A violinist will learn about the interplay of rosin, friction, bow hairs, string, and wood dryness
I like to learn a new language every year. Not necessarily to master it, but to force my brain to think in different ways.
I feel learning C is a good language to learn about low level concepts without the pain of coding in assembly.
However I feel that learning lessons from languages like Haskell, python, and even arguably regex (not exactly a language, but you catch my drift?) is as important as the lessons to be gleaned from C.
So I say, learn about the CLR and MSIL on the job if thats your area, and in your spare time, try picking up a different language once every so often. If that happens to be C this year, good for you and enjoy playing with pointers ;)
I don't see any reason why they should. Languages like Java and C# were designed so that you needn't worry about the low-level details. That's the same like asking whether a WinForms developer should spend time learning the Win32 API because that's whats happening underneath.
While it doesn't hurt to learn it, you'd probably gain more from spending more time learning the languages and platforms you are familiar with, unless there's a good need to learn the low-level technical details.
It can't be a bad idea to learn MSIL, but in a way it's just another .NET language, but with nasty syntax. It is another layer down, though, and I think people should have at least some vague understanding of all the layers.
C, being somewhat like assembly language with nicer syntax, is a nice way to get an idea of what's happening on quite a low level (although some things are still hidden from you).
And from the other end, I think everyone should know a bit of something like Haskell or Lisp to get an idea of higher-level stuff (and see some of the ideas being introduced in C# 3 in a cleaner form)
If you consider yourself a programmer, I would say yes, learn C.
Many people who write code do not consider themselves programmers. I write .NET apps maybe 3 hours a day at work, but I don't label myself a "programmer." I do a lot of things that have nothing to do with programming.
If you spend your whole day programming or thinking about programming, and you are going to make your entire career revolve arround programming, then you better be sure you know your stuff. Learning C would probably help build a base of knowledge that would be helpful if you're going to go very deep in programming skills.
With everthing, there are trade-offs. The more languages you learn, and the more time you spend dedicated to technology, the less time you have for learning other skills. For example, would it be better to learn C, or read books on project management? It depends on your goals. You want to be the best programmer EVAR? Learn C. Spend hours and hours writing code and dedicating yourself to the craft. You ever want to manage somebody else instead of coding all day? Use the time you would put into programming and find ways to improve your soft skills.
Should .net developers be learning C? I would say "not necessarily," but we should always be dabbling in some language outside of our professional bailiwick because every language brings with it a new way of thinking about problems. During my professional career as a .net (and before that, VB 2-6) developer, I've written small projects in Pascal, LISP, C, C++, PHP, JavaScript, Ruby, and Python and am currently dabbling in Lua and Perl.
Other than C++, I don't list any of them on my resume because I'm not looking to be a professional in any of them. Instead, I bring back interesting ideas from each of them to use in my .net-based work.
C is interesting in that it really gets you close to the OS, but that's hardly the only level you need to know about to be a good programmer.
The CLR is a virtual machine so if that's all you learn, then you only know what's happening at a virtual level.
Learning C will teach you more about the physical machine as far as memory usage goes, which as you mention is what the CLR uses underneath. Learning how the CLR works isn't going to give you as much insight into, say, garbage collection, as learning C. With C, you really appreciate what's involved in memory management.
Learning CIL on the other hand, tells you a bit more about execution in .NET than you would by learning C. Still, how IL maps to machine language will still be a mystery for the most part so knowing some of the high-level opcodes, like the ones for casting types, isn't that helpful in terms of understanding what's really going on as they're opaque for the most part. Learning C and pointers, however, will enlighten you on some of those aspects.
Is the issue learning C or MSIL, or is it more fundamental? I'd say that in general, more developers could stand to learn more about how computers, physical or virtual, work. A person can get to be a fairly competent programmer by only understanding a language and API in a box. To take the profession to the next level, I feel that developers really need to understand the whole stack. Not necessarily in detail, but in sufficient generality to help solve problems.
A lot of these skills are being talked about here can be acquired by learning more about compilers and language design. You probably need to learn C to do this (whoops, sneaky), but compiler writing is a great context to learn C in. Steve Yegge talks about this on his blog, and I largely agree with him on this point. My compiler writing course in university was one of the most eye opening courses I've ever taken, and I really wish it had been a 200 level course, instead of a 400 level one.
I posted this on another thread but it applies here to:
I believe you need a good foundation, but devote most of your time to learning what you will be using.
Learn enough assembler to add two numbers together and display the result on a console. You'll have a much better understanding of what is actually going on with the computer and it will make sense as to why we use binary/Hex. (this can be done in a day and can be done with debug from cmd.exe).
Learn enough C to have to allocate some memory and use pointers. A simple linked list is sufficient. (this can be done in a day or two).
Spend more time learning a language that you are going to use. I would let your interests steer you into which language (C#, Java, Ruby, Python, etc.).

What makes you a C programming expert? [closed]

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 attended a job fair yesterday and a developer asked me how I would rank my proficiency in C. I then realized that this is incredibly arbitrary and almost impossible to nail down, so my question is what knowledge makes you an expert in programming C?
Edit: or what would the breakdown be? what makes you good, decent, proficient, etc.
Edit again: I was looking more for like a list of skills or some other constructive measure by which to judge one's own proficiency in C, as that's hard to do.
List so far:
Experience in large projects
Mastery of Pointers (and memory management, I'd assume)
Mastery of a debugger (gdb, ...)
Mastery of a profiler (gprof,...)
Mastery of a memory profiler (valgrind, ...)
Knowledge of the fundamental standards
I think the trouble with this question is that the answer is kind of meaningless. I see people talking about experience, and that's good, and I see people talking about understanding the intricacies of the language, and that's good. However, if I were hiring someone to work on my C project, and I had a magic 8-ball that would give me an accurate answer to any one (and only one) question, I would never ask it, "Are they a C expert".
Why?
Just because someone is a C expert doesn't mean that they're a good software developer. Experience and language familiarity are good, but I think they are both trumped by that intangible, un-quantifiable property that makes someone a "good software developer". What I'm trying to say is, "What makes you a C programming expert?" is not a useful question, because there are more important questions. If someone is a Good Programmer, they will rise to the occasion.
As an example: You can be a C programming expert and be horrible on a team. You can be a C programming expert and refuse to use version control. You can be a C programming expert without knowing how to actually DO anything with C.
The "without" clauses in those sentences are equally important questions: What makes you a good team programmer? What's the best way to use SCM x or y? How do you approach programming a client/server game, or billing application, or web browser, or operating system, or compiler, in C? If a candidate told me "No, I am not a C expert", but gave me great answers to these other questions, I would hire them in a heartbeat over the guy who the magic 8-ball said was a C expert, but doesn't know how to check his code into subversion and hasn't learned a new language in 12 years.
When I interviewed with Google, the interviewer told me to think about it this way. On a scale of 1-10 for C proficiency, to say you're a "10" means you've written papers and/or books or been a speaker in a conference on programming in C. Based on this, very few people are 10s.
FWIW, I have been programming in C for 15 years. I consider myself very proficient. I'd perhaps give myself a solid 8 or 8.5.
To someone less skilled than you, you're an expert.
To someone more skilled than you, you're a newbie.
Experience is key, knowing the "rules" and syntax of the of the language is of course a must, but it is only a base. Learning the common pitfalls and idioms for doing things right is key.
Knowing what if any resources exist to get help from while your programing, and of course, knowing you're tool chain. I've known many C++ "experts" who had never used a debugger, or a memory tracker. If you ask me, being an expert in something is different from being proficient in something in you knowing all aspects of it.
Everyone is an expert at a job fair
You're an expert in c if you can answer all the questions tagged "c" on stackoverflow.com without blinking.
This doesn't directly answer your question (sorry), but it might help you decide how you classify yourself.
Instead of just "expert" and "clueless newbie" I prefer the three-level system of expertise used by the medieval guilds:
Apprentice
Still needs to RTFM.
Getting to grips with the tools and techniques of his craft.
Needs supervision.
Journeyman
Has Read The Effin' Manual.
Competent with all the standard tools and techniques of his craft.
Can work alone, and can supervise apprentices on routine jobs.
Master
Could have Written The Effin' Manual.
Is developing or adopting new tools and techniques.
Can oversee a major project that might never have been attempted before.
At a job fair? There are no experts: everybody's an expert. :)
Some may disagree but I think experience is key to being an expert in any language. I know plenty of people who've past the certification test but couldn't apply their knowledge to anything practical in the real world.
So I think overall being an expert is a product of having enough knowledge on a given subject (C) and then having applied it to enough real world scenarios to make the mistakes that we all do and learn from them.
The answers to this question do make for some interesting reading - it seems that we can't get good convergence on what defines an expert here. What hope is there going to be in a broader forum like a jobs fair? :-)
But to put my own 2 cents in...
I think there's two kinds of C expert.
There's the expert in the academic sense (as in "could write their own compiler", "has written papers").
There's the pragmatic expert. I would like to define this as "someone who can write elegant C code that anyone can understand".
I would take one of the latter over the former in a heartbeat. If you've got a chunk of code written by an expert that is so brittle that can only be read and understood by another expert then for all intents that code is unmaintainable.
It's all very nice that the author of this code remembers the intricacies of type conversions in the middle of expressions, but it's much better if the code has been written so that it's completely unambiguous.
Projects usually have enough technical challenge without adding the need for all team members to have memorized the C'99 standard.
You're an expert in C when you can write your own C compiler.
Interview questions like this are always tough. You want to blow your own horn a little, but not sound like a blowhard.
If you have done a lot with C (say, worked on open source projects in C), then I'd respond with that, but not just by pointing to the list of accomplishments on your resume, but by talking about one or more of them and what was particularly interesting or challenging about it (in regards to its use of C).
How about having read "Expert C Programming" by Peter van der Linden and remembering everything he covered?
Lacking a standard test there's really no way to decide what expert level is but here are a few of my litmus tests, everyone's list is different, I'm sure.
Without looking at documentation:
Know the precedence of the main operators so you don't have to litter your code with parens to avoid getting the wrong order of evaluation
Be able to write a prototype for a simple function pointer
Be comfortable with passing a pointer to a pointer
Understand block, function, module scope
There are more items like this.
On the other hand, I don't think you have to be able to understand or be able to write out Duff's device or figure out obfuscated C contests in your head to consider yourself an expert.
Even if I considered myself an expert (not sure I do) I probably would never claim it in a job interview.
Andrew
Mastery of pointers.
I would say that for any given language, experience is the key thing. It just takes time to learn a language and learn the APIs and 'idioms' that the language uses. Whether someone is an expert in anything or not is something that should be asked of ones peers. To paraphrase Jeff Foxworthy, "If you answer more questions than you ask, you might be an expert."
I think a fair answer would be understanding all of the intracies of ISO C.
The reality, as any comp.lang.c regular will tell you, is that almost nothing that people need to do can be done in pure ISO C, as you generally need to interact with your environment in a more well defined way. That's where POSIX comes about.
I would not blink at anyone who self-ranked themselves as an "Expert" who had a solid understanding of the language of C, a decent understanding of what ISO C promises, and a working understanding of the POSIX functions.
Being able to write papers/books doesn't necessarily make one an expert programmer. It takes plenty of hard work, practical experience and a good understanding of various C libraries.
Good luck!

Resources