Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

learning from open source code [closed]

I'm a student and I have a lot of free time on this vacation so I decided to put some time in learn more about how to write good code.(All I know at this moment is C and some C++)

My question is about how to find some applications source code? Let's say I'm looking for some source codes which are using a specific library. How can I find the open source projects which are using the library about I'm interested.

I've tried on google code and sourceforge but without success. I think i don't know how to search. Do you have any advice/link about how to do that?

like image 409
Ahmed Youssef Avatar asked Jul 05 '26 04:07

Ahmed Youssef


1 Answers

There isn't a one-stop-shop for finding open source code.

If you want to read some well written code, GNU's Savannah is a browsable repository of the GNU stuff (Binutils, GCC toolchain and tons of others). The GNU software, IMHO is some of the best written C anywhere.

You could also checkout MINIX which is an open-source microkernel based operating system (which is POSIX compliant too).

The Gnome project has many projects that cover a wide range of languages from C to Python and even C# (FSpot).

When searching for a project, if you know the name, google should help. If not, search for the library on google such as "libfoo", or look in the metadata of the package manager you use (it often has the upstream maintainer's website).

For example:

[aiden@devbox ~]$ ldd /bin/ls
    ...
    libcap.so.2 => /lib64/libcap.so.2 
    libacl.so.1 => /lib64/libacl.so.1 
    libc.so.6 => /lib64/libc.so.6 
    libpthread.so.0 => /lib64/libpthread.so.0 
    ...

I could google "libpthread" to find that it is part of the GNU C Library

If you want to get involved in FOSS/C then learn to use source control systems like Git or subversion, and diff for making patches. Talk to people, they always want fresh developers to triage bugs and fix problems. But you will probably find a pecking order and a social ladder to climb.

  • GNU Savannah
  • MINIX 3
  • Gnome Projects
  • Git Distributed Version Control
  • Free book on Subversion
  • The Linux Kernel

Good luck and have fun!

like image 143
Aiden Bell Avatar answered Jul 10 '26 07:07

Aiden Bell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!