Archive for the ‘Technology’ Category

It’s Valentine’s Day and here’s the point where I have to confess my love as a software engineer for QML. It’s a markup language for building simple modern UIs with Javascript controls, and can be bound to C++ and Python via Qt. Since it’s based on Qt it runs on pretty much any modern desktop or mobile platform you can think of.

But like any relationship, sometimes one is left wanting for more. Sure, QML is great but it has flaws that are hard to overlook. For example, there’s no “tree view” component (think: file system UIs, Windows RegEdit, etc.) which is a deal breaker for some use cases.

That deficiency ends today.

I’ve been busily working on my own tree view implementation, which you can find on GitHub. It supports drag and drop rearranging and folder creation with a mouse or touch interface. Like the iOS home screen, folders are limited to one level (i.e. no subfolders.)

Here’s the sample test harness in action:

The trick? It’s all a standard QML ListView with a special type of delegate, my own RearrangeableDelegate.

The items can be rearranged by pressing (or long-pressing, see update below) on them, then dragging to the desired space. If you position it between two items a line appears, and releasing the mouse positions the item at that location. Positioning on top of an item causes the two items to pop out into a new folder. Dragging the last item out of a folder deletes the folder. If you want to have special items at the top of the list that can’t be rearranged, that’s supported via the numStationary property.

Everything is designed to be styled to your liking. Want to change the drag border, the opener image, the indentation, etc? Easy! Just set some of RearrangeableDelegate’s existing properties and you’re good to go.

The UI state of each item is stored in the list model itself, which provides an easy (if somewhat hacky) way of maintaining the UI state with a database or settings file. Here’s what you need to provide, subject to change:

ListElement {
// Unique id (integer)
uid: 1;
// Used for drag and drop UI. (Persistence not required.)
dropTarget: "none";
// True if a folder, else false
isFolder: false;
// -1 if not in a folder, else the uid of the parent
parentFolder: -1;
// For folders, this indicates whether their children are
// displayed. Otherwise, indicates if visible.
folderOpen: true;
}

Best part: I’m giving away the entire thing for free under the MIT license, which ought to satisfy pretty much everyone (except for Richard Stallman.) Take my code and do what thou wilt. If you encounter a bug please file a new issue or fix it on your own and submit a Pull Request. Either way I — and perhaps other QML developers — will be eternally grateful for your ongoing efforts to make up for this missing QML component.

UPDATE: After convincing Hryx to do some user testing, we decided that long-pressing wasn’t discoverable enough for a desktop. So now there’s a flag called dragOnLongPress to control this behavior. By default it’s set to false so that a long press isn’t required to move an item around. You can set it to true in situations where a long press to move makes sense, such as on touch and mobile devices.

Now if you really built a free energy device — that is to say a device that takes no input and emits electricity (or something that can be converted to electricity, such as motion) — you would not settle for less than $60,000. The device would be worth hundreds of billions of dollars if not more. The amount saved on coal mining and oil drilling alone would be astronomical.

Of course, anyone who remembers anything from their high school physics class knows that energy has to come from somewhere. That doesn’t stop people from trying the impossible; there’s dozens of websites and forums on the internet for those who “just want to believe.” But most of those people simply have strange ideas and too much time on their hands — they’re not asking people to pony up tens of thousands of dollars so they can take a free vacation around the world.

So let’s look deeper at this particular scam and how it came to be.

Who’s who

Let’s assess the major players here:

Naima Feagin, aka Hope Girl, runs an organization with the completely understated title “Fix The World.” According to her LinkedIn profile, this organization came about after exposing a massive conspiracy:

In 2012 Naima conducted a research project under the pen name “HopeGirl” that exposed hidden levels of global financial issues and their effects on society. This research resulted in a book of solutions written by 300 people from 37 countries titled “How to Fix the World” which quickly went viral on the hopegirl2012@wordpress.com [sic] blog

She goes on to claim that in six months (from August 2012) we’ll all see that this is true because a resistance movement will have changed everything:

“There will be enough food and water for everyone…”

“Many people will not have to get sick, suffer and die…”

“There will be free energy for everyone.”

“New technology will dramatically change the way we live and do commerce, making interstellar travel possible for everyone.”

How do we know this is true? Well of course: “This is the future that I am choosing to believe in.” Sounds like someone read The Secret!

