Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
JawnV6
Jul 4, 2004

So hot ...
I'm not a web dev. I come from an embedded background. Failure is not an option, code from the 70's has to run without issue, etc.

I don't understand how anyone arrives at a tool like Bower. Not the package management or the "heavy lifting" of traversing a tree, but why any project would look at a build solution involving the step "Then we pull a shitload of unvetted code from various places around the web and shove it out to our customers" and think that the big problem with this was the lack of automation.

Another link that's been making the rounds: https://scalenpm.org/ So the above strawman is acceptable at enough places that when this one service can't handle the extreme pressures of 250 requests per second the entire thing came down. And a bunch of webdevs, thinking it appropriate to pull a shitload of dependencies from third parties for daily activities, were out of luck. The solution, instead of making a local repo or checking things in to source control, is to throw heaps of money at the people who built this shambling wreck!

It really seems like the entirety of frontend web tooling needs to be burnt to the ground and rebuilt by adults. Thoughts?

Adbot
ADBOT LOVES YOU

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
as it turns out you can't even make your own local npm repo without duplicating their entire hosed up technology stack and replicating their database.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

And what's the deal with airline peanuts?

shrughes
Oct 11, 2008

(call/cc call/cc)
The worst part of web devs is how if I'm at any social event and I'm talking to some person that is in some way a programmer, the conversation ends up progressing to the point where I basically call all Javascript programmers retards. I've never had anybody spring "Well I'm a Javascript programmer" after I say this -- because I have no compunction saying this after they've already told me they're a Javascript programmer. For me the social filter is just not there. Fortunately the people I've done this to usually aren't web devs, which means I didn't have to have a conversation with a web dev.

shrughes
Oct 11, 2008

(call/cc call/cc)
Also for a description of what happens when a web dev decides to write a secure messaging system:

shrughes.com blog posted:

Check out http://noplaintext.com/. It promises military-grade encryption, in the browser.

...

- The encryption key is generated with 47.6 bits of entropy.
- It’s generated using Math.random().
- There is no message authentication. ...
- Obviously we have to trust noplaintext.com to send us an uncompromised web page.
- It links to google-analytics, so we also have to trust the Google analytics people.
- It links directly to https://crypto-js.googlecode.com/files/2.5.3-crypto-sha1-hma%85, so we also have to trust the crypto-js maintainer, and the googlecode.com people.
- The whole system depends on being able to share the URL securely. But if you can do that, you could have just sent the message securely over that channel.

Pollyanna
Mar 5, 2005

Milk's on them.


See? This is the kinda poo poo I was talking about, regarding embedded/application programmers making GBS threads on web devs. I see this opinion everywhere, why is it so pervasive?

I will never go away. I AM FOREVER

My Rhythmic Crotch
Jan 13, 2011

Embedded development is honestly really loving hard, and forces you as an individual to solve problems on your own, with uncommon tools like oscilloscopes and logic analyzers. Most other forms of programming have devolved into just pasting compiler error messages into google, and doing whatever the first thing on stack overflow says. Also note that Arduino programming does not qualify as real embedded development (in my book, anyway. And my book is the only one that counts).

wwb
Aug 17, 2004

Webdev is a funny problem -- the pointy end is really pretty simple UI-layer code. Doing more complex stuff gets vastly more complex in a hurry but not so vastly and noticibly complex that the "designer/developers" get clear indication they can't handle that poo poo. So they keep solving immediate problems and pushing the ball forward and you get un-maintainable clusterfucks of horse cum like vbulletin.

That said, I've seen loads of desktop / embedded devs fall flat on their face when faced with simple tasks like "configure a functional web server" too.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

JawnV6 posted:

I don't understand how anyone arrives at a tool like Bower. Not the package management or the "heavy lifting" of traversing a tree, but why any project would look at a build solution involving the step "Then we pull a shitload of unvetted code from various places around the web and shove it out to our customers" and think that the big problem with this was the lack of automation.

How is it different anywhere else?

"Then we pull a shitload of unvetted code from various places around the web, build it and shove it in a .deb, and shove it out to our customers"

"Then we pull a shitload of unvetted code from various places around the web, build it and shove it in a .egg, and shove it out to our customers"

"Then we pull a shitload of unvetted code from various places around the web, build it and shove it in a .exe, and shove it out to our customers"

Why do you trust Red Hat, PyPI or Mozilla (Firefox installer or similar), but not the people running NPM? Why are they different?

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
People in computer land don't understand people who are in business land, imagine that.

