LJ Archive


Two-Column Format

I love being able to read Linux Journal on my laptop, but I can't stand the two-column format that is used in the PDF version. I need to magnify the text due to poor eyesight, and the two-column format forces me to scroll down and then up constantly in order to read all the text on a page. A one-column format for the PDF would make for much smoother reading and navigation.

Please don't suggest I read the EPUB version. EPUB is a terrible format.

Scott Randby

It's tough to come up with a perfect format. The PDF version is designed to look like the traditional magazine version, and it looks best (I think) on a large format color tablet. If you look back, the older PDF versions were even more difficult to read on a computer screen, as the layout mirrored the paper version exactly.

I know you said you don't like the EPUB version, but I'm not sure whether you've tried reading the EPUB on a computer screen or only on eReaders. Using something like Readium (www.readium.org), you can change the font size and read the text in a single column. Apart from that, I'm not sure what else to suggest. I'm not sure what you dislike about the EPUB version, so I don't know how to help there if Readium doesn't work for you.—Shawn Powers

Subscription Question

I carry two tablets, one iOS and the other Android. If I subscribe on my iPad to Linux Journal, can I also read it on my Nexus 7?


If you subscribe directly through Linux Journal, we will send you monthly notices with download links for .epub, .pdf, .mobi and browser versions of the magazine. You also will get access through our Android or iOS apps.

We want our subscribers to be able to access the issues in any format that is available.

If you order through Google Play or iTunes, you will receive only those versions. Both have subscription options, but they are pretty much a closed environment.

We want you to be able to access the magazine any way you choose. If you subscribed through Google Play or iTunes, please send your transaction ID, e-mail address and full mailing address (we use that to encrypt the files) to info@linuxjournal.com. Once I have that, I can add you to our subscription database as well.

The best deal I have for Linux Journal directly is https://www.pubservice.com/Subnew2page.aspx?PC=LJ&PK=M48RENN.

I hope that helps. Sorry that it's more complicated than we would like, but once iTunes and Android closed their subscription environments, it became impossible to extract those orders and automatically add them to our database so readers can receive every format we have.—Mark Irgang, Publisher

Leap Years in Bash—or Anywhere

Regarding the detection of leap years in Dave Taylor's recent articles, there is a very simple way to determine whether a year is a leap year: if it's divisible by 4 and not 100. So a simple modulus function will suffice:

YEAR=$( date "+%Y" )
if [ $(( ${YEAR} % 4 )) -eq 0 ] && [ $(( ${YEAR} % 100 )) -ne 0 ]
echo 'Leap'
echo 'No Leap';

For the real geek, during a century, an integer binary number can be ANDed with 0x03, and the result is represented by the modulus of 4. If 0, the leap year.

Jacques Amar

Dave Taylor replies: There are lots of ways to calculate it, for sure. I like my latest: just type date -d 12/31/YEAR +%j, and see if it's 365 or 366.

Counting Days

Dave Taylor's Work the Shell column is one of my favorites in Linux Journal. However, while reading the August 2014 issue, I thought “don't re-invent the wheel.” In astronomy, getting the time interval (in days and fractions thereof) between any dates is a daily bread and butter issue. The solution is the Julian Date, a consecutive count of days from centuries ago into the future. It is a relatively simple algorithm, although not intuitive. See, for example, aa.usno.navy.mil/faq/docs/JD_Formula.php.

Yes, the algorithm is originally coded up in FORTRAN (what else was there in the science world some decades ago), and we still use it. A conversion to a shell script or any other programming language should be easy.

Norbert Zacharias

Dave Taylor responds: Holy cow, that's awesome stuff, Norbert! I haven't dabbled in FORTRAN since the job I had while I was an undergrad at UCSD back in the early 1980s. As it happens, I really enjoyed FORTRAN and enjoyed reading the code too.

How that formula works, however, is a bit puzzling to me, as there are some rather mysterious constants that don't seem like they should work. Still, it'd be easy enough to recode as a shell script—in fact, the FORTRAN code is almost workable as is with just a few tweaks. My only comment: the lack of error checking makes me get a bit anxious with such complicated formulae in the mix.

Thanks for pointing that out. Good stuff!

Norbert responds: Thanks for responding to my earlier e-mail. Those constants are determined to “make it work”, accounting for the fact that different months have a different number of days (even going over centuries) and so on. It is hard to understand the algorithm; however, the result is a fast, accurate algorithm. Testing was done on sample data, and after verification, no further tests are needed as part of the algorithm. Of course, one needs to be very careful when cutting/pasting lines in order not to screw it up.

PS. We still code in FORTRAN partly because we inherited a large body of code in our area of research and partly because the code is really easy to write and efficient—it pays off when dealing with billions of star positions. It even still can be done on a modern laptop!


I am working for a telecom vendor on OSS products. Lately, I've been working on NFV-related meetings and workgroups. There is a lot going with NFV all around telco operators, and almost all will run on Linux/KVM/OpenStack. There is and will be a lot of work done and money spent on this issue. Operators are pushing vendors for open source. There is OpenDaylight as well for SDN. The vendors are big ones, such as Ericsson, Huawei, ALU, Oracle, Cisco, Nokia, Microsoft and HP. Some other vendors are AT&T, Orange and TIM. Those are the biggest players around.

You are the Linux magazine, yet I see almost nothing on these issues. This disappoints me. Personally, I would like to see not only NASA's open-source tools, but also such big enterprise issues on open source and Linux. Linux is a serious thing that runs the Internet and many serious applications on the enterprise level. I would like to see these improvements in your magazine.

Umit Kaan Sonal

We look for content that interests our users, along with new technology we think deserves to be noted. Getting feedback like yours is the best way for us to know what readers want, so we'll keep our eyes open. Thanks!—Shawn Powers

Photo of the Month

I'm writing to share this magnificent Linux laptop, which I believe is one of the smallest around. It's a Zipit Z2, and I'm a big fan of it. Thanks to Johannes from Wejp.k.vu, I'm able to host my Web site on this beauty.


LJ Archive