One of my buddies has a very interesting offer for me. He said if I can learn C and get good at it within a year, then his father will try to hire me at NIH as an entry level programmer making 80k-100k a year. Obviously making this much money when I am 21 would make me... well the biggest BAMF ever.
So far I am reading an online version of those "Teach yourself in 21 days" books and so far I am a little confused.
Right now I need a compiler; one that's good and simple. I've tried MS Visual Studio Express back when I used to do things in Visual Basic, and I hated it. The interface was just weird.
Also if it's too much to ask, maybe a one-on-one tutor to get me through the basics faster.
Use codeblocks which will come with MinGW as it's built in compiler
Teach yourself X in 21 days isn't a good idea. You'll probably learn the syntax and not much more.
You should get a good reference, preferably a thick book that contains pretty much every basic question about C syntax and the most used standard library.
Secondly, utilize internet tutorials. Also try to find recent tutorials; Even if C99 should be used pretty much already, there can still be C89-based tutorials.
Thirdly, get MinGW. MSVC isn't a C compiler.
Learn C in one year? Doable.
Get good at it? Impossible if you don't already know a somewhat similar language.
You probably still wanna try though. It'll probably be good digging into other peoples codes once you can read C.
Anyways, clang or gcc.
If you're ensured to get that job I would actually try to get a tutor. It will be well worth it in the end.
Visual Studio is an IDE, not a compiler. It ships with the MSVC compiler, which is not a very good C compiler, but pretty good at C++.
I suggest that you try out the Code::Blocks + MinGW package ([url=http://www.codeblocks.org/downloads/26]found here[/url]). Code::Blocks is a fairly popular light-weight IDE, MinGW is a Windows port of GCC, a very good C and C++ compiler.
If you ever come across a book recommending an IDE called Dev-C++ (or its other name, Bloodshed C++), then keep in mind that this is a very old IDE shipping with a very old version of GCC. Code::Blocks is a similar IDE, but much more up-to-date.
As for learning the C programming language - any specific questions about it?
You'll also have to be good at programming. You can know a language inside and out but still fall flat on your face when making a simple program.
C is pretty simple. I suggest you make a lot of applications so you get experience writing programs.
[QUOTE=Pepin;25272354]
C is pretty simple. I suggest you make a lot of applications so you get experience writing programs.[/QUOTE]
Oh no, C is far from easy. Many modern languages provide you with a large standard library for many functions, object-oriented programming (although that's not really something that makes things [I]easier[/I]...), easy string parsing / native string class and such.
In C you get a minimal standard library and WinApi or POSIX api depending on your platform. Not much more, unless you install libraries.
(Also, IMHO the POSIX api is better than FailApi)
[editline]10:24PM[/editline]
...Oh well, I suppose C is syntactically simple, though.
[editline]10:25PM[/editline]
Also, if you've never programmed before, good things aren't gonna happen if you get hired.
Mind if i ask what the NIH is?
also i didnt realize that C was used that much, i would of thought most systems would have been converted into C++
C is most definitely simple in that there isn't a whole lot to the language.
[QUOTE=Richy19;25272955]Mind if i ask what the NIH is?
also i didnt realize that C was used that much, i would of thought most systems would have been converted into C++[/QUOTE]
Nah, systems programming is still often done in C, it's more low-level and stuff.
[QUOTE=Richy19;25272955]Mind if i ask what the NIH is?
also i didnt realize that C was used that much, i would of thought most systems would have been converted into C++[/QUOTE]
Used a lot in micro-controllers and hardware applications simply because those those types of projects do not need any extra functionality from C++. I don't believe C is used that much at all for desktop applications for obvious reasons.
Someone beat me to it though.
You also use C for portability. Not just that its slimmer specification makes it easier to write a C compiler, but it's also often used for libraries since many languages have some form of communicating with C-style interfaces. Well, I don't actually know how many, but certainly more than languages with the ability to interface with C++-style interfaces.
Since it also doesn't have some of the complex features that C++ has, the optimizer can probably better analyze the program flow and optimize better. I don't know if this is actually true though.
[QUOTE=ZeekyHBomb;25273527]Well, I don't actually know how many, but certainly more than languages with the ability to interface with C++-style interfaces.[/QUOTE]
Fact: Only binaries compiled with the same compiler (settings, possibly even) can interface with each other with C++-style interfaces.
[QUOTE=esalaka;25273602]Fact: Only binaries compiled with the same compiler (settings, possibly even) can interface with each other with C++-style interfaces.[/QUOTE]
D actually has the capability of linking with C++ interfaces (as in the OO design pattern) like so:
[cpp]
//C++
class Foo
{
public:
virtual void foo(int a, const char* b) = 0;
};
extern "C" Foo* getFoo();
//D
extern(C++) interface Foo
{
void foo(int a, const char* b);
}
extern(C) Foo getFoo();
[/cpp]
Then you just link them together (or link dynamically with DLLs). You can also use C++ functions with C++ linkage, but they have to free functions, and the mangling needs to match (DMD<=>DMC, GDC<=>GCC etc).
Which is quite limited, but it's the only attempt I've seen at interfacing with C++ from another language.
edit:
For example, I've used the above pattern to create Garry's Mod binary modules in D, possible because Garry's Mod uses the interface pattern for everything important.
[QUOTE=esalaka;25273602]Fact: Only binaries compiled with the same compiler (settings, possibly even) can interface with each other with C++-style interfaces.[/QUOTE]
Not true. Are you thinking of differences in name mangling? Compiler vendors have gotten together and defined [url=http://www.codesourcery.com/public/cxx-abi/]standard ABIs[/url] to provide interoperability. Or, where there's no standard ABI, at least the ABI of the most common compiler on a platform will likely be implemented by "alternative" compilers on that platform too (either by default or through use of options). That's not to say that every C++ compiler is compatible with every other C++ compiler, but I don't think this is a significant problem these days.
I still wouldn't write libraries with C++ exposed.
I think it's better to either write them in C or write them in C++ with extern "C" interfaces. This pretty much guarantees portability.
I might be slightly biased, though, since I write C and I like having libraries that link to my ancient language of choice.
I'm a little curious about the salary you've been told. It seems really high for an entry-level programmer. 80k-100k looks more likely for a senior programmer with several years experience.
As a graduate in embedded and real-time systems with a year experience in a similar company, I started my current job at £18.5k (that's at the low end of the national average).
I'm guessing that you're talking USD? $80k is about £50k, which is still around double the top-end salary for a graduate programmer over here.
Match that up with the company you're talking about... I don't think they're going to take on somebody who's just learnt C for that.
I may be wrong, but it looks a little too good to be true to me.
[QUOTE=ROBO_DONUT;25278120]I might be slightly biased, though, since I write C and I like having libraries that link to my ancient language of choice.[/QUOTE]
And every other language ever.
[QUOTE=Master117;25272107]One of my buddies has a very interesting offer for me. He said if I can learn C and get good at it within a year, then his father will try to hire me at NIH as an entry level programmer making 80k-100k a year. Obviously making this much money when I am 21 would make me... well the biggest BAMF ever.
So far I am reading an online version of those "Teach yourself in 21 days" books and so far I am a little confused.
Right now I need a compiler; one that's good and simple. [B]I've tried MS Visual Studio Express back when I used to do things in Visual Basic, and I hated it. The interface was just weird. [/B]
Also if it's too much to ask, maybe a one-on-one tutor to get me through the basics faster.[/QUOTE]
Lol, that's pretty much what every IDE interface looks like with a few small changes. IMO you'd be better sucking it up because it's commonly used in industry. You could go with Code::Blocks but IMO it's pretty shit in comparison to Visual Studio.
[editline]10:51AM[/editline]
[QUOTE=st0rmforce;25285918]I'm a little curious about the salary you've been told. It seems really high for an entry-level programmer. 80k-100k looks more likely for a senior programmer with several years experience.
As a graduate in embedded and real-time systems with a year experience in a similar company, I started my current job at £18.5k (that's at the low end of the national average).
I'm guessing that you're talking USD? $80k is about £50k, which is still around double the top-end salary for a graduate programmer over here.
Match that up with the company you're talking about... I don't think they're going to take on somebody who's just learnt C for that.
I may be wrong, but it looks a little too good to be true to me.[/QUOTE]
And this.
[editline]10:52AM[/editline]
[QUOTE=Pepin;25272986]C is most definitely simple in that there isn't a whole lot to the language.[/QUOTE]
That's why it's not simple, because you have to do everything yourself to get a job done.
Simple means having few parts. Something can be simple without being easy, like Brainfuck.
[QUOTE=Pepin;25272986]C is most definitely simple in that there isn't a whole lot to the language.[/QUOTE]
Blind leading the blind comes to mind.
[QUOTE=layla;25304133]Blind leading the blind comes to mind.[/QUOTE]
Well syntactically there's not a lot to C.
It does have its little gotchas and nuances that come to mind though.
There's a lot to C than most people think, C is a lower-level language than C++ and some applications may need that for example, they both have their uses.
[QUOTE=bunguer;25316626]C is a lower-level language than C++ and some applications may need that for example[/QUOTE]
Give an example. I don't think you can go any more low-level with C than you can with C++.
[QUOTE=ZeekyHBomb;25316882]Give an example. I don't think you can go any more low-level with C than you can with C++.[/QUOTE]
Embedded devices primarily use C.
That's beside the point I made.
I think embedded devices choose C over C++ because the language specification is smaller and thus writing a compiler is less work.
[QUOTE=ZeekyHBomb;25318966]That's beside the point I made.
I think embedded devices choose C over C++ because the language specification is smaller and thus writing a compiler is less work.[/QUOTE]
Also, C requires a smaller runtime library, I believe.
Getting good at a programming language in one year shouldnt be a poblem at all, if you are good at logics you should be able to learn most of an language in a week (considering you spend like 10 h a day).
[QUOTE=SEKCobra;25319594]if you are good at logics you should be able to learn most of an language in a week (considering you spend like 10 h a day).[/QUOTE]
You can probably learn the syntax in less time, but a mastery of C and the various methods you can or have to use will take much longer. You might learn that malloc allocates memory, but possibly not about how to use it efficiently when allocating large amounts of memory. You might also learn that pointers can be incremented and decremented like integers, but not that you can do *ptr2++ = *ptr1++; (which, by the way, is a cool way to do what it does)
Sorry, you need to Log In to post a reply to this thread.