3 ms·
For me, change happens when I see a real improvement in almost every way possible which is usually determined by building a few things and letting my brain simm
by nickjj 7y ago
For me, change happens when I see a real improvement in almost every way possible which is usually determined by building a few things and letting my brain simmer on the technology as a whole so I can look at it with a logical and unbiased perspective.
I remember looking at Node when it first came out and got mildly excited, but that excitement quickly went away after writing a couple of small apps with it. It just wasn't for me. The same thing happened with Go. I didn't see enough wins to switch over to using either of them for building web apps.
On the other hand, for me Rails and Flask stood the test of time. Nowadays I'm working with Phoenix and I'm past the hype phase and it looks to be another winner. But in all 3 cases (Rails, Flask, Phoenix) I typically don't switch away from them for good. They just become another tool that I know. Of course I will gravitate towards the one I'm the most happy writing code with, but it's not a black / white progression from 1 to the other.
I don't think there's really a definitive answer on when to change. Like 3 weeks ago I picked up a Flask contract and it was a pleasant experience, even though I'm using Phoenix to build a side project currently. You don't always need to throw the old thing out. You can use multiple technologies in harmony. You change when you start dreading writing code in the old thing, which is very user specific. In other words, write more code and you'll quickly find out what you like and dislike.
- malvosenior 7y agoGo is a compiled language and Ruby/Python are interpreted scripting languages. There are domains where it's a much more appropriate choice (distributing binaries, performance sensitive code). The type system is also quite nice vs. dynamic typing (in most situations). It's weird to see people comparing Go and Python in this thread as they solve entirely different problems and shouldn't be interchangeable, not due to developer preference but due to fundamental features of the language.
- nickjj 7y ago> It's weird to see people comparing Go and Python in this thread as they solve entirely different problems and shouldn't be interchangeable, not due to developer preference but due to fundamental features of the language. Yes but when Go first came out, a lot of people jumped on the bandwagon and started proposing they would use Go for web applications too. There's definitely some overlap in building web services with Go and Python so I wouldn't say they solve completely different problems. Go and Python are also pretty related for command line apps too. You could totally use either one to build a CLI tool.
- malvosenior 7y ago> Go and Python are also pretty related for command line apps too. You could totally use either one to build a CLI tool. Distribution of Go CLI apps is much easier as you don't need to have your end users install the 3rd party libraries themselves.
- nickjj 7y agoYeah totally, for using CLI tools I much prefer using a Go binary too because it doesn't involve installing anything. But in practice as a web developer who occasionally writes CLI scripts, I personally didn't think it was worth going all-in with Go for that. Especially not when for smaller scripts you can have a Python or Bash script in 1 file[0] and it will run on all major platforms without installing 3rd party libraries too. Most major distros of Linux, MacOS and WSL on Windows have both Python and Bash available. For my use cases that's good enough. [0]: For example just the other day I released a ~200 line self contained Python script to solve a problem I had which was figuring out what changed between 2 web framework versions: https://github.com/nickjj/verdiff https://github.com/nickjj/verdiff
- falcolas 7y agoGiven the broad capabilities of the Python first party libraries, you can do a lot of work without 3rd party libraries. It’s not in as much fashion as it was 10+ years ago, but it’s still quite doable.
- cutler 7y agoAs far as I'm aware Go doesn't return the exit status of a process the way Ruby and Python do. Surely this is a big disadvantage for CLI scripts?
- malvosenior 7y agoSure it does: https://gobyexample.com/exit https://gobyexample.com/exit If you mean Go can't read the exit status of a command it runs, that's incorrect as well: https://golang.org/pkg/os/exec/#pkg-overview https://golang.org/pkg/os/exec/#pkg-overview
- DougBTX 7y ago> fundamental features of the language The thing is you’re right, Go compiling to a self-contained binary is different from a folder of .py scripts. But both can be deployed into production. The deployment steps are different but the outcome is the same, so they can be used interchangeably.
- malvosenior 7y agoIf you use third party Python libraries, the end user is going to have to install them too. Python really isn't a great language to be building consumer distributed command line apps in. I think a lot of this discussion is focused around custom software or backend software, but for a publicly distributed binary, Go or any other compiled language is much better than Ruby or Python (and especially Javascript).
- DougBTX 7y agoThat isn't quite true re Python, eg https://stackoverflow.com/questions/2933/how-can-i-create-a-directly-executable-cross-platform-gui-app-using-python https://stackoverflow.com/questions/2933/how-can-i-create-a-... Go might be a special case actually, as it was designed to be a "boring" language to reduce the cost of technology choice. But it is completely interchangeable with similar programming languages (like Python) so evaluating the cost of it vs something else is still a very reasonable thing to do.
- liveoneggs 7y ago> Ruby/Python are interpreted scripting languages This is not quite right since they both compile to bytecode and execute in a virtual machine shell scripting is, probably, the very rare example of "interpreted"
- malvosenior 7y agoPython can be compiled to bytecode, but that's not the default or standard.
- falcolas 7y agoIt occurs with every execution, if you don’t pre-compile it. That’s what the .pyc files are. It also does it with the “main” file, but it just keeps that in memory instead of writing it to disk.
- deleted 7y ago[deleted]
- crimsonalucard 7y agoThey do overlap. I don't see how someone can be confused about this at all because the overlap is obvious. Python and golang overlap for http webapps or apis. They both can and often are used for this purpose.
- malvosenior 7y agoGo has other problem domains it is appropriate for, but I agree in this domain there is some overlap. Go and Python have very different performance characteristics though, so in that sense they're not really comparable.