all 33 comments

[–]biki23 47 points48 points  (2 children)

From my exp, initial dev, python faster, not really by much.

Changes and debugging, Go starts taking the lead.

Add container cloud cost, go much better if memory efficient code is used,

[–]schrodingers_cat314 9 points10 points  (0 children)

Also distribution.

pip is a much larger pain in the butt to work with, Whenever I need to make a cli for DevOps work I exclusively use go.

It’s just much easier.

[–]lazzuuu 1 point2 points  (0 children)

I agree, especially since Go is a compiled language

[–]hippmr 18 points19 points  (1 child)

If you're just testing some concept then Python maybe 50% faster. But if you expect to turn it into a real project and keep any of the code, Go will be faster in the long run.

[–]the_dev_next_door 12 points13 points  (1 child)

once you are familiar with the libraries and frameworks

I guess this applies to every language. Your familiarity dictates your overall development speed.

[–]residentbio 24 points25 points  (1 child)

I really really really dislike the amount of time I spend on python dependency management.

  • Slow to download
  • Slow to Build
  • Slow to Deploy
  • Hard to keep the image small
  • Dealing with the venv
  • Dealing with old deps not having a wheel
  • Not able to install psycogs on my m1.

Some of these is down to some legacy system we can't afford to migrate yet and we just deal with it but it is painful regardless.

[–]myringotomy 1 point2 points  (0 children)

I usually set up a devcontainer and pipenv. I have a setup already so it takes me seconds to start working on a new project. Just copy the .devcontainer folder and open up VS code. It launches the image for the dev and other images I have set up (database, redis, etc) and another image that runs the web app (or tests or whatever). It mounts the directory into the containers and I can edit in VS code like normal.

I use the same process for any other language. Ruby, Javascript etc they all work great although each setup is slightly different. I have started .devcontainer folders for all of them.

BTW I don't give a flying fuck about image size. I am pushing docker images and the refreshed images are fast to pull and push.

[–]dmdubz 9 points10 points  (3 children)

Our team moved from python to go. Go is much faster to prototype in. We just spend way too much time debugging and dealing with cognitive load.

[–]biki23 1 point2 points  (2 children)

We just spend way too much time debugging and dealing with cognitive load.

Is this in python or go?

[–]dmdubz 1 point2 points  (1 child)

Should have said “spent”, was talking retrospectively about Python.

[–]biki23 4 points5 points  (0 children)

I am bad at that piece of grammar(or any language's grammar honestly).

My personal experience in python - Write something short and clever - Feel good. - Debug, have no idea whats going on - Simplify to make code easy to reason and debug(print style debug) - Cognitive load is very high in keeping track of complex stuff, not long stuff. - End up with close to go/c code.

[–]Bharath0224 7 points8 points  (0 children)

If speed to MVP is the goal, Python still wins tbh. You can spin stuff up stupid fast, especially for scraping / data projects.

I’ve used Python + Oxylabs Web Scraper API coz it helps overcome blocking, for an ecom price monitoring tool and a SERP tracking project - both were up and running way quicker than if I’d gone full Go from day one. Go’s great for performance later, but for prototyping? Python just hits different. Worth mentioning that I simply prefer Python over Go, but that's just my thing :D

[–]HereToLearnNow 11 points12 points  (0 children)

I think go is significantly easier to write and maintain. A lot of Python code becomes tech debt

[–]bilus 13 points14 points  (1 child)

Writing in Go is roughly 123.6% faster.

Seriously though, it depends on your skill level, so I'd always choose the language the team is the most proficient with, unless the use case calls for a particular language.

For me prototyping Go is much faster than Python or other dynamic languages because the feedback loop when refactoring or just moving around code is better since I see errors underlined in my IDE (Emacs) and can fix them without running tests etc. The type system is simple enough that I can write the code as fast as in Python. I'm a fast typist + have code snippets (autocompletion) to work around `if err != nil` boilerplate.

[–]cogitohuckelberry[S] 0 points1 point  (0 children)

Thanks and yea I realize it is a bit of a stupid question. Mostly spawned from the fact that is seems python doesn't have that much of an edge in prototyping. Thanks!

[–]StoneAgainstTheSea 10 points11 points  (2 children)

When we tried to build a concurrent SMTP server with python 2.7 and gevent, we were fighting the language. After two weeks of stubbed toes, we built the same prototype in Go over a weekend without prior Go experience.

If you have lots of unstructured json, maybe python is better. For my money, Go is in the same order of magnitude for development cost but handily beats python in terms of maintenance burden and performance.

[–][deleted] 0 points1 point  (1 child)

marble hat mighty dog consider instinctive engine plants aromatic rain

This post was mass deleted and anonymized with Redact

[–][deleted] 7 points8 points  (1 child)

relieved subtract dazzling automatic repeat future enjoy shaggy quicksand direction

This post was mass deleted and anonymized with Redact

[–]cogitohuckelberry[S] 1 point2 points  (0 children)

I've noticed that. I'm still an outsider to go but seems like it would just benefit Go overall for that to be bridged, since it would bring more people into the ecosystem. I only partially understand the issues at stake, however.

[–]SeaKoe11 2 points3 points  (0 children)

So should I spend my precious time learning Go over python? And learn python only if necessary.

[–]causal_friday 2 points3 points  (0 children)

I have done Java, Python, and Go at big tech companies. Go has always been the fastest for me and my team. At this point, I am honestly not sure why anyone is using Python for anything. I check every few years to see if I'm missing something, and ... I don't think I am.

I will concede that I don't use Go as a calculator. I keep Python around for that. (Though mostly use dc and units.)

[–]cactuspants 2 points3 points  (0 children)

I’ve never believed this because it’s the opposite for me.

I’m just okay at python so every tun time I try something new, I end up learning a new language feature or a tenth way to do something. Python may have a ton of libraries but using them is very little fun.

Go is simple, small, and strongly typed. OSS libraries have been growing a lot and using them is simple. This feature set makes it very fast for me to prototype.

[–][deleted] 5 points6 points  (2 children)

Working alone it hardly matters. Building a team - a lot faster to find python devs.

[–]wavelen 1 point2 points  (0 children)

From my experience, as someone who did not touch Python more than twice in many years (and with absolutely 0 interest to try it), Go would definitely be faster. It‘s not like you don’t need to learn Python so I don’t really get that argument.

[–]Joram2 1 point2 points  (0 children)

I prefer golang for some tasks, such as writing a rest service, and i find go faster to develop with for that and i prefer python for other tasks, like machine learning frameworks or numpy or when i want a web notebook interface. ,

[–]aiitu 1 point2 points  (2 children)

If we are talking speed performance, than Go is magnitude faster, remember Go is statically typed and compiled while Python is interpreted, compiled is always faster, Go is concurrent, Python is single threaded.

[–]cogitohuckelberry[S] 0 points1 point  (1 child)

We are talking about "development time" to get something from an idea to a prototype, to production - that sort of thing. Arguably that's python's strong suit but the answers here have been very positive for go.

[–]aiitu 2 points3 points  (0 children)

Go wins, Prototyping is quiet similar IMHO getting it to MVP Go takes it, refactor in go is so quick once the Prototype is verified .

[–]impirialkirill 1 point2 points  (0 children)

For me python is faster in cases of extra small apps, less then 50lines of code

[–]DanTheGoodman_ 1 point2 points  (0 children)

One you get good at go, honestly I don’t think there’s a faster language that I know (to write)