Wednesday, 26 November 2014

CleverDic Needs You!

I need your help to promote my app, CleverDic Crossword Solver:

Get it on Google Play

Downloads have dipped sharply recently, so please help by telling you friends to download CleverDic. If you're on Facebook, please share this link:

Download the flyer and pin it up on your work/school/shop/pub/club's notice board:

Please help out if you can and make CleverDic a great Android App.

Best Regards
Pig Dog Bay

Monday, 17 November 2014


Most reviews about Christopher Nolan's sci-fi masterpiece lazily suggest it is full of plot holes. Mark Kermode deigns the plot to be ludicrous, "...I can only accept the final 15 minutes if it’s all an illusion – which I suspect it isn’t". I suggest that most reviewers have misunderstood the film and especially misunderstood the scientific concepts that the film so wonderfully brings to life with its stunning visuals.

Download CleverDic from Google Play

The Last 15 Minutes

Cooper decides to see what is inside a black hole and approach the singularity at its centre. He ejects from his ship and falls into what appears a infinite matrix of his daughter's bed room. The room is repeated ad infinitum in various directions (spatial dimensions) but each room shows a different time. 

As explained in the film he is able to move around this matrix in various directions to visit the room at different times, in other words time travel. In Einstein's theory of Special Relativity there is a concept called Space-Time which states that space and time are the same, we exist in a 4 dimensional world that consists of 3 spacial dimensions and one time. In theory we should be able to move backwards and forwards through time, its our human perception of cause and effect that makes this idea seem bizarre. In fact there are philosophical musings that time actually runs backwards:

Retrocausality is primarily a thought experiment in philosophy of science based on elements of physics, addressing the question: Can the future affect the present, and can the present affect the past?[1] Philosophical considerations of time travel often address the same issues as retrocausality, as do treatments of the subject in fiction, although the two terms are not universally synonymous.[2]"

Having said all of this the Second Law of Thermodynamics implies that time has a direction, entropy (disorder) increases with time, which in I my mind does separate time from the other spacial dimensions. In the film, Cooper suggests to TARS that he may actually be in a world with higher dimensions and that is how he is able to move to different points in time.

Cooper is able to communicate with the past using gravity. According to General Relativity, gravity is due to the curvature of space-time.  The curvature in space-time is caused by mass, so it is feasible that Cooper's own mass will cause a tiny warping of the space-time in his daughter's room. Admittedly this will be tiny and it is very doubtful if he could even effect the motion of a falling speck of dust.

At the start of the film Cooper and his daughter receive mysterious messages that contain information about a secret NASA mission. In the final 15 minutes, it is Cooper himself who sent the messages and also information that allows his daughter to crack the Gravity problem (quantum theory of gravity?). So there are paradoxes and causality loops. Standard fare for any time travel film from The Terminator to Bill and Ted's Excellent Adventure!

For me the ending to 2001 A Space Odyssey's is still baffling but for Interstellar the ending made complete sense. In the cinema I was at edge of my seat as he entered the singularity, like when I first saw Disney's Black hole. Interstellar delivered a spectacular insight into the latest ideas of theoretical physics.

Other Treats

The worm hole is actually spherical, Kip Thorn and the CGI team have had two scientific papers published based on the theoretical physics and computation that went into the rendering of the Wormhole.

In a swipe at Creationism being taught in Schools, the Moon Landings have been removed from textbooks as they are now taught as having been faked, a PR stunt to win the Space Race.

The T.A.R.S. robot at first appeared to be naff but when he got going later in the film he moved in very interesting ways. Also his design is a nod to the 2001 monolith and certainly not HAL. 

The character's in the film muse about why humans need to go into space instead of probes, as AI does not have the same survival instincts as humans.  With the AI Singularity upon us, very interesting philosophical points.


A film that demands attention and intelligence, you'll be rewarded with new concepts and ideas presented with spectacular visuals. Looking forward to the DVD release with special features.

Monday, 20 October 2014

Weight Tracker v1.15

A new version of Weight Tracker has been released, key new features include:
  • Italian translation by Simonini Luciano
  • Fixed a nested scroll view bug
  • Improved the data entry screen
Many thanks to Luciano who has patiently worked with me to provide an Italian translation of the App,

Controversially Banner Ads are back! The banner ads are provided by Ad Mob using Google Play Services API, I also have enabled Google Analytics that provides me with anonymous usage data, this lets me see which screens people use most so I can improve the app accordingly. Your data is safe and is not sent to Google or anyone else.

I know a lot of users liked the no permissions, no ads and no in app purchases, so for these users I have created a Pro version of the app for a small sum of around $1.99. Ads and analytics have been completely removed from the Pro version, you can download it from Google Play:

(Note that the Pro version will automatically read your latest back up file when you first start it. So before downloading the pro version, on Weight Tracker, go to Edit and press the share option on the menu. This will create a new backup of your readings.)

A few users left comments complaining scroll no longer worked, looking into this I found that I was nesting scroll views which is bad. This is now fixed, apologies to anyone whose phones had this bug.

New features to come:

Improved report screens with explanations of the stats and BMI chart.
Make transferring readings to other devices easier and show a link to an online help page
Add a new field for body fat and add this to the report and chart.

