New look for the blog
This is a 'minimum viable design' btw. I wanted to make things easier to read, that was the main thing. - Mobile styles now also fine, I had not realised I had not optimised those yet.
"Encouraging people to coach, whatever their skill or experience level, lets them see how rewarding and valuable teaching others is."
So here an overview of the presentations:
Next up was Nico Burns. He explained the benefits of writing modular code and the different methods available (AMD, CommonJS, EC Harmony). The presentation made perfect sense to me, and I could see the benefits of this approach especially in large projects. But when it came to restructuring some code that we were given, and make it modular, I struggled a bit. Luckily in the sample code we got, there was a folder with a solution included, and by transforming the original script into multiple files that depended on each other as in the solution, I could understand the structure and how you got there.
Mark Withers introduced socket.io. Web Sockets are one of the new HTML5 APIs, and not fully implemented in all browsers (for IE only from version 10). They enable a persistent connection between client and server as opposed to the HTTP request/response model. This is important for real-time interaction, for example in multiplayer gaming. Using a library like socket.io, you can achieve such a connection across browsers, as it falls back on technologies other than Web Sockets in browsers where those are not available. The practical example involved writing a script that sets up a server (using the Express framework from before), and binds two sockets to two different ports of that server. Next was a client-side script that enables the client to connect to one of the sockets and communicate through it, while receiving the web page through the other socket. In the example, the server sent a message to the client which was then appended as a list element on the page, among other things. The sample code is available on Mark Withers's github.
Socket.io was actually used in the next project, too. Lloyd Watkin presented his library XMPP-FTW, which he wrote to make it easier for developers to enable interaction with XMPP (Extensible Message and Presence Protocol) through a browser. XMPP is an open standard for real-time communication and mostly used in Instant Messaging services, but also in applications like Google Talk (recently replaced by Hangouts) and Facebook chat. An interesting aspect of XMPP is that you can have different 'resources' - which would normally represent different devices - and can set one as priority. Somebody sending a message to your account can either specifiy the resource they want you to receive a message on, or - if they don't specify it - it will go to the one you have set as priority. We got to try out XMPP by connecting to an XMPP system set up by Lloyd on his laptop. We each got an account on that system. Then we wrote some code to connect, and sent little messages to each other, logging them to the recipient's console. We also sent messages to a public messaging wall. Not everybody (including me) did get the code for that right so easily, but we got there in the end! You can find Lloyd's slides online, and here is XMPP-FTW and the pub-sub demo.
I won't write much about the last session of the first day, which basically consisted of watching Jack Franklin expertly refactor some jQuery code and explain it as he went along, including the use of unit tests with QUnit, running through PhantomJS. Great stuff. There are posts on his blog on both refactoring and using QUnit.
And after that it was off to "Pub.js" as the agenda stated, but not for me. I think it was better that way, my brain was at that point already quite frazzled without any drinks!
Also, there are "opinionated" frameworks that are quite prescriptive in the way you have to structure an app, and those that leave you more freedom. As I understood it, Angular is not very prescriptive. Maff has created a website monitoring app called getTestr with Angular and was showing us how to get started with building an app. At least some of the approach seemed familiar from PHP-based MVC frameworks. I had some stupid difficulties getting things to work though. I say stupid, because they were so obvious in hindsight, and I feel a bit sorry that I bothered both my neighbour and Maff with it. - There was a lot of typing things off the screen in this workshop, and I fell behind with this quite a few times. But I do think it is good practice typing the code yourself. Still I was glad that the speakers also provided the finished examples. (Here you can download Matt's code and presentation).
In the last session (read a great explanation of what we did on Dave's own website) we got to play with a Leap Motion device. Similar to the Xbox Kinect, it detects shapes and motion through optical sensors. Dave Taylor, who presented this session, had brought a number of these devices and people could work with them in groups of two or three. You can see a schematic and artful representation of your hand on the screen, and the software can also recognize a hand and fingers as well as certain gestures like swipe, circle or a keytap. (It can not always track individual fingers, and they seem to appear and disappear a lot of the time.) One interesting thing is that it also calculates the centre of a sphere that would fit in the palm of your hand.
So, that was it. It was an intense and enjoyable two days, and going through the sessions again (I actually looked at the code of all of them where I had it!), I find it has been really useful to me. I wonder what will actually come out of it. I have in any case at least one project where I want to try things out, but I am sure it will benefit my work in general.
Thanks to everyone who made this event possible, especially Andrew McGregor and the speakers!
This is going to be more of a diary entry than any thought-through blog post. But I feel a massive urge to write, about so many things. And yet seem to be suffering from some kind of mental congestion. Where I read so much, fiction, non-fiction, books about web dev, but seem very little able to then communicate any of it, or use it in a creative way. Anyway that is what it feels like. But while that doesn't feel great, it's more and more the reading itself that I find unsettling. Not the books I've been reading, but the papers.
Journalists can give you the creeps (think "phone-hacking"), corporate data-hunger can give you the creeps, but governments (not only one, but a string of them!) starting to behave in the same and possibly worse ways… I can't even find a word for that. It becomes all the more perplexing, because we are all just so comfortable. What do I have to complain about? Maybe nothing yet, personally, but it does already affect others personally, and by the looks of it, will affect more and more people until there might be hardly anybody left who isn't affected.
I say "by the looks of it". Is it the media exaggerating, manipulating? One's own mind painting things more bleakly than they actually are? Do we know all the relevant facts? If there are things that resonate with what you know about the Stasi, Fascism, Nazism, is that a red herring? At least here the press can still report, right? What about all the despotic regimes, the atrocities you hear about. Are they not worthier of your outrage? But this is no excuse, and the reporting is already not totally free anymore.
And then, in some ways I do actually feel personally affected, because a government that orders the "symbolic" destruction of hard-drives to flex there muscle has for me lost every credibility and trustworthiness and I don't feel at all they represent the people they are meant to serve. I feel outrage about how it will affect many people on a subconscious level and that again most likely includes me. And quite a few journalists. You can say what you want, this is an intimidating act, it has zero to do with assuring security, but all with creating a shock effect.
Can we do anything to stop a gradual erosion of our freedom? Can I do anything? I have to say I don't know. I have never felt a very political person. But a lot of people will say that of themselves, and that is exactly why it is difficult. We have just been so comfortable and we are conditioned to worry so much more about status, about the things we have and we think we need. Maybe it is just what humans are like anyway. And we, in the Western world, just happen to have come to this point in our history where things start to go awry. Or maybe they have for a long time already. That's the thing, where do you draw the line? What does freedom actually mean?
Here is something I really wanted to write about. Two books I have read recently, quite different books, but both, in a wider sense, about how the mind works. Both, in my view, with some implications for individuals and society. I wonder whether I will be able to write much about the first one, as I finished reading it a few weeks ago.
It is called "The Emotion Machine", written by Marvin Minsky in 2006. It is kind of a sequel to "Society of mind" from 1986, about which I have written in another blog post. And like last time, I stumbled across it in my parents' house. So, let me see what I can retrieve.. Ha, this is actually a topic in the book! How do we retrieve memories. Anyway, these are a few things that bubble up. Some of this might be a bit inaccurate, but it is about ideas (that is how the mind works…):
This is a random list. There is much more to the book. And it gives a fascinating insight into how the brain might work. It is humbling and awe-inspiring at the same time. We are such intricate, ingenious machines! We are just not able to command them very well (or not at all?). Especially not always to our own benefit. Perhaps this is a result of my age, but I feel more and more that we are really a product, of our genetics plus all our experiences plus society plus the people we are close to plus individual circumstances and so on, rather than these largely unchangeable beings that have a personality. But of course you still move and live "as if", it is what we have learned to do, and it is our frame of reference. So while it is fascinating to follow Minsky along, in the end you cannot keep looking at things this way. Unless you worked at a "Thinking machines" lab I guess, then you would probably switch into this mode for several hours each day! In any case, we need to use the "I" as a model in our everyday lives.
One thing I took from this book for myself is that really, if we want to make any changes to our habits or ways of thinking, we have to do it in a very indirect way. This probably varies for different people, but my mind pretty much has "a mind of its own", I find it nearly impossible to order it to do anything. Any plan I make seems doomed to fail, unless there is an outside pressure, like I have an appointment with somebody. I also was reminded how powerful meditation can be, and I would so much like to do more of it again. But ironically, this is one of the things I find impossible to tell my mind to do. As is writing for that matter, and I cannot tell you what a massive relief it is to find myself writing now. Massive, massive, massive.
As I said, I feel there are implications for society, too. It might be difficult to put this into words. Basically, I guess at the level of society you find the same patterns repeated as in our mind. And in fact, Minsky's 1986 book was called "Society of Mind", it works in the other direction as well. Our mind is a society of resources that work together. Likewise, our society generates an Übermind which goes in the direction that the most powerful resources (or agents, I think that might be a better term actually) determine it to go. And sadly, you have a mixture of "bully-in-the-playground" and "old boys club" phenomena here, in our current society. The ones who shout the loudest and punch the hardest, get the attention. And decisions get made by the ruling classes, and a shocking number of times in secret it seems. It is an interesting question now, how we can make the more thoughtful and sensible parts of that Übermind be heard more. Giving them a voice should be engrained in the structure of our societies, and that is what constitutions and the law are meant to do. Yet it looks like the power of those agents that keep things in check, aber being eroded, and that is scary, I can't help saying that again.
Also, those in power employ certain tactics to manipulate the public. I just hope - and believe - that they, too, often get things wrong in that respect. Whatever psychological knowledge they might have, they will not be able to steer the collective of our minds, as much as they would like to.
On to the second book. I actually stumbled over that, too! In a motorway service station, in the over-priced WHSmith shop, of all places. The book is called "Daring Greatly", subtitle "How the Courage to Be Vulnerable Transforms the Way We Live, Love, Parent and Lead". Quite a mouthful, and I have to confess that I normally have an aversion to titles like that and the books they normally adorn. But there are exceptions. And the exception here is that it is written by Brené Brown who has given one of my all-time favourite TED talks, and that upon brief inspection of the contents, I just really wanted to have this book.
I read the book in a single day. My most concise description of it would be: It is telling the truth. The truth that lies at the heart of our experience of being human. This is the other side of Minsky, this is the "illusion" that the mind creates, which is, for us, the truth we live in. It is telling this truth in very pragmatic terms, with only passing references to such things as mindfulness (her therapist tells her: "Less thinking. More feeling." Something I can fully subscribe to). Based on qualitative research. Not quantitative, thankfully! One of my pet peaves in TED talks, is the total straightness of curves and absence of standard deviations in the "statistics" they show there. So, what is this truth. In short: To be able to live life to the full, we need to allow ourselves to be vulnerable, to be seen. We also need to be prepared for some (sometimes immense) discomfort and pain. And we need to build up something Brené Brown calls "shame resilience". As a good summary of her conclusions, just watch the TED talk.
It is not at all an easy feat. In fact, BB herself says that she has created a roadmap with her research, but is not necessarily a good traveller along that map. At the start of her journey, she states, she was "2 for 10" and is still not always able to embrace the hallmarks of "Wholeheartedness", a term she has coined for the ability to live life to the full and with authenticity.
In any case, the themes of this book are really important to me. Shame is something I have felt a lot, especially in my earlier life. And it has this tendency to self-perpetuate, and to operate in silent. So, kudos to Brené Brown for dragging it out in the open like that and give it a good "beating". I say, it is important to me, but it should be to everybody really, including a lot of people who are not even aware of how shame, fear of failure, illusions of scarcity, shape their lives. I wish this idea does in fact spread and enter the collective unconscious, without ever becoming too dogmatic, that is always the danger.
To conclude, one quote from the section on parenting. That chapter had a bit of an eye-opening effect with some thoughts I had not previously come across or forgotten. One thing worth noting is that your actions and the way you present yourself to the world, has a much greater influence than anything you say to your child. This is again something I believe to be absolutely true. And this. It seems an important message in our safety-obsessed times of helicopter-parenting:
"I no longer see rescuing and intervening as unhelpful, I now think about it as dangerous. Don't get me wrong — I still struggle and I still step in when I shouldn't, but I now think twice before I let my discomfort dictate my behaviours. Here's why: Hope is a function of struggle. If we want our children to develop high levels of hopefulness, we have to let them struggle. And let me tell you, next to love and belonging, I'm not sure I want anything more for my kids than a deep sense of hopefulness."
I cannot exactly remember when the idea to set up CodeHub was born, although it probably happened in several steps. It definitely came out of some conversations I had with my friend Gicela. We thought it would be great for people in a similar situation to us, working from home and just for themselves, to get together and learn from and with each other. When Gicela came across the Hackerschool website, that served as an inspiration, although it is very different from our project in terms of scale and scope. - And so, two days ago (on Tuesday 2 July 2013), a group of five independent web developers met up at The Big Chill in Bristol for a morning of coffee, tea and code. I think we all agreed that it worked very well. It was good to be in this small group to start with, and it was a good group. We almost felt we don't even want it to grow!
But that would of course go against the orginal idea of a place giving developers who work on their own the chance to learn and collaborate with others. In any case, I doubt that we will get a sudden influx of hundreds of people. If we slowly grow that will be good. I could also imagine having a core team and then occasionally setting up bigger events.
So, if you wonder what this is all about, here is a brief outline of ideas we've had:
There seem to be quite a few initiatives around the world that aim to teach people coding or other technical skills, which is great. I particularly liked this about the Core Values of Open Tech School. They are pretty much what I hope CodeHub to be about.
So, I am glad CodeHub got off to a good start and it will be interesting to see how it develops. We meet up once a month, but plan to be in touch online between meet-ups. Let's see what we can build!
If you are interested in joining us, please get in touch. Our next meeting will be on Tuesday, 6th of August at 10 am, again at the Big Chill. As mentioned before, we will also be looking for mentors. If you would like to try giving a talk about a certain topic, this is the chance to do it in front of a small group, rather than for example, at the Bristol Skillswap. That, I can testify, can be very frightening!
So it's now two days since the Skillswap about Responsive Web Design in Bristol. I am happy to have been one of three speakers and, having just listend to the audio, I think it was kind of okay - which hadn't been my initial impression, so I'm glad there was a recording. I just thought I'd add some thoughts, some of them regarding what I talked about.
I am always amazed how these talks, whether I'm a listener, or as this time a speaker, make my mind buzz. And that includes the chat afterwards in the Watershed bar where this time we had to be kicked out at closing time. It is hard to pin down what it is, but I guess it has to do with sharing an interest, being excited about the same things, talking a common language in a sense. I have not always been totally sure I did actually belong to that "crowd", but I have gradually come to realise that there is no point even asking that question. If you are interested, you go and listen, you belong there, and that's just it. (Which doesn't mean it might not occasionally be difficult, as an introvert, to talk to a bunch of other introverts)
I would say the event was really successful, but in a pretty unplanned way. There had been various health issues that prevented things from running smoothly. Pete Fairhurst, who was going to talk about how he made the Samaritans website responsive, had to pull out shortly before the talk because of illness. Keir Moffat who gave the second talk, on "Responsivability", had an upset stomach that made him feel pretty unwell, and I didn't even mention that I had just recovered from two days of headache and also having friends to stay (luckily I was feeling well on the day, despite zero sleep - but that's not unusual for me, in fact I often thrive on sleeplessness). What really saved the day was that, at crazily short notice, Bonny Colville-Hyde stepped in to do the third talk. It was about content, called "You can't polish a turd" and was an absolute hit. Bonny answered questions for longer than her actual talk was! (She also increased the number of women who have so far spoken at the Skillswap - New series by 100%, which I think is a welcome side effect.) I admired the relaxed and funny way Bonny delivered her talk, without slides, and I was also struck by how it hit a nerve like that. And it makes sense, if you think how important content is. Both a lack or excess (especially if it's bad quality), can hold up a website so much. And having the ability to make people rethink, and rewrite!, their content, — "you will not always be liked" —, amounts to having magical powers.
The content topic also fitted in quite well with the "Responsive website design" theme, as it becomes really important to get your priority content spot-on when you serve a site to mobile. So while I still find it a shame that I didn't get to hear Pete talk, this was sure a good alternative.
To conclude, just a few "Addenda" to my talk. I felt afterwards that there were quite a few aspects of responsive web design that I did not mention, which was probably inevitable due to a lack of time. After all, there are whole "responsive days out". I should have added, for example, that in preparing my talk I had taken the opportunity to establish a process for how to create responsive websites. Moreover my approach is only one way of doing things. But I think exactly that is what every developer, and every agency should do really. Set some time aside to do one project as a way of trying out responsive design techniques. There should be some extra time and budget allocated to that, like for example you do with team-building.
We didn't talk much about the design phase, but in the discussion it transpired that most people so far aren't receiving designs that are adapted to responsive, or if they do get them, they were full-blown separate designs for different devices, which in the end is not that helpful. One thing to mention here is Style Tiles by Samantha Warren as well as style guides.
I talked about using design patterns and writing modular CSS. One example from my own exmaple site which I built for my husband is Nicole O'Sullivan's media object. I used this for the media on the videos and podcast page. The same set of style declarations is used for different elements (video containers, podcast containers, and inside podcast container the image and title). The way I did it could sure be improved, but it was still - for me - a new way of looking at things and implementing design.
Just a quick note about Internet Explorer. I mentioned it at several places in my talk, mostly in conjunction with "this is not supported by IE" or similar. What I meant here is of course Internet Explorer version 8 or below. I could also mention here that the fascinating ":nth-child" pseudo-element is not supported by those either, but there is an easy way to recreate this functionality with one line of jQuery.
I might blog some more about things I do on the Matin Durrani website as I go along, as it is a work in progress. I hope to use some more responsive techniques, and I also want to do something about preventing videos and podcasts from being loaded automatically (as they are now). But that's for another day.
For now, thanks to a great audience and speakers, and of course to Tom. It was a great experience being at this Skillswap.
This is not really that difficult once you know it, but I had to combine instructions from several posts and fiddle around a bit, so I thought I'd write down the different steps. This is assuming you have an external screen attached to the Raspberry Pi to do the configuration.
To do this, you go to system settings. There you will have to turn the switch icon on the top right to "On". You will also need to connect your laptop with an ethernet cable to your Raspi to see the IP address.
Start your Raspberry Pi, log in and then do the following, using an IP address that is the same as your laptop's except for the last number:
$ sudo ifconfig eth0 10.42.0.2
You can check that the IP address has been assigned like this:
$ hostname -I
(If you do this before assigning an IP address you should just get a blank line)
Once you have done that, you can "ping" your laptop with the laptop's IP address. Stop this process with Ctrl+C once you've seen some responses:
$ ping 10.42.0.1
The IP address is only assigned for this session. There are some instructions here to assign the IP address at boot - but remember to replace the command.txt file by the original again before you try updating your OS through your home internet connection. It won't work otherwise (at least that's what I experienced!): http://pihw.wordpress.com/guides/direct-network-connection/
On the Raspberri Pi you install the Tight VNC Package :
$ sudo apt-get install tightvncserver
On the laptop, install a VNC viewer, for example
$ sudo apt-get install xtightvncviewer
Now you can open a terminal on your laptop and ssh into your Raspberry Pi:
$ ssh firstname.lastname@example.org
Then run TightVNC server from your terminal, and start a VNC server (the example below starts a session on VNC display zero (:0) with full HD resolution):
pi@raspberrypi ~ $ tightvncserver
In another terminal window on your laptop, start the VNC viewer with
$ vncserver :0 -geometry 1920x1080 -depth 24
$ xtightvncviewer 10.42.0.2:0
That's it. Most of the instructions in this post are taken from elinux.org, which also tells you how to creat a vncboot service in /etc/init.d. This is quite handy, as then you can just type the following to start the VNC server with your preset preferences:
$ sudo service vncboot start
There is this vortex of thoughts going through my head. I wonder if I can make some sense of it all by writing it down. If it just wasn't so coooold. I am shivering while I am typing this. One thing that will be especially difficult is separating the personal from some general observations. That is part of the problem I fear.
So many things are going well, and I am happy. I spend a lot of time with the children, especially now during the holidays. And I've kept catching myself thinking how lovely it all is. We went to the zoo with its impressive dinosaurs on show, and I shared in the children's excitement of the underwater view of a seal playing with a ball. There was the duck that dived right to the bottom of the tank, leaving a trail of pearly bubbles in the water. Little beautiful things that I seem to be able to enjoy much more than I used to. More excitement at the Explore Centre, and today at Funderworld on the Downs. (This I had been dragged to two years ago, and discovered to my surprise that it really was fun - I had always enjoyed these things as a kid). And there is the children's daddy, who is also the best husband imaginable. And I, well I think I'm a good enough mother, and wife as well (though not a great housewife).
Work is going reasonably well, too. I have worked on three different projects this week, and got everything done despite the holidays (okay, I reversed day and night pretty much, staying up till 4 or 5, then sleeping in, but it's okay for a while). My clients seem to be happy. True, for one of the projects, the crunch is going to come now, as more users will be invited to put their profiles on. Hopefully it will go okay.
Arrgh no, this is really difficult to write. So, basically today I responded to this post on my favourite technical mailing list. I put myself forward to do a talk. The way I did that was probably pretty dumb, I didn't do myself any favours. But there's a lot else around it that disturbs me a bit. And it is so difficult to divide it into what is me, and what is the others.
There has not been a woman talking yet (in this new series of talks at least). Once I got this email "Yeah, we've got to get you up there, we haven't had a single woman speaker yet" and I replied "I hope I have something else to offer apart from being a woman".
Then the remark "Really anybody going up there...has to be applauded soo much" - I don't know if those were the exact words. Something like that. I wish I remembered the other thing, too. Something along the lines "It is not really about having some great knowledge, rather talking about your experience" But I get a distinct feeling that somehow I am an exception to that and I musn't talk. I don't want to go up there to be applauded. My main motivation is this: a, I'd really quite like to contribute something, especially as I've benefited from other talks or from direct help. b, I know of at least two women who, like me, often don't feel comfortable at technical meetups, and I thought this might change that a bit. And this particular topic I really do know something about, so I thought I'd give it a go (despite the somewhat 'superstar status' of the other two speakers; I am just foolish enough to do that, and well, really I thought it would be a good challenge to try and deliver something that only half lived up to what they did)
Would I have something to contribute then? That is the question. A question that unfortunately can't be answered unless I actually did speak. There is this other thought I have, that people are trying to protect me, because they think I don't get how limited my knowledge is, and would really embarass myself. - I think I do know how limited it is, but you have to start somewhere. In any case, and of that I'm quite sure, I obviously don't fit in. If you look at what has come before, yes, I probably don't. Mostly highly technical, specialised people in business or agency settings. There's also a predominantly male culture. This is kind of a by-product, it is not that anybody chose it to be. Still a shame I think, but if the people involved are happy with this, I guess they should carry on with it.
All this does have one good effect, I will finally stop moaning to my dear friend how excluded, not-belonging or inadequate I feel. In fact, I think that all stopped when I left Twitter. Astoundingly it had a really positive effect. I do miss some people, but I already missed them when I was still on there.
In a curious way this episode has made me feel more positive about myself and my coding skills.[edit 29.3.: No, it has not, it makes me feel like a complete idiot; but again just so grateful for husband of mine, who makes me laugh about that, too.] And I'm looking forward so much to when Gicela will be back and we can start our own group.
[edit 10.4.: It looks now as though I will give a talk. Now it's up to me to deliver something worthwile :)]
As I could not find the solution to this anywhere online, I thought I'd post it here. Curiously we had already been sent a replacement figure (but the wrong one!) when one of the Activision support staff suggested this little trick.
So, if the game fails to recognize a figure that was placed on the "Portal of power", what you do is this:
You place the faulty figure on the portal and wait that the error message comes up on the screen. Then you minimise the game by pressing Ctrl + Esc. After that, you pull the portal's USB cable from the PC, leave it for 20 seconds, then plug it back in. (All the while you leave the Skylander on the portal). Maximize the game to full screen again, and the Skylander will appear.
So now my son has a working Trigger Happy and in addition a Terrafin. I think Skylanders (birthday wish, and apparently the "best present ever") is a great game by the way. Both children love playing it, and it's nice that you can have two players, either in battle mode or co-operative mode.