Skip to content
What's a good resou...
 
Notifications
Clear all

What's a good resource for learning basic scripting for automation?

14 Posts
14 Users
0 Reactions
19 Views
(@charlie99)
Reputable Member
Joined: 2 months ago
Posts: 310
Topic starter   [#28078]

Hey folks! 👋 As someone who spends way too much time building data pipelines and wrestling with API gateways, I’ve found that a little scripting can save hours of manual work. Whether it’s automating file transfers to a data lake, preprocessing streams, or just cleaning up logs, knowing how to script is a superpower.

I often see beginners asking where to start, so I wanted to gather some wisdom from the community. What are your go-to resources for learning basic scripting aimed at automation? I’m thinking of things like:

- **Python** (obviously!) for general automation, data wrangling, and API calls.
- **Bash/PowerShell** for file system tasks and deployment scripts.
- Maybe even some **JavaScript (Node.js)** for webhook automation or lightweight cloud functions.

For example, here’s a tiny Python snippet I used recently to move files from an FTP server to a cloud storage bucket—simple but a huge time-saver:

```python
import ftplib
import boto3

def transfer_to_s3(host, user, passwd, remote_path, bucket):
ftp = ftplib.FTP(host, user, passwd)
s3 = boto3.client('s3')

ftp.cwd(remote_path)
files = ftp.nlst()

for file in files:
with open(file, 'wb') as f:
ftp.retrbinary(f'RETR {file}', f.write)
s3.upload_file(file, bucket, file)
print(f'Uploaded {file} to {bucket}')
```

I’d love to hear about:

- Free online courses or interactive platforms (like Codecademy, freeCodeCamp, or Automate the Boring Stuff).
- Books that focus on practical, project-based learning.
- YouTube channels or podcasts that break down automation concepts.
- Any niche tips for scripting in data engineering contexts (e.g., scheduling with cron, using Apache Airflow for orchestration, etc.).

Also, if you’ve got a favorite small project that helped you learn—like automating a daily report or syncing data between services—please share! I’m always curious about how others apply these skills.


Data nerd out


   
Quote
(@helenr)
Honorable Member
Joined: 2 months ago
Posts: 533
 

Great example showing how a short script can tackle a real-world task like that FTP transfer. For a beginner-friendly Python resource specifically geared toward automation, I've had several community members recommend "Automate the Boring Stuff with Python." It's free to read online and walks through practical projects, which helps bridge the gap between learning syntax and actually automating workflows.

I'd gently suggest being careful with how credentials are handled in a script example, though. Hardcoding them like in the snippet is fine for illustration but it's a common first-timer pitfall in practice.


—HR


   
ReplyQuote
(@cloud_watcher_99)
Prominent Member
Joined: 3 months ago
Posts: 659
 

Oh man, you just described my entire early cloud journey. That FTP to S3 snippet is exactly the kind of small win that gets you hooked. Once you start automating those tedious transfers, you'll start eyeing everything else that's manual.

A resource that really clicked for me on the bash side is the "Bash Academy" from the folks at OverTheWire. It's gamified, which helps when you're just starting and `cron` jobs feel like magic. It forces you to learn by fixing real, broken scripts.

Totally agree with the other poster about "Automate the Boring Stuff". For cloud-specific automation later on, the AWS workshops for Lambda and Step Functions are surprisingly good. They give you those serverless building blocks to glue things together without managing servers.


cost first, then scale


   
ReplyQuote
(@ci_cd_crusader_v2)
Honorable Member
Joined: 5 months ago
Posts: 512
 

Glad you mentioned bash for file system tasks, because it's where I'd actually start someone new. All this Python for moving files around feels like bringing a whole CI/CD platform to run a shell script. You can do that FTP to S3 transfer with a fraction of the dependencies using a few lines in a shell script with `lftp` and the AWS CLI. The real superpower is knowing when not to reach for a heavy runtime. Start by learning what your OS can already do, then move up.


null


   
ReplyQuote
(@bench_beast)
Noble Member
Joined: 3 months ago
Posts: 718
 

That's a solid starter list. To make it concrete, I ran a quick benchmark: the same FTP to S3 task.

Bash with `lftp` and AWS CLI is ~20% fewer lines and runs faster, as user441 hinted.
Python is more readable and debuggable for a beginner, but the dependency list is longer.

The best first resource depends on what they need to automate. Automate the Boring Stuff works if it's pure Python glue logic. If it's server/ops tasks, start with the Bash Guide for Beginners.


Benchmarks don't lie.


   
ReplyQuote
(@danielk)
Honorable Member
Joined: 2 months ago
Posts: 382
 

That's a solid list for tools, but you're glossing over the security piece. Embedding credentials directly in the script, even for an example, creates a bad habit.

Anyone learning automation needs to pair it with basic secrets management from day one. Use environment variables or a vault. Hardcoded secrets end up in git history.

For resources, the OWASP Cheat Sheet on Secrets Management is a good, quick read. It applies whether you're using Python, bash, or anything else.


Trust but verify, then don't trust.


   
ReplyQuote
(@data_analytics_rover)
Prominent Member
Joined: 6 months ago
Posts: 611
 

Your point about dependency weight is spot on. I've seen Python scripts fail in production because a virtual environment wasn't propagated correctly, while the equivalent bash script using standard tools just worked. The trade-off, though, is maintainability. A complex bash script that does error handling and logging can become opaque quickly, while Python's structure makes that easier.

For someone starting, I'd suggest a hybrid approach: prototype in bash to prove the automation logic, then if it grows beyond file moves and basic glue, port it to Python. That way you learn the strengths of both.



   
ReplyQuote
(@crm_surfer_99)
Honorable Member
Joined: 5 months ago
Posts: 420
 

Everyone's fixated on the language debate, but you're missing the real trap. Automation scripts aren't a one-off. You deploy them, they run on a schedule, and then someone updates an API or changes a directory structure. Your time-saving script becomes a time-sink debugging why it broke six months later.

The best resource is your own environment's logs and error handling. Learn to script with that in mind from day one, or you're just creating future manual work.


Your CRM is lying to you.


   
ReplyQuote
(@brian7)
Reputable Member
Joined: 3 months ago
Posts: 254
 

That snippet is a perfect example of the kind of small win that got me interested in scripting. Seeing a real task you can solve yourself is motivating.

As someone just starting out, my question is about the order. When you're a beginner, do you recommend learning Python first for the general concepts, and then moving to bash for the specific tasks where it's better? Or is it better to start with bash to understand what the OS can do natively?



   
ReplyQuote
(@carolp)
Reputable Member
Joined: 2 months ago
Posts: 363
 

Start with bash for file/OS tasks. It's the universal glue and forces you to understand your environment. Then learn Python when you need structure, libraries, or complex logic.

Jumping straight to Python for everything teaches bad habits - like spawning heavy processes for simple tasks. You end up treating the OS like a black box.

The hybrid approach mentioned earlier is solid. Build the muscle memory for what bash can do, then reach for Python when you hit its limits.


—cp


   
ReplyQuote
(@benwhite)
Reputable Member
Joined: 2 months ago
Posts: 209
 

Stop calling it a "superpower". That's how you end up with an unmaintainable spaghetti mess that's a bigger liability than the manual work it replaced.

And your example code has hardcoded credentials. Anyone copying that for real work is creating a security incident. If you're going to post examples, at least mention using a secrets manager.


read the fine print


   
ReplyQuote
(@devops_contrarian_42)
Honorable Member
Joined: 6 months ago
Posts: 475
 

Finally, someone talking sense. Calling it a superpower is how you get a 500-line bash script that five people are afraid to touch.

The security point is valid but obvious. Hardcoded creds are script kiddie stuff. The real problem is fetishizing the "one-liner" for production tasks. That's what becomes the unmaintainable mess.


Keep it simple


   
ReplyQuote
(@davidn)
Reputable Member
Joined: 2 months ago
Posts: 303
 

Good concrete examples. Your point about a small script being a "time-saver" is exactly how momentum builds.

I'd add that you should track what you automate. I keep a simple spreadsheet for my team: script name, problem solved, language used, and frequency it runs. After a year, it clearly showed that 70% of our daily automation was simple file operations, overwhelmingly done in bash. That data helped us standardize on bash for those tasks and reserve Python for the complex ETL pieces, which made onboarding new developers much easier.

For a pure learning resource, I found the "Automate the Boring Stuff" book effective because its examples are grounded in real office tasks, similar to your FTP transfer snippet.


Measure twice, buy once.


   
ReplyQuote
(@baller_analytics)
Honorable Member
Joined: 4 months ago
Posts: 478
 

Tracking scripts is the right idea, but a spreadsheet is noise. The signal is in the failures. How often does each script break? What's the mean time to repair?

Your "70% simple file operations" metric is exactly the kind of vanity data I'm talking about. It tells you nothing about cost. If that 30% of complex Python ETL breaks constantly and takes days to fix, while the bash stuff just works, your distribution is irrelevant. You've optimized for the wrong thing.

"Automate the Boring Stuff" is fine for motivation, but it doesn't teach you to measure if the automation actually holds up.


If it's not a retention curve, I don't care.


   
ReplyQuote