Tag Archives: rant

iPhone 5 is a transition device

So you’re Apple.

And not the magical, mythical, always inspired Apple. You’re Apple that has been a market leader for a while, and is now being overtaken by new devices. You’re the Apple that is clinging to a philosophy that has served you well: don’t make your customers inconvenienced, and keep backward compatibility as long as possible. Change stuff when needed, and do so gradually.

Try not to break stuff

Developers often get this treatment from Apple. You are gradually eased out of your old practices and “encouraged” to adopt new ones. There are rarely any sudden changes. Even UDID was not suddenly thrown out from the OS; it was first deprecated, and then thrown out of iOS6 after months and months of easing developers into new practices. I can’t really remember significant mistreatments of developers, aside from weird App Store rejections and insistence on quite limiting sandboxing model. (Even there, line had to be drawn somewhere in order to make everyone happier and enforce better development practices.)

Aside from developers, Apple also doesn’t want end users, its primary customer base, to be inconvenienced. iOS 6 broke several things in several apps I work on when I first launched them in the Simulator, and I completely understand what went wrong and that most of what Apple changed is for the better. (I’m unsure how is force-crashing the app when no auto-rotation target is successfully calculated counts as a change for the better, though.)

However, in order not to break existing apps, Apple seems to have employed the model from OS X where the behaviors occasionally change based on the SDK the app was built on. I’m pretty convinced that several classes that ship in UIKit are loaded differently based on whether or not iOS 6 SDK was used in compiling the apps.

Don’t reject change

However, there’s a thing that Apple does that is also easy to notice: they are not resistant to change. Microsoft has tried very hard to keep backward compatibility as far back into the history as possible. Apple has taken many opportunities to shed itself of legacy code and practices. Mac OS to Mac OS X was a chance to throw away some legacy Macintosh Toolkit practices and establish Carbon as a nearly-Toolkit-but-not-quite replacement, with somewhat better structured code. PowerPC to Intel transition was a chance to break some code, but not a lot. Intel to Intel 64-bit was a chance to throw away most of Carbon and to introduce a new, but incompatible, runtime for Objective-C that is extended to this day without breaking existing apps. (One of major things this new runtime brought was non-fragile ABI, which basically means Apple can add stuff into Objective-C classes without breaking stuff.)

Apple has recently deprecated development for armv6 devices, and with Xcode 4.5 and iOS 6 decided to completely do away with support for it. This is surely inconveniencing some developers who, like me, up until then used iPhone or iPhone 3G as their main iOS device, and inconveniencing users who are no longer going to be able to get new versions of apps. And unless they backed up the .ipa files, they won’t be able to install versions that did support their device.

They are not afraid to change stuff. They are careful to ease developers in. And the myth that Apple magically “knows” what users want has been dispelled recently. And of course, it’s only logical that Apple, its engineers, as well as its management, do live in the same world that we do.

They see what people want because they observe. They may end up deciding on price point based on profit margins, profit now instead of profit later, and they may end up on deciding what goes into the device based on what can they can realistically construct best. But they definitely, definitely do watch what people want.

People want bigger devices

Remember 2007 and 2008, even 2009? Remember how people complained about iPhone’s size?

Jump to 2011 and 2012. iPad has come, other tablets have come, and people have seen that they, in reality, want bigger devices. Something rare has happened: Apple has missed what people want. (G4 Cube was another instance, and their insane prices in ‘less wealthy’ countries may be other instances.)

A controversial subject in ‘certain’ countries in the world, evolution theory, does in fact work. Perhaps we cannot go to the past to see that Earth was, in fact, inhabited by life forms that changed in response to environmental changes and that mutated; perhaps denialists can produce odd explanations for the abundance of evidence we have in favor of evolution theory.

But ‘genetic algorithms‘ definitely do show that mutation, recombination, and overall improvement in small steps by extolling beneficial adaptation, ignoring harmless ones, and shunning the harmful ones actually does work.

Android has flooded the market and evolved.

Adaptation

