<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eddie Long on Medium]]></title>
        <description><![CDATA[Stories by Eddie Long on Medium]]></description>
        <link>https://medium.com/@parrotbait?source=rss-71eb7815bacc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ym_iZF78csG4pnpd.jpeg</url>
            <title>Stories by Eddie Long on Medium</title>
            <link>https://medium.com/@parrotbait?source=rss-71eb7815bacc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:55:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@parrotbait/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Property Price Register — Mapped]]></title>
            <link>https://parrotbait.medium.com/property-price-register-mapped-c29bfc1204e0?source=rss-71eb7815bacc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c29bfc1204e0</guid>
            <dc:creator><![CDATA[Eddie Long]]></dc:creator>
            <pubDate>Sun, 22 Nov 2020 20:55:00 GMT</pubDate>
            <atom:updated>2020-11-22T21:05:32.814Z</atom:updated>
            <content:encoded><![CDATA[<h3>Property Price Register — Mapped</h3><p>As I previously wrote in my <a href="https://medium.com/@parrotbait/the-property-price-register-a-rant-f55ca421e798">Property Price Register — A Rant</a>, the Property Price Register (PPR) in Ireland is a mess. A while back as a side project I decided to take on a task of mapping it.</p><p>The steps were as follows:</p><ul><li>Get the public PPR csv, all records since it started. Parse it, clean up common issues I found, run reverse geocoding on each address and then store the results with the correctly formatted address and latitude and longitude.</li><li>This then allows me to display properties on a map, filter and run queries on.</li></ul><p>The website as it stands is here :</p><p><a href="http://pprsite.s3-website-eu-west-1.amazonaws.com/">The Property Price Register Mapped</a>.</p><p>I haven’t properly set up the domain, securing it etc. for reasons I’ll go into later.</p><p>For those interested I’ll go into technical detail about how I created it.</p><p><em>Backend</em>:</p><ul><li>NodeJS with <a href="https://expressjs.com/">Express</a> and <a href="https://vincit.github.io/objection.js/">Objection ORM</a></li><li>MySQL</li></ul><p><em>Front End</em></p><ul><li>React <a href="https://react-bootstrap.github.io/">Bootstrap</a></li></ul><p><em>Processing</em></p><ul><li>NodeJS</li><li>MySQL</li></ul><h4>Processing</h4><p>The Processing component reads the publicly available property price register public CSV file. A NodeJS script parses the CSV, reading each record line by line. There’s several thousand records so there are optimisations in place to ensure subsequent runs on the script don’t do the same work again.</p><p>For each record the app performs formatting and cleanup of the addresses, this removes some common issues and issues with Irish address as I wrote about previously.</p><p>The resultant address is then looked up in the database to see if we already parsed it before, if so then we can update the details with a new sale.</p><p>If not present the address is stored in the database and flagged as requiring a geocode.</p><p>On the server there’s a cron job running every few hours that looks at the database for latest records and performs a reverse geocode on the new records. When results are fetched the database is updated, if an accurate match is found the returned formatted address, latitude and longitude is stored. If an accurate match is not found, e.g. only a general area or bounding box is found, the address is flagged as rejected and put into a table into the database.</p><h4>Geocoding</h4><p>For geocoding I used a few different sources. This is ultimately where the biggest issue I found lies.</p><p><em>Google Maps</em> was the most logical and first port of call. There are over <strong>400 hundred thousand entries</strong> in the property price register csv, using Google Maps very quickly becomes very very expensive. As a side project I wasn’t willing to spend much on this so this was quickly ruled out.</p><p><em>Open Street Map</em> was the next option. It is free and I thought it would be accurate. However the rejections I was seeing weren’t good, too many valid addresses were being rejected. So I decided to move onto something else.</p><p>Finally I landed on <em>Bing Maps</em>. It has a free tier which allows for a lot of free geocoding requests. They need to be batched up and processing is delayed which made things a little trickier. I created several accounts and API keys and fired off the cron job to cycle through the keys a few times a day. It almost certainly wasn’t allowed under their T&amp;C but I just wanted to see how far I could go with it. The results are <em>ok, </em>Google Maps is more accurate but I couldn’t complain.</p><h4>API</h4><p>I created a REST API using Express with Node, it’s pretty straight forward — just pulls the data from the database really. I also added JWT to it, in the vain hope of others using the REST API in future.</p><h4>Front end</h4><p>The front is using React Bootstrap. It was my first time using React so a fun learning experience, though frustrating to do simple stuff sometimes. I added some fairly basic filters, they probably aren’t super robust but seem to do the job most of the time.</p><p>I’m using Google Maps for visualising the properties, their clustering is impressive. If a user does try to load all the properties at once, then it does spin the fans on your machine and is slow but for a year or so it works ok on my macbook.</p><h4>The Future</h4><p>I managed to get through the 300k records (at the time the full PPR) around2 years ago. However life got in the way and I had to side-line the project for some time. When I got back to it there was another 100k odd records and all my accounts had been disabled. Microsoft changed their policies and it makes it impossible for me to (ab)use the service again in the same way.</p><p>I revived it in recent months and improved it a bit but a few things happened that means I’ll probably just set this to the side and leave it as is.</p><ul><li>I discovered the site <a href="https://propertypriceregisterireland.com/">https://propertypriceregisterireland.com/</a> — they have done pretty much everything I’ve done. Clearly they’ve had more time and ability on front end dev to push it along than me.</li><li>The problem with the reverse geocoding is not a cheap one to solve. Moving providers means I may have issues with existing records and matching in the future.</li><li>The geocoding I’ve used isn’t very accurate anyway, there’s tons of problems. Possibly caused by my errors when parsing and processing the content and receiving geocoding results.</li></ul><p>I’ll probably make the repo public after I clean it up a bit. For now, enjoy the site as it is, it’s got several years of data there. Much of it is accurate, some issues are there but hopefully it’ll be useful to someone!</p><p>Any feedback is welcome at eddie dot long dot dev @gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c29bfc1204e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Localisation Via Storyboard]]></title>
            <link>https://parrotbait.medium.com/localisation-via-storyboard-98003b630587?source=rss-71eb7815bacc------2</link>
            <guid isPermaLink="false">https://medium.com/p/98003b630587</guid>
            <category><![CDATA[storyboard]]></category>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Eddie Long]]></dc:creator>
            <pubDate>Thu, 10 Jan 2019 12:43:11 GMT</pubDate>
            <atom:updated>2019-01-10T12:43:53.078Z</atom:updated>
            <content:encoded><![CDATA[<h3>Live localization via storyboards (iOS + Swift)</h3><p>For a while I’ve been a bit dismayed at viewing localisations in Storyboards or NIBs. There have been a few different solutions suggested:</p><ul><li>Have a different storyboard/XIB per language, this is a terrible idea.</li><li>Have different .strings for storyboards but these have a few drawbacks. * They don’t update when you update the storyboard content. <br>* Strings in the storyboard `.strings`file are also not in a readable format. <br>* You’re also splitting up your localisation files, generally I’ve found that localisation companies just want a single dump of localisation strings. <br>* Having multiple files makes it easy to forget files. <br>* Strings are not shared so you cannot re-use existing strings (how many ‘Ok’ strings do you want to have?)</li></ul><p>Below is one solution proposed to this problem. It might not be the best solution but is one way around having multiple strings files strewn around the place and have live content.</p><p>The solution uses strings from the main Localizable.strings file, renders the text dynamically in XCode and allows the language to be set dynamically in Interface Builder.</p><p>The key is to use @IBDesignable and @IBInspectible.</p><blockquote>@IBDesignable allows the content to be updated and rendered dynamically in Interface Builder.</blockquote><blockquote>@IBInspectible allows properties to be inspected and set via Interface Builder.</blockquote><p>This solution It requires you to derive from UILabel (for example). It needs to be a custom class as we need to override layoutSubviews which is not possible in extensions. Without this the content is not dynamically reflected in Interface Builder.</p><p>Below is LocalisedLabel.swift :</p><pre>import Foundation<br>import UIKit</pre><pre><a href="http://twitter.com/IBDesignable">@IBDesignable</a><br>class LocalisedLabel : UILabel {<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var localisationId : String = &quot;&quot;<br>    <br>    override func layoutSubviews() {<br>        super.layoutSubviews();<br>        syncWithIB()<br>    }<br>    <br>    func syncWithIB() {<br>        if !self.localisationId.isEmpty {<br>            let ret = Bundle(for: type(of: self)).localizedString(forKey: self.localisationId, value: &quot;&quot;, table: nil);<br>            self.text = ret<br>        }<br>    }<br>}</pre><p>Let’s go through this step by step.</p><ul><li>@IBDesignable is a keyword to enable runtime rendering of the UILabel</li><li>Derive LocalisedLabel from UILabel, for new labels you need to set the class in the Xcode Identity Inspector pane.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*A7-cEyBNXabRl6042lbQzQ.png" /></figure><ul><li>The property localisationId is a key to look up in your Localizable.strings file. Because it uses @IBInspectable you will see the entry in the LocalisedLabel Attributes Inspector to set the value.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*i-f2_qUYviK9NvU-0hsB7A.png" /><figcaption>Localisation Id in Attributes Inspector</figcaption></figure><ul><li>To get the text to render dynamically in XCode layoutSubviews is needed. The syncWithIB function reads the string from the main bundle’s Localizable.strings file and sets the UILabel text.</li></ul><p>My Localizable.strings looks like this:</p><pre>&quot;Test_Localisation&quot; = &quot;This is from Localizable.strings&quot;;</pre><p>Putting it all together we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*8SJZWxVckVQuz2WQ1n0Ybw.jpeg" /></figure><p>As you can see with the screenshot above the text is set to Label but the text rendered is This is from Localisable.strings which is now coming directly from the Localizable.strings of the main bundle.</p><h3>UIButton</h3><p>For another example, let’s try UIButton next.</p><p>Buttons have different text for different control states, capturing all of these in a new LocalisedButton.swift type:</p><pre>import Foundation<br>import UIKit</pre><pre><a href="http://twitter.com/IBDesignable">@IBDesignable</a><br>class LocalisedButton : UIButton {<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var NormalText : String = &quot;&quot;<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var HighlightText : String = &quot;&quot;<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var DisabledText : String = &quot;&quot;<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var SelectedText : String = &quot;&quot;<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var FocusedText : String = &quot;&quot;<br> <br>    override func layoutSubviews() {<br>        super.layoutSubviews();<br>        syncWithIB()<br>    }<br>    <br>    func syncWithIB() {<br>        <br>        guard let localisedBundle = LanguageSelectorView.getBundle(object: self) else {<br>            return<br>        }<br>        if !self.NormalText.isEmpty {<br>            let ret = localisedBundle.localizedString(forKey: self.NormalText, value: &quot;&quot;, table: nil);<br>            setTitle(ret, for: .normal)<br>        }<br>        <br>        if !self.HighlightText.isEmpty {<br>            let ret = localisedBundle.localizedString(forKey: self.HighlightText, value: &quot;&quot;, table: nil);<br>            setTitle(ret, for: .highlighted)<br>        }<br>        if !self.DisabledText.isEmpty {<br>            let ret = localisedBundle.localizedString(forKey: self.DisabledText, value: &quot;&quot;, table: nil);<br>            setTitle(ret, for: .disabled)<br>        }<br>       <br>        if !self.SelectedText.isEmpty {<br>            let ret = localisedBundle.localizedString(forKey: self.SelectedText, value: &quot;&quot;, table: nil);<br>            setTitle(ret, for: .selected)<br>        }<br>        <br>        if !self.FocusedText.isEmpty {<br>            let ret = localisedBundle.localizedString(forKey: self.FocusedText, value: &quot;&quot;, table: nil);<br>            if #available(iOS 9.0, *) {<br>                setTitle(ret, for: .focused)<br>            }<br>        }<br>    }<br>}</pre><p>This takes the same concept and just adds more types of text, for Normal, Selected, Highlighted, Disabled and Focused. You may have spotted the <em>LanguageSelectorView.getBundle</em> new bit of code, more on this later.</p><p>Adding a few more strings to Localizable.strings :</p><pre>&quot;Test_Button_Normal&quot; = &quot;Normal&quot;;</pre><pre>&quot;Test_Button_Selected&quot; = &quot;Selected&quot;;</pre><pre>&quot;Test_Button_Highlighted&quot; = &quot;Highlighted&quot;;</pre><pre>&quot;Test_Button_Disabled&quot; = &quot;Disabled&quot;;</pre><p>As before we set the type to LocalisedButton and set the string keys via the Attribute Inspector. In the image below I’ve added 3 LocalisedButtons which have different states set via IB. Again you can see the Title text is set to Button but Selected is what is displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CN7nRsF1K9vJIDp7ZO1T3A.png" /></figure><p>It is pretty trivial to extend this to more types UITextView, UIBarButton item etc.</p><blockquote>Occasionally Interface Builder doesn’t update your content. If this happens go to File-&gt;Close “Main.storyboard” and re-open it. This forces a reload of the storyboard and rectifies cached content</blockquote><p>This approach works pretty well, however we want to go further.</p><h3><strong>Viewing Different Languages</strong></h3><p>It’s quite useful to be able to check different languages in our UI. Interface Builder doesn’t <em>appear</em> to allow you to change languages in IB preview, I’ve seen various mentions of a way of doing this but cannot find it in my version of Xcode (10.1). <em>If you can do this then please let me know!</em></p><p>To change languages we could potentially add a new property to each new type we’ve created that contains the language we want to view. However language is really a global setting. We want a static setting that affects all views.</p><p>Below is a <em>bit</em> of a hack but I think it’s acceptable for what it gives you.</p><p>To do this I created a simple LanguageSelectorView.swift UIView class that has a static ForceLanguage property:</p><pre>import Foundation<br>import UIKit</pre><pre><a href="http://twitter.com/IBDesignable">@IBDesignable</a><br>class LanguageSelectorView: UIView {<br>    <br>    static var ForcedLanguage: String = &quot;en&quot;<br>    <a href="http://twitter.com/IBInspectable">@IBInspectable</a> public var Language : String = LanguageSelectorView.ForcedLanguage {<br>        didSet {<br>            LanguageSelectorView.ForcedLanguage = self.Language<br>        }<br>    }<br>    <br>    static func getBundle(object: AnyObject) -&gt; Bundle? {<br>        let path = Bundle(for: type(of: object)).path(forResource: LanguageSelectorView.ForcedLanguage, ofType: &quot;lproj&quot;)<br>        guard let bundlePath = path else {<br>            NSLog(&quot;Unable to find bundle for language: %@&quot;, LanguageSelectorView.ForcedLanguage)<br>            return nil<br>        }<br>        let bundle = Bundle.init(path: bundlePath)<br>        guard let localisedBundle = bundle else {<br>            NSLog(&quot;Missing bundle at path: %@&quot;, bundlePath)<br>            return nil<br>        }<br>        return localisedBundle<br>    }<br>}</pre><p>Language is a string property that appears in the Attributes Inspector in XCode. When set it sets the global ForcedLanguage property. A string here is not an ideal choice. Unfortunately Xcode has limited support for types via IBInspectable. Arrays aren’t supported which would be perfect here, we could display all languages configured in the Apple. Instead we use the 2 letter language code that’s associated with lproj files.</p><p>Next, add a UIView to your view hierarchy that is hidden (you can make it 1x1 or off-screen if you don’t want it to appear at all) and set it’s Custom Class to LanguageSelectorView.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ga-hXt3X0fhi0NgNEztT1w.png" /></figure><p>In the image above you can see that en is set as the value, which is the default value.</p><p>In our custom types we can now use the LanguageSelectorView static function to get the localised Bundle for our languages.</p><pre>guard let localisedBundle = LanguageSelectorView.getBundle(object: self) else {<br>            return<br>        }</pre><p>Now we add another language to the project. You can do this by going into the Project-&gt;Info view and hitting ‘+’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*HrhuyGPurCs01sfKJyAlMQ.png" /></figure><p>To the French Localizable.strings we add:</p><pre>&quot;Test_Button_Normal&quot; = &quot;Normal_FR&quot;;</pre><pre>&quot;Test_Button_Selected&quot; = &quot;Selected_FR&quot;;</pre><pre>&quot;Test_Button_Highlighted&quot; = &quot;Highlighted_FR&quot;;</pre><pre>&quot;Test_Button_Disabled&quot; = &quot;Disabled_FR&quot;;</pre><p>Now let’s try it out. Select the Language Selector View in Interface Builder and type in fr instead of en .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*j6Uq8qFT0G2UgPU7zF3z1A.gif" /></figure><p>You can see that invalid languages e.g. gf revert back to the default text set via Interface Builder.</p><p><strong>References</strong></p><ol><li><a href="https://medium.com/@mario.negro.martin/easy-xib-and-storyboard-localization-b2794c69c9db">https://medium.com/@mario.negro.martin/easy-xib-and-storyboard-localization-b2794c69c9db</a></li><li><a href="https://ayeohyes.wordpress.com/2015/07/24/localizing-storyboards-and-xibs/">https://ayeohyes.wordpress.com/2015/07/24/localizing-storyboards-and-xibs/</a></li><li><a href="http://gtlcodes.blogspot.com/2016/03/using-ibdesignable-ibinspectable.html">http://gtlcodes.blogspot.com/2016/03/using-ibdesignable-ibinspectable.html</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98003b630587" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Property Price Register — A Rant]]></title>
            <link>https://parrotbait.medium.com/the-property-price-register-a-rant-f55ca421e798?source=rss-71eb7815bacc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f55ca421e798</guid>
            <category><![CDATA[ppr]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[ireland]]></category>
            <category><![CDATA[property-prices]]></category>
            <dc:creator><![CDATA[Eddie Long]]></dc:creator>
            <pubDate>Mon, 10 Dec 2018 14:07:10 GMT</pubDate>
            <atom:updated>2021-09-23T08:45:29.866Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Property Price Register — A Rant</h3><p>Recently I was buying a house in Cork. I wanted to see prices of specific houses and for the area I was buying in. I had heard about the property price register so decided to check it out. The <a href="https://www.propertypriceregister.ie/website/npsra/pprweb.nsf/page/ppr-home-en">Property Price Register website</a> seemed odd, quite difficult to filter and find properties.</p><p>Anyway I found what I needed from it at the time and eventually bought a property. A couple of months down the line I decided to go and search for my own house on it to see if the price was there. I entered the address but couldn’t find it. Turns out it was entered with an address I would not have expected, Browningstown instead of Ballinlough.</p><p>I decided to go and make a better experience myself since the site left a lot to be desired. They have various disclaimers about the register:</p><pre>is not intended as a &quot;Property Price Index&quot;<br>...<br>The Authority acknowledges that there may be errors in the data in the Register<br>...<br>If the data filed contained typographical errors then those errors will appear on the Register.</pre><pre>Where errors are reported to the Authority they will be brought to the attention of the Revenue Commissioners.<br>...</pre><p>Anecdotally, I know many many people use it as a price index as there is no other resource available. People are making the biggest purchase of their life and are basing decisions partly on this data…I thought to myself, how bad could it be? Well, buckle up…</p><h3>The data</h3><p>The first step I made was to request API access. For those of you who aren’t developers, this is a way of publicly accessing data in a documented and structured fashion. Alas there is currently no API access. I was directed to the site to manually download a CSV file. Fine, I can work with that. Opening the file I noticed that there are ~300k entries, starting from 2010 up to November 2018. Not too bad.</p><p>Looking at the columns you can see the kind of information it contains:</p><pre>Date of Sale (dd/mm/yyyy)<br>Address<br>Postal Code<br>County<br>Price (�)<br>Not Full Market Price<br>VAT Exclusive<br>Description of Property<br>Property Size Description</pre><p>There is a common phrase used in computer science/data processing:</p><p><em>bad data is worse than no data</em></p><p>Inspecting the data I realised how apt the phrase was. It seems that the data has all been entered manually by many different people and zero standards have been imposed. I have been trying to parse this data so I can place properties on a map and then start to come up with a useful website on the back of it. It fails to parse logically in all sorts of hilarious and unexpected ways.</p><p>Below are some of the more interesting findings:</p><ul><li><strong>Terrible Formatting</strong>. Addresses have no standard format. Whoever enters the data is free to do whatever they want. Some entries are capitalised, some aren’t. The example below shows in a single day there were multiple ways of entering in apartments and listing numbers of houses. This is a very very small sample of bad data.</li></ul><pre>&quot;21/01/2010&quot;,&quot;Apartment 72 Royal Canal Court, Royal Canal Way, Ashtown&quot;</pre><pre>&quot;21/01/2010&quot;,&quot;Apt 29 Waltrim Grove, Killarney Road, Bray&quot;</pre><pre>&quot;21/01/2010&quot;,&quot;Apt. 49 Hunters Walk, Hunterswood, Ballycullen Road&quot;</pre><pre>&quot;21/01/2010&quot;,&quot;No 42 Royal Canal Court, Ashtown, Dublin 15&quot;</pre><pre>&quot;21/01/2010&quot;,&quot;No. 11 St Jude&#39;s Terrace, St. Patrick&#39;s Road&quot;</pre><pre>&quot;22/01/2010&quot;,&quot;1 Barnwell Way, Barnwell  Hansfield, Dublin 15&quot;</pre><ul><li><strong>General Area Addresses. </strong>Related to the point above but there are often entries where the address is just the name of an area. There isn’t any house name so plotting on a map means you would see a bunch of sales right in the centre of an area. There are a LOT of these types of addresses. <br>Taking one example:</li></ul><pre>&quot;25/01/2010&quot;,&quot;Poulroe, Tubber&quot;,&quot;&quot;,&quot;Clare&quot;</pre><p>This area is seemingly in the middle of the countryside without a house in sight. <a href="https://goo.gl/kQ3S6j">https://goo.gl/kQ3S6j</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZBIALRab3JK32F6Vvg3cBA.png" /><figcaption>Poulroe, Tubber</figcaption></figure><ul><li><strong>Duplicate data.</strong> For many properties there are multiple entries in the PPR in or around the same day. I found one property, and there could certainly be more, where someone entered in the price incorrectly and instead of correcting it, it was just entered in again with the correct price:</li></ul><pre>&quot;16/08/2010&quot;,&quot;39 Ellensborough Drive, Kiltipper, Tallaght&quot;,&quot;&quot;,&quot;Dublin&quot;,&quot;�2,610,000.00&quot;<br>&quot;16/08/2010&quot;,&quot;39 Ellensborough Drive, Kiltipper, Tallaght&quot;,&quot;&quot;,&quot;Dublin&quot;,&quot;�261,000.00&quot;</pre><p>Another fun one: a property in Dublin went up by €42,391,002 in the space of 7 months, that’s a hell of a renovation!</p><pre>&quot;14/12/2017&quot;,&quot;UNIT NO 121 FIFTH FLOOR, NORTHBANK, CASTLEFORBES ROAD&quot;,&quot;Dublin 1&quot;,&quot;Dublin&quot;,&quot;�215,311.00&quot;<br>&quot;27/07/2018&quot;,&quot;UNIT NO 121 FIFTH FLOOR, NORTHBANK, CASTLEFORBES ROAD&quot;,&quot;&quot;,&quot;Dublin&quot;,&quot;�42,606,313.37&quot;</pre><ul><li><strong>Lack of useful information.</strong> The property price register is unfit for purpose not just for the data it includes but also the data is does not. Property size is not adequately measured, some properties may include a little blurb ‘<em>greater than or equal to 38 sq metres and less than 125 sq metres’ </em>which is super vague and doesn’t really give an accurate indication of the size of the property. Other information that could be recorded: type of house (semi-d, detached, cottage, bungalow), number of bedrooms, house size (sq metres). Of course some of this info will go out of date with extensions and building works but it is certainly better than the current situation.</li><li><strong>Residential &amp; commercial</strong>. In the PPR there is a mix of commercial and residential listings in the CSV distributed. There is a rough distinction between the two, commercial properties are listed as having a property description of <em>(more on these funny looking question marks in diamonds later)</em><br><strong><em>Teach/�ras�n C�naithe Ath�imhe</em></strong><em><br></em>whereas residential properties are: <br><strong><em>Second-Hand Dwelling house /Apartment </em></strong>or<strong><em> New Dwelling house /Apartment. </em></strong><em><br></em>There really should be a better separation between the different types of property, or at least a nicer way to filter than to search for this obscure piece of text. The property price register site itself seems to have done this filtering.</li><li><strong>Errors in the data</strong>. The data contains so many errors. Addresses are incorrect, formatting is a mess, prices entered are incorrect and there are spelling mistakes. Some addresses include the county in the address field, some don’t. A fun example which should Model Farm Road in Cork:</li></ul><pre>the greenway, mofel farm road</pre><p>The PPR says that errors can be reported to be fixed. It would take months to trawl through the data to correct all the errors. Besides, new errors would come in daily while previous entries are fixed. It’s a futile battle, it should be <em>impossible</em> to enter an invalid address. They should remove the possibility of human error.</p><ul><li><strong>Multiple apartment &amp; property sales</strong>. The disclaimer on the PPR site does indicate that there are potential sales with multiple sites or properties on it and indeed there are. There are often scenarios where a developer may buy several properties for a single sum and so they cannot be split effectively. However I think these should be categorised differently, perhaps as commercial sales until they are again released back into the market.</li><li><strong>Missing Eircodes. </strong>It is completely baffling that a government organisation does not use their own Eircode system. It would have fixed so many of the data entry issues as it would matter less what was entered if the Eircode is there. It further shows what a shambles Eircode is when not adopted by the government itself.</li><li><strong>Inconsistent use of Irish. </strong>It seems that there are a few gaelgoirs that have been adding into the PPR (see below, also extra points for inconsistent address entry). Several properties are entered entirely in Irish for areas that are not predominantly Irish speaking (e.g. Dromcondra). Of course there is nothing wrong with Irish being used, it is an official language in Ireland after all. But you cannot mix it in with English. The data should be separated out into Irish and English entries. The mixture makes searching for addresses difficult, how does someone know whether they should search in Irish? It just makes the whole data set more of a mess.</li></ul><pre>26 CEIDE BHREANAINN, AN CHULOG, BAILE �THA CLIATH 5<br>87 B�thar an Bhreatnaigh, Droim Conrach, B.�.C 3</pre><ul><li><strong>Special characters. </strong>Browsing the register you quickly see an abundance of funny looking <em>�</em> characters. In software development this character is synonymous with an unknown character. What this means is that the original data most probably does have the correct character, but when it was exported it got lost. Presumably they are exporting to ASCII instead of a UTF8 format. The repercussions for this issue are pretty wide-reaching however. All addresses with fadas are littered with these little diamonds and a reader needs to use their knowledge of the Irish language to try and fill in the gaps. Think of places and properties with mór, dún, bóthar, bán, slí, páirc in their address, these will be riddled with little diamonds. Some of these can be rectified and guessed, others cannot be unless you google the name or have local knowledge of the area. It’s not always possible to use geocoding (the process of asking google maps if it knows the address) to get you out of jail here.</li><li><strong>CSV format.</strong> CSV is an inappropriate format to distribute the PPR, since there are commas in some of the fields. It is also going to become slow and unwieldy as years progress and number of entries grows, it already struggles to open on my moderately spec’d machine.</li><li><strong>Apartments over restaurants.</strong> This is my favourite but also a really odd one. There seems to be a penchant for entering sales for apartments over restaurants by not referring to the address at all but using a colloquial phase (over restaurant) address. See examples below:</li></ul><pre>APT. OVER GIOVANNI’S TAKEAWAY, MAIN STREET, GALWAY<br>APARTMENT OVER RESTAURANT, BRIDGE STREET, CARRICK-ON-SHANNON<br>APT 1 OVERHEAD MAMMA MIA RESTAURANT, MAIN STREET, MAYNOOTH<br>APARTMENT OVER RESTAURENT, O’GROWNEY STREET, ATHBOY<br>APT. OVER CHINESE RESTAURANT, MAIN STREET, WHITEGATE<br>APT OVER CLAYMORE RESTAURANT, NORTHGATE STREET, ATHENRY<br>FLAT 1 OVER GOLDEN SEA RESTAURANT, THOMAS ST, CASTLEBAR<br>OVERHEAD APARTMENT, THE CHINESE RESTAURANT, PARNELL STREET MOUNTMELLICK<br>APT OVER LANG’S RESTAURANT, GRANGE, SLIGO</pre><p>A postman would find these addresses because of the local knowledge but good luck to a computer trying to figure it out.</p><h3>What next for the PPR?</h3><p>A number of enterprising folk have spent time trying to clean and map the data with varying degrees of success. The mapping is typically out of date because it needs to be manually done, again showing how poor the data is.</p><p><a href="https://www.shanelynn.ie/the-irish-property-price-register-geocoded-to-small-areas/">https://www.shanelynn.ie/the-irish-property-price-register-geocoded-to-small-areas/</a></p><ul><li><a href="https://conoroneill.net/2012/09/30/quick-n-dirty-visualisation-of-2010-property-price-register-data-into-interactive-map/">Visualisation of Irish Property Price Register Data using Interactive Map from Google Fusion Tables · Cross Dominant</a></li><li><a href="http://karlmonaghan.com/property/">Yet Another Searchable Property Price Register</a></li></ul><p>The question really should be — why do people have to go to this effort????</p><p>The PPR is not a ‘price index’. Thats fine but in that case we have to ask <strong><em>why isn’t there one for Ireland?</em></strong> It is ridiculous that it doesn’t exist. I would love to build one but it is useless unless the government add to this database — it cannot be done by a third party.</p><p>It is time for the government to clean up this mess and come up with a proper<strong> Property Price Index </strong>system. My suggestions would be:</p><ul><li>Clean up the current data. It can serve as a starting point for a new system. It’ll be far from perfect but this can be a known limitation going forward.</li><li>Have a public API so developers can integrate it easily.</li><li>Make it impossible to enter in data in an unstructured fashion.</li><li>Human review of new entries to ensure that data quality is maintained.</li><li>Evaluate what extra data is required to make this system fit for purpose.</li><li>Make Eircodes and latitude and longitude coordinates mandatory.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f55ca421e798" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross Platform Development at Blippar with C++]]></title>
            <link>https://parrotbait.medium.com/cross-platform-development-at-blippar-with-c-ed4a785c53d2?source=rss-71eb7815bacc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed4a785c53d2</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[cplusplus]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Eddie Long]]></dc:creator>
            <pubDate>Mon, 25 Jun 2018 18:22:00 GMT</pubDate>
            <atom:updated>2019-01-09T10:58:58.790Z</atom:updated>
            <content:encoded><![CDATA[<p>This week there has been quite a lot of interest in the <a href="https://medium.com/airbnb-engineering/react-native-at-airbnb-f95aa460be1c">AirBnb Medium article where they describe their use of and decision to drop React Native</a>.</p><p>The article raised a lot of interesting points, several of which overlap with our experience at Blippar in using C++ for cross platform development. Seems as good a time as any to write an article outlining our own experience, for good and bad.</p><h3>Early Days and motivation</h3><p>Blippar is an augmented reality platform which is available on iOS, Android and previously Blackberry 10 &amp; Windows Phone initially and then as a universal Windows app. Blippar was initially only available as a mobile app, now it is also an SDK which can be integrated into another app. The goal of the platform is to provide a consistent experience for developers who make the AR experiences or <a href="https://developer.blippar.com/portal/ar-api/guides/blipp-structure/">blipps</a>. There is an ‘AR engine’ which is the brain of the operation coordinating computer vision, asset loading, execution and lifecycle of blipps.</p><p>In the early days the entire engine was written twice, once on iOS in Objective C and once on Android in Java. This was ok, for a time. There were significant logical differences and issues on each platform and was difficult work to keep the two in sync. Most new development happened on iOS (this continues today) and required careful synchronisation between the two teams to make sure things weren’t lost in translation. Even as a small team things were inevitably lost. We often ask candidates at interviews, how do you make sure the other platform is in sync with your platform, in terms of features, bugs etc.? The answers pretty much always are the same, we have a project/product manager, a JIRA board and just coordinate changes manually. This seems very curious, developers in general are thought to strive for <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t Repeat Yourself (DRY)</a> yet they seem to accept having this massive amount of duplicated code.</p><p>As the company grew there became demand for other platforms, Blackberry 10 (BB10) came first. Of course neither Objective C and Java works on BB10, it was time to change our architecture. Our only real cross platform option was to go to C++ otherwise we’d end up have everything written three times.</p><p>The conversion to C++ was a long process but not as bad as feared given Objective C’s grounding in C. Initially we only converted the main core of the code, there was still a great deal of platform specific duplication left unconverted, primarily due to time constraints. Some particularly challenging aspects of the conversion surrounded lifecycle of the different platforms. Android, iOS and Windows are all very different beasts, it took some time to resolve issues with threads, resources, rendering and more. For example, on iOS and Android these are posix based so it was possible to share thread implementations with pthreads. Windows however has different threading interfaces which did not operate in the same way as pthreads.</p><p>When Windows came along, significant effort went into bringing more and more of the core into shared C++ code, the cost of a feature having a lot of duplicated logic on each platform now became quite high.</p><h3>The Present</h3><p>Although BB10 and Windows have since been dropped as platforms at Blippar, C++ lives on 7 years later. The majority of the app and SDK code is now in C++ and most new features are either written in C++ or interact heavily with it. We still strive to keep as thin a platform-specific layer where it is reasonable to do so. UI is not a good fit for cross platform, and did not even try to model screens or layout in C++. Along the way we’ve learnt a lot, both good and bad, about choosing this route.</p><h4>The Good</h4><ul><li><strong>Cross platform </strong>C++ is truly cross platform, it allowed us to quickly move to new platforms such as Windows. That’s such a huge thing for a startup that is looking to hit the maximum reach as possible, maybe less so now given mobile platforms are fairly settled. However if HoloLens or Magic Leap became a requirement in future we can get onto that platform without requiring an entire re-write of the code.</li><li><strong>Features come ‘for free’ </strong>It’s a really great feeling when someone spends a long time implementing a feature in C++ and it can come to another platform with minimal changes required. Depending on the feature it can even come entirely for free, simply with a git update.</li><li><strong>New C++ standards </strong>Recent changes to the C++ language standards in C++11 and C++14 have improved the quality of the codebase. New features are coming in, albeit slowly, such as threading, locking, smart pointers which means we can use pure C++ without relying on custom platform implementations of these features. C++ has come a long way from C99 <a href="#1bd3">¹</a></li><li><strong>Performance </strong>The performance of C++ is unparalleled. For our app and SDK we have to do a lot of work with images for computer vision, these algorithms must be highly efficient. Implementing such algorithms in a language such as vanilla JS simply cannot be as fast as C++. If you add in vectorisation/SIMD instructions the speed benefits improve even further. The general speed of C++ for execution of ‘normal’ business logic we’ve found far superior to similar implementations in our codebase in Java.</li><li><strong>Productivity </strong>Our team is small, it has never been larger than 10 engineers and often far less than that. Yet we are able to maintain an app, SDK and continually add features at an impressive speed. C++ has facilitated this, albeit with some associated downsides illustrated below.</li></ul><h4>The Bad</h4><ul><li><strong>Atypical developer skills required </strong>Recruiting high quality developers with the desired experience has always been a challenge for us. Not only do we want a different set of skills for the mobile platform itself (AR is unlike most traditional apps), adding C++ into the equation reduces the pool of candidates even more. <br>Getting C++ developers who have traditional desktop experience without mobile isn’t so bad. <br>Getting mobile developers is also not difficult. <br>But getting devs with a reasonable level of both is really not easy. Over the years we’ve attempted to split the work into just C++ and native-only and have the devs overlay when needed. This works to an extent but there is often a communication and understanding gap between the two. A specialist C++ developer is often unable to work easily on Android especially without a mobile developer sitting next to them for prolonged periods of time. In reality, spending time finding a good developer who has both native and C++ being worth it in the long run. <br>We’ve found that a lot of mobile developers find C++ intimidating and view it as an arcane impossible-to-decipher language. <br>C++ is not a trendy language, Swift and Kotlin are the poster children for Android and iOS, so why on earth would a mobile developer want to learn a dying language like C++?</li><li><strong>C++ as a language </strong>There are no two ways around it. C++ is a complex language, and getting more and more complex. After being so long without change, C++11 brought in some huge modifications to the language. The complexity with these new features such as copy elision and r-values added to the confusion, you really need to know what you’re doing to remain efficient. There are so many ways to write code (and opinions on how to do it), it’s easy to shoot yourself in the foot if not reasonably experienced. If you’re a C++ developer at some point you’ll have seen some clever template metaprogramming code and been completely befuddled by it. C++ maintains backwards compatibility between versions, this is an immense amount of baggage going all the way back to ~1985 and earlier with C compatibility. Sometimes it feels like it would be such a cleaner place if we could have a clean ‘from-scratch’ version of the language.<br>The complexity of the language is really why there isn’t a big market for developers who are cross platform gurus, it is a full time job to stay on top of each in it’s own right. People choose to become an expert in something they see a future in, there’s a lot more work in pure native mobile than C++; the choice for most is easy.</li><li><strong>Lack of built in functionality </strong>Even with the recent C++ language improvements there are still some glaring omissions when compared with other languages/platforms. No networking, decent file system APIs, database support, image loading, antiquated include system, lack of standard decent dependency management tools are a few that come to mind. <br>Before C++11 there wasn’t even any standard locking/mutex and threading. We had to implement many of these using custom platform implementations, which while not especially tricky, required testing and introduced potential subtle platform differences. <br>In this respect C++ is still a quite young language, C++20 will bring in some of these which is nice to see. Of course, the omissions are somewhat understandable, if a feature goes into the language it needs to be implemented by compiler vendors, and that has massive implications for a whole variety of platforms not just Android and iOS. <a href="https://twitter.com/lefticus/status/1007587824743403520">C++ is in everything</a>, any change in C++ affects millions of applications.</li><li><strong>Maintenance overhead </strong>Outside of the C++ code itself there’s a great deal of maintenance that typical mobile engineers just don’t need to contend with. Makefiles, compiler settings, architecture differences and building third party libraries are amongst the headaches that having C++ brings. Android is a real pain, with hours lost hunting for makefiles online for some library, googling cryptic compiler template errors or trying to figure out obscure linker issues. As a language it’s generally a drag and not pleasant to maintain.</li><li><strong>Platform Differences </strong>There is still no silver bullet to have the exact same code running on all platforms. There are differences in compilers, performance, memory layout and app lifecycles. With C++ the situation is fairly good but there are still issues that arise with seemingly standard C++ code that has different behaviour on the platforms. Android requires more third party libraries to fill in some gaps where iOS has built in libraries, these cause differences in behaviour. <br>Furthermore, there are differences between what the platform itself provides to C++ developers. For example, iOS provides some nice high level APIs with CoreGraphics for decoding images. But Android and Windows do not (in C/C++), instead it required us to integrate of libjpeg-turbo and libpng along with several up/downscaling algorithms. The same code takes around a few lines of code on iOS. The Native Development Kit (NDK) on Android has much fewer C/C++ libraries than iOS, this is mostly due to the fact that Objective C is a superset of C.</li><li><strong>Compilation Times and debugging </strong>Compilation times in C++ can be very long, especially if the code is template-heavy. This can be a drag on productivity. Sometimes if changing a particular shared header file it may kick off a 5 minute build only for you to realise that you made a syntax error of some sort. <br>Debugging C++ is not trivial either. The C++ standard library is heavily used and very difficult to debug. Different platforms provide different debugging facilities, Android Studio still lags behind Xcode in how well it supports just simple C++ debugging with breakpoints etc. In release, the debugger cannot really be trusted at all so debugging sessions can boil down to print statements.</li><li><strong>Platform Integration </strong>Objective C++ is a dream for using with C++. You can mix and match Objective C with C++ and everything plays nicely, just rename a file from <em>.m</em> to <em>.mm</em> and away you go <a href="#cc26">²</a>. On Android however you have the <a href="https://en.wikipedia.org/wiki/Java_Native_Interface">Java Native Interface (JNI)</a> to communicate from Java to C++ or vice versa. It’s fairly horrible and very easy to get wrong, especially if you have a heavily multi-threaded app like Blippar. We adopted <a href="http://www.swig.org/">SWIG</a> to greatly reduce boilerplate JNI code but SWIG is complex in itself (could merit it’s own post). The journey to get to where we are was a long one with much StackOverflowing. Now though all code in Java is ‘pure’ Java because of SWIG, native functions are hidden away in the auto-generated wrapper code. Some devs see SWIG as some sort of voodoo or magic and are a bit intimidated by it. However like C++, the benefits of SWIG far outweigh the negatives for us.</li></ul><h3>The Future</h3><p>Although there is seemingly more negatives to positives above, the reality is that without using C++ Blippar would not have been able to scale and grow as it did. It allowed us to develop faster, have consistent performance and behaviour between platforms which has been critical to the success of the platform. <br>Back to React Native, C++ has a similar end-goal but requires significantly more investment both initially and on a continual basis. React Native wasn’t around when we started our journey, if it was would we have used it? Most likely not, it just doesn’t suit our needs as an AR company or provide the features we need.</p><p>It seems now more than ever iOS and Android are diverging from one another, being a cross platform provider is becoming more and more difficult. There isn’t any perfect cross platform solution right now. The best solution would be able to communicate directly with the native platform APIs, Xamarin comes closest to this in terms of completeness but it is still not working directly with the platform. There is no clear winner in terms of a language, JS seems to be winning the race at present but not because it is the ‘best’ but because it has the largest developer pool. Flutter is interesting but feel that emulating the native UI is never going to be right. DART is quite interesting as a language but also brings a learning curve that JS does not have, it is early days for that framework.</p><p>From Blippar’s point of view, there still isn’t really anything that can take C++’s place as a high performant cross platform language. There are a number of promising suitors, Rust in particular looks very interesting and will be keeping an eye on it.</p><p><strong>Footnotes</strong></p><ol><li>Depending on who you ask, they may deem that C++ has gone backwards in terms of complexity and with the new features. Game developers generally favour C with a very small subset of C++ features.</li><li>It’s not all rosy, mixing Objective C with C++ does cause some issues. For example, OCMock cannot do partial mocks of classes that have C++ objects in the interfaces. <br>Also any interface exposed to Swift cannot have any C++ exposed, it must be pure Objective C.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed4a785c53d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>