Journal Entries

Bigger, Harder, Faster

Yesterday saw quite a horrific car crash in Manchester City centre. Police are still investigating it, but there were so many witnesses with the same version of events that it shouldn't be that long an investigation.

The section of road is right outside the main part of Manchester University, and is known for people using the lights as a drag strip to try and show off and impress the students. From eye witness accounts it seems that the driver of one car pulled away from the lights very fast and was going "at motorway speed", not noticing that a taxi was doing a U-turn further up the road. The two collided and the speeding car turned over a couple of times before landing on its roof. Both drivers were alone in their vehicles, and both had to be cut out and taken to hospital. The taxi driver had fractured ribs, the speeding driver was unconscious at the scene but described as being in a "serious" condition. This resulted in one of the main roads in and out of Manchester City centre being closed for the majority of the day.

To get up to the speeds he was travelling at, to cause that sort of a crash he must have absolutely floored it away from the lights. Which is worrying.
I'm not perfect myself, in my past I've had speeding tickets and done stupid things in cars. But I do worry that the tendency to try and do better than the previous generation is having some bad effects. Trying to drive faster is just one of them. Dangerous sports are becoming more and more dangerous and drugs becoming "harder" are another two. By trying to prove that we are "better" than our previous generations, we're taking more and more risks.

I do wonder if this may eventually lead to pro-active Darwinism, with the more stupid being removed from the breeding pool. But I also wonder if we'll lose some of those who would normally throughout history have pushed the boundaries. Without those willing to take the risks as test pilots for example, we'd not be flying anywhere much.

Taking risks is needed, but taking stupid ones isn't.

Discuss this Journal entry [11]

Latest reply: Feb 26, 2014

Going the Distance

While I was out walking on New Year’s Eve I tried hard to think of a New Year’s Resolution. I don’t normally bother with these because I tend to think that if something’s worth doing, do it regardless of when you decide to. But occasionally I do make one, usually so that the year start to year end is a good time measurer. The last one I made was that all the meat I ate was either organic or ethically farmed.

Initially this was very easy, I’d buy and cook a chicken or a joint of beef at the weekend, and then use it in my lunches throughout the week. But that got boring very quickly. So then it got very difficult. By far and a way the vast majority of ready meals out there are chicken. So nipping to the supermarket and grabbing a quick meal to nuke wasn’t an option. But as the year went on I started to find a few things that did work. For starters, having a vegetarian ready meal. There’s two things to understand about vegetarian ready meals, firstly the variety is pitiful. Seriously pitiful. Secondly, when you get a good one, it’s usually very good, and the store will usually stop selling it after a month or so.

But I managed a full year of that, and afterwards I was able to really tell the difference between good and not so good meat. I’ve never looked back.

So, out on the walk we were talking about how I’d now have time to go for runs during the day seeing as I’m working from home. And I decided that to try and keep the momentum up, I would attempt to run an achievable total of over 500km this year. That’s less than 10km a week, so it should be easy right? Yeah. Of course. Because as soon as I thought of this number, I then realised that I wouldn’t be running every day. And then there’d be times I was ill, or was away on holiday, or generally couldn’t be bothered. And living in Manchester I was expecting to lose quite a few days to the weather.

But it’s been okay so far, we’ve not had any snow yet, and only one icy morning. And the rain’s actually been holding off mostly. But how far have I actually run in January? One month, a twelve of a year and a need to have run a twelve of five hundred (44.67)? Well, I’ve not managed the 44.67km average, but I have so far done 33.74km which isn’t too bad seeing as it still hurts my lungs at times.

If you’re bored though, or just interested, I am keeping a more detailed running diary over at the h2g2 Running Club (yes we have one (sort of)) here: A87759256

Discuss this Journal entry [23]

Latest reply: Feb 3, 2014

Alternative Eurovision

I love listening to music, almost all sorts of music. Everything from listening to the wife practice her piano or violin through to a CD of a main stream massive rock band. I love seeing it played live, the energy and enthusiasm that the people on stage put into something that you can tell they obviously love, and the atmosphere in the audience as the crowd get swept away in the moment. I love sitting quieting, listening to some well performed classical piece, hearing the melodies and the intricate notes, and I also used to love bouncing away at the front of the mosh pit before I got too old. I love the shear wonder of the lyrics, how some song writers are able to twist the meanings and sounds of words to draw our attention to their messages.

But I don’t love Eurovision anymore. In fact, I don’t even really like it. I used to, I used to get excited about it, go to parties when the songs were chosen, and the all night kitsch fests that Eurovision used to be. But then something changed and I no longer like it. I think Eurovision sold its soul for the spectacle and it’s now a sad shadow of its former self.

It doesn’t matter what bands get put in, as long as they’re half decent you know which way the majority of votes are going to go before they’re announced. Terry Wogan famously took the piss out of this Eastern Block voting on air. An outstanding act with occasionally pop up, and will usually win. But they’re more often spectacles themselves. And no matter who wins, we’re never likely to hear from them again after a couple of weeks. I can’t help but think that the whole thing has now become a circus, a caricature of its former self.

And who are half these acts that get entered? In the last two years England has entered Bonnie Tyler and Englebert Humperdinck, an admission that they can’t come up with anything new that fits the bill and hope that some Big Names will work. Why? The previous year they entered Blue and that failed. Since Jessica Garlick came third in 2002 England haven’t been in the top three. But in those eleven years we have come last three times.

In short, we’ve been entering utter rubbish that does not reflect how good the music scene in this country is. I can go into just one pub in Manchester on a Friday or Saturday night and hear half a dozen really good bands playing a whole variety of music that is far better than the dross that gets put into Eurovision these days. And I can’t help but think that the money men and advertisers have taken over. And I can’t help but think that this has either already happened in other countries, or soon will.

So no, I don’t like Eurovision anymore.

But I used to, and I would like to see something take over from what it lost. A Europe wide competition to show off the best of the musical spirit and soul of the member countries. And so this is what I think should happen…

I’d like to see a website created where any singer or band could register and upload their song, they’d have to give their details, including the country they were in obviously. Then anyone else could register with the site, stating what country they were in, and having a geolocation-ip check to make sure they weren’t fibbing.

For the first round, I think that people registered with their site would be able to watch all of the videos / songs from their home country and vote on them. But they should also be able to see all the other songs, but not know what country they were from.

This round could get each country’s list down to the top ten, and the second round allows all the voting to start again to get the best song from each country. And again, you’d be able to see all the songs from countries other than the one you were in, but you wouldn’t be told what country they were from.

After that round, the best song from each country goes forward, and you then get to vote on all of the songs from the countries that you’re not in, but again without knowing which country they’re actually from.

I think that this way we’d be able to have a competition that was open to all the decent bands to enter, not just those that record companies are trying to promote and I think we as music fans would get to see a much better variety of bands. I also think that not knowing which country a band was from would help people vote more freely, without any preferences other than the music itself. But mostly I think this would help get back the life and soul that is missing from Eurovision.

Discuss this Journal entry [15]

Latest reply: Feb 1, 2014

Offline First – Is It Fundamentally Flawed?

A few years ago I started developing apps for mobile phones using something called PhoneGap. This was great because it allowed me to build them in html, javascript and css, technologies I already knew, without having to learn Java. The problem though was how to keep the data in the app up to date? The app in question was to be used inside museum, with their big thick walls that totally block out any signal, so it couldn’t just keep an open connection. The data had to be stored in the app, and be able to be updated if there was a signal.

So I started looking into offline storage. This is actually a lot more interesting than it sounds, as there were so many different ways of doing it, badly. However, there were also some methods that when used together did it right. They provided a really nice way to solve the problems of a website (which the app really was) being needed when offline.

And these are the basics of what’s now known as Offline First, being able to use a website even if there is no signal.

So what can we do for Offline First?

A website is made up of several things, and by looking at them individually we can see ways to make them available offline.

Firstly there’s the html, and by this I’m referring to the page templates rather than the content. This is what tells your browser what sits where, and unless you have a major redesign, this rarely changes. The content changes, but the layout doesn’t. A good way to store this offline is using a Cache Manifest, a file that tells your browser what files to store long-term. You can create all your layout files, list them in the Cache Manifest, and then the browser will grab them off the server, put them into storage and use them whenever you’re offline. It gets better though, when you are online the browser checks your Cache Manifest version number against that of the latest one online, and if it’s the same, it doesn’t bother downloading the files again it keeps using the ones you’ve already got. Reducing data and bandwidth usage and speeding up page loading time.

Next up there’s the furniture. These are the images that are used on the pages, rather than in the content. Things like header banner images, icons, logos, etc. They’re there across the site, and again rarely change. And again, these can be put into the Cache Manifest.

Thirdly, there’s the style sheets. The html tells your browser how to lay out the content, the style sheets tell it how to make the content look. What fonts to use, what colours things should be, that sort of thing. And again, these rarely change so you can put them into the Cache Manifest.

The last building block is the JavaScript, the code that tells the content how to behave. How to make menus appear and hide, how to make the page interactive basically. And once again, this itself doesn’t change much so can be put into the Cache Manifest.

By using the Cache Manifest, it’s possible to have your entire website, bar the content, sit offline in the device’s long-term storage and load very quickly without having to be online and go to the server for the files.

Then we come to the trickier part, the content. This does change so you can’t just stick it in the Cache Manifest and leave it there. Thankfully, the way that websites have grown to be developed over the years have given us the answer, we just have to change how it’s done.

Most websites store the content in a database, when you ask for a page the server gets the framework together, then queries the database to get the content to put into it. What we can do to make this work offline is use SQLite and store the content in a database on the user’s device. Now instead of requesting it from the server, we can use JavaScript to request it from the local storage. This is again quicker than accessing the server, and uses less data allowance or bandwidth.

In effect, by using both the Cache Manifest and the SQLite/Local Storage we’re able to turn the device into its own webserver with the website all stored offline. This is great, this is the ideal of Offline First. It doesn’t matter if you’ve got signal or not, you’ve got the website there on your phone or tablet. But the problem is, it’s a snapshot of the website, if the website gets updated your version will be out of date until you’re next online and able to resynchronise it.

