Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Richard heathfields C programming article (http://www.velocityreviews.com/forums/t550228-richard-heathfields-c-programming-article.html)

sophia.agnes@gmail.com 11-08-2007 05:13 AM

Richard heathfields C programming article
 
Hi,

I was going through Mr "Richard heathfields" site , it is written as
follows:-

Some people think C has no role to play in the modern programming
world. I would consider this opinion to have rather more validity if
it weren't for the fact that even those who express it use C code on a
daily basis (whether they realise it or not). C programs and libraries
are woven into the very fabric of the modern programming world, and
only a fool thinks otherwise.

Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.

my colleagues always advice me on the following lines:-

1)C why learn it, it is of no use for ordinary programmers like us,it
is a language for nerds.

2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)

3) for ordinary programmers just knowledge of database design
concepts, SQL,SDLC, then a language like java or C# will earn the
bread and butter...???

now i have got my own questions

1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)

2) I have heard that the java compiler javac is purely written in C
how true is this statement...???


dj3vande@csclub.uwaterloo.ca.invalid 11-08-2007 05:41 AM

Re: Richard heathfields C programming article
 
In article <1194498835.392087.325200@i38g2000prf.googlegroups .com>,
<sophia.agnes@gmail.com> wrote:
>Hi,
>
>I was going through Mr "Richard heathfields" site , it is written as
>follows:-
>
>Some people think C has no role to play in the modern programming
>world. I would consider this opinion to have rather more validity if
>it weren't for the fact that even those who express it use C code on a
>daily basis (whether they realise it or not). C programs and libraries
>are woven into the very fabric of the modern programming world, and
>only a fool thinks otherwise.
>
>Well Mr heathfield can you explain your statement in a clear & brief
>manner, even my peers ask this question most of the time, so that i
>can give them some good answers.
>
>my colleagues always advice me on the following lines:-
>
>1)C why learn it, it is of no use for ordinary programmers like us,it
>is a language for nerds.


There are a lot of good reasons, but one of them is that it forces you
to learn to think about programming in a way that will be useful with
any other language you use as well.

Two major ways that it does this are:
(a) It forces you to understand what you're doing at a fundamental
level; C doesn't have any built-in high-level abstractions, so if
you want them you have to build your own. Having done this a few
times will make it a lot easier to understand what's going on
underneath when you're using a language that has them pre-built for
you.
(b) It forces you to learn to get your programs right, by not
protecting you from your errors. If you get things wrong, the
program will break in subtle and unsubtle ways, and you will often
need to understand how your program works, even in parts that
aren't directly related to where the bug is showing up (which you
already should by the time you run into runtime problems!), to find
out what really went wrong.


>2) it has no role of C language in a windows development
>environment...???(they say c is purely for *nix environment)


My day job involves writing code that gets deployed on Windows, and a
lot of that is done in C. In fact, most of the bits of the code that
everybody hates to have to poke at are written in languages other than
C, so my experience would indicate that C is one of the *better*
languages for developing under Windows (though I'm not going to claim
that that's representative).


>3) for ordinary programmers just knowledge of database design
>concepts, SQL,SDLC, then a language like java or C# will earn the
>bread and butter...???


That depends what kind of job you want to get. It's probably unwise to
restrict the tools you learn to use to only those that are currently
useful for getting a job for "ordinary programmers", though, since
those tools tend to change over time and having a broader knowledge
base both makes you more likely to know *something* that's useful at
any given time and makes it easier to pick up new tools as they come
along.


>now i have got my own questions
>
>1) can any one point out good enough tutorials showing how to make gui
>app in C(with the help of graphical libraries) just as we do in
>java...???(no curses please, i don't like it)


1-57231-995-X


>2) I have heard that the java compiler javac is purely written in C
> how true is this statement...???


I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.


dave


Szabolcs Nagy 11-08-2007 07:38 AM

Re: Richard heathfields C programming article
 

sophia.ag...@gmail.com wrote:
> 1)C why learn it, it is of no use for ordinary programmers like us,it
> is a language for nerds.

not true
see wide usage in industry
(well probably it's not used much for gui or highlevel web application
development, but saying it is for nerds only is definitely not true)