With Android, there were a lot of mutations. It has started with a poor product, and slowly grown. Various screen sizes, various input devices, various launchers, using stock versus using modified OS — all these things were mixed, matched, recombined, changed, and in the end we got devices like Galaxy S3 and Galaxy Note.

I have not owned an Android device, nor do I foresee that in the nearby future I will. I have played only a little while with several tablets, and my sister has an Android phone. I’m utterly unimpressed by the environment itself. I’m occasionally impressed by what openness has allowed, while at the same time unimpressed by flooded Android Market Google Play, with applications not being vetted, with applications that suspiciously request far more permissions that they need, with abhorrent and unnecessary NFC…

Yet a good point is being made.

All these changes, mutations, mixes and matches have produced several outstanding devices, and widened our horizons.

Android may be an initially stolen (and an initially poorly stolen, at that) product. What amounts to industrial espionage by a certain former board member at Apple has produced a vibrant smartphone market that even Apple will learn from. Notification Center is one example where Android took the lead, where a developer for jailbroken iOS systems has created a Notification Center, and where he ended up being hired to replicate it at Apple in an even better way than he did on jailbroken 4.x systems.

(Note that iOS itself has taken a lot of, shall we say, ‘hints’ from the old Palm OS, from Pocket PC and Windows Mobile — primarily packing a lot of UI ideas into a highly animated and fluent, NeXT-related UNIX-based operating system.)

What’s the future bringing? Screen size changes!

Apple has done a great thing for developers when the retina screen came out. The change was so radical that they needed all developers to upscale apps to 2x their size. So they did the same thing Palm did and that sometimes Microsoft did: they simply said that a pixel is not a pixel is not a pixel, but that a pixel is instead a ‘point’. They did something different, too: they simply said that the upscaling will be solely at 2x rate, not 1.5x, not 2.5x. They also made use of sub-‘point’ precision easy (albeit occasionally inconsistent, if you dig deep enough — for example, CATiledLayer does some weird stuff).

However, it turns out that people also want screens of different sizes, aspect ratios et al. It turns out that even people who are hard-core Apple fanboys clamor for a bigger iPhone for easier reading, even though they immediately say that a bigger size would “not fit the hand as well as the current size”. (And I don’t agree, considering that — surprise, surprise! — people have different hand sizes, hence the current size does not fit as well.)

How would you bring different screen sizes?

So on OS X, developers have been trained for a long time to use the “struts and springs” model to make the user interface elements (views, we call ’em) respond to size of their parent view. For example, when a window resizes, many sub-elements resize as well.

iOS also has the struts-and-springs model available. Either in Interface Builder or manually via the -setAutoresizingMask: method, developer can quite easily make the UI resizable.

Except many people never bothered more than absolutely necessary; for example, due to designing without navbar when the navbar could actually appear in runtime. They never had to, because — due to inflexibility of the window — they never had to play with multiple screen sizes. One of the only two places where the screen size changed radically were the transition to iPad, which in itself required a radically different user interface model (and use of different nib-files was VERY encouraged).

The other place where window and view sizes varied was the very, VERY underused TV-out display support for every UIWindow — which existed since iOS 3.2.

Training developers to use autoresizing masks

So if you ever wanted to train people to use autoresizing masks in preparation for a variable screen size, how would you approach the problem, Apple-style?

Obviously, you first need to deprecate the old-style development; that is, iOS app development with minimal autoresizing support. If you can’t actually force devs to use it (and with autoresizing masks, you can’t), then nudge them in the right direction.

One way is to explore what else is blocking good use of autoresizing and make sure you fix that problem. In case you can’t actually fix the problem elegantly, still provide the solution as a way to nudge developers to notice you really, really want to emphasize autoresizing.

Final step involves actual introduction of a device that uses a radically different screen size, without inconveniencing users by blocking operation of old apps.

What are the first two steps?

