New Projects - Fresh from the Labs
In a world of ever-expanding code, it's easy to become sloppy, with lines of redundant code or inelegant design coming into play. Thankfully, deheader steps up to the plate—a simple tool that can save coders a great deal of time.
According to the Web site: “deheader analyzes C and C++ files to determine which header inclusions can be removed while still allowing them to compile. This may result in substantial improvements in compilation time, especially on large C++ projects; it also sometimes exposes dependencies and cohesions of which developers were unaware.”
Installation and Usage
As far as packages go, at the time of this writing, the only thing available was a source tarball. But, fear not. No compiling is necessary, and because there's no real mention of library requirements, I'm guessing most distros will run it off the bat, assuming they have Python.
Download the latest tarball from the Web site, extract it, and open a terminal in the new folder. Then, it's simply a case of running:
$ ./deheader path-of-files
If the given path is a directory, deheader scans all the files within. Give it some time to process, and eventually a list of all the unnecessary headers appears on-screen. For instance, I chose to analyze the now ten-year-old MPlayer code, a project that would unavoidably have a lot of legacy code and loose ends simply from being around for such a long time.
If you're ready to take things further, add a switch of -r, and the unnecessary headers are removed from the files. If you want to do some test compiling, use the -m switch. As an example, here's a command I ran against the MPlayer code:
$ ./deheader -r ~/src/mplayer-export-2010-12-27/
Those are the basics; refer to the documentation for more information.
As you can see, deheader is a very simple-to-use program with an elegant design. This ideal of coding elegance is manifest in deheader's results. It should save a great deal of compilation time and highlight coding foibles that likely would have remained unnoticed. Although it's still sitting around in tarball source form, hopefully it will make its way into distro repositories soon.
Projects at a Glance
Fans of the hard-core gaming company, Razer, no doubt will want to look up this project. According to the Web site: “This is the next-generation Razer device configuration tool bringing the Razer gaming experience to the free, Open Source world. This utility is supposed to replace the old deathaddercfg utility. The tool architecture is based on razerd, which is a background dæmon doing all of the low-level privileged hardware accesses. The user interface tools are razercfg, a command-line tool; and qrazercfg, a Qt4-based graphical device configuration tool.”
And, according to its Freshmeat entry: “Supported devices are the Razer DeathAdder mouse, the Razer Krait mouse, the Razer Lachesis mouse, the Razer Copperhead mouse and the Razer Naga mouse.”
I've always been put off by Clam antivirus's command-line interface (I just don't get it), so a GUI front end would be brilliant. Thankfully, it seems numerous front ends exist, and hopefully, I can cover one or two in the coming months. Details on this project, however, are scarce, although I'd like to try it anyway. According to its Freshmeat entry: “GAdmin-Antivirus is a fast-and-easy to use GTK+ front end for Clam antivirus. Multiple scan sets can be scheduled to run at specific times via cron. Each of these scan sets can contain multiple directories to be scanned.”
Brewing something fresh, innovative or mind-bending? Send e-mail to email@example.com.
John Knight is a 26-year-old, drumming- and climbing-obsessed maniac from the world's most isolated city—Perth, Western Australia. He can usually be found either buried in an Audacity screen or thrashing a kick-drum beyond recognition.
John Knight is the New Projects columnist for Linux Journal.
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
- New Products
- Users, Permissions and Multitenant Sites
- Flexible Access Control with Squid Proxy
- Security in Three Ds: Detect, Decide and Deny
- High-Availability Storage with HA-LVM
- Tighten Up SSH
- DevOps: Everything You Need to Know
- Solving ODEs on Linux
- Non-Linux FOSS: MenuMeters
- diff -u: What's New in Kernel Development