Earlier quoted context omitted.
> Why would I care if a requirement is direct or a dependency? If it's a dependency it's a requirement. Period. Let's say I need package A. And, package A depends on package B, but, I'm not otherwise using package B. 1. I want to say that I need package A, >=1.0 and 2. When I deploy to production, I want to make sure that the deploy is repeatable. If the last time I deployed, I had package A==1.2.3 and B==4.5.6, then…
Ok, but still, why should I care if a package listed in requirements is dependency? What difference does it make in the real world? And `pip freeze > requirements.txt` writes out version of the package that `pip install` later installs. Very very seldom has this ever caused problems and I've been doing Python for over 8 years. I just really don't get the "problems" you see here, they seem pedantic and theoretical rat…
Why is a Java guy so excited about Node.js and JavaScript?
101–110 of 117 posts
Re: Why is a Java guy so excited about Node.js and JavaScript?
#102Earlier quoted context omitted.
Dependencies in python has evolved a lot in the last 2 years. You can use a simple setup.cfg to make them, and you can use a wheel like a jar if you want.
Unless C libraries are involved. Which is almost always the case.
Second, wheels allow installing c dep tranparently now. And the top 20 c dep have wheels for windows, mac and most linux.
Re: Why is a Java guy so excited about Node.js and JavaScript?
#103Earlier quoted context omitted.
I’m not so sure about that. I see node getting more and more traction these days. In 2012 it was a hipster tech, in 2018 it’s actually starting to see its way into production. At least around here, my own place included. We’re a .net shop, like half the country I live in, but I could’ve written a somewhat similar story as the author. Not exactly similar, I don’t think NPM is really better than maven or nuget and comi…
.NET Core took a lot of ideas from the node platform. Have you tried this?
Re: Why is a Java guy so excited about Node.js and JavaScript?
#104Earlier quoted context omitted.
I’m not so sure about that. I see node getting more and more traction these days. In 2012 it was a hipster tech, in 2018 it’s actually starting to see its way into production. At least around here, my own place included. We’re a .net shop, like half the country I live in, but I could’ve written a somewhat similar story as the author. Not exactly similar, I don’t think NPM is really better than maven or nuget and comi…
.NET Core took a lot of ideas from the node platform. Have you tried this?
So it was a terribly expensive poc, because our most expensive resource is the time developers/operations spend. I mean, core is more performant than node technically, but as far as cost-efficiency goes, time to market is just much more important than technical performance in our organization. We have a lot of iron, and we don’t have a lot of users. We’re a muniplacity of average size after all, the most simultaneous visitors we’ve ever had across every system we operate is in the tens of thousands.
As far as development goes, I don’t think there is much difference between core and standard, but I’ll admit that I haven’t looked into it since 1.0.
We’re in this weird spot where we’re using more and more powershell and azure orchestration for back-end services that used to be powered by C#. A lot of that has also moved from development to operations, so that development is mainly focused on building APIs, working with data-sets or building various minor web/mobile apps, and Node + JS is just working out better than everything else.
We’ve tried core, we’ve tried Django and flask, we’ve tried a bunch of other stuff, but for getting an app up and running the same hour you start building it? Well, node just works for us.
I’m not saying node or JS are better than .Net though, I don’t think it is and I’d still prefer Java or C# if I was building something major.
Re: Why is a Java guy so excited about Node.js and JavaScript?
#105Earlier quoted context omitted.
Unless C libraries are involved. Which is almost always the case.
First, no it's not. I just checked. 1 out of 12 projects on my laptop have c dependancies. Second, wheels allow installing c dep tranparently now. And the top 20 c dep have wheels for windows, mac and most linux.
However, how many projects still have "psycopg2" in their setup.py (or is it requirements.txt? ;) instead of "psycopg2-binary"? I just found out that the latter exists when I checked PyPI.
Re: Why is a Java guy so excited about Node.js and JavaScript?
#106I develop a very complex, 500K+ LoC Java application. It implements a natural language sentence parser that is integrated with a specialized lossless data compressor. I use: - No IDE, just a simple text editor - No ORM, hand-written SQL code - My build tool is a Python script that marshals a javac call - I have just a few JAR file dependencies, which are checked into the repo - My own simple unit test and integration…
What made you create your own build tool rather than use Maven or Gradle? Ditto for the unit tests; why does JUnit not fit you?
Re: Why is a Java guy so excited about Node.js and JavaScript?
#107Earlier quoted context omitted.
First, no it's not. I just checked. 1 out of 12 projects on my laptop have c dependancies. Second, wheels allow installing c dep tranparently now. And the top 20 c dep have wheels for windows, mac and most linux.
You are right, "almost always the case" was a baseless claim and binary wheels are better than nothing. However, how many projects still have "psycopg2" in their setup.py (or is it requirements.txt? ;) instead of "psycopg2-binary"? I just found out that the latter exists when I checked PyPI.
It's also for me a way to acknowledge the huge work the community has been putting into fixing what's been asked.
Re: Why is a Java guy so excited about Node.js and JavaScript?
#108It's not Java, it's the java culture. Yes, Maven and Gradle are weirdly complex, but they are workable. And .jar files are just downright amazing compared to most other things (I'm looking at you madman Python dependencies!) Hint: maybe you could come up with something like npm for Java ? Maybe it's waiting to happen? And Javadocs are mundane but still better than 'nodocs' which is the standard on Node.js which reall…
Dependencies in python has evolved a lot in the last 2 years. You can use a simple setup.cfg to make them, and you can use a wheel like a jar if you want.
That's not so much the issue - as Python package/dependency problems are not so much a problem of 'how it works' - it's an issue because nobody is on the same page. It's byzantine.
If python dependencies boiled down to 'point to a directory' well then fine, everything would work that way and we'd build tools around it, docs would be clear etc. etc..
But as someone who uses Python seldom and loves the syntax, I generally stay away from it mostly for that reason.
And lack of typing which is obviously another discussion.
Re: Why is a Java guy so excited about Node.js and JavaScript?
#109Re: Why is a Java guy so excited about Node.js and JavaScript?
#110Earlier quoted context omitted.
What made you create your own build tool rather than use Maven or Gradle? Ditto for the unit tests; why does JUnit not fit you?
I only introduce new dependencies into my system when I see them as strictly necessary. I am completely satisfied with my alternative implementations of those components (this is in contrast to the IDE question, where I at least see the benefit of tools like autocomplete that the IDE provides, but choose not to use it because the benefit of simplicity is greater). Given the rage and anger the OP directs against Maven…
(I did write my own Servlet engine for a project once, and it was faster than Jetty, and had better GC characteristics at the time, but in the end I ditched it for Jetty as I didn't want to maintain a complete HTTP implementation - that wasn't key to the project. The extra performance and the dependencies I got rid of were just not worth the extra effort).
However the reason I always chose to use JUnit was because I wanted the unit tests to be familiar to other developers since this is often where people go to understand how a piece of code works. In a sense it was a part of Java at the time. And I chose Maven for similar reasons. Plus the fact that Maven wasn't something you could really escape from in Java. Sooner or later it rears its head and I thought I would cause less pain if I just accepted that.
I like the idea behind Maven: convention over configuration, but I've never been a fan of how that idea has been executed. It could have been better if someone more experienced (and obsessive) had designed it way back when.
I still think Gradle is worse than Maven though. I'm not a fan of scriptable build systems, they should be declarative (and most of the time when people think they need to script things they just haven't bothered to learn how to use the tools). And even if you use Gradle, you can't really escape dealing with Maven.
(I ditched Java a couple of years back, so I haven't done Java for a while. I'm not overly fond of Oracle, so I had promised myself that I would stop using Java as soon as I found a replacement language that suited me. It took a few years, but I eventually found a different language I liked even better: Go)