Login or Register to Ask a Question and Join Our Community

Is C worth the effort?

Thread Tools Search this Thread
Top Forums Programming Is C worth the effort?
# 1  
Old 06-10-2014
Is C worth the effort?

Hello guys,
I have a little question.
I think about learning c or c++ because im very interessted in low Level programming. And because i love Unix Too i thought C would be the better choice since Most it Done in c. Or should i learn c++?
Because C++ has all this nice Features like oop and stuff that makes programming easyer.

What i want to do.later is Programm.on the.Nintendo ds and.such things. And perhaps some day a little OS Kernel
For arm or such thing well just for fun ofcause

Sry for.typos and so on. Writing from.Phone

Greets dryPants
# 2  
Old 06-10-2014
OOP doesn't necessarily make everything easier. What matters is what you do with it. It's a programming style like any other. It's possible to write disorganized, messy C++ code and rigorously organized C. I always think you should learn C before you learn C++, C++ tries to hide a lot of the messier things but they're not really gone, and can bite you if you don't know them. It's a lot easier to understand with a proper foundation in C.

Writing in C makes it easier to export your code as libraries, even to other languages... Big ones like Perl and Python make it possible to build special loadable modules which use them, but there's a lot more hoops to jump through for calling C++ functions than C ones.

And if you want to program embedded things like handheld video games, C is probably the language you'll deal with. Also to handle the linux kernel, C is what you must know.

As for whether they're worth the effort... There's a plethora of other languages these days ranging from perl and python and ruby all the way to extremely high level things like javascript... For many purposes they're simpler and less effort than C. Except -- what were they all written in? C/C++, of course.
# 3  
Old 06-10-2014
Every programming language is an abstraction layer between the bare machine and the human thought process. In some languages this layer is thicker than in others: in Assembler it is very thin (almost nonexistent) and in highly abstracted languages like Oberon it is very thick.

Both these concepts have up- and downsides: the thinner the abstraction layer is the more you are in contact with the real workings of the system. You have more to do and more things to observe but get to utilize the machine to its fullest capacity. The thicker this layer is the less you have to observe and the less you have to know about the real machine as you work against an abstracted (and simplified) concept of the system, but on the other hand the less efficient your code will be. All programming languages are tradeoffs in this respect (and some other areas).

The last 50 years saw a whole lot of programming paradigms: structured programming, object orientation, data-centered programming, and whatnot. Basically, all these paradigms are ways to help the programmer keep his code as organized and understandable (=> maintainable) as possible. There are good reasons to employ any of them and good reasons why to avoid them. For every paradigm i could write a demo program where it looks bad and another where it seems the natural thing to do.

Do the sensible thing: learn to program with an emphasis on algorithms, not on programming methods. It is like with (human) languages: if you know how to organize your thoughts well and how to express what you mean without any margin of error you will be able to transport that capability into any language, regardless how little you speak it. But if you know five different languages but have difficulties phrasing a simple fact your communication attempts will fail in any language.

It is not very popular nowadays, but i even suggest to start learning Assembler before anything else: only knowing in-depth how a system works will let you appreciated what a compiler does for you and knowing how to program in a structured language (C) will make you appreciate what a C++-compiler does in addition to a C-compiler once you switch from C to C++. There is a reason why Donald Knuth (my personal programming hero) developed his own virtual Assembly language for a hypothetical system for his book "The Art of Computer Programming".

I hope this helps.

This User Gave Thanks to bakunin For This Post:
# 4  
Old 06-11-2014
At First thanks for your Help Smilie
So you say learning c First makes more sence, because C++ hides some nasty stuff. That makes sence Smilie
How much Assembler should i learn? And which? X86 or AMD64?
And yes Linux Kernel is also a nice topic i would like to explore in the future.
So learning c should be worth the effort.

