960gs ExtendScript for Photoshop CS5

960gs ExtendScript for Adobe Photoshop CS5

Tired of manually adding guides for the 960 Grid System, I started looking for Photoshop actions/scripts. I found a few, but none of them really met my needs. Most were writtern for earlier versions of Photoshop, and therefore didn’t work at all. Those that worked were either not configurable, or created new documents (I wanted to add guides to existing documents). So I did what every self-respecting programmer would do and wrote my own.

The script is painfully raw, and despite a few sanity checks, it should be pretty easy to make it crash with the wrong input or settings. However, it has some nice features:

  • Disable gutters by putting 0 for gutter width
  • Optionally add evenly-spaced horizontal guides
  • Optionally align the grid to the left (defaults to center)

Download

You can download the script from GitHub: 960gs ExtendScript for Adobe Photoshop CS5

Installation

  1. Place 960gs.jsx in the Presets › Scripts folder under the Photoshop application folder. For Mac OS X, the full path should be:

    /Applications/Adobe Creative Suite 5/Adobe Photoshop CS5/Presets/Scripts
    
  2. After restarting Photoshop, the script should appear under File › Scripts.

Direct Usage

If for some reason you don’t want to install the script in your Photoshop folder, you can use it directly by double-clicking on 960gs.jsx or by going to File › Scripts › Browse…

Samsung XL2370 Unboxing and First Impressions

The Samsung XL2370 LED Monitor has finally become available in Turkey a few days ago, after a long delay (it was released in Europe in August).

This coincided nicely with the death of my 5-year old Samsung 205BW a couple weeks ago, so I started waiting for the big day, announced as March 26th by hepsiburada.com.

The monitor became available even earlier (March 24th, IIRC) on sanalmarketim.com, an e-tailer that I’ve come to love and trust over the past couple of years, but I decided to wait until the 29th to see if I could get a better price from brick-and-mortar stores. With no sign of XL2370 at Vatan Computer on the 29th, I placed my order, becoming one of the very first people to get Samsung’s “highest performance” monitor in Turkey.

My order just arrived about an hour ago, and here are my first impressions after an hour of use:

  • It’s sharp, but still not as sharp as my MacBook Pro’s display.
  • It can be extremely bright, to the point that it will make your eyes bleed. (UPDATE: I’m officially using the monitor at 0 brightness right now. It’s that bright.)
  • It’s also very responsive, especially when “Fastest” is selected under “Response Time” in the menu.
  • Combining the last two points, it’s perfect for watching movies, and much better than my LCD TV for this purpose.
  • It has an HDMI input, and both analog and optical digital audio outputs, making it perfect for use with a game console, Blu-ray player, etc. In fact, my satellite receiver has an HDMI output, so this could easily replace my TV.
  • Text performance, as far as I can see, is nothing to write home about. It’s good, but not much better than my now dead 205BW.
  • It’s thin. And I mean thin. Wafer-thin.
  • There are no elevation, tilt or swivel adjustments, and the stand is a bit short. This translates to the bottom end of the monitor being a bit too close to the table, making it slightly uncomfortable for a guy my height. I might consider raising it with a book or something.
  • The frame and the stand are acrylic, and therefore almost impossible to keep lint-free.
  • The touch-sensitive menu buttons, combined with almost no feedback, might not be easy to get used to.
  • The packaging, especially that of the neck of the stand, is not for the faint of heart. It took me a good 15 minutes to remove every last bit of static cling from the neck. Acrylic + static cling = not a good idea.

and that’s all I can think of right now.

Finally, here are the unboxing photos:

UPDATE (Dec. 18, 2010): A few readers asked for an update on the monitor. Unfortunately I don’t have time to write a full review, but here’s an excerpt from my reply to one of those readers:

I still have the brighness at 0. At this setting, this monitor has the same brightness as the MBP’s internal monitor at 50%.

It’s a bit low, but I haven’t propped it up. I guess I got used to it after a while, but you might want to have a thick book handy.

