LJ Archive

UpFront

diff -u: What's New in Kernel Development

Zack Brown

Issue #264, April 2016

Sometimes if you want to stop maintaining a piece of software but no one will take it over, all you have to do is simply announce that you're stepping down, and everyone will jump for it.

That was Neil Brown's experience with software RAID. After 15 years as maintainer, he wanted out, but he couldn't get anyone to commit to take it over. So, he announced his departure and offered up a description of what he saw for software RAID going forward: a small team of maintainers who would gather and review patches, resolve bugs and feed patches upstream.

Lo and behold, lots of people expressed interest in taking over maintainership or at least in participating in a team. After sifting through many volunteers, he settled on Jes Sorensen for mdadm and Shaohua Li for the kernel/md side of things. Neil documented some of the basics for Jes and Shaohua to consider, saying:

The first question is where do you send your patches to get the appropriate review and upstream acceptance. Alasdair or Mike (DM), Jens (Block), Andrew Morton (anything) and Linus (everything) are all defensible choices for upstreaming (I've submitted through Andrew in the past, but through Linus exclusively once I figured out git). That is really something you and they would need to negotiate though. [...] I plan to submit a pull request to Linus for the 4.5 merge window and then stop queuing patches.

And Jes also announced a new git tree for mdadm, at git.kernel.org/pub/scm/utils/mdadm/mdadm.git.

Kernel documentation has traditionally been written in DocBook, an XML-based system that's been falling behind the increasingly popular forms of readable markup, like Markdown, AsciiDoc and others. Recently, Jonathan Corbet and Jani Nikula did some overlapping work to convert the kernel to use AsciiDoc for all documentation.

The goal was not just to adopt the new hotness, but also to reduce some of the many tool dependencies that were needed for DocBook processing and speed up overall doc production. Along the way, however, any new system would have to be at least as good as DocBook and support large files, cross references, a big pile of output formats and so on.

There turned out to be significant problems doing the whole migration. One of the most viable options, at least temporarily, turned out to be migrating the source files to AsciiDoc, but having the makefiles process that into DocBook and from there into whatever output was needed. This would not reduce the number of tool dependencies, but it would at least produce reliable output, while accepting the new more preferable input.

Ultimately, DocBook would be eliminated, but for now it seems there will be this intermediate step. It's also possible that AsciiDoc would need to be modified upstream, before it would be able to handle the kernel docs without DocBook fully.

Android Candy: Seeing Red and Getting Sleep

Shawn Powers

Issue #264, April 2016

I'm always leery when I hear, “Recent studies show...”. But the idea that looking at electronic device screens before bed can cause sleep issues seems to be fairly accepted. The fascinating part for me is that it isn't really the screen itself, but the blue part of the color spectrum that contributes to the sleeplessness. In a purely anecdotal experiment, I find that it's much more difficult for me to fall asleep in the kitchen (cool-colored lighting, closer to blue in the spectrum) than it is to fall asleep on the living-room couch (warmer, less blue lights). Granted, part of that might be general comfort on the couch and more sharp objects in the kitchen, but in general, warmer lighting tends to be more relaxing.

Based on the idea that less blue and more red will make for better sleeping, the “Twilight” app for Android shifts the color of your screen as bedtime approaches. It's free for basic functionality, but for a small price, you can get a timed, gradual transition on your Android devices.

I have no idea whether it helps me sleep better, but if nothing else, it reminds me that it's getting late as my ebook becomes redder and redder as I read. If you struggle with sleeplessness especially when you first go to bed, give Twilight a try. It's free in the Google Play Store, and if it works, the gradual shift option with the paid version is well worth the cost. And as a bonus, the red screen won't hinder your night vision during those late evenings of summer stargazing!

Back to Backups

Shawn Powers

Issue #264, April 2016

In my Open-Source Classroom column last month [“Back It Up, Buster”, March 2016], I talked about backups and got some really fascinating feedback. In fact, at the time of this writing, it's still pretty early in the month, so I expect to get even more ideas and suggestions for backup options. Here's a few of the ideas worth checking into:

  • Carlos Baptista wrote in as someone who also has struggled with lost data. His current solution is to use rsnapshot (rsnapshot.org) on a pair of 4TB drives. Every week he swaps the drives, taking one to his parent's house. This solution gives him low-tech off-site storage, a maximum of one week of lost data in the event of a total failure, plus an excuse to visit his parents on a regular basis. Awesome job!

  • Harald Nipen takes the interesting step of making sure the duplication process for his backups is not automated. That may seem like a silly thing to do, but as someone who accidentally reversed the source and destination on his rsync backup script before, I can assure you there is some peace of mind that comes from manually seeing your backup take place. Harald does, of course, automate his regular backups, but the duplication process for off-site storage is a manual process using the unison program.

  • Nicola Larosa pointed me to an interesting project that uses “content-defined chunking” to back up data efficiently. It's the fastest backup system he's ever used and worth checking out if you have large amounts of data to secure: restic.github.io/blog/2015-09-12/restic-foundation1-cdc.

  • Finally (for now), Johann Schoonees wrote in about rdiff-backup. It's a program I'd heard of but never really looked into using. That's unfortunate though, because it really is a neat concept. If you've ever used BackupPC to keep rsync snapshots hard-linked to save space, it's a little like that. The program is an all-in-one solution, however, that keeps a current snapshot of a filesystem while also keeping diff files of previous changes. That allows older versions of files to be recovered without the complexity of setting up the entire BackupPC system.

The most encouraging part about getting followup e-mail messages from readers about their backup solutions is to hear that lots of folks actually have backup solutions! Regardless of the complexity of your backup process or the level of automation you deem appropriate for your data, apart from creating the memories in the first place, few things are as important as backing them up!

Non-Linux FOSS: Caffeine!

Shawn Powers

Issue #264, April 2016

Okay, this program is free (beer), but not Free (speech). I wouldn't normally include a freeware application in the “Non-Linux FOSS” section, because quite frankly, it isn't FOSS. But, I decided to break the rules a bit here because I realized how often I use a freeware program when I'm on OS X that I couldn't imagine doing without.

If you use OS X for presentations or demonstrations, you've probably had your screen shut off while you explained a slide or dialog box. Then the screen probably locked, and you had to hurry over to the keyboard so you could unlock, and so on and so on. Caffeine is a simple app that does nothing more than keep your Macintosh (or Hackintosh) computer awake. It runs as a cute little icon in your menu bar, and it disables screen savers and sleep mode, even if you have aggressive power-saving settings enabled.

The danger is that you could leave Caffeine running accidentally and completely drain your battery. I've had that happen only one time, however, and I learned quickly to take my computer off Caffeine when I was done presenting. Even with that risk, I find it's worth it to no longer need to wiggle the mouse pointer every minute to make sure my laptop doesn't fall asleep!

Caffeine is available for free in the App Store, or you can get it from its Web site: lightheadsw.com/caffeine.

My +1 Sword of Productivity

Shawn Powers

Issue #264, April 2016

If I'm being completely honest, I think the game-ification of a daily task list is a dumb idea. I also love it, and can't stress enough how well it works. Habitica might just be the way I get things done from now on.

I'm a perfectionist. If you've ever seen photos of my office (or hairdo), you might not think that's the case, but I assure you, it's true. Unfortunately, one of the big side effects of being a perfectionist is procrastination. Not laziness, but delaying or redoing tasks until you can get them just right. It can be crippling for productivity, and ironically, the rushed product that results often is sub-par to what would have been created in the first place.

Habitica turns the struggles with perfectionism back on the perfectionist. Although I honestly don't care very much about the swords and shields I earn by completing tasks, for some reason, the idea of losing HP for skipping a task is difficult for me to accept. I find myself doing extra “good habits” throughout the day just so my character is as good as he can be. Honestly, I'm surprised Habitica works for me. I still think it's dumb. I also can't stop striving for new experience levels and early task completions.

There's a great Web version of the free program at habitica.com, plus you can get mobile versions for iOS or Android via their respective app stores. In fact, Habitica is so unique and surprisingly effective, it's easily my pick for Editors' Choice this month. If you think it sounds like a dumb idea, I completely agree. I also urge you to try it, because I find it incredibly awesome!

Night Sky Tools on Android

Joey Bernard

Issue #264, April 2016

In previous articles, I've looked at several different astronomy programs that you can run on your Linux machines. Those are great when you are doing work indoors, but most laptops and Netbooks are still a bit of a pain to carry around with you if you are going out into the field. In those cases, having something more portable is definitely nice. And, since I'm beginning to look at Android apps in this column, this is a perfect opportunity. Loads of astronomy applications are available within the Android environment that are well worth a look. In this article in particular, I'm exploring Night Sky Tools. The application is available in the Google Play store, and it should run on most versions of Android.

Once you have it installed, open it to see a very complete menu of all of the functionality available within Night Sky Tools. Many of the functions are updated over the Internet automatically, so you are sure to have the latest information for whatever objects you are trying to observe in the night sky.

Figure 1. The opening screen displays a menu of the various categories of functions available.

The first category is general astronomical information. You can see lists of upcoming astronomical events, as well as what is up right now and what will be coming up tonight. There also are entries for a compass and a page of the various astronomical times that you may need. The astronomical time page gives the moonrise/moonset and sunrise/sunset times. There even is a page that lets you calculate the visual limiting magnitude based on the actual environmental conditions like temperature and humidity. The last page in this section is the sky map. The information provided in the sky map is rather complete. You can see the stars and constellations, along with the formal constellation boundaries. It even displays artwork for each of the constellations, showing you what they are supposed to look like.

Figure 2. The sky map provides a display of what the sky looks like at the current time.

The next section has information on the Earth and Moon. (Note: when moving between sections, be aware that the other sections do not automatically close.) You also can pull up a daylight map, showing what parts of the Earth are in daylight and which are in night.

Figure 3. The daylight map shows you where on Earth it is day and night.

There are pages that show when the solar and lunar eclipse happen, along with dates for the equinoxes and solstices. The meteor page gives a listing of all of the known meteor showers, with the start, peak and end dates. It also, helpfully, gives the percentage of the moon phase so that you can tell right away whether the night will be dark enough to have a good observing period. The moon map, by default, shows a full listing of sites of interest. Tapping on one of these points brings up a text label with the name of the site.

Figure 4. The moon map shows points of interest with pins on the map.

The solar system category extends available information farther out into space. The Conjunction/Opposition page provides a list of all times this year when planets either form a conjunction or an opposition. There are two pages, one for comets and one for near-Earth asteroids, where you can search for detailed information on specific comets or asteroids. You also can click the update button to pull a fresh listing from the Internet of what objects are known.

There are four large moons orbiting Jupiter that are visible in a large pair of binoculars. Clicking on the Jupiter's Moons page brings up a map of their relative locations around Jupiter. A related page gives you the positions of the largest of Saturn's moons too. Viewing them will require at least a small telescope though.

Figure 5. You can get a map of the locations of the four main Jovian moons.

Figure 6. You can get a map of the largest of Saturn's moons as well.

The Planetary Orbits page takes things even farther out to see the relative positions of all of the planets within the solar system. As with the Moon map described previously, this section includes a Mars map, also with pins at locations of interest.

Figure 7. The relative locations of all of the planets are available on the Planetary Orbits page.

Figure 8. There is a Mars map with locations of interest.

The stars category takes you even farther out into space. The first selection provides a list of the 300 brightest stars in the sky. The list includes the name, magnitude and location for each of these stars. The entire sky is divided up into constellations. The constellations page pulls up detailed information for the selected constellation.

Figure 9. You can get detailed information on constellations, including a map.

There also are pages with theoretical information about astronomy. For example, you can pull up a Hertzsprung-Russell Diagram showing how stars are categorized. The stellar classification page describes the ten classes of stars with their temperature, mass, radius and luminosity characteristics. The last two pages in this section let you search for information on variable stars and visual binary stars.

Figure 10. The Hertzsprung-Russell diagram shows how stars are categorized.

The deep sky section contains pages for several of the deep sky catalogs. The Caldwell and Messier catalogs are displayed as a list of all of the objects within the catalog. You can click on an object of interest and pull up detailed information for it.

Figure 11. You can get detailed information on Messier catalog objects.

There also are sections where you can do searches for exoplanets and NGC/IC catalog objects. The remainder of the sections provide functions to do common astronomy calculations. You can handle coordinate calculations, astrophotography and telescope calculations.

The observation log helps you track your own information. There is a page to manage all of your astronomical equipment, like telescopes, eyepieces, filters and cameras. You also can log all of your observations, recording all of the details of interest. You can export your log, including whatever sections you need, so that you can incorporate it into some other database of your research.

Now you have no excuse for not going out and exploring the skies above you. In my next few articles, I plan to look at several other scientific applications that you can use on your Android devices for doing portable science.

They Said It

Giving is a necessity sometimes...more urgent, indeed, than having.

—Margaret Lee Runbeck

Life is full of obstacle illusions.

—Grant Frazier

The future, according to some scientists, will be exactly like the past, only far more expensive.

—John Sladek

I think the world is run by “C” students.

—Al McGuire

Real freedom lies in wildness, not in civilization.

—Charles Lindbergh

LJ Archive