1 min

Emotion & Design: Building a Visual Experience Your Users will Love

Humans are deeply emotional creatures. A warm handshake can make a stranger seem kinder, while a white room can feel sterile regardless of whether or not it’s actually clean. We might not always be conscious of it, but the world around us is designed and that design affects our feelings and actions in big ways. This is important when talking about emotional design.

read more

1 min

Throwing Arithmetic Operators in Swift

“Let me throw you a hand”

If you are making an application that is heavy on math calculations, you may wish to be able to catch errors such as division by zero and integer type overflows before they spread all over the place.

Floating point errors include division by zero, which produces ±infinity, and undefined (NaN) expressions, such as sin(Double.infinity). These fail silently. Integer type operator errors are limited to overflows, which make your code crash loudly.

Swift provides handy integer arithmetic operators permitting overflow; &+,&−, &*, and more informative methods such as addWithOverflow(_,_). I have leveraged these methods to define throwing operators &&+, &&−,&&*, &&/, &&%, and &&?. Usage follows.

/*
 *  Example.swift
 */
// Produces 15.27543444817377
func x() throws -> Double {
  return try (12.5 &&+ 2.3) &&/ (&&?sin(3.1) &&+ &&?atan2(4,3))
}
// Throws ArithmeticOperationError(.infinity,.division)
func y() throws -> Double {
  let y = try (1.0 &&+ 1.0) &&/ (&&?sin(M_PI_2) &&- 1.0)
} 

read more

1 min

Type Safe Matrices in Swift

Thanks to Swift’s type safety and generics it is possible to define matrix types with safe operations. Where, for instance, you may only multiply an M×N matrix by a P×Q matrix if N is equal to P.

In this article I tackle this problem in a very generic way, so that you can add type safety to your favourite existing matrix implementation. This is useful since different matrix libraries may perform better in different applications (machine learning algorithms vs 3D graphics for example).

read more

1 min

How We Designed SanDisk’s App User Experience For Vastly Different Users

When we sat down to design the user interface of SanDisk’s new iXpand app, we knew we needed to make sophisticated, complex software that felt simple and intuitive.

The problem that SanDisk was out to solve with the iXpand was a universal one: Though our smartphones have become an integral part of everyday life, they never seem to come with enough storage. A 16GB iPhone can only store about 2,000 photos, and live photos cut that number in half, and 4K video can eat up a 16GB hard drive in no time. It’s just not enough for the modern iPhone user, who is taking 20% more photos each year than they did the year before.

read more

1 min

How IoT Will Transform The Automotive Industry

The advent of smartphones, and the rise of mobile internet and mobile apps disrupted and transformed the way we live and do business. Thanks to the millions of mobile apps you can buy or download from app stores, you practically have your mailbox, office, photo album, TV, game console, shopping cart and much more at your disposal any time you like.

read more

1 min

Mokriya iOS Hiring Challenge

Mokriya continues to grow and we’re on the lookout for more talented iOS developers to join our team in Hyderabad, India.

We have partnered with HackerEarth to host a hiring challenge. HackerEarth is a platform where developers can participate in online coding challenges and hackathons.

read more

1 min

Mokriya Weekly Roundup – What next for apps?

A weekly, hand-curated digest of the latest mobile and technology news and insights from the Mokriya team.

Mobile, IoT, Tech:

Stories

The app boom is over
“Your phone is full of apps, and you’re done downloading new ones — unless they’re Snapchat or Uber.” Valid point for consumer apps at least, its getting harder and harder to dislodge the go-to apps on our phones.

read more

Older posts