Please leave a comment on this blog or send me an email with suggestions, bug reports or queries


Wednesday, 3 September 2014

Translating Weight Tracker

If you are interested in translating Weight Tracker, read on!


You will need a decent text editor before starting. On Windows I recommend Notepad++

On Linux, Gedit is more than fine. I'd be grateful for anyone to recommend a Mac text editor.

Web hosted email tends to play funny tricks with xml files, so may need a zip utility to zip up your text file to prevent any malarky by Yahoo! etc. Linux comes with zip/unzip, on Windows I recommend 7-zip

You need to be able to download files, attach files via email, how to use text editors and how to use zip/unzip utility programs.


All the strings in the app are stored in a file called Strings.xml:

Download Strings.xml

The file contains many string elements, like:

    <string name="quickhelp_description_chart">Chart showing your weight changes over time</string>

The name, highlighted in red, is a descriptive name of where you will see the string, so here you can guess that this string is on the quick help screen and provides a description of the chart:

To translate this into Spanish, you would do
<string name="quickhelp_description_chart">Gráfico que muestra los cambios de peso en el tiempo</string>

Note the name is not translated, its still the same, only the green part is translated.

When all strings have been translated, save the file as Strings.xml, zip it up and send it to my pigdogbay email address (see the about screen in the app).

Technical Quirks

I use Eclipse to develop Android Apps and it can be a real pain in the ***! Here are some of the common problems that I run into and where you can help me out before providing your translations:

  • Apostrophes, ' , these need to be preceded with a backslash, for example \'
  • File encodings, Eclipse uses UTF-8, please ensure that you save strings.xml as UTF-8. You can check this in your editor's save-as dialog or file preferences.


The problem is that you can not check your translations to see how they will appear in the app. I will have to take your Strings.xml, compile a new version of the app and send you a link to the APK file for you to side load.

Once you have the updated app, you need to check that the strings fit the screen and don't mess up the user interface. One tip to avoid problems is to try and keep strings about the same length as the English version. Maybe use abbreviations such as the French 'SVP' for 'Please'.

Once we are both happy with the translations, I'll put them into the next release that will appear on Google Play. I will credit you on Google Play with providing the translation.


If I make future releases of the App I may notify you to ask you with help in providing new translations for any changes. Since the app is quite mature now, this hopefully will be quite rare.

Many thanks to the people who have sent me emails with offers of help, much appreciated and I hope this post will now help.

Kind Regards
Pig Dog Bay

Tuesday, 2 September 2014

App Update

Appy Days! The Fonz keeps trim with Weight Tracker.
A quick update on how my apps are doing

CleverDic Crossword Solver

Download Now From Google Play

A strong year for CleverDic with over 60,000 downloads and over 27,000 active users and still rising. You'll find CleverDic in the Top 100 Apps for Books and Reference and has a healthy 120 downloads per day. G'Day to Australia where the app is very popular.

Weight Tracker

Download Now From Google Play

Downloads went through the roof after Christmas, with over 350 downloads per day. Total downloads now exceed 55,000. Downloads have slowed over the summer but have sharply picked back up again as people try to shed their summer holiday pounds!

Good news, I'm adding new features however I'll be bringing back ads which will help to support the app in the future.

Anagram Solver

Download now from Google Play

Anagram Solver is CleverDic's little brother where I can try out new features but is now actually beating CleverDic on daily downloads and is the #1 Anagram Solver app on Google Play.

Users like the clean and simple user interface. There are no other screens or menus, just a simple slide swipe panel so you can quickly access the help section.

Interestingly I notice that users rarely use the powerful search features, in fact they tend to only use the app for what it's name suggests. So Anagram Solver users mainly use the anagram search tool where as CleverDic they use the crossword tool!

Other apps

Download now from Google Play

Mortgage Calculator has quite recently taken off from 1 or no downloads per day, to over 20. This is quite surprising considering there must be 1000's of these type of apps but I do try to make my apps quick and easy to use, no nonsense, so I guess there is good demand for easy straight forward apps.

Stopwatch picks up the odd download each day, I never expected many downloads as I wrote this app to help me at work when I need a handy simple Stopwatch that I can see from across the room.

As The Fonz says, Heeeyyyyy!
Pig Dog Bay

Friday, 8 August 2014

Solving Crosswords With CleverDic


I'll show you how to effectively use the CleverDic Crossword Solver app to solve cryptic crosswords. The information here also applies to the sister app, Anagram Solver. Firstly I'll summarize the powerful search functions and then we will complete a real crossword.

Missing Letters

This is the most common search as you will usually have a few letters in a clue and is useful for all types of crossword puzzles. You use a full-stop (or period) to represent a missing letter:


CleverDic finds 24 words such as raspberry, ragpicker, and respected.

Cryptic crossword clues sometimes give you the letters of the answer, this is useful when you don't have any letters yet to search, for example:

Sort of cable - flatter one, aluminium (7)

Well one is I (Roman numeral) and aluminium is AL (its chemical symbol), so I'll try this search:


I get 31 matches and I quickly find coaxial (coax = flatter).

Tip: Consonants, especially JKMQWXZ are really good for narrowing down the number of matches.

Tip: Big words with over 12 letters are good for giving narrow searches


