Ants

Here’s what happens to an ant’s abdomen when it eats green sugar solution:

close-up photo: ant with translucent green abdomen eating green sugar solution

 It’s one of a set of photos I came across today. The others are well worth seeing and are in this Mail Online article. (Lest you judge me, I should point out that I arrived on the photos via my Tweeted Times page, not via anything to do with the Daily Mail.)

There’s nothing  particularly special about the ants: according to the article they’re just ones that were in the back garden of the photographer, Dr Mohamed Babu, whose wife noticed that one that had been drinking milk had a white abdomen.

The article is quite  interesting (and all three photos stunning), though I did find it amusing that rather than just calling him by his name the Mail felt obliged to call Dr Babu “father of three Mohamed Babu” and “the 53-year-old”. They also call him “Scientist Dr Babu”, but infuriatingly they don’t say what kind of scientist. Particle physicist? Cosmologist? Seismologist? Entomologist? Ants are less central to some of those disciplines than to others . . .

And presumably his age and number of children have some bearing on ant photography or they wouldn’t have mentioned them, but I still haven’t quite cracked that one.

Why I hate infinite scrolling

Note: if you already know you hate infinite scrolling are looking for instructions on turning it off, details are here.

Nasty surprise

A few weeks ago, something unpleasant happened to my blog. The top of the page looked OK, but if I scrolled down more than a small distance, a semi-transparent box would slide up at the bottom of the screen, obscuring the last few lines of text.

blog title on translucent background, floating on top of one of my posts

The first sign that something was wrong.

I dislike unsolicited popups on web pages anyway; I particularly dislike ones which can’t be got rid of but follow you down the page as you try to scroll past them. For me they have same distracting effect as, say, a moth landing on something I’m reading and walking around on it, or someone plonking things down on a book while I read. So I really didn’t want things I hadn’t even put there messing with the behaviour of my blog in this way.

I’ve known about this blemish for a while; yesterday I finally got round to trying to cure it.

It looked like some kind of CSS trick, so I expected I’d need to change the custom CSS I’ve paid WordPress a small annual fee to let me use.

First step: find out what needs modifying. My browser, Opera, is pretty useful for this sort of thing. In particular, the View menu lets you display various features of the code for the page. So I got it to show the Class and ID attributes which label blocks of text and so on for CSS purposes. I expected one would have a label like “floating-footer”, and I’d then write a CSS rule to make anything with that label invisible.

The actual labels I saw were more worrying:

The floating box, showing attributes called "infinite-footer" and "infinity-blog-tit[le], together with my comment "Oh bugger!"

I don’t like the look of those ID names . .

What were infinite and infinity doing there? I’d set the display format ages ago to five posts per comfortably-sized page—or comfortable for me, at least. I’d experimented with different page lengths, and that seemed the one that worked best. Five posts loaded acceptably quickly, even over my mobile broadband connection, and resulted in comfortable scrolling via the scrollbar. Please, no . . . !

I experimentally scrolled down to what was meant to be the bottom of the page. Then two posts further, to the actual bottom of the page. Sure enough, the ubiquitous and annoying “Sorry, you’ve got to wait while this goes round and and round and your browser goes all sluggish while we readjust your scrollbars” symbol appeared, jerkily rotating as my connection erratically downloaded things I hadn’t asked for. It was followed eventually by the next page of posts. On the same page. Or rather, posts 8 to 14. I’d now effectively got nearly three pages of posts filling up the browser with one idiotically long page.

So I hurriedly went to the blog settings, found the one responsible for infinite scrolling, and turned it off. I was relieved to see on my return that there was now no annoying floating popup. Phew.

OK, let’s scroll to the bottom again. Everything will be OK now. The Older Posts link will have come back, there won’t be any horrible stretchy page, I’ll be able to click the link for page 2, and . . .

screenshot showing "Load more posts" button at the end of the page

Sorry. We’ve taken the link away.

Oh. No. No! No no no no noooooooo! That’s just the same thing, but with a button! I don’t want to create an ultra-long page. I’ve just turned it off, for goodness’ sake! I simply want to go to the next page, where the next five posts will be. What are you doing to me?!

So, back to the settings page. (I must have missed the setting that give me normal pages . . .  Oh. No sign of it. Off to the user forum, then . . . What, discrete pages is currently not an option?! Good grief  . . . ! ) . . . And, finally, to an enthusiastic announcement from WordPress about how wonderful infinite scrolling is and how pleased they’re sure we’ll all be to have it.