First step involved release of iPhone 5. This was a definite wake-up call that you really, really need to iron out those few places where you managed to mess up autoresizing. You don’t need to fix anything on the x axis, but y axis is fair game. On launch day of iPhone 5, you realized that the rumors were true, and whatever stuff you read about Apple never changing the resolution except by scaling by powers of two were — wrong. You, the dev, now needed to adapt to everything other platforms already had to do: resolutions change, and not just by scaling in powers of two. DPI (or, perhaps, PPP or pixels per ‘point’) do change in powers-of-two, but not the resolutions. In fact, you realize that you were groomed for the resolution staying fixed at 480×320 points, but that suddenly that’s no longer true.

Now you are not in the world of 480×320, but in the world of 586×320, and your every assumption is fair game.

However, if you don’t ship that one file called Default-568h.png (or, as Apple nudges you to call it, Default-568h@2x.png), you’re getting a pass. We won’t screw your app over just yet. This is just an introduction… but you’d better adapt! You don’t want black bars on top and bottom of user’s device. And think wider* too: iPad users get the black box around the iPhone apps as well as lower resolution of the app. Don’t you think iPhone 5 users deserve better, just like iPad users?

* See what I did there?

What’s the second step? Something called “automatic layout” being force-fed upon developers by default in Xcode 4.5. No matter that it’s as usable as a brick — it is quite powerful, and if the dev takes the time to correctly build the UI using automatic layout, then the localization becomes quite better. It’s completely unusable in the current state, though, so I suspect a lot of devs (especially those who don’t widely localize their apps) will stick with the old-but-reliable struts-and-springs model.

As I said, the second step may not involve creation of something usable. It does involve nudging devs in the right direction.

Future devices

So the third step is, of course, wholehearted acceptance of what Apple already knows, but developers may only suspect: variable resolution displays.

Apple has heard folks who clamor about Galaxy Note’s size. Apple has realized that there’s a sweet spot between iPhone and iPad screen sizes.

iPad mini is a further proof that Apple is willing to play with screen sizes. It didn’t play with the resolution yet, but I feel it’s only a matter of time before Apple releases a non-4:3 iPad. Perhaps with a built in phone.

Perhaps a phone which can also run UIUserInterfaceIdiomPad applications adapted for the new resolution?

Maybe we’ll also see a Default.png mini-revolution, where we will specify to Apple how they should resize the Default.png image, or allow devs to run some very simple Core Graphics code upon app installation in order to draw the image, instead of shipping various images for various resolutions and orientations? For a completely universal app in complete compliance with best practices for Default.png, an app that is iPhone 5 and iPad 3-aware which still supports iPhone 3GS — you have to ship no less than 5 images. If my prediction comes true, it’s only going to get worse.

I have absolutely no idea how Android solves the problem, nor am I really interested.

How hard is it to adapt?

I don’t think that adapting will be too hard. What one must take into account is that, all of a sudden, we will have to make wider use of resizable-image-with-cap-insets support introduced in iOS 5, and enhanced in iOS 6. I suspect Interface Builder will be enhanced in order to permit easier creation of such images (which currently have to be constructed in source code). Aside from ‘just’ skinning buttons, although even that was avoidable by having the app’s artist export each and every button with static text already painted on it, we’ll find out that suddenly there are a lot more backgrounds we have to skin, including the table view backgrounds.

But I’m almost sure that this revolution will happen.

If anything, Scott Forstall leaving Apple is probably going to make this easier. Who knows — perhaps he was one of the people pushing for never changing the UI resolution, based on his judgement of appropriateness of the platform for withstanding such a change. Perhaps he didn’t even care, and the decision was made by another manager or engineer.

Whatever the case — the point of this entire rant is that varying screen resolutions are coming. Perhaps not as wildly as was the case with Android, but we will see them change. We may even see a sort of convergence of iPhone and iPad, with iPad pushing out the iPod touch from the game.

It would be in line with lineup simplification that Apple likes to do every couple of years. So just as the Mac Pro is probably about to die, perhaps iPod touch will die, too.

A possible future lineup?

Professional Consumer
Mobile iPhone iPad
Desktop iMac Mac mini
Portable MacBook Pro MacBook Air
TV Apple TV HD Apple TV

What do you think?

Saving PC sales

So today I’m reading that Dell may be stepping away from the consumer PC arena. What could a prospective PC retailer do to save sales?

While I’ll be ranting about Canonical, Ubuntu, Linux and GNOME a lot, please note that this is just a mention of a possible platform a device maker could have opted for. Same goes for Dell: I’m talking about them, but it mostly applies to others. And what I’m talking about is that people want an integrated (but powerful) solution that ‘just works’.

Figure out that people want the sleek and fancy. Steam is fancy. App Store is fancy. iTunes is fancy. Intel AppUp from 2011 was decidedly not fancy, and in fact, it was a prime example of the “old” way of doing things one the PC: let’s just pack random garbage in front of the customer and hope he’ll not only bite it, but happily chew it. (Just remember all the “photo handling” software that shipped with your digital camera, or “antivirus protection” demo software shipping with your shiny new PC.)

Thankfully, the latest version of AppUp from 2012 is a bit fancier, although still somewhat weird.

Figure out that people want to do things differently. How happy are users with the operating system you’re shipping? I personally like Windows 7 a lot lately (more on that later). But how integrated it is with your product? What does your product do? Is it just another box? Admittedly, it may be a neat, shiny box, but what does it do? Oh — this thing on it isn’t your product? Uh-huh, so you’re just another box-maker?

Hint-hint: end users like custom (but usable) stuff. At one point, aforementioned Dell has promoted Ubuntu on its machines. What they haven’t done is sit with Canonical and decide how to make Ubuntu the operating system for their machines. Not only that — they should have thought about how to make Dell’s laptop the machine for running Ubuntu.

Dell and Canonical could have figured out what exactly people want and how they want it done. In my previous life as a Linux user, I was quite “needy” and I desired customizability, shunning Ubuntu for Debian. But that’s not what people want. People want stuff to “just work”. I want it too nowadays. I also want a company to figure out how the user interface should work, and make it work that way instead of me. I want them to figure out what is the best way for me to achieve my goals.

And then I want them to proscribe that as sacred rules to developers on their platform. Then I want them to justify why those sacred rules exist. (The way NSDocument class works in Cocoa frameworks has recently allowed Apple to introduce “recent files” list for an application in Lion’s Expose for an application’s windows, as well in the Dock icon menu.)

I want those sacred rules to be sane and enabling to the developers, instead of arbitrary decisions slapped together by a bunch of monkeys. (And I’m not pointing fingers at a single platform or library here — but pretty much at most platforms and libraries out there.)

Figure out that people want to do stuff with their machines. After securing a deal with Canonical, Dell should have attempted to secure a deal with, for example, Adobe to port at least their flagship product Photoshop to Linux (or more specifically Ubuntu). There are bound to be many, many hurdles along the way. But instead of toying with The Gimp and waiting for them to actually make a tool that is usable by real people, getting Adobe to bring their product over would make the platform (and products) stand out and appeal to an audience. And if Adobe doesn’t want to cooperate, invest those profits in your long-term gain: look at Photoshop and replicate it under Linux, including keyboard shortcuts and whatnot.

Go and fix OpenOffice’s interface, or at least lift what you can in designing an office suite that works and looks as an office suite should. Or write your own — Apple surely did with iWork, and they worked on that even before iPhone and iPad were insanely profitable like today. Compared to today, iPhone was only mildly popular.

Can you see the big picture now? Can you see how a platform could have and should have come together to save, for example, Dell?

As Apple has built their OS on the strong base of BSD userland and Mach kernel, Dell and Canonical could have delivered integrated products based on GNU userland and Linux kernel. They should have worked on securing partnerships to deliver key products to what was (and is) a nascent desktop environment.

Apple did not use window compositing to bring you toys like a 3D cube, but to bring you tools to switch between windows and apps. Dell and Canonical should have and could have slimmed down Compiz. GNOME 3’s window manager is a nice experiment in this direction, but on the first look at it, it lifts off of Apple so blatantly in some ways that I can’t help think they should have and could have done better. It could have and should have been better than what Apple does.

Figure out how to cut the stuff out. As mentioned, I personally like Windows 7 a lot lately, but it hasn’t struck the good balance between exposing whatever a power user needs and hiding anything that a common user doesn’t need. It’s still too complex for a common user, and at the same time, any attempt at simplification and hiding stuff just means the actual stuff you need is now hidden behind menus and behind more menus and behind more menus. See: attempting to configure just slightly more complex wi-fi setup in Windows 7. Something is seriously wrong if it’s easier to change resolution and color depth in Windows 95 than it is in Windows 7.

Compiz needed to be cut and configured to sane defaults. Or it should have been thrown away and a custom manager should have been written.

As long as we stick to the UNIX principles wherever possible, I can take your window manager and throw it away. Or I could write my own settings app. But if you do a good enough job, I will not want to.

I currently am not inclined to go away from Mac, and the amount of customizations I do is minimal. Some people use custom app launchers, I’m satisfied with launching apps through Dock or Spotlight.

But in case I want to move away, I’m hoping GNUstep takes off and provides a viable way for people to port their OS X apps to other platforms. I hope for a healthy GNUstep ecosystem where people are free to share code, but also to sell the fruit of their labors.

But I am not really interested in moving away right now, because Apple delivers a good, complete, healthy ecosystem today, along with an integrated hardware+software stack where things like driver issues are rare and shocking events happening mostly to early adopters — definitely they are not common daily appearance for most users.

To save your sales, deliver a healthy, integrated hardware+platform+applications ecosystem. For a corporation as big as Dell, any investment into their own platform would have been an investment into long term future. It would have been diversification and it would be a way to stay unique long-term. And not doing a good job on creating a platform when you’re a multi-billion dollar company, especially in cases where you can already take other people’s work, should be inexcusable. In fact — I’m not sure if not even attempting to do it may be an even greater sin.

Make yourself stand out with an outstanding product that “just works”. Half-assed experiments with Linux just because it’s Linux and “free” won’t save you and will flop.

Delivering a complete product starting with a laptop designed around a platform (which may be based on Linux), and delivering a complete platform designed around your laptop is a good way to start.

Apsurdi u podizanju dokumenata

Potaknut sam na ovaj post današnjim iskustvom s domovnicom. Ono radi čega trebam domovnicu — nemam pojma zašto im treba domovnica. No to nije niti bitno.

Priča prva: Domovnica

Dakle, zaboravio sam domovnicu doma. Iovako ionako htio sam napraviti novu; ova je relativno stara, i ako već moram predati dokument, nije mi problem dati 20kn. I tako saznam da kad sam već u gradu, mogu otići kod Zapadnog kolodvora i tamo napraviti domovnicu.

Vraga.

Ispada da zato što sam rođen u Osijeku, i zato što je tamo napravljena domovnica, ne mogu napraviti domovnicu u Zagrebu neovisno o tome što tu živim već skoro 20 godina. Moram, naime, prvo obaviti “prijenos upisa” u svoj lokalni ured (pretpostavljam matični ured) koristeći domovnicu iz Osijeka.

U redu. Pazi ideje. Imamo informatiziranu državnu upravu (žena gleda u računalo), a Internet omogućuje povezivost kao nikad dosad u povijesti čovječanstva (na mobitelu u tramvaju mogu pristupati sadržajima posluženima s bilo koje lokacije na ovoj našoj plavoj lebećoj kugli). No ta naša informatizirana državna uprava nije sposobna koristiti isti softver, dignuti servere, ili koje god da su im prepreke — i opslužiti me s jednim papirom za kojeg sam još uvijek sretan i zadovoljan što ga imam.

Ne, nego moram raditi “prijenos upisa”, i zatim moram izrađivati domovnicu u istom uredu u kojeg sam “prenio upis”.