Cryptic crosswords always have a few clues with anagrams, the easier crosswords have lots of anagrams. In CleverDic just enter the letters and it will find all the matching words that use those letters, enter:


to find purse, sprue and super.

All very well, but how do you spot anagrams in the first place? Well the setter will use certain words to indicate an anagram such as, sort of, unfortunately, spreading, make, manufactured, maybe and could be.  Since the app is quick and easy its worth just trying out letters to see if they make a word even if you are not sure there is an anagram in the clue.

Tip. Sometimes the letters will be spread over several words and maybe punctuated.

Can you spot the anagram here (being manufactured is the indicator):

8d Maybe put heat-resisitant material around a utensil being manufactured (8)

I show you the solution later

Partial Anagrams

To make the clue more difficult the setter will only use an anagram that only makes up part of the clue, the rest of the letters will have to gleaned from rest of the clue, for exmaple.

22ac Stratus spreading around break of day - something in the heavens (8)

Stratus is an anagram as indicated by spreading, but is only 7 letters. no problem CleverDic can smartly deal with this using the Supergram feature, enter:


The + symbol represents the unknown letter, the search returns 5 matches with stardust looking like the best fit for the clue, something in the heavens!

Tip. If you have several unknown letters use a + for each letter. 

Here is a harder example with several missing letters:

Irrational fear about short crack in water bed (7)

Irrational is an anagram indicator, so I searched for fear+++ which gave me 197 matches, luckily I had the first letter, A, and there were only 8 words in the list that started with A. Aquifer is a rock holding water, the missing letters are qui, AQUIFER, quip is a joke or crack and short means the that the last letter of QUIP is knocked off.


Some clues give you too many letters and it may not be clear which ones to throw away. Not to fear as CleverDic will drill down in an anagram and find you the smaller words.

Multi-Word Anagrams

Most crossword/anagram solver apps in the marketplace only solve one word anagrams, CleverDic can take you letters and make two words with them,

To use this feature, type in your letters but add a space to split the letters, eg abcdef ghi will search for 6 and 3 letter words. For fun try your own name or football club,  for example,  enter manchester united to find lots of funny names such as mechanised nutter.  Note the order of the letters is unimportant, its the placement of the space that decides the word sizes.

Tip. A lot of clues have 3 word answers one of which is usually 'and' or 'the', remove these letters from the anagram so you can search for the other two words.

Crossword Example

The Monday crossword is usually a nice easy one to gently ease you back in! I like the i crossword as they publish crosswords from several different setters who normally publish in the Independent.

1ac Cross inlaid with gold on church vessel(8)

So far I had the following letters


Performing a search, returned 31 matches, so to help narrow down the search I guessed that gold means the letters au, the chemical symbol for gold,
so now I refined the search to

Which returned


saucepan is a vessel, au is gold, ce is church and span means to cross. It all makes sense!


9ac Animals start to shed horny plates (6)

I had the following letters


Which gave 77 matches, too many to look through.

Maybe its an anagram of animals, but its 7 letters, should I disregard the first letter (starts to shed?), nimals? No need, CleverDic shows sub-anagrams, eg all the 6 letter words in a seven letter anyway. There are fifteen 6 letter words that can be made from animals, but none fitted my clue.

Looking at 3 down, I had two solutions cassette or corvette, so now I could see which suited 9ac best:

.N.I.R  using corvette gives 4 matches, but none are any good.
.N.I.S  using cassette gives 14 matches, snails looks like a candidate.

Start to shed, is S, and horny plates are NAILS (bit tenuous I know). So SNAILS and CASSETTE are answers for 9ac and 3dn, CleverDic is earning its keep!


12ac Odd-job man caught in big old corporation (8)

I had two letters in the clue,


Gives me 19 matches, a lot of the words I've not seen before, I'll see if I can find another letter before trawling through 19 words. After solving the easy 8dn, I now have:


Which gives:


Holding down factotum, gives me the following definition:

an employee who does all kinds of work.
"he was employed as the general factotum"
synonyms: odd-job man, (general) handyman, general employee, man of all work, maid of all work, jack of all trades, personal assistant;

That will do!


22ac Stratus spreading around break of day - something in the heavens (8)

Spreading indicates anagram, stratus is one letter short so we need to use the supergram feature:

stratus+ gives


break of day is the clue that gives us the missing letter, d, so now we have all our letters

stratusd gives


This fits the bill for something in the heavens


25ac Adventure ceased unfortunately, pop being shut in (8)

I had no letters but ceased looked like a partial anagram, 'unfortunately' usually means anagram. Searching for


Gave me 30 words, escapade popped out as it means adventure, the extra letters were PA (eg father or pop!).


3d Small container placed in class (8)

I had the letters:


Which gave me 30 matches, two of which seemed to make sense cassette and corvette.  Cassette makes sense with the wordplay placed (set) in class (caste). Corvette made sense, its a small boat (container?) and its also a class of sailing boat. Hmm, in these cases I look to see how the words fits with other clues, the best fit was cassette. See 9ac.


4d Being sort of nervous could make chap pray at times (15)

I only had 2 letters but being a big 15 letter word meant it was worth a search


returned 6 matches


could make looks like an anagram indicator, lets try



Holding the word to look up its meaning:

"relating to the part of the autonomic nervous system which balances the action of the sympathetic nerves. It consists of nerves arising from the brain and the lower end of the spinal cord and supplying the internal organs, blood vessels, and glands."

Fits my 2 letters, fits the anagram and is something to do with nervous, an acceptable answer!


6d Vivacity around street beginning to lift city (7)

I had the following letters


The word street usually means st, lets try this search


This gives me a list of 34 words, quickly looking through the list I see Bristol. Let's break this down,
ST street, L beginning to Lift, but brio? Using CleverDic I looked this word up and it means vivacity.


8d Maybe put heat-resisitant material around a utensil being manufactured (8)

Another anagram, autensil, CleverDic qucikly solves this: insulate


14d Char's initial penchant for her task(8)

I only had two letters but I guess the third*,


Eight were 8 matches:

chemnitz, cleaners, cleanest, cleaning, cleansed, cleanser, cleanses, cleanups

Which one, all seem good? Well leaning is a penchant and cleaning is a clever answer to a clever witty albeit sexist clue!

(* 21ac mentioned cricket, this usually indicates xi (11 players), side or ground, so I used the n from ground).


15d Something of great importance grows weak - one of the joints (8)

I only had two letters but good ones:


Which gave 8 matches, flagship. Flags for growing weak and hip for joint.

As you can see from the picture I had a few clues left, please leave a comment if you solve them!
Pig Dog Bay

Friday, 1 August 2014

CleverDic v1.19.01 - Supergrams!


The latest version of CleverDic has been released on Google Play. CleverDic is the essential Android App for anybody who loves crosswords and other word games.

Download CleverDic from Google Play

Supergrams! Not Super Gran! Although Super Gran would love this new feature.

Supergrams, allow you to find larger words that contain the letters you specify. For example, ClEAr and spACE are supergrams of the letters ACE. This is a very useful feature when you only know a few of the letters in a word. 

For fun find larger words that contain your or your friends' names, enter Kayleigh* to find breathtakingly and heartbreakingly! The asterisk * indicates a wildcard supergram and will find all larger words.

Cryptic crosswords sometimes have clues that provide you with a partial anagram or a few letters of the answer. In these cases you know the size of the word and the letters to try, here is an example from the Guardian:

5d Cable screwed Post Office over, which may humour some deluded people (7)

The answer is PLACEBO, PO (post office) and CABLE the partial anagram. If you spotted CABLE as a partial anagram as indicated by the word screwed, enter cable++ into CleverDic. This tells CleverDic to find all 7 letter words that contain the letters CABLE, the ++ pads the length of the word to 7.

Other Changes

The clear button now shows the tip box again, quite handy with all the powerful features that are available to you.

Future Updates

Debbie Kerr and others have asked they would like larger fonts, a great idea which I'm now investigating.

Happy Crosswording.

Wednesday, 9 July 2014

PIC to PIC Communications


Microchip have released a new family of 18F microcontroller devices that support a new feature called PPS-Lite. Peripheral Pin Select (PPS) allows the various digital IO functions such as UARTs onto pins of your choice.

In this post I will show you how to communicate between two PICs using SPI and how to set up the  PPS registers.


Both PICs are the same type 18F65J94, one is designated the Master the other the SLAVE. The master and slave SPI pins are connected as shown in the image below. Note that here we do not use the slave select line.

Source Code

I wanted to be able to use the same binary for both PICs to help make programming of both chips easier as there is only one choice of hex file. The PICs will check pin E1 to see if they are a master or slave and behave accordingly.

One difficulty I faced is that the Master SCLK is an output and the Slave SCLK is an input. So SCLK is actually two different hardware functions SCLKOUT and SCLKIN. PPS uses two types of registers, output and input, so I needed to set the master clock pin to output register RPOR23 and the slave to input register RPINR8. Luckily the CCS compiler makes setting up these registers easy and I was able to use the same code/binary for both pics:

#pin_select SDO1=PIN_D1
#pin_select SDI1=PIN_D4
#pin_select SCK1OUT=PIN_D3
#pin_select SCK1IN=PIN_D3

