Many Pies

Many Pies
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, May 14, 2025

Why I went for a #clicksnotcode Salesforce certification



When I started working for my recent Platform App Builder certification (have I mentioned that recently?) I initially was heading towards the Platform Developer cert, which includes writing Apex code. We don't have much Apex code in our current org, and have only modified it a couple of times in minor ways. So I wouldn't be using the code writing skills that I gained in order to get it, and they'd get rusty. Given my years of experience writing code in other languages (and the Apex I wrote in 2017 for our switch from Raiser's Edge to Salesforce) I think I could pick it up if required.

It strikes me though, that the whole development process with, say, a Flow is very much like the process if you're writing Apex. So typically you:

  1. Talk to the people who want the enhancement or bug fix (let's assume it's a fix)
  2. Work out how to fix it
  3. Work out how to test that fix
  4. Fix it
  5. Test it
  6. User acceptance testing
  7. Documentation/training
  8. Release
So step 4 is different between Flow writing and Apex coding, but everything else is very similar. Have I over-simplified everything, or is there something substantially different to coding compared to creating a Flow?

Tuesday, June 26, 2018

Morriss' law(s)

I recently came across a couple of lists of software development laws:
The eponymous laws of software development
Laws of software development

I may or may not have publicly stated Morriss' law:
Every site/program/app attempts to expand until it resembles Twitter
See Facebook, Skype, Confluence

However on one of those lists I cam across:

Zawinski’s Law

This law addresses software bloat and states…
Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.


I was going to state Morriss' second law, which is like the first one, but has "until it has Stories", but I think there's Morriss' greater law at work here, which is something like:

If they copy you, you're doing something right.
 There's probably a better way of saying it though.

Friday, April 20, 2018

Free Salesforce postcode checker

While you can get Salesforce apps that check postcodes for you, here's a bit of Javascript that will check a UK postcode for you using the postcodes.io API and tell you if it's valid or not. It's not clever enough to suggest what the postcode might be, but then it is free.

Create a new button on the Contact object (Display Type: Detail Page Button, Behaviour: Execute JavaScript) and put this javascript on it:

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
var postcode = '{!Contact.MailingPostalCode}'; 
if (postcode != '') { 
postcode = postcode.replace(' ','%20'); 
sforce.connection.remoteFunction({ 
url : 'http://api.postcodes.io/postcodes/'+postcode+'/validate', 
async : true, 
cache : false, 
method: "GET", 
onSuccess : function(response) { 
if (response.slice(-5) == 'true}') { 
alert('OK'); 
} else { 
alert('Wrong - check using https://www.royalmail.com/find-a-postcode'); 
} 
}, 
onFailure : function(response) { alert('ERROR: '+response); } 
}); 
}
For the Account object use
{!Account.BillingPostalCode}

or
{!Account.ShippingPostalCode}
as appropriate.

Wednesday, November 30, 2016

I made an iPlayer radio thing

The BBC iPlayer radio app is going to stop working in January on iOS7. I understand the overhead in supporting multiple platforms, so I'm not going to complain about that. The iPlayer will still be available on the web though.

I general listen to iPlayer radio while I'm washing up, which is around 6:30-7:30. I generally miss the start of the Radio 4 6:30 comedy slot, so I often listen to the previous working day's programme instead. In order to speed navigation to the previous day (or the one before that) I've made this page which will take you to the evening schedule for 1, 2, 3, or 7 days in the past. Enjoy.

iPlayer Radio 4 on previous days

Tuesday, June 17, 2014

Kingdom Code

You can see me on that picture if you look very closely.

Kingdom Code was an event organised by Andy Geers and others:
Are you a Christian in tech? This event is being held to draw together a foundational group of Christians who work as developers, UX / UI designers, data geeks, product manager or entrepreneurs and who are excited to see mobile and tech used to serve Kingdom purposes. One output of this group may be to organise a Code for the Kingdom Christian weekend hackathon in 2015. 
The event was really well organised. After a bit of mingling we moved into a room with chairs. There was a brief introduction from Andy and Rupert Edwards and a big of plugging from the sponsors. We were then told to chat to the person next to us, and a bit later, to the person on the other side. There was a pre-event questionnaire asking about what people hoped to get out of the event and what sort of work they were in. There was a wide variety - not just developers and designers, but digital marketing people, business developments and entrepreneurs. I think I put myself down as jack of all trades. Some people were doing not specifically Christian type jobs (I hate the term "secular job"), but had Christian related side projects, in the way that Andy G does Prayermate on the side. Some people were visionary types who could see potential, e.g. in the internet playing a similar role to Roman roads which enabled the growth of the church after Jesus' death and resurrection.

We then split into 8 groups according to those types - I went with database/IT. After a bit we were then asked to mix about talk about this possible Code for the Kingdom event next year.

There was a plugging spot, where about 20 people got a minute to plug the thing they were involved in and ask for help, mostly volunteers or funding. There was a variety of visions for, say, easy software for administering churches, or helping those turning 18 who are forcibly returned to the country they sought asylum from, or getting the Bible out via mobiles. I plugged the paid job I blogged about recently. There was someone from Scripture Union who won the "oldest organisation" award, in contrast to the new ventures that people were working on. I think we came second.

There's another event planned in October, but I left before the end so I didn't hear much about that. Update: It's Monday 13 October.

Update2: Andy's written a post about it, though I blush to link to it.

I met a couple of people with links to Wycliffe:

  • someone who did a short-term placement with us a couple of years who is part-time working on Tyndale House's online scripture tools. Update: they've launched a new version of the site now.
  • Jason Ramasami who did this great picture for our magazine:
It will be interesting to see what this event has started.

Wednesday, June 04, 2014

Is it OKto.bike?

I wrote in a previous post about a web thingy so you could find out if it was OK to bike or not? Back then it was basically working, but since then I've added the ability to specify your own preferences, rather than being stuck with mine, or using a really long URL. Now it's got its own domain name and a logo.
(I am not a designer and have no ability in that area.)

So now you can bookmark http://okto.bike and check every day if it's OK to make your regular bike trip.

Next step with this - rewrite it in Ruby on Rails because that's what the cool kids are using.

Thursday, October 24, 2013

Blue Pi Thinking from the University of York

I did Maths and Computer Science at the University of York (they don't like people calling it York University) and this year they gave new Comp Sci undergrads a Raspberry Pi before they started the course. I'm pondering what I would have done had that been me.

Tuesday, September 17, 2013

Cross-platform app development and app porting

Some thoughts that have been sitting in draft for a while.

Cross platform frameworks

Marmalade has been my tool of choice for Playbook development, and I could use it for creating cross platform apps. This article on cross platform frameworks points to a project which shows how much common code vs platform specific code you have when using various frameworks. It would be interesting to see what figure Marmalade would get.

App porting

Blackberry and Microsoft are struggling to increase the popularity of their mobile platforms. Blackberry has approached it by throwing free Playbooks at the problem. If you want to port an app to Windows Phone from iOS or Android then you may find your way to this page (last updated Aug 2, 2013 as I write this, so not out of date), but look at the links - no Windows Phone 8 guide. Unless I've missed something, Microsoft aren't putting much effort helping people port apps.





Monday, September 09, 2013

My first Little Printer publication - UK daily weather

I've just made my first Little Printer publication live - UK Daily Weather "Daily Weather from the BBC (not officially affiliated with the BBC)". I've been following Little Printer for a while and when they announced a github project with a complete PHP publication it wasn't long before I forked it and made my own. A while back I developed the twitter bot behind Wycombe Weather, so my first thought was to develop a similar weather app, including an idea that I never got round to with that - pictorial representation of the weather.

It wasn't too hard to strip out the code at the heart of the original publication and substitute some code to parse the BBC RSS feed, print out the date and the description of the weather, and then display a picture of the weather. I used the whole of the @wycombeweather twitter feed to find a list of the words that the BBC uses, and then created some PNG pictures based on some original SVG weather symbols. I originally created them as SVG files but the Berg preview test tool didn't display SVG. Using the Berg tools you can test everything without having to actually own a printer, which I don't. I'm hoping they may give all developers a free one at some point.

The next step was to let the user specify their postcode, which wasn't in the original code, but I found some other sample code that did most of the work. Then I polished it up a little, and now it's live! While working on it I deliberately didn't look to see if anyone had done anything similar, but as I was deciding on the final name I had a look and was glad to see that there was only one other weather publication in the appropriate category.

It's been great to do a nice little project with such a cool device. If you end up subscribing I'd be grateful if you could get in touch and send me one of the printouts.

Update: I found you can send a message to the Little Printer people and they'll send you picture:


Thursday, August 29, 2013

I've been working on the Youversion Bible app

I can now decloak and reveal that the work I've been doing on BB10 was on the Blackberry version of the Youversion Bible app for the BB10 platform as recently announced by Youversion. My part has only been small, as I've only done it in some of my lunchbreaks. Another developer has done most of the work.

Update: Oct 28, 2013 it's now released http://appworld.blackberry.com/webstore/content/1222/?countrycode=GB&lang=en

The Youversion people are really committed to cross platform apps. Look at the list of platforms on their app page. Not many people can say their app works on HP/Palm or Symbian!

Monday, April 22, 2013

Blackberry 10 and Cascades

In my lunchbreaks I've been doing some BB10/QT/Cascades development on a Bible app. The SDK comes with a customised version of Eclipse.

Eclipse

I've heard of Eclipse over the years, but I've never used it before. I'm very impressed. Of course IDEs have come on since I used Visual C++ regularly many years ago. There seem to be lots of useful features and I've hardly scratched the surface. The BB10 SDK comes with the tools for deployment etc. all built in. You can even upgrade the SDK without leaving the IDE (apart from restarting it at the end).

QT/QML

QT is also new to me. You can use it without QML (a markup language for the UI) but it's nice to be able to  see the visual form laid out in a file, rather than sprinkled throughout the code. One trouble with QML is that as it's not compiled but dynamically interpreted, you can make mistakes which don't get picked up at build time. It has javascript like syntax for code snippets and if you're lucky you may see an error in the log if you've done something wrong.

Cascades

This is the icing on the cheescake which means that you can develop native looking apps with another framework on top of QT. Although in the past I've hand assembled Spectrum machine code these days I want to concentrate on creating the original with my software, so it's good to have components already available, like a rich listview, or text areas that scroll. So with Cascades you get access to all that sort of UI stuff. Surprisingly I've found some bugs in what's already being used on real devices without doing too much. Maybe I've been unlucky.



Thursday, December 06, 2012

Another Blackberry Playbook app

I've developed another Blackberry Playbook app in my spare time. My first one was a bit rubbish, but it got me a free Playbook. My second (GPS to Grid Ref) only did one thing. This one isn't fantastic, but it is a proper game.

I developed it using the Marmalade SDK which targets iOS, Android and the Playbook. There was a promotion where they gave away developer licenses for six months so you could develop apps and if you submitted one get (another) Playbook. The Marmalade tools are really good, making building, deploying and debugging pretty smooth. The SDK has all sorts of libraries which came out of Ideaworks3D Game studios game development.

The game is based upon one of the samples, where a square on the screen moves towards your finger when you tap or press on the screen. Two of my sons, with the Playbook between them, started trying to get the square to move towards them, and the idea was born. My wife gave it the name - Tap Tug of War - and all three sons playtested it. To stop you just holding your finger down I made it so that if you pressed for two long the square, which became a fuzzy blob for the final game, would move away from you. I put a state machine around the game play for the splash screen, game over and restart screens, created some graphics and the game was done.


Monday, May 21, 2012

Playbook - 10 days in

Thoughts after 10 days with my Playbook:

It is slickly executed, but suffers from annoyances. It goes slowly at certain points, such as when you go into app world and click on the search box. It takes a while before the keyboard pops up. When you suspend it you don't know if a swipe will wake it up. There may be some logic to it, but I don't know what it is.

The app store, aka App World doesn't have a lot of what you want. For example, I couldn't find an app that acts as a satnav. The pricing is high too - $5 for angry birds, when it's less than $1 on the Apple app store. The online app store doesn't let you filter by device type, which seems to me to be crazy. When you create an app you specify which one of about 30 types of app it is, but you can't filter by those too.

There's no Adobe Digital Editions, which I was hunting for because I wanted to read ebooks from my library. However I did find the app from the company that manages ebooks for our county - Overdrive, and so that made me very happy - apart from the bugs in the app itself. It runs in the android emulator so it's probably hard to track down the cause of these bugs - the software, or the emulator itself.

I've released my second app, GPS to Grid Ref, which isn't rubbish, unlike my previous one. It is simple though - you click the button and it finds your position and displays it in UK Grid Reference format.

Thursday, March 22, 2012

Scratch for mobile apps


Combining thoughts from two previous posts - apps being a good way to get into programming and the Scratch programming environment. MIT have created an App Inventor which looks like an online version of Scratch, which creates an Android app. Interesting...

Friday, March 09, 2012

Raspberry Pi and the BBC Micro

A sprinkling of snippets:

There is widespread comment about Raspberry Pi and whether it will be the new BBC Micro. This article by Martin Belam "Digital Literacy for all" is fairly sane. He says
Firstly, programming isn’t everything. There will be plenty of kids for whom sending an email and filling in a web form is all they need to know about computers.
The Guardian, his employer, has a campaign about IT in schools.

One thing that annoys me is that some people are saying, like the otherwise brilliant Brendan Dawes, "you have to learn to program to do anything with [it]". The recommended Linux distro (Fedora) allows you to do lots of stuff.

This podcast is an interesting discussion on what IT skills should be taught in school and university.

One of the things they mention is scratch, which one of my kids has come across at school. It's great for learning the fundamentals of programming in a graphical way.


Wednesday, January 11, 2012

The BBC Micro and me

BBC Micro
A couple of weeks ago Charles Arthur, the technology correspondent for The Guardian asked on twitter
So who is there out there whose experience with the BBC Micro led them to achieve something notable in the computing business?
I responded as we had a BBC Micro at school which I used in the sixth form. I gave him some details, but he was looking for someone who, if it hadn't been for the BBC Micro, wouldn't have got into computers. I wanted to be a programmer from aged 11 and we had a Spectrum at home, so that didn't apply to me and he didn't use my story in the article that he wrote on it. I paid for my driving lessons with the money I made on games I wrote for the Spectrum (and probably the BBC) and sold to magazines.

In our correspondence he asked
And do you think that kids today have enough access to that sort of programming, or do they need a "new Micro" to inspire them?
I replied:
Kids today have access to a wide range of free programming environments via the internet. If I were to start doing games today I'd be using a physics/gaming engine to do the heavy lifting, and aiming to get my stuff on miniclip or in an app store. Angry Birds is probably the thing that inspires them.
So I'm not sure any new type of hardware is needed. Today the BBC ran this story about a new curriculum for ICT.
Computer games entrepreneur Ian Livingstone, an adviser to Mr Gove, envisages a new curriculum that could have 16-year-olds creating their own apps for smartphones and 18-year-olds able to write their own simple programming language.
So I guess they agree with me!

I also recently came across this petition on the UK Government petitions website "Teach our kids to code". I don't like the way it uses the word "coding" which is a bit of jargon which could be better expressed as "programming". It also seems a bit unnecessary now in the light of that BBC story.

Photo from Rain Rabbit.

Friday, May 21, 2010

Display a tweet on a web page - getting around the authentication restrictions

I was working on the Engage page on our website and I wanted to display a single tweet from a particular user. It was a lot more complicated than I thought.
An old version of a similar page used the query (with a bit of JQuery around it)
http://twitter.com/statuses/user_timeline/...

Although that still works, I suspect it will be deprecated. The latest version
http://api.twitter.com/statuses/1/user_timeline/...
requires authentication. That's soon going to require OAuth. It wasn't easy to find much stuff about OAuth and twitter and javascript. Eventually I did find some wisdom about how it was a bad idea on javascript, because it means putting secrets in your code.

So my work around was to create a list with the same name as the user I wanted to display on our corporate twitter account, add that twitter user to it, and use
 http://api.twitter.com/1/user/lists/...
instead. It doesn't require authentication, so works fine!

Wednesday, May 19, 2010

Morriss's law

Whilst using our corporate wiki, Confluence, I thought of a new law:
"Every program attempts to expand until it becomes Twitter."
One of the recent new versions of Confluence incorporate status updates, and "following". It's based on:

Zawinski's Law of Software Envelopment (also known as Zawinski's Law) relates the pressure of popularity to the phenomenon of software bloat:

Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.
—Jamie Zawinski,



