Giving something back – ICT Club


17 July 2013, by

Since I started at Softwire, I’ve seen and written thousands of lines of code, but below is probably the piece that I’m proudest of being involved with:

import random
personscore= 0 
computerscore= 0

while (personscore + computerscore) < 5:
 person = raw_input("(r)ock, (p)aper or (s)cissors?") 
 print "person chose " + person
 computer = random.choice("rps") 
 print "Computer chose " + computer
 if (person == computer): 
  print "Thats a draw" 
 if (person == "s" and computer == "r"): 
  print "YOU LOSE computer wins" 
  computerscore += 1 
 if (person == "s" and computer == "p"): 
  print "you win" 
  personscore += 1 
 if (person == "r" and computer == "p"): 
  print "YOU LOSE computer wins" 
  computerscore += 1 
 if (person == "r" and computer == "s"): 
  print "you win" 
  personscore += 1 
 if (person == "p" and computer == "s"): 
  print "YOU LOSE computer wins" 
  computerscore += 1 
 if (person == "p" and computer == "r"): 
  print "you win" 
  personscore += 1

print "Final score" 
print "Computer = " + str(computerscore) 
print "Your score = " + str (personscore)

if (computerscore &gt; personscore): 
 print "COMPUTER WON !!!!!!!" 
if (computerscore < personscore): 
 print "YOU WON !!!!!" if (computerscore == personscore): 
 print "DRAW !!!!!"

The average coder will probably be able to pick a lot of holes in this code – a quick glance suggests that it’s quite repetitious, expects non-intuitive user inputs and is also quite hard to add new features to.

But despite all that, I’m proud of it. Why? Because it was written by someone who was 10 with the helping hand of a few Softwire developers.

This is a continuation of the ICT club Softwire have been running in a local primary school aimed at 8-11 year olds. Last year, the participants made some amazing games of their own creation in Scratch (a child-friendly language made by the guys at MIT). This year we have taken a different tack and taught them more about theoretical aspects of programming using case studies like the one above.

This ‘rock paper scissors’ game was used to show an example of how to use an “if” statement. Other recent examples have included ‘guess the number,’ to introduce variables, and Pong, to discuss “while” loops. These are concepts which represent how computers treat things in a perfectly logical manner to those with inside information – which isn’t necessarily how humans will expect them to behave.

The professional involvement allows the kids to focus on what they’re learning when it comes to computer logic rather than getting caught up in the syntactical problems. And I think both ourselves and our protégées are getting a lot out of it!

The most important thing the kids are obtaining, in my opinion, is an enthusiasm for coding. Technical knowledge will come or go if they move into a relevant job; but providing a child a genuine sense of appreciation and awe that they can make a computer do something will stick with them through their life, and give them the opportunity to use computers without fear in their next school and in later life.

It’s easy to be cynical and argue companies support such schemes to encourage the next generation to enter their field, pre-trained and pre-enthused. The attitude among the Softwire crew, however, many of whom give up their Monday afternoons each week, is that we simply love helping the young ones find more of their talents and realise just how capable they are, even if they don’t know it.

From my point of view, working with these children is helping me as well. I’ve been working with code on various levels for upwards of ten years now, although only one of them professionally. It’s hard for me to remember how I approached computers before I got my head around coding and logic. Seeing how people with a naive approach to computers will read, write and parse code has helped me realise that we need to be much more careful about how we present code to non-technical clients.

This scheme is an excellent one that many in the company hope will continue (and if possible, expand) since it is definitely mutually beneficial. I’d recommend anybody, primarily in software but in any field, to give something back to those interested in your field. I guarantee you will almost certainly improve your own ability whilst doing so.

Tags: , ,

Categories: CSR, Softwire

«
»

Leave a Reply

* Mandatory fields


1 × = two

Submit Comment