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

 



Forgot your password?
typodupeerror
For the out-of-band Slashdot experience (mostly headlines), follow us on Twitter, or Facebook. ×
User Journal

Journal: Thanks, Obama! 33 33

Talking to a Caribbean-based business acquaintance this week reminded me that, no matter my feelings for the Obama administration, I will be eternally grateful that he's taken Cuba off the table. Because in the pantheon of stupid american wedge issues, the Cuban embargo is near-lock for the title IMO.

Bonus conspiracy fun: The lifting of the embargo, and its timing could be seen as a nice little spoiler for the only 2 GOP candidates who have any shot at beating Hillary next year, Bush and Rubio. Most of the other candidates can choose a wide range of answers when presented with questions on the topic, whereas the Floridians actually have serious history and ties on this, making finessing the issue that much harder.

Oh, and before someone thinks they're clever by telling me that President Perry or whoever would just go back to the status quo faster than you can say "fuck you liberals!", good luck with that. The GOP only cared that it reliably delivered Florida's electoral votes, and it stopped doing that a good couple of cycles ago. It's dead, Jim.

User Journal

Journal: Leveling up with python 2 2

$ py
Python 3.4.3 (default, Jun 14 2015, 02:11:57) [MSC v.1800 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> dat="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingMFA.html"
>>> print(dat.split("/"))
['http:', '', 'docs.aws.amazon.com', 'IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[1:])
['', 'docs.aws.amazon.com', 'IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[2:])
['docs.aws.amazon.com', 'IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[3:])
['IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[3:-1])
['IAM', 'latest', 'UserGuide']

I hadn't ever used the python REPL to work on a bit of code, but it sure makes exploring the slicing notation easier.

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: She's so false, even her ASCII 32 characters are lies 12 12

Slashdot's greatest knave should spring into action to defend Her Majesty against the latest tidbit:

New documents obtained by Judicial Watch and made public Monday show that then-Secretary of State Hillary Clinton and other senior officials under President Obama were given intelligence within hours of the Sept. 11, 2012, Benghazi attack describing how it had been planned at least 10 days in advance "to kill as many Americans as possible."

Instapundit notes: "THEN SHE STOOD NEXT TO THE COFFINS OF THE DEAD AND LIED" also "they locked up a filmmaker for a year, just to support their cover story. Nice people."

I realize it's more of a difference of degree than kind between her and any other megalomaniac running. However, I think that after eight years of electro shock therapy from #OccupyResoluteDesk, Her Majesty has the potential to turn an economic hangover into a full-on coma.

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: Pedigree 12 12

The key word is pedigree: the array of background traits, including the cultural, social, and educational capital passed from one generation to the next, which [Elite Professional Services firm] candidates bring to the competition for elite jobs. But it's a closed competition. One must get through the gates first. A candidate's pedigree determines whether his or her application to an EPS firm is legitimately considered in the competition, or tossed in a slush pile of candidates who have no realistic chance to even compete for such jobs.

Now, wait: the fruit of Progress is an impenetrable thicket of legislation/regulation produced by the clerisy. Of course it's rigged. You can't stab capitalism in the heart and then bemoan the rise of the nomenklatura. Or maybe the entire article is just a refined Progressive troll.

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.

There are never any bugs you haven't found yet.

Working...