Hélder VasconcelosJekyll2021-07-16T12:07:17+01:00http://hvasconcelos.github.io/Hélder Vasconceloshttp://hvasconcelos.github.io/heldervasc@bearstouch.com
http://hvasconcelos.github.io/articles/Offloading-work-from-the-UI-Thread
http://hvasconcelos.github.io/articles/Offloading-work-from-the-UI-Thread2016-08-01T00:00:00+01:002016-08-01T00:00:00+01:00Hélder Vasconceloshttp://hvasconcelos.github.ioheldervasc@bearstouch.com<p>In this article, I will present the most common asynchronous techniques techniques used on Android to develop an application, that using the multicore CPUs available on the most recent devices, is able to deliver up to date results quickly, respond to user interactions immediately and produce smooth transitions between the different UI states without draining the device battery.
Several reports have shown that an efficient application that provides a great user experience have better review ratings, higher user engagement and are able to achieve higher revenues.</p>
<h2 id="why-do-we-need-asynchronous-programming-on-android">Why do we need Asynchronous Programming on Android?</h2>
<p>The Android system, by default, executes the UI rendering pipeline, base components (Activity, Fragment, Service, BroadcastReceiver, …) lifecycle callback handling and UI interaction processing on a single thread, sometimes known as UI thread or main thread.</p>
<p>The main thread handles his work sequentially collecting its work from a queue of tasks (Message Queue) that are queued to be processed by a particular application component. When any unit of work, such as a I/O operation, takes a significant period of time to complete, it will block and prevent the main thread from handling the next tasks waiting on the main thread queue to processed.</p>
<p><img src="http://hvasconcelos.github.io/images/main_thread_queue.png" alt="main_thread_queue" /></p>
<p>Besides that, most Android devices refresh the screen 60 times per second, so every 16 milliseconds (1s/60 frames) a UI rendering task has to be processed by the main thread in order to draw and update the device screen. The next figure shows up a typical main thread timeline that runs the UI rendering task every 16ms.</p>
<p><img src="http://hvasconcelos.github.io/images/main_thread_rendering.png" alt="main_thread_rendering" /></p>
<p>When a long lasting operation, prevents the main thread from executing frame rendering in time, the current frame drawing is deferred or some frame drawings are missed generating a UI glitch noticeable to the application user.</p>
<p>A typical long lasting operation could be:</p>
<ul>
<li>Network data communication</li>
<li>HTTP REST Request</li>
<li>SOAP Service Access</li>
<li>File Upload or Backup</li>
<li>Reading or writing of files to the filesystem</li>
<li>Shared Preferences Files</li>
<li>File Cache Access</li>
<li>Internal Database reading or writing</li>
<li>Camera, Image, Video, Binary file processing.</li>
</ul>
<p>A user Interface glitch produced by dropped frames on Android is known on Android as jank. The Android SDK command systrace (https://developer.android.com/studio/profile/systrace.html)
comes with the ability to measure the performance of UI rendering and then diagnose and identify problems that may arrive from various threads that are running on the application process.
In the next image we illustrate a typical main thread timeline when a blocking operation dominates the main thread for more than 2 frame rendering windows.</p>
<p><img src="http://hvasconcelos.github.io/images/blocking_operation.png" alt="blocking_operation" /></p>
<p>As you can perceive, 2 frames are dropped and the 1 UI Rendering frame was deferred because our blocking operation took approximately 35ms, to finish.</p>
<p>When the long running operation that runs on the main thread does not complete within 5 seconds, the Android System displays an “Application not Responding” (ANR) dialog to the user giving him the option to close the application.</p>
<p>Hence, in order to execute compute-intensive or blocking I/O operations without dropping a UI frame, generate UI glitches or degrade the application responsiveness, we have to offload the task execution to a background thread, with less priority, that runs concurrently and asynchronously in an independent line of execution, like shown on the following picture.</p>
<p><img src="http://hvasconcelos.github.io/images/async_processing.png" alt="async_processing" /></p>
<p>Although, the use of asynchronous and multithreaded techniques always introduces complexity to the application, Android SDK and some well known open source libraries provide high level asynchronous constructs that allow us to perform reliable asynchronous work that relieve the main thread from the hard work.
Each asynchronous construct has advantages and disadvantages and by choosing the right construct for your requirements can make your code more reliable, simpler, easier to maintain and less error prone.</p>
<p>Let’s enumerate the most common techniques that are covered in detail in the “Asynchronous Android Programming” book.</p>
<h2 id="asynctask">AsyncTask</h2>
<p>AsyncTask is simple construct available on the Android platform since Android Cupcake (API Level 3) and is the most widely used asynchronous construct. The AsyncTask was designed to run short-background operations that once finished update the UI.
The AsyncTask construct performs the time consuming operation, defined on the doInBackground function, on a global static thread pool of background threads. Once doInBackground terminates with success, the AsyncTask construct switches back the processing to the main thread (onPostExecute) delivering the operation result for further processing.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">DownloadImageTask</span> <span class="kd">extends</span> <span class="nc">AsyncTask</span><span class="o"><</span><span class="no">URL</span><span class="o">,</span> <span class="nc">Integer</span><span class="o">,</span> <span class="nc">Bitmap</span><span class="o">></span> <span class="o">{</span>
<span class="kd">protected</span> <span class="nc">Long</span> <span class="nf">doInBackground</span><span class="o">(</span><span class="no">URL</span><span class="o">...</span> <span class="n">urls</span><span class="o">)</span> <span class="o">{}</span>
<span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onProgressUpdate</span><span class="o">(</span><span class="nc">Integer</span><span class="o">...</span> <span class="n">progress</span><span class="o">)</span> <span class="o">{}</span>
<span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onPostExecute</span><span class="o">(</span><span class="nc">Bitmap</span> <span class="n">image</span><span class="o">)</span> <span class="o">{}</span>
<span class="o">}</span>
</code></pre></div></div>
<p>This technique if it is not used properly can lead to memory leaks or inconsistent results.</p>
<h2 id="handlerthread">HandlerThread</h2>
<p>The HandlerThread is a Threat that incorporates a message queue and an Android Looper that runs continuously waiting for incoming operations to execute. To submit new work to the Thread we have to instantiate a Handler that is attached to HandlerThread Looper.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">HandlerThread</span> <span class="n">handlerThread</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">HandlerThread</span><span class="o">(</span><span class="s">"MyHandlerThread"</span><span class="o">);</span>
<span class="n">handlerThread</span><span class="o">.</span><span class="na">start</span><span class="o">();</span>
<span class="nc">Looper</span> <span class="n">looper</span> <span class="o">=</span> <span class="n">handlerThread</span><span class="o">.</span><span class="na">getLooper</span><span class="o">();</span>
<span class="nc">Handler</span> <span class="n">handler</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Handler</span><span class="o">(</span><span class="n">looper</span><span class="o">);</span>
<span class="n">handler</span><span class="o">.</span><span class="na">post</span><span class="o">(</span><span class="k">new</span> <span class="nc">Runnable</span><span class="o">(){</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">run</span><span class="o">()</span> <span class="o">{}</span>
<span class="o">});</span>
</code></pre></div></div>
<p>The Handler interface allow us to submit a Message or a Runnable subclass object that could aggregate data and a chunk of work to be executed.</p>
<h2 id="loader">Loader</h2>
<p>The Loader construct allow us to run asynchronous operations that load content from a content provider or a data source, such as an Internal Database or a HTTP service. The API can load data asynchronously, detect data changes, cache data and is aware of the Fragment and Activity lifecycle. The Loader API was introduced to the Android platform at API level 11, but are available for backwards compatibility through the Android Support libraries.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">TextLoader</span> <span class="kd">extends</span> <span class="nc">AsyncTaskLoader</span><span class="o"><</span><span class="nc">String</span><span class="o">></span> <span class="o">{</span>
<span class="nd">@Override</span> <span class="kd">public</span> <span class="nc">String</span> <span class="nf">loadInBackground</span><span class="o">()</span> <span class="o">{</span>
<span class="c1">// Background work</span>
<span class="o">}</span>
<span class="nd">@Override</span> <span class="kd">public</span> <span class="kt">void</span> <span class="nf">deliverResult</span><span class="o">(</span><span class="nc">String</span> <span class="n">text</span><span class="o">)</span> <span class="o">{}</span>
<span class="nd">@Override</span> <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onStartLoading</span><span class="o">()</span> <span class="o">{}</span>
<span class="nd">@Override</span> <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onStopLoading</span><span class="o">()</span> <span class="o">{}</span>
<span class="nd">@Override</span> <span class="kd">public</span> <span class="kt">void</span> <span class="nf">onCanceled</span><span class="o">(</span><span class="nc">String</span> <span class="n">text</span><span class="o">)</span> <span class="o">{}</span>
<span class="nd">@Override</span> <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onReset</span><span class="o">()</span> <span class="o">{}</span>
<span class="o">}</span>
</code></pre></div></div>
<h2 id="intentservice">IntentService</h2>
<p>The IntentService class is a specialized subclass of Service that implements a background work queue using a single HandlerThread. When work is submitted to an IntentService, it is queued for processing by a HandlerThread, and processed in order of submission.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">BackupService</span> <span class="kd">extends</span> <span class="nc">IntentService</span> <span class="o">{</span>
<span class="nd">@Override</span>
<span class="kd">protected</span> <span class="kt">void</span> <span class="nf">onHandleIntent</span><span class="o">(</span><span class="nc">Intent</span> <span class="n">workIntent</span><span class="o">)</span> <span class="o">{</span>
<span class="c1">// Background Work</span>
<span class="o">}</span>
<span class="o">}</span>
</code></pre></div></div>
<h2 id="jobscheduler">JobScheduler</h2>
<p>The JobScheduler API allow us to execute jobs in background when several prerequisites are fulfilled and taking into the account the energy and network context of the device. This technique allows us to defer and batch job executions until the device is charging or an unmetered network is available.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">JobScheduler</span> <span class="n">scheduler</span> <span class="o">=</span> <span class="o">(</span><span class="nc">JobScheduler</span><span class="o">)</span> <span class="n">getSystemService</span><span class="o">(</span>
<span class="nc">Context</span><span class="o">.</span><span class="na">JOB_SCHEDULER_SERVICE</span><span class="o">);</span>
<span class="nc">JobInfo</span><span class="o">.</span><span class="na">Builder</span> <span class="n">builder</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">JobInfo</span><span class="o">.</span><span class="na">Builder</span><span class="o">(</span><span class="no">JOB_ID</span><span class="o">,</span><span class="n">serviceComponent</span><span class="o">);</span>
<span class="n">builder</span><span class="o">.</span><span class="na">setRequiredNetworkType</span><span class="o">(</span><span class="nc">JobInfo</span><span class="o">.</span><span class="na">NETWORK_TYPE_UNMETERED</span><span class="o">);</span>
<span class="n">builder</span><span class="o">.</span><span class="na">setRequiresCharging</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
<span class="n">scheduler</span><span class="o">.</span><span class="na">schedule</span><span class="o">(</span><span class="n">builder</span><span class="o">.</span><span class="na">build</span><span class="o">());</span>
</code></pre></div></div>
<h2 id="rxjava">RxJava</h2>
<p>RxJava is an implementation of the Reactive Extensions (ReactiveX) on the JVM, that was developed by Netflix, used to compose asynchronous event processing that react to an observable source of events.
The framework extends the Observer pattern by allowing us to create a stream of events, that could be intercepted by operators (input/output) that modify the original stream of events and deliver the result or an error to a final Observer.
The RxJava Schedulers allow us to control in which thread our Observable will begin operating on and in which thread the event is delivered to the final Observer or Subscriber.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">Subscription</span> <span class="n">subscription</span> <span class="o">=</span> <span class="n">getPostsFromNetwork</span><span class="o">()</span>
<span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="k">new</span> <span class="nc">Func1</span><span class="o"><</span><span class="nc">Post</span><span class="o">,</span> <span class="nc">Post</span><span class="o">>()</span> <span class="o">{</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="nc">Post</span> <span class="nf">call</span><span class="o">(</span><span class="nc">Post</span> <span class="nc">Post</span><span class="o">)</span> <span class="o">{</span>
<span class="o">...</span>
<span class="k">return</span> <span class="n">result</span><span class="o">;</span>
<span class="o">}</span>
<span class="o">})</span>
<span class="o">.</span><span class="na">subscribeOn</span><span class="o">(</span><span class="nc">Schedulers</span><span class="o">.</span><span class="na">io</span><span class="o">())</span>
<span class="o">.</span><span class="na">observeOn</span><span class="o">(</span><span class="nc">AndroidSchedulers</span><span class="o">.</span><span class="na">mainThread</span><span class="o">())</span>
<span class="o">.</span><span class="na">subscribe</span><span class="o">(</span><span class="k">new</span> <span class="nc">Observer</span><span class="o"><</span><span class="nc">Post</span><span class="o">>()</span> <span class="o">{</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">onCompleted</span><span class="o">()</span> <span class="o">{}</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">onError</span><span class="o">()</span> <span class="o">{}</span>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">onNext</span><span class="o">(</span><span class="nc">Post</span> <span class="n">post</span><span class="o">)</span> <span class="o">{</span>
<span class="c1">// Process the result</span>
<span class="o">}</span>
<span class="o">});</span>
</code></pre></div></div>
<h2 id="summary">Summary</h2>
<p>As you have seen, there are several high level asynchronous constructs available to offload the long computing or blocking tasks from the UI thread and it is up to developer to choose right construct for each situation because there is not an ideal choice that could be applied everywhere.
Asynchronous multithreaded programming, that produces reliable results, is difficult and error prone task so using a high level technique tends to simplify the application source code and the multithreading processing logic required to scale the application over the available CPU cores.
Remember that keeping your application responsive and smooth is essential to delight your users and increase your chances to create a notorious mobile application.</p>
<p>The techniques and asynchronous constructs summarized on the previous paragraphs are covered in detail in the <a href="https://www.packtpub.com/application-development/asynchronous-android-programming-second-edition">Asynchronous Android Programming</a> book published by Packt Publishing.</p>
<p><a href="http://hvasconcelos.github.io/articles/Offloading-work-from-the-UI-Thread">Offloading work from the UI Thread on Android</a> was originally published by Hélder Vasconcelos at <a href="http://hvasconcelos.github.io">Hélder Vasconcelos</a> on August 01, 2016.</p>
http://hvasconcelos.github.io/articles/Asynchronous-Android-Programming-is-out-now
http://hvasconcelos.github.io/articles/Asynchronous-Android-Programming-is-out-now2016-07-29T00:00:00+01:002016-07-29T00:00:00+01:00Hélder Vasconceloshttp://hvasconcelos.github.ioheldervasc@bearstouch.com<p><img src="http://hvasconcelos.github.io/images/whole_cover.png" alt="Asynchronous AndroidBook Cover" /></p>
<h2 id="book-description">Book Description</h2>
<p>Asynchronous programming has acquired immense importance in Android programming, especially when we want to make use of the number of independent processing units (cores) available on the most recent Android devices. With this guide in your hands you’ll be able to bring the power of Asynchronous programming to your own projects, and make your Android apps more powerful than ever before!</p>
<p>To start with, we will discuss the details of the Android Process model and the Java Low Level Concurrent Framework, delivered by Android SDK. We will also guide you through the high-level Android-specific constructs available on the SDK: Handler, AsyncTask, and Loader. Next, we will discuss the creation of IntentServices, Bound Services and External Services, which can run in the background even when the user is not interacting with it. You will also discover AlarmManager and JobScheduler APIs, which are used to schedule and defer work without sacrificing the battery life. In a more advanced phase, you will create background tasks that are able to execute CPU-intensive tasks in a native code-making use of the Android NDK. You will be then guided through the process of interacting with remote services asynchronously using the HTTP protocol or Google GCM Platform. Using the EventBus library, we will also show how to use the Publish-Subscribe software pattern to simplify communication between the different Android application components by decoupling the event producer from event consumer.</p>
<p>Finally, we will introduce RxJava, a popular asynchronous Java framework used to compose work in a concise and reactive way. Asynchronous Android will help you to build well-behaved applications with smooth responsive user interfaces that delight the users with speedy results and data that’s always fresh.</p>
<h2 id="what-you-will-learn">What You Will Learn</h2>
<ul>
<li>Learn about the Android Process and the low level concurrent and multithread constructs available on Android SDK.</li>
<li>Use AsyncTask and Loader framework to load data in the background, delivering progress results in the meantime</li>
<li>How to enhance UI performance and responsiveness by sending work to a Service running in the background.</li>
<li>How to defer, schedule and batch work on the Android System without compromising the battery life and user experience.</li>
<li>How to use the JNI interface to execute concurrent work on native code (C/C++)</li>
<li>How to pull and push data from your network servers using Google GCM Platform.</li>
<li>How to use the Publish/Subscribe Pattern on Android to decouple the the message consumer from the message producer.</li>
<li>How to create and compose tasks with RxJava to execute complex asynchronous work in a predictable way.</li>
</ul>
<h2 id="chapters">Chapters:</h2>
<ol>
<li>Asynchronous Programming in Android</li>
<li>Performing Work with Looper, Handler, and HandlerThread</li>
<li>Exploring the Asynctask</li>
<li>Exploring the Loader</li>
<li>Interacting with Services</li>
<li>Scheduling Work with Alarmmanager</li>
<li>Exploring the Jobscheduler API</li>
<li>Interacting with the Network</li>
<li>Asynchronous Work on the Native Layer</li>
<li>Network Interactions with GCM</li>
<li>Exploring Bus based Communications</li>
<li>Asynchronous Programing with RxJava</li>
</ol>
<p><a href="https://www.packtpub.com/mapt/book/Application%20Development/9781785883248">Free sample</a></p>
<h3 id="available-on">Available on:</h3>
<ul>
<li><a href="http://amzn.to/2auAux6">Amazon</a></li>
<li><a href="http://bit.ly/2aCkPMp">Book Depository</a></li>
<li><a href="http://bit.ly/2aSg1aB">Foyles</a></li>
<li><a href="http://bit.ly/2alTs8z">Packt Publishing</a></li>
<li><a href="http://ebay.to/2b384Lw">Ebay</a></li>
<li><a href="http://bit.ly/2aw0o5L">!Indigo</a></li>
<li><a href="http://bit.ly/2atwhL8">Barnes and Noble</a></li>
<li><a href="http://bit.ly/2aJ804x">AbeBooks</a></li>
</ul>
<p><a href="http://hvasconcelos.github.io/articles/Asynchronous-Android-Programming-is-out-now">Asynchronous Android Programming is out now</a> was originally published by Hélder Vasconcelos at <a href="http://hvasconcelos.github.io">Hélder Vasconcelos</a> on July 29, 2016.</p>
http://hvasconcelos.github.io/articles/Asynchronous-Android-Programming-is-available-to-preorder
http://hvasconcelos.github.io/articles/Asynchronous-Android-Programming-is-available-to-preorder2016-04-17T00:00:00+01:002016-04-17T00:00:00+01:00Hélder Vasconceloshttp://hvasconcelos.github.ioheldervasc@bearstouch.com<p><img src="http://hvasconcelos.github.io/images/aap_book.jpg" alt="Asynchronous AndroidBook Cover" /></p>
<p>Asynchronous programming has acquired immense importance in Android programming, especially when we want to make use of the number of independent processing units (cores) available on the most recent Android devices.</p>
<h2 id="chapters">Chapters:</h2>
<ol>
<li>Introduction to Android Models</li>
<li>Performing world with Looper, Handler and HandlerThread</li>
<li>Exploring AsyncTask</li>
<li>Exploring Loader</li>
<li>Interacting with Services</li>
<li>Scheduling Work with AlarmManager</li>
<li>Exploring JobScheduler API</li>
<li>Interacting with the Network</li>
<li>Performing work on the Native layer</li>
<li>Efficient Network Interactions with GCM</li>
<li>Exploring Bus based Communications</li>
<li>Asynchronous Programing with RxJava</li>
</ol>
<h2 id="what-you-will-learn">What You Will Learn:</h2>
<ul>
<li>Learn about the Android Process and the low level concurrent and multithread constructs available on Android SDK.</li>
<li>How to use AsyncTask to load data in background delivering progress results in the meantime.</li>
<li>How to use the Android Loader construct to load data in background and deliver up to date results.</li>
<li>How to enhance UI performance and responsiveness by sending work to a Service running in the background.</li>
<li>How to defer, schedule and batch work on the Android System without compromising the battery life and user experience.</li>
<li>How to use the JNI interface to execute concurrent work on the native layer.</li>
<li>How to pull and push data from your network servers using Google GCM Platform.</li>
<li>How to create and compose tasks with RxJava to execute complex asynchronous work in a predictable way.</li>
</ul>
<p>Preorder it at <a href="http://www.amazon.co.uk/Asynchronous-Android-Programming-Helder-Vasconcelos/dp/1785883240/">Amazon</a></p>
<p>More info at <a href="https://www.packtpub.com/application-development/asynchronous-android-programming">Packt Publishing</a></p>
<p><a href="http://hvasconcelos.github.io/articles/Asynchronous-Android-Programming-is-available-to-preorder">Asynchronous Android Programming available to pre-order</a> was originally published by Hélder Vasconcelos at <a href="http://hvasconcelos.github.io">Hélder Vasconcelos</a> on April 17, 2016.</p>
http://hvasconcelos.github.io/articles/Asynchronous-Android
http://hvasconcelos.github.io/articles/Asynchronous-Android2013-12-29T00:00:00+00:002013-12-29T00:00:00+00:00Hélder Vasconceloshttp://hvasconcelos.github.ioheldervasc@bearstouch.com<p><img src="http://hvasconcelos.github.io/images/Asynchronous_Android_cover.jpg" alt="Asynchronous AndroidBook Cover" /></p>
<p>The awesome book by Steve Liles that i have been reviewing in the lasts months for Packt Publishing is available on stores.</p>
<p>Asynchronous Android is a step-by-step guide that builds a complete picture of the concurrency constructs available on the Android platform.</p>
<p>With this book you’ll learn how to use AsyncTask correctly to perform operations in the background, keeping user interfaces running smoothly while avoiding treacherous memory leaks. It will also help you discover Handler, HandlerThread, and Looper, the related and fundamental building blocks of asynchronous programming in Android</p>
<p>Thanks to everyone involved in the project.</p>
<p>More info at <a href="http://www.packtpub.com/concurrent-programming-on-android/book">Packt Publishing</a></p>
<p><a href="http://hvasconcelos.github.io/articles/Asynchronous-Android">Asynchronous Android book is out</a> was originally published by Hélder Vasconcelos at <a href="http://hvasconcelos.github.io">Hélder Vasconcelos</a> on December 29, 2013.</p>
http://hvasconcelos.github.io/articles/Moving-To-Ireland
http://hvasconcelos.github.io/articles/Moving-To-Ireland2013-09-29T00:00:00+01:002013-09-29T00:00:00+01:00Hélder Vasconceloshttp://hvasconcelos.github.ioheldervasc@bearstouch.com<p>One year has passed since i arrived in Dublin Ireland, so i think it is the right time to share a little bit more about my experience and share some tips with Ireland newcomers and people that are willing to move to this country.</p>
<h2 id="before-moving">Before Moving</h2>
<p>After 5 years working for the same employer and after the last events that had happened in the Portuguese economy me and my wife decided that it was the time to try to build our life in a new country.</p>
<p>After a June weekend updating my Monster profile in the next work days i started to receive phone calls from job agencies around Europe.</p>
<p>The job interview processes lasted in August when i accepted a proposal made by my current company. They hired me to work in a permanent Senior Software Engineer role based in Dublin,Ireland.</p>
<h2 id="why-ireland">Why Ireland</h2>
<p>The Ireland choice was not hard but the arguments that convinced me were:</p>
<ul>
<li>A job in a different industry - Aeronautical Telecommunications</li>
<li>Chance to new learn new things and work with leading technologies</li>
<li>A huge cluster of International IT companies to work on with competitive remunerations and career prospects.</li>
<li>A challenging multicultural environment workplace</li>
<li>Fast-paced dynamic IT sector</li>
</ul>
<p>In October of 2012 i arrived in the Dublin Airport coming from the sunny Portugal with a lot expectations and 2 bags of personal stuff to support my first year in the country.</p>
<h2 id="after-arriving">After Arriving</h2>
<p>In the first days, i spent most of my time doing the paperwork so for helping newcomers i created an ordered list of tasks, tips and advices that you should follow in order to get everything done without to much rush.</p>
<ol>
<li>Rent an apartment or a house and get a letter from the landlord saying that you live on the house (proof of address). Here is a list of websites to search for apartments and houses:
<ul>
<li><a href="http://www.daft.ie/">Daft</a></li>
<li><a href="http://www.myhome.ie">MyHome</a></li>
<li><a href="http://www.rent.ie">Rent IE</a></li>
</ul>
</li>
<li>Go to your <strong>Social Welfare Local Office</strong> and register your PPSN (Personal Public Services Number) with the proof of address and your passport.Use the <a href="http://www.welfare.ie/en/Pages/Intreo-Centres-and-Local-and-Branch-Offices.aspx">Office Locator</a> to know the street addresould</li>
<li>
<p>Apply for a <strong>Tax Certificate</strong> with the form <a href="http://www.revenue.ie/en/tax/it/forms/form12a.pdf">Form12A</a> after receiving your PPS number on the post, it usually takes 5 work days after the registering. Fill the form an send it by post to your local Revenue Office.</p>
</li>
<li>Open a <strong>Bank Account</strong> on your preferred Irish bank to receive your salary.Be aware that the bank may ask you for a recommendation from your employer.
<ul>
<li><a href="http://www.aib.ie/">AIB</a></li>
<li><a href="http://www.nationalirishbank.ie/">National Irish Bank</a></li>
<li><a href="http://www.bankofireland.com/">Bank of Ireland</a></li>
<li><a href="http://www.ulsterbank.ie/">Ulster bank</a></li>
</ul>
</li>
<li>Buy a mobile phone from a Irish mobile provider network because you may need it to call to some services, the list of Irish mobile phone providers:
<ul>
<li><a href="http://meteor.ie/">Meteor</a></li>
<li><a href="http://www.vodafone.ie/">Vodafone</a></li>
<li><a href="http://www.o2online.ie/">O2</a></li>
<li><a href="http://www.three.ie/">Three</a></li>
</ul>
</li>
<li>If you coming from a South European country don’t forget to buy some warm clothes because the Winter is long, cold and rainy.</li>
</ol>
<h2 id="overall-experience">Overall Experience</h2>
<p>The overall experience in Ireland has been very positive and the most part of the people are kindly and helpful but i am still adapting to Irish culture and weather.</p>
<p>The city is environment is vibrant so you can find many historical and cool places to visit on the weekends.</p>
<p>If you planning to move to Ireland first try get a job before you come in, save some money for the relocation expenses and compare the cost of living and taxes with your city in order to properly negotiate your salary.</p>
<h3 id="helpful-links">Helpful Links</h3>
<ul>
<li><a href="http://www.daft.ie">Daft IE</a></li>
<li><a href="http://www.monster.com/">Monster</a></li>
<li><a href="http://www.revenue.ie">Revenue</a></li>
<li><a href="http://www.welfare.ie">Welfare Services</a></li>
<li><a href="http://www.dublinbus.ie">Dublin Bus</a></li>
<li><a href="http://www.luas.ie">Luas</a></li>
<li><a href="http://irishrail.ie">Irish Rail</a></li>
</ul>
<p><a href="http://hvasconcelos.github.io/articles/Moving-To-Ireland">Moving to Ireland</a> was originally published by Hélder Vasconcelos at <a href="http://hvasconcelos.github.io">Hélder Vasconcelos</a> on September 29, 2013.</p>