That’s why I can’t find the setting, then. They’ve got rid of it. There’s a glimmer of hope in the word currently. But at least for now, I seem to be stuck with one long page which will contain all 103 of my posts if anyone’s determined enough to scroll all the way down. I can choose between having it load automatically when it feels like it, and on request when I click a button. But it’ll be the same unwieldy, user-hostile, browser-hogging, single page.

What’s so bad about it?

Um . . . Everything?

For a start, consider the experience of scrolling through the page. Now, I know that many people are using a scrollwheel. Maybe others like to use the arrow keys. For myself, I’m mainly browsing with a netbook that has a trackpad. Since the screen is quite small, I like to have fine control over the positioning of the page. This is often important if something is nearly the height of the screen. So I navigate using the vertical scrollbar.

Because the trackpad is so familiar and scrolling with it so instinctive, I mostly scroll without needing to look at the scrollbar. I know where it is, and that the pointer is already on it; my finger hovers over the trackpad as I read, ready to make a small, automatic movement when it’s time to scroll down a little. I do look occasionally, mainly to check the pointer hasn’t drifted off to one side, but mostly I’m just looking at the page content. Occasionally I’ll check the scrollbar to see how far through the page I am. It’s a pleasant, relaxed way of reading.

Now, suppose the page has infinite scrolling.

As I approach the “bottom” of the  page, the next section starts to load. I don’t really notice, since I’m engrossed in reading someone’s wonderful blog post. If I did notice, it would be a distraction from reading.

The browser, however, does notice. The page is now longer; the scrollbar adjusts itself accordingly, moving upwards the appropriate distance. But I don’t know this, since I’m still busy reading.

I scroll down to read the next line, or to move the page by half a line or so to get an image positioned where I can see it properly . . .  and then all hell breaks loose. Instead of the small adjustment I’m expecting, the page starts hurtling upwards. When I thought I was dragging the scrollbar down, I was actually clicking just below it. Or rather, holding my finger down and sending a stream of auto-repeat clicks. They’re still happening since my reflexes haven’t yet taken my finger off the trackpad.

So the browser is now frantically trying to load the next 5, 6, 10, 20, God-knows-how-many pages. Once my reflexes catch up enough for me to look to the right,  the rapidly shrinking scrollbar is whizzing up the screen, several inches above the pointer. I chase after it. Not only is it running away from me, but it’s doing so erratically and jerkily since the browser and the internet connection can’t keep up.

I manage to catch the scrollbar and can finally start repairing the damage. Now, where was I on the page?

Well obviously I haven’t a clue where I was, have I? Not in relation to where I am now. Before the browser went insane I was three quarters of the way down, but that’s irrelevant now.  The scrollbar is up near the top and I obviously need to be somewhere above that, but how far? No idea.

So I start scrolling back up, trying to find my place. And because the page is now so long, I have to use very very very tiny movements if I’m to move the page at a speed where I can actually see it.

It’s the equivalent of happily reading a book only have it suddenly and unexpectedly snatched out of your hands by someone who then deliberately loses your place, mangles the pages so they won’t turn properly, then throws it back at you. Horrible, horrible, horrible, horrible, horrible.

And seriously, what sort of web designer is unable to anticipate that this will happen? They must have used a web browser. With scrollbars. And they must know that people use scrollbars for scrolling with, surely?

Of course, the wilfully autonomous scrollbars are only one of the problems, even if they’re the worst. Here are some of the others.

  • Pages never finish loading. The browser is forever connecting to the server to fetch the next bit of the page.
    Maybe with a wonderfully fast computer and internet connection this is fine. For me it’s not fine: whenever something is loading, scrolling is erratic, jerky and sluggish. This applies especially when I have a lot of tabs open, which I normally do.
    Scrolling becomes comfortable once the page has finished loading; infinite scrolling ensures that it never becomes comfortable.
  • Navigation. With discrete pages, you always know how far down a page you are, so you’ve an idea how much there is left to read.
    You also know which page you’re on. Maybe you’ve decided to browse your way through a few pages of posts, skimming through for anything that looks interesting. Remembering that you wanted to look at something a couple of pages back, you click the Back button twice and there it is.
    Maybe you want to close the browser for now and and continue  later from where you were: you bookmark page 16 and come back to page 16. Even if the blogger adds a new post in the meantime, you’ll be in more or less the right place.
    Infinite scrolling makes all of that impossible.
  • The ever-lengthening page. As you scroll down, the page gets longer. As mentioned above, this means smaller and smaller movements of the scrollbar are needed. Eventually they’re so tiny that trying to go any further is just too irritating to be worth it. Anything further down might as well not be there since reading it is too much hassle.
  • Sequential-only access. To get to page 50 via infinite scrolling, you have to scroll all the way from page 1. You can’t just type ?page=50 or whatever into the page URL. And you don’t know where page 50 is anyway; you have to guess its position on a page whose length is continually changing. Imagine a book where the only way to get to page 50 is by opening every single page on the way to it!
    . . . Well of course there was a time when books were like that. You navigated them by scrolling because they were scrolls and nobody had yet come up with anything better. Then, around 2000 years ago, books with pages were invented, and nobody in their right mind uses scrolls any more. Quite why web designers suddenly want to revert to an unwieldy system that’s 2000 years out of date is beyond me.

