News for hackers. Stuff that matters.
Re:Javascript is a buffet, not the enemy [video] by Rapzid on Friday April 28, 2017 @11:04PM (#14224814)
I have similar feelings about Python.
Re:Javascript is a buffet, not the enemy [video] by bitexploder on Saturday April 29, 2017 @12:05AM (#14224987)
I think JS ecosystem is an order of magnitude more unstable. I can still write a Django/Flask/Pyramid app in roughly the same way I did 5 years ago. The key libraries have longer and more consistent development. The whole environment is just easier to use. Maybe I am biased from nearly a decade of heavy Pyhton use, but I have written a non-trivial amount of JS code. Angular 1 is basically a relic. It just isn't a user friendly sandbox to play in. Python has its warts but we build and use tools in Python and it seems much easier than JS.
Re:Javascript is a buffet, not the enemy [video] by pfooti on Saturday April 29, 2017 @01:00AM (#14225123)
You can still write an Express, Jade, haml, whatever app like it is 2011. The js world moves fast, but the old libraries are still out there. Plenty of people writing jquery or knockout code.

Web dev has a fast cycle time, mainly (imo) because products are created and used and discarded quickly - lots of websites are short-lived one offs. So, naturally, there's churn.

And as to what my sibling commenter said, I agree. I'm starting to move from angular 1 to 2, and 2 is better. It has some downright amazing features, and the tooling is quite excellent. That's why, personally, I'm learning the new thing.

Re:Javascript is a buffet, not the enemy [video] by ern on Saturday April 29, 2017 @01:30AM (#14225194)
I'm starting to move from angular 1 to 2, and 2 is better.

Angular 4, you mean (or just "Angular").

Re:Javascript is a buffet, not the enemy [video] by alttab on Saturday April 29, 2017 @10:26AM (#14226714)
I'm still in the Rails/Bootstrap/jQuery camp. When you need something quick, that will function, and not look like shit - you really can't beat this option. It's also easy to teach junior developers, and they strengthen on the fundamentals first.
Re:Javascript is a buffet, not the enemy [video] by zackify on Saturday April 29, 2017 @11:16AM (#14226907)
Needing something quick is subjective honestly. Personally I could build you a service worker that makes your app offline capable and throw in React components on whatever pages you need, or setup a whole React / vue / vanilla js / whatever app structure in 30 minutes thanks to the time I've spent investigating good packages to use. So I'd say there's many options that are great and it's sad to see people here in this thread (not you) complain that there's so much js churn when isn't the whole reason We are developers because we have a passion for constant learning and building cool things?
Re:Javascript is a buffet, not the enemy [video] by alttab on Sunday April 30, 2017 @11:41AM (#14232038)
Very true. Yet as a manager leading a team of mainly backend engineers who don't have lots of interest in front-end development - we need a toolchain that is easy to pick up, easy to understand the fundamentals, and easy to train interns or junior devs on.

Of course - it also helps I understand that tech stack enough to efficiently explain it to younger engineers. That said - these three technologies have a LOT of material on the web and consensus on that tech has helped my folks build things "more right" more often, without having to do all the nuanced consideration themselves.

When it comes to X resources, Y time, and Z goals, it's all about the right tool.

I think many people give JS shit because it isn't always the right tool - but people choose it anyway due to hotness/hype/vague advantages.

So I'd agree its a mix of skill, resources, and goal. Arguably another manager with amazing React skillsets could do the same thing with a different stack. I'd love to see that guy in action, especially if he can have a more productive team for the choices.

But for us - most UI Frontends are fancy buttons on backend service APIS, or stupid CRUD. Rails does this with confidence.

Re:Javascript is a buffet, not the enemy [video] by bitexploder on Saturday April 29, 2017 @11:26AM (#14226958)
It is true and you are correct t but as a JS novice it is very hard to know which things are good and which are just new junk.I love learning and mastering things as much as the next individual. (BTW I have moved to Vue when I need a fancier front end and Love it). I guess my complaint, if you can call it that, is that it is hard to find the good stuff and easy to spend hours fighting node packages and Packers and get nowhere.
Re:Javascript is a buffet, not the enemy [video] by zackify on Saturday April 29, 2017 @05:48PM (#14228958)
It keeps coming down to finding the right resources and not wasting time on the bad projects. And that's totally valid.

We need some sort of js beginner walk through that has a section for each step in the process and explains the solutions and differences between projects.

ex: step 1 is language fundamentals, step 2 dom manipulation step 3 bundlers and why you need them. Step 4 frameworks and libraries to build your frontend. Something like this would be useful but I don't know if anyone is building something like this for beginners :/

Re:Javascript is a buffet, not the enemy [video] by ng12 on Saturday April 29, 2017 @12:20AM (#14225036)
Is your complaint that JS development is getting better? People didn't ditch Angular1 because it was old, they ditched it because Angular2 is better.
Re:Javascript is a buffet, not the enemy [video] by mercer on Saturday April 29, 2017 @02:41AM (#14225348)
That's not saying much though. I keep reading that Angular 2 is still a really bad idea (haven't gotten to using it myself though). What's your experience comparing Angular 2 to other frameworks you've tried?
Re:Javascript is a buffet, not the enemy [video] by bitexploder on Saturday April 29, 2017 @09:45AM (#14226566)
I am just saying that the "newest" tools in Python are more stable and if you pick a popular framework or package in Python chances are good it will still be active years later. Whereas JS community seems to have ADHD and things like TypeScript come along in the JS world. The cost of learning and staying modern in JS and front end development in particular is high. It does create meaningful new ideas but it is a mess compared to investing in almost any other popular language.

So, I learned Angular 1 for a project. Some concept there really are everywhere (promises, DI), but you might as well not even call Anuglar 2 Angular. It is totally different and even getting started in it took so much effort I gave up. I have almost never done that as a hacker. But the sheer amount of stuff to install and learn just to implement Hello World was more than I was willing to deal with at the time.

Re:Javascript is a buffet, not the enemy [video] by zackify on Saturday April 29, 2017 @11:22AM (#14226933)
It's not as high as you would think. Everyone here loves to complain how fast things come along but the following is true for any language. If you know the fundamentals of JS you can do anything. It's not hard to spend a Saturday trying out Vue or webpack or React and decide what stack is best for your company. If you can't spend the time to find the right tooling and your excuse is that things move too fast, it sounds like you're complaining about learning and using the latest technologies, which I don't get as a developer. I personally find it exciting how everything is going. It's also easy to stick to your stack thanks to yarn which will lock in your dependencies so you don't have to worry. Lastly, creating a hello world app in React or vue can be extremely simple. I haven't used angular much so I can't attest to it.

But after all that, I can see why some people would be frustrated.

Being on the inside and doing js for the past 3 years it's more exciting than looking in. We keep getting new awesome language additions as of late!

Re:Javascript is a buffet, not the enemy [video] by bitexploder on Saturday April 29, 2017 @11:30AM (#14226977)
I do worry it's just a Python bias I have. But it clearly isn't just me. I have been using Go and can get things done there pretty easily. JS th language isn't any harder than Go or Python. It isn't the language. If I spent a few years my senses would be honed for avoiding traps -- but I feel I can do that in many other languages and ecosystems much easier as a novice. Maybe it is just the size of th JS world.
Re:Javascript is a buffet, not the enemy [video] by tigershark on Saturday April 29, 2017 @10:44AM (#14226795)
I second this. I'm tired of fighting to enable my AMD card on the MacBook Pro in theano. Maybe I will find a working solution one day, but I'm supposed to learn neural networks, not all the environmental problems when using a Mac with an amd card. And apparently at some point in time it used to work, albeit compiling stuff from the develop branch of some libs. Now it seems broken, at least with python 3.5 and/or with the stuff on my machine..
Re:Javascript is a buffet, not the enemy [video] by sidlls on Saturday April 29, 2017 @12:19AM (#14225031)
The language I use day-to-day in my current job (machine learning and data engineering) is Python, although I employ a smattering of C++ and, lately, Rust as well (the only one to use either of the latter, that I'm aware of, in the company). Python's virtualenv/pip system, for all its warts, is orders of magnitude better than any JS package management system I've seen.
Re:Javascript is a buffet, not the enemy [video] by indexerror on Saturday April 29, 2017 @01:47AM (#14225233)
> Python's virtualenv/pip system, for all its warts, is orders of magnitude better than any JS package management system I've seen

In terms of what? Can you please do a npm vs pip and a nvm vs virtualenv?

Thanks

Re:Javascript is a buffet, not the enemy [video] by Can_Not on Saturday April 29, 2017 @04:37PM (#14228616)
> Python's virtualenv/pip system, for all its warts, is orders of magnitude better than any JS package management system I've seen.

I've had the complete opposite experience. Crates, composer, and npm are my go-to examples of good package mangers. Python is my go-to example for lack of a good package manager.

Re:Javascript is a buffet, not the enemy [video] by cshenton on Friday April 28, 2017 @11:08PM (#14224827)
What problems do you run into? I've had good luck with a pretty vanilla virtualenv + requirements.txt files, and docker for packaging (great for c libs that my python packages call down to).
Re:Javascript is a buffet, not the enemy [video] by Rapzid on Saturday April 29, 2017 @12:00AM (#14224976)
I've worked through most of my packaging and pyenv/virtualenv issues but I must say I found it much more convoluted and painful than any other language I've worked with in the past 6 years. The need for all the virtualenv's makes me sad, and I'm not a huge fan of the shim system. Working on multiple projects that need different versions of a dependency, particularly when your also working on that dependency, can be a pain still. This is very subjective but pipenv was just released THIS YEAR and has over 3k stars on github; clearly there is some general angst out there.

But I more meant the ecosystem in general:

A "batteries included" language makes me create my own UTC tzinfo implementation so I can get a datetime in UTC... Python's time situation is maddening and by far the worst I've worked with. I'm sure others feel this way because there are a bakers dozen of time libraries trying to fill the gaps.

I almost rage quit the industry trying to save and retrieve a UTC datetime from the database with sqlalchemy. Luckily I found Arrow and ArrowType and that's been working well enough for now.

On the subject of time this has been open for close to five years? https://bugs.python.org/issue15873 . I get the impression that lots of proposed improvements are languishing like this.

sqlalchemy and alembic feel like JUST ONE GUY is working on them. Massive achievement, but the gaps are visible.

The module system feels stale; a holdout of a system from different workflow times. Splitting stuff off into separate files for maintainability(including improving multi-dev workflows trying to reduce conflicts) creates some gross imports.

It feels like there is a reluctance to evolve the language itself; a lot of enhancements appear to be made via more magic metaprogramming and function usage. super(Cls, self).__init__() comes off as an artifact of this. Not really my cup of tea these days, but I can see how this is very subjective.

The propper way to handle generated members with pylint is supposedly a plugin; which almost no projects provide.

Type annotations are supposed to go a long way in 3.x, but the prevalence of metaprogramming and lack of tooling awareness has probably defeated more jedi than Darth Vader.

boto3 has no official async support even though lambda just released support for Python 3.6. Meanwhile the javascript sdk is shipping with TypeScript definitions and a new promise interface.

A lot of this is very subjective(other than perhaps the languishing of certain library areas) of course. To me though, after having worked with a lot of other languages, it just feels like Python is a bit of a ghetto these days. It's like the language world has built north and Python is.. Not living to the north.

EDIT: The pipenv announcement thread has some comments that go into more detail on package/project management situation: https://news.ycombinator.com/item?id=13459740 . sjellis and sametmax touch on most of the stuff I've run into.