News for hackers. Stuff that matters.
Re:The Rise of Microsoft Visual Studio Code by johngalt on Thursday December 06, 2018 @04:13PM (#18622296)
> Engineers who use Go are also especially strong. If you know why, please let me know.

Because there is almost no reason to learn Go. Most shops want JS/Java/Python/C# etc... The primary reason to learn a language like Go is because you want to for it's own sake.

It's not that you must learn Go in order to be good, or that knowing Go makes you better. Rather it's difficult to be bad and still have the desire/interest to spend time learning something unnecessary.

Re:The Rise of Microsoft Visual Studio Code by eindiran on Thursday December 06, 2018 @04:25PM (#18622395)
This is what Paul Graham calls the Python Paradox; namely that in 2004, when Python jobs were relatively more rare, you could find smarter Python engineers than Java engineers for any given project.

"[I]f a company chooses to write its software in a comparatively esoteric language, they'll be able to hire better programmers, because they'll attract only those who cared enough to learn it. And for programmers the paradox is even more pronounced: the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job."

http://www.paulgraham.com/pypar.html

Re:The Rise of Microsoft Visual Studio Code by ChrisCinelli on Thursday December 06, 2018 @06:56PM (#18623774)
I think that's exactly it. The problem is when these articles come out and everybody try to learn Go and use VS Code so they think can become smarter or at least being perceive as such :-P
Re:The Rise of Microsoft Visual Studio Code by pvg on Thursday December 06, 2018 @04:32PM (#18622471)
Both of these are still just very roundabout ways of telling yourself you're awesome because of whatever mildly unusual thing you think you might be doing.
Re:The Rise of Microsoft Visual Studio Code by bitcrusher on Thursday December 06, 2018 @08:51PM (#18624446)
And this comment is just a subtextual justification for making sure you still feel valued for not doing anything unusual.

This could go round and round. The point is that there SEEMS to be a correlation with people who learn things for the sake of learning them and folks who do well at exercises that test for adjacent skills.

Re:The Rise of Microsoft Visual Studio Code by pvg on Thursday December 06, 2018 @09:20PM (#18624592)
you still feel valued for not doing anything unusual

I didn't really express any thoughts or feelings about doing unusual things, real or perceived. Doing unusual things can be great! Telling yourself you are awesome can also be great! I do think, though, that the type of thought expressed in the "The Python Paradox" and related writings (say, the bit about blub language programmers) is pretty lousy. It was lousy then and has aged even more poorly.

Re:The Rise of Microsoft Visual Studio Code by antt on Friday December 07, 2018 @09:26AM (#18627885)
One day you wake up and have your own custom firmware on your hacked together laptop which is running a Linux that's using three different package managers on top of custom built kernel and x.

Each step seemed like a good idea but when taken together you wonder what when wrong and when.

Re:The Rise of Microsoft Visual Studio Code by vram22 on Thursday December 06, 2018 @05:15PM (#18622895)
He he, nice contrarian opinion. Me like, mucho (and gracias). The other side may also be true, but this one can be too. Folks on here and elsewhere (juveniles of all ages), time to learn about the age-old saw that there is more than one way of looking at it / different strokes for different folks / circumstances alter cases / get out of your echo chamber / filter bubble / etc.
Re:The Rise of Microsoft Visual Studio Code by SiVal on Thursday December 06, 2018 @08:44PM (#18624423)
"Because there is almost no reason to learn Go."

No, that's not it. It's that if you can only learn one programming language, Go is not a very good choice, so those who learn Go are almost always multilingual ("lingual" as in programming languages, not natural languages). Python and JavaScript are Swiss Army knives with outstanding ecosystems that make them excellent choices if you can only afford one tool. There are plenty of reasons to learn Go but, as a more specialized tool, it makes a better component of a nice toolset than a solitary multitool.

My anecdotal experience says that 1) most programmers are monolingual, 2) almost all Go programmers are multilingual, and 3) the average multilingual programmer is a better programmer than the average monolingual programmer for various reasons, so the average Go programmer is better than the average programmer. And, by that logic, the average Rust, Haskell, Erlang, Lisp, etc., programmer would be, too.

Re:The Rise of Microsoft Visual Studio Code by danans on Thursday December 06, 2018 @11:58PM (#18625251)
> My anecdotal experience says that 1) most programmers are monolingual,

This surprises me as I've never worked on a nontrivial system that's also a monolingual system.

There's nearly always another language to use to get the job done, whether for configuration, scripting/automation, or because backends and UIs are written in different languages, especially for internet-based software.

Re:The Rise of Microsoft Visual Studio Code by dagw on Friday December 07, 2018 @03:10AM (#18625924)
There's nearly always another language to use to get the job done

Sure, but in most cases programmers spend most of their time only in one 'part' of the system and only really have to know the language that part of written. In general it doesn't matter if the back end server is written in Lisp, Java or APL, as long as it talks to my part of the system in the way it's supposed to.

Re:The Rise of Microsoft Visual Studio Code by danans on Friday December 07, 2018 @10:12AM (#18628267)
> in most cases programmers spend most of their time only in one 'part' of the system

Perhaps that's a reflection of the structure of the organizations they work in.

Anyways, the other cause of multilingualism is switching jobs, projects, or problem spaces. All three of those often involve a language switch.

Re:The Rise of Microsoft Visual Studio Code by tatami on Friday December 07, 2018 @02:48AM (#18625835)
Isn't most software rather trivial? Like in copying strings around.
Re:The Rise of Microsoft Visual Studio Code by mrdoops on Thursday December 06, 2018 @04:29PM (#18622445)
Go is a language designed to take CS college graduates to productive engineers at Google with as little fuss as possible. Considering it was designed for an organization in the scope of Google, it's less likely to be the best option for something like a startup, small business, or even a medium size business.
Re:The Rise of Microsoft Visual Studio Code by mawburn on Thursday December 06, 2018 @05:03PM (#18622771)
I feel like you should spend some time with Go. If I were building a startup, I would probably choose Go for core infra for being able to move quickly as a developer and write incredibly performant code with about as much mental overhead as most dynamically typed languages.

Anecdotally, I've seen it replace Java in quite a few small and medium sized established companies.

Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Thursday December 06, 2018 @06:20PM (#18623505)
I feel like Python is your pepperoni pizza can't go wrong option for almost anything.

Go feels similar but younger. I love languages with big standard libraries. Just need their package management story to settle down for a while.

There's something wonderful about a language being so popular and around for so long that there's plenty of resources and answers on just about anything. I think that's a core part of what I'm missing from Go.

Re:The Rise of Microsoft Visual Studio Code by nothrabannosir on Thursday December 06, 2018 @07:11PM (#18623880)
Python can go wrong for large codebases. There are exceptions, of course, but if I focus on the consensus: large code bases in a dynamic language have an anecdotally significant likelihood of becoming unmaintainable. It's a glass ceiling that almost everyone I've met, who has done serious work with a dynamic language, has encountered.

There are ways to deal with it, but it requires rigorous discipline, and resisting Python's dynamic siren call earlier on in the process.

Golang naturally guides you into a style of programming which scales. You're not fighting the language (or your own inclinations) to avoid getting entangled later on.

Everything has exceptions†, you can shoot yourself in the foot with anything, yes. But, reasonably, it's about the relative struggle to end up in a similar place. Which is higher for Golang initially, but higher for Python later on.

Not trying to turn this into a Python vs Go thread; they both have their place. But Python can definitely go wrong, in an area significant to many people.

† Except Go... T_T

Re:The Rise of Microsoft Visual Studio Code by nikanj on Thursday December 06, 2018 @08:14PM (#18624256)
Most of the workarounds seem to boil down to de facto static typing in function signatures. That is, using annotations / rigidly formatted comments to provide the type information necessary for IDE support.
Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Thursday December 06, 2018 @07:30PM (#18624013)
Yeah I'm inclined to agree the more I think about it.
Re:The Rise of Microsoft Visual Studio Code by meowface on Thursday December 06, 2018 @06:26PM (#18623556)
If Go adds generics and a smoother method of doing error handling, I could see it eventually taking Python's place. It already is doing so to an extent, but with those features plus everything else it can do better than Python, it'd be tough to beat. 95% of my programming is in Python, and I honestly don't really enjoy coding in Go that much, but with those changes I could see myself switching.
Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Thursday December 06, 2018 @06:29PM (#18623575)
Same. 99% of my back-end and robot code is Python. Maybe this is a grass is always greener kind of thing but I'm hitting projects of a size where I miss static typing.

I will say that asyncio is amazing and really solves concurrency for me. But Go looks like you also get parallelism without a lot of work.

Re:The Rise of Microsoft Visual Studio Code by 1996 on Friday December 07, 2018 @08:31AM (#18627454)
Asyncio is good but it will not give you true parallelism: asyncio still uses the GIL, on a single thread
Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Friday December 07, 2018 @02:46PM (#18630898)
Yep. Concurrency is not parallelism. But a lot of the time it's just not necessary.
Re:The Rise of Microsoft Visual Studio Code by pjmlp on Friday December 07, 2018 @03:46AM (#18626055)
On the other hand if Python community had more love for PyPy, to follow up on JavaScript and Julia footsteps, maybe that wouldn't be even an issue.
Re:The Rise of Microsoft Visual Studio Code by closeparen on Thursday December 06, 2018 @11:54PM (#18625232)
Go targets a number of performance sensitive systems programming contexts where Python would be completely inappropriate.

Its beauty is that there is so little to it. You don’t need StackOverflow to discover/debug a clever way of expressing something because there is no clever way. It feels limiting until you learn the idioms.

Package management has indeed been extremely painful, particularly in the Glide era, but Dep and VGO are both solid.

Re:The Rise of Microsoft Visual Studio Code by netheril96 on Thursday December 06, 2018 @08:50PM (#18624442)
Python is wrong for anything performance sensitive (unless the performance part is already written in C/C++, like TensorFlow).
Re:The Rise of Microsoft Visual Studio Code by goliatone on Friday December 07, 2018 @02:06AM (#18625689)
Performance sensitivity is a rather relative line, I understand your point but I’ve heard people argue that C was the performance sensical choice as opposed to C++, or assembly rather than C. I love python but I wouldn’t use it for everything. I really enjoy Go but the use cases for me are smaller than most people I know that use Go daily. At work we have to use Go and I’ve had to make the argument to use JVM for some services and Erlang/Elixir for other use cases. I could’ve done everything in Go, but it really felt more dogmatic than pragmatic
Re:The Rise of Microsoft Visual Studio Code by Nimitz14 on Thursday December 06, 2018 @05:36PM (#18623121)
> I would probably choose Go for core infra for being able to move quickly as a developer

At the company I used to work at it took nearly a 1000 lines to replace an 80 line bash script. So I can't help but laugh at this statement.

Re:The Rise of Microsoft Visual Studio Code by barbecue_sauce on Thursday December 06, 2018 @06:05PM (#18623374)
I've helped port some bash-based CLI tools to Go. The amount of code produced was pretty similar, just some overhead for typing and adapting some of the `awk` and `sed` functionality to be self-contained in the program. What kind of stuff was this 80 line bash script doing that resulted in over 12.5 times more code?
Re:The Rise of Microsoft Visual Studio Code by feketegy on Thursday December 06, 2018 @05:51PM (#18623243)
Since when LoC is a meaningful metric?
Re:The Rise of Microsoft Visual Studio Code by dogma1138 on Thursday December 06, 2018 @06:45PM (#18623689)
Since always but it depends on what you actually take into account.

More LOC means more opportunities for error, and more resources needed to review that code and more time required for a new developer to get familiar with the code base.

That said if you have 85 LOC vs 1000 it usually means that the 85 LOC “app” used a metric ton of external dependencies which are on their own a good source for problems.

When comparing apples to apples (as in both apps use dependencies equally) I don’t see how such delta can be caused by using a different language, even using assembly would likely not cause this much inflation.

Re:The Rise of Microsoft Visual Studio Code by feketegy on Friday December 07, 2018 @04:34AM (#18626253)
I LOLed on this one :) I can literally double LOC in any project, just by putting { } on separate lines
Re:The Rise of Microsoft Visual Studio Code by dogma1138 on Friday December 07, 2018 @05:31AM (#18626487)
If you LOLed at this one you likly don’t understsnd how LOC are counted.
Re:The Rise of Microsoft Visual Studio Code by TheOtherHobbes on Friday December 07, 2018 @03:35AM (#18626008)
How well did the bash script handle exceptions?
Re:The Rise of Microsoft Visual Studio Code by vrazj on Thursday December 06, 2018 @05:52PM (#18623247)
I can replace those 1000 lines with a bash script of 1 line that just calls the Go program ^_^
Re:The Rise of Microsoft Visual Studio Code by akerro on Friday December 07, 2018 @03:42AM (#18626035)
I really feel like learning Go and Rust made be better Java developer.
Re:The Rise of Microsoft Visual Studio Code by golergka on Friday December 07, 2018 @02:05AM (#18625686)
Wouldn't it be Rust or Haskell by this logic?
Re:The Rise of Microsoft Visual Studio Code by Shorel on Friday December 07, 2018 @04:54PM (#18632047)
In that case, D developers should all be programming geniuses.

Because even less people use D than they use Go. :)

Re:The Rise of Microsoft Visual Studio Code by Apocryphon on Thursday December 06, 2018 @06:03PM (#18623360)
Does this hold true for Dart, one wonders.