LJ Archive

Letters

I'll Be in My Hole

As a regular reader (and now subscriber) to LJ, I think Shawn Powers' Current_issue.tar.gz is always a great setup to the issue. His column in the August 2011 issue is a particular case in point. I read the opening paragraph to my wife. Her reply to Shawn's “basement-dwellers” comment was “or upstairs” (which happens to be the home of my toys).

I would like to thank you and all the contributors to your magazine. I came to Linux as an antique of 57 (now 63)—a retired “mainframe” developer unable to afford the constant upgrades to Windows development tools. Your magazine has helped me immeasurably get over the Linux learning curve as well as the fear factor. Though I don't consider myself agile in the environment, Windows is nowhere to be seen on my desktop, and tools like the Qt SDK have permitted me to continue to explore C++ and learn about genetic algorithms and programming.

One question: with so many more-experienced and knowledgeable Linux/open-source developers, how does someone with my limited experience contribute back to the community? I doubt there is much I can offer. Thank you again for Linux Journal.


Pete R.

Thanks for your kind words! As hard as it might be to believe, I try to tone down my silliness in Current_Issue.tar.gz so as not to confuse non-native English speakers. In real life, I'm much weirder. (I'm sure the rest of the Linux Journal staff would agree!)

When it comes to contributing, the standard answer is “documentation”. That said, I've never once been able to contribute documentation to a project, so perhaps the standard answer needs to be reconsidered. I think just using Linux, and enjoying it, and letting other people see you enjoy it will really do a lot for the community. And, if you're near a town with a Linux Users Group, try to attend meetings. They might have a need only you can fill!—Shawn

What Day Is It?

