The GJS documentation is back

Aside

We have once again a set of accurate, up-to-date documentation for GJS. Find it at devdocs.baznga.org!

Many thanks are due to Everaldo Canuto, Patrick Griffis, and Dustin Falgout for helping get the website back online, and to Nuveo for sponsoring the hosting.

In addition, thanks to Patrick’s lead, we have a docker image if you want to run the documentation site yourself.

If you find any inaccuracies in the documentation, please report a bug at this issue tracker.

Advertisements

As long as you fight back

Here’s the text of the letter that I sent to my representatives in the US Congress today. (I don’t live in the US, but I’m a citizen of it, and I vote.)

Dear {name}:

As I’m sure you’re aware, the President’s first destructive week in office has left many Americans fearful of whether the values of our country will continue to be carried out. You are part of the last line of defense.

As a US citizen who has lived abroad for over 20 years and been through the immigration systems of two countries, the President’s recent executive order on immigration has struck a particular chord with me. It is a cheap shot to fan the flames of xenophobia, and more refugees — not some abstract concept, but real people — will likely die because of it.

I urge you, as my representative, to do everything you can to obstruct and dismantle policies that fly in the face of decency, compassion, and what our country stands for. I am asking you to go beyond what a member of Congress usually does: these are unusual times and the current administration is not playing by the same rules that you and I are. I am asking you never to compromise and never to let up the pressure. If you want to practice bipartisanship, then reach out to those few Republicans who have not sold out. Freeze out the Republicans and Democrats who have.

This will not be an easy ride for you, but as long as you fight back, you can count on my vote.

If you are a US citizen and want to do something similar, here are some links to where you can find who represents you in the Senate and the House. (Note that to find your House representative, you need to enter your address or your extended 5+4 zip code, because of congressional district gerrymandering. Both of your state’s senators represent the whole state at large, so contact both of them.)

 

Would you write a 911 location app?

John Oliver talked in his show’s most recent episode about the US emergency services phone number, 911. It seems that now nobody uses land lines anymore, sometimes the emergency services have a hard time locating people from their cell phones.

John Oliver: “And if you’re thinking, ‘wait a minute, I can find my location on my cell phone,’ you’re not alone. Dispatchers wonder the same thing.”

Dispatcher: “I can check in on Facebook and it’ll tell you exactly what building I’m in. […] But when you call 911 we don’t get that accurate location information. The technology’s out there, it’s just not getting to us at this point.”

JO: “That’s a good point, because even the Domino’s app can tell where you are, and they’ve barely mastered the technology to make a palatable pizza! So we asked […] why it seems Ubers can find you better than ambulances can, and there doesn’t seem to be a simple satisfying answer.”

Here is my best guess at that answer, as a software engineer. Our industry has a pervasive culture of rush-jobs that get 90% of the way there and then save the rest for version 2; move fast and break things, yada yada. No emergency services provider would adopt it because it would not be reliable.

It’s reasonable to think that 90% would be better than what 911 apparently has now, which according to the video is sometimes only accurate to the nearest cell tower. However, the litigious nature of US society makes that impossible. The first time the software failed, the maker would get sued out of business.

Thus we are stuck, because we teach ourselves not to go the extra mile; and even if we went it, no-one could afford to take responsibility for making things better.

Endless is Here

For the past 2.5 years I’ve been working at Endless Mobile on something that was mostly secret. You probably caught me being vague about “computers for developing countries.” Well, secret no longer. I am excited, proud, and honestly a bit relieved to be able to say that I can finally tell you what it’s all about.

“Tell you” is a bit of an exaggeration, I’ll let the videomaking skills of my coworker Taylor Morgan show you instead. The video is at the top of our Kickstarter campaign.

We’re launching our first product, via Kickstarter. It’s a computer that’s affordable for people in developing countries, and it looks like this:

Endless One

Alien Egg

I’ve been working on writing applications for this computer, and also contributing to some parts of the operating system. Some parts of this are open source, and you can view them on GitHub.

Also, I have colleagues who are really fun to work with. If you happen to like fun and are looking for a job, there are some positions open… (It’s at the bottom of that page.)

Update: Within only four days, the Kickstarter campaign hit the original goal of US$100 000. It’s incredible. My favorite part is that almost $30 000 of that money was donated by people paying to give a computer, rather than buy one for themselves. Enough people asked for the option to donate a computer directly, so it was added. Also you can now get the whole package for yourself: computer plus swag, because enough people asked for that too.

 