> 2) it has no role of C language in a windows development
> environment...???(they say c is purely for *nix environment)

c standard tries to be as platform independent as possible for a
lowlevel language (c has compilers for microcontrollers as well as
supercumputers)

> 3) for ordinary programmers just knowledge of database design
> concepts, SQL,SDLC, then a language like java or C# will earn the
> bread and butter...???

sure if your job is to manipulate databases from c# or java then it's
ok

when you have to roll your own fileformat/data structures/etc then
you'll have hard time with those languages (most dbms systems,
webservers, compilers etc are written in c)

also when you need fast data processing those languages can fail
(memory management issues, speed, ..)

> 1) can any one point out good enough tutorials showing how to make gui
> app in C(with the help of graphical libraries) just as we do in
> java...???(no curses please, i don't like it)

i don't know, but i guess every c gui toolkit has it's own tutorials/
documentation (gtk comes to mind, though most toolkits are written in c
++ nowdays)

> 2) I have heard that the java compiler javac is purely written in C
> how true is this statement...???

sure, check out the src code which is available: http://download.java.net/jdk6/6u5/archive/

also python, perl, ruby, ghc haskell,.. compilers are written mostly
in c


Richard Heathfield 11-08-2007 07:59 AM

Re: Richard heathfields C programming article
 
sophia.agnes@gmail.com said:

> Hi,
>
> I was going through Mr "Richard heathfields" site , it is written as
> follows:-
>
> Some people think C has no role to play in the modern programming
> world. I would consider this opinion to have rather more validity if
> it weren't for the fact that even those who express it use C code on a
> daily basis (whether they realise it or not). C programs and libraries
> are woven into the very fabric of the modern programming world, and
> only a fool thinks otherwise.
>
> Well Mr heathfield can you explain your statement in a clear & brief
> manner,


If the above is not clear enough and brief enough for you, I'm afraid I
can't oblige.

> even my peers ask this question most of the time, so that i
> can give them some good answers.
>
> my colleagues always advice me on the following lines:-
>
> 1)C why learn it, it is of no use for ordinary programmers like us,it
> is a language for nerds.


Find out what they mean by "nerds". I'm just an ordinary programmer like
you, and I find that C is of a great deal of use to me.

> 2) it has no role of C language in a windows development
> environment...???(they say c is purely for *nix environment)


I write far more C for Windows than I do for Linux. Most of the time I
don't care which OS my code runs on, but when I *do* care, the reason
tends to be that I am accessing the Win32 API. So, for me, C has a very
important role in Windows development.

>
> 3) for ordinary programmers just knowledge of database design
> concepts, SQL,SDLC, then a language like java or C# will earn the
> bread and butter...???


If all you want to do is earn bread and butter, go get a job as a baker or
a dairymaid.

> now i have got my own questions
>
> 1) can any one point out good enough tutorials showing how to make gui
> app in C(with the help of graphical libraries) just as we do in
> java...???(no curses please, i don't like it)


I wasn't /going/ to curse.

"Programming Windows", 5th edition, by Charles Petzold, is an excellent
tutorial in Windows programming (although, alas, the C itself is a bit
dire). This work might reasonably be regarded as canonical. I don't know
what the canonical Linux equivalent is, but several decent books on GTK
exist. (And GTK has been ported to Windows, so you can kill two birds with
one stone if you like.)

> 2) I have heard that the java compiler javac is purely written in C
> how true is this statement...???


I don't know, but I would not be surprised if it were true. Many compilers
are partly "written" using tools that generate lexing and parsing code,
and this code is typically generated in C, so a typical modern compiler is
likely to be at least partly written in C.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999

Mark Bluemel 11-08-2007 08:46 AM

Re: Richard heathfields C programming article
 
sophia.agnes@gmail.com wrote:

> 2) I have heard that the java compiler javac is purely written in C
> how true is this statement...???


There are probably javac implementations written in C, but the reference
implementation from Sun is entirely written in Java, last time I looked.

Mark Bluemel 11-08-2007 09:32 AM

Re: Richard heathfields C programming article
 
dj3vande@csclub.uwaterloo.ca.invalid wrote:
>
>> 2) I have heard that the java compiler javac is purely written in C
>> how true is this statement...???

