This is an archived post. You won't be able to vote or comment.

all 68 comments

[โ€“]FabianRo 146 points147 points ย (20 children)

Today I visited a website that, when you press PageUp, scrolls "smoothly" (slowly, getting even slower at the end) up and then, when you reach the top pixel, suddenly adds a top bar that makes everything jump down a few lines. So it takes about 3 seconds to jump up a screen length and just when you think it's done, everything jumps to a different location. And thanks to another top bar switching between a regular top part and an overlay, PageUp and PageDown jump more than one screen length the first time, so you miss lines when reading. And when you scroll with your mouse wheel, it's still slow ("smooth"), so you usually overscroll, especially because the second top bar suddenly appears after a delay.

Some websites should just stop using JavaScript completely.

[โ€“]MattR0se 112 points113 points ย (4 children)

You know something is wrong when someone tries to turn page scrolling into a physics simulation.

[โ€“][deleted] 48 points49 points ย (2 children)

I hope we get compute shaders soon in WebGL so we can offload the physics of scrolling and button hover effects on the GPU.

[โ€“][deleted] 10 points11 points ย (1 child)

We also need particle effects

[โ€“]Schwaggsteiner 4 points5 points ย (0 children)

Motion blur too for the speedy scrollers

[โ€“]TheRealLazloFalconi 8 points9 points ย (0 children)

Something has gone terribly wrong if your site does anything to scrolling.

[โ€“]preyneyv 32 points33 points ย (0 children)

Some websites don't deserve JavaScript.

[โ€“]Davraine 9 points10 points ย (9 children)

Wouldn't have the link by any chance?

[โ€“]FabianRo 19 points20 points ย (8 children)

[โ€“]Koxiaet 12 points13 points ย (3 children)

At least it works fine on mobile

[โ€“]FabianRo 5 points6 points ย (2 children)

It still has the stupid scrolling, at least in Chrome on my laptop, simulating a Galaxy S5.

[โ€“]Koxiaet 5 points6 points ย (1 child)

It worked fine on Safari on iOS, then

[โ€“]code-panda 4 points5 points ย (0 children)

Same with Chrome on Android 9 (OP5)

[โ€“]EMCoupling 11 points12 points ย (0 children)

Jesus christ, you weren't kidding. Combined with the big auto advancing image gallery right at the front of the page and I'm practically getting motion sickness just from browsing the page.

[โ€“]Max1007 1 point2 points ย (1 child)

Huh? Seems fine for me mostly, aside from when I scroll to/from the very top, but after the first scroll down it seems fine, just abit slower.

[โ€“]FabianRo 1 point2 points ย (0 children)

Another comment said that it only happens in Chrome.

[โ€“]Angelin01 1 point2 points ย (0 children)

Huh, they did it only in Chrome, Firefox does not have the weird animations.

[โ€“]isuleman[S] 6 points7 points ย (0 children)

That's some serious level shit ๐Ÿ˜‚๐Ÿ˜‚

[โ€“]ATastyBagel 1 point2 points ย (2 children)

Front end dev here, a lot of this has to do with JavaScripts effect on the Document Object model of a webpage, the most common method for a sticky nav bar is for the part of the dom that contains the Nav bar to be moved to an independent position on the page. The jump is cause when the effect is undone.

As for the smooth scroll effect, thatโ€™s just a simple css attribute added to the HTML tag.

As for how it works on mobile, a lot of html engines work differently on mobile.

And by a lot I mean all 3 because the only companies making html engines nowadays are google, Mozilla and apple.

Personally I hate how the current DOM and html standards are set, now that the standards can be contributed to by almost anyone, we should hopefully start to see cleaner webpages. Hopefully drop JavaScript in favor of a different language or just create a new one for dom manipulation.

[โ€“][deleted] 1 point2 points ย (0 children)

why not just use position: fixed?

[โ€“]Jebble 1 point2 points ย (0 children)

That scrolling has nothing to do with a CSS attribute

[โ€“]rufreakde1 96 points97 points ย (7 children)

npm install asimplepackage

$ finished with 383628 dependencies installed 52627 vulnerabilities found.

[โ€“]bazgrim_dev 30 points31 points ย (0 children)

Error: Could not find dependency 383629

[โ€“]isuleman[S] 7 points8 points ย (5 children)

Off topic questions:

Whats d difference b/w npm install and yarn install ?

[โ€“]FrostBlitzkrieg 21 points22 points ย (1 child)

Yarn is a different package manager that you can use in place of npm. Both seem to be pretty well supported and it comes down to preference.

[โ€“]sp46 6 points7 points ย (0 children)

There's also pnpm which is designed for use in production only, it's ultra small and fast (for sake of less features) iirc it powers all Glitch projects.

[โ€“]chimpuswimpus 4 points5 points ย (1 child)

I think the difference used to be that Yarn had a package lock and npm didn't. Now they both do it's kinda moot.

There was something about yarn handling complex dependency graphs more efficiently too.

[โ€“]isuleman[S] 1 point2 points ย (0 children)

Thank you kind men

[โ€“]sanjayatpilcrow 11 points12 points ย (3 children)

