<?xml version="1.0" encoding="UTF-8"?> 
<rss version="2.0"
        xmlns:content="http://purl.org/rss/1.0/modules/content/"
        xmlns:wfw="http://wellformedweb.org/CommentAPI/"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:atom="http://www.w3.org/2005/Atom"
        xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
        xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
        >
<channel>
  <title>asgaard</title>
  <description></description>
  <link>https://blog.asgaard.co.uk/2016/10</link>
  <lastBuildDate>Tue, 12 May 26 17:26:00 +0000</lastBuildDate>
  <language>en</language>
  <count>4</count>
  <offset>0</offset>
      <item>
    <title>Enabling internet permissions in a Cordova/Ionic app</title>
    <link>https://blog.asgaard.co.uk/2016/10/30/enabling-internet-permissions-in-a-cordova-ionic-app</link>
    <pubDate>Sun, 30 Oct 16 20:34:42 +0000</pubDate>
    <guid>https://blog.asgaard.co.uk/2016/10/30/enabling-internet-permissions-in-a-cordova-ionic-app</guid>
    <description><![CDATA[
<p>
If you try running a Cordova/Ionic app with few plugins, you&#039;ll probably be very confused when you try to create an HTTP request. It&#039;ll work fine in the browser, but on a device it&#039;ll fail.
<p>
If you hook it up to the Chrome developer tools and inspect the webview, it&#039;ll show Status: (failed) and Type: Pending.
<p>
<img src='/assets/img/2016-10-30/cordova-failed-pending.png' class='width-100' alt=''/>
<p>
The answer to this is that you need to ask for access to network permissions.<div class='width-100 clear-fix'>
<p>
<img src='/assets/img/2016-10-30/Screenshot_20161030-122213.png' class='width-40 float-left' title='How your permissions might look' alt='How your permissions might look'/><img src='/assets/img/2016-10-30/Screenshot_20161030-122315.png' class='width-40 float-right' title='How your permissions should look' alt='How your permissions should look'/>
<p>
</div>
<p>
It seems like you should be able to define your app&#039;s permissions in the config.xml file, but this doesn&#039;t seem to be the case. However, plugins can declare permissions in their plugin.xml file.
<p>
So, I created a <a href='https://github.com/markwatkinson/cordova-plugin-internet-permissions'>plugin which does nothing else than defines a plugin.xml which asks for network permissions</a>.
<p>
To install it, use: 
<p>
<code>cordova plugin add https://github.com/markwatkinson/cordova-plugin-internet-permissions.git</code>
<p>
[...]]]></description>
    <content:encoded><![CDATA[
<p>
If you try running a Cordova/Ionic app with few plugins, you&#039;ll probably be very confused when you try to create an HTTP request. It&#039;ll work fine in the browser, but on a device it&#039;ll fail.
<p>
If you hook it up to the Chrome developer tools and inspect the webview, it&#039;ll show Status: (failed) and Type: Pending.
<p>
<img src='/assets/img/2016-10-30/cordova-failed-pending.png' class='width-100' alt=''/>
<p>
The answer to this is that you need to ask for access to network permissions.<div class='width-100 clear-fix'>
<p>
<img src='/assets/img/2016-10-30/Screenshot_20161030-122213.png' class='width-40 float-left' title='How your permissions might look' alt='How your permissions might look'/><img src='/assets/img/2016-10-30/Screenshot_20161030-122315.png' class='width-40 float-right' title='How your permissions should look' alt='How your permissions should look'/>
<p>
</div>
<p>
It seems like you should be able to define your app&#039;s permissions in the config.xml file, but this doesn&#039;t seem to be the case. However, plugins can declare permissions in their plugin.xml file.
<p>
So, I created a <a href='https://github.com/markwatkinson/cordova-plugin-internet-permissions'>plugin which does nothing else than defines a plugin.xml which asks for network permissions</a>.
<p>
To install it, use: 
<p>
<code>cordova plugin add https://github.com/markwatkinson/cordova-plugin-internet-permissions.git</code>
<p>
]]></content:encoded>
  </item>
      <item>
    <title>Dormancy experiments</title>
    <link>https://blog.asgaard.co.uk/2016/10/18/dormancy-experiments</link>
    <pubDate>Tue, 18 Oct 16 20:51:49 +0000</pubDate>
    <guid>https://blog.asgaard.co.uk/2016/10/18/dormancy-experiments</guid>
    <description><![CDATA[
<p>
Carnivorous plants: I&#039;m the proud owner of a set of carnivorous plants which need to be going dormant for winter quite soon.
<p>
Nothing I read online tells me what&#039;s really necessary to make a Venus Fly Trap or a Sarracenia go dormant over winter, so I am not really sure if keeping them in an unheated conservatory is OK. My main concern is the heat can build up very quickly when the sun comes out, but this will be a pretty rare occurrence over winter. 
<p>
So I&#039;m doing it the only way I can: I have a Venus Fly Trap and Sarracenia Purpurea inside, and one of each outside too. I&#039;m interested to see which set goes dormant first, how much if any growth they experience over the winter, and when they come out of dormancy.<div class='clear-fix'><div class='width-40 float-left'>
<p>
  <img src='/assets/img/2016-10-18/sarracenia-purpurea.jpg' class='width-100 float-left' title='Indoor Sarracenia' alt='Indoor Sarracenia'/>
<p>
  <img src='/assets/img/2016-10-18/venus-fly-trap.jpg' class='width-100 float-left' title='Indoor Venus Fly Trap. When I got this it had only a handful of small green traps; I&#039;m really pleased with how it&#039;s turned out' alt='Indoor Venus Fly Trap. When I got this it had only a handful of small green traps; I&#039;m really pleased with how it&#039;s turned out'/>
<p>
</div><div class='width-50 float-left'>
<p>
  <img src='/assets/img/2016-10-18/outdoor-sarracenia-venus-fly-trap.jpg' class='width-100' title='Outdoor Sarracenia and Venus Fly Trap. The VTF looked a lot healthier a few months ago, I think it&#039;s pleading for dormancy.' alt='Outdoor Sarracenia and Venus Fly Trap. The VTF looked a lot healthier a few months ago, I think it&#039;s pleading for dormancy.'/>
<p>
</div></div>
<p>
I&#039;ve had the outdoor Venus Fly Trap for a few years now. It went dormant on my windowsill two years ago, but last year it did not, so I really want to make sure it does this year. I think it&#039;s ready for it - it&#039;s nowhere near as impressive as it was[...]]]></description>
    <content:encoded><![CDATA[
<p>
Carnivorous plants: I&#039;m the proud owner of a set of carnivorous plants which need to be going dormant for winter quite soon.
<p>
Nothing I read online tells me what&#039;s really necessary to make a Venus Fly Trap or a Sarracenia go dormant over winter, so I am not really sure if keeping them in an unheated conservatory is OK. My main concern is the heat can build up very quickly when the sun comes out, but this will be a pretty rare occurrence over winter. 
<p>
So I&#039;m doing it the only way I can: I have a Venus Fly Trap and Sarracenia Purpurea inside, and one of each outside too. I&#039;m interested to see which set goes dormant first, how much if any growth they experience over the winter, and when they come out of dormancy.<div class='clear-fix'><div class='width-40 float-left'>
<p>
  <img src='/assets/img/2016-10-18/sarracenia-purpurea.jpg' class='width-100 float-left' title='Indoor Sarracenia' alt='Indoor Sarracenia'/>
<p>
  <img src='/assets/img/2016-10-18/venus-fly-trap.jpg' class='width-100 float-left' title='Indoor Venus Fly Trap. When I got this it had only a handful of small green traps; I&#039;m really pleased with how it&#039;s turned out' alt='Indoor Venus Fly Trap. When I got this it had only a handful of small green traps; I&#039;m really pleased with how it&#039;s turned out'/>
<p>
</div><div class='width-50 float-left'>
<p>
  <img src='/assets/img/2016-10-18/outdoor-sarracenia-venus-fly-trap.jpg' class='width-100' title='Outdoor Sarracenia and Venus Fly Trap. The VTF looked a lot healthier a few months ago, I think it&#039;s pleading for dormancy.' alt='Outdoor Sarracenia and Venus Fly Trap. The VTF looked a lot healthier a few months ago, I think it&#039;s pleading for dormancy.'/>
<p>
</div></div>
<p>
I&#039;ve had the outdoor Venus Fly Trap for a few years now. It went dormant on my windowsill two years ago, but last year it did not, so I really want to make sure it does this year. I think it&#039;s ready for it - it&#039;s nowhere near as impressive as it was a month or two ago; it has much fewer traps and the ones it&#039;s growing now are very small.<table class='width-100' style=''>
 <colgroup>
    <col style='width: 100px'></col>
    <col style='text-align: center;'></col>
    <col style='text-align: center;'></col>
    <col style='text-align:left; width: 50%;'></col>
  </colgroup><thead><tr><th style='text-align:center;'>Date</th><th style='text-align:center;'>Avg outdoor min temperature (°C)</th><th style='text-align:center;'>Avg outdoor max temperature (°C)</th><th style='text-align:center;'>Observation</th></tr></thead><tbody><tr><td>2016-10-16</td><td style='text-align: center;'>&mdash;</td><td style='text-align: center;'>&mdash;</td><td>Plants put out</td></tr><tr><td>2016-10-23</td><td style='text-align: center;'>7</td><td style='text-align: center;'>14</td><td>Indoor VFT has caught a spider. Otherwise, not much.</td></tr><tr><td>2016-10-30</td><td style='text-align: center;'>9</td><td style='text-align: center;'>14</td><td>New growth on all plants has definitely slowed and traps seem to be dying at a faster rate than before. The indoor sarracenia (which has a huge number of pitchers) has 3-4 that are definitely dying. The outdoor one looks unchanged.</td></tr><tr><td>2016-11-06</td><td style='text-align: center;'>3</td><td style='text-align: center;'>10</td><td>The weather has suddenly become a lot colder, which prompted me to insulate the outdoor plants&#039; pots, but, apart from that, little obvious change.</td></tr><tr><td>2016-11-13</td><td style='text-align: center;'>3</td><td style='text-align: center;'>9</td><td>I&#039;m pretty sure that any new growth on the VFTs has stopped</td></tr><tr><td>2016-11-20</td><td style='text-align: center;'>5</td><td style='text-align: center;'>10</td><td>No obvious change.</td></tr></tbody></table>
<p>
I won&#039;t update this anymore, as I&#039;m confident both sets of plants are dormant, and they went dormant around the same time. The conservatory was consistently a few degrees warmer than the outdoor temperature, with occasional (short lived) peaks up to 40°C, which didn&#039;t seem to affect anything.]]></content:encoded>
  </item>
      <item>
    <title>Your APK&#039;s version code needs to be higher than 100008.</title>
    <link>https://blog.asgaard.co.uk/2016/10/15/your-apk-s-version-code-needs-to-be-higher-than-100008</link>
    <pubDate>Sat, 15 Oct 16 18:59:40 +0000</pubDate>
    <guid>https://blog.asgaard.co.uk/2016/10/15/your-apk-s-version-code-needs-to-be-higher-than-100008</guid>
    <description><![CDATA[
<p>
When trying to upload my <a href='//solvercs.asgaard.co.uk'>Android app Crossword Solver CS</a> to the Play store, I have been encountering the error:
<p>
<pre>Your APK's version code needs to be higher than 100008.</pre>
<p>
The app is an Ionic/Cordova app and Cordova handles creating that version code.
<p>
The 8 on the end makes little sense because the version I had there already was v1.0.0. I checked through git and my config.xml always had the version as v1.0.0.
<p>
<a href='https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#setting-the-version-code'>Cordova claims</a> that the version code will be generated automatically from the string and will be equal to: versionCode = MAJOR * 10000 + MINOR * 100 + PATCH.
<p>
For some reason it has followed this formula, then concatenated an &#039;8&#039; on the end making the end result an order of magnitude too big.
<p>
As far as I can tell this has come about because I used a Linux VM to generate the initial release and a different machine to generate the update. The latter has a newer version of Ionic/Cordova, which presumably does not have the &#039;8&#039; bug.
<p>
How do you fix this? Well, you need to bump up one o[...]]]></description>
    <content:encoded><![CDATA[
<p>
When trying to upload my <a href='//solvercs.asgaard.co.uk'>Android app Crossword Solver CS</a> to the Play store, I have been encountering the error:
<p>
<pre>Your APK's version code needs to be higher than 100008.</pre>
<p>
The app is an Ionic/Cordova app and Cordova handles creating that version code.
<p>
The 8 on the end makes little sense because the version I had there already was v1.0.0. I checked through git and my config.xml always had the version as v1.0.0.
<p>
<a href='https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#setting-the-version-code'>Cordova claims</a> that the version code will be generated automatically from the string and will be equal to: versionCode = MAJOR * 10000 + MINOR * 100 + PATCH.
<p>
For some reason it has followed this formula, then concatenated an &#039;8&#039; on the end making the end result an order of magnitude too big.
<p>
As far as I can tell this has come about because I used a Linux VM to generate the initial release and a different machine to generate the update. The latter has a newer version of Ionic/Cordova, which presumably does not have the &#039;8&#039; bug.
<p>
How do you fix this? Well, you need to bump up one of the components to multiply your end result by 10 and offset it by 8.
<p>
So I have gone from v1.0.0 to v10.0.9, which seems a bit ridiculous.]]></content:encoded>
  </item>
      <item>
    <title>Wasteland 2 Director&#039;s Cut review</title>
    <link>https://blog.asgaard.co.uk/2016/10/08/wasteland-2-directors-cut-review</link>
    <pubDate>Sat, 08 Oct 16 16:00:58 +0000</pubDate>
    <guid>https://blog.asgaard.co.uk/2016/10/08/wasteland-2-directors-cut-review</guid>
    <description><![CDATA[
<p>
I started playing Wasteland 2 last year and got about half way through the story when they announced the Director&#039;s Cut edition, at which point I lost some free time and decided to leave it until the DC was out and stable. So here we are.
<p>
<img src='/assets/img/2016-10-08/wasteland-2-rangers.jpg' class='border width-100' title='' alt=''/>
<p>
Wasteland 2 is a modern incarnation of the classic RPG formula. There&#039;s a lot of text, a lot of detail and it can be pretty heavy going. It can also be rewarding and the details ooze personality. This might make you think &quot;Fallout&quot;, and, obviously it&#039;s a similar sort of setting, but Wasteland&#039;s world is a bit more superficially grounded by virtue of not having the 1950s wackiness strewn around. The overarching story itself is, in RPG tradition, largely uninteresting and lacking any sense of urgency, but there&#039;s plenty of settlements in the wastes full of people and plots to keep you interested, and despite Wasteland&#039;s outwardly serious demeanour, some of them are completely off the wall.
<p>
<img src='/assets/img/2016-10-08/wasteland-2-world-map.jpg' class='border width-45 float-right' title='Wasteland 2 starts off in Arizona but you move on to California half way through' alt='Wasteland 2 starts off in Arizona but you move on to California half way through'/>
<p>
<img src='/assets/img/2016-10-08/wasteland-2-combat-energy-weapons.jpg' class='border width-45 float-right clear-right' title='Energy weapons are most effective against heavily armoured foes and robots' alt='Energy weapons are most effective against heavily armoured foes and robots'/>
<p>
The player takes control of a military[...]]]></description>
    <content:encoded><![CDATA[
<p>
I started playing Wasteland 2 last year and got about half way through the story when they announced the Director&#039;s Cut edition, at which point I lost some free time and decided to leave it until the DC was out and stable. So here we are.
<p>
<img src='/assets/img/2016-10-08/wasteland-2-rangers.jpg' class='border width-100' title='' alt=''/>
<p>
Wasteland 2 is a modern incarnation of the classic RPG formula. There&#039;s a lot of text, a lot of detail and it can be pretty heavy going. It can also be rewarding and the details ooze personality. This might make you think &quot;Fallout&quot;, and, obviously it&#039;s a similar sort of setting, but Wasteland&#039;s world is a bit more superficially grounded by virtue of not having the 1950s wackiness strewn around. The overarching story itself is, in RPG tradition, largely uninteresting and lacking any sense of urgency, but there&#039;s plenty of settlements in the wastes full of people and plots to keep you interested, and despite Wasteland&#039;s outwardly serious demeanour, some of them are completely off the wall.
<p>
<img src='/assets/img/2016-10-08/wasteland-2-world-map.jpg' class='border width-45 float-right' title='Wasteland 2 starts off in Arizona but you move on to California half way through' alt='Wasteland 2 starts off in Arizona but you move on to California half way through'/>
<p>
<img src='/assets/img/2016-10-08/wasteland-2-combat-energy-weapons.jpg' class='border width-45 float-right clear-right' title='Energy weapons are most effective against heavily armoured foes and robots' alt='Energy weapons are most effective against heavily armoured foes and robots'/>
<p>
The player takes control of a military-ish squad (of the Desert Rangers) and has full control over them, rather than playing as a lone warrior who picks up independently minded NPCs who run in front of your crosshairs at integral times. This is possibly a barrier to getting interested in the game early on, as although you can have up to three NPCs in your party who will add their own comments occasionally, the four core members of the squad you start off with are entirely player made (or chosen from a preset) and don&#039;t have any dialog or interactions associated with them. Ok, never mind, it picks up soon.
<p>
Character creation and progression follows a familiar format consisting of attributes, skill points and perks. The skills system generally works very well by being thoughtfully coupled with the gameplay. There are often more ways to solve a problem than simply shooting everyone causing it. Sometimes you don&#039;t have the skills or foresight you need to resolve a situation to your satisfaction, but the game handles the branching well. If you end up with a sub-optimal outcome, and you will occasionally because your actions do not always have predictable outcomes, then that&#039;s just life - maybe you&#039;ll do better next play through. The game really demands a second play through just to see the alternative possibilities. The breadth of this hits you very early on: the first decision you make is to respond to one of two distress calls. Each represents a large chunk of content and gives access to a different NPC companion, but you can&#039;t do both. 
<p>
The only obvious criticism of the skills system is that they are a bit diluted by there being too many of them. For example there are essentially four different door opening skills: lockpick, safe cracking, computer science (electronic locks) and brute force, which seems a bit excessive.
<p>
<img src='/assets/img/2016-10-08/wasteland-2-combat-surrounded.jpg' class='border width-100' title='Being surrounded isn&#039;t as bad as it looks, as it can cut down on friendly fire' alt='Being surrounded isn&#039;t as bad as it looks, as it can cut down on friendly fire'/>
<p>
The combat itself is OK, but could be better. It&#039;s deeper than Fallout 2, but shallower than Fallout Tactics. Tactics is a dirty word with fans who wanted an RPG, but people unfairly overlook that it was a really good tactical turn based combat game. W2&#039;s combat is not bad, but it can be a bit algorithmic in that environments and enemy behaviour are not varied all that much. Once combat starts there aren&#039;t any surprises - everyone in the engagement is immediately visible to everyone else regardless of where they are and the AI knows exactly where your squad is regardless of whether anyone has line of sight on them, so you rarely need to change tactics away from getting everyone spread out and behind some cover for an evasion and chance to hit bonus, and have your sniper take a pot shot to initiate the fight. Later on in the game enemies do start packing so many hit points that you do sometimes need to think about using targeted shots to hurt their arms to cripple their aim, or slow them down by hitting their legs, but for the first half, tactics can be pretty simple. Weapon jams, intimidation effects and minimum effect ranges on some classes of weapons make things a bit more interesting, but overall some of Fallout Tactics&#039; combat features could have been used to much stronger effect here. 
<p>
<img src='/assets/img/2016-10-08/wasteland-2-statue.jpg' class='border width-100 clear-both' title='There are some strange things in the wasteland...' alt='There are some strange things in the wasteland...'/><aside class='float-right clear-right width-45'><h3>Other points:</h3><ol><li>The graphics are acceptable, not great. Who plays CRPGs for graphics, though?</li><li>The music and ambience is fantastic and fits the setting perfectly. If you think it sounds familiar, it&#039;s because it&#039;s by Mark Morgan, who also composed sound for Fallout 1+2.</li><li>Wasteland 2 is a long game. Not all of it is mandatory, but if you want to feel like you&#039;ve really explored it, W2 is a significant time investment.</li></ol></aside>
<p>
Weapons are diverse and offer a satisfying progression of stopping power as the game goes on, but they are somewhat unbalanced, i.e. assault rifles and sniper rifles are the main work-horses, and shotguns are virtually useless. Handguns don&#039;t become competitive until you get the 9mm variants. SMGs and heavy weapons exist in the hands of enemies but eat too much ammunition to make them particularly tempting to the player (although you might occasionally use burst mode of your assault rifle in a tricky fight). The game advises you to vary your weapon skills so your squad isn&#039;t fighting over ammunition, but ammunition isn&#039;t <em>that</em> sparse, and given another play through I&#039;d just give everyone points in assault rifles or sniper rifles. Fallouters will be pleased to know, however, that rushing up to someone and hitting them over the head with something heavy is a mostly viable strategy, but is neutered somewhat by the fact that heavy armour has serious drawbacks.<div class='verdict clear-both'>
<p>
Overall: Wasteland 2 has a pretty long list of minor flaws, but none of them are serious enough to take away from the fact that the game is engaging and continually tempts the player to poke around, meet people, and learn more about the world. The bottom line is that if you&#039;re a CRPG fan you&#039;ll probably like Wasteland 2. If you&#039;re not, you&#039;ll probably find it long winded and lose interest.<div class='score'>4/5</div></div>]]></content:encoded>
  </item>
  </channel>
</rss>