Surprisingly, there was never a follow up post after six months that explained why this future didn’t occur in six months. I guess we’re stuck with the 2,000+ years as predicted by Star Trek?

Hope Girl’s stepfather James M. Robitaille is the electrical engineer behind the QEG. There isn’t much information about him on the internet, but according to the IndieGoGo page his former accomplishments include designing an in-car vacuum cleaner for Honda.

“Sir Dr.” Timothy Thrapp runs a religious technology group called WITTS Ministries. Among other claims, WITTS says Jesus will help us cure cancer, end pollution, and make cars that run on air and water. (I guess they have a newer version of the Bible than I do.) One of their projects is a free energy generator that claims to draw its power from the quantum field.

Birth of the Quantum Energy Generator (QEG)

Clearly, WITTS makes some pretty wild claims. But what are claims without proof? Well, WITTS would love to prove to you that their technology is sound, provided you’ll make some pretty sizable donations to their sister group, Enlightened Technology. The plans alone cost $300, and the required training starts at $1,000 an hour. Yikes!

Hope Girl’s stepfather found out about the WITTS quantum generator, somehow decided it was real, and decided to copy it without the help of WITTS and/or Jesus 2.0. Their new device would be called the Quantum Energy Generator, and Robitaille’s electrical expertise could bring this device to every corner of the world.

World Improvement Ministries HAS OVER 300 independent Engineers that have made video testimonies and/or audio testimonies and or written, signed and notarized sworn to under oath, written testimonies of each of their independent verifications.

It would be interesting to compare the list of those 300 engineers with the “300 people from 37 countries” Hope Girl mentioned, wouldn’t it? Or is 300 just a number you pull out of your ass when you wish to sound like many people agree with you?

QEG goes open source

The team behind the QEG eventually open sourced the design. Or at least they open sourced something. The PDF document is a mixture of instructions, techno-babble, and a copy of a seemingly unrelated patent from Nikola Tesla. Like many of his contemporaries, Tesla didn’t believe in quantum mechanics.

The document warns you that even though the device is open source, you should never attempt to build one on your own. One such warning says that “A considerable level of knowledge in quantum physics is also required,” a field neither Robitaille, Naima, nor anyone at WITTS claim to have education in.

They later clarified this quantum physics requirement in another document, because it involves (of course) yet another conspiracy:

There are no physics papers on this as far as we know. this knowledge has been suppressed for over 100 years.

It’s bad enough that the document doesn’t describe how it works or why the Tesla patent is involved, but now we have to learn an entirely new version of quantum physics that we couldn’t have known before? Oh dear! Worse yet, Fix the World hasn’t revealed any details of their new scientific theory so far.

Perhaps the most troubling statement in their original document is this FAQ entry:

Does the QEG emit radiation?
No — it’s not that type of energy.

Exactly what “energy” is being emitted, then? It certainly can’t be electricity if there’s no radiation. So what is it, and why isn’t it defined?

Somehow this great open sourcing of the plans leaves more questions than answers. There’s even more pieces of the puzzle missing than there were before.

Why did they need to raise money to fly to other countries to build this? Because shipping the device pre-assembled might end up with the questionable device stuck in customs, and because Robitaille’s quantum energy expertise is unparallelled, the family team hopped on a plane to Taiwan, London, and Morocco.

It was only after getting off the ground that they announced they had achieved something called “Resonance,” which they never took the time to define. It certainly does not mean (spoiler alert!) that any form of measurable electricity is generated.

Further down the rabbit hole, she decided that negative comments left on her blog and YouTube videos were evidence of a vast government conspiracy which is proven by a couple of completely out-of-context slides from the Snowden leak. (Apparently this is a new kind of proof where you don’t have to connect all of the dots.)

In other words, anything that contradicts Hope Girl’s mentality of “it’s true because I believe it” is negative, and therefore the result of government sponsored internet trolls.

On the one hand the QEG is indeed a machine, but a totally different kind of machine than the ones we are so familiar with. It is true that she may need a skilled technician to build her, but truly requires a shift in consciousness to understand what makes her ‘tick’. And that’s where one’s attitude in this whole process can and will make a difference….

