• Post Reply Bookmark Topic Watch Topic
  • New Topic

Suggestions for beginner programs.  RSS feed

 
Ian M Graham
Greenhorn
Posts: 3
Java Mac Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!

I'm taking an intro to programming class at my local college, but I'd like to create more than just the homework assignments, although I can't think of anything "interesting."
I've done some googling and I couldn't find anything beyond the really simple 'if else' loops to compare boolean values. Are there any decent resources out there for a bit above beginning programmers?

I can do a lot of basic things, take input with a scanner, I know while loops, I can create a classes and constructors for objects. The last lesson I had was an introduction to extending a parent class, no GUI yet, just CLI.

Ideally I'd like to someday be able to program operating system components, I (think) know Java isn't really used to program operating systems, but is there anything I could start doing right now that would set me on this path?

Cheers!
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch and sorry that nobody has replied before.

Agree: if you want to program operating systems you would be using C or C++, not usually Java. You could try looking at some of the open source work; for example there are lots of people working at updating Linux. You can log on and see if you can understand what is going on.
Lots of people ask similar questions to yours, and here are a few recent posts which I hope will help you: 1 2 3.
 
Jim Venolia
Ranch Hand
Posts: 312
2
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When learning a new language I usually write Life (google Conway life). It's conceptually simple, but you learn about arrays, GUIs, and other fun stuff.

OS code is usually a combination of C, C++, and assembly. A good intro to the concepts is Tanenbaum's book.

If you want to write a Linux device driver implement the following. Create a device in /dev. As you write to this device the data is stuffed into a FIFO queue. Reading the device returns the data previously written. you should be able to intermix reads and writes. Reading an empty queue returns EOF.

Now add an ioctl() that does stuff like clear the FIFO, reverse the data, etc.

Finally, support multiple minor numbers, each has it's own FIFO.

The beauty of this is you'll quickly get the basics of writing a device driver without worrying about learning hardware.

Caveat: I haven't written a Linux device driver since '02 or '03, it may not use /dev or major/minor numbers anymore.
 
Ian M Graham
Greenhorn
Posts: 3
Java Mac Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone! Sorry it took so long to reply, but I will look into these. I'm sure I'll be posting more once I've started.
 
Robert D. Smith
Ranch Hand
Posts: 221
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For what it's worth, I will second the recommendation for Tanenbaum's book. I can't be sure when I first picked it up -- sometime in the early 90s, maybe late 80s. It develops a small *nix system -- Minix. Linus Torvalds based his Linux on Tanenbaums work.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!