Focus: Program Development
Read more. I know it sounds like something you might see on a bookmobile poster, but seriously, read more. There are so many tools for writing stuff, and so many places to distribute what we write, that the appeal of writing is getting dangerous. Meanwhile, reading isn't getting any easier.
The first high-level advice every programmer gets is “Don't write what you can reuse.” Good, but you need to read in order to learn what to reuse. Effective code reuse isn't just a matter of “I need SSL, so I'll do a search on +ssl +library.” Congratulations, you found OpenSSL, but how did you know SSL would help you? Because, not having lived in a cave for the last ten years, you read about it somewhere. What else—maybe something not as famous as SSL—could you use? If you don't read, you'll never learn and just end up writing it yourself.
Brian Behlendorf once wrote, “The world needs less software.” That doesn't mean we shouldn't write software if we have to, just that we shouldn't write it for the wrong reasons. At first it's more fun to write your own thing than to grovel through and understand somebody else's, but someday that nifty new thing will be the stuff you wrote a long time ago and are sick of maintaining. Learn to reuse and you're learning to make other people do work for you.
A contributor to one project's mailing list asked the question, “Should I get in the credits list for a patch that only removes code?” It was a GUI project, and the patch made a dialog box use some default layout settings instead of a tightly-controlled but broken layout. Of course you should get in the credits list for removing code. You made the program better and smaller at the same time. And you provided an example for others. Removing code can take more understanding and skill than adding it, and people who can do it successfully should be at the top of the credits list.
Remember XCoffee? It was a great idea—a special-purpose server application that just serves up coffee pictures over the Net and a special-purpose client application that just displayed coffee pictures. Pretty advanced for its time, but just coffee pictures? And just one picture per instance of the client? The original XCoffee got replaced with a web site—no special client software, it works on clients without X, and all the hard-to-get-right network stuff is handled by the web server. If you knew of a general solution that let you slaughter your offspring, would you do it?
Speaking of reading, what's in this issue? Until something better comes along, if you want to do source code control, or browse many projects' development code that hasn't been officially released, you need to know CVS. Ralph Krause gives you the basics on page PAGE.
Memory management errors cause everything from the first segmentation fault in your first C program to security flaws that destroy entire companies. Improve your memory-fu by reading up on helpful free tools, some of which are built into the GNU C library. Petr Sorfa explains memory management and memory troubleshooting on page PAGE.
If you're a crusty old UNIX bastard who's been with us since issue one, you're probably getting set to scoff when we mention anything having to do with integrated development environments. So you go scoff over there while I tell these nice people about KDevelop and Glade.
On page PAGE Mitch Chapman introduces Glade, a fun tool that lets you break out GUI design from coding. Point and click to design the GTK interface, and write the code separately. Best of all, he's using Python for the examples, which fits nicely into the exciting new “use an object-oriented scripting language for the stuff that doesn't have to be fast” coding philosophy.
Not to exclude the KDE side of the desktop wars, Petr Sorfa explains KDevelop on page PAGE in the Product Review section. Naturally, as a KDE application, it's focused on C++ and Qt, and for a C++ programmer, to try the Qt GUI toolkit is to love it. Qt has an aesthetic cleanliness about it that C++ people seem to find difficult to express in words, but that's okay. KDevelop integrates with CVS—very neato—and with Qt Designer, which as you might guess is a user-interface design tool for Qt (look for an article on Qt in our next issue).
Have fun with these development tools, but don't forget to take a break from coding and read something.
—Don Marti, Technical Editor
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal