Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
User Journal

Journal: Number Five 2 2

I just sent off for the fifth and, I hope, last pre-publication copy of Yesterday's Tomorrows. I was sure it would be finished a month ago, but there were problems printing it due to some of the illustrations being too high of a resolution. It took a month to get the fourth printed.

I can't decide whether or not to assign an ISBN to it, since the book may not be legal in all countries. What do you think? I only have three or four left, and a block of ten is $250. Should I use one? The only country besides the US that has bought my books was Great Britain, and very few there although the web site gets visits from all over the world.

I'm pretty sure I'll never sell a book in Australia, because they're crazy expensive down there; tariffs, probably.

Oh, if you want to read the copy of Huckleberry Finn at my site, better hurry because when I post Yesterday's Tomorrows I'll have to take the Twain book down to make space. It will be back up this fall when I renew my URL and upgrade my hosting level. When it's back up I'll have a version that's easy to read on a phone.

User Journal

Journal: A suggestion to mobile browser makers and the W3C 4 4

There are an awful lot of pages on my web site, and I've been busy making them all "mobile-friendly". Most of them are little or no problem making them look good on all platforms, but there are three that are especially problematic.

I jumped this hurdle (well, sort of stumbled past it) by making two of each of the pages with a link to the mobile page from the index.

Ideally, I could just check to see if it was a phone or not and redirect phones to the mobile page, but there's no way to make this 100% successful*. Each brand of phone has a different user agent, there are a lot of installable phone browsers. On top of that, is it an Android phone or an Android tablet? With the minimum typeface size and viewport set, those pages are fine on the PC version but the phone version looks like crap.

Apple should have thought of this when they made the first iPhone, and Google should have thought of this when developing Android. The answer is simple, but it can only be implimented by browser makers and perhaps the W3C.

From the beginning of the World Wide Web, browsers looked for index.html, the default front page in any directory. This worked fine before smart phones, but no longer.

Phone browsers should look first for mobile.html, and if it exists display that, and display index.html if it isn't there. Tablets and computers would behave as they always have.

It doesn't have to be mobile.html, it could be any name as long as everyone agreed that it was the standard, like they did with index.html.

Maintaining a web site would be much easier if they did this. What do you guys think?

* A reader tipped me to the Apache Mobile Filter. It looks promising, especially since my host uses Apache. I'm looking into it.

User Journal

Journal: 9 - systemD: Interfaces last longer than code 2 2

This entry discusses the benefits of good interfaces, then gives a (overly simple) metric for how to recognize them. Then it ties it back to systemd.

The 'unix way' is built around solid interfaces. The actual code to Unix is mostly gone (unless you use SCO or something), but the interface lives on with multiple (mostly compatible) implementations. The interface long outlasted the code. (NB: Unix hasn't always had good interfaces in every place, Unix isn't perfect.)

Another example of a good interface is the Berkeley networking API. It's not user-friendly, but as a low-level 'plumbing' API, it is extremely flexible and effective. It spread and now every OS has an implementation. (That is, every OS more complex than some stuff at http://wiki.osdev.org ). The original code is gone, but the interface will be around for a long, long time.

There are plenty of examples of interfaces in Unix. It doesn't have to be an API.

If you consider a programming language to be an interface between a computer and a human, then think of the C compiler. The original C compiler is no longer in use, but the interface was designed clearly enough that even intentionally bad IOCC code from 30 years ago still compiles.

Cron is another interface, as are the basic CLI commands like ls, mv, ps, grep, etc (which have now taken over almost everywhere....the interfaces, not the original code). The pipe is a powerful interface that seems obvious now, but wasn't at the time......the pipe makes it possible to take the output from any program and send it as input to any other program. That is impressive.

"Robert Metcalf [the inventor of Ethernet] says that if something comes along to replace Ethernet, it will be called Ethernet', so therefore Ethernet will never die. Unix has already undergone several such transformations." -- Ken Thompson

How do you recognize a good API? It's tough, but one thing is sure, a good interface allows easy swapping of components. If it doesn't allow easy swapping of components, it's not a good interface.

"Linux has always been multiple components that you can chose which one suits you best - whether its vi or emacs, gnome or kde, sendmail or postfix, apache or nginx, etc. This is a good thing, where you can swap out component A for B for any reason, and keeps the project competing with each other to get better and better." -- gbjbaanb.

When your component can be easily replaced, because the interfaces are good, it can only compete on its technical merits. That is how you will recognize the best interfaces, because when they are evaluated and put into use by skilled programmers, the best ones will come to the fore.

Time to wrap this back to systemd.

