Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 565 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it worth learning C to get a deeper understanding of OS'es and computers in general?

#11
The answer is simple, too: yes, you would.

There are some languages that should be useful to any developer as they are like milestones. I would say that C, Java, PHP belong to such languages. Right now I am reading a book on JavaScript just for education, though my site doesn't use it at all and probably won't.

**If you like it, go for it!**
Reply

#12
Being an embedded developer, C is my bread and butter language but to me it tastes like roast beef with roast potatoes and a good gravy. If I were starting out today there are two languages that I would set out to master; C and C# and maybe throw in a smattering of C++, just for those unmanaged native applications that C# won't bastardise itself to cope with.

These days there is practically no need to muck about with assembler. C compilers and chip design are so intertwined that you will almost never be able to write more efficient assembler than what a C compiler generates. In addition you can get all of the understanding of the underlying system using C.

Now, before that sounds all romantic. let me re-phrase. You will NEED to understand the underlying system if you are to write something worthwhile in C. This means that before you get something remotely more useful than outputting "Hello World" you are going to be doing a lot of reading, a lot of mis-understanding and more re-reading, because the guys writing the docs understand what they are talking about but the chaps reading the docs don't otherwise they wouldn't be reading them.

C syntax is very, very easy, and "writing" a program is very easy. Getting the interaction between your program and the underlying OS and hardware to work is where the difficulty comes in. Nothing is for free in C, but Aye! a beautiful language it is.

MY advice on learning any language is: Find a project that you have to do and force yourself to use the language that want to learn.
Reply

#13
Like others have pointed out, learning something new is always worth it.

However, speaking as someone who learned C in the past couple of years; I think the answer to your question depends on if you have any practical applications to learning C.

In my instance; I enjoy C in server programs, embedded programming and basically anywhere you want to control as much as possible (without risking further insanity in assembly).

So my suggestion is that you find some mini-project that interests you that would make sense to develop in C. Then learn by doing.
Reply

#14
> For example I don't even know what a stack overflow [... is ...] and why it occurs.

Whenever one function calls another, the computer needs to remember where in the execution of the caller it was. This information is stored in a stack: calling a function pushes a new record saying "return to $HERE when done", whereas returning from a function pops the return address and goes back to there (or rather, the next thing after the function call that has just been returned from).

Typically (determined by the OS or language runtime) you only have a limited amount of space for this stack. Running out of that space is called a stack overflow.

See also <http://en.wikipedia.org/wiki/Stack_overflow>

Reply

#15
I'm also an Actionscript 3 developer (with some Python thrown in). Learning C is a current project. I have dove into Objective-C a bit and submitted my first app to the AppStore, but I want a lower level understanding of what I am doing. I don't have much interest in writing a compiler or hacking at the Linux kernel, but essentially everything I touch is C/C++ at the core, so I figure it is worth my time to at least get a cursory understanding of the language.

In terms of leveraging it with your existing experience, [the Alchemy project][1] is pretty sweet, and allows you to leverage C/C++ libraries in AS3. There are some exciting ramifications of this.

Personally I have a loose goal of learning a language every year. This year it is Objective-C, but getting into that has made me want to take a step back and learn straight C. It certainly can't hurt, and will make you a better programmer in the long run.

[1]:

[To see links please register here]

Reply

#16
My answer is: maybe. These questions may help you decide:

1. Do you have to solve tough
mathematical problems involving
numerical methods (calculus, linear
algebra, diff-eq, finite element
analysis, etc.)? Many of the best
libraries are written in C, and
understanding how to implement those
algorithms in another language would
require you to understand C so you
could translate them.
2. Do you need to devise compact data
structures that waste no memory? My
experience in C enabled me to create
collection and string classes in
Java that used much less memory than
the standard classes provided in the
J2SE library.
3. Do you need to interface with legacy
applications? Many are written in C
or C++.

There are many other good reasons for learning C, but it depends on what kind of programming you intend to do, and whether there is an intersection between the skills thqat learning C will provide and the skills you need.

Reply

#17
I think you should learn C.

Well, rather than (just) learning C, you should be reading K&R2.

Here's a laundry list of what K&R2 teaches you about:

- C
- Sorting
- Binary search trees
- Hash tables
- Memory allocation algorithms
- The Von-Neumann flat-memory machine architecture
- Systems programming (`wc` is---or can be made---surprisingly complex)
- Interfacing with the kernel

When you truly "get" C, you also have easy access to the bare metal; it becomes much easier to get at the machine-native call stack. Once you see the similarity between function pointers, if-then-else blocks, "goto" and "return", it becomes much easier to understand how buffer overflow exploits work.

Learning C is a good thing. Not because it automatically teaches you everything about how programs work, but because it makes you gravitate towards that knowledge.
Reply

#18
It's a good step, but it's like asking whether learning Italian is enough to understand Dante's The Divine Comedy. There is a lot different in OS and low-level programming that doesn't exist in high level programs. C, at the end of the day, is just a language.

I'd say definitely learn C, but use it to study some books on things like compiler construction, basic OS concepts and so on. That's where you'll really learn the low level concepts.
Reply

#19
Most of the time you are happy with knowing how to do something. But you will eventually get from how to why. When you are asking why you are doing something then C can often give you that answer due to it's low level nature. Of course, any other 'raw' language will give you the same answers. By raw I mean a language which allows you direct access to the computer, rather than hidden under a multitude of API layers and classes.

Of course, some people never ask why... how if often good enough for them. They are the ones who wont want to learn C.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through