One thing about the monitor’s height. I’m 6’4″, and when I sit up, there’s about 15 cm between my line of sight and the top of the monitor (which isn’t ergonomic at all but anyway). Even though the official specs state a vertical viewing angle of 160 degrees, there’s noticeable discoloration on the lower half of the screen; especially on window shadows. This doesn’t bother me that much, but it will probably bother you if you do a lot of design work.

When I lower my chair (or lift the monitor), the problem goes away. Color calibration could also help, but I’m not an expert on that.

The resolution is great, and I have more than enough screen real estate for my work. Sure, 2560×1440 would be even better, but I don’t think there are many monitors that have that kind of resolution. The ones that do cost an arm and the better part of a leg. If you have the money, I’m sure the new 27″ Apple LED is a better monitor.

Keep in mind that most of my work is coding in Xcode and TextMate, and I like to keep my workspace clean; so I usually have one fully maximized window per screen. I use Spaces heavily. However, there have been instances where I had 2 or 3 large images open side by side in Photoshop; and the Samsung has enough real estate for that. I never used Final Cut so I can’t comment on that.

The acrylic doesn’t bother me at all. It collects dust, but wiping it once a week is more than enough.

Turkcell 3G and Speedtest.net

TUAW‘s TJ Luoma recently posted speed test results for Wi-Fi, 3G and EDGE connections using FCC’s Mobile Broadband Test app running on an iPhone 3GS on the AT&T network.

With all the ads Turkcell is running claiming they have the fastest 3G network in Turkey, I thought I should do the same with my iPhone 3GS on Turkcell. I averaged 3 tests like TJ Luoma, but I used the Speedtest.net app. Both apps are made by Ookla, so I can only assume there won’t be any difference between the results.

Here are the original results for AT&T from TUAW:

Network Download (kbps) Upload (kbps) Latency (ms)
Wi-Fi 4,371 612 741
3G 1,960 310 1,054
EDGE 64 54 4,936

and here are my own results for Turkcell 3G1:

Network Download (kbps) Upload (kbps) Latency (ms)
Wi-Fi 10,595 9,759 37
3G 2,249 229 203
EDGE 159 91 4,694

It’d be great if someone could post results for Vodafone Turkey and Avea.


  1. For Wi-Fi, I used an Apple AirPort Extreme on a 100 Mbps Superonline fiber connection. 

Multitasking and iPhone OS

You can’t believe how many times I’ve been asked if you can listen to music while browsing the web on the iPad. Or rather, I’ve been “told” that this was the case, with varying levels of certainty.

As anyone who has ever used an iPhone for more than 15 minutes knows very well, this is simply not true. You can listen to your music while browsing the web. In fact, you can do much more.

Multitasking is the ability of an operating system to run multiple processes (tasks) at the same time1. The last non-multitasking operating system I used was MS-DOS. Of course other single-tasking OSes have been released after DOS2, but the iPhone OS is, and has always been, a multitasking OS.

What this means is that the iPhone, and therefore the iPad, is capable of running multiple applications simultaneously. In fact, 20 applications are running simultaneously on my non-jailbroken iPhone 3GS right now3.

So, to answer the question explicitly: yes, you can listen to music while you’re browsing the web on the iPad. iPod is always running in the background, even if you’re not listening to music. Mail also always runs in the background, so you’ll be notified when you have new mail. Finally, thanks to push notifications, you’ll be able to receive Facebook notifications, MSN messages, etc. while you’re reading an academic paper, writing an email, or browsing the web.

Restrictions

So, what is this “lack of multitasking” people can’t stop talking about? Apple does not allow third-party applications downloaded from the App Store to run in the background. The reason for this is simple: battery life. When an application is running in the background, it uses the CPU, and therefore drains your battery.

Battery life is very important for a mobile device; everyone wants more battery life. But everyone also wants lighter devices. Otherwise, Apple could always build an iPad that has 100 hours of battery life but weighs 5 kilos.

