Category Archives: Uncategorized

Talk is Cheap?

Just thought we would put this together in response to :

TalkIsCheap

Feel free to adapt and tweet via @3rdMillLearning 🙂

 

Advertisements

Simple strings and variables

Hello again, today we are going to be covering the fundamentals of simple strings, and manipulating them so that they display the contents of a variable.  We will also briefly examine the input function.  Let’s take a look at the code:

variables1-code

So here we are printing, or displaying on the screen more accurately, the classic newbie phrase “Hello world”. This is a string, which means a list of alphanumeric characters within quotation marks.  In IDLE they are coloured green. These can be single quotes or double, but try to stick to one format consistently.

We are then being a little more sophisticated because we are introducing a variable.  In a nutshell, a variable is a section of memory that contains something.  It can hold pretty much anything, and it is the most fundamental element of programming, because as the name implies, it is changeable – as a programmer, you can assign a value to it (in this case, and input command) and then you can change it at a later date.  For this tutorial just think of it as a container.

So here the input function (functions are special commands in Python that do key things, and in IDLE they are coloured purple) does a very simple thing.  It displays the string “What is your name?” on the screen, and it waits for you to INPUT (type) a response.  That is it.

The next line then PRINTS (displays on screen) the thing that you typed in when the INPUT prompted you.  What happened there?  The results of what you typed in were stored in the name container (variable), which means that when you referred to the variable in the following print command, it looked inside the variable, found the data you typed in from the INPUT command, and then displays it back to you.  Nice, clean coding.

As we can see, and as is often the case in programming, there are multiple ways to achieve the same goal in coding.  Here, the + symbol adds the contents of the variable to the string.

You can also use a comma to indicate that you want to add the contents of the variable to the string. Note how the comma also puts a space in the text as it is printed.

Finally, this is a little more complex, but you can use another technique to add the variable contents to the string.  This is using the format method.  This is in fact the more sophisticated way in this case to add the variable contents to the string, which is why it looks more complicated.  You can do much more with it, such as left or right justifying, and you can manipulate the string much better than using + or , which is why it is considered more Pythonic, as many Python coders say. It uses little curly brackets as a sort of placeholder – so here, putting a {0} is essentially telling Python to put a little bookmark in that part of the string, and to wait for some data.  The data comes with the method .format, and the then the (name) variable.  So the code here waits until it checks what is inside the formatname variable, then puts it into the curly bracket 0 bit of the string.  Many ways to do the same thing.

We will cover many more string manipulation techniques in future posts.

Happy coding!

New to Python? Look no further…

There is an ever-increasing interest in the Python programming language.  The reasons are multiple – it is a nice, English-readable high-level language (as opposed to, for example, C#).  It is also easy to get up and running with it because it is bundled with IDLE.  You can access a Python programming environment online, through wesbites such as CodeCademy, or Trinket.  Finally, there are a large number of resources available to budding Python programmers.

Nevertheless, there seems to be a dearth of really tight, accessible videos that explain Python to the newbie – so Third Millennium Learning is launching a series of YouTube videos that do just that.  The first two can be found here, and there will be plenty of updates as the weeks and months roll by:

Introduction to Python and IDLE

IntroIDLEScreenshot

 

 

 


Introduction to using Trinket to code Python

IntroTrinketScreenshot

Happy coding!

Millennial Leadership in schools

Pollie Massey recently wrote an article for Forbes, which looked at the changing face of leadership within the business world.  Massey notes that  Millennials (born between 1980 and 2004) make up one third of the US workforce at the moment, and that figures is set to increase to 50% by 2020.  At the moment, Baby Boomers and Generation X members are heading up these organisations, with the Millennials performing entry to mid-level tasks; clearly this will change as our workplaces are flooded with Millennials and members of Generation Z.  The UK picture is reflected in the following graphic, courtesy of culture-time.com:

generations-chart-full

 

The picture is not entirely dissimilar in UK schools – the vast majority of senior leaders are still Baby Boomers or members of Generation X (including me) – and according to a number of reports we will be facing a significant shortfall of leaders in schools by 2022.  One such report is found here, and interestingly it touches on the same themes of diversity as Pollie’s article.  There are numerous analyses about why such a crisis is looming, not least the continually changing expectations of a variety of Governments and examination boards, pressure of work, and media portrayal of teachers.  I have been in this profession for 19 years (which explains why I am a member of Generation X of course), and there are some good suggestions in the School Leadership Challenge 2022 article, including recruiting more BAME groups, increasing the number of women in senior leadership roles, and a ‘shift of culture’ which includes identifying and mentoring potential leaders in a much more tactical way.  None of which I disagree with.

However the thing about a ‘shift of culture’ is – it already shifts all by itself, especially as Millennials and Generation Z teachers appear in increasing numbers.    These teachers bring a whole different attitude to work and life – they are digital natives, or even ‘technoholics’ – expecting digital platforms to simply work for them all of the time, exactly as they expect, and entirely comfortable in digital worlds.  Their attitude towards their career is much more two-way – Millennials are happy to work ‘with’ a school, not necessarily ‘for’ the school.  Members of Generation Z will flit between schools, industries and countries – this is not disloyalty, it is simply the way things are for them.    This is in stark contrast to current school leaders, many of whom are loyal to a particular school, or at least to a career within teaching itself.

(On a separate note, the students we are currently teaching have needs that one could argue are not being fully met by the contents of their lessons alone; needs that are reflected in a number of reports such as this one, but that is a topic I will return to in a separate post)

As Massey notes, Millennials place great value on relationships (online or offline), so any coaching  and mentoring programmes need to account for this.  She also notes that Millennials will bring different, innovative perspectives to organisations – they may well end up reimagining the entire organisation given time.  (they have time of course – much more than we do). Finally, Millennials expect there to be an authenticity and transparency to what the organisation is doing amongst the community – this is a vital element for any school, and one that is frequently overlooked by Baby boomers and members of Generation X.

Only by recognising this shift in culture, this inevitable shift that is happening now, and that will continue to accelerate whether my generation likes it or not, will we be able to prepare school leaders for 2022 and beyond.  The future, as always, could be very bright indeed – driven by the next generation, with plenty of mindful prompting and mentoring from generations such as mine.

The full report pertaining to the School Leadership Challenge 2022 can be found here.

 

Will Tech be Trumped?

Amid the shock, the genuine shock, the mind-befuddling miasma of events that led to the the designation of Donald Trump to the role of President-elect…let me just pause a while to let that sink in…

Amid all of this is the fear that Technology, particularly in the US, could take a pummelling.  Techcrunch nicely sum up the state of play here:

Here are the tech policies Trump promised to implement as president

There is a powerful image at the beginning of the story of Trump bellowing out  140-character snippets of whatever his mind has, er, alighted upon – to “tremendous young ladies”, who presumably perform some sort of spontaneous insta-tweet within seconds of coming aware of being yelled at by the President-elect.

screen-shot-2016-11-13-at-04-41-09

‘Big’ companies and ‘big’ concepts also need to take note – Trump does not trust China (as well as being un-American they also invented the lie of Global Warming) and therefore wants Apple to relocate their manufacturing sector to America.  That also includes Oreos and Ford cars, people.

Did I mention Global Warming?  It’s all tosh, a hoax, propagated by those un-American Chinese folk in order to kill US manufacturing.  We fancy-dan Europeans are buying into this hoax presumably.  Silly us.

Amazon beware – Bezos dares to own a Clinton-supporting paper (The Washington post was bought when it was on its uppers and has now been turned around by Bezos into a massively successful online news source), and Bezos had better watch out because Trump wants to claim Space back – no doubt swatting Blue Origin out of the way as NASA races to something like Mars or Jupiter.  Somewhere like Outer Space.  Not Inner Space.

Net neutrality – that fundamental concept of a free-for-all internet – Trump wants that.  America did, after all, create the net as a military network back in the days of Arpanet.  So hands off you woolly-minded neo-liberals.  Unfortunately for Trump he might be agreeing with China here.

Cyber itself – that cyber problem – he’s going to take it on, full steam.  He is worried about the security aspect of cyber.  Cyber what? Cyber Clinton emails?  Cybermen?

screen-shot-2016-11-13-at-04-53-08

See how the French are quite happy to embrace cyber in all its’ forms?  I am certain that Trump will do plenty to tackle the French cyber issue.

What does it all mean?  What does Trump mean?  I cannot tell you.  Is he somebody who has cleverly traded in fear and paranoia and will soon resume office, surround himself rather sensibly by advisors who know what they are talking about, and morph into some sort of angry version of Reagan?  I never saw Reagan look angry so that concept itself is a strange one.  Or does he genuinely have these opinions?  And will these opinions actually turn into policy?  Should I be bothered given that I am an Englishmen, and is it really an echo of Brexit?  Or something much worse?

I still have the image of Trump shouting at tremendous young ladies revolving around my head, and that will take some time to clear.  If I have inflicted it upon you, and if you voted for Trump, well, you reap what you s0w.