May 11, 2007 19:01
There is something that I just don’t quite “get”.
I have learned how to write rudimentary C code. This is all fine and dandy, right? I mean, really-I can write small, rudimentary C programs that do little (sometimes even useful) things.
However, when the problem domain grows beyond the trivial, I find myself staring and wondering and researching more than writing, and invariably I get lost. I know that there are things that I would like to do, but I don’t even know where to begin looking around to find out exactly what they are.
So far, my utilities that I have written are mostly little programs that do things that need to be done with root tasks (and so cannot be done in shell scripts, since users need to be able to run the commands). For example, I wrote a little utility that was a wrapper around “passwd -l” and its inverse, so that users could disable passworded access to their accounts (useful if they want to only use an SSH key). Can’t be done in a shell script because shell scripts can’t be SUID or SGID, so a small C program did the trick for me.
However, I am currently looking at a problem which (I wouldn’t think) would be all that hard: Adding PPPoE support to two components of the Ubuntu system so that end-users are able to configure their connections without resorting to the pppoeconf tool. The pppoeconf tool isn’t bad, per sé, but it is not something that end-users would really be excited to use. Besides, NetworkManager seems to break PPPoE connections anyway. Frustrating as hell, that is.
It seems that for me to be able to do this, though, I would need to become familiar with the GNU programming environment, and the software that it runs around. For example, Glib and GNOME libraries and the like. And the way that they write their code. I have a hard enough time, though, reading source code for programs like ls. I suppose that is a deficiency on my part-I never did really spend all of my time trying become intimate with C programming. While I am a competent enough Python programmer (for things that I have needed to do thus far, anyway), Python won’t work so well for this task, unless the entire program is ported to Python (which would be less than fruitful; it would use more system resources that way, because of the way Python works).
Anyone reading this know where I can get started with more than just “how to write C programs” and actually learn how to read and work with the code? Because otherwise, I just wind up confused and lost and staring at the screen…
programming,
gnome,
c,
gtk,
linux