automating-beginner
As a programmer, I would say learn something simple. I think the easiest language to learn is Python (version3). Most languages can do everything you want, but only javascript can be run on your web browser. If you really want to have some user gui/website that allows the user to run some code then learn this. But if you are comfortable working with the command line/terminal (bash) use python to run your programs.
I think codecademy site has a very good intro to Python course. Next I would look at https://learnpythonthehardway.org/python3/index.html, is another good tutorial. You can also do puzzles, to help you get comfortable with syntax and coding algorithms using katas (https://www.codewars.com/collections/easy-python-katas)
The world programming is big, so you dont need to learn to much. Areas like 'object oriented design' and 'functional programming' (although later this can make coding easier) are useful for big and complex programs, but for simple automation they are not needed. Same for 'machine learning'.
Areas of code to learn:
how to run a program
variables
loops
decision making
String manipulation
commands from terminal, output to termnial
data structures: lists and dictionaries
methods
Using libraries, will be really useful, this will help you spending time reinventing a subpar 'wheel'. Python is big enough and lots of libraries to be able to provide a lot of functionality in packages/libraries which you can import into you program.
For solving problems, look at stackoverlfow website. They will have a lot of solutions to questions/problems you may have, and you can ask questions too, and will get lots of help.
Use a version control (use git) and version control hosting (github), this allows you to have save you work (commit) at specific intervals with a description of what you did. Then you can upload to github (push) and it will be stored in accessible place, and you can make it private. But the best thing, is that you can go back to previous saves (revert/checkout) and start from there. There are loads of tutorials on git.
If you have lots of data, then use of a database would be good, then learning sql will be necessary. But if you dont need to dont need it, then leave it for the time being.
I think the way to get good at coding, is to be comfortable with the language, that means practicing with language, that means doing exercises. But doing loads of excerises only will not improve. So doing a project, ie a script to automate the renaming. Things like doing things with lots of files, completing forms on a website, scheduling tasks.
key areas to look at:
file i/o: Handling files, writing, reading, ediing etc
regular expressions
use of web tools to automate actions ie selenium
http client, if you have access to a web api where you can get data from to do stuff with it
Use of json serialiser to be able to extract the information from the web api
The biggest thing, is to know what you want to automate, and transform this in to a flow chart or series of steps, ie an algorithm. You will end up with a set of step by step, some things repeating each other (ie loops - for/while), somethings doing decisions (ie if/else, switch). Then with this structure you will be able to code it. But this will depend on what you want to automate.
A simple program to build is a an address book. Takes a csv file with a list of names, addresses, telephone numbers and list of groups they are attached too. ie bob,10 Park street,012345679,work|soccer. Then create an program with the following functionalities: Add a contact, remove a contact, update a contact, return details of all contacts, show details of contact given name, show detail of all contacts in one group. Be able to run this in you command line.
There is always a trade off. You may have a task to automate, but part of it maybe too complex to code, so you will need to do this manually, then go back to automating. The more automation, and dealing wiht different cases in the flow, the more complexity it will have and time it will take. This is where you get a professional to do it for you
Last updated