tags:

views:

204

answers:

8

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.

+2  A: 

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 ;) )

Amadan
What are you trying to say about those of us who have a liberal arts degree? :-)
James McNellis
Hey, I'm a linguist-programmer :) There's always exceptions. But 95% of my colleagues went into linguistics because there were no mathematics requirements (and 50% didn't even know what linguistics *was*).
Amadan
+7  A: 

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!

bstpierre
I totally agree. I didn't understand how to write C code (well, code in general) until I read *SICP*, and I wouldn't have appreciated Scheme if I hadn't already had some exposure to C.
jamesdlin
These answers were much appreciated. Thank you all.
Miles
+1  A: 

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.

deinst
+1  A: 

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.

David
Very relieving and encouraging hearing this. Thank you! I'll try my best!
Miles
+1  A: 

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.

Anthony
I disagree --- it's when you hit rough patches that you have an opportunity to really learn.
JasonFruit
The output is always the same: solution to a problem. Purpose is different. Level of abstraction is different. And the two areas of study support each other - one provides fundamentals, one provides practicality. (Actually, doubly so in C/Scheme: on engineering level, C is fundamental, Scheme is practical; on CS level, it's the other way around). The last sentence is also illuminating: He's not only learning two languages, but two ways of thinking, two different methods of problem decomposition; that falls right into "how to write programs". Syntax is trivial. IMHO, YMMV, YADA, ETLA.
Amadan
As I said, I think starting with this strategy is fine. The problems occur when you have a learner trying to write C in Scheme (or the other way around) and end up fighting a language. I do not think trying to master two ways to do something new is always the best way to go.
Anthony
@Amadan, the triviality of syntax is overstated, and I do not think repeatedly changing the syntax would help any newcomer learn. You are right in that the two languages suggest different fundamentals, and this makes for great learning potential, but it also means that they provide an environment with a high potential for confusion. If the student can appreciate the relationship on their own from day 1, then that is great, but quite rare.
Anthony
@Anthony: Let me draw a parallel with natural languages, then. It was much more confusing for me learning German and Dutch, than French and Japanese. In the same vein, I submit that it would be much harder keeping Java and C# straight, than Scheme and C (to be clear, I'm talking about the similarity of languages, and not counting the fact that the former group has more to learn than the latter). With two such different approaches as C and Scheme, you can keep them separate until you see parallels. Scheme: recursion. C: `for` loop. With Java/C, you get stuck with crap like `String` vs `string`.
Amadan
@Amadan, I agree with you regarding the issue of keeping idioms straight. My concern is more that students learning Scheme who already know C often try to shoe-horn the fundamentals they learned from C into their Scheme programming. Or, in the other direction, a student writing Scheme in C is likely to miss the insights into the operational nature of the underlying hardware that C provides. I don't mean syntax here, I mean paradigm. It is more or less a denotational vs. operational distinction that often trips up students, but that is unreasonable to focus on from day 1.
Anthony
A: 

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.

Oso
Spanish and French are very similar, which makes it difficult to learn them concurrently. C and Scheme are different enough that that this wouldn't be a problem. C to Scheme is more like Spanish to Cantonese.
intuited
ok... then I missed my point... I was only trying to stablish the capacity of learning two different spoken languages simultaneously...
Oso
A: 

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.

Vijay Mathew
A: 

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.

Joel J. Adamson