Let’s consider how we use multiple applications simultaneously on our computers: we either have some applications (email/IM client, music player, etc.) running in the background, or we have a two or more applications running side-by-side on the same screen (a web browser and a word processor, for example).

Push Notifications

As I’ve said before, your email client and music player are already running in the background on the iPhone OS. Technically, you can’t run IM clients in the background, but thanks to push notifications, you’ll continue receiving your messages. Apple actively encourages developers of such applications to take full advantage of push notifications, and almost all such applications (Facebook, all important IM clients, some games, etc.) already support them.

I agree that push notifications aren’t perfect, and that they don’t work for all applications. For example, a Twitter client could check for new tweets periodically if it could run in the background (and this is what most desktop Twitter clients do), but it’s infeasible to use push notifications for Twitter4.

Be that as it may, I argue that responsiveness and battery life are still more important for most users. The iPhone’s CPU simply isn’t powerful enough to run more than a couple of third-party apps in the background and still maintain the responsiveness of the frontmost app. If, however, the new A4 chip is powerful enough, Apple could let at least some third-party apps run in the background and leave the decision about battery life to the user.

Now, let’s focus on the case where you run two or more applications side-by-side on the same screen.

While realizing that this might be an issue for some people, we also have to realize that iPhone OS devices (iPhone and iPad) do not have enough screen real-estate to fit two or more applications and the keyboard on the screen, and still remain usable5. The iPad’s screen has a resolution of 1024 by 768 pixels, while the iPhone has less than 20% the number of pixels with a 480 by 320 pixel screen. These resolutions almost halve when the keyboard is displayed.

In lower resolutions like these, you switch between applications instead of running them side-by-side. This is what everyone was used to doing before high-resolution displays became commonplace a few years ago. Most netbook users I know still complain about, among many other things, being unable to fit two windows on the screen.

Full Persistence

There’s still one fundamental difference between iPhone OS devices and general purpose computers, though: you can’t minimize or hide an application on the iPhone OS. But here comes the best thing since sliced bread: full persistence. Apple uses full persistence in all their iPhone applications, and encourages all iPhone/iPad developers to do the same.

But what does full persistence mean? It means when you quit and relaunch an application, the application will be in whatever state you left it in. If you quit Facebook while you’re looking at a friend’s profile picture, Facebook will be showing your friend’s profile picture the next time you launch it. If you were in the middle of a sentence when you quit Notes (or Pages), you will be at the same place, having lost not a single word, when you relaunch it. This is known as full persistence, and it blurs the line between minimizing or hiding an application and quitting it.

Of course, I have to admit that the current state of full persistence on the iPhone OS isn’t without its problems. The most important issue is that not all applications support it. The main reason behind this is that it’s a lot of work to implement full persistence for a reasonably complex application. However, I expect Apple to add OS-level full persistence support in the near future.

Another problem is that there’s no Command-Tab equivalent; you have to go through the home screen to switch between applications. I also expect Apple to provide an easier method for switching between applications, at least on the iPad.

Conclusion

Apple has very valid reasons for restricting multitasking on the iPhone, and I don’t see them making any changes with regard to multitasking on the iPhone anytime soon, at least with the current iPhone devices. Some of these reasons are less valid on the iPad, and I believe Apple will at least make this restriction much less noticeable in a future software update, possibly 4.0.

Finally, TidBITS has recently published an article on the same issue entitled “Does the iPhone OS Need Multitasking?,” which is well worth a read.

P.S. First post in 10 months. I’m back, baby!


  1. Or more precisely, create the illusion of doing so, but I shall not go into further detail. If you want to learn more about multitasking, you can read the Computer multitasking article on Wikipedia. 

  2. The most notable one being Palm OS

  3. Here’s the list from iStat: kernel_task, launchd, syslogd, lockdownd, mediaserverd, mDNSResponder, IQAgent, fairplayd, configd, accessoryd, SpringBoard, CommCenter, BTServer, notifyd, MobilePhone, SCHelper, MobileMail, apsd, MobileMusicPlayer, iStat. 

  4. Some Twitter clients on the iPhone use push notifications. Echofon (formerly TwitterFon) is one such client, but it only notifies the user of direct messages and @replies made by other Echofon users. 

  5. Note that Apple has a very high bar when it comes to usability. 

