Python for Kids, or cats

D

DotNetWebs

Following the recent debate about teaching your son, daughters, cat, budgie etc. to code I thought some mat be interested in the great Offer O'Reilly currently have on their ebooks:

Last chance! Save 50% on *all* Programming Ebooks & Videos

e.g

Python - A Playful Introduction to Programming

ALL their other programming books are currently 50% off too so there are good bargains to be had whatever your favourite languages are.

I buy all O'Reilly books directly from O'Reilly as I find them to be much more flexible and practicable than buying them via Kindle etc.

Regards

Dotty
 
  • Like
Reactions: Jeff FV
D

DotNetWebs

ps just as a follow up to that last debate I recently came across this statement from Guido Van Rossum (the creator of Python) about the differences between Python & C Syntax (just to illustrate how simple it is to switch between the two):

Python is obviously not C and one major area where it differs is that instead of using braces for statement grouping, it uses indentation. For example, instead of writing statements in C like this

Code:
if (a < b) {
    max = b;
} else {
    max = a;
}

Python just dispenses with the braces altogether (along with the trailing semicolons for good measure) and uses the following structure

Code:
if a < b:
    max = b
else:
    max = a

Pretty straight forward really!.

Regards

Dotty
 
Upvote 0
ps just as a follow up to that last debate I recently came across this statement from Guido Van Rossum (the creator of Python) about the differences between Python & C Syntax (just to illustrate how simple it is to switch between the two):

Python is obviously not C and one major area where it differs is that instead of using braces for statement grouping, it uses indentation. For example, instead of writing statements in C like this

Code:
if (a < b) {
    max = b;
} else {
    max = a;
}

Python just dispenses with the braces altogether (along with the trailing semicolons for good measure) and uses the following structure

Code:
if a < b:
    max = b
else:
    max = a

Pretty straight forward really!.

Regards

Dotty

They are even closer than that as in C you can also dispense with the braces for a single compilation point (';') following the "if" statement:

Code:
if (a < b) 
    max = b;
 else 
    max = a;
 
  • Like
Reactions: DotNetWebs
Upvote 0

Subbynet

Free Member
Aug 1, 2005
6,000
1,101
45
Luton
I don't normally buy many books these days. I use to buy loads but they kept on bringing out so many, and with the cost being at least £40-60+ a pop, I just felt I could find the info on-line and save myself a small fortune! :) Mind a 50% discount is good so I'll have a browse!

I bought myself a Raspberry Pi last week, haven't done anything with it yet, need a project to set to work on with it, but no doubt that will be python based...
 
  • Like
Reactions: DotNetWebs
Upvote 0
D

DotNetWebs

They are even closer than that as in C you can also dispense with the braces for a single compilation point (';') following the "if" statement:

Code:
if (a < b) 
    max = b;
 else 
    max = a;

Very true and there are many in the Python world who like to remove the colons as the interpreters/compilers don't technically need them. They are only there to improve readability.

If these people were ever to get their way the only difference between those two code blocks would be the terminating semi-colons.

Regards

Dotty
 
Upvote 0
D

DotNetWebs

... Mind a 50% discount is good so I'll have a browse!...Raspberry Pi last week...

I have probably close to a hundred O'Reilly ebooks and have never paid much over £10 for them. They always have a deal on and if I see a book I want unless I am really desperate for it I wait to become available as a deal. I has also had free book from O'Reilly for reviewing them although that can be almost as time consuming as UKBF!

Regards

Dotty

ps With the discount this Pi Book is only just over a tenner:

http://shop.oreilly.com/product/0636920029595.do

I haven't looked at it but can see it's an early release which means it will be incomplete but you get regular updates. O'Reilly automatically sync purchased books to your Dropbox account which means they are always up to date and available on unlimited devices (in contrast to Kindle which limit you to 4 or 5 IIRC)
 
Upvote 0
D

DotNetWebs

... I like to have it in hard copy, just easier to read on the move!...

Given the choice I too would prefer to read a hard copy - but the problem is you can't take many on the move.

I am currently active in C#,Python,Java and JavaScript [languages], MSSQL, PostgreSQL, SQLite and CouchDB [databases] & .net ('classic' & MVC), Django and Android ['platforms'].

The beauty of O'Reilly is that have reference books available for each of those technologies to hand wherever I go, on any of my devices - image trying to carry them all around in hard copy!.

It's also generally easier to search for things on an ebook although when I hit a 'problem' Stack Overflow is normally my first port of call (with the ebook as a follow-up reference if I have come across new classes or method etc.)

I must admit I have a bit of an O'Reilly 'habit' as on top of the books mentioned there are many other books that I read that are less directly connected to these 'core' technologies.

I also think O'Reilly are masters at exploiting that habit by sending daily offers for things that you would probably not pay £40 for but will happily pay £10 for!.

Regards

Dotty
 
Upvote 0

Subbynet

Free Member
Aug 1, 2005
6,000
1,101
45
Luton
That's the thing I tend to read them and then use Google to find sites like Stack overflow as a reference.. I'm still not completely sold on e-books (well e-readers really!), you might not be able to carry many, but the upside is the battery never runs out, you don't mind dropping them, or having liquids accidentally fall on it! (Its happened!! :) ) Plus you can put them down without much worry someone will steal it.

Saying that I do have quite a large collection of PDF's on all sorts of subjects, but they're not normally that long, and like I say use them more as reference material.
 
Upvote 0
...I'm still not completely sold on e-books (well e-readers really!)...

Although I have a kindle I don't use if for tech books (only novels).

The main way I read [tech] ebooks is on my Android Tablet which rarely leaves my side and will easily last a day or two between charges.

The automatic dropbox sync means they are also available on any of my other computers and my phone. They are also easy to access even when logged into other peoples computers e.g clients' or freinds'.

It's a convenience thing but there are still some classic 'bibles' that I prefer to have BOTH an ebook and Paper copy e.g 'C# in a Nutshell'.

Regards

Dotty
 
Upvote 0

garyk

Free Member
Jun 14, 2006
5,992
1,019
Bedfordshire
Thanks for the heads up dotty, I must admit in the 'my xxx wants to learn to code' you at least opened my eyes to the possibility of using Python so thanks for that.

I thought it looked quite close to BASIC, not just C. Although I have to say the OO stuff with double underscores (__def__) isn't pretty to look at.

I prefer the printed books also and I'm a fan of video tutorials. I found these http://thenewboston.org/list.php?cat=36 and the guy has a *ton* of tutorial videos (all free) on his site covering a range of subjects.

Gary
 
  • Like
Reactions: DotNetWebs
Upvote 0
...the OO stuff with double underscores (__def__) isn't pretty to look at...

Funnily enough you can thank C for that!

Guido van Rossum said:
...In addition, rather than devising a new syntax for special kinds of class methods (such as initializers and destructors), I decided that these features could be handled by simply requiring the user to implement methods with special names such as __init__, __del__, and so forth. This naming convention was taken from C where identifiers starting with underscores are reserved by the compiler and often have special meaning (e.g., macros such as __FILE__ in the C preprocessor)....

The above is taken from Guido's blog "The History of Python":

http://python-history.blogspot.co.uk/2009/02/adding-support-for-user-defined-classes.html

This is well worth a read if you are thinking of doing any serious Python.

There is also a great video:

http://www.youtube.com/watch?v=ugqu10JV7dk

Both of these have helped me understand the philosophy of python and these combined with other influences and a chapter from the book "Beautiful Code" ("Python's Dictionary Implementation) really realise that Python is the perfect language for the sort of programming I am mostly doing nowadays - i.e collecting, filtering, sorting and combining disparate data sources across disparate platforms.

Thanks for those video links BTW. I hadn't seen them before and will take a look when I get time.

Regards

Dotty
 
  • Like
Reactions: garyk
Upvote 0
...pycharm...

PyCharm is the IDE I use for Python and it's the thing that convinced me to start using Python for full-blown applications.

PyCharm is made by JetBrains, the same people who make the excellent ReSharper [C#] Visual Studio plug-in which I am also a huge fan off.

They have clearly been very heavily influenced by Visual Studio so much so the PyCharm can basically be considered 'Visual Studio for Python'.

Regards

Dotty
 
Upvote 0

garyk

Free Member
Jun 14, 2006
5,992
1,019
Bedfordshire
PyCharm is the IDE I use for Python and it's the thing that convinced me to start using Python for full-blown applications.

PyCharm is made by JetBrains, the same people who make the excellent ReSharper [C#] Visual Studio plug-in which I am also a huge fan off.

They have clearly been very heavily influenced by Visual Studio so much so the PyCharm can basically be considered 'Visual Studio for Python'.

Regards

Dotty

Damn you Dotty :)

Now I'm playing with python, got qt designer (which is damn impressive), laying out forms hooking it to python etc etc

I don't have time for this!!!

...all good fun though ;)

Gary
 
  • Like
Reactions: DotNetWebs
Upvote 0
R

Root 66 Woodshop

When I saw the title, all I could think about was...

Boy-and-snake-bff-1.jpg


:D
 
  • Like
Reactions: hassel67
Upvote 0

Latest Articles