Little question about what C can do (First steps learner)

S

Silas Justiniano

Hello guys.

I know just the basics of C... I want to learn it more. Friends told
me: you need your own project, and I think the same. Everything I was
thinking to do, already exists, memory reading, compression algorithms,
etc... so I was think a simple .dll/.so reader. For example, the user
wants to know what functions that .dll or .so provides... So I "read"
the file and show this.

Is it possible? Do you have better recommendation?

Thank you people. Bye!

Thank you
 
M

Michael Mair

Silas said:
Hello guys.

I know just the basics of C... I want to learn it more. Friends told
me: you need your own project, and I think the same. Everything I was
thinking to do, already exists, memory reading, compression algorithms,
etc... so I was think a simple .dll/.so reader. For example, the user
wants to know what functions that .dll or .so provides... So I "read"
the file and show this.

Is it possible?

It is possible as there already exist programs providing exactly
this information. Ask in newsgroups for the operating system
in question about this.
> Do you have better recommendation?

That depends. Your project is system specific, so you might more
or less inadvertently learn non-portable C, especially if your
implementation effectively makes this the preferred way of
programming.
I would start out with a pet project that can be implemented in
plain standard C (even if it already "has been done"). Maybe the
existing programs do not _exactly_ cater to your needs -- so
rewrite them.
With this small or medium project, you should be able to learn
much about standard C. Why standard C? So you know how it "should"
be done. So you can separate the non-portable parts of your projects
from the portable inner workings. Note that most compilers have to
be coerced into a standard conforming mode, read the documentation.
Also use the highest available warning level and lint-tools.
Try to understand all warnings and remove their cause by using
a better programming language construct (this may not always be
possible).
Feel free to ask questions or ask for code reviews round here :)

Then, you can try and do your original project.

Afterwards, have a look at sourceforge or similar sites and join
your efforts with others to produce software.

This way quickly puts some hair on... er... will with high
probability benefit you most in the medium and long run.


BTW: Choosing the right tool, i.e. the right language, for the
respective project is another thing you have to do. C is not the
right answer for most things. To be able to get the excellent code
reviews of standard C code available round here, though, you might
want to stay with C... ;-)


Cheers
Michael
 
R

rayw

Silas Justiniano said:
Hello guys.

I know just the basics of C... I want to learn it more. Friends told
me: you need your own project, and I think the same. Everything I was
thinking to do, already exists, memory reading, compression algorithms,
etc... so I was think a simple .dll/.so reader. For example, the user
wants to know what functions that .dll or .so provides... So I "read"
the file and show this.

Is it possible? Do you have better recommendation?

Such a program already exists in many forms, e.g., Microsoft's 'dumpbin
/exports ???' and depends.exe
 
M

Malcolm

Silas Justiniano said:
I know just the basics of C... I want to learn it more. Friends told
me: you need your own project, and I think the same. Everything I was
thinking to do, already exists, memory reading, compression algorithms,
etc... so I was think a simple .dll/.so reader. For example, the user
wants to know what functions that .dll or .so provides... So I "read"
the file and show this.

Is it possible? Do you have better recommendation?
The dll reader is certainly a possibility.
There are two problems, firstly such programs almost certainly exist, and
secondly the problem is knowing the format of the dll file, the C itself is
pretty trivial.
However it is a reasonable length project.

Really you need an area of non-computer life you know something about. Then
you need a task that can only be done, practically, with a computer.

For instance a friend wanted a program that would help him cheat at online
poker. This seems to me quite doable - given a hand and a visible table, the
odds are mathematically calculable. Then you need some way of adding in
psychological factors based on the bids.
 
C

Christopher Benson-Manica

Malcolm said:
For instance a friend wanted a program that would help him cheat at online
poker. This seems to me quite doable - given a hand and a visible table, the
odds are mathematically calculable. Then you need some way of adding in
psychological factors based on the bids.
^^^^
Those would be "bets" - poker ain't bridge :)
 
S

Silas Justiniano

Thank you guys. So I'll make a standard C program, and useful... let me
think... I thought about a simple calculator shell, or a image viewer
with GTK.....

Thank you again. Be prepared to receive my questions! Bye!
 
M

Malcolm

Silas Justiniano said:
Thank you guys. So I'll make a standard C program, and useful... let me
think... I thought about a simple calculator shell, or a image viewer
with GTK.....
An expression parser (1 + 3) * 4 = ? etc is quite hard to write.

Most images are either JPEG or GIF - unless you have a library, neither is
trivial to decode.

However don't let me put you off - I'm just warning.
 
S

Silas Justiniano

Sorry to bother you again, but what about a program that say me what is
passing through my computer (it's a router to another) came from
internet?

I know already there are programs that do that, but there are programs
that do everything, I must copy the idea. So I can learn how networks
work and C in the same time. Is it possible?

I'll start a program in Tcl/Tk similar to Picasa for Windows. I was
think to use the sqlite to store information about paths, etc. Or would
be better to develop my own database schema and make a module to allow
my Tcl/Tk program access it? I can do it with Tcl, but a C module would
be faster.

What do you think?

Thank you! Bye!
 
G

Gregory Pietsch

Silas said:
Hello guys.

I know just the basics of C... I want to learn it more. Friends told
me: you need your own project, and I think the same. Everything I was
thinking to do, already exists, memory reading, compression algorithms,
etc... so I was think a simple .dll/.so reader. For example, the user
wants to know what functions that .dll or .so provides... So I "read"
the file and show this.

Is it possible? Do you have better recommendation?

Thank you people. Bye!

Thank you

My recommendations:
* Get a lot of open-source software that is written in C and compile,
test, and debug. Don't ask questions about it until you feel you've
gotten into the author's head and know the code better than he does.
* If you have generic questions about C, don't hesitate to ask on this
list. As long as the question doesn't sound like homework, you may get
a cryptic answer from the comp.lang.c Oracle.
* Keep asking "Why?" and "What if?"

Gregory Pietsch
 
G

Giorgos Keramidas

Sorry to bother you again, but what about a program that say me what is
passing through my computer (it's a router to another) came from
internet?

I know already there are programs that do that, but there are programs
that do everything, I must copy the idea. So I can learn how networks
work and C in the same time. Is it possible?

It may help a lot if you don't ``reinvent an existing wheel'', but focus
instead of reading the code of others too.

One of the most satisfying and educating projects we had in the computer
science department I used to study was:

``Find a medium sized project, of your own choise, ranging in size
somewhere between 9000 and 10000 lines of code, read it and be
prepared to answer questions about its internals.''

My team picked GNU ed(1). A printout of the source code (around 160
pages) and a copy of "The C Programming Language" was all I took with me
during that Winter's Christmas break. I still remember how much fun it
was and feel thankful for our instructor at the time, Dimitris Xenos.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top