Yes, I know that a properly organised site will have archive links and so on for navigation. Scrolling won’t be the only way to get to things. But navigation links aren’t actually the same as, say, jumping forward a few pages to see what you find. They only work when they happen to coincide with what you’re looking for. Links and post titles won’t tell you there’s a hilarious cartoon on page 17. (They can’t; you don’t know it’s hilarious until you see it.) With infinite scrolling you can’t do the equivalent of flicking through the pages of a book until you find something interesting then making a note of the page; all pages are page 1.

Also, sites like Twitter don’t have archive links; you can’t really have thousands of 140-character links to individual 140-character tweets.

I think programmers who inflict infinite scrolling on us should be forced to use a programming language in which all access to memory, databases and arrays is sequential. And to use programming manuals written on scrolls. Let’s see how they like that.

I don’t like infinite scrolling.

Procrastinology update

You’ll be pleased to know that my procrastinology course now has not only a reading list, but also (and much more importantly) a non-reading list. The lack of one has been a glaring omission for a long time; I’ve only just got round to adding it.

It’s a good reading list. At least one of the cited authors—OK, the only cited author—has been awarded an IgNobel prize in the period between my intending to add his article to the list and actually doing it.

Gears

While I’m at it—here’s something else which initially looks impossible until you work out the basic principles behind it. Which I’m sure you can. 😉 Having written about the levitating Slinky earlier, I’m not going to write another 1300 words now explaining that the radius can vary how you like provided the combined radius of the two gears is always equal to the how it works.

Just some wooden gears. The wheel, reinvented.

Impossible Slinky

What happens when you drop a Slinky? Specifically, what happens if you let it dangle down motionless, then let go of the top end? It falls, right? And maybe bounces around a bit as it does so?

Here’s a slow-motion video. I came across it the other week. Unless you’ve either seen it before or carefully worked out the physics, I think you’ll be quite startled.

It looks utterly impossible. Most of the Slinky apparently levitates, remaining almost completely stationary for most of the time, while the top part falls. YouTube being YouTube, last time I looked some of the comments were from people refusing point-blank to believe the explanation in the video. I’m not sure what they wanted the explanation to be—maybe some kind of impossible magic more in keeping with the impossible-looking behaviour? I don’t know.

The video talks in terms of information about what’s happened at the top of the Slinky taking time to get to the bottom. Although that’s accurate, I found a different way of looking at it more helpful. I need to explain a bit of very basic mechanics, though. Just one of Newton’s Laws of Motion.

Before Newton, a popular idea was that in order for something to move, you had to apply a force to it. Give it a push or a pull. This seems reasonable from everyday experience: something resting on the table will stay there until some force makes it move, and to drag a heavy object across the floor you have to keep on pulling all the time it’s moving.

That’s not actually the case, though. Everyday heavy objects need a force to keep them moving because there’s another force, friction, resisting the movement. What forces do is to accelerate objects: that is, to change their velocity. Start something moving in empty space and it’ll just keep on moving in a straight line unless you apply some force to change the motion. How much force? Newton’s Second Law answers that: force equals mass times acceleration. That is, to accelerate something weighing 2 kg by as much as something weighing 1 kg, you need to push twice as hard.

“Yes but what about gravity?” I hear you saying (whether you are or not). “That’s there all the time, and I can feel it pulling me down into my chair, but I’m not accelerating at all. I’m just sitting here. I’m not moving and I’m not starting to move either. And all the things on the table are just sitting there too.”

The answer, of course, is that there are two forces acting on you: gravity pulling you down, and the chair pushing you up. They cancel out so you don’t accelerate.

