LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2012, 03:41 PM   #1
daer119
LQ Newbie
 
Registered: Jan 2012
Posts: 8

Rep: Reputation: Disabled
Source Code Reading


Hi everyone,
I got so much help to my last question I was hoping someone could point me in the right direction again this time.

OSS is AWESOME; however, it's daunting in the fact of how complex the programs are, or seem to be. So here's my question: Is there a place where I can download source code of programs in different languages that are simple, or not super complex at least. The last tar.gz(?) file I downloaded had so many files in it I had no idea where the source code was or what language the program was written.



Would like to know so I can someday perhaps contribute to the Linux community with the addition of new or enhanced codes.

Thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-26-2012, 03:46 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,944

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by daer119 View Post
Hi everyone,
I got so much help to my last question I was hoping someone could point me in the right direction again this time.

OSS is AWESOME; however, it's daunting in the fact of how complex the programs are, or seem to be. So here's my question: Is there a place where I can download source code of programs in different languages that are simple, or not super complex at least. The last tar.gz(?) file I downloaded had so many files in it I had no idea where the source code was or what language the program was written.

Would like to know so I can someday perhaps contribute to the Linux community with the addition of new or enhanced codes.
Thanks
Sorry, no. Source code for an entire operating system IS complex. It's usually in C/C++, and (since you don't say which "tar.gz" file you downloaded and from WHERE), the language is just that. There isn't a "plain-english' version of the source code...read the comments in it, the headers in the files, etc.
 
Old 01-26-2012, 03:48 PM   #3
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
I would pick a particular well known project and just dive into it. Try to understand each bit.

zlib isn't so big, and has a ./configure && make style build system. It's written in C and produces both binaries and libraries. Very typical of an OSS project.

http://zlib.net/zlib-1.2.5.tar.gz
 
1 members found this post helpful.
Old 01-26-2012, 03:55 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
My suggestion: consider a different approach. Learn a language first. Many of the basic components of Linux are written in C. That would be a good choice, and there are many tutorials/resources for programming in C all over the web.

Your original approach seems similar to immersing yourself in a foreign language (like Spanish, French, German, etc.). While immersing yourself may help you learn that foreign language faster, the same is not true for computer languages. Very quickly: part of the reason the immersion works for spoken foreign languages is because (1) language is tolerant--you don't have to be perfect to get your meaning across and (2) you get feedback from the other person in the conversation. In programming, you get neither of those. Everything must be precise (down to punctuation) and the program cannot explain what went wrong and why. So looking at lots of code without knowing the language(s) first is a sure way to get very, very confused and very, very frustrated.
 
2 members found this post helpful.
Old 01-26-2012, 03:59 PM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Check the gnu hello.c
http://www.gnu.org/software/hello/
 
Old 01-26-2012, 04:28 PM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
You can get some example programs written in Qt. Qt is a framework which simplify some programming aspects and speed up creating a programs and is quite good for beginners. There is also an editor especially prepared for it named "QtCreator". Of course you can use other frameworks and addons to choosed language or pure C, if you wish. I recommend you approach to first invent an idea - simple application you will need, like Calculator for graphs (sin, cos, etc.), Database of your books or music, an Notes reminder (organizer). I known everyting is already written, but doing this by self you will learn faster then just reading other sources. And then, when you get more knowledge, then you will be able to understand others.
 
Old 01-26-2012, 04:55 PM   #7
daer119
LQ Newbie
 
Registered: Jan 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for the suggestions everyone.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[C coding] reading code noir911 Programming 7 05-17-2007 09:05 PM
source code for reading data through com port rs232 applee Programming 2 03-03-2007 08:55 AM
Reading Assembly code max_rsr Programming 4 07-22-2005 09:06 AM
some questions encounted during reading the source code qqrilxk Linux - Security 1 12-08-2004 10:23 PM
reading kernel source code eshwar_ind Programming 4 06-02-2004 04:18 AM


All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration