Blog

Later Ctrl + ↑

Rename layer in Photoshop CS6

In previous versions of Photoshop I’ve always set up F2 to open Layer Options dialog. The layer name field was focused by default, so that’s how I renamed layers.

For mysterious reasons in CS6 Adobe has removed Layer Options from the list of things for which you could use a keyboard shortcuts. I was upset. I had to use mouse to rename layer (which takes ages). And why on Earth out of all things would they remove this from the infinite list of configurable shortcuts?

I was almost going to file a bug report, but found a new Rename Layer... item in the Layer menu. Of course it is listed in configurable menu shortcut list, so now I have F2 as a shortcut for it:

I found out that Layer Options were removed from the keyboard setup because the very dialog was removed from Photoshop altogether. That makes sense now that you rename layer with a dedicated command and select its color from a popup menu.

So if you had the same problem, now you don’t. And if you haven’t bothered to set up a shortcut to rename a layer, it’s about time to do it: it will save you tons of time.

Two nice features of Blackberry 10

Here’s a short review of Blackberry 10 from The Verge:

Cool stuff:

  1. Live photo editing (1:20...1:34). It’s hard to explain in a few words, just watch the video.
  2. Word suggestions right inside the keyboard (1:46...2:02). I don’t know if it’s useful, but definitely looks interesting.

Also, the overall UI looks quite nice.

We need people to invent their own stuff

While everyone quotes Cook’s toaster and fridge phrase from the latest earnings call, I think the most important is this:

The key thing is, it’s important that Apple not become the developer of the world. We need people to invent their own stuff.

I want that, too. Today Apple is the only company in the world that does in consumer electronics stuff that matters. Even if you like Apple (as I do), it’s a reason to be worried, not to be happy.

Moving OS X Lion windows by dragging the borders

Did you know that you could not just resize, but also move a window by dragging its border in Lion?

When you drag left or right border horizontally, you resize the window. But if you try to drag it vertically, the whole window will move. Same thing with top and bottom borders: try dragging them horizontally to move the whole window. Nice touch.

By the way, if you’ve missed it, when resizing Lion windows you can use Alt and Shift the way you do in Photoshop (to resize from center and to preserve proportions respectively).

Microsoft as an enterprise company

MG Siegler on Microsoft:

Essentially, they’d follow the IBM path. Nothing wrong with that. IBM is still a great company, they’re just different from what they once were.

For some reason though, all anyone cares about is the consumer space. And, let’s be honest, Apple now owns it. If it’s not clear to you now, it will be in a year. Or two years max. It’s just the way it is.

In five years, Microsoft will be known as an enterprise company. That’s not controversial in my book, it’s just an observation on where things are headed.

Unit share not important

Oleg Andreev explains why unit share is not that imporant:

Units do not tell you much. There are very different categories of products and prices hidden behind the units. A person who buys a $50 phone does not usually consider buying an iPhone for $500. Or he may consider buying an iPhone instead of buying a cheap phone, handheld game console, wristwatch, a calculator and a flight to visit parents.

More on PHP’s “bad design”

In the previous post I was responding to PHP: a fractal of bad design, and I was talking about the main topic. Design that is. But the post also made me smile and shrug my shoulders many times, and I wanted to share why. I’m sorry, but I wasn’t able to find the author’s name anywhere on his site (speaking about design).

What amused me was that many of the discussed problems there are made up. For example, he is talking about this line of code:

@fopen (’http://example.com/not-existing-file', ‘r’);

He writes a whole thing about how it works, and presents every point in his list of things as a surprise. And my reaction is, yeah, that’s obvious for me that PHP would do that, so what exactly is wrong?

Or, he writes:

"6" == " 6", "4.2" == "4.20", and "133" == "0133" and adds “But note that 133 != 0133, because 0133 is octal.

He implies, I guess, that something about this is wrong or unpredictable, but he doesn’t say what, and I really have no idea. I mean, come on, you should know a language’s syntax to write programs in it, right?

Or he explains how global variables work:

Global variables need a global declaration before they can be used. [...] globals can’t even be read without an explicit declaration — PHP will quietly create a local with the same name, instead. I’m not aware of another language with similar scoping issues.

Not a word on what he thinks of as an issue. Isn’t it OK for languages to differ?

I’ve been programming in PHP for some ten years and for most of the things he talks about, it never even occured to me that it was a problem. Also, I didn’t know many of the things he wrote about, because to encounter them you have to be really sloppy. He deliberately writes some messy code (like five nested ?:’s or 2 < "foo") and then complains that PHP does not execute it the way he wanted.

If you don’t know the language really well, at least write a clear and readable code, and it will work fine.

The great design of PHP

The epic post PHP: a fractal of bad design is worth a read. It’s really interesting, especially if you are a PHP programmer. The author of this post deserves a credit for the work he has done, and there’s a lot to learn (though I’ll get to some questionable details next time).

I was thinking about how to approach the design thing he’s talking about. I felt like he was totally missing the point. Probably, PHP’s design is bad from some theoretical, computer science point of view. But it is great from the real life point of view.

The PHP source code for a “hello world” page is literally “hello world”. This is where the design starts, and it’s big. Trivial things are trivial, simple things are simple, then language gets more complex the more you want from it... and one day it gets really complex and you build Wikipedia. It scales smoothly from hello world to that. While there are indeed many quirks in PHP, they are just minor details. But the learning curve thing is a major strength.

In the post, the examples like Wikipedia and Facebook and WordPress are dismissed like they are irrelevant. But it’s no coincidence that they are there. Jeff Atwood poses a question: “If PHP sucks so profoundly, why is it powering so much of the internet?” And I think I know why: because of its great design.

Good design in terms of computer science attracts geeks who usually make tools for geeks. Just look at the list of Python software. I bet my mum haven’t heard of anything in the list. Good real-life design attracts normal people who want to build something for normal people and who desperately want to start building it now. It’s the design of PHP that makes those great products much more likely to happen.

Simple and powerful leads to popular and successful. And for me “popular and successful” is a much better metric of good design than some criteria made-up specifically to make your point.

Earlier Ctrl + ↓