39
iMyCom Getting High with Communication tool (iOS App)

iMyCom:Tripping along iOS development of Langauge Communication tool

Embed Size (px)

Citation preview

iMyComGetting High with Communication tool (iOS App)

Bj Kandel

• iOS Developer at iMyCom

• We believe Communication is a mix of Language Translation, Feedback and Learning Language at the same time.

Language Translation

• Its sad.

S.V.O.

• Add Why?When?… and/or/because… during… around SVO to get Complex.

• Or put , ; :

• Its all SVO.

• But why is translating complex?

• Google Translate, Microsoft, Facebook, Frengly,..

• We don't compete nor would we.

• But, theres more.

Google Translate

• Who thinks its not good or bad or dislike it?

• Do you use it?

Problems• Inaccurate or misleading translation

• no easy way to find the other person got the correct message

• No Learning

• But we all use it.

• And we love to complain how it sucks.

Rosetta Stone

• Takes week to say basic hello hi

• Takes month to order a Burger at McDonalds

• Its not real time!

iMyCom

• Real Time communicator.

• Learn as you communicate or vice versa.

Until now:• 1.5 months

• Many Grammar headaches

• Many technical obstacles like Cloud vs Local Dictionary lookup

• Few Discoveries. Not invention okay!

• Lots of Fun.

Part1

• There are only 2 parts.

• Its all about Xcode/Development Cycle

First 4 days

• made a prototype for transforming 4 sentences similar to

• I eat apple -> 私は 林檎を 食べます。

• Bruce seems happy. -> ブルスが幸せに思います。

Another 10 days

• Had to deal with Japanese Grammar.

• Wrote a small library for JapaneseTransformation

• But it was unreliable.

How to make a solid library?

• Do a lot of Unit Testing.

• Use Xcode built in XCTTest Framework

• One class was 700 lines big but the test seemed bigger than that class. It happens, don't freak out.

• Test for good input, boundary input and bad inputs.

• Don't try to pass, try to fail the test.

Another 10 days

• Working with the GUI.

• The Interface Builder and the Auto Layout

One day i realize• Most of the UI would make sense if i do

programmatically.

• Yes thats when AutoLayout kicked in. But hold on tight, after few hours its all easy.

• More reusable then the storyboard. Clean Storyboard.

• Third Party Library I used: Cartography.

• https://github.com/robb/Cartography

One day i realize..

• a View controller was getting up to 900 lines and i was trying to debug using breakpoints

• It was so hard to find what i needed. Lots of scrolling around.

• Then i refactored it into 3 classes. Thankfully. All went good and my debug speed increased.

If your VC is over 500 Lines

• Read this book. Its awesome.

• Head First With Design Patterns

http://www.amazon.com/Head-First-Design-Patterns-Freeman/dp/0596007124

Asynchronous calls are Hard

• Its the necessary devil

• Its okay to have few calls here and there

• BUT, not okay to have dependent calls that needs to happen one after another and you have 4 or more calls.

• Try to make fewer calls or independent calls

Better solution• Encapsulate the whole chain of dependent calls and

refactor it out.

• Might be on a separate class or put the calling thing on the server all together and call the server once

• Reason: you need to think/manage resources/ time more

• And yes, its easy to Unit Test Async Calls.

• https://www.bignerdranch.com/blog/asynchronous-testing-with-xcode-6/

Get out of comfort Zone• I found a natural language processing library from

Stanford but it was a java file.

• perfectly fitted what i was searching BUT couldn't easily put it on iOS

• Then it took me couple of days to figure how to use that

• The solution..

JSP

• Make a Java Based Server application

• Use JSP and Apache Tomcat

• Host it on Tomcat server

• Call it using HTTP GET from the device

EC2 is Awesome• I don't use something that does not fit my current

purpose.

• But Amazon saved me because first 12 months are free and i set up the cloud ubuntu server and currently the english language transformer library is hosted on amazon happily.

• Again 1 async call.

Part 2

• Machine Learning

• Few suggestions i would pass on to starting iOS developers

Machine Learning

• Everybody talks about it, few do it.

Its Statistic (Math)• Math of probability

• You fed a computer program a 1 million photos of Cat and then the computer can probabilistically try to determine weather the next photo user submits is Cat or not.

• Google feeds in all the English Books and documents and the corresponding Japanese Books and documents translated.

“Statistics are like bikinis. What they reveal is

suggestive, but what they conceal is vital.”

-Aaron Levenstein

An example:

• http://www.clarifai.com/#demo

• Face Detection in Facebook or iPhoto

• Trends in twitter

• Mostly what Google/Facebook are doing is about Machine Learning

Resource on Machine Learning

• https://www.youtube.com/watch?v=czLI3oLDe8M

• http://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/

• http://aws.amazon.com/machine-learning/pricing/

Few suggestions from my side.

• Don't develop on Beta Version OS

• Don't develop on Beta Xcode

• Try to search everything before you start to invest time to write something. Its so much easier to use Open Source Code.

• Commit (Git) every 10 minutes on source changes

Comments:

• Theres a good career in Machine Learning : Be a statistician

• email to [email protected] to be a tester for iMyCom app

• Thank you!

www.iMyCom.jp