>
> I would be unsurprised to find that javac is implemented (at least
> partly) in Java, but the JVM that it would run on in that case is
> almost definitely written in C.


Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno), or
something else ...

Philip Potter 11-08-2007 10:37 AM

Re: Richard heathfields C programming article
 
Mark Bluemel wrote:
>> I would be unsurprised to find that javac is implemented (at least
>> partly) in Java, but the JVM that it would run on in that case is
>> almost definitely written in C.

>
> Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno), or
> something else ...


But presumably Jalapeno then has to run on *another* virtual machine :)

--
Philip Potter pgp <at> doc.ic.ac.uk

Mark Bluemel 11-08-2007 10:50 AM

Re: Richard heathfields C programming article
 
Philip Potter wrote:
> Mark Bluemel wrote:
>>> I would be unsurprised to find that javac is implemented (at least
>>> partly) in Java, but the JVM that it would run on in that case is
>>> almost definitely written in C.

>>
>> Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno),
>> or something else ...

>
> But presumably Jalapeno then has to run on *another* virtual machine :)


I don't think so, but I don't know any of the details. A paper linked
from http://citeseer.ist.psu.edu/alpern99implementing.html discusses
this, though.

Philip Potter 11-08-2007 10:52 AM

Re: Richard heathfields C programming article
 
sophia.agnes@gmail.com wrote:
> Hi,
>
> I was going through Mr "Richard heathfields" site , it is written as
> follows:-
>
> Some people think C has no role to play in the modern programming
> world. I would consider this opinion to have rather more validity if
> it weren't for the fact that even those who express it use C code on a
> daily basis (whether they realise it or not). C programs and libraries
> are woven into the very fabric of the modern programming world, and
> only a fool thinks otherwise.
>
> Well Mr heathfield can you explain your statement in a clear & brief
> manner, even my peers ask this question most of the time, so that i
> can give them some good answers.
>
> my colleagues always advice me on the following lines:-
>
> 1)C why learn it, it is of no use for ordinary programmers like us,it
> is a language for nerds.
>
> 2) it has no role of C language in a windows development
> environment...???(they say c is purely for *nix environment)
>
> 3) for ordinary programmers just knowledge of database design
> concepts, SQL,SDLC, then a language like java or C# will earn the
> bread and butter...???


These three questions all kind of imply one question: "Is C a good
language?" or "Is C better than <other language>?"

This is actually an FAQ in the comp.lang.c++ FAQ, though it is almost as
applicable to C:
http://www.parashift.com/c++-faq-lit...e.html#faq-6.5

If all the programmers and all the managers within an organisation use
C# or Java, then it makes sense for you to learn C# or Java too. If
everyone uses C, then you should use C. Speaking the same language as
your colleagues is /much/ more valuable than using the "best" language
for the job.

On the other hand, if you are interested in learning about programming
rather than just trying to get some job done, then C is an excellent
language to learn. It has many, many different applications: GUI code,
web servers, DSP processors, embedded devices (such as cars or mobile
phones), compilers and interpreters (including C compilers, the Perl
interpreter, games (from NetHack to Quake), and lots more. Once you know
C, you have a tool which can be used in all these fields.

I have known C for a long time, but I've only just started working on
embedded processors and C is the language of choice for my particular
processor (the Xilinx MicroBlaze soft processor). My previous experience
writing C for Windows and Linux applications meant I didn't have to
waste time learning a new language.

Phil

--
Philip Potter pgp <at> doc.ic.ac.uk

James Kuyper 11-08-2007 11:53 AM

Re: Richard heathfields C programming article
 
dj3vande@csclub.uwaterloo.ca.invalid wrote:
> In article <1194498835.392087.325200@i38g2000prf.googlegroups .com>,
> <sophia.agnes@gmail.com> wrote:

....
>> 1) can any one point out good enough tutorials showing how to make gui
>> app in C(with the help of graphical libraries) just as we do in
>> java...???(no curses please, i don't like it)

>
> 1-57231-995-X



Would you care to identify what that character string means? I've got an
educated guess, but I shouldn't have to guess.


All times are GMT. The time now is 08:20 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.