{"id":843,"date":"2016-02-05T20:33:56","date_gmt":"2016-02-05T20:33:56","guid":{"rendered":"http:\/\/blogs.oregonstate.edu\/eecsnews\/?p=843"},"modified":"2016-04-06T17:22:57","modified_gmt":"2016-04-06T17:22:57","slug":"writing-apps-that-dont-freeze","status":"publish","type":"post","link":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/2016\/02\/05\/writing-apps-that-dont-freeze\/","title":{"rendered":"Writing Apps That Don\u2019t Freeze"},"content":{"rendered":"<p><a href=\"http:\/\/blogs.oregonstate.edu\/eecsnews\/files\/2016\/02\/Dig_1_EECS-smaller2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-844 size-medium\" src=\"http:\/\/blogs.oregonstate.edu\/eecsnews\/files\/2016\/02\/Dig_1_EECS-smaller2-248x300.jpg\" alt=\"photo of Danny Dig\" width=\"248\" height=\"300\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/1921\/files\/2016\/02\/Dig_1_EECS-smaller2-248x300.jpg 248w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/1921\/files\/2016\/02\/Dig_1_EECS-smaller2.jpg 468w\" sizes=\"auto, (max-width: 248px) 100vw, 248px\" \/><\/a><\/p>\n<p>Danny Dig and his colleagues discovered widespread problems in mobile app development that can cause applications to be unresponsive and \u201cfreeze.\u201d After looking at over 1,000 open-source mobile apps, they found two main problems \u2014 underuse and misuse of asynchronous programming.<\/p>\n<p>\u201cIt\u2019s very easy, if you are not careful, to write a mobile app that is unresponsive,\u201d Dig says. \u201cThe number one culprit for a frozen app is that a programmer has written a blocking call, such as accessing the cloud, on the main thread that processes other user-interface events and actions.\u201d<\/p>\n<p>The solution is to move the blocking calls into the background with asynchronous programming. Dig\u2019s team has sent out hundreds of patches to developers to fix the problems in their code, and they have created tools that developers can use to find and fix asynchrony errors. Their webpages <a href=\"http:\/\/www.learnasync.net\/\">LearnAsync.NET<\/a> and <a href=\"http:\/\/refactoring.info\/tools\/\">refactoring.info\/tools<\/a> give many examples of asynchronous programming and access to the tools.<\/p>\n<p>\u201cNow what I want to do is help people avoid making those mistakes in the first place,\u201d Dig said.<\/p>\n<p>As part of his educational efforts, Dig will be <a href=\"http:\/\/www.techoregon.org\/events\/refactoring-asynchronous-execution-mobile\">presenting in Portland<\/a>, Oregon for\u00a0the Technology Association of Oregon in June. The cost is $25 for members and $45 for non-members.<\/p>\n<p>The presentation will be a technical overview of why asynchrony is important, it will include descriptions of the common pitfalls and best practices, and he will also demonstrate the tools he has developed.<\/p>\n<p>\u201cI see this as a way of transferring knowledge from research into practice, but it\u2019s also important for me to have a dialog with programmers. I bring back their feedback to the research,\u201d Dig said. \u201cSo, this is a fabulous event for me to establish those connections.\u201d<\/p>\n<p>Story by Rachel Robertson<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Danny Dig and his colleagues discovered widespread problems in mobile app development that can cause applications to be unresponsive and \u201cfreeze.\u201d After looking at over 1,000 open-source mobile apps, they found two main problems \u2014 underuse and misuse of asynchronous programming. \u201cIt\u2019s very easy, if you are not careful, to write a mobile app that&hellip; <a href=\"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/2016\/02\/05\/writing-apps-that-dont-freeze\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5907,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[502,523],"tags":[312567,1231,312566,155,101813],"class_list":["post-843","post","type-post","status-publish","format-standard","hentry","category-events","category-research","tag-asynchronous-programming","tag-computer-science","tag-mobile-app-development","tag-oregon-state-university","tag-school-of-electrical-engineering-and-computer-science"],"_links":{"self":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/posts\/843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/users\/5907"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/comments?post=843"}],"version-history":[{"count":9,"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/posts\/843\/revisions"}],"predecessor-version":[{"id":868,"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/posts\/843\/revisions\/868"}],"wp:attachment":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/media?parent=843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/categories?post=843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/eecsnews\/wp-json\/wp\/v2\/tags?post=843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}