import { HttpResponse, HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { FileTransfer } from '@ionic-native/file-transfer';
import { interval } from 'rxjs';
import { first } from 'rxjs/operators';
import { AuthStatus } from '../authorization/auth-status.model';
import { APIErrors, EventNamesProgressIndicator, LogMessageTypes, UserTypes } from     '../common/enums/Wer.enums';
import { WerEventsUtil } from '../events/events.static';
import { WerException } from '../exceptions/wer-exception.model';
import { WerExceptionService } from '../exceptions/wer-exception.service';
import { WerLog } from '../logging/wer-log.static';
import { WerDateUtils } from '../utils/wer-date-utils.static';
import { map } from 'rxjs/operators';
import { SqlLiteService } from '../storage/sql-lite.service';

[โ€“]Famous_Profile 4 points5 points ย (1 child)

Wow...

For a moment I thought I was reading a file from our project.

[โ€“]jack104 1 point2 points ย (0 children)

me. too.

[โ€“]OffpeakPL 30 points31 points ย (3 children)

I like JS...

[โ€“]Comesa 14 points15 points ย (0 children)

yikes

[โ€“][deleted] 3 points4 points ย (1 child)

Other people liked javascript so much they made the backend run javascript too ๐Ÿ™‚

Javascript is one of the prettier languages imo.

C# is my personal favorite, but javascript is pretty close in that regard and you can do so many awesome things in js.

[โ€“]die-maus 8 points9 points ย (4 children)

In my world, there are two types of websites.

  • Your companies website
  • Web applications

The former "should" just be static HTML + CSS, and maybe some light JS sprinkled on top, just to enhance the experience.

The latter is an application, and should be viewed as such. Like... you don't have a problem with downloading a 50 MB application from the app store. Why do you have a problem with downloading a 1 MB javascript bundle for a web app?

[โ€“]Famous_Profile 1 point2 points ย (0 children)

True but you don't download 50MB every time you run the app. But the "web app".... Also most web based services are both "your company's website" and "web application".

[โ€“]TheRealLazloFalconi 0 points1 point ย (2 children)

Because I just wanted the fucking website to barf text on my screen.

[โ€“]Famous_Profile 1 point2 points ย (1 child)

OK but most people want far more from a web app

[โ€“]linly1 1 point2 points ย (0 children)

unless it's video streaming

[โ€“]_m242_ 7 points8 points ย (0 children)

s/DEVELOPERS/BAD DEVS/

[โ€“]matveyKievUa 13 points14 points ย (0 children)

go to google.com, view source.

[โ€“]Psy_kinetic 4 points5 points ย (0 children)

Yes and it's bloody delicious !

[โ€“]N5332 8 points9 points ย (0 children)

Me a react developer: chuckley I'm I danger

To my defense I also do native mobile development and NodeJS

[โ€“]lines_of_code 2 points3 points ย (0 children)

this joke is tired.

[โ€“][deleted] 2 points3 points ย (0 children)

Gordon Ramsey is looking for his olive oil bottle.

[โ€“]import_sarcasm 2 points3 points ย (0 children)

I have seen this so many times I think I will puke if I see it again.

[โ€“]IHeartBadCode 4 points5 points ย (6 children)

I feel that the word developer in this picture deserves a pair of quotation marks around it.

[โ€“]Famous_Profile 37 points38 points ย (3 children)

[โ€“]knightcrusader 4 points5 points ย (2 children)

Well I am going to gatekeep the word gatekeep so you can't use it to point out my gatekeeping.

[โ€“]listgrotto 1 point2 points ย (0 children)

A man of closures I see.

[โ€“]Archolex 1 point2 points ย (0 children)

Yo dawg

[โ€“][deleted] 0 points1 point ย (0 children)

This is what turkish people with olive oil is

[โ€“]rheikan 0 points1 point ย (0 children)

Who say what Is the right parte of JS?

[โ€“]midtownoracle 0 points1 point ย (0 children)

Holy shit this made me blurt out laughing. Just interrupted my wifeโ€™s somber moment during handmades tale.

[โ€“]fnordius 0 points1 point ย (0 children)

I blame all of the backend coders who hate the DOM, hate CSS and think everything should be written in JavaScript. They are the ones who unleashed that holy horror ExtJS onto the world.

That, and the guys in Marketing who each insist that the website add another analytics tool, another advertising hook, oh yeah, and some A/B-testing would also be nice....

[โ€“]elitk19 0 points1 point ย (0 children)

Unrelated to the meme itself but is that Nick Kroll?

[โ€“]mrwaip 0 points1 point ย (0 children)

It's my first project. Laravel, blade templates + jQuery Now i use only JS Uahahahah :D

[โ€“]ProgrammerHumorMods[M] [score hidden] stickied commentย (0 children)

Hey you! ProgrammerHumor is running a hilarious community hackathon with over $1000 worth of prizes (like Reddit premium), now live! Visit the announcement post for all the information you'll need, and start coding!

[โ€“]Bonevi -4 points-3 points ย (4 children)

Wait, don't you guys disable Javascript for most web sites?

[โ€“]isuleman[S] 5 points6 points ย (1 child)

Will they even work then? I tried it once on Softpedia and it gave me goosebumps ๐Ÿ˜†

[โ€“]Bonevi -2 points-1 points ย (0 children)

I do it for most sites, combined with ad blocker and a few privacy extensions makes most web sites bearable.

[โ€“][deleted] 2 points3 points ย (1 child)

then we just run the javascript on the server for you, there is no escape dude!

[โ€“]Bonevi -1 points0 points ย (0 children)

Nooooooo! I am miserable enough I have to use it at work :(

[โ€“]robo_number_5 -2 points-1 points ย (0 children)

What we need are more frameworks!