Posts Tagged ‘iOS’

Why iA Writer is «The Editor.»

Why iA Writer is «The Editor.»

I’ve already for two months and ten days, switched entirely from Byword to iA Writer. And am as happy as a writer can be. There is a lot to be explained, but one single thing sets iA Writer apart from all others:

iA Writer has the best iCloud synchronization I ever have experienced

For me it’s magic. It’s like Steve Jobs is still alive and has been involved. If I write a new note on my iPHone and goes to my Mac, the note is there. And the synchronization is stable. For me, it hasn’t failed once.

The iCloud synchronization was Bywords Achilles heal. Every time I switched device and opened Byword it started synchronizing, and it could take many minutes. After finished synching, often my new file still wasn’t present. Then I had to throw Byword out of memory and let it synchronize again and again. It could take hours.

Byword failed to be my daily editor because it didn’t manage to synchronize my notes.

Just of the sake of completeness. iA Writer is a Markdown editor. It let you add small hints to your text and magically convert it to HTML. All when letting you work in pure text. And also saving it in pure text.

After these two months writing on iA, I’ve come to love the tool for other features too. It has so many nice details that help me as a writer. Even better, it is so beautiful and clean, that the badly hurt minimalist in me rejoice – many times each day.

iA Writer full screen Focus mode

Writing these words, for instance, I’m in full screen and Focus mode. That means that only the sentence I’m writing has regular appearance – the rest is slightly dimmed. I also regularly pull on the Do not disturb mode on my Mac or iOS device when writing.

Don't disturb in Norwegian

The cleanness and the silence leaves me, the editor and my writing, peacefully alone.

Deep down, on the right bottom of the screen, I normally have some statistics visible. Since I’ve evolved to a blogger by heart, I need to to know how much I’ve written, and how long the reading time is.


I can let the toolbar hide temporally and always. But I tend to have it on. The possibility to switch to it’s other modes is super effective for me. The toolbar gives me:

  • Statistics mode – quantifies what I’ve done
    iA Stats
  • Syntax mode – let me highlight grammatic elements
    iA Syntax
  • Format mode – shows me shortcuts for Markdown markup
    iA Format

It’s just what I need to get my job done. My favorite is Table in Format. Its sets up a Markdown template for a table. I never have to go to my Markdown cheat page any longer.

When I’ve more or less written the text and begin to edit and revise, I pull up the preview pane. On my 15″ MacBook I get an optimal edit mode, where I can read my text in a beautifully rendered typefaces to the right, and make changes to the left.

iA with preview

And still we haven’t talked about iA Writers ability to highlight adjectives, nouns, adverbs and conjunctions. A feature so immensely important for me who isn’t a foreigner to the language. With it, I can see when I repeat the same word too much. And I promise I do that all the time!

So, dear Information Architects, the friendly people making iA Writer, you have made a jewel of an editor. I’ve just a small detail I wish you could fix.

Please let the key Esc terminate full-screen mode. My trembling old fingers don’t like to hunt down the little small, green icon on the right top of the screen.

If you write, buy iA Writer. For me who has repeatedly shelled out thousand of dollars for MS Office, iA Writer is a bargain. iA is a minimalist’ dream tool!

Apple, A Smarter Watch, please!

Calendula Officinalis Apple Watch

I don’t want another Apple Watch. I just want a smarter one!

My Apple Watch is a bit stupid: I’ve to tell what I’m going to do. That I’m going to start a workout, to stop it, to sleep, to stop sleeping, to drink and so on.

That’s not what I expect from a smart watch. I expect it to learn from the context what I’m doing and recording that.

By using, programming and studying the Apple Watch I try to:

Imagine what the Apple Watch is and can be

The question which are driving me is:

How to make the Apple Watch smarter?

We should all know it now the way the Apple product process works. It’s the same process as always. The processes we saw with the Mac, the iPhone and the iPad.

Apple, doing the largest chunk of work, making APIs that app developers can use as building blocks. And then developers, users, commentators and researchers telling what’s work or not. Then Apple and developers repeat the process until near perfection is obtained.

Trying to my my den, here is the resources I personally use in my layman research on tech:

  1. Producthunt to discover new products
  2. Medium to read articles
  3. My own observation and writing.
  4. Wristly as a research source
  5. Tightly following analysts as @asymco, @benbejarin, @JohnKirk and a part of the Apple blogosphere


Yesterday, I found a new app on Producthunt, which made my head bells toll. It’s slogan was:

Auto identifies exercises and counts your reps using your Apple Watch.

What a beautiful sentence!
I think Auto-identifying is the magic word here. If fulfilled, I imagine this is what could propel the watch from dumb to smart.