Product Mis-placement

From Wikipedia:

Product placement, or embedded marketing, is a form of advertisement, where branded goods or services are placed in a context usually devoid of ads, such as movies, the story line of television shows, or news programs.

Now that we know what product placement is, let’s see what it’s not.

Product placement is not putting your logo on other companies’ products:

Microsoft product placement in Knight Rider

Microsoft product placement in Knight Rider

…and it’s definitely not allowing the use of a cheap imitation of your primary competitor’s product in a show you basically own (more on the iPhone clone on Gizmodo):

Fake iPhone in Knight Rider

Fake iPhone in Knight Rider

Don’t be mistaken, I’m not surprised, not even a bit, because apparently Microsoft decided to take some weight off Apple’s shoulders by advertising how cool Macs are. You see, when you spend your money and time on creating insanely great products, not only do you get free product placement from prime-time shows and blockbuster movies1, you also get your competitors to do the advertising for you.

But at least one product placement deal was made before Microsoft decided to consciously ruin its business not only by producing the crappiest software this world’s ever seen, but by also spending the better part of its advertising budget to help Apple:

Microsoft Surface in The Day the Earth Stood Still

Note that Windows, Microsoft’s flagship product, is nowhere to be seen, except for a fraction of a second in The Day the Earth Stood Still. The only thing we seem to have is a couple of stickers and a $12k non-consumer product.

Before I finish my words, I would like to use this opportunity to personally thank Mr. Gates and Mr. Ballmer for their mind-blowing stupidity. They really make life much easier for people like me.


  1. 24, CSI:NY, Heroes, House, Las Vegas, The O.C., The Office, Sex and the City, need I say more? 

What to Expect from the App Store

It’s been 12 days since ek$i sözlük appeared on the App Store.

It became the top downloaded free application in the Turkish App Store on its 6th day, but it’s hard to stay on top when a free VoIP application (coughSkypecough) gets released the day after your app becomes #1.

Top Free Apps

ek$i sözlük is still #5 in the Turkish App Store, and even this is fantastic. I wrote ek$i sözlük solely for myself, and I never thought this many people would download, use and like it.

In the 12 days since I released 1.0, I already pushed a bugfix release (1.1), and I’m getting ready to push 1.2 with a new name and icon, as requested by ek$i sözlük’s lawyer (more on that in a few days).

Anyway, enough advertising.

After the release, I started receiving a lot of questions about the App Store and iPhone development in general, from people who apparently didn’t know I’d been developing for the platform for a while, or were simply impressed by ek$i sözlük’s success.

Today, I’ll try and answer one of the most frequently asked questions by sharing the sales graphs for the first 11 days. Your mileage will vary, but I assume this will give you a rough idea of what you can expect from a free, niche application:

Sales Per Day

Sales per Day

Cumulative Sales

Cumulative Sales

As always, feel free to share your thoughts in the comments.

Some Clarifications Regarding the iPhone 3.0 OS & SDK

The iPhone 3.0 Beta SDK & OS announcement left many practical questions unanswered, and I will try to answer some of these questions here.

Availability

The iPhone 3.0 Beta SDK & OS are only available to paid, registered iPhone developers. Even if you were to get your hands on a copy by other (illegal) means, you still wouldn’t be able to use the 3.0 OS, because it requires activation through the developer portal.

The 3.0 SDK, on the other hand, can be used by anyone, but I don’t think there’s a registered developer stupid enough to risk his agreement with Apple.

Moral of the story: there’s a reason why it’s called a beta. Wait till June if you’re not a developer.

Downgrading