People from embedded land don't understand people who are in "I can always fix it since it's a server and not embedded in a million little chips" land, imagine that.

Fancy poo poo with pointers and unrolled loops from the 70s are not a great idea for websites in the 2010s, imagine that.

Completely different domains are going to have a bit of culture shock.

salisbury shake
Dec 27, 2011

shrughes posted:

The worst part of web devs is how if I'm at any social event and I'm talking to some person that is in some way a programmer, the conversation ends up progressing to the point where I basically call all Javascript programmers retards. I've never had anybody spring "Well I'm a Javascript programmer" after I say this -- because I have no compunction saying this after they've already told me they're a Javascript programmer. For me the social filter is just not there. Fortunately the people I've done this to usually aren't web devs, which means I didn't have to have a conversation with a web dev.

lol I'm glad yospos is effecting your day to day human interactions.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

shrughes posted:

The worst part of web devs is how if I'm at any social event and I'm talking to some person that is in some way a programmer, the conversation ends up progressing to the point where I basically call all Javascript programmers retards. I've never had anybody spring "Well I'm a Javascript programmer" after I say this -- because I have no compunction saying this after they've already told me they're a Javascript programmer. For me the social filter is just not there. Fortunately the people I've done this to usually aren't web devs, which means I didn't have to have a conversation with a web dev.

But were they black?

rsjr
Nov 2, 2002

yay for protoss being so simple that retards can win with it
Thread confirmed all assumptions concerning shrughes/ Asperger's.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
if you can't build and deploy to internal servers if your companies external connection to the internet dies something has gone very wrong imo

Pollyanna
Mar 5, 2005

Milk's on them.


Reminder that Java still exists and therefore embedded/compiled programmers don't get to disparage other languages.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
not sure what's goin on with shrughes but it really does seem like the javascript 'community' in general seems to be reinventing a lot of basic stuff and doing it really badly

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

rotor posted:

if you can't build and deploy to internal servers if your companies external connection to the internet dies something has gone very wrong imo

number of times in my career I've wanted to build and deploy to internal servers while the external connection was down: 0

clearly a very important scenario to spend time on

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Plorkyeran posted:

number of times in my career I've wanted to build and deploy to internal servers while the external connection was down: 0

clearly a very important scenario to spend time on

it's a bad practice to rely on external resources because they may be interrupted or they may just go missing completely. this is like configuration management 101 and just because you haven't been bitten by it yet doesn't mean you won't ever be.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
someone was telling me that heroku works by making a deploy the same as a build so if you don't manage your own repos then you could theoretically wind up in a position where two deploys to prod from the same tag are running different versions of 3rd party libraries and I broke out in hives

ManoliIsFat
Oct 4, 2002

Pollyanna posted:

Reminder that Java still exists and therefore embedded/compiled programmers don't get to disparage other languages.
I'm amazed by your desire to show you're down but conflated "script kiddies" with you're amazement that C programmers look down on people who's sole programming experience is making websites in django.

Pollyanna
Mar 5, 2005

Milk's on them.


ManoliIsFat posted:

I'm amazed by your desire to show you're down but conflated "script kiddies" with you're amazement that C programmers look down on people who's sole programming experience is making websites in django.

I know enough to know what I don't like :colbert:

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

rotor posted:

it's a bad practice to rely on external resources because they may be interrupted or they may just go missing completely. this is like configuration management 101 and just because you haven't been bitten by it yet doesn't mean you won't ever be.

which is why every company with a website needs to own a datacenter, a power plant, fiber connecting them to every tier 1, and a paramilitary force to guard all of them

reducing external dependencies is useful, but that does not make it automatically a good use of time. i once had to copy some libraries off a coworker's machine because github was being ddosed. this was an utter disaster which cost us minutes of productivity. clearly we should have then invested the time to be able to deal with this if it ever happened again (it didn't). another time i was unable to deploy because our internet connection was down. not because i couldn't fetch things needed for the build, but because our servers were not on site, and having our servers on site would have been a loving terrible idea because the office's internet connection was unreliable.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

rotor posted:

someone was telling me that heroku works by making a deploy the same as a build so if you don't manage your own repos then you could theoretically wind up in a position where two deploys to prod from the same tag are running different versions of 3rd party libraries and I broke out in hives

Gemfile.lock is sort of a thing that people use and if you're getting two different libraries with the same sha1 hash then you're probably being attacked by the nsa and using your own repos won't help you

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Plorkyeran posted:

which is why every company with a website needs to own a datacenter, a power plant, fiber connecting them to every tier 1, and a paramilitary force to guard all of them

reducing external dependencies is useful, but that does not make it automatically a good use of time. i once had to copy some libraries off a coworker's machine because github was being ddosed. this was an utter disaster which cost us minutes of productivity. clearly we should have then invested the time to be able to deal with this if it ever happened again (it didn't). another time i was unable to deploy because our internet connection was down. not because i couldn't fetch things needed for the build, but because our servers were not on site, and having our servers on site would have been a loving terrible idea because the office's internet connection was unreliable.

I didn't mean to give you the impression that I thought you must keep your servers local, obviously offsite hosting makes sense for a bunch of reasons. I just meant that if you did have them, an external network outage should not mean that you can't deploy to internal machines


as for the other part, I'm happy that you haven't been bitten by external dependencies becoming unavailable, but I'd refer you to my previous post. it's like how losing a hard drive is really the only thing that will make people think seriously about backups.

rotor fucked around with this message at 05:49 on Nov 27, 2013

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Plorkyeran posted:

Gemfile.lock is sort of a thing that people use and if you're getting two different libraries with the same sha1 hash then you're probably being attacked by the nsa and using your own repos won't help you

most people I know pin to major versions and let minor ones float but idk the details of the heroku builds so meh

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
the sane thing to do is to pin to major versions in Gemfile and commit Gemfile.lock (which inherently pins to a specific hash). not doing this results in such an utter mess even just during development that i really hope that not committing Gemfile.lock is rare,

of course, rvm in production is apparently a thing and i guess not committing Gemfile.lock is only a little more insane that that

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
basically while i think you're overly harsh on some of the technology and some of the practices, i will not deny that there are a lot of completely insane and terrible things done on a regular basis

that's part of why i think complaining about how it's hard to host your own npm repo is silly - you're worrying about 5 nines of reliability when most of the people using the stuff are at like 2 and have much bigger problems (and it's not even clear that those bigger problems are actually losing them money and being at 99% may well be the right choice)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Explicitly listing "we need this version of jQuery, and this version of the pane view widget, and this version of casserole widget" in a declarative manner doesn't seem that bad to me, and it's a very common thing for most projects. Distribution of libraries is another, similarly related problem: if I need "jQuery, version 1.5" where do I get it?

In C projects, there's a bunch of different solutions, but the answer we use is "autoconf" / "your distro devel packages".

In Python projects, there's a standard, and it is "pip / requirements.txt" / "PyPI".

In Ruby projects, there's a standard, and it is "Gemfile.lock" / "Ruby gems".

In Node projects, there's a standard, and it is "project.json" / "npm".

In Web projects, the most popular solution is "Gruntfile" / "bower".

I don't see why any of these is worse than any other.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
In a lot of cases bower just doesn't do much of anything, and you've introduced an extra tool for no real point. The one JS-heavy SPA site I worked on (~20k lines of CoffeeScript) had a pile of third-party libraries, but none of them had any sort of build process (brunch just concats and minifies the contents of the vendor directory, so adding a dep was literally just save the file and add it to the repo), and none had any dependencies other than jQuery.

If your libraries depend on other libraries or have their own build systems, then a dependency managing tool tends to be very useful. At the moment this isn't the case for most front-end libraries, but I suspect that'll change over time.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
The real answer should be "they're in version control like everything else", because managing versions is literally what version control is for.

Public development is in a bit of a different situation because people don't want to check out 7 copies of OpenCV for the seven different open-source projects they work on, but if you're developing proprietary software (or open-source software where you just release the source but don't have external contributors), there's no reason not to have one mondo-repository with all your dependencies. And then you just don't have to care about your dependencies at all for the 99.9% of the time that you're not upgrading them.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Plorkyeran posted:

basically while i think you're overly harsh on some of the technology and some of the practices, i will not deny that there are a lot of completely insane and terrible things done on a regular basis

that's part of why i think complaining about how it's hard to host your own npm repo is silly - you're worrying about 5 nines of reliability when most of the people using the stuff are at like 2 and have much bigger problems (and it's not even clear that those bigger problems are actually losing them money and being at 99% may well be the right choice)

the contortions you have to go through to host a local npm repo are symptomatic if a lot of things imo. this was a solved problem literally a decade ago, setting up a local rpm repo was like an hours work. but npm apparently decided that standing on the shoulders if giants was for suckers so they reinvented it and did a lovely job at it.


