Top Banner
iMyCom Getting High with Communication tool (iOS App)
39
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: iMyCom:Tripping along iOS development of Langauge Communication tool

iMyComGetting High with Communication tool (iOS App)

Page 2: iMyCom:Tripping along iOS development of Langauge Communication tool

Bj Kandel

• iOS Developer at iMyCom

Page 3: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 4: iMyCom:Tripping along iOS development of Langauge Communication tool
Page 5: iMyCom:Tripping along iOS development of Langauge Communication tool
Page 6: iMyCom:Tripping along iOS development of Langauge Communication tool
Page 7: iMyCom:Tripping along iOS development of Langauge Communication tool
Page 8: iMyCom:Tripping along iOS development of Langauge Communication tool
Page 9: iMyCom:Tripping along iOS development of Langauge Communication tool
Page 10: iMyCom:Tripping along iOS development of Langauge Communication tool

Language Translation

• Its sad.

Page 11: iMyCom:Tripping along iOS development of Langauge Communication tool

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?

Page 12: iMyCom:Tripping along iOS development of Langauge Communication tool

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

• We don't compete nor would we.

• But, theres more.

Page 13: iMyCom:Tripping along iOS development of Langauge Communication tool

Google Translate

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

• Do you use it?

Page 14: iMyCom:Tripping along iOS development of Langauge Communication tool

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.

Page 15: iMyCom:Tripping along iOS development of Langauge Communication tool

Rosetta Stone

• Takes week to say basic hello hi

• Takes month to order a Burger at McDonalds

• Its not real time!

Page 16: iMyCom:Tripping along iOS development of Langauge Communication tool

iMyCom

• Real Time communicator.

• Learn as you communicate or vice versa.

Page 17: iMyCom:Tripping along iOS development of Langauge Communication tool

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.

Page 18: iMyCom:Tripping along iOS development of Langauge Communication tool

Part1

• There are only 2 parts.

• Its all about Xcode/Development Cycle

Page 19: iMyCom:Tripping along iOS development of Langauge Communication tool

First 4 days

• made a prototype for transforming 4 sentences similar to

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

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

Page 20: iMyCom:Tripping along iOS development of Langauge Communication tool

Another 10 days

• Had to deal with Japanese Grammar.

• Wrote a small library for JapaneseTransformation

• But it was unreliable.

Page 21: iMyCom:Tripping along iOS development of Langauge Communication tool

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.

Page 22: iMyCom:Tripping along iOS development of Langauge Communication tool

Another 10 days

• Working with the GUI.

• The Interface Builder and the Auto Layout

Page 23: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 24: iMyCom:Tripping along iOS development of Langauge Communication tool

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.

Page 25: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 26: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 27: iMyCom:Tripping along iOS development of Langauge Communication tool

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/

Page 28: iMyCom:Tripping along iOS development of Langauge Communication tool

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..

Page 29: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 30: iMyCom:Tripping along iOS development of Langauge Communication tool

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.

Page 31: iMyCom:Tripping along iOS development of Langauge Communication tool

Part 2

• Machine Learning

• Few suggestions i would pass on to starting iOS developers

Page 32: iMyCom:Tripping along iOS development of Langauge Communication tool

Machine Learning

• Everybody talks about it, few do it.

Page 33: iMyCom:Tripping along iOS development of Langauge Communication tool

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.

Page 34: iMyCom:Tripping along iOS development of Langauge Communication tool

“Statistics are like bikinis. What they reveal is

suggestive, but what they conceal is vital.”

-Aaron Levenstein

Page 35: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 36: iMyCom:Tripping along iOS development of Langauge Communication tool

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/

Page 37: iMyCom:Tripping along iOS development of Langauge Communication tool

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

Page 38: iMyCom:Tripping along iOS development of Langauge Communication tool

Comments:

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

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

Page 39: iMyCom:Tripping along iOS development of Langauge Communication tool

• Thank you!

www.iMyCom.jp