The Roberto Selbach Chronicles

About |  Blog |  Archive

Category: Tech

Chrome and the new Lion full-screen behaviour

Three wise monkeys by Anderson Mancini

While I was ranting about the annoyances I found in OS X Lion today, a friend commented he had no issues at all, except for the full-screen mode. I got curious because the new Lion full-screen mode is probably the only new feature I found interesting. What did Apple do so wrong?

The answer: Google Chrome.

Wait, what? My friend was complaining that in Chrome you needed to use a keyboard shortcut in order to leave full-screen mode. That, he continued, was because Apple had given programmers too much freedom to implement the new feature any way they wanted. And he knew that, he assured me, because he had searched Google and confirmed it.

The new full-screen mode in Lion is implemented as a window behaviour not enabled by default, but adding it to a window is remarkably easy*:

[go]
NSWindowCollectionBehavior behavior = [window collectionBehavior];
behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
[window setCollectionBehavior:behavior];
[/go]

Adding the NSWindowCollectionBehaviorFullScreenPrimary behaviour to a window will enable a small button to its top right corner. When enabled, the mode will allocate a new Desktop for the full-screen app and will also add an icon to the system menu to allow you to quickly leave full-screen mode.

And that’s the little icon my friend complained Chrome wasn’t showing, forcing him to use a keyboard shortcut. Imagine the trepidity! And all because of Apple.

I tried to explain that the problem was that Chrome’s windows still didn’t support the new full-screen behaviour but my friend’s version of reality was unswayable: Chrome supported the new behaviour and the problem was Apple. He had searched Google to confirm it. What could I possibly do?

Search it myself is what. And search I did. And I found this comment on Chromium’s bug tracker:

Comment 39 by rsesek@chromium.org, Jul 15, 2011

We had a conversation with one of our designers, and what we’re going to do right now is remove the fullscreen button so we don’t advertise a behavior that we don’t really implement. That change just landed and will hit Canary/Dev channels soon.

Long-term, we’re going to implement a proper fullscreen interface for Lion. In this interface, we’ll also experiment with having a collapsable toolbar. Until then, fullscreen will operate as it does on Leopard/Snow Leopard.

So there it is, straight from the source. Chromium — same as Chrome — still doesn’t support the new behaviour. Done. Nothing like reality to end a discussion.

Except my friend would not yield. Apple still needs to fix Chrome and anyone who disagrees — presumably that Chromium developer himself — is to be disregarded as an Apple fanboy.

