Junior — Middle
What programming language do you usually use for your projects?
sobes.tech AI
Answer from AI
In my projects, I usually use a programming language that best fits the task and infrastructure. In the context of DevOps, this often includes:
- Python — due to its simplicity, a large number of libraries for automation, working with APIs, scripting, and tools.
- Bash — for writing automation scripts at the operating system level.
- Go — for creating high-performance and cross-platform utilities.
For example, for automating deployment and infrastructure management, I often write scripts in Python using libraries like paramiko for SSH or boto3 for AWS.
Here's an example of a simple Python script for SSH connection:
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('hostname', username='user', key_filename='/path/to/key')
stdin, stdout, stderr = ssh.exec_command('ls -l')
print(stdout.read().decode())
ssh.close()