The code below is written for the CCS Compiler v5.025, MPLAB X v2.10. The master will send 0,1,2 and 3 every second via SPI. Both pics will illuminate the red/green leds as they send/receive the data.

 #include "18F65J94.h"  
 #include "Device.h"  
 void slave(void);  
 void master(void);  
 void slave_spi_init(void);  
 void master_spi_init(void);  
 void main(void) {  
     if (input(MCU_ID)==ID_MASTER)  
 void slave_spi_init(void)  
     //Set SDI and SCK as inputs, SDO as output  
     //SPI Setup  
     //Slave, slave select disabled  
     //Clear errors  
     SSP1CON1 = 0b00000101;  
     //Slave must clear Sample bit  
     //Mode 0 CKP = 0, CKE = 1  
     //Mode 1 CKP = 0, CKE = 0  
     //Mode 2 CKP = 1, CKE = 1  
     //Mode 3 CKP = 1, CKE = 0  
     SSP1CON1_CKP = 0;  
     //Enable SPI  
 void master_spi_init(void)  
     //SPI Setup  
     //Master, clock = FOSC/64  
     //Clear errors  
     SSP1CON1 = 0b00000010;  
     //Sample in middle  
     //Mode 0 CKP = 0, CKE = 1  
     //Mode 1 CKP = 0, CKE = 0  
     //Mode 2 CKP = 1, CKE = 1  
     //Mode 3 CKP = 1, CKE = 0  
     SSP1CON1_CKP = 0;  
     //Enable SPI  
 void set_led(int value)  
         case 1:  
         case 2:  
         case 3:  
 void slave(void)  
 void master(void)  
     int buf,i;  
         for (i=0;i<4;i++)  
             buf = SSP1BUF;  

 #ifndef DEVICE_H  
 #define    DEVICE_H  
 //HS External Osc, FRC internal (Fast RC Oscillator)  
 #fuses HS  
 //T1OSC/SOSC Secondary Oscillator, low power circuit selected  
 #fuses SOSC_LOW  
 //Extended Instruction Set  
 #fuses XINST  
 //Stack Overflow / Underflow Reset Enable  
 #fuses STVREN  
 //Brown out detect: Resets the device if the voltage chipped  
 // Useful for when the user switches on/off quickly and the PIC needs resetting  
 #fuses BORV20  
 //Internal External Switch over: IESO,NOIESO  
 // IESO: Two speed start up mode is enabled. Used for power saving  
 #fuses NOIESO  
 //Code Protection: PROTECT, NOPROTECT  
 //    Use NOPROTECT otherwise chipped will be permantly programmed  
 #fuses NOPROTECT  
 //CLK0 Output enabled on RA6  
 #fuses CLOCKOUT  
 //PLL Frequency Multiplier  
 #fuses NOPLL  
 //Primary Oscillator - none  
 #fuses PR  
 //No clock switching, no fail safe clock monitor  
 #fuses NOCKSNOFSM  
 //Write Protect Flash Page  
 #fuses WPFP  
 //Segment Write Diabled  
 #fuses WPDIS  
 //TMR5 Gate is driven by the T5G input  
 #fuses T5G_IS_T5G  
 //C1INA and C3INA are on their default pin locations  
 #fuses CINA_DEFAULT  
 //IOLOCK One-way set enable  
 #fuses IOL1WAY  
 //USB Low speed clock select  
 #fuses LS48MHZ  
 //MSSP2 7-bit address masking mode enable  
 #fuses MSSP2MSK7  
 //MSSP1 7-bit address masking mode enable  
 #fuses MSSPMSK7  
 //Watch dog timer window  
 #fuses WDTWIN_25%  
 //Watch dog timer clock source  
 #fuses WDTCLK_FRC  
 //Watch dog timer postscaler  
 #fuses WDT32768  
 //Watchdog Timer:  
 #fuses NOWDT  
 //Windowed watch dog timer disable  
 #fuses NOWINDIS  
 //Watch dog prescaler  
 #fuses WPRES128  
 //Voltage Regulator Control  
 //VBAT BOR Enable  
 #fuses VBATBOR  
 //Deep sleep BOR Enable  
 #fuses NODSBOR  
 //Deep sleep  
 #fuses NODS  
 //In-Circuit Debugger Mode: DEBUG, NODEBUG  
 // DEBUG - In circuit debugging enabled, RB6 ICSPCLK & RB7 ICSPDAT are dedicated to the debugger  
 #fuses NODEBUG  
 #use delay(clock=20MHz)  
 //Write/read to a port directly, the compiler will not set the tristate  
 #use FAST_IO(ALL)  
 #define TRISTATE_E                    0b00000010  
 #define TRISTATE_D_MASTER            0b00010000  
 #define TRISTATE_D_SLAVE            0b01011000  
 #define LED_RED                        PIN_E4  
 #define LED_GREEN                    PIN_E5  
 #define MCU_ID                        PIN_E1  
 #define SPI_SDO1                    PIN_D1  
 #define SPI_SDI1                    PIN_D4  
 #define SPI_SCK1                    PIN_D3  
 #define ID_MASTER                    1  
 #define ID_SLAVE                    0  
 #define LED_ON                        1  
 #define LED_OFF                        0  
  *            SPI Configuration  
  * MASTER  
  *        SDO1    Output        PIN_D1        RP21        RPOR20_21=0x40  
  *        SCK1    Output        PIN_D3        RP23        RPOR22_23=0x30  
  *        SDI1    Input        PIN_D4        RP24        RPINR8_9=0x6F  
  * SLAVE  
  *        SDO1    Output        PIN_D1        RP21        RPOR20_21=0x40  
  *        SCK1    Input        PIN_D3        RP23        RPINR8_9=0x05 !  
  *        SDI1    Input        PIN_D4        RP24        RPINR8_9=0x60 !  
  *  ! write 0x65 to RPINR8_9  
 #pin_select SDO1=PIN_D1  
 #pin_select SDI1=PIN_D4  
 #pin_select SCK1OUT=PIN_D3  
 #pin_select SCK1IN=PIN_D3  
 #byte SSP1CON1 = getenv("sfr:SSP1CON1")  
 #byte SSP1STAT = getenv("sfr:SSP1STAT")  
 #byte SSP1BUF = getenv("sfr:SSP1BUF")  
 #bit SSP1STAT_BF = SSP1STAT.0  
 #bit SSP1CON1_WCOL = SSP1CON1.7  
 #bit SSP1CON1_SSPOV = SSP1CON1.6  
 #bit SSP1CON1_SSPEN = SSP1CON1.5  
 #bit SSP1CON1_CKP = SSP1CON1.4  
 #endif    /* DEVICE_H */  

Friday, 6 June 2014

Privacy Policy

This post is about the Privacy Policy for Pig Dog Bay apps, including CleverDic Crossword Solver, Anagram Solver, Weight Tracker, Mortgage Calculator and RoboQuip.

I am a sole developer based in the UK, I produce Android apps which I distribute through Google Play under the developer name Pig Dog Bay. My apps may contain advertising delivered via Google Admob, I trust that Admob will not harm you or you're device but please let me know if you have concerns about any ads that are shown.

Your privacy is important to me and I do not collect or store any of your personal information. My apps will however gather anonymous usage statistics viaGoogle Play Services, Google AdMob and Google Analytics. These statistics are completely anonymous to me and allow me to monitor such information as the daily Google Play downloads, user interface events (like pressing buttons), the number of clicks on ads and show in real time the number of users and their location.

Note that comments posted to the Pig Dog Bay Facebook, Google Play, Twitter and Blogger pages are public and may show your name and photo.


My software is provided 'as is' without warranty of any kind, either express or implied, including, but not limited to, the implied warranties of fitness for a purpose, or the warranty of non-infringement. Without limiting the foregoing, I make no warranty that:

  1. the software will meet your requirements
  2. the software will be uninterrupted, timely, secure or error-free
  3. the results that may be obtained from the use of the software will be effective, accurate or reliable
  4. the quality of the software will meet your expectations
  5. any errors in the software will be corrected.

The Weight Tracker App is for information purposes only and is not intended to be used for medical purposes. I am not a doctor or have any medical training.
Warning, CleverDic Crossword Solver and Anagram Solver apps use large dictionaries and so may contain words that may be offensive to you. Any offence caused is completely unintended.

I am a software engineer, not a lawyer! I write apps for fun, learning, a little money and the hope that many others will enjoy using my apps. 

Pig Dog Bay

Monday, 26 May 2014

Anagram Solver v1.03.04

A new version of the Anagram Solver App is now available from Google Play.

The app has a new faster anagram search algorithm which means the sub-anagram search is now 3 letters deep.

The deeper word search is a great new feature for word wheel games and TV shows like Countdown. For fun, enter you name and see what sub-anagrams can be made!

Under the bonnet the app now uses the Google Play SDK which gives me access to real time usage statistics via Google Analytics APIs.

In the pipeline is an exciting new feature, Supergrams. Enter abcdef+++ and the app will search for all the nine letter words that contain abcdef. Very useful for cryptic crosswords where you know some of the letters.

Never be puzzled again!
Pig Dog Bay

Wednesday, 19 February 2014

RoboCop Film Review

As science fiction the film was excellent exploring themes such as machine versus human intelligence, machine control over life or death decisions and the moral ethics of cyborg technology. As a RoboCop remake, it just paid lip service to the original and made the overall plot very clunky. The characters were flaccid irrelevant versions of their earlier counter parts. The satire of the original replaced with a biased mainstream media mouthpiece, played by Samuel Jackson, who frankly was just annoying.

The film starts showing ED-209's and other robotic soldiers patrolling around Tehran, the overtone was clearly American Imperialism. During a live television interview a band of locals launch suicide attacks at the ED-209s, an irate Iranian kid with a bread knife then confronts a massive ED-209 which quickly decides he is a threat and the kid is promptly blown away. I don't know why but I chuckled!

Apparently these cold killer droids operate all over the world, but not in the USA because America is special (puke!) and a certain senator says he doesn't want machines making life or death decisions. This simply serves as a cringing plot point so that OCP, the big bad ass corporation, have to come up with a cute lovable cyborg version of the killer robots.

In the earlier film it was fascinating seeing through RoboCop's point of view as he was being made, the booting up, the scientists fixing him and Bob Mortimer getting his hand crushed - "You're gonna be one bad motherf*****". In this version Murphy wakes up confused from a sweet dream but then panics when he realise he's a machine. Gary Oldman who plays the Frankenstein chief Scientist tries to calm his creation down but lets him roam out of the lab. This is clearly not Detroit as he wanders through a huge Foxconn like manufacturing plant in China. A prescient politic touch showing how economic power and technological prowess has moved out of places like Detroit to the Far East.

The film delves in to the robotics and science of the cyborg tech which is great. You are shown how RoboCop is put together and that the only human part is the brain, face and lungs. Unfortunately the human part makes RoboCop slower than the droid soldiers and so the chief scientist comes up with a clever trick. During combat computer control will take over but the human subconcious will think it is making the decisions. Considering that the movie started out by making the case that a human needs to be pulling the trigger, the legal and moral implication that a machine is still in control is skipped over. Hmmm! The Seargeant at Arms in this segment is the only character I liked, with his gung-ho attitude and jokes about RoboCop being a Wizard of Oz Tinman.

Over at OCP headquarters the marketing guy is wetting his pants over the feedback from the Robocop focus groups. Michael Keaton, the CEO, puts his infinite wisdom into action and demands to see a more tactical makeover, make him black. These pair ain't no Dick Jones or Bob Mortimer, think more Laurel and Hardy, here the film begins to disappoint.

There's no Clarence "Can you fly Bobby?" Bodicker, a very nasty vile bad guy, up there with Christopher Walken in a View to A Kill. In this remake all I can tell you about the villain is that he had weird gingery sideburns. The criminal element is just a sub-plot to explain how Murphy was killed and they are quickly dispensed with when RoboCop gets going. This means ultimately that Michael Keaton's (can't remember his character's name!!) characters only crime is that he ordered RoboCop to be switched off whilst he told Murphy's wife some porkies that he had died due to a malfunction.

Needless to say, RoboCop isn't going to die. Cue 15 minutes of cartoonish, low violence CGI as RoboCop hops around ED-209s. Yawn. No bad guy falling into toxic waste here and getting splattered. Just Keaton panicking and then getting shot. In the finale, a battered RoboCop is rebuilt ready for a bunch of sequels.

Considering we now have drones that kill people and companies like Google (Cyberdyne Systems?) moving headstrong into AI and robotics, we are quickly approaching the AI singularity. This film asked important questions about superior machine intelligence, its application and the moral implications it will have. One slogan in the film said "People Need Jobs Robots don't". Here we have a great sci-fi film clumsily shoe-horned into a RoboCop retelling.

I'd wouldn't buy that for a dollar!
Pig Dog Bay

Thursday, 13 February 2014

Mortgage Calculator

My first ever app has been re-released, Mortgage Calculator. Faster-Easier-Better Looking!

  • New exciting background colours.
  • Fast data entry - no typing
  • Share details with other apps such as text messaging
As you can see the App now uses number pickers. These are the same intuitive custom controls as used on the successful Weight Tracker app.  This makes the data entry fast and free from typing. Notice too that the monthly repayment is instantaneously calculated.

A slightly embarrassing bug fix to mention tho, the mortgage formula I used previously was incorrect.  Amazingly the BBC Mortgage Calculator  I checked it against, gave the same answer as the faulty formula. The BBC mortgage calculator still hasn't been fixed yet!!!

One feature which I think will be very popular is the Share option. You can send the mortgage details as an SMS text message, an e-mail or to a social media app if you have any of these apps installed.

Download Mortgage Calculator from Google Play

Pig Dog Bay

Tuesday, 11 February 2014

Flappy Bird

I recently posted about a national scheme, Year of Code that encourages people to get into coding. I bet Flappy Bird will have a bigger impact than Year of the Code, because the game earned $50,000 each day and it took only 3 days to code (as claimed by the developer) . There must be an whole bunch of people out there thinking $50,000 a day for such a simple game!

If you are a novice programmer, welcome! Don't get disheartened when you realise it's going take you longer than 3 days! Heck you'll spend a week getting Eclipse and Android SDK up and running. Most disheartening of all is that apps better than Flappy Bird will get hardly any downloads and earn a pittance, in fact this is the case for most apps on the market. Why some apps go viral is a mystery and seems more like a lottery.

To see how long it takes to create an Android game, I considering creating an App based on the Atari Classic Dodge 'Em.

Before I begin, I need to consider the following:

  1. How will the user control the car, on screen buttons, swipe or tilt? I will have to spend a lot time play testing to see what works best.
  2. Clearly the graphics need to be updated, I'm pretty poor at graphic design so I still need to keep it simple, I think I can manage with Dodge 'Em tho!
  3. Shall I use a game engine or roll my own. Either way I've got some learning to do.

And lastly I need some spare time!!
Pig Dog Bay

Thursday, 6 February 2014

Robocop App

In commiseration of the unnecessary remake of Robocop, RoboQuip is back!

Its big! Its back! RoboQuip! A Pig Dog Bay Tradition

Featuring a whole new user interface - see the quotes appear as Murphy would see them! 

See the quotes scroll up the console!

Not since the days of the ZX Spectrum has a RoboCop app been this good!

Serve the public trust

Now take laughing boy here and download RoboQuip. If Bobby had this App he could have flown!

Stay out of trouble!

Good Apps are where you find em. Give the man an App!
Pig Dog Bay Cop!

Tuesday, 4 February 2014

Learn to code in a week?

Listening to Radio 4's Today program a nice lady was promoting her course on coding skills and explaining to the presenter (who always plays devil advocate) why people should learn to code. She whetted appetites by promising that in one week you can build your own website and create your own app!

The problem I have with courses like this is that they give rise to the misconception that programming is easy and you'll be knocking out apps / websites in no time. People ask me to write a games app, I explain its very hard to write a decent game and they look positively shocked when I tell them of the 100's of hours I've put into my crossword and weight tracker apps.

Books like learn Java(or whatever) in 24 hours or week long courses are very useful and provide a quick route into a technology, but it takes much further study and practice to understand  a programming language to a competent level. I find it best to cut my teeth on a project to learn a new language properly.

Programming maybe easy, especially if you follow a sheet of instructions on a week long course but coding is just one part of producing an app or website. Consider for instance what you need to write an app.

1 Design

First you need a pen, paper and an idea. You need to sketch out a few screens of your app and consider how the user will interact with the app. For my Crossword Solver app I had to consider how the user could perform various searches and make it intuitive to use.

Second you will need to know how your app works, if its a game what are the rules? I had to develop fast search algorithms to search a list of 280,000 words for my Crossword Solver app. At the very least you will have to do some research, it took me quite a while to find and compile my 280,000 word list!

In practice you will hone the design over time, certainly longer than 1 week, usually over  many months or a year. I spent several afternoons just tweaking the background colours of my apps to get them more pleasing to the eye. A year after my Weight Tracker app has been released I'm still getting requests for new features.

2 Programming

You can now put your 'week long' programming skills into use. Slowly your app will begin to take shape. Each chapter may have only taken several hours in the 24hrs book, but oh boy you'll be spending many wasted hours just fixing irritating little bugs, trawling Stack Overflow for answers.

'How do I change the colour of my button when it clicks?' cue an afternoon of unexpected learning about how an Android button works. You will spend lots of time learning how to do the small things, never mind about network sockets or 3D graphics.

3 Testing

This is the most important step and its one that even professional (well they get paid) software engineers cop out on. Users will crucify you if your app does not work, no matter how pretty it looks. I combine steps 1,2 and 3 into weekly cycles. A bit of design, code it up, test and then put out a beta release. When I happy with my app, I put the beta release into production for folks on the market to download.

Doing weekly release cycles means you can keep everything in check, it would be silly to design a space pirate trading game with FPS elements only to find you don't have a clue how to write all the code, graphics and sound required.

Testing also means asking other people to try out you app and give their honest opinion, the Google Play store allows users to provide feedback, pay attention to their comments! Your app sucks and I guarantee it will need re-working as it takes time and effort to get it finally right.

4 Hello World!

Your website is snazzy but no one visits, your app is brilliant but no one downloads it. It is a cruel world. Prepare to spend as much time promoting your app as you did creating your app. See my previous blog post for some of my marketing efforts.

Then for all your hard work, a little pocket money would be nice, and it is little! I spent a lot of time creating In App Purchases that no one purchased, which in the end I had to pull them. My Weight Tracker app earned pennies from ads each day, so I pulled all advertising as it wasn't worth annoying my users with ads they never click. See my post Why Android Sucks for more details.

Marketing and making money is hard work but even if you work as a software engineer in a company (unless you are a lowly code monkey), you will still need to discuss requirements, create project plans and manage field trials.

In Conclusion

Programming is hard and very time consuming, programming languages are just one aspect of software engineering. A course that shows you how to build an app in week is basically about following a set of instructions. I'm no carpenter just because I can put flat pack furniture together!

Friday, 17 January 2014

Weight Tracker: Transferring Readings

This post will describe how to transfer you weight tracker readings from one device to another.


At the bottom of the post I will outline several alternative methods to transfer your readings, but for the main tutorial you will require:

An internet connection
Two e-mail accounts
File browser app
E-Mail App

I'll be using the ASTRO file browser app in this tutorial, you can pick other file explorer apps from:

The email client app I use is Yahoo!

Step 1: Sharing your Readings

On your old device you will need to perform the following actions

On the home screen press the Edit button

Press your device's menu key and select the Share Readings option. The Share icon may be already visible on your device, if so press it.

Step 2: Email Your Readings

Your readings will be backed up to a file which can then be shared with other apps

Choose one of your email apps to share  the Weight Tracker_20140117.csv readings file.

The readings file has been attached to the email, here I am sending it to another email account.

Step 3: Saving Your Readings On Your New Device

On your new device check for the email that you have just sent yourself.

Touch the attachment and press the Save button, I am using Yahoo! mail here.

The Yahoo email saves the attachment to a Yahoo folder, press yes to view the folder. You will need a file explorer app installed to do this.

Step 4: Importing Your Readings

The Weight Tracker app can read csv files, so you can open such files directly into the app. I'm using the ASTRO file manager app, but other file apps are fine.

Find and open the file, it will be named similar to Weight Tracker20140117.csv.  You will then presented with a list of apps that can read csv files, choose the weight tracker app.

The csv file will be opened within the Import Readings screen, press the Import button. Open the weight tracker app to check your data.

FREE APP! CleverDic Crossword Solver

Alternative Method: SD Card

If both devices have removable SD Cards, transferring data is really simple:
On your old device:

  • Press the Share Readings menu option from the Edit screen
  • A Weight Tracker csv file will be created in the download folder
  • Remove your SD card
On your new device
  • Insert the SD card into the device
  • From the home screen, go to to Edit, press the menu button and then go to Import Readings
  • Press the Get Backup Readings button
  • Press the import button

Alternative Method: Copy and Paste

You can share you readings with many apps, cloud service apps are particularly useful for keeping your devices sync'ed with your weight readings.  For instance you can share your readings to Google Drive or Evernote. Open the file from within these apps and use a text viewer app to view the file.

Copy the text that you see and then paste it into the import screen of the Weight Tracker app. Readings are properly sync'ed with new readings over writing old.

Hope this helps as I know many folk have had new tablets and phones for Christmas. Please leave feedback and please please please Like my facebook page so that you can stay up to date with new information

Like Pig Dog Bay

Pig Dog Bay