Short Text Alert Notification (STAN)

I recently got a new phone, and a new place to keep it. My previous phone was damaged when I sat on it and realized that keeping it in a back pocket was a bad idea. I’m keeping my new phone in a belt pouch with a Velcro seal and it takes me slightly longer to get at the phone than it would if it was in my pocket.

And so I was, a few days ago, messaging people using SMS and then putting my phone away. Several times my interlocutors would send me short affirmative messages which I would have to read by pulling out my phone from it’s pouch, turn it on with it’s (not always first try) security and then read a message that says “OK” or “Yes”.

So I thought; why not have the phone change it’s notification sound for simple messages? A table of possible short messages which would then translate into a different notification sound and allow the user to understand a simple message without having to pick up their phone, unlock it and read the message.

This would certainly make sending short messages slightly more polite as it can seem aggravating sometimes to have to read short messages. Even though it’s not the fault of the sender really.

  1. The idea would require a customized default messaging app for android, or possibly system configuration, I’m unsure how notification sounds are stored.
  2. A research stage where short messages on multiple phones was collected into a corpus of English messages. Each classified into what it probably means.
  3. An additional corpus of emoji messages that can be easily converted into sound. Example a kissing emoji into a kissing sound.
  4. A restriction on the time between the previous message to/from the sender and the notification. Say half an hour. This is to prevent an affirmative messages which arrive a week after the last correspondence from confusing the recipient.
  5. A secondary research phase where a group of people’s would have the app installed (replacing their messaging app) and would self report if the new notification sounds made any difference over a couple of months of use.

This is a sort of imaginary plan, but I could see this being useful. But the only way it would be come mainstream is if it was adopted by Google directly into it’s own messaging app. A stepping stone towards that would be adoption of the modified message app into after market android such as the Cyanogenmod project. The stepping stone would certainly allow more data to be collected about it’s functional use out int he wild.

Another alternative stepping stone would be to approach a manufacturer or telco network. But quite often apps these layers install are seen as bloat-ware and it might be better to avoid that route if possible.

What do you think? Good idea? bad idea?

To Parent or not to Parent

I was reading “Leave them kids alone” in my New Scientist last week and thought back to discussions I’ve had with my dear sister about how unhappy or happy our upbringing was and what it might have done to our resulting adulthood.

This is a difficult topic because our childhood contained many horrors, much that was difficult and down right damaging. But speculating on which parts of it have made us weaker and which parts have made us stronger, is just as subjective to us as it would be from anyone from the outside.

Poverty is like that. Not all bad, but not at all good.

But getting back to the thrust of the book review above. The warning there is that modern parents are far too attentive to their children. They structure their lives too much and expect far too much from them.

As someone who came from a family that was too insecure to provide much structure at all, I have to reflect on this. Was my ability to hang out with friends until 2am from the ages of 13, good or bad? Was I ever given too much latitude? Probably.

But then I think to the if the goal is to make your child’s environment supportive and loving no matter what they do, seems to have produced the most positive of my friends and the most well behaved children I know.

I think kids are all different. They’re born different and they grow differently as they come of age and learn. I think natural development of brains mostly shakes out the stupid from most people I know. It might be that we’ve all had experiences that changed us, or I think, it might just be something human brains do.

So in a way, I don’t think we should be too anxious about our children. They’re going to be ok so long as they don’t get injured, or have severely negative mental issues. Letting them play will make them wider and more social individuals, and providing them ways to study will make them deeper and more capable. But only so much as the balance between nature and nurture will allow itself to be bent and even then I think most of the middle class in both the UK and USA have left that balance far behind.

My plan with violet, for as much as I have one at all, is to provide her with as much opportunity as possible without being disappointed if she doesn’t take to any of them. I can only keep her safe in a loving home and that must be my primary goal beyond thinking too hard about her personal development.

What are your thoughts? and do you think the article above should have mentioned Gen-X vs. Gen-Y like it does?

Review: goodnight Sweetheart

I’ve just watched the special for goodnight sweetheart (BBC Sept 2nd 2016). Goodnight Sweetheart was a sitcom/drama back in the 90s about a tv repairman (Garry) who finds a portal back to the 1940s during the world war London Blitz. This deeply flawed time traveler then flits back and forth between the 1990s and the 1940s with a woman in each era.

The show was and still is, very well written. The jokes are masterfully done and I appreciate how much the show dovetailed the two times.

** Spoilers below, but I think spoilers add to the experience **

The part I always found fascinating is the time travel stories. There’s one episode where he has to stop pearl harbor attacks, he fails, goes back to the 90s to discover everything changed. Apparently in his universe he was able to stop the attacks by pretending to be a British spy. There’s another where he finds a portal back to the 1800s by going the wrong way round and discovers that Jack the ripper is actually a time traveler from the 1940s.