The slogan comes from the app Tracker’s promotion on iOS App Store. After a short test of the app, I would not characterize Tracker as really auto-identifying app per se, but more an experiment in using it. However, as it is, it is a valuable peek into a better future.

The Auto Identifying and confirmation future

The Apple Watch is choking full of sensors, computation power and data storage. It has all the means to anticipate our intentions when we repeat tasks. And if there are inconsistencies, the watch have the means to ask politely. It can tap my wrist and give me some relevant options to choose between. And most importantly – it can remember the context, ie., the answer and sensor patterns and not ask again.

For instance; when Apple Watch sense that I’m walking fast, steady and that my pulse is increasing, it should know I’m doing a walking workout. It should then start workout mode automatically, suggest workout type and let me confirm it.

Here comes the clue: in my next walking workout, my Apple Watch should, based on my sensors data, recognize the movements and remember the former context that shows I’m on a walking workout, and just act on that. And not ask! Just record the my walking workout!

If I stop to take rest, the watch should pause the workout session, and automatically continue when finishing. And if I not finish, end and save the workout.

«Auto indentify» as an API?

Apple could facilitate the «Auto indentify» as an API. The health apps would be way more targeted, and we would have better personal health statistics to share – with our trainers and medical staff!

So please Apple – Let your cute beautiful watch grow up and be as smart one!

Learning from other Apple Watch users experiences

After seven months I still don’t use all the features of my Apple Watch. One of my best sources to learn more is Wristly.


I’m intensely following Bernard Desarnauts’ research in Wristly, where he successfully unveil the Apple Watch strength and weaknesses. I’ve been taking part in his surveys from day one, and you should too.

The way Tim Cook use Wristly’s research in public appearances, indicate that their listening to it.

If you are somehow like me, consider his Wristly Pro service, and be part of the selected few who already are experiencing the future of computing – and shaping it!

Predicates in Core Data

Database programming is all about filtering and sorting tables linked to each other. According to the book Core Data, «Core Data is Apple’s object graph management and persistency framework for iOS, OS X, watchOS, and tvOS.»

In a sense, predicates are an object version of the WHERE clause in SQL. Just like NSFetchRequest represent the FROM clause in SQL.

I never have had problems with WHERE and FROM in SQL, but the predicate format strings in Core Data has been quite a struggle for me.

I don’t think the struggle is only my fault. Predicates should clearly be thought, at least to me, as a method of writing WHERE clauses.

Here is some notes from tutplus’ Core Data and Swift: Relationships and More Fetching:

let predicate = NSPredicate(format: "%K == %@", "last", "Doe")

The predicate format string uses %K (K stands for Key) for the property name and %@ for the value.

let predicate = NSPredicate(format: "%K >= %i", "age", 30)

Here the predicate format string uses %i for the integer value.

The Core Data book’s chapter on Predicates, recommends to use a variable for both the key and the value part of the format string. Then the compiler or debugger will be able to stop us and tell if the format string isn’t valid.

And for the sake of completeness, some notes from Wikipedia.

Core Data filters tables using predicates.

In mathematics, a predicate is commonly understood to be a Boolean-valued function P: X→ {true, false}, called the predicate on X.

In Core Data predicates are attributes to FetchRequest object.


Hvordan iPhone 6 vil forenkle hverdagen min

Hvordan iPhone 6 vil forenkle hverdagen min #ios8

Apple teller ned.

Apple teller ned.

I dag skulle jeg sende noen beskjeder i forbindelse med en reise. Jeg skulle skrive to litt lengre SMS fra iPhone og fikk bruk for å slå opp opplysninger om reisen. SAS har selvfølgelig ikke sendt sin SMS med en iPhone, så den var ikke tilgjengelig på min Mac. Arghhh!

Men det er den når jeg får det nye operativsystemet denne uka. Ikke nok med det – da kan jeg både ringe og sende SMS fra min Mac!

Jeg har lenge kunnet arbeide på samme dokument på både mobil og PC. Fra i morgen vil til og med «cursor» bli plassert på samme sted!

Men det viktigste for meg som skriver er at norsk diktering blir tilgjengelig. Det betyr mindre slitasje på vonde armer, og forhåpentligvis mange flere artikler og kommentarer!

iPhone 6 har fingeravtrykkleser knyttet til hjem-knappen. Apple åpner i tillegg for at innlogging til sider og apper og kjøp kan bekreftes med mitt fingeravtrykk. Med nærmere 200 passord gleder jeg til å begynne reisen mot eliminering av passord!

Fra før er Apple-brukere allerede bortskjemt med å ha tilgang til dokumenter, mail, Apples meldinger, bilder og musikk fra alle enheter knyttet til sin iCloud-konto. Fra imorgen får vi også tilgang til videoer og som nevnt ovenfor, ut- og inngående SMS og telefonsamtaler.

