LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-07-2008, 09:21 PM   #1
mannclay
Member
 
Registered: Nov 2007
Location: Brooklyn, NY
Distribution: eeeMint
Posts: 52

Rep: Reputation: 15
Why C grabs me so...


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?

Last edited by mannclay; 11-07-2008 at 09:33 PM.
 
Old 11-07-2008, 10:50 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,094
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
C is unix, unix is C, K & R will live forever in an ansified world!
 
Old 11-07-2008, 11:57 PM   #3
raconteur
Member
 
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
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.
 
Old 11-08-2008, 12:17 AM   #4
mannclay
Member
 
Registered: Nov 2007
Location: Brooklyn, NY
Distribution: eeeMint
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raconteur View Post
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.

thanks again!
 
Old 11-08-2008, 12:24 AM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
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.
 
Old 11-08-2008, 05:50 AM   #6
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
A politically incorrect answer from the seventies:

Quote:
C
Sex
Unix
 
Old 11-08-2008, 06:02 AM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.
 
Old 11-08-2008, 06:06 AM   #8
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by pinniped View Post
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'.
 
Old 11-08-2008, 11:09 AM   #9
mannclay
Member
 
Registered: Nov 2007
Location: Brooklyn, NY
Distribution: eeeMint
Posts: 52

Original Poster
Rep: Reputation: 15
uummm.... oops

Last edited by mannclay; 11-08-2008 at 11:13 AM.
 
Old 11-08-2008, 11:16 AM   #10
mannclay
Member
 
Registered: Nov 2007
Location: Brooklyn, NY
Distribution: eeeMint
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by H_TeXMeX_H View Post
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...)

Last edited by mannclay; 11-08-2008 at 12:15 PM.
 
Old 11-08-2008, 11:43 AM   #11
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
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.
 
Old 11-08-2008, 12:01 PM   #12
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Have a look at these statistics:
http://www.tiobe.com/index.php/conte...pci/index.html
 
Old 11-08-2008, 12:17 PM   #13
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by jay73 View Post
s*** java is on top, I sense the end of the world
 
Old 11-08-2008, 12:43 PM   #14
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by mannclay
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:
  1. Its practicality - can I use it on any projects?
  2. 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.
 
Old 11-08-2008, 09:43 PM   #15
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by mannclay View Post
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 View Post
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.

Last edited by i92guboj; 11-08-2008 at 09:47 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Chrome grabs 1% of browser market in under 24 hours LXer Syndicated Linux News 0 09-03-2008 11:41 PM
LXer: Ingres grabs Thinking Instruments LXer Syndicated Linux News 0 07-26-2006 06:54 AM
Screen Grabs and The Gimp Jongi Suse/Novell 2 12-20-2005 10:32 AM
Realplayer grabs *.rpm on download jackdoll Linux - Software 4 06-22-2005 06:04 PM
reading gdesklets/rss-grabs in new tab in firefox sterrenkijker Linux - Software 0 09-22-2004 01:29 PM


All times are GMT -5. The time now is 06:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration