Promises

Photo

The lesson started by @simonpang showing me James Coglan’s article on biggest miss for node.js. He’s excited to use this technique in iOS development, and @yaachi seemed have been using it for web development quite a while.

I wasn’t getting it and while googling, I noticed responses from Mikeal Rogers and Drew Crawford titled “Broken Promises”.

There was a fruitful discussion among my friends.

Simon again pointed me to Domenic Denicola’s more precise point of view, and @pinglamb also found a good one with clear examples

I derived three main real benefits to adopt the promise approach:

  • asynchronous code can now be flatten and written like synchronous version so you can easily chain operations
  • getting back error bubbling like the try catch syntax
  • easily join and wait a number of asynchronous methods without nasty flags and count

In favour of adopting this new technique for my development, I found a few interesting opensource libraries for objective-C. oleganza / OAPromise looks really promising, while waka / objc-Async and kseebaldt / deferred already includes simple networking client out of the box.

Cool. Promise me that no more callback hell. ;P

A handful links for who are also interested.

“If you find an element of your interface requires instructions, then you need to redesign it.”
Dan Rubin (via crankyangela)
Design is not just what it looks like and feels like. Design is how it works. - Steve Jobs, Apple

(via Startup Quote)

Design is not just what it looks like and feels like. Design is how it works. - Steve Jobs, Apple

(via Startup Quote)

Interesting.

simurai:

Flick Scrolling

An idea of a new gesture that extends scrolling content on a touch-screen. Instead of letting momentum stop the scrolling, you can decide exactly where it should stop. It stops at the point where you flicked it.

It would be great for things like books, blogs, timelines or anywhere where you don’t skim over, but continuously wanna “move forward”. Kinda like paging but within and long scroll. Some apps have a page up/down feature, but I don’t really use it because it moves always the whole height and might cut off a picture or so. With this “flick scrolling” you can decide to where it should move to. The last paragraph or beginning of a picture.

Flick Scroll illustration

Why not just use pages or cards? Yes, that works sometimes, but not always, especially not when you have no control over the content. iA wrote a good post about it: Scroll or Card? With flick-scrolling you get the joy of “card flipping” without the cards.

Here the two demos from the video so you can try it out (only tested on iOS and Android). Note that the “Timeline demo” has a slightly modified behavior: Instead of scrolling to where you touched it, it always scrolls to the top of an item (in this case a picture). This behavior would be great for a list of repeating items, like the timeline in Instagram for quicker and easier moving to the next picture.

Book demo

Timeline demo

Warning: I’m not really a programmer so the demo is just a hack to demonstrate how it could work. Would need some improvements. And of course, performance would be better if it would be implemented natively.

One thing I’m not sure about.. there is the possibility that you intend to do a flick scroll but end up doing a normal scroll or vice versa. You can judge for yourself in the demos. Maybe the detection could be further optimized or here some other possibilities (Let me know if you can think of more).

  • Use a two-finger scroll. But then you can’t use just your thumb which makes it not that useful.
  • Split up the screen into two areas, for example left for normal scroll and right for flick-scroll.

Credits: Demos use the iScroll4 library and in the timeline demo, the “scrollToElement” feature is used, which is a pretty cool one.

Update: Ahmed El Gabri pointed out that Readability already has a feature like that. Using a double-tab on a “split screen” to determine up or down scroll. It also adds an arrow on the side to guide the eye, which is really helpful.

Some points about using double-tab vs a flick gesture:

  • Doesn’t work in a web browser, double-tab is already used for “zoom to element”.
  • Can only be performed on half of the screen.
  • Maybe takes a bit longer.
  • Double-tab is already used by some apps for other functions. This would make it harder to use in general and you always have to remember which app supports it for what.
  • Harder to discover. It’s much more likely that you do a “flick-scroll” by accident and learn about it quicker.

But of course the “harder to discover” of double-tab scrolling could also be a good thing. It would be far less risky or confusing, because it doesn’t conflict with the scroll behavior currently in use. Also, double-tab scrolling in web browsers could be used as soon as viewport scaling is disabled.

Hmm.. haven’t made up my mind yet.. but either way, would love to see more explorations that go beyond momentum scrolling.

Update II: Kurt and David were concerned that if you would want to quickly scroll through a long page, you would end up doing short flicks that would conflict with the flick-scroll gesture. And yes, they are right. That’s indeed problematic.

A solution I could see is this: The flick-scroll gesture only works when the page is not moving. So if you first would do a longer scroll movement that uses momentum, then you could scroll however you like (also short movements) until scrolling comes to a halt. Only then you could do either again.

TableView pull-down resistance in iOS 6 has slightly increased.

Left: iOS 5, Mid: iOS 6, Right: iOS 6 on 4 inch display.

Do you feel a tiny bit difference when you try to pull down to refresh?

Screenshot taken from BelugaBloo Kids Bookstore

“To be outstanding – get comfortable with being uncomfortable.”
Alrik Koudenburg (via crankyangela)
I am curious about how typing experience is affected by the taller iPhone 5 screen.

The screen is ~18% wider.
Keys are ~12% wider with same height.
Keys are ~27% closer together

Thumbs moves ~12% further when moving from D to Q.

How does it sounds to you?

I am curious about how typing experience is affected by the taller iPhone 5 screen.

The screen is ~18% wider.
Keys are ~12% wider with same height.
Keys are ~27% closer together

Thumbs moves ~12% further when moving from D to Q.

How does it sounds to you?

simplifyyourlife:

…for the sake of focus.


Minimalism is subtraction for the sake focus.

simplifyyourlife:

…for the sake of focus.

Minimalism is subtraction for the sake focus.