Wave at the camera

You have probably seen the fake advertisement for Wave, the new way of charging your iOS 8 phone in any standard household microwave. (Although I would venture that some of the responses with fried microwaves and phones are hoaxes as well.)

I admit I did giggle when I first read it — some chump microwaved their expensive phone and blew it up, funny, right? Only I realized that it’s not funny at all.

Why shouldn’t people believe that a new technology would allow them to charge their phone by microwaving it? It’s no more or less magical than any other new technology being invented every day. It just happens not to have been invented yet.

Yes, people need to think critically, check sources, use common sense, and become less science-illiterate. Is microwaving your phone a smart thing to do? No. Could the average person probably have known better? Yes. But if you are lucky enough to be in the minority for whom this is obvious, you don’t have any right to laugh at those for whom it is not.

Faster than a speeding bullet

Perhaps not the most wisely chosen title for this Scientific American newsbite, but very cool research: “Ultra High Speed Camera Records at Speed of Light

They have built a high-speed camera with a high-enough frame rate that they were able to watch a pulse of laser light traveling through a Coke bottle in slow motion. (Pause for a moment to watch this video, for it’s really impressive. I’ve linked to the juicy part.)

You should never read Youtube comments, but on this video, people are actually asking good questions, albeit with the usual Internet rudeness. There are two very confusing things said in the video and article which I think are putting people on the wrong track.

Velocity vs. rate

This can’t possibly be true! Nothing can move faster than the speed of light.

The camera does not record at the speed of light (slightly less than 300 000 000 meters per second, or 1 billion km/h). This confuses two common meanings of the word speed: ‘velocity’ and ‘rate’. It makes no sense to say that a camera records film frames at a particular velocity, much less the velocity of light; velocity means something is moving, and in this case nothing is moving fast at all. (Except for the light pulse itself, which of course travels at the velocity of light.)

Instead, by ‘recording speed’, it really means the camera is recording at the rate of 1 billion images per second (which is not the same thing as meters per second). There is a fundamental rule saying that no object can travel at a faster velocity than 300 million meters per second, but there is no such rule for rates.

(Although, if it were an old-fashioned film camera, the film would have to feed through the camera at a velocity faster than the speed of light, which would be impossible. So it’s lucky we live in the digital age.)

“We can see photons”

The other confusing thing is that the researcher says in the video that they can see photons moving through space — that’s strictly true, but not very helpful, since you are seeing photons moving through space right now too. That leads people to ask:

Hey, I thought you could only see light when it reflected off something into your eye! How can we see the photon moving through the bottle when it hasn’t hit anything yet?

Well, the thing we see moving through the bottle is a laser pulse – not one photon but a clump of trillions of them. Out of those trillions, some hit air molecules and fly off in all directions, and some of those happen to hit the camera. We say “the pulse scatters off the air.” So, it’s true, you can’t see photons directly unless they are flying right at you. What we’re actually watching is the air molecules lighting up as the laser pulse passes by.

None of this takes away from the fact that the front edge of that laser pulse travels with the speed of light — and we are watching that in slow motion! How cool is that?

Nature, why?!

Scientific journals charge subscription fees in order to access their content. If you’re an employed scientist, the university or company where you work usually buys an institution-wide subscription to a journal. In that case you don’t have to log in to the journal website because it recognizes your IP address as belonging to a subscribing institution. In fact, you don’t even get an account on the journal website, because it’s impractical to issue an account to every single user at a university, for example.

So what do you do when you have to look up something when you’re away from your office? You use SSH with port forwarding to connect to work, then visit the website using a proxy server on that port. Since you are now browsing through a work computer, you can read the journal. There’s nothing wrong with this, because your employer has already paid for your access that content, but the barrier was simply the impracticality of issuing you an individual account.

So it’s really strange that Nature Publishing Group, which publishes the overrated Nature family of journals, seems to want to discourage this practice. If you visit the site of a Nature journal from a non-subscriber IP address, they set a cookie in your browser that says you are not a subscriber. So even when you turn on your proxy server and revisit the site, it still tells you you’re not a subscriber and can’t access the journal article. Luckily, it is easily remedied by erasing your browser’s cookies. (Easily done, that is, but not easily thought of. Hope this helps someone.)

Why, Nature, why? Why would you do this? Do you have scientists’ best interests at heart and you want to prevent them from working at home? Or do you hope that people are gullible enough to pay twice for the same content?