So this is a sci-fi and a comedy. But it’s also a drama. The snarky biting tension between his wife Evon and him as his marriage falls apart, the pressure on his friend Ron who’s business and life is ruined by Gary’s self centered story. It’s the best possible balance and the three way split between funny, interesting and serious reminds me a lot of Back to the Future; where some quite complex (for mainstream) time travel is the backdrop for some funny shenanigans. The only difference is that Goodnight Sweetheart has more time over six seasons to develop and the drama is a lot more serious when it’s there.

I’m writing this so my friends in the USA can find themselves a copy and see if they like it too. It’s an off-brand British sci-fi of the best kind. Something I wish we did more of to be honest. But hopefully this series has enough seasons to really binge watch.

The new special which caused this blog entry was excellent. Although it’s not a good idea to watch it without having seen the original series. In fact the show should be watched in order as there’s a lot of layers that build on each other as the show progresses and even the jokes and often back references. For example Gary playing music from the Beatles during the war, and then everyone believing that the famous band stole all their hits from Gary.

It was very funny seeing Gary, who often would be the one to be ‘in-on-the-joke’ with regard to technology and time travel, be thrown into 2016, where he’s been missing for 17 years. He tries to use a public phone box, but they’re all not-phones (the gags are great). No one responds to him because they’re all on their phones and there’s just a ton of jokes at the expense of how things have changed since the 1999. The Adel song was quite sweet actually, it’s hard to imagine Gary learned the song in a single car ride, but I’ll forgive it because it fits so well for what he’s been through.

Well, if you’re interested in the show. Check it out now! and let me know in the comments what you thought.

Talking to Friends about things

I have a family who aren’t religious. Some of them might go to church, and if they do, they’ve never mentioned it. Others are spiritual, in that they search for ways to understand the world and try to come to grips with everything through a non-academic social philosophy. This is important for most people, but I think especially important to the poor and working class who quite often see their lives twisted capriciously by unknown forces.

On the other hand, I’m a skeptic. A rationalist who has done a bit of philosophical reading (enough to be embarrassing at least). When I was younger I was much more hard line about my rationalism, anti-god, anti-fairy, anti-mystical thinking. I was righteous as only a neerdy teenager with a degree in wikipedia can be. And it did put a strain on my relationships with family. Although to be honest, most of my family at pretty kind to all sorts of odd thinking and my rationalism didn’t seem mad or anything, just one of many colours available in the pallet of local family philosophies.

As I’ve aged and consumed more understanding about skeptical thinking and pro-social philosophy; the two have often been at an interesting contention. How to be rational enough not to get taken in by gimmicks and snake oil, but social enough not to sneer and demean friends and family who have taken to believe in those things.

Over the years I’ve learned that there is an important factor about humans that is important to understand… we take shortcuts. A lot of them. When I say I believe in science, science based policy or health care, or that I trust the data, this is a shortcut. I haven’t gone into all the data, I haven’t read the papers and done due diligence. I’ve trusted that the network of trust I have between the people involved and the ideas we share is enough that my modest reading with my small contributions in critique is enough to be far more confident than my personal data has any right to make me.

A peer group with a shared set of ideas that embellish trust. That sounds like a tribe, a community of people who have created a in-group. And being part of that in-group makes me feel things, positive things when we socialise and anger when I feel it’s threatened.

But peer in-groups are exactly what my ginseng drinking family and friends have too. Just like me, they take short cuts too. There’s a trust there between the people involved and the understand about how the world works. I might claim that it’s moving away from what is true to what is not true, but that won’t change the social dynamics. And just like me, they will feel good when their ideas are verified and angry when those ideas (or people) are threatened.

So how is it even possible to challenge notion when almost anything you say will result in either anger, frustration or a heavy rolling of eyes? I think it is possible, but only if one focuses on two specific points.

Firstly, the social aspect is important. The closer you are to someone, both physically and kinly, the better the chance is that your reasoning will be seen as helpful and not destructive. Having constructive conversations that aren’t about ourselves being verified as right, but about breaking the ideas down as a social activity between friends and then seeing what results are built back up, can I think go a long way to preserving friendships despite radically different views.

The second is to be stateless. By which I mean, you can’t go riding into battle all kitted out in skeptical pennant banners flying. Your ideas are yours and you shouldn’t stand behind a peer group while trying to discuss a contrary idea. That just turns it into a fight between your self-assigned clans. Which you can’t win, because your tribal leaders aren’t here to make peace or barter terms and you aint no hero ready to let your friendship fall on the sword of truth.

