ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This may be silly, but I MUST ask if anyone else began in programming having the hots for C.
I mean, I have two other friends that work in programming;
one heads a team doing java and believes in oop, the other is head of a web site and does various things mostly working in PHP.
They both warned me of C and its learning curve and I also question it's applicability in the freelance market, especially someone in self-training.
I looked at some languages and tried them very briefly, but C calls me again and again.
So, why continue with C, because of total interest? Even though I was planning to get work too?
Your affinity for C will serve you very well in your career. Some of the best developers I've met have been non-traditionally trained. You sound like exactly the person I would hire over many other applicants that may have more formal training and maybe even more experience. Enthusiasm begets curiosity and that leads to deeper understanding of the subject.
Keep it up and I hope your enthusiasm never wanes. I've been a developer for a very long time, and though I've had to learn other languages, C remains my favorite.
Keep it up and I hope your enthusiasm never wanes. I've been a developer for a very long time, and though I've had to learn other languages, C remains my favorite.
That will stay with me for quite a while.
I sense that C coders are ones I may respect the most. Its something about how you must think to code in C, its syntax and all. Although I may be wrong.
When I looked at the Linux and Minux kernel source code, I knew I wanted to be capable of reading that code. That's what got me hooked.
No problem learning other languages along the way, I guess that comes up when needed as long as good old C stays around.
C is very simple; there are very few keywords and the compiler lets you do whatever you tell it to do - which is a good thing, but a very bad thing for people who don't know what they're doing. Then again, people who don't know what they're doing just shouldn't be programming rather than searching for a "programming language for idiots".
A lot of clueless people say "don't use X or Y programming language, my programming language is the best". I guarantee absolutely everyone who says something like that doesn't have a clue what they're talking about. Programming languages are simply tools; some tools may be better suited to some jobs than others, but claiming "the best" is just uneducated arrogance. For example, Assembly language still has its uses but you don't see many people habitually programming with such a language due to portability issues (among other things). If you look at the Linux source, most work is done with C and some assembly is thrown in here and there where it may have an advantage or C simply won't do.
If you like C and know it well, then you will have no problems being a programmer. The first things most companies will look for is if you know C. So many things are written in C (and sometimes have to be written in C) that it is very helpful if you know it well.
C is very simple; there are very few keywords and the compiler lets you do whatever you tell it to do - which is a good thing, but a very bad thing for people who don't know what they're doing. Then again, people who don't know what they're doing just shouldn't be programming rather than searching for a "programming language for idiots".
A lot of clueless people say "don't use X or Y programming language, my programming language is the best". I guarantee absolutely everyone who says something like that doesn't have a clue what they're talking about. Programming languages are simply tools; some tools may be better suited to some jobs than others, but claiming "the best" is just uneducated arrogance. For example, Assembly language still has its uses but you don't see many people habitually programming with such a language due to portability issues (among other things). If you look at the Linux source, most work is done with C and some assembly is thrown in here and there where it may have an advantage or C simply won't do.
In fact, there is an opinion that '"C" is a machine-independent assembly'.
If you like C and know it well, then you will have no problems being a programmer. The first things most companies will look for is if you know C. So many things are written in C (and sometimes have to be written in C) that it is very helpful if you know it well.
I personally don't see much benefit from OOP.
So, why is OOP pushed so hard?? hard enough to make me question my own interest in learning programming basics from C?
That's exactly what I thought about C. Learning the basics from C seems to be what I want, I don't have to become a guru in C (although I would not mind) and then learn the other languages that are in demand.
I like the machine independent assembly opinion, and would love to help out as a beginner in that field, but it seems that to get freelance work you need to know the languages that are in demand. (PHP, Python, etc...)
There is a lot of benefit to be derived from OOP, though I personally do my best to avoid it in an interpreted environment (PHP) because of the overhead.
OOP makes it easy to keep entities in large and complicated applications separated and encapsulated. This tends to remove a LOT of potential bugs and makes scaling the application much easier.
In fact, I will frequently use OOP paradigms in C (yes - in C, not in C++). Presently I am working on an embedded app where part of my backend and control software will be C++, but I also have significant portions of code that talk directly to hardware and pretty much have to be done in C. I started with a demo program written by the hardware vendor who sold us the card, and - once I had it running properly and understood it - I "objectified" it. Which is to say that all state variables went into data structures, I wrote what are effectively creator and destructor routines, and there are absolutely no remaining global variables.
Why do this? Because I am going to be extending this application to control a whole rack full of these cards. Because, by doing this now, this program will be easy to extend that way, without my getting bitten by issues of improper variable reuse.
They both warned me of C and its learning curve and I also question it's applicability in the freelance market, especially someone in self-training.
When I think about languages, two things come to mind:
Its practicality - can I use it on any projects?
Its attitude - does it make me think differently? What practices does it encourage?
Interestingly, I just started looking at C recently and it satisfies both questions for me. I work on a large data warehousing team, and we have a proprietary application that requires data transformation routines to be written in C. It is also very different than the day-to-day languages I work with (primarily Bourne shell and a 4GL language you probably never heard of). C requires thinking at a pretty low level, so it helps keeps the mind sharp.
This may be silly, but I MUST ask if anyone else began in programming having the hots for C.
I mean, I have two other friends that work in programming;
one heads a team doing java and believes in oop, the other is head of a web site and does various things mostly working in PHP.
They both warned me of C and its learning curve and I also question it's applicability in the freelance market, especially someone in self-training.
I looked at some languages and tried them very briefly, but C calls me again and again.
So, why continue with C, because of total interest? Even though I was planning to get work too?
As much as I respect every single programmer over the surface of the planet (yes, all of them, even the VB crew), I must admit that I feel that these guys have just an uneducated and completely partial view of the whole thing.
PHP is a language that's suitable for just a few things, just like Java. They both are good at what they do, though I openly admit I highly dislike Java from the first time I used it on my faculty. But they are by no means suitable for every task. In fact, they are unsuitable for most tasks. They only do a few things very well and easily.
Wish your friends luck if they ever have to program anything for a critical task or for a task requiring high performance. Neither of these languages is going to help.
As some other post said above, programming languages are just tools. You use a correct tool for a given work. Even if you like hammers, you certainly are a short sighted person if you think that a hammer is the right tool to open a bottle, it's simple to understand. The "simple" fact that C has a far far far bigger codebase than Java or PHP should be enough to convince you on how wrong they. It's the main language used to develop at least the core of the games that needs high performance, sometimes in conjunction with higher level languages for things where the performance and low level access doesn't matter.
It's probably also the main language used to program any serious OS, now that OSes have such a size that assembler is not an option.
Quote:
Originally Posted by mannclay
So, why is OOP pushed so hard?? hard enough to make me question my own interest in learning programming basics from C?
I guess it's just the trend. And I really find why it's gaining popularity in things like graphical interfaces. I find qt to be an excellent and very powerful toolkit. And I really love the kde project in general, though admittedly don't use kde as my desktop, just pieces of it. I think that OOP is a thing that has a natural affinity with graphical interfaces. But my mental model prevents me from even thinking about using C++ to program a kernel. It's just how my brain works.
Both models (OOP and procedural) have good and bad things. I think it's not a matter of A vs. B, it's just a matter of having options to use whatever you feel it's better for a given task. Some people seem to think that everything in life is a matter of A or B (OOP or procedural, qt or gtk, classic or rock), but no, it's not. If you insist on that view, then you are missing half of the experiences that the world can offer to you.
Quote:
That's exactly what I thought about C. Learning the basics from C seems to be what I want, I don't have to become a guru in C (although I would not mind) and then learn the other languages that are in demand.
That's where it all starts. You try a few languages, do some things, and then you fall in love with a couple of them. That will come naturally and is a choice that no one can do for you.
Quote:
I like the machine independent assembly opinion, and would love to help out as a beginner in that field, but it seems that to get freelance work you need to know the languages that are in demand. (PHP, Python, etc...)
It depends where do you want to work of course. If that's what your employers demands you either have to use those languages or look for another employer.
My opinion is that the whole concept of computation is migrating to higher levels of abstraction. It won't be long until we can completely handle our pc with our voice or even other more incredible methods. I guess that OOP is just a part of that same thing. Though I am not in complete agreement with those that say that the "concept" of "object" is any more native to the human mind that the concept of "action". Instincts come before rationalization, and they are purely procedural concepts. Sometimes you just want to kick someone in the ass and you don't matter who, so here the action comes before, doesn't it?
Jokes apart, I think that knowing at least the basics of C are going to do you no harm at all. And it won't take long. C is a very basic language. Just like English is not that complex like some other languages from a linguistic point of view. But it's not the pieces that matters, but what do you do with them, ask Shakespeare.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.