Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

xUKHCx

Administrator emeritus
Original poster
Jan 15, 2006
12,583
9
The Kop
I just came back from a presentation where I found out about a program I can use in my research, however having spoken to my sub supervisor he said I will have to know C to be able to/be allowed to use the program. I have to ask my main supervisor on Friday. By then I would like to be able to read a bit of C just so I can give the impression that I know what I am doing. I won't actually be doing any coding so its not like I need an in depth knowledge of C. All I need is the fancy graphs/videos out the other end. The coding will be done by a PhD student who is extremely familiar with the program and can write in C. I don't have any longer as the simulations that will be run will take at least a month and so they need to be started as soon as possible.

I am a complete newbie with C the only programming experience I have is a basic understanding of Matlab.

The person I will by trying to convince only has a basic understanding of C.

Am I mad?
Is this at all possible?
Any suggested reading?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Not really. The core of the C language is pretty simple. Once you understand pointers (and the difference between call-by-value and call-by-reference) you're basically there, assuming you don't need to know the standard library inside out.

C is fairly readable too (at least I think it is). Get a decent book and get reading!
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
I don't know, if you have no programming experience, 1.5 days seems not enough to me to grasp most of the basic C concepts. Just understanding pointers alone can be a considerable challenge. If you knew another programming language it'd be easier. However, I'm not saying it's not possible since everyone learns in different ways. Once you get 4-5 chapters into a book, you'll probably have a good idea of how fast you're absorbing.
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA

ChrisA

macrumors G5
Jan 5, 2006
12,914
2,164
Redondo Beach, California
If you understand programming. That means conditional statements, loops. I/O andfunction calls and you know how to design algorithms then learning the syntax of C is not hard.

Once I was hired to write in Ada. I told the interviewer that I had only been following Ada's development but never wrote any Ada code. He said that was OK because "no one" has written any yet. Ada was to new. What I did was write with the reference book open. I knew I needed a "for loop" so I'd hunt down the Ada syntax. The thing is you have to know you need a loop over the populatd portion of the array. You had to know that things like arrays of structures exist and why you might want to use one then you just look up the syntax for java, C++, Python, Ada or whatever.
 

xUKHCx

Administrator emeritus
Original poster
Jan 15, 2006
12,583
9
The Kop
Well I managed to totally blag it :))) and have got the go ahead. You are right it is pretty readable.
 

mward333

macrumors 6502a
Jan 24, 2004
574
33
Well I managed to totally blag it :))) and have got the go ahead. You are right it is pretty readable.

A book that is intended for someone who needs to learn C++ in hurry is "Essential C++" by Stanley Lippman. It is a very fast read, very easy to read, and a quick way to learn the basics of good C++ programming. I would recommend this to you, if you find that you need to learn C++ in a hurry (although it sounds like you got past the need anyway....)
 

sushi

Moderator emeritus
Jul 19, 2002
15,639
3
キャンプスワ&#
Once I was hired to write in Ada. I told the interviewer that I had only been following Ada's development but never wrote any Ada code. He said that was OK because "no one" has written any yet. Ada was to new. What I did was write with the reference book open.
Interesting. When did you code in Ada?

The first time I developed an Ada program, was in 1980. We did not have the reference book. Instead we had the proposed reference book. It took forever to compile our programs back then.

To the OP, the key is to understand the basic programming concepts and as others have mentioned, pointers. Since you are not having to do the code, then I would think you can learn enough to get by. If you actually have to do coding, then 1.5 days will probably not be enough time.
 

kaltsasa

macrumors 6502a
Jan 9, 2002
585
21
Kellogg IA
I'd say no, but I hate programming. Took me forever to waddle my way through C. I know a couple guys who can pick up a new language at the drop of a pin.
 

jamesarm97

macrumors 65816
Sep 29, 2006
1,090
116
I'd say no, but I hate programming. Took me forever to waddle my way through C. I know a couple guys who can pick up a new language at the drop of a pin.

I remember back in the 80's I watch I guy writing a inventory program in dos / C when I stayed with them. I picked up how to write C by watching and ended up finishing the code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.