Besides, no one ever changed their mind because someone shouted the truth at them.

What do you think? How do you talk to people with drastically different perspectives?

Rebuttal: Crash Course Philosophy “Determinism vs Free Will”

This subject gets my imaginary goat every time I see or read it. It’s a subject that is presented to me as an iron-clad “this is how the world is” sort of fact and I just don’t see philosophy being that cut and dry.

The homunculus free will idea is surely dead and there is no separate non-physical part of us that’s directing our choices. This idea of a super-natural spirit injecting choice into our heads from outside the universe is the old free will idea that is very much defeated by the above video.

But, at the same time, the above argument about determinism requires that we are looking at the system of a person from /the outside/ perspective. Every time proof is presented, it argues that you can’t have free will because the system that makes you is deterministic. This sort of perspective fine if you’re doing science and need a non-subjective perspective to sort out what is objectively true; but this is philosophy and we don’t need to stick to those kinds of rules here.

From the subjective perspective we are physical beings with stored data in our heads. It is ours, we own it. Just like we own the bodies we control. Actually more than own, we incorporate it, we are it. So when the data in our heads “makes” us choose a thing, that data is /us/ making that choice. Even if the data is mixed with data from our sense of smell rendering a tasty oatmeal breakfast in our attention one morning.

The only way we subjectively wouldn’t have free will is if the data that causes the choice never becomes incorporated into the self and the choice is thus forced upon us from the outside. Information in this rebuttal is truly a thing of self and non-self. Information you are, and information you are not. And it promotes the brain further in importance as it stores a great deal of self referential information and both a sense of self and the conscious thought process.

This is fundamentally different from inanimate objects like balls rolling down hills, because they don’t have any information about their trajectory, it only becomes information when we measure it and incorporate it. That’s why we can predict where a ball will go and the ball can not predict where itself will go.

We can pick a harder problem for ourselves though. Imagine your body’s immune system; it’s a bag of information too. It “knows” about different threats and it chooses to fight things based on that information. It’s very deterministic, you can make vaccines to prompt it and prod it in various ways. But at a fundamental level, it is /you/. We talk about our bodies as if they are creatures we look after or meat machines we drive around in. But I think this way of talking obscures the deeper truth that when our bodies fight infection, it is we who are fighting that infection. How it chose to fight is not a matter for our conscious mind, there was no introspection on the data and the systems are simple when compared to the brain at least. But my argument requires that you have to be choosing to fight that infection, the choice is somewhat out of the control of one part of you, but not all of you. The cleaving of self into conscious self and “the rest” would need to be a mistake in order for this rebuttal to be effective and you must take ownership of all of you.

The definition of self gets to a deeper point I like to make about our own extent. I think we want to imagine freedom to mean that we are capable of separating ourselves from the universe, so we’re disappointed when we find ourselves inseparable from it. But just because we’re a mutable constituent of the deterministic universe doesn’t mean that we aren’t owners of that piece of the universe determining it’s path, our view of ourselves must take into account the subjective ownership, the self conjuring separation we make of ourselves from the universe that does create freedom within the determined system. Magic.

We’re always going to need to understand things around us in order to understand ourselves and why we make the choices we do. But I think it’s a mistake to drive so far to the inanimate automaton perspective that we choose to stop enjoying the universe’s wonderful roller-coaster ride that is life.

What do you think? Let me know in the comments below and my thanks to Hank Green and the team at Crash Course for delivering such good content for the mind.

What is Art? is code Art?

The musings of today’s Thought for Today on BBc Radio Four are often interesting perspectives that drive at something both personal and social. Today’s subject was the concept of modern art, it’s valuation and the way in which artists invest in the art while knowing little about it.

This got me thinking about code. You see code is something that requires an imense amount of creative thinking. Not just problem solving and puzzle mastery; but down right honest to god design and humble craftsmanship to boot. A piece of code must be more than just functional for the user, it must be maintainable in an ever changing world.

This requires that the code be readable and possibly even attractive to potential maintainers as a learning exercise. The best code is obvious where is can be and smartly presented where it needs to be clever. It must deliver it’s cleverness carefully and in reasonable chunks, much like a classical lesson in latin or a course of antibiotics. The code needs to cozy up to the reader and be as familiar with it’s patterns, syntax choices and variable naming conventions as a well worn pair of slippers.

Start using single letter names, odd abbreviations or inventing undocumented artifice and you’ll lose the audience. You’ll alienate the future from your comfortable seat in the past with a smug sense of converse hindsight. The arrogant developer assumes all things are known in the future and all maintainers are themselves or someone very much like themselves. And the trouble with people is, no matter how many you know, there’s always one strange outliers you’ve never met and one day they’ll be looking at your code thinking to themselves that you must have been enjoying your legal high quite a lot on the day you wrote /this/.

So what is art and how does it fit into this whole “understandable code” thought?

I’m not going to pretend there’s not seven billion ways to define art. But I believe art to be “the intentional communication through emotional language”. This means I consider stand up comics to be artists, I consider Fox news to be an arts show and music like rap to be one of the most powerful forms of art around today. But art can be bad like Fox, art can be good like Banksy and that doesn’t detract from it’s medium.

Art can be a failure when it fails to deliver the intended emotions like most modern visual art (to the general population anyway). We can feel disappointed in politicians for failing to be concise and factual, while at the same time marveling at their artistry for using their home spun bull shit to evoke the emotions they want in their audience. It’s wonderfully successful art, and a terrible education for the public. Not that art needs to be true, or that it needs to not be true of course.

Code in this narrowed definition of art, can be art. Sure as above we really want code to be artful as in crafted well; but we also could have code that intends to and successfully delivers an emotion. It has two ways. The usual way is that the code runs a game or some other intended visual art say. It’s the mechanism by which art is delivered and the code in there is part of the whole art.

I remember the radio head “Big Ideas” video that uses a specrum and hard disk array. That delivers art through it’s code is some interesting ways.

But I think most interesting to developers is how their emotions can be engaged by just reading code and repositories. I think source code poetry is a pretty well established way of making art out of code and I really enjoy reading some of it and running it. There are code flowers and other clever mechanisms that evoke wonder and joy as they are compiled and run.

But what of every day code. I think all our code evokes some emotion in those that have to read it and fix it. Mostly this is frustration and annoyance that you didn’t write it in a way more comforting to the reader. But there’s got to be scope here for making functional code that’s beautiful, interesting, passionate, lovely, hateful or just plain fun.

And not just for the user.

What do you think? Can your code be art?

Using PhantomJS with django for d3 testing

I’ve been working with phantomjs recently. It’s a javascript based system wrapper around a webkit backend. This allows one to make requests against a website and run the client side javascript, and make screenshots of the way the webpage would be generated including all css.

I’m using it to generate d3 graphs for testings whereby images of the webpage as saved and compared to expected images.

Of course I’m using python since my websites are all in python and usually django these days. So calling a javascript command and pointing it at a running webserver sounds like a really hard task. But actually django provides a live TestCase which runs a test web server which phantomjs can use as it’s source. It even includes fixtures and other test features which makes it fairly easy to put together the basics of what’s needed.

import logging
from subprocess import Popen, PIPE
from django.test import LiveServerTestCase

class GraphTestCase(LiveServerTestCase):
# Tests and fixtures go here as well as login via self.client (as usual)

def phantom(self, filename, **kwargs):
"""Run a phantomjs script and return True if it was successful"""
pre_args = []

# These cookies require the target js to support them.
cn = settings.SESSION_COOKIE_NAME
if cn in self.client.cookies:
kwargs['cookie-' + cn] = self.client.cookies[cn].value

args = ['--%s=%s' % item for item in kwargs.items()]
cmd = [self.script] + pre_args + [self.get_js_file(filename)] + args

process = Popen(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
out, err = process.communicate()
if process.returncode != 0:
logging.info(out)
logging.error(err)
raise IOError("Process did not complete: %d" % process.returncode)
return out

The above code should be well formatted, but wordpress (or this version of it) doesn’t want to use the right tags for code. :-/

New Labour

I come from a North English town, a family that strongly supports Labour and a community that believes in traditional Labour values.

The recent turmoil in British politics has me activated. I’ve been thinking about lots of things and people are probably not surprised to hear that I support Corbyn. In the same way that I support Bernie Sanders here in the USA.

But I’m also trying to be critical of all this politics, because Science based Policy is something we desperately need in many places. When Gove started tearing into the education system in the UK, the process was driven by arrogance. The assumption that Gove and friends knew better than any body and were ill prepared to try to experimentally define policy. They didn’t define what results were being sort, have any exit in place for a policy that’s failing and what kind of remuneration is available for policies that fail and leave people worse off.

I’m still very much a socialist in the European sense and I’ll continue to believe that people are mostly good, mostly do better working together and caring for people is not always a bad thing. But I want to be just as critical of socialist policy as I would of neo-liberal policy. I’d like to see that any assumption about what policy might work, might be thought deeply about and all policies not be held quite so inflexibly to heart. Because we might find that it’s just not doing what we think it is.

How strong would we be if we could fail without fear.