[CS-FSLUG] Developing on Unix

Brian Derr bderr at myrealbox.com
Fri Jul 23 07:20:34 CDT 2004


On Thu, Jul 22, 2004 at 02:45:46PM -0600, N. Thompson wrote:
> I've been hunting around for some good documentation for developing on Unix, 
> I'm ready to close the doors in Windows which has been nothing but 
> inconsistent since I started writing Java programs on it. Another reason I've 
> decided to drop development on Windows is that it severely complicates things 
> when I have to make sure my programs work on two entirely different operating 
> systems and when I have to make sure that I provide packages for the two 
> different platforms.

Yes, developing on more than one platform can be a pain, especially if
said platform in Windows.

> I've spent the last few days trying to learn how to make deb and rpm packages, 
> all I found out in that time is that its a lot of work to make packages with 
> both, rather then have to bother with umpteen different types of package 
> managers I decided it would be better off if I simply wrote my own installers 
> using a simple scripting language in Linux and the most logical one to use 
> seems to be TCL/TK since its simple, it would be on most if not all 
> distributions and it should always come with the TK toolkit (its pretty much 
> the Visual Basic of Linux).

I would learn `make' and how to write Makefiles over writing a script in
TCL/Tk.  Not everyone installs TCL or Tk for that matter thus causing
more software to be installed, needlessly.  There are volumes of
information both on the internet and in printed form about GNU Make.
Check out O'Reilly's book on Make.

> There is however a problem, I've no idea how to make makefiles, I've always 
> depended on QMake to generate them for me, I've never learned how to program 
> using the KDE API's or KDevelop, I wouldn't be able to switch to Glade and 
> GTK if I wanted to because I know too little about makefiles and how the 
> compilers work and are used in Linux. I also have almost no knowledge of how 
> to use most of the command line tools, I know little of bash scripting and my 
> programming knowlege doesn't extend outside of the basics of ANSI C++ and the 
> Qt toolkit.

Ahh, the insanity of the WYSIWYG editors.  You don't really learn.  You
learn how to use that particular program but not all the underlying
fundamentals.  I would _strongly_ suggest backing away from GUI
programming for a bit and learning the basics in the console.  Learn how
to write a Makefile to compile a several file program.  Once you have
that down, try throwing in a library, like ncurses.  Ncurses is a very
easly library to learn and can make some nice looking interfaces for the
console.  (For good reading on ncurses read the HOWTO on www.tldp.org)

> What I want to do is learn TCL/TK scripting, some bash scripting, how to use 
> autoconf and automake, how to use the command line tools in Linux and how to 
> make programs or scripts that can have binary data embedded in and then 
> extracted from themselves (like how Sun distributes its Java rpm's). I'm 
> looking for some resources from which to learn these things, what I had in 
> mind was a book on Unix programming since most of these topics should be 
> covered but I do not know how similar Linux and Unix are so I was hoping I 
> could ask the list for help.

Bash scripting is also covered intensely on www.tldp.org (look for Adv.
Bash Scripting HOWTO).  For a book on autoconf/automake check out "The
Goat Book" http://sources.redhat.com/autobook/ .  I am actually going to
read through this myself because I need to learn autoconf/automake.

I think you are trying to bite off a lot more than you can chew.  Or
maybe I'm just underestimating your programming skills.  But stepping
into writing your own installer that will decompress, etc will be a lot
of needless work.  Especially since there are such great tools out there
that have done all the work already (autoconf/automake).

All the UNIX books that I've ready can almost word for word be
transfered over to the Linux world.  Some of the examples may have
different paths, etc (such as /usr/ucb, is that BSD?)  I haven't read
any basic UNIX programming books but the few general topic UNIX books
have been great eye openers to all the wonderful CLI tools there are at
your disposal.  If it can be done in a GUI, it can be done better on the
console.

> Would a book on Unix programming be just as good for Linux?

Answered above.

> Are there any books you would recommend?

Not necessarily a UNIX book, but grab "Thinking in C++" by Bruce Eckel.
It is free online and you can download both volume one and two for
viewing offline.

http://www.mindview.net/Books/TICPP/ThinkinginCPP2e.html

The books listed below I have not read personally but they are from
O'Reilly so they are good as gold.

http://www.oreilly.com/catalog/prognu/index.html  O'Reilly "Programming
with GNU Software"
http://www.oreilly.com/catalog/make2/  O'Reilly "Managing Projects with
make"

Brian

-- 
The just man walketh in his integrity:
his children are blessed after him.  -- Proverbs 20:7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://ofb.biz/pipermail/christiansource_ofb.biz/attachments/20040723/8a2d1abc/attachment.sig>


More information about the Christiansource mailing list