In this post, we want to explain a bit more about why we spent time and effort on making them, when normally we advocate for mobile websites.
Plus, for our technical audience, we’ll explain some of the tools we used in the build.
The why bit
When we redesigned FixMyStreet last year, one of the goals was to provide a first class experience for people using the website on their mobile phone browsers. We’re pretty happy with the result.
We’re also believers in only building an app if it offers you something a mobile website can’t. There are lots of reasons for that: for a start, apps have to be installed, adding a hurdle at which people may just give up. They’re time-consuming to build, and you probably can’t cater for every type of phone out there.
Given that, why did we spend time on making a mobile app? Well, firstly, potholes aren’t always in places with a good mobile signal, so we wanted to provide a way to start reporting problems offline and then complete them later.
Secondly, when you’re on the move you often get interrupted, so you might well start reporting a problem and then become distracted. When that happens, reports in browsers may get lost, so we wanted an app that would save it as you went along, and allow you to come back to it later.
And the how bit (with added technical details, for the interested)
Having decided to build an app the next question is how to build it. The main decision is whether to use the native tools for each phone operating system, or to use one of the various toolkits that allow you to re-use code across multiple operating systems.
We quickly decided on using Phonegap, a cross platform toolkit, for several reasons: we’d already used Phonegap successfully in the past to build an app for Channel 4’s Great British Property Scandal (that won an award, so clearly something went right) and for Züri Wie Neu in Zurich, so it was an easy decision to use it again.
We decided to focus on apps for Android and iOS, as these are the two most popular operating systems. Even with this limitation, there is a lot of variety in the size and capability of devices that could be running the app – think iPads and tablets – but we decided to focus primarily on providing a good experience for people using phone-sized devices. This decision was partly informed by the resources we have at hand, but the main decider was that we mostly expect the app to be used on phones.
There was one big challenge: the functionality that allows you to take photos in-app. We just couldn’t get it to work with older versions of Android – and it’s still not really adequate. We just hope most people are updating their operating systems! Later versions of Android (and iOS) were considerably less frustrating, and perhaps an earlier decision to focus on these first would have led to a shorter development process.
On balance though? We’d still advocate a mobile-optimised browser site almost every time. But sometimes circumstances dictate – like they did for FixMyStreet – that you really need an app.
We’d give you the same advice, too, if you asked us. And we’d happily build you an app, or a mobile-friendly site, whichever was more suitable.
They’ve been available for a little while, but we didn’t make a big fuss when they went live.
We often like to release our new products quietly. This gives us a chance to pick up on any problems and fix them before they go to a wider audience.
But now the apps are ready for more general use. So go for it!
A bit of background
We first released an iPhone FixMyStreet app back in 2008, which now seems reasonably fast off the blocks – the iPhone was only available in the UK from late 2007.
That app was followed by an Android one and, thanks to our volunteers, a Nokia app too.
Last year, we launched a new design for the main FixMyStreet website. Based as it is on ‘responsive design’ (where the site resizes itself according to the device it’s being viewed on), the site works elegantly within your mobile browser, so we were not too troubled by the fact that our apps had begun to date. People could simply go to www.FixMyStreet.com on their mobiles.
We removed those early apps from the Apple and Android marketplaces until we could allocate our resources to creating something better.
As you’ll know if you’ve accessed FixMyStreet from your phone’s browser, the website works just fine for most circumstances. But there are some times when only an app will do – our Developer Struan will explain more about that in a later post. He’ll also be looking at some of the design decisions we made.
So, what new features can you expect when you download the FixMyStreet app?
- Make reports even when you have no phone coverage Sometimes you’ll want to make a report even when you’re out of phone range. Your report will be saved in-app until you can send it off.
- Retains unfinished reports Close the app, lose power on your phone, get distracted and start something else.. none of it matters – your report will still be saved.
- Allows photographs Take a snap with your phone and attach it – or use an image you already have in your photo roll (you can add photos on the main website too, of course).
- Smooth, new design The look and feel is now in line with the main FixMyStreet website.
A note about Android
At the moment, the FixMyStreet app is only available for Android 4.1 onwards. Here’s why.
Developing for Apple devices is simpler than for Android, because there are only a handful of devices an app will be viewed on – the various iPhone versions, the iPads, and iPod Touch. Android, on the other hand, is used over a massively diverse range of phones, all with different capabilities.
For a small organisation like mySociety, it is hard to test the app across every single Android device, so we’ve taken the approach of releasing the app for the latest version.
We’ve had particular issues with photographs in earlier versions of Android – again, Struan will write more about this in a subsequent post – but we are still working on it. And don’t forget, as mentioned above, you can always access www.fixmystreet.com on your mobile browser for a totally optimised experience on any smart phone.
Shout-out to the testers
We want to give a massive “thank you” to all the people who helped us test the new app – your feedback has been so helpful at every stage of the build, and has informed the design decisions we’ve made.
This month we released a new version of FixMyStreet. Amongst the new features, fixes, and thingamajigs were some small improvements added by two volunteers, Andrew and Andy.
Even though these are not core pieces of functionality — in fact, precisely because they are not — we want to draw your attention to why they were included, and why this is a Very Good Thing. And perhaps, if you’re a coder who wants to put something into an Open Source project but hasn’t quite found a way in, Andrew and Andy’s work will nudge you into becoming a contributor too.
One of the axioms of Open Source is that, because anyone can read the source code, in theory anyone can contribute to it. In practice, though, it’s not really as simple as that. Both ends of the “anyone can contribute” idea require effort:
- Before contributing to a project of any complexity (as we hope you want to do), there’s often a lot to learn, or figure out, before any work can even begin;
- Before accepting contributions to such a project (keen as we are to do so), there’s an overhead of testing, checking, and managing the incoming code.
The ugly real world
The basic issue here is that software is complex — no matter how well-written, tested and documented program code is, if the problem it’s solving is in the real world, it’s not going to be simple.
This is especially true of anything used by the public, because often you can only make things seem simple at the front (such as a clean web interface or “user journey”) by working hard behind the scenes with data structures and processes that handle the underlying complexity. It’s inevitably true of any projects which have been developed over time — programmers like to use the term “legacy code” to describe anything that wasn’t written then way they’d choose to write it now.
Often the problems that software is solving are not quite as obvious as they first appear. At mySociety we’ve got a wealth of experience and actual usage data that ultimately changes the way we build, and develop, our platforms. We understand the fields we work in well (technically, the nerds like to call these the “problem domain”), whether it’s governmental practice or civic user behaviour, and that’s often knowledge that’s not encapsulated anywhere in the program code.
Furthermore, any established platform must protect against the risk that new changes break old behaviour — something that regression testing is designed to catch. This is especially important on platforms like FixMyStreet or Alaveteli where the software is already running in multiple installations.
This is why we have a team of full-time, experienced, and (thanks to our rigorous recruitment process) talented programmers who can invest the time and effort to be familiar with all these things when they set to work coding.
But this builds up to an impediment: sensitivity to any of these issues is enough to make anyone think twice about simply forking our code and starting to hack on it for us.
How it sometimes works
In practice, then, how does anything get contributed? How come it doesn’t all get written by our own coders?
The answer is, of course, we do work with major contributors outside our own team (have a look at the activity on our github repos to see them) — but it always requires a period of support and on-line discussion both before and during the process. There’s also the business of testing, and sometimes politely pushing back on, pull requests (which is how code contributions are submitted). But the fact of the matter is that this is only possible for people who are willing to spend time familiarising themselves with the specific code, technologies, and practices that we’re using on that project. These tend to be hard-code devs, and — here’s the point — they’re always experienced Open-Sourcers: this will never be the first time they’ve worked on such a project.
Which is where the little features come in.
The joy of small
We noticed this problem — that contributing code to our projects is simply not easy for us or for contributors. Importantly, it’s not just us: it’s Open Source everywhere. But we can’t simply dismiss the opportunity for contribution. We want to encourage coders to do this, because we believe that Open Source is intrinsically a good thing.
We do two things to make it easier to contribute:
- We identify small features that a coder can approach without a full understanding of the code and the problem domain;
- We help people (like you!) get started by opening up a laptop at our weekly meetups.
The first of these seems obvious now: when we add issues (an idea for a new feature, or maybe a bugfix) to our github repos, if we think they’re candidates for manageable, isolated work, we tag them with the label: Suitable for volunteers (like this).
Often these turn out to be “nice-to-haves” that one of our full-time devs can’t be pulled off more pressing problems to add just now. (Case in point: Andrew added a date-picker to the FixMyStreet admin stats page, and three of our own staff had stumbled upon and applauded the difference it had made within a week of it going live).
It means it’s much easier for you to get involved, because often it’s a little, isolated piece of code. And it’s much more manageable for us, because the change you’ll be submitting is also isolated.
So if you’re looking for something to tackle, pick one of those issues, and let us know (just to check nobody else has baggsied it already). Fork the repo, cut the code, write the tests, submit a pull request!
But wait — if that last paragraph made you gulp, here’s the second thing we do: meetups. Of course, this is less helpful if you can’t make it to London on Wednesdays, but the concept is sound. Put simply, if there is a barrier to entry to diving in, and if one-on-one time with a dev, and some pizza, is what it takes to overcome that, it’s time well spent for you to come and see us.
Not 100% confident with git? Not sure when
db/schema.sqlgets used or how we like to handle migrations? No problem: we’re happy to guide you.
If this has struck a chord with you — you’d love to be an Open Source contributor one day, and you think mySociety projects make the world a better place — perhaps you should take a poke in our repos, or come along to a meetup. Start small, but do start.
Oh, and Andrew and Andy — thanks guys
Photo by Matt Katzenberger (CC)
We’re good friends with the people at Mozilla. Every Wednesday, they welcome us into their London Moz space for our weekly meet-ups. They are champions of empowering possibilities of the web through Open Source software (a world we’re part of too). And they’re all so smart and lovely. So of course we’d been looking forward to this year’s Mozilla Festival for some time.
We had a table at the “Science Fair” on Friday night, where we literally had buckets of sweets (OK, they were little plastic buckets). Tom, our director, and Dave, from our international team, talked about mySociety’s work with anyone who came close. Perhaps people were drawn in by those sweets, or the FixMyStreet demo on the monitor, or even the (new!) stickers we had to give away… but regardless of the lure, we think they all learned a little bit more about how our platforms help empower people’s civic lives: from something as simple as reporting a flickering streetlight, to holding a public authority to account, to monitoring a whole parliament. (That’s FixMyStreet, Alaveteli, and Pombola, if you were wondering).
The Mozilla Festival’s venue was, once again, London’s astonishing Ravensbourne, right next to the O2 Millenium Dome. The setting magnifies the wonder of the event. Those big round windows make it feel like being in a spaceship made of Swiss cheese. The place is so open, and so vertical, that the activity and enthusiasm doesn’t just spread out, it spreads up. There is making and teaching, learning and sharing, going on across nine floors, and it’s easy to drift up and down from one themed space to another.
We met old friends. We got to hang out some more with our Chilean brothers-in-code from Ciudadano Inteligente, and the excellent Gaba from Uruguay’s DATA, together with the good people from the OKFN. We made lots of new friends too. And all this didn’t just happen at the sessions. A lot of serendipitous encounters took place by the Alchemy coffee stations. Or on the stairs (khun Toy and khun Hui — hi!). Or in the Alphabet City party venue, afterwards.
So a big “thank you” to that Fiery Fox, and an enthusiastic high five (yes, there was an unLondonlike amount of enthusiasm on show — possibly because quite a few of the attendees were over from the USA — which it is impossible not to be caught up by) to all the people we met at the event. Dave grinned his way through a wonderful Scratch tutorial from Code Club, met a whole array of cool people, got answers to some nerdy coding questions, and learnt about the awesome Hive learning networks… and lots more things besides. That already describes a great weekend. But beyond that, we hope we might see a few new mySociety-powered sites spring up elsewhere in the world due to sparks that were sparked at mozfest last weekend.
We hope that’s a question that is hard to answer, since FixMyStreet was built for everyone – or rather, anyone who wants to report a street problem to their council. Computer whizz or internet newbie, one-off reporter or serial council communicator, FixMyStreet is for you.
All the same, we wanted to chat to someone who uses FixMyStreet regularly, to find out more about how they see the site, and whether it makes a difference. So…
Meet Steve, from Exeter.
Steve’s been using FixMyStreet almost since it launched, in March 2007:
I’m not sure how I heard about it – it’s lost in the mists of time, but it was pretty soon after it went public. I see from your archives that I first reported a problem in July 2007, but I’m sure I knew about it before then.
As a board member for Schoolforge I was always searching for UK open source projects for education, and that’s probably where I came across it initially.
FixMyStreet can be used to report any street problems to the council – it’s most commonly used for potholes, broken streetlights, fly tipping, etc. But every user has their own concerns. What does Steve tend to report?
It’s usually road-related, as I used to push /walk the kids to school when they were young, and I cycle around a lot.
So potholes, traffic lights not responding to bikes, broken street lights, bad signage, low hanging vegetation… I think I reported a crop of Japanese knotweed once.
You did! Here it is. And have the issues been fixed?
Many have, according to your archive. I reckon that using FixMyStreet helped raise the priority, but you never know – and that’s fine. I like to think that reports come to attention of the relevant people more quickly when you put them online where everyone can see them.
Also, when you see an issue in the neighbourhood, it’s easy to assume that someone else has reported it, but as it’s so easy to ping off a report with FixMyStreet, there’s no excuse not to play your part as a citizen.
I appreciate that there’s no need to find the relevant council department, website, or whatever. Just point your browser at FixMyStreet, type in a location, click on the map and type in the problem. Sorted.
Plus if others have used it to report the same issue, you’ll see straight away.
Steve’s noticed an improvement in the way that councils interact with FixMyStreet reports.
I can’t vouch for how fast they get fixed, but at least I usually get an email response from the council to acknowledge receipt.
These have improved over the years too, indicating that the council have sorted their processes to better incorporate FixMyStreet reports.
Does Steve ever browse FixMyStreet to see what has been reported in his local area? Or subscribe to email alerts?
Very rarely, but it is interesting to see what’s been going on. When you report a problem, the process shows you issues that have already been reported in the same area, so you don’t need to browse first as a separate step.
And some final thoughts…
It’s well thought out and easy to use. I especially appreciate that I don’t have to create an account as a first step to reporting a problem: more sites should use a lazy login like this. FixMyStreet has slowly improved over the years; the most noticeable thing is the improved maps.
Also, it’s open source and that is important for such civic software. I don’t know if you get much open development with others contributing, but I do suspect that others use the code.
Yep, they sure do. FixMyStreet Platform is the place to look for that activity, where there’s also a link to our mailing list. The most significant contributions come from people in other countries who are setting up their own version – FixMyStreet in Norway, for example.
Thanks very much to Steve for telling us about how he uses FixMyStreet.
This post is part of a mini-series, in which we’ll be chatting to people who regularly use mySociety’s websites.
When FixMyStreet.com was first launched it sent all of our users’ problem reports to councils via email.
If your council implements an ‘Open311 endpoint’, then reports created by users of FixMyStreet.com (and other such websites run by other people) can be dropped directly into your back office system, without anyone ever having to re-key an email. Or, to put it more clearly:
Use Open311 correctly and you need never receive an email from FixMyStreet.com ever again. And you won’t have to pay us anything for this service. In fact, you should save money.
What is Open 311?
Open 311 is a free, public set of standards which allow councils to receive problem reports in a format that is better than email. It’s an international standard, and the idea is that if you implement it once, then you won’t have to build custom software to connect to every new problem reporting app or tool that comes along.
How is this different from FixMyStreet for Councils?
You may already know of our service FixMyStreet for Councils, which is a commercial service we supply to councils around the country, and abroad. So you might be wondering how this relates to the entirely free offer to connect FixMyStreet.com to your council back-office systems.
The main difference is that with FixMyStreet for councils you can put FixMyStreet’s famously easy-to-use problem reporting interface directly on your website. This means that users of your council’s site who want to report problems will have a much more satisfying experience, and that they will be able to see if their problem report is a duplicate before they contact the council.
FixMyStreet for Councils is templated to match your own design, and offers several other features such as a performance dashboard for council staff. Read more about FixMyStreet for Councils here.
Is Open 311 only for FixMyStreet?
Open 311 doesn’t just work for FixMyStreet reports – configure it right, and it will allow you to more easily process problems reports made by users using all sorts of other channels. We think that your residents should be able to make reports from whichever platform they choose – Open 311 means you can accept them all at the lowest possible cost.
How do we know if we have implemented Open311 correctly?
In the future mySociety will launch a validator service, to make testing easier. But for now just get in touch with us, and we’ll try sending you a test problem. If it works, we’re all good to go.
- Request your free FixMyStreet Open311 integration.
- Read more about Open 311.
- Not sure if your systems are set up for Open 311? Get in touch and we’ll tell you how to find out.
Image by Ardonik (CC)
Simple things are the most easily overlooked. Two examples: a magician taking a wand out of his pocket (see? so simple that maybe you’ve never thought about why it wasn’t on the table at the start), or the home page on www.fixmystreet.com.
The first thing FixMyStreet asks for is a location. That’s so simple most people don’t think about it; but it doesn’t need to be that way. In fact, a lot of services like this would begin with a login form (“who are you?”) or a problem form (“what’s the problem you want to report?”). Well, we do it this way because we’ve learned from years of experience, experiment and, yes, mistakes.
We start off by giving you, the user, an easy problem (“where are you?”) that doesn’t offer any barrier to entry. Obviously, we’re very generous as to how you can describe that location (although that’s a different topic for another blog post). The point is we’re not asking for accuracy, since as soon as we have the location we will show you a map, on which you can almost literally pinpoint the position of your problem (for example, a pothole). Pretty much everyone can get through that first stage — and this is important if we want people to use the service.
How important? Well, we know that when building a site like FixMyStreet, it’s easy to forget that nobody in the world really needs to report a pothole. They want to, certainly, but they don’t need to. If we make it hard for them, if we make it annoying, or difficult, or intrusive, then they’ll simply give up. Not only does that pothole not get reported, but those users probably won’t bother to try to use FixMyStreet ever again.
So, before you know it, by keeping it simple at the start, we’ve got your journey under way — you’re “in”, the site’s already helping you. It’s showing you a map (a pretty map, actually) of where your problem is. Of course we’ve made it as easy as possible for you to use that map. You see other problems, already reported so maybe you’ll notice that your pothole is already there and we won’t have wasted any of your time making you tell us about it. Meanwhile, behind the scenes, we now know which jurisdictions are responsible for the specific area, so the drop-down menu of categories you’re about to be invited to pick from will already be relevant for the council departments (for example) that your report will be going to.
And note that we still haven’t asked you who you are. We do need to know — we send your name and contact details to the council as part of your report — but you didn’t come to FixMyStreet to tell us who you are, you came first and foremost to report the problem. So we focus on the reporting, and when that is all done then, finally, we can do the identity checks.
Of course there’s a lot more to it than this, and it’s not just civic sites like ours that use such techniques (most modern e-commerce sites have realised the value of making it very easy to take your order before any other processing; many governmental websites have not). But we wanted to show you that if you want to build sites that people use, you should be as clever as a magician, and the secret to that is often keeping it simple — deceptively simple — on the outside.
This post was written by mySociety developer Dave Whiteland, and first published on our DIY mySociety blog.
Despite being home to the beautiful La Fiorita festival, one man still believes the authorities could do more to fix street problems in his part of Italy. Platforms existed in Venice and across other regions of Italy, so a precedent was set.
Thanks to local Claudio Carletti, the La Marche region will soon get its very own FixMyStreet platform, fatequalcosa.it, which translates as Do Something! Claudio has shared his experience of using the mySociety code and his plans for the site.
“I heard about FixMyStreet [after] reading a book called Wikicrazia where the author talked several times about mysociety.org,” Claudio explains. After exploring the mySociety sites he came across a blog post offering free developer time to help people start their freedom of information or street problem reporting projects. “I contacted [mySociety] and told them I wanted to create fixmystreet in Italy, and asked them for help. They responded immediately.”
Claudio explains, “I chose this platform after trying fixmystreet.com and discovering a really well done service and a user friendly site experience.” He tells us there is already an Italian site running a similar service aimed at councils: decorourbano.org. So Claudio’s plan is to target his site at the Italian youth, 14 to 18 year olds. “I think only a cultural revolution that uses concrete tools (like FixMyStreet) can really change the way you think and act, but I think [it’s] mainly young people who must have the tools to do so.” Plus, he tells us, the youth of today will be the older generation of tomorrow.
After an initial Skype chat with mySociety’s international team Claudio felt confident enough to try a basic install of the software himself.
“I’m not a website developer but I could do it,” Claudio explains. “My experience was using the installation through the Amazon web service. So most of the work was already done and I just ran the installation following the tutorial.”
That’s not to say it was all plain sailing. “Most of my issues came from the Ubuntu terminal commands, which I didn’t know how to use. After the release of the 1.2 platform version most of my problems were resolved. One important improvement was the automatic email service set up and the MAPIT_ID_WHITELIST feature.”
But the mailing list service run by mySociety to help self-installs was an invaluable tool for solving these problems. “Matthew [lead developer for FixMyStreet] always wrote back to my emails, spending a lot time helping me understand the problems,” Claudio says.
One of the perks of the FixMyStreet code is that it’s quite simple to change basic design elements of the site, such as colours and logos, so it can look unique from other installations. Claudio tells us, “After understanding the conf/general.yml file everything went smoothly.”
Claudio has recently begun collaborating with another user on this service, and is presenting his idea to the Projetto Kublai platform where he hopes to gain more support through their community. He’ll also be taking the project to a EU meeting in Berlin in the hopes that there might be some funding there. The launch date isn’t set but he has plans for collaboration with local schools and youth organisations. “[The youth] are more familiar with smartphones and they spend more time living in the city’s streets, because they take the bus or walk or cycle, but they don’t use cars.” And Claudio envisions these will be his superusers.
As Claudio tells the community on Projetto Kublai, “If you look at this site http://www.emptyhomes.com you understand how in reality there are no limits to the possibilities of use of the platform.” Other instances in other countries have reported any number of different types of problems. And it doesn’t just have to be email based, FixMyBarangey in the Philippines allows users to report issues using SMS.
The bigger picture behind Claudio’s installation, he tells us, is this: “Let’s say that the platform fixmystreet is a good starting point, because it works and is easy to install and use. I’d like to have the opportunity not only to bring a problem to solve; for example organizing task forces where people will agree to go and clean up an area filled with concrete waste or to sort out a pitch in order to organize a [football] tournament. This will be the site that will give the tips (video tutorial) to fix that problem. Having said so it sounds pretty utopian idea, but I also believe that if you let people participate (and give them the means to do so) they’ll believe in it and do everything they can to achieve it.”
An inspirational idea!
Romantica 2010 by Jukka Heinonen, Artisaniaflorae CC BY-NC-ND 2.0
Did you know that you can subscribe to FixMyStreet alerts within a chosen area? Like most mySociety sites*, FixMyStreet lets you subscribe to the content that is most meaningful to you, for free.
The feature was created with local residents in mind, but it’s proved useful for others with a stake in the area, such as councillors, MPs and community groups – especially as you can opt to receive reports within an electoral ward or a council area.
It just takes a couple of minutes to sign up for email alerts. You’ll get a deep understanding of the local area: what are the recurring issues, what concerns residents, and where are the trouble hotspots.
Here’s what to do.
Go to www.FixMyStreet.com and click on ‘local alerts‘ in the top bar, as indicated by the arrow in the image above.
On that page, input your postcode, or, if you have geolocation enabled, click ‘locate me automatically’.
As you can see in the image above, you have the option to subscribe to a geographic area, to the entire council area, or to a specific ward.
If you already use a ‘reader’ (eg Feedly or Newsvibe, to name a couple at random) then you may wish to use the RSS feeds. Feeds can also be used to put local content onto your own website, if you have one.
But if you would like to have FixMyStreet alerts delivered directly into your inbox, select the email alert option.
The final step is to check your email for our confirmation link. And then all you have to do is sit back and wait for the reports to roll into your inbox.
More and more people are starting to build websites to help people become more powerful in their civic and democratic lives. Some of these are on codebases that mySociety has created which is so great. There are some things which we would love to happen when you take our code and re-use it.
We want people using our code to keep it as up to date as they can, so that they gain the benefits of any changes made to the code by us or by other users. There are a few reasons for this:
You can co-brand the site without breaking anything.
Dave, one of our developers, explains how you do this. “So suppose, instead of calling it FixMyStreet you want to call it FixMyBorchester with a Borchester logo. Obviously this is a very real requirement, because people want to rebrand. One very feasible (but wrong! As you’ll see…) way of doing this is downloading the FixMyStreet code, finding the bit that paints the FixMyStreet logo and replacing it with the words <h1>FixMyBorchester</h1> and an image. This would work as far as the FixMyBorchester branding would appear on the site.
But if you then saved and committed your change to git and passed it back to us as a push request, we would reject it. This is for the obvious reason that if we didn’t, next time we deployed FixMyStreet in the UK it would have your logo on it.
However, say we suddenly discover there is a bug with FixMyStreet. For (a bizarre) example, if someone put the number 0 in instead of a postcode and the site returns a huge picture of a kitten. We love kittens, but that’s not what the site is trying to do. So, we make some fixes to the code that rejects zeros, commit it, update the repo, and it’s now there on the master branch. We write to everyone saying “really everyone, update to the latest (most up-to-date) place on the master branch” And you think, “yeah OK!” and you download the latest version.
If you just download it and copy it into place, you’re going to lose your FixMyBorchester changes, because there’s a more recent version of that file from us that hasn’t got them. If you did a “git pull” (which roughly means, “git! get me the latest version of master branch”) then git will refuse because there’s a conflict on that file.
So, instead of inserting your FixMyBorchester stuff over ours, which can’t work, you make a new directory in the right place called ‘FixMyBorchester‘, put your stuff in there and switch the FixMyStreet config — which knows this is something people want to do — to use that cobrand. Any templates FixMyStreet finds in there will now be used instead of ours. You can now safely update the codebase from our repo from time to time and FixMyStreet and git will never damage your templates, because they are in a place it doesn’t mess with.”
You can add new features
Dave continues. “Say when someone uses FixMyBorchester it’s essential that you have their twitter handle, because every time a problem is updated, FixMyBorchester direct-tweets them a kitten for fun. Right now there is no capacity to store a twitter handle for a user in FixMyStreet.
You simply add a column to the users table in your database and add some code for accepting that twitter handle when you register, and sending the kittens etc. That’s new code that isn’t in FixMyStreet at all. Sooner or later you’ll need to put at least one line into the main FixMyStreet program code to make this happen. As soon as you do that you have the same problem we had before, only this time it’s in code not in an HTML template.
What we would encourage you to do is put all your new code in a branch that we can look at, and maybe set it to run only if there’s a config setting that says USE_TWITTER=true. That way any implementation that doesn’t want to use twitter, which is — at this point — every other FixMyStreet installation in the world — won’t be affected by it. You send that to us as a pull request and a developer checks it’s not breaking anything, and is up to scratch in quality, and has good test coverage. Then we’ll accept it.
Even though currently nobody else in the world wants your twitter feature, it’s not breaking anything and it’s now in the repo so you can automatically update from our master when we change bits of our files, and the installation/overwrite/git-pull will work. Plus anyone that does decide they want this feature will now be able to enable it and use it.”
And all of this helps everyone using the code; you have a secure website that can be patched and updated each time we release something, other people have access to features you’ve built and vice versa. And overall, the project becomes more feature rich.
Please do make changes and push them back to the main codebase!
Image credit: US Coast Guard CC BY-NC-ND