“Yes but why do they cancel out? Why is the force from the chair just the right size?” That bothered me when I first learnt basic mechanics. One answer is simply to cite Newton’s Third Law: “To every action there is an equal and opposite reaction”. The chair obeys this and reacts to gravity pulling you down onto it by pushing up against you. The Third Law says the forces are equal and so they are. But that doesn’t seem much like an answer. It amounts to “The forces balance simply because they do, and we’ve got a name for it: Newton’s Third Law of Motion.”

OK then: what would happen if the chair didn’t push quite hard enough? It wouldn’t quite cancel out the gravitational force on you, so you’d accelerate downwards. Into the chair. Squashing the upholstery and thereby making it push a bit harder, so you accelerated less . . . you’d overshoot a bit and bounce up again . . . and after a few bounces you’d end up stationary, at exactly the right point for the two forces to cancel out. The forces have to be equal because if they weren’t, they’d adjust your position until they were.

If you put a mug of tea on the table, the same explanation applies, but on a smaller scale. The outer electrons of the atoms of the two objects are repelling each other. Push them closer together and they repel more. Instead of macroscopic bouncy upholstery we’ve got a microscopic bouncy electric field. The mug rests in just the right place for  the repulsion to cancel out the gravity trying to pull it through the table.

The key thing is: stationary objects around us stay stationary because the net force acting on them is zero. They accelerate when the forces are out of balance.

How does all this relate to the Slinky? And why, when you let go of the top, doesn’t the force holding it up disappear so gravity wins and it accelerates downwards? Why does it “levitate” so counterintuitively? Surely it’s disobeying everything I just described?

Consider just one small piece of the Slinky. Imagine holding it in your hand, gently pulling one turn of it away from the next. To stretch it further, you have to pull a little harder. A given amount of stretch requires a precise strength of pull; a given strength of pull produces a precise amount of stretch.

Now consider the dangling, stationary Slinky. Think about just one turn of the spring. It has three forces acting on it:

  • The turn above is pulling upwards on it. How hard depends solely on how far apart the two turns are.
  • The turn below is pulling downwards on it. Again, how hard depends just on how far apart the two turns are.  (They’ll have stretched just enough to support the part dangling below.)
  • Its own weight is also pulling downwards.

Before the Slinky is dropped, the three forces are in balance, so the turn we’re looking at remains stationary. It has to; moving would require accelerating. That would require at least one of the forces to change, so they didn’t balance any more. They won’t change unless one of these changes:

  • The weight of this turn of the Slinky—which is constant.
  • The distance between this turn and the one above. This requires the turn above to move (this one won’t until the forces change).
  • The distance between this turn and the one below–i.e. the turn below must move.

In other words, the only way for a turn within the Slinky to start moving is for an adjacent one to move first.

The top turn is supported not by another turn above, but by an upward force from your fingers. When you let go of the Slinky, you simply remove this force. Now the only forces acting on the top turn are its own weight and the pull of the turn below. So it accelerates downwards, becoming the first one to move. This moves it closer to the turn below. The reduced stretch means the two turns don’t pull on each other quite so hard, so the one below no longer has quite enough upwards pull on it to keep it stationary, and it too starts accelerating.

But further down the Slinky, where nothing has moved yet, the turns are spaced  just as before. Since the pull between them depends only on their spacing, it is unchanged. Neither has the pull of gravity changed. So the forces remain in exactly the same balance, happily continuing to cancel each other out. There’s nothing to start those turns moving; they have to remain stationary.

You know from playing with such things that if you waggle one end of a Slinky or similar, a wave of movement travels along it. The same happens here: it takes time for the pulling together of adjacent turns to travel down the Slinky. And since none of the turns can start falling until the wave reaches them, they remain suspended in that impossible-looking way.

Yes but—it still seems wrong. What’s holding the bottom part up now you’ve let go? How can it hang there with nothing to hang from?!

Imagine doing pull-ups: you pull yourself up towards the bar by pulling down on it. Similarly, as the bottom part of the Slinky hangs down from the top part, it supports itself by pulling down on the top part. Once you let go, it continues doing exactly the same thing. It’s still hanging from it. The only difference is that the downward which previously went into resisting the upward pull from your hand now goes into making the top section fall faster than it would under gravity alone. It’s being forcibly accelerated downwards,  and the reaction to that accelerating force is what supports the stationary section.

The Slinky is simply behaving the way it has to.

And yet, it still looks impossible. And it took more words to explain than I expected.