Once you upgrade to the 3.0 OS, there’s no going back to 2.x. There are people who claim to have downgraded their iPhones to 2.x using the DFU mode, but I can’t confirm this (and it’s definitely not approved by Apple).

Dedicated Computer

John Gruber and others have wondered if the 3.0 SDK must be installed on a separate computer if one wants to continue developing applications for 2.x. This is simply not true, as I have tested and confirmed. You can develop applications for 2.x and 3.0 on the same machine.

Installing the 3.0 SDK in a separate location is an option, but definitely not necessary.

If you have any questions regarding the iPhone 3.0 Beta SDK or OS, don’t hesitate to ask them in the comments and I’ll try and answer them as best as the NDA allows me.

The Hiccups

In Summer 2006, I purchased a Flickr Pro account. I was in the US at the time, and Flickr seemed like the easiest way to share my photos with my family and friends back in Turkey.

After I returned to Turkey, I didn’t use Flickr all that much, so I let my Pro account expire, and I didn’t renew it until that unfortunate day in late 2007 when both my internal and external HDDs crashed. Fortunately, I had backups of the most important stuff, and the Apple guys were able to recover all my data from the internal HDD. However, I didn’t have backups of the photos I took in the US, so I turned to Flickr.

As annoyed as I was about the fact that I had to renew my Pro account just to be able to download my photos, those photos were worth more than $25 to me, so I renewed my Pro account. I downloaded all my photos immediately, and made proper backups. As for Flickr, I said “this is it, I’m not renewing a second time.”

And I didn’t, until today. For some reason, I found myself browsing Flickr and uploading photos in the last few days. It felt nice, and I wanted to upload some more photos. So I went ahead and renewed my Pro account for the second time.

As it turns out, renewing wasn’t my best decision. Just after uploading a new batch of pictures, I was granted with this message:

Flickr has the hiccups

Hiccups? That’s just great. So I paid $25 for hiccups? And what the heck is “hiccups?” Is this some sort of joke? Is it supposed to be funny or cute? Sorry but I can’t see it.

And it’s not just a one-time thing, either. The darn message is everywhere. From my photostream to the support pages. Flickr is completely unusable.

Now, I have a few words of advice to anyone who charges for their software/service. The moment you part your clients/customers/users with their hard-earned money, you forfeit your right to “have the hiccups.” You might have technical difficulties (not the “hiccups”), and I have the right to a full refund. This is called “defective goods.” You can’t just say the payments are non-refundable and walk away with my money.

I will request a full refund from Flickr, and I will send them a link to this post (if I can open the support pages, that is). I will post updates if/when they reply.

UPDATE 1: Got a reply from Flickr, rejecting a refund. I requested the customer representative consult with a superior.

Another interesting detail was my IP address and browser/plugin details being included in my original message. I pointed out that I didn’t agree to sending that kind of information.

Logitech MX Revolution Dissection

NOTE: Do not try this at home kids, you will destroy your mouse.

So, my 2-year old MX Revolution mouse started acting erratic in the past few days, and I decided the time has come to replace it (probably with another MX Revolution or an MX1100).

Like I do with almost all my dead equipment, I opened it up just for the heck of it.

Here are the pictures:

Logitech MX Revolution Logitech MX Revolution Logitech MX Revolution Logitech MX Revolution

Adding Directional Antenna and Multiple Interface Support to ns-2.33

Following this post, I ported the directional antenna and multiple interface support from TeNs to ns-2.33.

You can download my patches, and re-compile ns-2.33 to enable support for directional antennas and multiple interfaces. Don’t forget to set the NS_ANTENNA_FILE environment variable.

Assuming $NS2 points to the directory where you have the ns-2.33 sources, and that you’re using the ns-allinone-2.33 release, here’s what you have to do:

cd $NS2
patch -p1 < dir-antenna.patch
patch -p1 < multi-if.patch
./configure --with-otcl=../otcl-1.13 --with-tclcl=../tclcl-1.19
make
export NS_ANTENNA_FILE=$NS2/mobile/antenna.txt