From http://en.wikipedia.org/wiki/Jamie_Zawinski.

Tuesday, December 22, 2009

You can't have it all

I've just finished compiling a list of places where we duplicate information. It struck me that software engineering is like any other engineering, you can't have it all. You can't design a car that is fast, cheap and reliable. You can pick any two of the three and design a car to fit those criteria.

In my previous job in an electronics firm the engineers had to explain to the management why we couldn't produce products in a short space of time, that were powerful and yet cheap. "Pick any two", we'd say, "and will manage those".

In our information systems we'd like them to be integrated, handle complicated information and be easy to update. One of the places where we duplicate information is where we've previously chosen integrated and complicated whilst having to put up with not easy to update. However the ease of update is has become more important so what we've sacrificed instead is the integration - so the data is partly duplicated in a custom system that handles the complicated data nicely.

In another place we have data entered by hand which exists elsewhere in a spreadsheet, so we can do a quick mail merge to get the data out in several ways. In that case we've sacrificed integration because the effort to type it in was easier than the gymnastics in getting the data out in those several ways.

Fortunately the list of duplicated data is quite short because the data is mostly fairly simple and so can live in the integrated system (Raiser's Edge).

Wednesday, August 06, 2008

Second facebook app

I've done a second facebook app. This one reads updates from the wycliffeuk twitter user and displays them in a profile box. Behind the scenes it updates all the users profiles every hour so that the updates are fresh.

Credit goes to Manas Tungare for his script which gives you the nice "23 minutes ago" or "about 5 hours ago" text, and David Billingham for his twitter PHP api.