Do you have some other good advices for me?
# 5  
Old 06-11-2014
Unless you're digging deep into the parts of the kernel which do memory management and mode switching, you won't have a genuine need for assembly language, but there is some value in learning it. In assembly you see the mechanics of how everything is declared as physical memory -- local variables in C are stack-segment variables in assembly, global variables in C are data-segment ones in assembly, functions are memory addresses in code-segment in both C and assembly, etc, etc. C is technically not dependent on stacks or segments, but I dare you to show me a modern system which doesn't have these in some way.

amd64 is x86 with more and larger registers. Most instructions are the same, but more options are allowed for them.
# 6  
Old 06-11-2014
Hi dryPants...

Do you have some other good advices for me?
Yes. Python is a very strict language and has libraries for just about anything that anyone in the coding industry is likely to encounter.

Before deciding to hammer any hardware, (and yes I have done much in this area), experiment coding for something less likely to cause you serious headaches.

Once you feel confident try experimenting with an Arduino, USB type, as an example.

In *NIX flavours it is easy to R/W from/to even with shell scripting. I have uploaded much code to do this mainly in Python for multi-platform use, (including a serial port stock AMIGA A1200 with HW mods to the USB Arduino), I love "banging the metal"...

I personally love assembly but........
......don't expect to get to Ring 0 directly in current OSes you WILL have serious headaches finding that you can't. The days of MS-DOS where BIOS and other assembly access and calls are long gone.

Study things like ISA, PCI bus design and limitations as examples then progress to current technology. I studied the PCI slot for months only to realise my limitations at home built hardware was way beyond any beginners scope.

Hope this helps...
# 7  
Old 06-11-2014
Well its not like i haven't any programming expirence. I learned already a bit of Python / ruby and started learning Java for school and private fun.
But o know i would take years to Master assembly language on x86 / AMD64. And i also know it will take some years till i can develop good in C but i really like this low Level things. Its so interessing i really want to learn it


Could someone suggest me a good source for learning the assembly language? Because everything i find is very old and I'm not sure if I can still use it :/

Last edited by dryPants; 06-14-2014 at 07:36 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

Are certifications worth it?

I have just been on RedHat SA 3 training course (4 days) and sat exams EX200 (RHCSA) and EX300 (RHCE) The daft thing was that politics meant I wasn't allowed to take courses SA 1 or 2. So I learnt about stuff I would never use (SELinux; iSCSI; NFS Kerberos encrypted with user specific access... (22 Replies)
Discussion started by: rbatte1
22 Replies

2. Linux

Are /home partitions worth it?

I'm new to the Linux world and whilst I've been learning the ropes, I've read some conflicting opinions regarding the creation of separate partitions for /home and other directories during OS install. Some say that having these directories in separate partitions allows you to reinstall without... (12 Replies)
Discussion started by: maerlyngb
12 Replies

3. What is on Your Mind?

Is M.Sc (FOSS) worth doing?

Recently while reading an linux magazine I understood that FOSS (Free or open source software) is gaining momentum.. And in my home town there is an reputed university which offers M.Sc online program on FOSS. The course covers: INTRODUCTION TO COMPUTING, PHILOSOPHY AND PRACTICE OF FOSS,... (4 Replies)
Discussion started by: Arun_Linux
4 Replies

4. UNIX for Dummies Questions & Answers

What is this system worth?

So my family is cleaning out our house and my dad stumbled on a Unix system with Unigraphix installed on it, and he remembers that it was 1 of 6 computers in a set that he used at a tool and dye machine shop where he worked. He said that the computer by itself with the monitor was $20,000! I was... (8 Replies)
Discussion started by: NVOtosReborn
8 Replies

5. UNIX for Dummies Questions & Answers

Is Unix Worth it?

I have been wanting to get much deaper into the world of computers for quite some time. I know a lot of c++, and plenty of website programming, and decided that the next step should be Unix. But here's the thing - I know nothing about Unix. I installed it and everything, but it just seemed like... (3 Replies)
Discussion started by: GuyWithAPen
3 Replies
Login or Register to Ask a Question

Featured Tech Videos