I’m testing out SweetCaptcha on all my sites currently. I like it so far, try posting and comment and tell me what you think.
We were forced to do an unexpected failover on one of our windows 2008 R2 clusters yesterday which hosts a clustered MSMQ service. One of the nodes blue screened following a windows update and so we went over the to the other node. So far so good, but the service didn’t start on the other node, it just sat in the status of starting.
As anyone who’s ever read any of my tech blogs would know, I absolutely hate random troubleshooting where you simply try restarting the service in question multiple times, or failing back or manually starting the services outside of the cluster manager or anything like that.
Therefore I wanted to do the following “Find out why it’s actually hanging” rather than make decisions without knowing this information. I know there are those around who would just go for a quick restart or reboot, but years in deep SQL Server disasters has taught me that this often a bad first step. If you want to know what a process is doing, you simply ask it, or trace it and then you may well get the information you require.
In this case, first question is
1. Is the windows process which represents this service alive – answer yes, so it’s doing something….
2. is the process in question using CPU and memory and are these fluctuating – answer yes, so it definitely appears to be doing “something”….
3. What is it doing?
It’s at this point that pull our your diagnostic tool set of choice and monitor the actual process. There’s no hard and fast rule for how you do this, but this case Procmon from sysinternals has to be your first choice. You have a process which you know is alive, you want to know what it’s doing so you need to trace it as you have no logs. Obviously you could also take a memory dump but that’s a bit advanced for this stage.
Next you need to decide what to monitor. Monitoring can be expensive, so you might want to form a hypothesis of what you’re looking for, and try to focus your troubleshooting. This might be dangerous as you might miss to collect some data, so there’s no definitive answer here, but I definitely had a hypothesis already in my head just from experience, which was that maybe the process was scanning the message that were in the queue when the failover occurred, to ensure their integrity. I don’t claim to be an MSMQ expert, but this seemed a reasonable way to go.
Therefore we attached procmon to the process, monitored its file activity and filtered this down to the drive on which we knew the physical messages were stored. Low and behold we saw the process chewing through the messages, opening, reading and then closing one about every 150ms or so.
From this point we then wanted to know how long it was going to take, as it seemed to be doing a reasonable action for a service starting (reviewing its current queue). Again this is just a hypothesis at this stage, as maybe this is wrong behavior for an MSMQ service, but this was the train of thought.
So using cmd.exe (as opposed to the expensive and dangerous explorer (dangerous when viewing directories with potentially huge numbers of files) we counted the number of .mq files in the directory in question and dumped them to a text file. We then correlated the procmon output to the cmd output to see what files the process was reading. It was simply reading the files in date order, so again this seemed to bear out our hypothesis.
At this point it’s a simple maths calculation to work out the number of messages divided by the average open time observed in procmon, and you can approximate how long the operation will take. At this point we decided to wait for this amount of time (about 20 minutes) before doing anything else. If at the end of this period we observed that the the process was still hung and doing something else, then we might need a new hypothesis, but as it was after this amount of time, the process was started and came online.
So in the end everything was OK (apart from the backlog this caused) but it’s worth noting that in this scenario if you have thousands of messages outstanding as we had, you’ll have a delayed start.
Upon reading afterwards we found out that our hypothesis was actually slightly incorrect, in that the process needs to read all the messages into memory, and that’s it’s not checking their integrity as I had guessed, but it just goes to show that structured troubleshooting is always the way to go.
Remember – don’t guess, don’t reboot, investigate. That’s my mantra (certainly in most production enterprise systems anyway!)
It’s happy Thursday today, as it’s code club day! I’m well into the Autumn term of code club at Ridgeway Primary in Croydon, but you can never talk about code club too much (as my friends who I went to dinner with last night would probably confirm!)
I’m reminded today that there are many schools both in Croydon and throughout the country that are desperate for volunteers. If you’re still wondering whether you ought to volunteer and whether you’d get something out of it, read the following feedback which are all direct quotes from the children who were in my summer class last term.
“I liked making the fish game because you can change their speed and size”
“Code club has helped me to learn to make different games and also to learn collaboratively with others”
“I like the fact that we all make a similar game but there’s loads of things you can change about how it looks”
“I learned how to make games and how they work”
“I just enjoy being on the computer. I’ve learned about how to use variables”
“I’ve enjoyed using variables in the code and making multiplayer games. It’s also been good to share on the scratch website and see everyone else’s games”
“I’ve enjoyed learning how to use the code and I’ll keep using it at home”
“I like bring able to paint new sprites, making the games using code and playing the games on the website at home with my brothers. I’m following in my father’s footsteps because he’s a programmer”
“I’ve enjoyed seeing how you make a game and how it all works”
Hopefully these comments will leave you motivated to want to get involved. The other main blocker that I find potential volunteers worried about is the technical requirements needed to be a code club volunteer. These are never as high as some people expect. I spent no more than an hour a week in preparation time and you don’t need to be a developer to teach a code club.
So get over to www.codeclub.org.uk now and sign up. Stop thinking, just do it, you’ll never look back.
I’ll be running the code club at Ridgeway Primary school Croydon again this year and we’re starting on the week after half term. Parents of year 6 have received an email this week inviting children to join the beginners level class. Hopefully later in the year we’ll also be running intermediate classes for children who have already completed term 1 with us. This will be great if we can then get multiple development level tracks started.
This is the text that the school use to advertise the class, i think it’s really well and succinctly put:
We are running a Ridgeway Code Club. Behind every app on a SmartPhone, every game that you play and every website you view, someone has spent time programming it. Code Club teaches children the basics of computer programming through fun and creative projects that also encourages problem solving skills. You can find out more at www.codeclub.org.uk
I can’t wait to get started again. Apparently the school have upgraded their IT suite during the summer, which should prove interesting. As for any event I run I’ll be sure to go into the suite beforehand to check out the equipment and ensure it all still works. It’ll be interesting to see whether they’ve upgraded to Windows 7 or not, as they were running XP when I was there before the summer.
I think I’ll probably be running with the old scratch as well again this term, depending on how the browser performance is with the new kit, and also how their new security settings are configured. I think this will be a choice for many clubs this year. I certainly love the new browser based scratch, and the web cam interaction, but many schools will either not have the hardware to support this, or would purposefully block it for security reasons.
It’s 48 hours until week 5 of my first term of code club and I’m just printing and collating the lesson plans. Now seems a good time to write some feedback about weeks 3 and 4 as I learned a lot (as hopefully did the children!)
First off it’s important to note that if you’re doing the fireworks project as week 3, you’ll need to ensure that you can upload some additional sprites and sounds from the scratch resources that you’ve been given. Depending on how you’ve had scratch installed at your school this could be a problem and one you should try to tackle in advance! I realised on the Wednesday night before the club and was a little unprepared. I took the extra files into the school on a USB stick but the way that scratch was installed stopped it from seeing certain network drives as browsable folders, which meant that we had to do a 2 stage copy, which involved getting all the children to copy files manually using windows explorer from a network UNC location to a scratch folder on their roaming profiles. Obviously each school will be different in terms of configuration, but this is definitely worth checking out. I’ve also just noted that this is required for week 5 as well.
In terms of the week 3 and 4 projects (fireworks and fruit machine) the classes ran very differently to the initial weeks. There’s a definite learning curve, and some of the children started to have trouble following the instructions explicitly to get the projects to work. None of the problems were unusual, but due to the increased complexity, a lot more compelx questions came up. Since I’ve got 17 children in my class, I started to fall behind with all the questions, as sometimes it was taking me a minute or so to debug or sort out each issue. This just goes to prove the theory that code club promote of looking to have a number of children under 12 in the club, to keep it manageable and give everyone a fair go. I’m lucky as I have a great teacher in the club to help me, but it’s still harder to keep up now.
What this has also meant in practice is that I’m having to be more creative in my plans, and last week I split the children into 2 groups, one group were left to code on their own for a few minutes with the project notes and the others did some coding with me collaboratively on the computer / projector at the front of the class. This allowed me to maintain 2 separate tracks and hopefully everyone still got something out of the club. As the weeks have progressed less and less children have managed to finish the projects. In itself this is not a problem, as obviously everyone learns at different speeds, but it means you need to think more creatively about how to give each child a sense of accomplishment at the end of the hour.
I was preparing for week 3 of my first term in code club, knowing that last week I’d given out a shared login for our club on the scratch website. I thought I’d have a check to see if there were people commenting or looking at the projects that we uploaded last week, wondering if the children were showing them to their friends and families for example.
There were some comments and this was great to see, but what was far more satisfying to see was that the children had obviously been using the login to browse other projects and some had been uploading completely new ones that they’d written in their own time during the week, some of which were using different techniques to those which we’ve already covered in code club! Now that was really fantastic news, as it means they’re developing the coding bug and experimenting and trying new stuff.
Once this type of attitude starts to permeate through the club then there’s going to be no stopping us! As ever I can’t wait for tomorrow to come round so I can get back in the classroom!
As I wrote about last month, following an initial presentation about code club to the year 5 assembly at Ridgeway primary school in Croydon, we’ve now started our first term of teaching and we’re 2 weeks into the course. I wanted to share some feedback about lessons learnt to date.
1. The assembly was a great idea, it enthused the children and got us lots of sign ups for the club. We offered 17 places (the total number of machines in the IT suite) and we got 35 applicants from about 90 or so children in year 5 (we only did the assembly for this year group).
2. 17 is a slightly higher number than code club recommend as ideal, but we thought we’d give it a go. I have one of the children’s teachers with me in the class, able to help out with questions, and this makes a real difference. We do get a lot of questions when we’re doing the exercises, but not more than we can handle. If I was on my own though, or if I didn’t have the teacher with me, this would probably prove difficult.
3. The children absolutely love the badges and the club signs. Just like they say on the website, it gives them an identity with the club. I made up all the badges with conference style laminated clips and they all love clipping these to different areas of their clothing! The signs are much the same and other children have been going past the room saying “oooh, what’s that, code club, wonder what that is”, which can’t be a bad thing either.
4. I have a perfect 50/50 split of girls to boys (OK I have an off number of children but as close to 50/50 as you can do with such). As a father of 2 girls I’m especially happy about this. All we need to do now is get this ratio up in the IT industry!
5. My classes are one hour long and I make sure I get there 20 minutes before to set up and confirm all the machines are OK and the projector for my machine is OK. I also make sure I do all the printing and collating of materials the night before and am completely ready to go as soon as the children arrive. The hour feels short and there’s no time to waste with admin!
6. In the first class I did an intro about scratch generally as per the code club materials and did some initial demos. This worked well and took about 30 minutes. I then let the children try the first project “Felix and Herbert”. This went OK, but we ran out of time before many of the children could finish. With hindsight, I’d have done more demos and interactive teaching with the children in the first class and then started the full project in the second week.
7. I use a generic school account on the scratch website so that all the children upload their work to the same place (prefixing their names on the projects). Although they’re welcome to have their own accounts, and some already have done so, it provides a nice view to the school of what we’ve achieved, all in one place. Check out what’s up there from week 2 projects
8. I let the children experiment. Straight away from minute 1 on the first class they were trying their own things, making all sorts of sounds and little mini programs and sprites and laughing and joking. I think this is a great thing! I’ve heard others say that you shouldn’t allow this and that you should make them stick exactly to the project lists and not let them deviate. I personally strongly disagree with this and I think the children like the freedom. I do ensure that when I’ve a key point to make I get them to gather round on the carpet do a demo, for example yesterday I talked alot about variables and why they were so important and key to the project.
9. Despite point 8 above, I do encourage them to use the code club project materials. They are fantastically well designed, and with the tick boxes allow the children to keep good progress notes of how far they’ve gone with the project. What I observed yesterday in week 2 was that although some deviated to do their own thing slightly (I actually told them they could) by the end everyone was really focuses on following the project notes anyway.
10. In week 2 I had a much better timed lesson. I did a 5 minute recap of week 1, then I did a chat about variables as they were a key point to learn from week 2, and we did some collaborative coding with the children using my teaching / projector machine to do the first page or 2 of that weeks’ project. Then I gave them all 40 minutes to do the project themselves. Myself and the teacher then just answered questions as they came up and everything went really well. 5 minutes before the end I made sure that everyone had saved and uploaded something to the website to ensure that they have something to show to friends and parents.
All in all I can already say that this is one of the most rewarding things I’ve done in many years, and if you’re thinking about volunteering you need to do so immediately! It’s completely fantastic and the quality of the code club materials is fantastic. I can’t wait for next week!
I did a talk this morning on code club at Ridgeway Primary school in Croydon where I’ll be starting up a new code club next term. The talk was a 15 minute intro to the principles of the after school club, with a demo of scratch and an opportunity for the children to ask questions. The talk went well I think and the children seemed keen. Here’s a selection of some of the questions that I was asked:
Will the games work on my ipod?
(good question and I actually had to check! Obviously the flash version of the browser one won’t due to the well documented no flash policy in iOS, but I had to check whether the java one would either. Initial experiments with a number of devices would appear to show that out of the box the answer is no, but maybe with a non-default browser you could get this to work. The same appear to go for Android devices as well)
Will I be able to write games as good as Modern Warfare?
(good question again – although as a 9 year old – should you actually be playing Modern Warfare? that’s another story obviously – my actual answer – not quite as complex as Modern Warfare no, but if you start to learn to program here then you can move up to other languages in future which allow you to do just about anything)
How long will the club last for?
simple one this – 6 weeks for one hour a week on Thursdays initially – we’ll do another run after that if anyone wants, in the Autumn term
Will I be able to do 3D graphics?
Interesting question – not directly no, but you’ll be able to do some pretty advanced graphics if you put the time and effort into it – again one for the future if you learn how to program generally I think.
So there we go. Now it’s time for me to do some prep before next month and see if I can get scratch to do games as good as an x-box , in 3D and work across all platforms. Or maybe I’ll just stick to whack a witch for the moment!
Following on from my previous post, I’ve had a meeting with Ridgeway Primary School and we’re planning to start up our after school code club in the first week of summer term, running on Thursday afternoons for an initial 6 week trial period. I am crazily excited and enthused about this and can’t wait to get started. I’m going into the year 5 assembly next week to meet the children and introduce the idea of the code club, before letters go home to parents offering the chance for them to sign up their children. Roll on April I’d better start practising my scratch skills.
I’ve signed up to run a code club at Ridgeway Primary school in Croydon (where my daughter goes) as part of a larger volunteer program which my current employer dotDigital are starting up in association with the guys at Croydon tech city. Hopefully this will start in the summer term. Watch this space for more updates and check out the main code club site if you’re interested…