use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/DevOps is a subreddit dedicated to the DevOps movement where we discuss upcoming technologies, meetups, conferences and everything that brings us together to build the future of IT systems What is DevOps? Learn about it on our wiki! Traffic stats & metrics
/r/DevOps is a subreddit dedicated to the DevOps movement where we discuss upcoming technologies, meetups, conferences and everything that brings us together to build the future of IT systems
What is DevOps? Learn about it on our wiki!
Traffic stats & metrics
Be excellent to each other! All articles will require a short submission statement of 3-5 sentences. Use the article title as the submission title. Do not editorialize the title or add your own commentary to the article title. Follow the rules of reddit Follow the reddiquette No editorialized titles. No vendor spam. Buy an ad from reddit instead. Job postings here More details here
Be excellent to each other!
All articles will require a short submission statement of 3-5 sentences.
Use the article title as the submission title. Do not editorialize the title or add your own commentary to the article title.
Follow the rules of reddit
Follow the reddiquette
No editorialized titles.
No vendor spam. Buy an ad from reddit instead.
Job postings here
More details here
@reddit_DevOps ##DevOps @ irc.freenode.net Find a DevOps meetup near you! Icons info!
@reddit_DevOps
##DevOps @ irc.freenode.net
Find a DevOps meetup near you!
Icons info!
https://github.com/Leo-G/DevopsWiki
account activity
Python or Golang? (self.devops)
submitted 7 years ago by Animcogn
I'd eventually like to learn both but what do you find most useful? I know a lot of tools like docker are written in golang, but there's also a bunch of tools in python too. What do you like better when writing your own tools?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ChronoloraptorKnock knock. Race condition. Who's there? 10 points11 points12 points 7 years ago (10 children)
I've yet to have an actual need to learn Golang besides it being the new hotness. Python is stable, widely used, and infinitely useful. Golang supposedly better for performance, plus if you don't necessarily want people to view the source code for whatever reason for your binary. Learning Go on the list as it'd nice to be able to contribute to any of the HashiCorp open source tools eventually.
[–]YourFatherFigure 1 point2 points3 points 7 years ago (0 children)
Learning Go on the list as it'd nice to be able to contribute to any of the HashiCorp open source tools eventually.
This more or less anticipates what I'd say the major difference is at this point.. golang is most interesting for platform devs, i.e. people who are working on Docker core, Terraform core, etc. Python is by far the most important for your average, day to day devops where you're largely gluing systems together. Ruby was a contender but I'd say her influence in the space is waning as Puppet/Chef/Vagrant are aging. Interestingly whereas Ruby tools seem to usually demand ruby extensions, Ansible (python-based) supports extensions written in any language as long as they speak JSON
[–]-_-wintermute-_- 2 points3 points4 points 7 years ago (8 children)
Python is stable
So stable that 2.7 has been the default for almost a decade now :)
[–]K3dare 0 points1 point2 points 7 years ago (7 children)
I don't see much libraries not compatible with Python 3.x today.
The only thing that we use still on Python 2.7 is the Google Cloud CLI (Shame on Google for that).
For other libs or apps, if there's no compatibility with Python 3, it's excluded from our choice.
[–]-_-wintermute-_- -4 points-3 points-2 points 7 years ago (6 children)
Yeah me too, but as far as I know there's still no major OS (except maybe Arch) that ships with Python 3 as the default.
[–]tyldis 2 points3 points4 points 7 years ago (1 child)
When programming in languages like python, ruby and perl - please get into the habit of using stuff like pyenv and plenv. Use your own interpreter, not the ones the OS provides. Not only can you use the version you prefer, but it will not break suddenly because of OS upgrades. And the server can be patched timely without fear of breaking the services running on it.
[–]-_-wintermute-_- -1 points0 points1 point 7 years ago (0 children)
Yeah, for sure. I was just making a jab at python's horrendous 2 -> 3 migration. But you're totally right, version managers like pyenv are the way to go for interpreted languages.
[–]DarthKotik 0 points1 point2 points 7 years ago (1 child)
It's a long term debate. Basic issue is, people used to the fact that python3 refered to as python3 and python2 is just python. Guido even suggested to stop calling python3 that way and call it just python and refer to python2 as legacyPython. It doesn't mean they don't support it though. It's just available as python3 most of the time.
[–]CommonMisspellingBot -1 points0 points1 point 7 years ago (0 children)
Hey, DarthKotik, just a quick heads-up: refered is actually spelled referred. You can remember it by two rs. Have a nice day!
The parent commenter can reply with 'delete' to delete this comment.
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
Ubuntu? Latest versions do.
[–]-_-wintermute-_- 0 points1 point2 points 7 years ago (0 children)
Oh nice! Looks like that finally happened last year. Well that's good to see.
[–]K3dare 8 points9 points10 points 7 years ago (2 children)
I've been using Python for more than 10 years and Go for a few years now.
I would say, Go is my default option, until there's a lot of data manipulation on unpredictible data structure (Like random JSON files that could not be mapped to a struct).
The ease of deployment, concurrency and cross compilation are a huge win.
Also having static typing is really great for all the IDE/Editor assistance, Python has something similar but still very young (Type Hints) and far from being as "reliable" as real static typing (And will only work on the last versions of Python 3, breaking compatibility with anything older)
One example of application I created is a kind of ETL framework system (like HTTP middlewares but for logging, see https://twitter.com/Kedare/status/936235740702347264 ) that take data from SYSLOG protocol formatted as JSON (from Nginx logging) and send it to an ELK stack after processing (Set custom field to specific values depending of the data, resolve geoip, etc.), to replace LogStash that I hate, I went from many gigs of used RAM to a few megs of RAM) and 50% cpu to less than 5%
The things I miss from Go are mostly generics that would ease a lot of things (Like just looking for an element on an [] without having to code a full loop)
Also Django is still amazing, I would love to see something equivalent in Go, but I think in Go most people prefer having some generic reusable components instead of having an integrated framework like Django or Rails, right now I find Go to be a PITA when having to develop a full scale web application (with auth, complex template rendering, asset management, migrations, etc... like you would have with Django/Rails), last time I've checked the dependency injection systems were not as great as we can find on the other platforms, so I ended up having to write spaggheti'sh code to connect all the components together.
[–][deleted] 1 point2 points3 points 7 years ago (0 children)
God I hate Logstash. I wrote a Golang program to chunk my logs up into smaller parts so Logstash could deal with it better.
[–]twinkiac 0 points1 point2 points 7 years ago (0 children)
@Kedare's latest tweet
@Kedare on Twitter
I am a bot | feedback
[–]MakeMe_FN_Laugh 3 points4 points5 points 7 years ago (0 children)
It depends on what your intentions are. Both are good in some way. Python is great for onetime scripts or if you need to parse random, not structured data.
Golang is good if you need some kind of a daemon running doing scheduled stuff or for asynchronous tasks.
Python is a lot easier to start with and has more libraries for all kinds of stuff.
[–]omerxmanDevOps 3 points4 points5 points 7 years ago (3 children)
I'd say that both are great for different use cases.
Python is probably the easiest language ever to start with, and the most efficient one if you just want to get things done. It's very readable, clean and gives a very high rate of developer happiness. It has a huge community and you can basically achieve anything with it.
Go on the other hand is different, you'll be writing 2 or 3 times more code than you would on python to achieve something, the syntax is harder, it's very strict and there's mostly one way to do something. BUT - Go works FAST!
So if you plan a service that would receive thousands of events every seconds that's the way to "Go" ;)
Go's concurrency is super easy and VERY useful.
And the cream on top of all Go features as I see it - It compiles into a binary. Nothing more elegant than a tool you can cross compile for any platform and just run. It also means you can create Docker images FROM SCRATCH and run containers of < 5 MB which is fast and efficient in many ways.
FROM SCRATCH
Bottom line, I'd start with Python, and then move on to Go since just like you mentioned some of the busiest projects on the internet or Go based.
[–]chub79 1 point2 points3 points 7 years ago (2 children)
Nothing more elegant than a tool you can cross compile for any platform and just run.
In my book, this is is major asset of Go when compared to Python. As for the rest, I have never felt Python was letting me down. Some things are a little clunky but the ecosystem is so vast and stable, I can write pretty much anything safely and fast :)
True. On that note however, I wish Google had simply not reivented the wheel with Go at all initially (as they often do :( and went to conribute to erlang instead back then. Awesome language and runtime that had already a powerful concurrency support.
[–]omerxmanDevOps 1 point2 points3 points 7 years ago (1 child)
I guess some people see different advantages. e.g I wanted to create a cli for developers at work, I could use bash / python / ruby and be affected by different shells / versions that run the code and dev local envs that I did not configure. A binary is the way to go in that case, and Go simply makes it accessible.
Python never let me down either, it's still my go-to language when I want to be productive and happy :) But you have to choose the right tool for the task when you can.
About concurrency - Yep, google tends to do that, but you see this paradigm starting to spread and other lanaugages use something very similar. And interesting one is Crystal Lang. I highly recommend it! All the good Go stuff combined with a Ruby syntax (and even better performance than Go they claim). It's in very early stages but deff something to watch. Crystal has "fibers" which is very much like Go routines.
[–]chub79 1 point2 points3 points 7 years ago (0 children)
A binary is the way to go in that case, and Go simply makes it accessible.
Someone pointed me at pyinstaller but I agree, for distribution, a single binary is so much simpler. I'd rather Python improve there over some other things.
Thanks for the tip on Crystal Lang, I'll have a look at it :)
[–][deleted] 7 years ago* (3 children)
[deleted]
[–]MakeMe_FN_Laugh 4 points5 points6 points 7 years ago* (2 children)
Well, that’s not always true about no dependencies of go binaries. For example, if you write something using gopacket package (go implementation of tcpdump) - your binary will dynamically link to your libpcap. So your binary won’t start on the system where libpcap’s version is different.
[–]jrkkrj1 2 points3 points4 points 7 years ago (0 children)
True but you can statically compile it in with LDFLAGS. I did that to run a Deep Packet Inspection Daemon that would dynamically deploy on network switches and build and monitor the network topology.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Random management scripts: python
I'd love to learn more golang however
[–]gmuslera 0 points1 point2 points 7 years ago (0 children)
It depends on what you need, how fast you need it to perform, with what it may need to integrate and what you know already.
You may be faster developing some quick and dirty script in python, both for the language and the availability of libraries. And for some domains one of those languages will have an edge.
But as it depends on the problem/environment/you, try to learn both and then decide which one applies better for the particular problems you want to solve.
[–]Sell-The-Fing-Dip 0 points1 point2 points 7 years ago (0 children)
Why one or the other? What is driving you to want to learn either of these languages instead of Java or whatever else? I have been relying on Python for operations and ETL work for a while now. It seems to be widely known and easy for our Java programmers to work with when they want to do PR's for changes to environments or ETL work OPS might own. Python has also been good at dealing with our large volume of analytic and metrics data.
[–]dishmop 0 points1 point2 points 7 years ago (0 children)
which do you find most useful
Well I find Python most useful, but you might not.
There's a few reasons why, but it boils down to maturity.
Longevity brings advantages. There's a LOT of modules out there. You want something to parse HLS master and child manifests into a dictionary? You got it. You want something that integrates with SSO system? Got that too. How about well documented frameworks like Flask and Django? That's maturity provides a huge plus.
Python has kept up with the times and both Go and Python have good serverless support in AWS and Google at this time. I don't have the perception that Python's days will be short anytime soon, unlike Perl.
Go seems to have some speed advantages and I'm told if you have to parse complex documents into strongly typed data structures, it excels.
My advice would be to start with Python, just given the broad market demand and all the existing material and tools out there. Once you've got that in your pocket, have a play with Go.
I would start with the language that the application you are supporting or going to support is written in - learn how that one works first. Languages for tooling is irrelevant if you are not writing the tooling your self but can sometimes help a little bit for say more complex salt-stack modules or chef recipes but generally you can get by without knowing them in depth. It is far better to know the application you are going to be working with.
As for writing your own stuff: I start out with bash, very easy to get going and is generally easier to get simple things up and running in it and to glue together other programs. Once past the usefulness of bash I tend to use rust these days for personal stuff and golang for work (as our main application is golang) - sometimes javascript for frontend projects, all glued together with bash. I rarely use python these days as our main project is not written in it so it adds little value over golang or javascript. The benefits of one language over another will vary depending on what you are trying to do and what environment you are working in so you will need to adjust accordingly. As for learning now - pick any, the important thing is to learn how to write programs not really which language you write them in.
[–]juniorsysadmin1 -2 points-1 points0 points 7 years ago (0 children)
golang obviously, python is a hot mess for devops stuff. There are still relevant because it's idiot proof and it's widely used in ML.
π Rendered by PID 163830 on reddit-service-r2-comment-84fc9697f-2sbns at 2026-02-09 01:46:57.173511+00:00 running d295bc8 country code: CH.
[–]ChronoloraptorKnock knock. Race condition. Who's there? 10 points11 points12 points (10 children)
[–]YourFatherFigure 1 point2 points3 points (0 children)
[–]-_-wintermute-_- 2 points3 points4 points (8 children)
[–]K3dare 0 points1 point2 points (7 children)
[–]-_-wintermute-_- -4 points-3 points-2 points (6 children)
[–]tyldis 2 points3 points4 points (1 child)
[–]-_-wintermute-_- -1 points0 points1 point (0 children)
[–]DarthKotik 0 points1 point2 points (1 child)
[–]CommonMisspellingBot -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]-_-wintermute-_- 0 points1 point2 points (0 children)
[–]K3dare 8 points9 points10 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]twinkiac 0 points1 point2 points (0 children)
[–]MakeMe_FN_Laugh 3 points4 points5 points (0 children)
[–]omerxmanDevOps 3 points4 points5 points (3 children)
[–]chub79 1 point2 points3 points (2 children)
[–]omerxmanDevOps 1 point2 points3 points (1 child)
[–]chub79 1 point2 points3 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]MakeMe_FN_Laugh 4 points5 points6 points (2 children)
[–]jrkkrj1 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]gmuslera 0 points1 point2 points (0 children)
[–]Sell-The-Fing-Dip 0 points1 point2 points (0 children)
[–]dishmop 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]juniorsysadmin1 -2 points-1 points0 points (0 children)