Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-24-2005, 03:30 PM
|
#1
|
Senior Member
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Rep:
|
How do people learn higher level programming?
So I've taking 2 programming classes(C/C++) up to date, and I'd taught myself C++ before taking the class. How does one learn higher level programming? Such as kernel hacking etc.? Are there classes for that? or do you have to teach yourself? Thoughts?
|
|
|
09-24-2005, 04:09 PM
|
#2
|
Member
Registered: Oct 2003
Location: Mexico
Distribution: Ubuntu
Posts: 223
Rep:
|
I've learned that the only to way to progress (as anything in life) is practice, practice and practice.
The highest stuff you can learn, (such as hacking, cracking) comes from experience in areas other than programming, I know it sounds boring, but you have to learn about network infraestrucures, OS architecture and a lot or computer history. Believe me, I've tried shorcuts too, books like "Learn how to hack in 24 hours" and I can guarantee you that you'll end up dissapointed.
A long time ago, someone here told me that you should continue "high" projects, usually found in places like freshmeat.net. The idea is that you can learn other programming styles, and that you can learn from others instead of always starting new projects from your imagination. You'll be surprised of the amount of things you'll discover.
I hope that helps
Regards
Poeta
|
|
|
09-24-2005, 04:43 PM
|
#3
|
Senior Member
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Original Poster
Rep:
|
I don't want to know how to crack/hack. I want to do kernel programming etc. The farthest I've gone is arrays. How do I learn what I need to know. I've tried to fix the ndiswrapper code(I've been having problems), but I don't even what the command it's giving does. Thoughts?
|
|
|
09-24-2005, 06:52 PM
|
#4
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
It takes lots of experience, and as mentioned above, practice to learn how to do advanced programming. Most University computer science departments have advanced level classes on operating systems that teach the basics of what a kernel does, device drivers, etc/ For the practical side of things there are numerous books such as Linux Device Drivers, which is available for free onlone from O'Reilly and as a normal dead tree book.
For general kernel knowledge, I've found Vahalia's Unix Internals quite good and there are similar books. Programming the kernel and device drivers requires very good knowledge of advanced C (pointers, memory management, etc.) so you should learn C really well. Some kernel stuff will require assembler too for the stuff that's very machine specific.
|
|
|
09-24-2005, 06:55 PM
|
#5
|
Senior Member
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Original Poster
Rep:
|
that's just it. Where do you find resources to learn advanced C? I'm taking beginner's courses, how long does it take to get to the level of "advanced C"? Other thougts?
|
|
|
09-24-2005, 07:05 PM
|
#6
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
If you've read all of K&R2 (that is, the 2nd edition of The C Programming language by Kernighan & Richie) and understand it, then I'd say you're a pretty advanced C programmer. If you've had some coursework on C and C++, that will help, a lot. The K&R2 book is written in a tutorial form, but in touches (in passing) many advanced topics and is widely considered one of the best programming books ever written. If you're on top of things, I'd say you can gain the knowledge within 6-12 months (possibly less), but you need to write lots of code to gain the necessary experience. I've been programming C off and on for more than 5 years now, and I don't yet consider myself a complete expert. Fortunately, C is small, much smaller than C++, and that makes to a bit easier.
As for the rest, you can pick up some programming/device driver books like I mentioned, but there's no real substitute for examining the code, playing with it, and trying to do stuff with it. This is where a computer cience course can come in handy, if you can swing it, as often they'll have projects that will get your feet wet.
|
|
|
09-24-2005, 09:15 PM
|
#7
|
Member
Registered: Oct 2003
Location: Mexico
Distribution: Ubuntu
Posts: 223
Rep:
|
Other things that really helped me to develop my programming skills is to learn new languages and paradigms..... They made learn scheme (lisp) at school and I must say it was a really (painfull) good experience, it shows you a lot about how to think out of the box.
Patters should also give you the "big picture" about why are things done the way they are....
I'd recommend downloading the source code of the minix project.... It's like 25 mb and it builds up into a whole operating system.
Regards
Poeta
By the way, hack/crack is one of the most knowledge demanding activities, shouldn't be seen as "evil". Guys doing that are real gurus. I don't respect damaging other people tough.
Last edited by poeta_boy; 09-24-2005 at 09:17 PM.
|
|
|
09-24-2005, 10:07 PM
|
#8
|
Senior Member
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690
Rep:
|
school gives you a basic idea about how to do the job.
what is a difference between 2 programmers :
* one is doing all his homeworks, having great grades, reading all the books he is supposed too. He thinks he's great.
* the other do his homeworks time to time, have other interests than grades, want to learn more because he wants to achieve more for himself. He's reading the school books time to time, not all of them, but he's also interested in reading subjects related to programming(design patterns, modeling,etc.)
When they finish school/university one of them is asking:
If you believe that a great school/book/education make a great programmer you are wrong. This applies to lots of other things in life. It always depends on you and only you.
When learning, you choose what is significant, you can't learn everything and time is running fast...
Programming languages teach you different styles of programming, different ways to solve a problem.
I myself "evolved" :-) by reading other people code, trying to do what i was doing a better way. You must really want to be great to be a better programmer.
I am a programmer/analyst and i use 10% of what i learned from school. The rest i learned it myself, because i had to or because i wanted to.
You must be able to adapt yourself with new tools, changes in the programming languages, manipulate libraries, refractor/debug code, redesign/optimize a solution,etc...
hope this help. Reaching a level doesn't mean you will keep it, nothing/nobody remains the same.
|
|
|
09-24-2005, 10:12 PM
|
#9
|
Member
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Rep:
|
I would recommend reading Mastering Algorithms in C, Understanding the Linux Kernel and (as mentioned before) Linux Device Drivers - all published by O'Reilly. These three books should tell you everything that you need to get started. After that, as poeta_boy said, practice is the only thing that will truly make you into a solid programmer.
jrtayloriv
|
|
|
09-25-2005, 12:06 AM
|
#10
|
Member
Registered: Oct 2003
Location: Mexico
Distribution: Ubuntu
Posts: 223
Rep:
|
Quote:
what is a difference between 2 programmers :
* one is doing all his homeworks, having great grades, reading all the books he is supposed too. He thinks he's great.
* the other do his homeworks time to time, have other interests than grades, want to learn more because he wants to achieve more for himself. He's reading the school books time to time, not all of them, but he's also interested in reading subjects related to programming(design patterns, modeling,etc.)
|
I couldn't have said it any better.... for myself, when I was at school (not very long ago, just months  ) I found myself trapped in endless homeworks, all of them about (as you said) arrays, vectors..... "do a queue that receives 10 numbers and then display them in reverse order..." I can almost hear the teacher explaining how to traverse an array for 10th time....
I am not a master programmer, and if you see the questions I've posted here, you'll notice that some of them are quite simple, and there has always been someone here to help.
Don't worry, as someone told me here some time ago, when practice and time passes by, experience is unavoidable.
Let's just keep it up.
Regards
Poeta
|
|
|
09-25-2005, 12:21 AM
|
#11
|
Member
Registered: Jun 2005
Posts: 542
Rep:
|
"Higher level programming" usually refers to the level of abstraction from the machine. Assembly is needed if you are into kernel hacking. What's wrong with learning hacker/cracker techniques? Don't be afraid to get dirty on this. It may be the best way to learn. Sorting an array for the Nth time gets boring. The drive that keeps you constantly learning stuff is what matters.
|
|
|
09-25-2005, 12:21 AM
|
#12
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep: 
|
If you're up for a real challenge, you can always try tackling Knuth:
http://www.bookpool.com/sm/0201485419
I totally agree with the advice about K&R and about Linux Device Drivers, 3rd Edition (do *not* spend time on the on-line 2nd edition: too much has changde since 2.6; the older reference could easily cause more confusion than help, until you're comfortable with kernel hacking).
Another great resource is "Linux Kernel Development, 2nd Edition", by Robert Love (a kernel engineer at Novell, and a significant contributor to GNOME and Linux itself):
http://www.bookpool.com/sm/0672327201
I quote Mr. Love's advice:
Quote:
I hope you have access to a Linux system and have the kernel source... If your desire is to write some code of your own, there is no substitute for the source, The source code is freely available; use it!
Oh, and above all else, have fun!
|
Last edited by paulsm4; 09-25-2005 at 12:23 AM.
|
|
|
09-25-2005, 12:38 AM
|
#13
|
Senior Member
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Original Poster
Rep:
|
Thank you all for the support. I'll look into the books etc. mentioned. We just moved to Jackson WY, and I've got alot of homework and stuff. but again, I appreciate all the help you've given, thanks! Other thoughts?
|
|
|
09-25-2005, 09:48 AM
|
#14
|
Member
Registered: May 2005
Posts: 378
Rep:
|
K&R is a great book to learn C from (in retrospect), but modern times have evolved to make you think that you can absorb the information on a page in a few minutes, and you're given *lots* of pages. K&R do things the other way - some pages may take a week to absorb fully! In the book they say something like "C is a not a big language and it is not well served by a big book". Great sentiment.
|
|
|
All times are GMT -5. The time now is 07:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|