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 firstname.lastname@example.org.
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.
- Readers' Choice Awards 2013
- Advanced Hard Drive Caching Techniques
- Linux Kernel News - November 2013
- December 2013 Issue of Linux Journal: Readers' Choice
- Mars Needs Women
- Raspberry Pi: the Perfect Home Server
- Sublime Text: One Editor to Rule Them All?
- RSS Feeds
- Linux Systems Administrator
- Web Administration Scripts
- animal pajamas
3 hours 33 min ago
- thanks for you post.
3 hours 40 min ago
- thanks for share, great
20 hours 54 min ago
- There are factors which are
1 day 1 hour ago
- Gnome 3 ?
1 day 2 hours ago
- Reply to comment | Linux Journal
1 day 6 hours ago
- "Redis RethinkDB 4.5%" on Best NoSQL Databases
1 day 16 hours ago
- on the ground
1 day 23 hours ago
- I was able to read the whole
2 days 43 min ago
- since i have read the title i
2 days 4 hours ago