does it matter that much? idk there's been a lot of wailing and gnashing of teeth on various mailing lists so I gotta think a lot of people wasted a significant amount of time blocked on npm and github outages that should never have impacted anyone.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Jabor posted:

The real answer should be "they're in version control like everything else", because managing versions is literally what version control is for.

Public development is in a bit of a different situation because people don't want to check out 7 copies of OpenCV for the seven different open-source projects they work on, but if you're developing proprietary software (or open-source software where you just release the source but don't have external contributors), there's no reason not to have one mondo-repository with all your dependencies. And then you just don't have to care about your dependencies at all for the 99.9% of the time that you're not upgrading them.

yep

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Sorry JawnV6 you are just a bad web programmer. :(

I mean you are obviously a smart dude but you're freaking out over an issue that doesn't bother enough web developers for them to need to address it. People at larger companies probably have (or should have) an off-site hosted versions of their build that isn't completely reliant on GitHub and/or npm but if you're just a small shop, why bother with all that?

But honestly you have been doing web stuff for what? 2-3 weeks? Imagine if I started doing embedded development and wrote some stupid post ranting about how much embedded development sucks because I have to worry about memory constraints, and how, "we've had GB of RAM in other systems for years why do I have to work with a couple of megabytes? Oh and BTW I've only been doing this for ~2 weeks."

rotor posted:

the contortions you have to go through to host a local npm repo are symptomatic if a lot of things imo. this was a solved problem literally a decade ago, setting up a local rpm repo was like an hours work. but npm apparently decided that standing on the shoulders if giants was for suckers so they reinvented it and did a lovely job at it.


does it matter that much? idk there's been a lot of wailing and gnashing of teeth on various mailing lists so I gotta think a lot of people wasted a significant amount of time blocked on npm and github outages that should never have impacted anyone.

It didn't really matter until node blew up this past year because no one needed a private repo when npm worked so well for everyone. I'm guessing within the year someone will figure out something that will satisfy most people's use cases.

Personally my company has had to tarball node modules into S3 because npm would sometimes fail for no apparent reason and would wreck our builds. npm actually says though that if you're building an application you should be checking in your node modules into your repository.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Strong Sauce posted:


It didn't really matter until node blew up this past year because no one needed a private repo when npm worked so well for everyone. I'm guessing within the year someone will figure out something that will satisfy most people's use cases.

yeah my first question on looking at the giant list of bullshit you have to go through to set it up was "jesus gently caress, where is the vmware image for this thing"

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Strong Sauce posted:


It didn't really matter until node blew up this past year


the point I'm trying to make is that they ignored over a decade of precedent and previous art and many, many implementations of the same thing and just did their own shitass version that can barely hold up under any decent load and is very difficult to implement local copies of, and for no good reason other than they were apparently just ignorant. The way they implemented it isn't any easier, nor does it have any other features that something like rpm doesn't. They're reinventing the wheel and they're doing it very badly.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





rotor posted:

the point I'm trying to make is that they ignored over a decade of precedent and previous art and many, many implementations of the same thing and just did their own shitass version that can barely hold up under any decent load and is very difficult to implement local copies of, and for no good reason other than they were apparently just ignorant. The way they implemented it isn't any easier, nor does it have any other features that something like rpm doesn't. They're reinventing the wheel and they're doing it very badly.

I don't think they ignored it as much as the fact that they didn't care at the time because it really wasn't important for them to get it into their package manager. Adding all the features to get to parity with rpm would take away time from working on stuff that was more important to node.js/npm. Now that this is becoming a pain point I think it will be addressed sooner rather than later.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Pollyanna posted:

Reminder that Java still exists and therefore embedded/compiled programmers don't get to disparage other languages.

What does this mean?

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
Web is completely engrossed in the act of reinventing old ideas badly. Trying to ape 2001's Flash slowly by committee and failing, creating massive js libraries that do one thing bad (js animation anyone?), trying to transform a limited ui into a development platform but only creating worse alternatives to existing tech, the list goes on.

Backend stuff can be proper cs-grade stuff, though, as long as you can differentiate between fads and the good stuff. But that's endemic of any programming environment.

ninjeff
Jan 19, 2004

MeramJert posted:

What does this mean?

it means pollyanna thinks "embedded/compiled" is a "side" and that it has skeletons in its closet

Adbot
ADBOT LOVES YOU

pigdog
Apr 23, 2004

by Smythe
I thought it was something about Java having nice library/dependency management tools available. :engleft:

  • Locked thread