Some of the most popular resources on create.withcode.uk are the bitmap image challenges, which help students see how black and white or full colour images can be represented by 2D or 3D lists of data describing the colour of each pixel.
A few people have asked if it’d be possible to have an offline version of the withcode python module that is supported by create.withcode.uk which allows you to quickly display a list of data as an image.
This could be useful for lessons or clubs where an Internet connection isn’t available or for use in other python projects.
With the trend towards ever-greater automation, it’s becoming abundantly clear that the development of rich digital skills is increasingly important for new generations. That’s a good enough reason in itself to encourage young people to get involved with programming, but as they get stuck into software development they’ll no doubt encounter a treasure trove of life lessons with lasting consequences on their character as well as their future career.
In particular, there are 5 invaluable life lessons that immersion into the coding world can rapidly drill into a young person’s mind, ultimately helping them live happier and more successful lives — so let’s take a look at them, and consider why they’re so important.
Being self-driven is tough but vital
For anyone used to being given specific direction when
learning a new skill (read this textbook front to back, answer these questions,
and you’ll get a certificate), starting out with programming can be quite the
wake-up call — it all owes to the essential spirit of experimentation and DIY.
Want to create a specific type of application? You’ll surely be able to find forums full of people who’ll give you pointers, but they won’t hold your hand and give you the answers. They’ll help you to find the answers for yourself, because self-management is a vital skill to develop.
As I type this, there are programmers across the world
diligently updating their skills and poring over documentation, and they’re far
too busy to lead you. The sooner you learn that you’re the only person who can
solve your problems, the sooner you’ll realise how empowering and satisfying that
is — no matter what you’re trying to
You need to use all available resources
Creativity and originality are rightly highly revered. Stealing
other people’s ideas through outright plagiarism is an awful thing to do, and
our egos drive us to achieve using our ideas
as opposed to anyone else’s. But there’s a slight problem with that:
originality isn’t really that
original. It stems from our brains collating inspiration and making some minor
tweaks. No inspiration, no breakthrough.
Programming imparts this wisdom very quickly through
libraries. It’s a time-intensive industry, and there’s zero practical benefit
in writing a chunk of code from scratch if you can find and repurpose established code for free
— you may need to provide attribution, but that’s completely normal. It’s a
very collaborative field.
An important lesson to learn is that the desire to be
original and solitary can drive people to waste time on things that don’t
ultimately matter. This is something that the ecommerce industry understands
well. Merchants speed up anything non-essential (using freelancers
for copy, buying
websites instead of building them, conducting widespread
competitor research, etc.), because part of being self-driven and empowered is
knowing when there’s no sense in starting with a blank slate.
Small actions can have big consequences
One keystroke goes awry during a late-night coding session,
it doesn’t get caught in review, and six weeks later a giant network goes down,
staying down for days before someone identifies the root cause. Anyone who has
ever thought “Well, it’s just a minor mistake, there’s no way it will
ultimately matter” would get quite a shock from trying programming.
But there’s another interpretation of this that’s
significantly more positive. Programming is something to be learned
incrementally, with knowledge gradually spanning languages, topics and
platforms, and that can be intimidating to someone new to it — but the concept
of tiny steps gathering into a lengthy journey is key to long-term contentment.
You can’t learn Python in a day, but you can learn something about it, and build on it in
the next lesson. Want to get healthier? Eat better today, and tomorrow, and the
day after, going one day at a time, and soon enough you’ll be feeling better.
Any goal you want to achieve should be targeted in the same way.
It isn’t hard work when you’re passionate
If you’ve ever heard some version of this statement said,
you’ll know what I’m getting at. Programming is not something that immediately
appeals to everyone. You can certainly understand why some might look at it and
conclude that it’s an arduous, frustrating and repetitive war of attrition.
Here’s the thing: it’s a matter of perspective, and only
when you find yourself researching a specific function in the early hours of
the morning do you fully understand that anything — not matter how reductively
you choose to define it — can be enjoyable and rewarding if you’re passionate
Never forget this, or that tastes naturally change and
develop over time. That way, you won’t judge things by how they sound but by how they feel to you (different people like different things).
One day, you may even realise (to your surprise) that you’re one of the
workaholics you always thought to be miserable, but working so vigorously
because you want to.
Flexibility is a remarkable strength
Anyone who claims to know everything there is to know about
programming is a liar and a charlatan, because there’s far, far too much out there for any one
person to know it all. Countless languages, standards, practices, libraries,
templates, and operational models — and each one subject to change on a daily
And as nice as it sounds to pick up a specific set of skills
and then profit from it for the rest of your life, that’s not how things work
in the coding world. Every professional is expected to keep up with the latest
developments, and periodically abandon large chunks of their knowledge to suit
broad industry changes. Specific programming knowledge is vastly less important
than the ability to obtain it as and when
This is a momentous life lesson to learn because it
essentially reassures people of two things: firstly, that they will never stop learning, and
secondly, that they will keep getting
better. The human ability to acquire new skills lasts about as long as we
do, and the more you embrace your adaptability, the better you’ll fare.
I made create.withcode.uk a few years ago to try to make it as easy as possible for my computing students to interact with python code examples on any device. I wanted to be able to step through lines of code, discuss how it worked then share it with students in a way that let them tweak it, debug it, extend it and share it without the hassle of creating user accounts.
I’ve been thinking a lot recently about how to boost resilience and independence for students in a Computing classroom, particularly when it comes to debugging.
One thing that I’ve noticed that makes a big difference to students is if they’re taught early on how to use debugging tools like breakpoints, stepping and watches.
Step: running one line at a time to check the sequence of instructions runs in the order you’re expecting
Watch: checking the value of a variable as each line of code executes to see how data changes
Breakpoint: telling your code to pause when it gets to a particular line of code so that you can see what happens next
Useful debugging features of an Integrated Development Environment
Stepping and watching variable values has been possible for a while in create.withcode.uk but yesterday I released an update to allow you to set breakpoints on any line of code.
The above example shows some python code which will draw some butterfly in random colours.
On the right of the screen you can see the value of each global and local variable. This is really useful for explaining how data changes as your code runs.
The red blobs next to the line numbers show two breakpoints on line 21 and 28. You can toggle a breakpoint on or off by clicking on the line number.
To run the whole code (or up to a breakpoint) in create.withcode.uk, press Ctrl + Enter
To step through one line of code at a time, press Ctrl + .
To run the whole code (up to a breakpoint or the end of the program) press
To step through just one line of code press
instead. Try out the breakpoints in the example below:
It’s a work in progress, so let me know when you find any bugs or if you have any suggestions on how to improve it.