The time has come to learn some Python. I have a rough idea what it is having read about it in the past and probably spent about half an hour playing with it many years ago.
I'm so busy these days (working long hours, family life) I find it hard to keep up with all the developments so I'd like to ask a couple of questions, since I believe the Python language changes significantly between each major release.
At my current place of work, we have development systems running ancient versions of Red Hat with Python 2.6.x. At home I have Slackware which has Python 2.7.5 by default. There are much newer versions of Python out in the wild these days, and I'm not scared to compile from source.
So, which version of Python should I start with? In a nutshell, what are the main differences? Which parts of the language are backwards-compatible?
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.
This is a test story which contains a variety of 1-, 2-, and 3-octet UTF-8 chars. The purpose is to see how well the e-mailing of stories handles these characters. These chars were entered directly (actually, cut-and-paste) as opposed to being entered as decimal/hex/named character entities.
The following is taken from: "3. UTF-8 definition" in: https://tools.ietf.org/html/rfc3629 [ietf.org]
Char. number range | UTF-8 octet sequence
(hexadecimal) | (binary)
--------------------+---------------------------------------------
0000 0000-0000 007F | 0xxxxxxx
0000 0080-0000 07FF | 110xxxxx 10xxxxxx
0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
peugen 0x40 0x7f 0x0140 0x017f 0x0700 0x073f 0x0800 0x083f | peu2utf8 > bleh.txt
cat bleh.txt
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~�
ŀŁłŃńŅņŇňʼnŊŋŌōŎŏ
ŐőŒœŔŕŖŗŘřŚśŜŝŞş
ŠšŢţŤťŦŧŨũŪūŬŭŮů
ŰűŲųŴŵŶŷŸŹźŻżŽžſ
܀܁܂܃܄܅܆܇܈܉܊܋܌܍
ܐܑܒܓܔܕܖܗܘܙܚܛܜܝܞܟ
ܠܡܢܣܤܥܦܧܨܩܪܫܬܭܮܯ
ࠀࠁࠂࠃࠄࠅࠆࠇࠈࠉࠊࠋࠌࠍࠎࠏ
ࠐࠑࠒࠓࠔࠕࠚ
ࠤࠥࠦࠧࠨ
࠰࠱࠲࠳࠴࠵࠶࠷࠸࠹࠺࠻࠼࠽࠾
---
That was one block of 1-octet UTF-8 chars; two blocks of 2-octet UTF-8 chars, and one block of 3-octet chars, submitted as 'plain old text'
Here it is the first of June in 2015, and our dev team has been working long and hard to get the foundation code to this site upgraded to handle newer versions of perl and apache. I lent a hand with QA duties and can attest that this was no small feat. Many *many* thanks to NCommander and Paulej72!
And, this acts as a test that the journal code is still working. Please let me know if you cannot see it! ;)
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 fellow Soylent tipped me to the Apache Mobile Filter. It looks promising, especially since my host uses Apache. I'm looking into it.
Yooman rights? Yooman rights! I don't need no yooman rights! I ain't foreign and I ain't done nuffink wrong.
Michael "Teachers are the Enemies of Promise" Gove is going to give us a nice British Bill of Rights instead. They did promise to stop their supporters voting for Nigel and the bigots. Nigel didn't resign after all.
And Gove is going to be working with Theresa May, who will be pushing through the Snoopers Charter.
And the kickings are about to begin.
Here in Blighty, we're having a General Election on Thursday 7th May.
This time around, the Official Monster Raving Loony Party has conceded that it will probably lose votes to UKIP.
Oh dear.
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.
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?