There are lots of online sites that will help you get started with your efforts to learn coding with Python.
eBooks and pdf training resources
Learning by doing is often favoured by many learners. Some of the resources named here allow to do just that.
For example, if you want to learn to code to build games, a book that takes you through the steps for building some simple games would be a great place to start. If that book also provides the code for you build some games, and details how the code works, while you learn the building blocks of the language, you have the potential to learn by doing.
Invent Your Own Computer Games with Python, is just one example of the this style of learning to code.
The author, Al Sweigart, is the author of several books for people interested in learning to code in Python.
In his own words:
My motivation for writing this book comes from a gap I saw in today’s literature for kids interested in learning to program. I started programming when I was 9 years old in the BASIC language with a book similar to this one. During the course of writing this, I’ve realized how a modern language like Python has made programming far easier and versatile for a new generation of programmers. Python has a gentle learning curve while still being a serious language that is used by programmers professionally.
The current crop of programming books for kids that I’ve seen fell into two categories. First, books that did not teach programming so much as “game creation software” or a dumbed-down languages to make programming “easy” (to the point that it is no longer programming). Or second, they taught programming like a mathematics textbook: all principles and concepts with little application given to the reader. This book takes a different approach: show the source code for games right up front and explain programming principles from the examples.
You can download the latest edition from the Invent With Python site, that also has other books that may interest you.
This book takes you from installing and setting the environment for you start programming in Python, then begins with some simple games, including classics such as Hangman and TicTacToe.
Initially the games are played in a simple text-based format, which introduces the basic language features without the distraction of having to learn processes for displaying in graphic environments.
Coding In Python
Although the task I am about to outline is quite trivial, it does demonstrate some of the benefits of using Python for coding.
The task I set myself was to modify an example from the first MIT Computational Thinking Massive Open Online Course (MOOC) that I completed 2 years ago, and then promptly ignored. That task asked students to code a function that could be used to identify if a particular letter of the alphabet is a vowel.
Looking back at the code I saved from that exercise there were a couple of ways that I achieved that, and so I decided to try to extend the exercise and see if I could use that to extract all of the vowels from a phrase. Yes, I know, a trivial task, but in doing so it provided me with an opportunity to hone some skills.
First I had confirmed for me the benefit of working from something like a flow-chart, that helped to lay out the steps needed, to get them into some sort of order and perhaps improve the efficiency. The flow-chart shown here is a result of that pre-planning. (Actually it was not pre-planning, but a bit of an afterthought, that helped to reduce the amount of coding to produce the same result. That coding is actually easier to read, and much more concise than the first attempts.)
The code that came from that flow chart is actually much less wordy, but still relatively easy to follow, even for a novice with little experience at working out what code is meant to achieve. That is a result of the almost natural language that can be used to code, as can be seen from the actual working code for this trivial problem.
The following code achieves the task of removing the vowels from the phrase given, and printing out to the shell the phrase without the vowels. The example used is the phrase “Lord of the Rings” which prints out as “L_ord _f Th_ R_ings”.
The Code: (Please excuse the bullet points. They seem to be the only way I can format the code with indents.)
- word = “Lord Of The Rings”
- vowels = ‘aeiouAEIOU’
- for j in range(len(word)):
- if str(word[j]) in vowels:
- wordCopy = word.replace(word[j], ‘_’)
- print wordCopy
As you can possibly see, this is much less wordy than the flow chart, and certainly shorter than a written description of the task, or the comments that I originally wrote in the code. Just 7 lines of code! With the comments the code was originally more than 20 lines, and that was without being too verbose.
Going With Python
After a break of more than 2 years, this site is back in action. The course mentioned in the last post was completed, but unfortunately other things got in the way and nothing much was done to build on the learning that came from participation.
Until about a month ago, when the second part of the MIT MOOC began. That course relies on having a reasonable knowledge and ability to program with Python. Consequently I have not been able to keep up with the Problem Sets and quizzes for the current course.
Being enrolled in the second part has encouraged me to go back to the original and brush up on the content, while attempting to code some simple (or what I thought would be simple) little tasks. There is SO MUCH to come to grips with, but the challenge is worth the effort.
Hello World: A First World Problem
As is usual for most early lessons in courses that teach computer programming, the first instructions get the student to print the phrase “Hello World”.
For those who have become a little jaded by having to do that for programming and other coding tasks this first step will give the student the option to bypass that trivial task.
The code below, written using Python, that can be run in the Python Interactive DeveLopment Environment (IDLE), will be used an example from which many different aspects of the Python language, and programming with Python (in the early stages).
The following links will take you to pages where the snippets of code will be explained and further examples and practice task will be presented.
First we will look at the last 2 lines of code. These are user-defined commands that tell the computer to go to to those 2 functions, that were defined earlier in the code above.
This file will run on Python version 3.5 and would need to be
edited for running on earlier versions.
#imports the random methods to use later.
#helloWorld is a simple function that prints the string ‘Hello World!’ to the screen.
print(‘What is your name?’)
myName = input()
myName = myName.title()
print(‘It is good to meet you, ‘ + myName)
if x == 0 or x == 1:
return fibNums(x-1) + fibNums(x-2)
for i in range(n+1):
print(‘fib of ‘ + str(i) + ‘ = ‘ + str(fibNums(i)))
#prints the introduction to screen
print (‘Learn To Program courses usually start with ‘)
print (‘teaching how to print “Hello World” on the screen.’)
print (‘In this course you can skip that step….’)
print (‘Or you can take to usual path.’)
# This function asks if the user wants to print “Hello World”,
# If so it does that, otherwise simply exits the function.
print(‘Do you want to see Hello World printed on the screen? (yes or no)’)
print (‘You skipped the Hello World step…..’)
print (‘Or did you?’)
if random.random()> 0.4:
#get some fibonacci numbers
print (“Here’s some Fibonacci numbers to look at….”)
print (‘Computer says “No”‘)
print (“That’s it! I’m Done.”)
Ruby and/or Python?
That seems to be the question right now.
Maybe the answer is both!
So where have I been, and do you want to take the journey too.
First Code School for Ruby. Not a bad place to start, but you are working in their online console and not really building up you own battery of coding examples to play with.
Then it was on to Codecademy, for more of the same. Working in their console, having to pass each step to progress to the next. The process is not too fast, but once again you are working on the problems they set and not those of your own.
The next step for me was to do the Rails Tutorial to learn building a web application using Ruby on Rails. Now that is a challenge! But as with most things, anything worth achieving requires some effort. The results from following this tutorial are a much better understanding of Ruby ( and Rails), with still lots of gaps to fill. A side product is a twitter-like social networking site that I will work on linking to another of blogs. When I get time between learning Python!
Currently I have enrolled in and EdX MOOC(Massive Open Online Course) 6.00X, that has a focus on computation, with the Python language as the tool to use for building on that aspect of computing. So far it has just started week 2, and is beginning to get down to the nitty gritty. As a back-up I am also working my way through the Python curse at Codecademy.
That’s it for now. More study to do, and some Problem Sets to submit. Looking forward to seeing where thus takes me.
Where have you been?
After a few months of neglecting this blog, as a result of dis-illusion with the world of world of advertising with safelists, this site is about to get a new lease on life.
All of the old posts will stay, so that you can wander through them, and hopefully learn something from my journey.
So where am I at now?
Hoping to show some results soon, but it is early days right now.
But Will It Last?
More tracking results.
New programs, opportunities, safelists, mailers, traffic exchanges seem to appear regularly.
They burst onto the scene with a flurry of activity. Promoters send out their hyped up emails to their lists. Safelist members copy and paste the swipe files and splash pages. Most will have had some advance warning of the launch.
But all of that frantic activity will not always last, with the early adopters making the most of their inside knowledge.
Here’s some tracking data for a relatively recent launch.
ListNerds, a venture into the world of safelist and mailers from the TimTech group is one of those that began with what looked like lots of promise.
The first few mailings returned a healthy CTR. 30% or more for the very first is probably never going to be sustained, and a drop off can be expected.
What has been disappointing is the steady downward slide to less than 3% CTR over a relatively short period.
But it doesn’t have to be that way.
Comparing the CTR rates with another mailer launched at around the same time (100 Percent Traffic) gives a very different picture.
As with many things in life, it is not the fast starter that is going to end up as the better performer.
There are many factors that come into play to help a safelist maintain a healthy CTR to return value to members. It is not simply a matter of building hype for a launch and then standing back, basking in the glow of early success.
The problem for potential members is to pick the launches that are more likely to produce the steady return.
Is There Value In That Update?
That’s 2 questions now, and not an answer in sight, yet!
Tracking can be a double edged sword. It provides information that tells you what is working, and where to concentrate your efforts. It can also pinpoint areas where things might not be going as well as hoped.
That data comes from any tracking that the safelist users sets up, and also from tracking stats provided by the better mailers.
Back to the second question, but first another question. What do you get with an upgrade in a safelist or mailer?
Typically that includes:
- More credits, making it less necessary to open emails for credits.
- Ability to email more members.
That all sounds great so far, but let’s look at the tracking data for a recent upgrade.
After several messages had been sent out as a FREE member, they were returning a CTR of more than 6%. These messages were sent out to the maximum possible number of 2200 members.
After the upgrade it was possible to send to 6000 or more members. Immediately the CTR fell to less than 4% and has hovered around that mark for subsequent emails.
The result: The upgrade allows more emails to be sent, and potentially more of these may be opened.
But why the fall in CTR?
Some guesswork at this stage, but it seems that the increased members to whom the emails are sent will have a significant number who have upgraded, and who do NOT have to click emails for credits. So even though more messages can be sent, they are being sent to many people who do not open them.
But will the ability to send to more members bring more conversions, signups, purchases etc?
What A Difference!
8 weeks of tracking stats, and it’s become really obvious that some mailers perform better than others.
But by how much much?
This week I have started to give some of the mailers with the smallest Click Through Rate (CTR) their last chance. Actually, there were 5 that didn’t get that chance. There were no more credits left in my account at those, and the effort to build more was considered not worth the effort.
So which mailers are on notice?
First up: any with a CTR of less than 1%. That gave me more than 30 mailers to put under scrutiny.
- Eliminate, and delete accounts at those with 0 credits left.
- Mail out using maximum credits (or total credits left if less than maximum).
- Track results. Clicks only. Conversions, if any are a bonus, and will give the mailer another chance.
- Continue to use any credits (if available) in subsequent mailouts during the week.
- Eliminate, and delete any accounts that return less than 1% CTR after this week.
Day 4 and approximately 10 mailers have been terminated.
One has a reprieve with a conversion, although the CTR is still heading south.
The end of the week and another 10 have bitten the dust. One good thing about most of those that have been removed is that they use the same out-of-the-box script. The owners have not changed much, apart from the graphics. That has made it easy to find where to delete the account, and the process for deletion is the same. Now to remove the emails from those dead mailers, and delete the filters.
More time is now available to use the mailers that actually produce some results!
Observations and Musings
After more than a month of dotrim Safelist Rankings it’s now time to look back, put the data together and make few decisions.
More to come. I’m taking the time to look through the data, and find the patterns that require some action, so that the best use use is being made of my time and effort.
Back soon, I hope.
But for now, here’s the latest weekly rankings.
Working Out The Stats
More than a month of tracking stats have now been collected. That is just a small fraction of time that some of the well established ranking systems have been around.
So what makes the dotrim rankings different? And why should you take any notice of them?
First: The data relies solely on tracking. There are no polls or voting where the numbers can be manipulated by devotees of a particular safelist or mailer.
Second: The tracking information collected is real. It is collected from results of mailing out to members of safelists.
Third: A range of safelists and mailers are sampled in the stats gathered. It is not a complete list of all mailers. Initially those in the downline builder at the 10K Challenge were selected, and then others added to the list.
Are The Results Different From Other Rankings?
When compared with other ranked lists you will see some differences.
What appears at the top of one ranked list may not show up on another. There are some safelist owners, quite appropriately, advertising and promoting that their particular bay has been top of a list for many weeks, but it does not get a look in at the dotrim rankings.
The reasons for that could be many, with probably the main factors being the purpose of the rankings and the methods used to calculate them.
If you look back at a previous post you will see that the dotrim Rankings focus on 2 elements.
Results: The recorded conversions on emails sent. Now that the rankings are maturing, if a mailer does not produce results, it will not appear on the Rankings. Only those safelists that get results are shown.
Effort: How many credit emails have to be opened to get visitors (traffic). Where the results are the same the rankings then list the mailers in order of those giving the best return for effort.
Why Only 8 On the List?
At this stage more than 40 different safelists are used each week to gather the data for the rankings. From those the top 8 are shown in the Rankings.
Each week it seems that there is little change in the mailers on the list. There is usually just a little shuffling that goes on, with the same ones moving around in order.
Some thought is being given to producing a supplementary ranked list that would include some that just miss the cut, or that appear to be gathering steam and heading in the right direction. That way readers of this site will be able to see, and gather some information about these safelists and use that for decision making about signing up or upgrading.
If you are finding these posts useful, please drop a comment or two, perhaps with suggestions for where to take this site.
Visit the dotrim Safelist Rankings.