A šteta na ekonomiju da kojim slučajem nemam tu domovnicu? Ne zaboravimo, svaka škola i fakultet je voli de facto oduzeti dok god je osoba upisana u tu školu ili fakultet. Što bih tada morao raditi, da mi iz škole ili fakulteta ne mogu ili ne žele dati moju vlastitu domovnicu? Što bih radio da je moram istog dana imati, a subota je ili nedjelja?

No, ajdmo drugačije. Jednostavno pretpostavimo da ne mogu doći do domovnice ili da je nemam i točka. Šteta po ekonomiju je jedan radni dan – zamislimo plaću od 35kn/sat (izmišljam), pomnožimo s 8h, i zbrojimo s cijenom povratne karte primjerice vlakom do Osijeka… koja iznosi 193kn (bez odabira povlastica i slično). Dakle, šteta je 473kn za jedan propušteni radni dan i prijevoz do Osijeka.

Opcionalno? Mogu slati zahtjev i nadati se da će poštom stići u nekakvo normalno vrijeme. Tada bi me trebalo koštati oko 20kn. Jest ušteda, a gdje je vrijeme?

Usput, državna službenica je bila izuzetno neugodna, izvrijeđavši moje nepoznavanje u koju općinu spadam i slično, što bi iovako ionako za mene kao građanina trebalo biti posve irelevantno. “Sramota je ne poznavati grad u kojem živite” – a mora da je onda i sramota pokušati raditi u tom gradu, plaćati porez, a bogme je sramota i čuditi se gospodi u državnoj upravi koja su Dubec smjestila pod primjerice katastar u Sesvetama.

A da ne spominjemo da kad se službenici 10min prije toga pokucalo na vrata, dvije službenice su sjedile, gledale u prazno i rekle “Malo sačekajte”.

Priča druga: Izvadak iz matične knjige rođenih

Prvo, jeste li znali fascinantan podatak da je izvadak iz matične knjige rođenih posve druga stvar od rodnog lista? Eto, ja budala pa nisam. Ub’me ako ima neko objašnjenje.

Drugo, jeste li znali fascinantan podatak da kao osoba rođena u Osijeku nigdje u Zagrebu ne mogu dobiti navedeni papir? Da, sustavi nisu povezani.

Jedino mjesto u okolici Zagreba na koje su me uputili jest… Dugo Selo. Izvan zone ZET-a.

Dugo Selo je stvarno prelijepo. Dolazak tamo je isto predivan. Kontakt sa službenicom u Dugom Selu je bio fantastičan, jedno od najboljih iskustava u kontaktu s misterioznim entitetom koji zovemo Država. Dođem, kaže “Trebate osobnu, ovo, ono, i tolko-i-tolko kuna biljega.” Nije me se vrijeđalo za nepoznavanje pravila, za rođenje u drugom gradu, nije se bilo živčano. Nije bilo čekanja. Sve je proteklo u najboljem redu.

To ne znači da nisam izgubio jedan radni dan na odlazak tamo.

To ne znači da pojedini formulari ne traže apsurdno veliku količinu dokumentacije, uključujući i navedeni “izvadak iz matične knjige rođenih”.

Priča treća: Promjena prebivališta

Još nisam prebacio prebivalište. Bojim se krenuti. Zadnja dva puta kada sam to pokušao napraviti, prvi put krenuo sam od Policijske postaje u Sesvetama, koja me uputila u Petrinjsku u Zagreb. Drugi put krenuo sam od Petrinjske, koja me pak uputila da prvo moram stvari riješiti u Sesvetama.

Odgađam to već poprilično dugo. Svjestan sam da time sigurno kršim određen broj propisa, no bogme bi se neki klasični postupci mogli staviti u jedan lijepi PDF, objaviti na stranici primjerice Ministarstva uprave, pokrenuti kampanju da je to objavljeno (kako bi ljudi znali da toga ima) i lijepo hyperlinkove postaviti u PDFu kako bih mogao u requirementsima, kad znam da mi nedostaje neki dokument, lako mogao kliknuti na link i vidjeti kako doći do tog papira.

No, eto.