Apple lanserte de ovennevnte funksjonene på utviklerkonferansen i juni.

I kveld kl. 19 lanserer de antagelig vis iPhone 6 og noe «attåt». Jeg forsøker så godt jeg kan å lukke øyner og ører for alle rykter som svirrer. Når direktesendingen fra Apple starter vil jeg gjerne la Apple få overraske meg!

Beautiful and subtile Core Data changes in Swift on

Beautiful and subtile Core Data changes in Swift on #Xcode6Beta7

Flowing like swift!
I didn’t expect another beta before iOS release next week. But surprise – just one more thing – a new beta!

Yesterday the beta popped up, and today I’m investigating the changes. As a former SQL developer I’m most interested in the Core Data and the display of data in UITableViews.

Optionals, optionals and optionals

Some early comments indicated that there was a lot of changes on optionals – again. People reported on twitter that they had huge amount on errors when opening their projects.

I must admit I don’t really know how to use optionals. I’m still learning Swift. But debugging and writing this is a good way to learn more.

What is an optional however? Here are two thing about optionals I have in my memory as I’m writing:

  • Optionals is either some value or nothing ie. nil.
  • Optionals is used to reduce the number of values containing nil and thus make your program more robust.

All the concern of optionals is because backward compatibility to iOS libraries, where you can fin nileverywhere. Apple have spent 3 betas taking away unneeded nil’s. For instance, the Core Data stack in their Master Detail template is way more elegant and easy to understand now.

As my projects is only tests and turorials, I decided to look at changes in the Master Detail Core Data template that Apple provides. Looking at the errors produced for the beta6 template on beta7, I was able to see the differences. I liked what I discovered.

Changes in the Core Data stack in Beta7

The changes, it was seven of them, one was in AppDelegate, and the rest in MasterViewController.

I’ve marked the change with adding ** before and after the change.

One time unwrapping with if. Five times unwrap with !. Mark a property optional two times with ?.

In AppDelegate.swift I had to explicit unwrap an optional:

lazy var managedObjectModel: NSManagedObjectModel = {

let modelURL = NSBundle.mainBundle().URLForResource("mdDbApp", withExtension: "momd»)**!**

And in MasterViewController.swift there was various changes to optionals. First by using `if let´:

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "showDetail" {
**if** let indexPath = self.tableView.indexPathForSelectedRow() {

Then by marking for optional and use if-else operators ??

override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return self.fetchedResultsController.sections**?**.count** ?? 0**

Then unwrap:

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
let sectionInfo = self.fetchedResultsController.sections**!**[section] as NSFetchedResultsSectionInfo

Make it optional and unwrap it:

func configureCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath) {
let object = self.fetchedResultsController.objectAtIndexPath(indexPath) as NSManagedObject
cell.textLabel**?**.text = object.valueForKey("timeStamp")**!**.description

Then unwrap:

var fetchedResultsController: NSFetchedResultsController {

let entity = NSEntityDescription.entityForName("Event", inManagedObjectContext: self.managedObjectContext**!**)

… and a bit further down – unwrap again:

let aFetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: self.managedObjectContext**!**, sectionNameKeyPath: nil, cacheName: "Master")

What I learned with this comparision

  • I know a lot more on optionals than before, and I can even use them in simple context.
  • I’ve learned the value of reducing the posibilities of nil
  • I can foresee a future with lot less optionals
  • I’m even more found of Swift
  • I’ll try to only use libraries written in Swift (that’s impossible for Core Data, but soon…)
  • Even an old SQL guy can have something to say on this shiny new language

Functional programming in

Swift Functional programming is cool – even for an ERP guy! #swiftlang

I’ve just one objective with learning Swift – it’s to create ERP apps for iOS. The reason I went into Swift was that it made programming iOS easier – a lot easier!

Trying to gasp Swift, you have to come over «Functional Programming». To me, it didn’t say anything. Worse, as I’m a SQL programmer burned by object-oriented programming, I suspected functional programming to be equal or worse.

But somehow one of the articles caught me. The title, Reprogramming your mind for the Functional Swift Matrix – made me so curious that I passed through it. Not only once but three times, the last with a Playground.file open and testing it out.

A nice illustration from a Huffington post article

What I learned was that there was a simpler way to create for loops, namely map. I also noted my brain reacting stimulated, and then I looked up the article references. One of them was an hour long explanation from a year ago. It was nice, and I recognized a lot of functional stuff I had seen before. Like generics, «first citizen» functions, optionals in addition to map.

In ERP we have something called «Audit trail». A log of every change that an auditor can control. And we have the habit of prohibiting changing transactions. So this words made my day. They’re from a pretty good introduction:

Data is immutable

So my forty year on ERP on immutable enterprise data is meeting a brand new language based on immutable data. That’s just fantastic for this old SQL guy!