Generally though, this out-of-synch issue isn’t really a problem. Most websites are pretty much static anyway, it’s only the community based ones that need to be synchronised and updated more regularly. For instance, Twitter would be kinda dull if you were the only person on it for an hour, and then you get all the updates at once. It doesn’t really encourage user interaction. But most sites aren’t really like that, most sites get updated once a day, if that, and that’s pretty much it, and even with those that do require more constant connection and updates can take advantage of the benefits of storing the assets offline, and using the local version as a backup if there is no connection.

So Offline First is great, it gives us websites when we have no signal and makes loading things much faster. The problem is though, I can see two fundamental flaws in it.

The first is the storage itself. Mobile device storage isn’t growing much, certainly not fast enough for the uses we put it to. The operating systems are growing and leaving less free space to store things on. And then the cameras are getting better and better, and the images take up more space, and we’re taking more and more images. Almost every social app now not only has the ability to take and upload photos, but positively encourages you to. Plus we’re using the devices for more and more, like watching TV and videos, which we download to local storage to watch later. All of these things take up more and more of the diminishing amount of storage available. So if we suddenly start storing all the websites we look at offline, we’ll run out of space very quickly. Website we want to be able to check when we’re in a tunnel or a fast moving train will be pushed out because the space was used up by a website you loaded by accident.

The second flaw is one I think is more serious, laziness. Without the constant lack of decent signal being a reminder to users that their coverage sucks, they’ll stop complaining to their providers and the infrastructure problem that has brought about the need for Offline First will be seen to have diminished.

The ability for a website to store itself locally should be a choice that the user makes. There should be a button, or a user preference that says “Yes, please use up my storage” and websites that don’t have that user consent should just not do it. But more importantly we should not use this as second best solution for a lack of infrastructure. We should not become complacent with a lack of progress, and allow the providers to become complacent.

At best, Offline First must be a method for reducing server load and speeding up websites, and only a temporary stop-gap solution for a lack of real-time data access.

Discuss this Journal entry [11]

Latest reply: Jan 31, 2014

Recipe Suggestion App Idea

One thing about being laid up ill, is you get time to think. So I’ve been doing that the last couple of days, and I think I’ve come up with a good idea for an app. You’ll have to bear with me while I explain the thinking behind this though, as well as how it would work.

Firstly, I’ve always believed that your body tries through cravings to tell you what vitamins and minerals it needs. Really fancy a fish finger sandwich? Perhaps that’s your body trying to let you know it needs some omega 3, that kinda thing. Unfortunately these cravings aren’t always real ones, but can often be nothing more than the effects of marketing. Really fancy a burger? That’s more likely you’ve heard a tune similar to one that ends with “I’m loving it”, or you’ve smelled something hot and greasy, and associative memory has kicked in. The problem is, not all our cravings are “natural” ones, so there’s a difficulty in filtering them out.

I also think that with care, the idea of structuring a diet around your natural cravings is a good one. Only eating what you crave isn’t good, because it would lead to a very rollercoaster diet, one day it’d be lots of Vitamin C, the next lots of Omega 3, followed by a day high in carbs, and another high in fat. This isn’t dieting, it’s binging. Also, I don't think that dieting should be about losing weight, I think it should be about making sure your body gets the right foods, and not the wrong ones.

So here’s what I’ve been thinking, if it was possible to create a personalised diet plan based on what your natural cravings are, that also made sure you ate everything else that you were supposed to.

And here’s how I think it can be done with an app. Firstly, you’d need to create a user account and profile which would be completely anonymous of course, and fill in a few details such as age, gender, height, weight, exercise routine (how much in general, not every exercise done) and dietary preferences such as vegetarian, vegan, lactose or gluten intolerant, etc. This would give the system a base to work from.

Each time you then had a meal, you’d be given a serious of flash cards of foods and ask which you would currently prefer. These would be chosen based on their high, medium or low levels of different nutritional values. From answering about ten of these “would you prefer fish and chips to burger and chips” sort of questions, it would be possible to know what the person is currently craving and then provide a range of recipes that cater to those wants.
For the first week though, it’d have to give a series of average recipes to reset the body’s cravings, but after that it should be able to provide the user with a steady supply of different recipes that help cater to what their body needs, and still works around what they want. Such as chocolate.

The app could also allow users to mark dishes that they particularly enjoyed, so it could recommend them again in the future, and take note of what combination of nutritional values and tastes they held, helping to make future recommendations better.

A further thing that it could do, is cater to multiple people in the same meal. Not everyone cooks just for themselves, most people don’t, so the system could allow two or more accounts to be attached for either individual or multiple meals, with each user entering their own cravings, and the person selected as the cook picking up the recipes.

All told, this isn’t an idea to try and tell people what they can or can’t eat. It’s an idea to try and give people a selection of recipes they can cook that provide the right nutritional needs.

Discuss this Journal entry [7]

Latest reply: Jan 18, 2014


Back to Pastey's Personal Space Home

Pastey

Researcher U45177

Post Reporter
Former Community Artist
Former Coder
Former Guru
Former Post Editor
Former Sub-Editor
Work Edited by h2g2

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more