DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st December 2008
Sunnz's Avatar
Sunnz Sunnz is offline
Real Name: I don't have real time
Just a computer user...
 
Join Date: May 2008
Location: See Google Maps
Posts: 101
Thanked 1 Time in 1 Post
Default How to learn to program under BSD?

I mean like, writing code for drivers, kernel, pf, something closely related to the BSD development.

It is pretty much a given that one must know C, but what's the next step?

I kind of picked up C at school and writing my little tools for my own use... but the whole Unix system calls and the kernel stuff are little mystery to me...

I am thinking of getting a book like Advanced Programming in The Unix Environment, download the -current source of a BSD OS and see if I can change things and make it run on a spare box.

What do you think? Are there any recommendation?
__________________
She sells C shells by the seashore.
Reply With Quote
  #2   (View Single Post)  
Old 1st December 2008
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Thanked 6 Times in 6 Posts
Default

Quote:
Originally Posted by Sunnz View Post
I am thinking of getting a book like Advanced Programming in The Unix Environment, download the -current source of a BSD OS and see if I can change things and make it run on a spare box.
Of course the best way one could learn programming is to start programming

Yes, I think that getting a book for Unix programming is a great start to develop your skills - so go ahead and take one.

Meanwhile, here are some links for tutorials about Unix programming that you may give a look:
Good books about C that are worth reading:
  • The C Programming Language - by K&R
  • Advanced Programming in the UNIX Environment - by Richard Stevens (the one you mentioned in your post)
  • TCP/IP Illustrated Volume 2 - The Implementation - by Richard Stevens
  • TCP/IP Illustrated Vol 1 - by Richard Stevens
  • UNIX Network Programming Vol 1 - by Richard Stevens
  • UNIX Network Programming Vol 2 - by Richard Stevens
  • Teach Yourself C - by Herbert Schildt (a great book for C beginners)

Of course, there are a lot more books about C, UNIX and programming, but to be honest these are the books that I found most useful to me

Well, I wish you happy coding
__________________
"I never think of the future. It comes soon enough." - A.E

Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org

Last edited by DNAeon; 1st December 2008 at 10:02 AM.
Reply With Quote
  #3   (View Single Post)  
Old 1st December 2008
Sunnz's Avatar
Sunnz Sunnz is offline
Real Name: I don't have real time
Just a computer user...
 
Join Date: May 2008
Location: See Google Maps
Posts: 101
Thanked 1 Time in 1 Post
Default

Thanks for the recommendations, I actually brought K&R for school, used it for years.

And yea I do want to start writing code, it is just difficult to know where to start... well technically I have written very simple tools for myself, but as far as making code the OS goes, I haven't got anywhere yet.
__________________
She sells C shells by the seashore.
Reply With Quote
  #4   (View Single Post)  
Old 1st December 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

A good place to start with FreeBSD, is reading /usr/src.

The source tree is fairly well organized, you'll find most everything where you expect in the userland; kernel code resides in /usr/src/sys. I've personally found starting with the booting procedures and working up from there to a running system was fun, in regards to the kernel. Examining the code in /usr/src/usr.bin/ is actually what started me writing in C.


You might also like The Art of Unix Programming, by Eric Steven Raymond; for something more abstract, but you will want something like Richard Stevens APUE and the systems manual pages for actual code crunching though. (Sections 2,3, 4, and 9 especially).
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #5   (View Single Post)  
Old 13th December 2008
taylor_venable taylor_venable is offline
Real Name: Taylor Venable
Security Programmer
 
Join Date: Jun 2008
Location: Indiana, USA
Posts: 6
Thanked 1 Time in 1 Post
Default

For FreeBSD-specific kernel programming, check out these books (both are excellent):

Design and Implementation of the FreeBSD Operating System

Designing BSD Rootkits: An Introduction to Kernel Hacking
__________________
How many shells could Shell sort sort if Shell sort could sort shells?
Reply With Quote
  #6   (View Single Post)  
Old 24th December 2008
Oliver_H's Avatar
Oliver_H Oliver_H is offline
Real Name: Oliver Herold
UNIX lover
 
Join Date: May 2008
Location: Germany
Posts: 429
Thanked 26 Times in 22 Posts
Default

>How to learn to program under BSD?

http://www.freebsd.org/doc/en_US.ISO...ook/index.html

You could start e.g. with this document, read the others: http://www.freebsd.org/docs/books.html and you should of course follow current.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
learn assembly ephemera Book reviews 5 26th December 2012 06:29 PM
A PDP-11 program card TerryP Programming 0 10th April 2009 05:54 AM
Would BSD be right to learn networking? php111 Off-Topic 17 25th September 2008 07:02 PM
How did you learn to program? TerryP Off-Topic 25 6th September 2008 04:00 PM
Learn which services are listening on your box anomie Guides 5 14th May 2008 09:59 AM


All times are GMT. The time now is 10:07 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick