Options

Learning to program resources

thomas_thomas_ Member Posts: 1,012 ■■■■■■■■□□
I was just wondering if anyone knew of any good sources of information for learning how to program. I am open to paid/free, books/ebooks, videos, etc.

The main thing is I want to interact with one of Google's APIs. I've read the API documentation, but since I don't have a coding background I don't how to set up a script to interact with it. That specific API's documentation seems to be a little sparse and seems to assume you have the basics of coding in a particular language.

They have support for multiple programming languages, so I'm also kind of wondering if one language would be better to do it in that would also help get a job in the future. I know python tends to tie in with Linux pretty well and I wouldn't mind learning it. I was also thinking about javascript mainly because I think Google Scripts uses javascript and I wouldn't have to worry about setting up an environment.

My goal is to develop a script to post data in a JSON format to an API. I've managed to get the data into a JSON format and I've been able to post it using Google's API Explorer. I don't mind doing this, but it takes me about 15 minutes to post 50 records, which is also the 24 hour limit. I'm interested in making the script, so it could be done in a few seconds. I realize I'll probably spend more time creating the script and I'll probably have all the information uploaded before I figure out the script, but I'm willing to do it because I think programming would be a useful skill to develop and gradually get better at.

Comments

  • Options
    DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    Just my personal opinion - I'd say go for Python. You can circle back around to Javascript later (say in 6 months or so).

    Are you trying to get this script done as fast as possible? Or are you trying to learn some basic programing first and then revisit the API much later?
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • Options
    thomas_thomas_ Member Posts: 1,012 ■■■■■■■■□□
    It would be nice to get the script done sooner than later, but I'm lacking the basic knowledge. I'm figuring it's better for me to learn the basic programming and then revisit the API. I know by that time I'll have already finished transferring the data by copying and pasting the 50 JSON entries directly into the Google APIs explorer for that service, but I think it would be a good learning experience to continue to mess with it until I was able to make it work.

    Any suggestions for learning resources for python?
  • Options
    DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    If you're willing to take the long approach, I'd recommend "Automate the Boring Stuff with Python" (can read for free online or buy the PDF/Physical book if you'd like.) There's also an associated udemy course, which might be beneficial if you learn better by video/demonstatration than reading. I got the course for free because the author was handing out promo coupons when he released it, so I watched it. I personally wouldn't pay full price for the udemy course, only because the book goes into better detail, but udemy has frequent sales so you might want to check it out if you can get it cheap.

    If you want to jump right in I'd recommend "A Byte Of Python" -- a free Python book you can download/read online.

    Use either of those 2 above books as your #1 source, then I'd recommend "Think Python", which is also free online.

    Since you're starting out, go with Python3 over Python2. Not all packages/libraries/APIs support Python 3 yet, but it's fairly easy to back port. The Google API does support Python 3 tho.

    I've heard great things about the online Google Python Class, the MITx Python Class, and the Rice University Python Class. I've started each of them and thought they were great, but haven't finished either of the three.
    I haven't heard good things about "Learn Python the Hard Way" -- especially if you're attempting to get into programing in 2016. I started that book as well and didn't finish it, but I shared the same sentiment.

    There are also plenty of slack channels, irc channels, reddit groups, and meetups where you can visit to get help. At one Python meetup I went to last year, one of the guys was studying for the CCIE and came just so he could get help using the Gmail API for one of his scripts for his home lab.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • Options
    kohr-ahkohr-ah Member Posts: 1,277
    Ah thanks for this I forgot about that site.

    Doesn't Automate the Boring Stuff only teach Python 3? (It isn't a big deal to go between 2 and 3. 2 just has more plugins)
  • Options
    DoubleNNsDoubleNNs Member Posts: 2,015 ■■■■■□□□□□
    Personally, I recommend anyone starting out with Python to start with Python 3 instead of 2. And because it's easy to go between the two, it's easy to backport when/where necessary. So the fact that Automate the Boring Stuff teaches Python 3 is a benefit in my book.
    Goals for 2018:
    Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
    Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
    To-do | In Progress | Completed
  • Options
    NetworkNewbNetworkNewb Member Posts: 3,298 ■■■■■■■■■□
    teamtreehouse.com has some very easy to follow along videos with coding exercises. I'd recommend trying out their free trial. Bunch of different programming languages on there.
  • Options
    thomas_thomas_ Member Posts: 1,012 ■■■■■■■■□□
    Cool, thanks for the resources. I sas the "Learn Python the Hard Way" at Barnes and Noble, but I wasn't sure I wanted to drop $30 on a book. I think I'll stick to the free resources for now. Since I already have a subscription to LinuxAcademy, I did a search there and found a 2 hour Python 3 course, so I'll probably look at that as well.

    I tried installing python 3 using Python for Windows. A lot of people are not rexommending Python 3 on Windows. I couldn't get it to work, but I think it's because I didn't setup the environmental path correctly. I'm thinking about installing Linux on my laptop again and just running Windows in VMs. Evr since I updated to Windows 8.1 my laptop hasn't been fully functional. I remember the last time I installed Ubuntu on it, everything seemed to work including the function keys that adjusted the brightness. I think habing Linux on my laptop might male things a little easier for setting up Python.
  • Options
    kohr-ahkohr-ah Member Posts: 1,277
    If you want to get started install 2 or 3 or both.
    Go get PyCharm Community Free Edition and use that. It will help a lot with syntax and proper form for you.
    LPHW uses Python 2. Automate the boring stuff uses 3.
    They are both pretty similar just 3 uses more common syntax styles like more common programming languages.
    2 has more plugins for things.
Sign In or Register to comment.