Systemd has gained traction as a init engine because the "unit file" interface provides benefits that a lot of people like. If the "unit file" interface proves durable, then it will last longer than the code. Interfaces can be immortal, code can not.

Throughout systemd there is a lack of understanding of proper interfaces. Making the GUI depend on a particular init system is a particularly obvious example of poor design, but the code was written from a 'code first' perspective rather than an 'interface first' perspective.

Lennart Poettering is a fine programmer. (His code is readable, and let's be honest, anyone who can hack on the Linux kernel has skill. Furthermore he is passionate about it). I don't think he really understands interfaces, though. When he does, his code will move up to next level.

User Journal

Journal: How to make "mobile-friendly" web pages 3 3

I finally got the full texts of Nobots and Mars, Ho! to display well on a phone. My thanks to Google for showing me how, even if the way they present the information is more like trial and error, but it's actually easy once you jump through all their hoops. I'll make it easy.

First, you need to make sure it will fit on a phone's screen. I've been preaching for years that it's stupid to use absolute values, except with images; if you don't tell the browser the image size and you are using style sheets, your visitors will be playing that annoying "click the link before it moves again" game.

Some of you folks who studied this in college should demand your tuition be refunded, because they obviously didn't teach this.

Giving tables, divs, and such absolute values almost assures that some of your visitors will have that incredibly annoying and unprofessional horizontal scroll (*cough* slashdot *cough*).

None of the elements (images, divs, etc) can be more than 320 pixels wide, and you need to tell the browser to make it fit on a screen. To do this, add this meta tag to your page's head:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Next, you need to make sure the text is large enough to read without double tapping. The <p> tag does this:

<p {min-height: 16px}>

This needs to be placed after the <body> tag and before anything having to do with text.

To test it, just pull the page up on your phone. If it scrolls sideways, you need to work on it.

If you're worried about your Google pagerank, Google has a "mobile friendly test" here. If you flunk, well, when Google says "jump"...

My main index page fails their test. To make it pass the test I would have to ruin the desktop/tablet design. As it is now, the text is readably large on a phone but it has a sideways scroll, which is tiny if you hold the phone sideways, and I added a link at the very start of the page to a version that will pass Google's test, looks fine on a phone, not bad on a tablet but looks like excrement on a computer. The main index works fine on a tablet, since I've made it as "mobile-friendly" as possible.

I'd have it redirect if it saw Android or iOS, but it's been fifteen years since I've done that and I've forgotten how.

User Journal

Journal: 8 - Does Gnome depend on systemd, or just logind? 7 7

The previous entry investigated Gnome and logind, and found that practically speaking, Gnome does depend on logind. There are some alternatives, but they are not complete or well-maintained.

This entry discusses the dependency between logind and systemd.

Logind is deeply embedded in systemd. Here is a list of logind features, which seem like a grab-bag of vaguely related requirements. If anything, their relation seems to be they are goals of GnomeOS. Maybe Poettering looked at that list and tried to implement as many as possible to convince Gnome to adopt his software.

At a minimum we can say the name 'logind' is a poor choice for a name, since it does much more than that: the name doesn't describe what the product does.

Logind depends on systemd (for example) for calling unit scripts to shutdown or put the computer in sleep mode. In logind-dbus.c function execute_shutdown_or_sleep() you can see an example. Systemd also seems to be required for detecting hot-plugged devices and probably for other stuff. Note also there is a clear dependency on DBUS.

Logind is described as a tiny daemon. That's a lie, the thing has 15491 lines, with the largest file having 3023 lines (3023 lines is large but not necessarily bad).

As always, if you find any errors, please let me know. I'm trying to find the truth, not start fights.

User Journal

Journal: Sorry I haven't written...

I have two new stories nearly finished, but I've decided to see if I can sell first publication rights to a magazine. If everyone rejects them, I'll post them then. If one is accepted, it will likely be quite a while before I can post.

With three books in the works I've been really busy. Hell, I've been working harder since I retired than I did when I worked! I got the index pages to my three published books and the "coming soon" page for Yesterday's Tomorrows "mobile-friendly". I don't know why I'm bothering; almost nobody surfs in on a phone or from Google. But at any rate, I got the book Triplanetary and the first two chapters of Mars, Ho "mobile friendly" as well. The Time Machine is next; the epub versions of my books are better than the HTML versions, on a phone, anyway. Twain, Dickens, and God are going to be mobile-hostile for quite a while because of all the artwork in them.

I couldn't make the main index "mobile friendly" without making it look like crap on a computer screen, so I made a copy "mobile friendly", posted it as mobile.html and added a link from the main index.

Site stats say Google has spidered, so I tried to find Mars, Ho!" by googling on the phone. Nothing but Marsho Medical Group, Andy Weir's The Martian, and a facebook page for someone named Mars Ho. Googling "Mars, Ho! novel" did bring up Amazon's e'book copy halfway through the page.

"Mars, Ho! mcgrew" brought up Amazon's e'book first, followed by the mobile-hostile main index, THEN the actual Mars, Ho! index which IS "mobile friendly" (it passed their test). And I thought "mobile friendly" was supposed to raise your ranks? What's up, Google?

The second copy of Yesterday's Tomorrows came yesterday. I didn't expect until the day after tomorrow. I went through it twice yesterday and it's almost ready; there is still a little work before it's published, but it won't be long.

It's a really nice book, with stories by Isaac Asimov, John W Campbell, Murray Leinster, Frederik Pohl, Neil R Jones, Kurt Vonnegut, A. E. Van Vogt, Theodore Sturgeon, Poul Anderson, Phillip K Dick, Frank Herbert, James Blish, Lester del Rey, and Jerome Bixby. Covers of the magazines they appeared in are shown, with short biographies and photos of the authors. It's also well-illustrated with illustrations from the original magazines.

Random Scribblings: Junk I've littered the internet with for two decades will probably be next year.

Oh, how do you like my new shirt?



Your friends

User User's... Last Journal (H)elix1 (231155) friends fans Wednesday October 03, 2007 @09:41PM A nonymous Coward (7548) friends fans adpsimpson (956630) friends fans ak3ldama (554026) friends fans Saturday May 28, 2011 @05:01AM AKAImBatman (238306) friends fans Thursday October 02, 2008 @01:12PM alfaiomega (585948) friends fans Alioth (221270) friends fans Saturday October 16, 2010 @08:34AM AndroidCat (229562) friends fans Anonymous Brave Guy (457657) friends fans Artifakt (700173) friends fans artifex2004 (766107) friends fans Friday July 25, 2008 @12:29PM Ashtead (654610) friends fans Thursday February 06, 2014 @09:03PM atomico (162710) friends fans Attaturk (695988) friends fans AYauFu (708368) friends fans Azadre (632442) friends fans Azi Dahaka (625546) friends fans babbage (61057) friends fans Tuesday April 12, 2005 @01:34PM BandwidthHog (257320) friends fans Tuesday February 20, 2007 @05:20AM banky (9941) friends fans Thursday February 08, 2007 @03:52PM bcrowell (177657) friends fans bechthros (714240) friends fans Wednesday August 06, 2008 @12:12AM Behrooz (302401) friends fans benhocking (724439) friends fans Wednesday December 05, 2007 @03:20PM Bertie (87778) friends fans bgfay (5362) friends fans bhima (46039) friends fans Tuesday March 24, 2009 @03:56PM Billosaur (927319) friends fans Wednesday January 23, 2008 @03:33PM Bimo_Dude (178966) friends fans Friday June 20, 2008 @10:14PM Black Parrot (19622) friends fans BlackHat (67036) friends fans Tuesday December 30, 2008 @12:10AM BlackTriangle (581416) friends fans blincoln (592401) friends fans Monday March 22, 2004 @04:14AM blinder (153117) friends fans Saturday January 29, 2011 @03:15AM Bloater (12932) friends fans Sunday March 19, 2006 @01:59AM BlueShirt (919167) friends fans Bluesman (104513) friends fans bonch (38532) friends fans btlzu2 (99039) friends fans Friday March 09, 2007 @05:53PM BWJones (18351) friends fans Monday October 24, 2011 @10:35PM capoccia (312092) friends fans Thursday July 30, 2009 @12:31PM Captain Splendid (673276) friends fans Monday February 02, 2015 @04:26PM CastrTroy (595695) friends fans Catamaran (106796) friends fans ces (119879) friends fans Tuesday June 29, 2010 @04:53PM Chacham (981) friends fans Thursday April 23, 2015 @02:10PM Chris Burke (6130) friends fans circletimessquare (444983) friends fans Thursday January 22, 2015 @10:43PM clem (5683) friends fans Colonel Korn (1258968) friends fans Communist_Supervisor (1062168) friends fans Conspiracy_Of_Doves (236787) friends fans Corporate Troll (537873) friends fans Tuesday November 30, 2010 @12:24PM crotherm (160925) friends fans Friday March 18, 2005 @10:33PM crow_t_robot (528562) friends fans curtisk (191737) friends fans Wednesday December 21, 2011 @05:03PM CyberBill (526285) friends fans cyranoVR (518628) friends fans Saturday January 31, 2009 @03:00AM DaedalusHKX (660194) friends fans Thursday April 24, 2008 @11:24PM damn_registrars (1103043) friends fans Thursday April 23, 2015 @08:03PM Damvan (824570) friends fans Dan Ferguson (691027) friends fans Darby (84953) friends fans darkpixel2k (623900) friends fans Datana (516170) friends fans dave-tx (684169) friends fans DaytonCIM (100144) friends fans Sunday November 11, 2012 @02:30AM dbIII (701233) friends fans dcam (615646) friends fans

User Journal

Journal: Product Review: Seagate Personal Cloud 5 5

Around the first of the year all three working computers were just about stuffed full, so I thought of sticking a spare drive in the Linux box, when the Linux box died from a hardware problem. It's too old to spend time and money on, so its drive is going in the XP box (which is, of course, not on the network; except sneakernet). I decided to break down and buy an external hard drive. I found what I was looking for in the "Seagate Personal Cloud". And here I thought the definition of "the cloud" was someone else's server!

I ordered it the beginning of January, not noticing that it was a preorder; it wasn't released until late March. I got it right before April.

I was annoyed with its lack of documentation -- it had a tiny pamphlet full of pictures and icons and very few words. Whoever put that pamphlet together must beleive the old adage "a picture is worth a thousand words". Tell me, if a picture is worth a thousand words, convey that thought in pictures. I don't think it can be done.

I did find a good manual on the internet. For what I wanted, I really didn't need a manual, but since I'm a nerd I wanted to understand everything about the thing. Before looking for a manual I plugged it all up, and Windows 7 had no problem connecting with it. It takes a few minutes to boot; it isn't really simply a drive, it must have an operating system and network software, because it looks to the W7 notebook to be another file server. Its only connections are a jack for the power cord and a network jack.

The model I got has three terrabytes. I moved all the data from the two working computers (using a thumb drive to move data from XP) and the "cloud" was still empty. Streaming audio and video from it is flawless; I'm completely satisfied with it, it's a fine piece of hardware.

However, it WON'T do what is advertised to do, which is to be able to get to your data from anywhere. In order to do that, Seagate has a "software as a service" thing where you can connect to a computer from anywhere, but only the computer and its internal drives, NOT the "personal cloud". And they want ten bucks a month for it.

I downloaded the Android app, and I could see and copy files that were on my notebook to my phone, but I couldn't play music stored there on it. I uninstalled the crap. "Software as a service" is IMO evil in the first place, but to carge a monthly fee to use a piece of crap software like this is an insult. Barnum must have been right.

If you're just looking for an external hard drive, like I was, it's a good solution. If you want what they're advertising, you ain't gettin' it. The Seagate Personal Cloud's name is a lie, as is its advertising.

User Journal

Journal: 7 - Why does Gimp depend on systemd? 2 2

This post is flotsam related to some dependencies. If you note any mistakes, please let me know, I'm collecting information.

Gimp doesn't depend on systemd as far as I can tell. Gimp runs on Windows. It does depend on libgtk, whose dependency list is available.

There are reports that Gimp depends on systemd, but that seems to be an artifact of a package dependency tree on one system, not that Gimp actually needs systemd.

What about Gnome? Does Gnome depend on systemd? The answer is yes....., although there are alternatives. Systembsd, systemd-shim, and LoginKit.

LoginKit doesn't seem to be complete, like some files were missing from commit or something. The README is attractive, though. It seems to only be attempting to provide services for logind.

Systembsd provides hostenamed, localed, logind, and timedated.

Systemd-shim provides c-group services, some unit file services, power/sleep/reboot services, and ntpdate services.

Neither code base has been updated in four months, and the code in neither one looks particularly well organized.

I suspect there are other things systemd provides that Gnome relies on, but those aren't immediately apparent. I'm not sure where to look to figure that out.

Before logind, Gnome used ConsoleKit to provide login support. Fascinatingly, the commit to remove support for ConsoleKit was made by Florien Mullner.

A lot of this stuff depends directly on DBus. In my opinion that is a mistake; the communication mechanism should be separate from the API interface.

In the next journal entry I will investigate how deeply libsystemd is tied into the init system, or whether it is truly modular.

User Journal

Journal: We've been spelling it wrong for over a quarter century 8 8

I'm surprised that this hasn't been addressed by the academic communities. Someone with a degree in English or linguistics or something like that should have though of this decades ago.

This word (actually more than one word) has various spellings, and I've probably used all of them at one time or another. The word is email, or eMail, or e-mail, or some other variation. They're all wrong.

It's a contraction of "electronic mail" and as such should be spelled e'mail. The same with e'books and other e'words.

So why hasn't someone with a PhD in English pointed this out to me? I have no formal collegiate training in this field. It's a mystery to me.

User Journal

Journal: Are printed books' days numbered? 4 4

In his 1951 short story The Fun They Had, Isaac Asimov has a boy who finds something really weird in the attic -- a printed book. In this future, all reading was done on screens.

When e'books* like the Nook and Kindle came out, there were always women sitting outside the building on break on a nice spring day reading their Nooks and Kindles. It looked like the future to me, Asimov's story come true. I prefer printed books, but thought that it was because I'm old, and was thirty before I read anything but TV and movie credits on a screen.

And then I started writing books. My youngest daughter Patty is going to school at Cincinnati University (as a proud dad I have to add that she's Phi Beta Kappa and working full time! I'm not just proud, I'm in awe of her) and when she came home on break and I handed her a hardbound copy of Nobots she said "My dad wrote a book! And it's a REAL book!"

So somehow, even young people like Patty value printed books over e'books.

My audience is mostly nerds, since few non-nerds know of me or my writing, so I figured that the free e'book would far surpass sales of the printed books. Instead, few people are downloading the e'books. More download the PDFs, and more people buy the printed books than PDFs and ebooks combined.

Most people just read the HTML online, maybe that's a testament to my m4d sk1llz at HTML (yeah, right).

Five years ago I was convinced ink was on the way out, but there's a book that was printed long before the first computer was turned on that says "the news of my death has been greatly exaggerated".

* I'll write a short story about the weird spelling shortly.

User Journal

Journal: Where's my damned tablet? 11 11

I'd like to know why in the hell nobody is selling a tablet, or maybe an app for existing tablets, that will let me watch over the air TV on it?

All the necessary hardware is there. Wi-fi and bluetooth are radios. Some cell pones can pick up FM music stations, and have been able to do so and have done so for years.

The FM radio band sits between channels six and seven on the VHF television channels. If it can hear radio, it can see TV.

The technology is there, why isn't the commercial device to be found? Offer a tablet I can watch TV without the internet and I'll buy one. Maybe two.

User Journal

Journal: Systemd (or, how to make portable software) 10 10

In this post, Lennart explains that he doesn't know how to write portable C code. He says:

[Making systemd portable] would turn every second line of systemd into #ifdefs.

The purpose of my post here is to explain how to write portable code, without #ifdefs on every other line. If that happens, you are doing it the hard way.

An easier way is to create an OS independent layer. Call it OSI (since no one is using that acronym anymore, right?). Create a header file that declares all your functions, then create an implementation file for each platform. Every time you find a piece of functionality that is different on different platforms, throw it into that header file.

For example, if you need to take a screenshot, it will be different on every platform you find. In the header file, create a function OSI_Screenshot(). Then in your OSI_Windows.c file, add an implementation for windows. In your OSI_Linux.c, add a screenshot implementation for Linux. In your OSI_OSX.c, add your implementation for OSX. This technique can also work for extremely incompatible platforms, with OSI_printf(), or OSI_malloc(), etc. If you use your compiler correctly, you can compile it without any extra overhead from the function call.

An example of this technique can be found in Android (look at sysdeps.h and sysdeps_win32.c), demonstrating that this technique works. They don't have #ifdefs scattered throughout their code. The Android example is tougher than it needs to be, because Android added the compatibility layer after the code was written. If they had started at the beginning, the code would have been much simpler.

The lack of knowledge (about how to write portable code) in the systemd team is causing them to make bad decisions, because the alternative seems too hard. For example:

I have no plans porting it to other kernels, and I will not merge any such patches........Quite frankly, I'd like to question [cross-platform compatibility]. In the light of GNOME OS I think we need to ask ourselves the question if we do ourselves any good if we continue to support all kinds of kernels that simply cannot keep up with Linux anymore.

Those who don't understand the failures of the past are destined to repeat them. Plenty of vendors try to focus on a single platform, and their work disappeared, to be replaced by something that was cross-platform compatible, and usually better work. The discipline required to keep things portable results in better code (there's a quote from Mythical Man Month that fits here but I'm too lazy to look it up). The Gnome developers understand the importance of portability but that's a story for another post.

User Journal

Journal: Triplanetary 1 1

I've uploaded a new book to mcgrewbooks.com. Edgar E. Smith was a well known science fiction writer known as "the father of space opera", and Doctor Smith was a food engineer in his other life. The novel I've uploaded is Triplanetary, first published in serial form in Amazing Stories in 1934.

Some of the dialogue is a bit juvenile, but it would make a great movie.

Hacking's just another word for nothing left to kludge.