If however you don’t want to wait for Google (or is it Apple?0 to release Chrome with the new full-screen behaviour, you can get by using Maximizer, which adds the behaviour to any application window.

  • Yes, I do realize that if you’re supporting multiple OSX versions and, even worse, multiple platforms, things get slightly more complex, but still.

(Image by Anderson Mancini)

Godwin’s Law is anything but

I’ve got many gripes with the internet, I’ll admit. One of those is the overuse of Godwin’s Law. Actually, it’s a double offence because not only people overuse it, but this Law is anything but.

But let’s start with the misuse. I posted a while ago to Facebook that I had finished reading The Rise and Fall of the Third Reich and I mentioned how scary it was that a place right in the heart of “civilized” Europe could have fallen to that madness so quickly. A small discussion formed with some people until one of my geek friends commented something to the effect of—

Let’s stop this because Roberto already Godwinned in the original post!

You see, us geeks are good at that: repeating some meme without thinking much about them.

But that’s how I see “Godwin” being used all over the place. A discussion killer. And the discussion did get killed, unfortunately. It’s like Godwin’s Law says “if someone mentions Nazis, the discussion is over” but that’s not what the “law” says—

As an online discussion continues, the probability of a reference or comparison to Hitler or to Nazis approaches 1.

Which is actually true. Just like—

As an online discussion continues, the probability of a reference or comparison to Snow White and the Seven Dwarves approaches 1.

Obviously, as a discussion grows, the probability of referencing anything will approach 1! Here’s Godwin himself back in 2008 about his “law”—

Although deliberately framed as if it were a law of nature or of mathematics, its purpose has always been rhetorical and pedagogical: I wanted folks who glibly compared someone else to Hitler or to Nazis to think a bit harder about the Holocaust.

I find it ironic that his little experiment for making people think harder about the Holocaust is now used as a tool to avoid mentions to it.

You see, I get where Godwin was trying to go. You see glib comparisons with the Nazi all the time and yes, they suck. But going from that to making one of the most defining moments of the last Century completely off-limits is preposterous! Nazi comparisons are often valid and should not be avoided, especially by misusing an old usenet meme.

Again, His Godwinness—

Still, I sometimes have some ambivalence about the Law, which is far beyond my control these days. Like most parents, I’m frequently startled by the unexpected turn my 18-year-old offspring takes. […] When I saw the photographs from Abu Ghraib, for example, I understood instantly the connection between the humiliations inflicted there and the ones the Nazis imposed upon death camp inmates—but I am the one person in the world least able to draw attention to that valid comparison.

Avoiding comparing things to something as defining as Nazi Germany is an arbitrary limitation that makes no sense.

That’s not to say that all Nazi comparisons are valid. There really are plenty of dishonest Nazi comparisons out there, such as this one, by an American governor—

We the people have been told there is no choice. You must buy health insurance or pay the new Gestapo — the IRS.

This because the Supreme Court of the United States had upheld a law that represented the first steps of that country in following the rest of the civilized world in providing its citizens with basic healthcare. Healthcare! Oh the evils of that Gestapo!

But it’s unreasonable to expect people to completely ignore a huge part of our history in hope that dishonest governors won’t make silly comparisons, which they’ll do anyway.

How to set up Emacs on Windows

Just so I have it documented somewhere for future reference, here’s how to quickly set GNU Emacs up on Windows.

  1. Download it from http://ftp.gnu.org/gnu/emacs/windows/

  2. Unzip it to, say, C:emacs or something like that

  3. Set the environment variable HOME to C:emacs and include C:emacsbin to the PATH

  4. If you want to have a “Open with _G_NU Emacs” option on the context menu, just create a registry file (call it emacs.reg or whatever.reg) with the contents below and double-click it to import it into the registry.

    REGEDIT4
    [HKEY_CLASSES_ROOT*shell]

    [HKEY_CLASSES_ROOT*shellemacsmenu]
    @=“Open with &GNU; Emacs”

    [HKEY_CLASSES_ROOT*shellemacsmenucommand]
    @=“C:emacsbinrunemacs.exe ”%1“”

Et voilà! As well, for my preferred colour scheme, we need to use color-theme from http://www.nongnu.org/color-theme/ and set it up in your .emacs file:

(add-to-list 'load-path "c:/emacs/.emacs.d")
(require 'color-theme)
(color-theme-initialize)
(when (display-graphic-p)
  (color-theme-subtle-hacker)

Suquia Creek

imageThings are starting to get busier on my new project. It is, alas, still listed as Restricted Secret, which means I cannot really talk about its details. Nor could I even reveal its codename, even though codenames reveal nothing about what a project really is. For the sake of making referring to it slightly less annoying for me, I’ll refer to it using a made-up codename in the best traditions of the company’s history of naming things for lakes, peaks, creeks, and towns. So the secret project shall henceforth be known as Suquia Creek (being the creek across from my house.)

Since I cannot give any details on Suquia Creek, what could I possibly talk about? A lot, it turns out. I can talk about things I’m learning while working on the project.

Ah boy, am I learning!

It turns out Suquia Creek is going to be the longest, most complex project I’ve worked on. Until SC came along, the longest project of my life had been Lava Peak, which ran for about two years. But that included post-launch activities. We managed to go from ideation to shipping in just under a quarter (I even won an award because of that back in 2007.) Suquia Creek, on the other hand, is scheduled to ship in 2014! That’s nearly half a decade of work.

As well, for earlier projects I only had to worry about software. Suquia Creek, however, is also hardware. And on the software side, off the top of my head, it involves —

  • Processor µcode

  • Chipset code

  • BIOS extensions

  • Firmware code

  • Drivers

  • An SDK

  • User-level apps

  • And a few other things I can’t say without revealing more than I should.

Bottom line: it’s huge as far as I’m concerned! And we should support multiple versions of Windows and one distro release of Linux. It also involves several cross-functional, geographically-dispersed teams based mainly in Argentina and the US, but also with some smaller efforts coming out of China, India, and Israel. That amounts to six different timezones, for a current maximum time difference of 17 hours.

And then we come back to schedule. I have no idea what I’ll be doing at home during this weekend, but I have to have a rough idea of what we’ll be delivering on, say, week 41 of 2013! That assumes the world will not end in 2012, of course.

This week we had our first engineering meeting to plan on a tentative schedule. Late next month I’ll be flying around between Silicon Valley and Silicon Forest to work out the (semi-)hard schedule. By then, we’ll actually have one internal alpha release in place already. After that, we’ll have another alpha before our first “release”, an internal proof of concept, which will then be used by customer as part of a (quasi-confidential) pilot. The customer? One of the world’s largest… well, can’t say what is their industry yet. It’s huge though.

After that pilot I expect to be able to open up a bit on what the project actually does. In the meantime, I’m going to be sharing my learning experience.

It’s going to be an exciting half-decade for me :–)

A Decade as a Linux Pro

After I recently accepted my old age, I was talking to some friends who, to their own surprise, found they were old too. We were talking about when each of us started working with Linux and a friend noticed he had been working with Linux for 10 years. That’s when I realized it’s been a decade since I was first paid to work with the operating system.

I had been using Linux for a little while. My first contact with it was in mid 1995. I had bought a computer magazine from the UK that had this pink CD-ROM with something called Linux-FT.

One of the cool things about Linux-FT was that it had a licensed copy of the Motif window manager, which was pretty cool at the time. I had been using some RISC boxes in college running CDE, so I felt right at home.

infomagicNot long after that, a friend who was an administrator at a new ISP let me borrow his Walnut Creek CD-set containing Slackware 2.1 or 2.2 (I’m not sure anymore. Old age, remember?) Then I purchased a copy of the wonderful InfoMagic 5-CD set containing Slackware, Red Hat, mirrors of some FTP site and another distro I can’t remember either (Shit! I’m old…)

Then in 1999 I was hired to help this company migrate from Windows to Linux. It was the first time I was ever paid to do anything related to Linux.

I went to work at Conectiva the next year, where I learned I didn’t know anything. What the heck do I do now? That’s also where I learned like never before, made lots of friends, and found the love of my life. (No, not another Linux distribution! I mean my wife! What’s wrong with you?)

In 2004 I left Conectiva and started working with one of the company’s founders on another Linux project. The work itself was interesting, but it was also my first contact with something that I would see a lot more in the future: the downright dishonesty of Linux entrepreneurs in Brazil. Of course, I then thought it was an isolated thing and decided I didn’t want to be a part of that and left the company in 2005.

That’s when I came to Intel to work at the CSO, a “personal” project of Andy Grove. CSO had a simple mission: to foster Linux usage by financing and providing engineering to business with good ideas. How great is that? I was going to work on my passion (Linux) and meet all kinds of people who shared it with me. What could possibly go wrong?

Oh boy.

In the following year I’d see things that would still make me sick years later. From businesspeople to self-appointed free software leaders, all I saw was guile and greed. It was such a disappointment that I requested a change. I stopped working with Brazilian businesses and projects completely, moving to support projects in other countries. Things were much better, which is another disappointment and one of the reasons why I hold us Brazilians in such low regard as a people.

Outside Brazil things were very different and despite some funny things here and there, I am proud of the Linux work I’ve done, especially the megalarge project with the government of Venezuela. I even met Hugo Chavez, which is funny considering my political stand 🙂

Regardless, I was also getting disappointed at other things as well. After years developing projects such as KDE, I was bored to death. I started witnessing things being done on other platforms and suddenly the Linux desktop just felt stale to me. It was dull and lifeless and at the same time I was doing all these cool stuff on Windows.

Add to all that the fact that KDE started getting full of kids adding more and more useless features… and politics… ever heard the one about the moppet who decided that all KDE About boxes should contain a thank-you note to American troops worldwide? And he wasn’t even American? You know what?

Screw Linux.

I dropped it like you wouldn’t believe. And it felt good. Not having to edit configuration files to do something simple made stuff pleasant again. I was introduced to Mac OS X and I loved it. It was Linux on steroids. All the good stuff without the kludge.

No more politics. No more GNU Slash Linux. No more open source vs. free software. No revolutionary-audio-framework-of-the-month. No juvenile cockiness. No rWindoze. No Micro$oft.

Just fun.

After nearly 15 years, I’m truly free.