Take for example the “double-slit experiment,” where the mere act of ‘observation’ can completely change the outcome of an event. There are a number of things so far, involving the measurable part of the QEG, which currently may not make any sense… but then perhaps it needs a different level of sensitivity all together. Your presence, your state of mind, your attitude are believed to be key ingredients in observing the successful creation of this free energy device. This forum supports that belief and vision.

In short: There is no place for skepticism in this forum, you won’t get far trying to court a lady with skepticism, cause truly that is what the QEG is, a Lady with a mind and a will of her own.

When asked the simple question of how the device works, the question was met with similar hostility:

This goal cannot be achieved if your attitude is one of …. “skepticism.” The quantum realm does not work that way. Healers in general have a knowledge of how the quantum realm operates, and responds, providing what we expect, and using intention to accomplish. We have to clear and clean our emotions and minds in order to successfully heal…..

In other words, even questioning how the device works may cause it to fail! Apparently the QEG is like a drug-induced buzz, and it won’t work if you harsh its mellow, man.

Like many people who lack basic critical thinking skills, “the government” and “corporations” are not things that exist but rather reasons in and of themselves that don’t need to be connected via evidence to indicate wrongdoing. Merely stating their names is enough; no further explanation is necessary.

Government… corporations… government… corporations… oh no, the QEG will never work now! It was entirely my fault for using those words!

There is, of course, a very simple explanation for all of this. Like Steorn Orbo and other alleged free energy devices, the QEG and WITTS generators are a mix of wishful thinking, workshop skills, and a misunderstanding of the results.

Finding gullible people on the internet is like shooting fish in a barrel. Building a device that breaks the known laws of physics is not something a group of conspiracy theorists are going to accomplish while vacationing around the world on someone else’s dime.

Is this truly a scam? One could argue that Hope Girl’s apparent belief in the machine indicates that it’s not an intentional scam but rather an honest mistake made by someone who takes charlatans seriously. But honest mistakes don’t involve taking money from people to travel the world and give vanity speeches. Just because people who are gullible exist doesn’t make it right for you to take their money. It doesn’t matter if televangelists disagree — even if you can find 300 of them.

Too often we reward those who sell dreams with unsubstantiated claims. And who could stop them? Consumer protection agencies can’t bother with the small timers, and it’s not always in the interest of payment processors and crowdfunding platforms to turn them away. It seems we’ve allowed crowdfunding to elevate small time scam artists — accidentally or not — to the global level.

The dubiously named Fix the World is now claiming they have achieved what they’re calling “overunity,” where you get more power out than you put in. Of course, they also provide no evidence, just like always. There seems to be a pattern here. But that pattern hasn’t stopped them from raising over $13,000 in their latest crowdfunding scam (mentioned above.)

I was also alerted to something called an Ecklin generator, also known as a Brown-Ecklin generator. Apparently the people behind this device device promised the OMNI Magazine crowd in the 70′s and 80′s that they too could generate energy out of nowhere with some spinning magnets and whatnot. And much like the QEG, the people behind it couldn’t explain how it worked because they overlooked the most obvious answer: that it doesn’t work.

And to those like HopeGirl who labels any who dare question her as a troll, I ask you this: who is the real troll here? Is it the person who seeks donations for a seemingly impossible device that they refuse to prove actually works? Or is it the person who says you should donate your hard earned money to something that helps people, like a food bank or the Red Cross?

UPDATE 2: October 1st

I’d gotten the family relationships wrong regarding some of the people involved. Sorry about that, I’ve corrected the post to avoid confusion.

Now that the QEG is a bust Hope Girl would like even more money to move to Morocco. As much as I’m sick of people giving money to Hope Girl rather than legitimate causes, a part of me really wonders what elaborate rationalization she’ll have to concoct regarding why Morocco’s QEG still isn’t functional if she ever returns.

The other day while hacking away on some C++ code and listening to music, something occurred to me: if I’m programming in C++, shouldn’t the music I’m listening to be in the same language?

So I took a few verses from various random songs and coded up C++ translations of the lyrics. Here’s what I was able to hack together.

2Pac – Dear Mama

English:

When I was young me and my mama had beef
Seventeen years old kicked out on the streets
Though back at the time, I never thought I’d see her face
Ain’t a woman alive that could take my mama’s place

C++:

// When I was young me and my mama had beef
if (this->young()) {
this->append(new Beef());
mama.append(new Beef());
}
// Seventeen years old kicked out on the streets
// Though back at the time, I never thought I'd see her face
if (this->getAge() == 17) {
this->remove(getShelter());
this->seeFace(false);
}
// Ain't a woman alive that could take my mama's place
mama.replacement = NULL;

The Beatles – Hey Jude

English:

Hey Jude, don’t make it bad
Take a sad song and make it better
Remember to let her into your heart
Then you can start to make it better

C++:

// Hey Jude, don't make it bad
jude.it->make(!JudeState::BAD);
// Take a sad song and make it better
sadSong.improve();
// Remember to let her into your heart
jude.setReminder(new Event(JudeState::ENTER, jude.getHeart()));
// Then you can start to make it better
jude.it->make(JudeState::BETTER);

David Bowie – Man Who Sold The World

English:

Oh no, not me
I never lost control
You’re face to face
With The Man Who Sold The World

C++:

// Oh no, not me
// I never lost control
assert(this->control != NULL);
// You're face to face
// With The Man Who Sold The World
Man m;
m.sell(world);
you->setFacing(&m);
m.setFacing(you);

Lady Gaga – Born This Way

English:

Don’t hide yourself in regret
Just love yourself and you’re set
I’m on the right track, baby
I was born this way

C++:

// Don't hide yourself in regret
if (!you->visible && you->regret)
you->visible = true;
// Just love yourself and you're set
you->love(you);
// I'm on the right track, baby
getTrack(Track::RIGHT)->set(this);
// I was born this way
assert(this->state == this->creationState);

The Police – Every Breath You Take

English:

Every breath you take
Every move you make
Every bond you break
I’ll be watching you

C++:

while(true) {
switch(you->getEvent()) {
// Every breath you take
case BREATH:
// Every move you make
case MOVE:
// Every bond you break
case BOND_BREAK:
// Every step you take
case STEP:
// I'll be watching you
this->watch(you);
break;
default:
assert(false);
}
}

Kanye West – Power

English:

No one man should have all that power
The clocks tickin’ I just count the hours
Stop trippin’ I’m tripping off the power
Till then, fuck that the world’s ours

Until now, the process for solving technical problems involved Googling around for advice on forum posts and help pages.

The advice is always the same, isn’t it?

Follow an obscure sequence of commands.

Now try again.

If there’s comments on the page, at least a dozen will have conflicting reports about the outcome of these steps.

If it doesn’t work, go back to Google and look around some more.

Of course the tech geeks could be messing with you. By following the advice your TV won’t turn off and your wedding photos are permanently deleted. Who knows.

Fortunately there’s now a better way to solve basic technical problems; devices that STFU when you smack them. Microsoft has invented the first phone you can physically abuse when you need it to just shut up for a minute so you can think for once, goddamn it.

I’d suspect that if this feature seems intuitive, you shouldn’t have kids. But then again people have been smacking their TVs for decades so the gesture is already in our collective consciousness. And who wouldn’t want a TV that stops breaking when you hit it?

Besides, not all emotionally responsive technology needs to involve violence. How about a flashlight that turns up the brightness when you’re shaking in terror? Or cars that soothe anxious drivers with relaxing music to prevent road rage? Or a bathroom scale that subtracts some weight if the user is crying?

There’s all kinds of ways our gadgets could be made fixable that don’t involve following the advice of strangers online. Get with it, tech companies.

And let me know when you have a computer that works better when I start cursing under my breath and slamming on the keyboard. I’ll be first in line to buy it.

One of the best features of Mac OS X is TimeMachine, a ridiculously easy to use backup system. The downside to TimeMachine is you either have to use an external hard drive or buy Apple’s TimeCapsule backup hardware.

Turns out there’s a third option — use a Linux PC as your backup server.

With Ubuntu Linux 12.04, I highly recommend following this guide, which explains the safest route. Keep in mind it’s completely unsupported by Apple, of course, so if your backups are overwritten with My Little Pony pictures, don’t go complaining to the Genuis Bar.

A couple notes on the guide:

Most users can safely ignore the part about Shorewall settings.

The guide glosses over user-level security. You could use your normal user account for backups, but you should consider setting up a special user account just for TimeMachine. That way if someone hacks into your Mac, they’ll only have access to your backups and not your entire Linux PC.