I know Dave Taylor must be really tired of everybody telling him how to better parse the output of cal to get the day of the week (see Dave Taylor's Work the Shell column in the June–September 2011 issues of LJ), but I figured I'd go a slightly different route. Many years ago, I was searching for an algorithm that would allow me to calculate the correct day of the week for a given date, and I found a great one. I no longer can remember where I found it, or who wrote it originally, but I have converted it into pretty much every language I use, and this last time was into a bash script:

#!/bin/bash

declare -a DAYS=(0 3 2 5 0 3 5 1 4 6 2 4)
declare -a DAYS_IN_WEEK=('Sunday' 'Monday' 'Tuesday' 
 ↪'Wednesday' 'Thursday' 'Friday' 'Saturday')

get_dow() {
       # $1 is month, $2 is day, $3 is year
       # Strip off leading zeros from month and day:
       MONTH=${1#0}
       DAY=${2#0}
       YEAR=$3

       if [ $MONTH -lt 3 ]; then
               YEAR=$((YEAR-1))
       fi

       MONTH=$((MONTH-1))
       DOW=$(echo "($YEAR + ($YEAR/4) - ($YEAR/100) 
       ↪+ ($YEAR/400) + ${DAYS[$MONTH]} + $DAY) % 7" | bc)
}

if [ "$1" == "" ]; then
       echo "dow.sh - Prints the day of the week, 
       ↪for a given date"
       echo "  Where the date is in the format of mm/dd/yyyy 
       ↪or mm-dd-yyyy"
       echo "usage:"
       echo "  dow.sh 01/01/1970"
       echo "or"
       echo "  dow.sh 01-01-1970"
       exit
fi

# Replace slashes or dashes on the input
# with spaces:
INTEXT=$(echo $1 | sed -e 's/[\/-]/ /g')
# Use the 'set' command to transfer to $1, $2, $3
set $INTEXT
# Call get_dow function with date to check:
get_dow "$1" "$2" "$3"
# Print day of week date falls on:
echo "${DAYS_IN_WEEK[$DOW]}"

Sorry, I don't have a ton of error-detection code in here, but I didn't want to over-complicate it.

By the way, I am an avid reader of Dave's Work the Shell column, along with the rest of Linux Journal!


Howard Pepper

Dave Taylor replies: Thanks for this, Howard. A few people had told me that there is a formula for calculating the day of the week for any given date in the Julian calendar, but try as I might, I couldn't find one that seemed to be reliable with leap years and such. Now we have one, and it's a terrific shell script too.

More on Calculating Day of the Week

This is regarding Dave Taylor's column in the August 2011 issue. Despite Dave's remark that his solution may be more complicated than necessary and that he'll stick to it, I'd like to say why not use the %w option of the date command? The following command does the job just fine:


date +%w -d <datespec>




Mayuresh Warunjikar

Dave Taylor replies: Well sure, if you have that version of the date command, but not every distro of Linux has all those advanced capabilities.

Thanks for the New All-Digital Format

I just want to take a moment to congratulate and thank you on your transition to the new electronic format. The new format renders perfectly on my Sony PRS-600, and it has made the publication an absolute joy to read! I've been an avid reader for the past ten years.


Joel Coulson

Thanks! I really enjoy reading on my PRS-300, the pocket-size version of your e-reader. My favorite part is how well the Sony device handles the table of contents.—Ed.

More Thanks for Going Digital-Only

Thanks for making your magazine digital only. I remember the demise of TUX magazine, which I really liked, but not many, including me, subscribed to it. And yes, I have subscribed to LJ for a year. I like the convenience of digital subscriptions and being able to click on articles and advertisers for more information.

I've already learned something new from your magazine today about JEdit (see Adrian Klaver's “JEdit: a Text Editor and More” in the September 2011 issue of LJ) and discovered it in my OpenSUSE repo. I wish you luck and success.


Robert Smits

That's great to hear, Robert. I too was a TUX subscriber long before I was on staff here at Linux Journal. I enjoyed it back then, and now with digital reading devices, I like the LJ electronic version even more!—Ed.

Why Portrait Mode?

Like countless others (I'm sure), I was surprised by your recent “digital-only” announcement. Time will tell if this was a great or bad decision. I'm hoping it works out! Over the years, LJ has been a wonderful spokesperson and learning tool for the Linux community.

However, I don't understand why when a magazine goes digital, it still clings to the old print format. Yes, most magazines and books are printed in “portrait” mode. But, the majority of computers are stuck in “landscape”. Formatting in portrait forces me to page up/down constantly, especially when you continue having multiple columns. Maybe it'll work when I get my 60" hi-res monitor? Best of luck with the new venture!


Bob van der Poel

The layout part is a complicated endeavor. Yes, landscape would make sense if it were viewed as a PDF on computer screens only. (If you remember TUX magazine, that is exactly how it was done.) But, Linux Journal now can be read on e-readers, which are mainly in portrait mode. Then, there are the devices that happily switch from portrait to landscape, so we need to take that into account as well.

We are trying to offer the same content in as many forms as possible. The PDF looks like a traditional magazine, the epub/mobi versions have flowing text and graphics specifically designed for e-readers, and our on-line interactive version was made for Web browsers. On top of that, we have the Android app, etc., etc. Ideally, with all those options, we can cover everyone's preferences for the most part.—Ed.

Why, Why All-Digital?

I'm kind of pissed off at you guys. An all-digital publication? No more driving home from the post office, glancing at the cover of the LJ on the seat beside me, anticipating a good read of Linux Journal next to the fire when I get home or over coffee and a croissant tomorrow morning? No more digging an old issue out of the stack to show somebody some awesome article on Java or Linux on Mars? I really hate reading anything of any length on my laptop; it's a major PITA. Now I have to think about getting some kind of e-reader, and I can't think of one I like. I actually write code to produce epub- and mobi-formatted e-books, and I can tell you there isn't an e-reader on the market today that's worth the box it comes in. The Nook comes closest, except it uses Adobe's e-reader SDK, which is almost as bad as the software in the Kindle. Man I am really pissed!

I know you guys are between a rock and a hard place. I work for a publisher, and I can see the writing on the wall, but “all-digital”? Jeesh.


Scott Derrick

Scott, I know the switch is frustrating. Like you said, working for a publisher, I'm sure you weren't surprised, but that doesn't mean you have to be happy about it! I miss the old version as well, but I'm hoping as a tech magazine, we can push through this awkward time in publishing history and come out the other side stronger and wiser. Our readers are mostly geeks, and I think this transition is actually easier for us than it would be for a knitting magazine. If technology magazines can get over this hump, perhaps the non-tech magazines will be able to follow our blazed trail. Big plans, yes, but heck, we're the operating system that wants to take over the world!—Ed.

It Could Have Been Worse

I am perhaps an unusual subscriber. I am 79 years old and am not an administrator or a programmer. My wife and I have used Linux since Red Hat 5.2 (1999) and haven't used Windows for most of that time. I have about six years remaining on my subscription. I enjoy sitting in my easy chair in the evening and reading Linux Journal. I guess that is to be no more.

Still, it could have been worse. The magazine could have folded completely. At least I will have the digital copy; I just won't be able to sit in the recliner.

By the way, Dave Taylor and his Work the Shell column is my favorite.


Bruce Bales

Bruce, hopefully e-reader prices will continue to fall, and you'll be able to read Linux Journal from your recliner once again. Amazon seems to be doing a decent job with its $79 Kindle. If nothing else, you could move the easy chair over to the computer desk. I'm just teasing of course, but thank you for sticking with us.—Ed.

Wow, Podcasts, Facebook and More?

I was extremely pleased to get the August 2011 issue of LJ. I recently released a social network site around podcasts (weHEARus.com), so I was excited to see Charles Olsen's article on podcasting as a way to share Linux knowledge. The Git article by Henry Van Styn was also a good read, since I currently am using SVN and have considered Git, but I was surprised you didn't really go into its “distributedness” aspect and how that works. Also, although I already have implemented Facebook's “like” button, the rest of Mike Diehl's “Facebook Application Development” article was very informative. A mobile Facebook app is something that is planned for the future. Do you have any plans to delve further into the Facebook API and publish articles on this? There was so much appropriately timed good stuff in the August 2011 issue. Thanks for yet another awesome one!


Malcolm Beaulieu

Malcolm, I kind of feel like we should “high five” or something! I'm really glad you enjoyed the issue. Hopefully, this one is as useful for you too.—Ed.

Suggestions

The diff -u (kernel development) column by Zack Brown is my favorite by far (my second favorite is Doc Searls' EOF). I like getting “the inside scoop” on some projects I don't follow closely. Is there any chance of having a full two-page spread with kernel development as well as some monthly rotating FOSS project development news besides the kernel? Even just a quick summary of “important” discussions on their respective mailing lists would be nice.


Matthew Brush

Matthew, that's an interesting idea; we'll have to talk about it and see what we come up with. Thanks!—Ed.

Digital Television FCC Rules

Regarding R. E. Mackey's letter in the August 2011 issue of Linux Journal about digital TV and the FCC: although not really on the subject of Linux, many people do not realize that the FCC's regulations are openly accessible to anyone, if you know where to look and what to look for.

You could say this is the broadcast equivalent of what “use the Source, Luke” would be, or the four-letter equivalent. The relevant rules are found in the Code of Federal Regulations Title 47 (47 CFR). For broadcast TV, the relevant part is 73 (47 CFR 73—broadcast as a whole is assigned parts 70–79). And, note that the CFR really is written in code. There are specific definitions of specific terms, and, to use an INTERCALism, COME-FROMs abound. But code it is. And, well, there are bugs in the code.

I mentioned “open”; see www.gpo.gov/fdsys to see how open. Browse into the Code of Federal Regulations, and drill down to, say, 47CFR73.616 to see how interference protection, post-DTV transition is worked out. (Anyone who can follow LKML should have no trouble finding it.)

The GPO is the Government Printing Office, and it is in charge of publication of rules and regulations. To see the law as passed by Congress, you want the United States Code. For the FCC, the relevant part is Title 47 USC. Well, that's an oversimplification. To use a revision control system's terminology, the USC is the trunk, and the Public Laws as passed by Congress are the commit logs (and the Federal Register is the equivalent to LKML), and all are freely available in electronic form, at the GPO.

I also meant “open” in another way. The Media Bureau, which is over broadcast stations, has quite a bit of open-source code out there, and it was a pioneer in government open source. Drill down into Bureaus from the main FCC page and find out for yourself.

Do note that the FCC.GOV site is huge. It is easy to get lost in there, much like github (and there is an FCC github).


L. Owen

What to Do without Paper?

I understand that you have stopped (paper) publishing your magazine—yet another American (good) Linux magazine that is falling off circulation. It is too bad. Our society has found a more effective manner to publish. The reality is that you can have more up-to-date and timely content—that's true, but Shawn, an important question here: uh, uhm, what am I to read during any important “business” daily meeting? Well, I guess I'll have to take my laptop in with me from now on!


Bob Wooden

Bob, you bring up the very reason I never borrow someone else's smart phone. And, now I know to never borrow your laptop.—Shawn

Rip-off?

Your simplistic conversion of print subscriptions to electronic subscriptions is a rip-off. I paid for a print subscription and have two years remaining.

Let's review: Paid. For. A. Print. Subscription. Get It?

Why? I can get a boat-load of on-line Linux news for free. I paid for being able to read it off-line. I won't be renewing.


MJD

The switch was sudden and frustrating for everyone—we totally understand that. Unfortunately, we didn't have a choice. We are trying to offer as many digital options as we can (PDF, epub, mobi, interactive on-line, Android app and iPhone and iPad apps), but the print format just wasn't possible any longer. I am truly sorry you feel slighted. Hopefully, you'll find our digital offerings worthwhile at least during the remainder of your subscription.—Ed.

Dream Come True

Linux Journal as digital-edition-only? Oh, no, I thought, when I was thinking about reading a PDF file on my Notebook or my Kindle during my train ride to/from work. What a surprise after I've realized that epub and mobi versions also are ready for download. Now I'm able to read my favourite Linux magazine comfortably on my Kindle. Thank you guys, a dream came true!


Thomas Balzer

Thomas, I'm really excited about the epub/mobi versions as well. The PDF worked on my KindleDX, but on my smaller Kindle and my Sony PRS-300, it really wasn't easy to read. The epub/mobi version is very convenient for me, and I'm happy to see they are for you as well. Our Art Director, Garrick Antikajian, really gets the credit for the epub layout—three cheers for Garrick!—Ed.

Correction

Regarding my boto article “Python in the Clouds” in the October 2011 issue: Mitchell Garnaat, the author of boto, works for Eucalyptus Systems, not Canonical. I apologize for the error.


Adrian Klaver

LJ Archive