Our field is fucked by Javascript Millenials

So tell me Sup Forums, is this really the $current_state of our field in $current_year ?
Seriously, what have we created ?
All the githubs repository in "trendings" are just bloated millenial shit with a keyword vomit based README.md.
Why do webdevs have to fuck everything up ?
Will I soon need a I7 with 16GB of RAM to fucking surf the web ?
Just because of kids with ADD ?
Seriously, wish I could leave this field ASAP.

> tfw you realize that all Sup Forums's memes are real

Other urls found in this thread:

haneycodes.net/npm-left-pad-have-we-forgotten-how-to-program/
github.com/keltia/leftpad
github.com/Somsubhra/left-pad
github.com/ErnstHaagsman/pad-on-left
github.com/sindresorhus/ama/issues/10#issuecomment-117766328
github.com/euank/node-noop/blob/master/index.js
npmjs.com/package/node-noop
stackshare.io/soundcloud/soundcloud
twitter.com/NSFWRedditImage

webasm will save us anoyon
.. well until they manage to implement a javascript engine in webasm

Hope so user, but can't really believe in it ...
Sounds like another meme to me

nah, thonk about it, the only reason webdev attracts so many untalented pricks is because its easy, frameworks do everything for you
need your Date() formatted nicely? moment.js
need an ajax contact form? jquery with animation plugin
dont forget the validation plugin to make sure users are typing in a correct email address

with webasm all the filthy plebs, trannies, and feminists who are posing as actual programmers will be out of a job

mark my words they will scream and cry and protest that webasm is sexist and that javascript was all the world ever needed

well we can hope anyway my frond

>Reddit

>9gag

My experience with Node.JS and web tools leads me to think that they are intentionally abysmally designed to try and create a job security through obscurity in a field that you can literally train anyone to do in a month.

>he can't afford an iPhone X
>he can't afford a Retina Macbook
>he literally can't afford the fastest javascript renderer
>he browses on a laggy lagdroid

Yes, as a poorfag, I find this bloat infuriating

> Electron

Reminds me of an article some months ago. There was a npm package which did something incredibly simple (something like a while loop - can't remember) nonetheless it was used by hundred of thousands of users. Then the package got a bug in a new update and suddenly software started to fail left and right. GG

That was leftpad.

kek, this was what broke everything

module.exports = leftpad;
function leftpad (str, len, ch) {
str = String(str);
var i = -1;
if (!ch && ch !== 0) ch = ' ';
len = len - str.length;
while (++i < len) {
str = ch + str;
}
return str;
}


Who the fuck would import something so trivial?

why not rebuild the web.
make it stronger.
make it faster.
we have the technology.

wow, even funnier:

haneycodes.net/npm-left-pad-have-we-forgotten-how-to-program/

>here’s a package called isArray that has 880,000 downloads a day, and 18 million downloads in February of 2016. It has 72 dependent NPM packages. Here’s its entire 1 line of code:

return toString.call(arr) == '[object Array]';


Another gem.

>There’s a package called is-positive-integer (GitHub) that is 4 lines long and as of yesterday required 3 dependencies to use. The author has since refactored it to require 0 dependencies

>is-positive-integer
>3 dependencies

>while for leftpad

Jesus christ.

In 6 months I'll be getting my Comp Sci degree from a pretty good university.

Please tell me what fields I can go to where this bullshit doesn't exist.

I can imagine it now
is = require('is');
positive = require('positive');
integer = require('integer');

return is(positive(integer(num)));

Functional Programming.

That got even worse.
This is the current state of leftpad.

While I could really use a bit less obesity, reader mode cuts most of the real crap and works on many pages.
Guess the problem is that many modern frontend people know every little thing about JavaScript but have zero idea about information representation.

>Will I soon need a I7 with 16GB of RAM to fucking surf the web ?
The tools listed in the image are mostly development tools, not bloat that will be in the sites.
>Seriously, wish I could leave this field ASAP.
Seems like you should.

>loop

jesus christ. Did they get first year CS students to write this?

add a WHITESPACE constant (plus points for importing a module that contains the constant) then add a buildCache function

You're probably joking. But it doesn't seem too far from the truth actually.
Even if a Javascript engine in webasm completely defeats the purpose of webasm they would move to it.

Or maybe there's a point. I don't know how much the interpretation overhead for JS on the web is.

>cache
MEMOISED!!!

>tfw work as frontend dev for company
>only really use typescript and sass and do pretty much everything else by hand
>boss often asks me if i need any help because i do it all on my own
>tell him na its cool
>one day he asks me to help interview a guy for a side project thats gonna be done in electron since they didnt wanna overburden me
>alright lets do this
>15 people over the course of a week applied
>first guy from above has a masters in software engineering but couldnt identify most html response codes. not even fucking 404.
>some other chick confused forntend engineering with webdesign and didnt know any programming
>other guy who supposedly has a phd in math and specializes in scientific programming with python could not create a simple programm that converts dates from and to unix time.
>the guy we ended up taking was a guy who had a bachelors in game design because he made a roguelike as his last project and has made a mario clone with phaser.js.

from all interviewees he was the most knowledgeable and most suited for the work.
weird fucking world.
kid turned out to be a great guy too. had a lot of knowledge and was eager to learn.
i had to give him some pointers with typescript and teach him to program more functional than object oriented but the kid picked it up fast.

>Will I soon need a I7
Not yet
>with 16GB of RAM
We are already there.

I honestly doubt that webasm will take over outside of niche applications that require high performance. I still think that every second website will have to load 16mb of javascript for their infinitely scrolling comment section on their devblog that nobody reads.
I just think that javascript has become too engrained at this point to be uprooted, unless the entire world shifts from the world wide web to something better.
also, can I get a source on that?

Similar situation, I'm the front end dev in a small company, do a bit of backend, manage our servers other stuff. Try helping them hire a backend dev to help me and everyone is complete shit.

>// loop
*comments your comments*
nothing personnel, kiddo

Did people really make this a dependency in their projects? y tho?

nice joke i would say something but i prefer to say: $ exit;

Is this really faster than
Array(len).fill(ch).join('') + str

Not even a JS dev but I'm curious.

Stick it in the console and find out mate.

Lost my shit to this famalam.
Webdev are so retarded

>Broiler
>not calling it "broilr"

I am disappoint..

>is-positive-integer
>3 dependencies

JS developer here.

What's your point?
There's nothing wrong with using 3 dependencies:
-one dependency for "is".
-one dependency for "positive".
-one dependency for "integer".

>JS developer here.

Even Go, Python and Ruby developers make fun of JS devs..

>github.com/keltia/leftpad
>github.com/Somsubhra/left-pad
>github.com/ErnstHaagsman/pad-on-left

github.com/sindresorhus/ama/issues/10#issuecomment-117766328
>For example. I have this module negative-zero. Its job is to tell me if a number is -0. Normally you wouldn't have to care about this, but it could happen. How do you figure out if a number is -0. Well easy x === 0 && 1 / x === -Infinity. Or is it? Do you really want to have to know how and why this works? I would rather require negative-zero and be productive on other things.

It's really really easy to get programming jobs. They pay well. I'm not complaining.

this is what happens when you design a language in a week and ship it without a standard library

Ok mate I did it. This leftpad thing is 4x faster for generic characters and 8x faster for spaces in V8.
Can't believe JS API is so bad. How the fuck anybody can expect any performance gains from wasm when js api is so slow?

Alright here's one for you. Which is faster?
>github.com/euank/node-noop/blob/master/index.js
or
>// do nothing

And if you think it's a joke, it's had 45k downloads this month.
>npmjs.com/package/node-noop

>Remove nonidiomatic doc comments
>peterbourgon committed on Mar 24, 2016
And the are doing a fine job

> JS developer here.

Still I guess poor performance of JS API justifies this bullshittery to some degree.

>running some code is faster than not running some code in js
lel

If you need to know whether a number is negative zero and not positive zero I'd say you had better damned well know how the fuck negative zero actually works.

Negative zero means your data structures are shit, nothing else.

I just want to build a little website but all this React, Angular, npms, ES, babelfish and whatnot is REALLY grinding my gears.

From 8 years ago I know a little CSS, HTML, JS and jQuery. Is that enough, or do I really need all this extra webdev shit?

>having a pointer to a thing is faster than dynamically searching for a pointer before realising the programmer's intention was noop

ftfy

It's Java all over again

Is it largely enough user.
Please don't follow the trend and don't add any more bloat to the Internet.
You are good to go !

What should I use for front end web UI? Serious question

what do you want to do?

C

>tfw you wanted to learn how to program C or C++ and got a comp.sci degree

>tfw impossible to get a job that isn't webdev

>tfw you feel quite stupid since you're not able to keep up with whatever is going one anymore

>tfw you feel terrible since you no longer do any programming since that makes you feel bad about "wasting time" on something that won't land you a job

>tfw now you're approaching 30 and things look BLEAK

Thanks user, I will trust you and keep things vanilla.

Lets say I want to build website like Soundcloud (although I'm learning so I can't do it right now), what should I use?

define "like soundcloud" because that could be anything from "a nice UI" to "a fully developed consumer-ready product with payment integration, dynamic feed, audio-visual database and constantly updating content"

Just a website where you can upload, play and like music (tracks and albums), follow users etc. dynamic feed and constantly updating content is also needed.

If you're interested in soundcloud specifically though they're a ruby app

stackshare.io/soundcloud/soundcloud

Ruby on Rails or Asp.Net if you want some windows.

The front end is not really critical there. Whatever enables you to cleanly produce a nice interface.

I'm talking just about front end. Javascript framework like react is considered bloated, so what should I use?

I think it's one of the most important parts, use won't use it if it's not "pretty" or "modern".

>if it's not pretty
user you do realize that pretty just means monocolor boxes with the ability to center text on them and draw basic vector graphics (and maybe not even that).

You'll be hard pressed to find something that can't do that well.
The backend needs some proper design to not shoot resource costs through the roof.

The problem is the things you mentioned weren't front-end concerns
>upload
>play and like music
>relationship between tracks and albums
>follow users
>dynamic feed interaction
>updating content
All are handled by middleware and backend.

If you're worried about bloat then just write everything in vanilla js.

I get that, I'm specifically talking about a front-end side for a medium sized website that has moder and hip user interface and experience. I want to learn react js and redux but I have heard it's all bloated as fuck. So what the solution here? Writing in vanilla js is not going to scale, then what should a developer use?

Btw I know JavaScript and I can build stuff in it but that's not enough for a medium sized website with "slick" interface, not to mention professionals don't do it that way.

Do you want a job or do you want to learn react? If you want a job, go to a job seeking website, plug in some JS frameworks and learn the one with the most hits. If you want to learn react then shut down Sup Forums, pull up some react tutorials and go for it.

>what should a developer use?
Whatever a developer is paid to use.

haneycodes dot net/npm-left-pad-have-we-forgotten-how-to-program/

The absolute state of webdevs

>make a package that implements some basic shit nu-devs are too lazy to implement themselves
>wait until it gets popular
>break it intentionally
Someone should do this.

React. Anything less bloated is purism you won't be able to handle

Anyone who refuses to see the benefit of state transfer via server side rendering utilizing these technologies is a pleb and will be left behind. The impact this will have on web security is profound. It entirely eliminates the threat of sniffing. Think about a web where sensitive data is stored deep within a minified, obfuscated, 10kb JavaScript file that will only pass over the network a single time

>If you're worried about bloat then just write everything in vanilla js.

You’ll probably fuck it up. Better to stick with something like mithril or preact if you’re worried about bloat

>vanilla js is not going to scale

This gives me hope. Started at manual QA, now working full time in automation. Trying to improve skills all the time. Don't know if I'll ever be fulltime dev or if I want to be. Just trying to make shit.

>i don't understand modular code
Just kill yourself or stop programming so I never have to work with you.

OP is actually pretty reasonable by webshit standards, I'd only remove react router, enzyme and HMR personally. everything else does something useful and there's pretty much no overlap.

>webdevs
>web """""""""devs"""""""""""

importing other peoples shit is not development

Really, I don't understand why you don't understand what I mean here. I just wanted to know if there's a better way. I looked at how's professionals do it and read lot on how it's bloated framework. I'm only looking to better myself, not looking for a job. Just trying to learn.

I suspect on a medium to large website your vanilla JavaScript will turn into a mess, that is why I would rather learn a framework.

you can't compress it any more
the amount of seemingly boilerplate code you can remove is close to zero
no one wants to use your markup language
stop reinventing the wheel

What's the difference when the functionality in 99% of cases would be either 100% the same and with the added benefit of other users battle testing it.

You would have to be retarded to disagree.

actually, it is

what's not development is constantly re-inventing the wheel in your mom's basement with 50 year old technology and being of absolutely no use to anybody

>dynamic typing
having .isarray() is logical in a dynamic language, casting an array to a string to check if it is an array is not

this

>hurr durr look at what i built
>main.js
>imports the entire fucking internet

you're right user, we should build everything from absolute scratch. preferably creating a new language for every project as well. that'll really show those shitty web devs!

> give gold
I see you're not only reading Reddit, you have an account there.

because

>>tfw impossible to get a job that isn't webdev
that's bullshit.
they kill for C/C++ devs. so if you are any decent and pass hire tests, you would get a job with a decent wage.

I don't understand your argument. All of that is fine.

Depends, when (rarely) I need a web frontend I mostly use skeleton.css (or, my own adaption thereof) it's usually just formatting JSON into some kind of HTML template.
If it's little data I just write a single wrapper for all the ajax calls and use template elements.

If there's more data, Angular is 144KB but pretty comfy to work with, never really learned something else. Maybe I should look into vue or something some time

>html response codes
Did you refer to them as such ? That might've been the reason why he couldn't identify them.

Should I prep myself in webasm? I want to cuck colored haired grinches the shit out of their jobs.

>introducing useless dependencies to your project to achieve something that could be done in 5 lines
Yeah this is definitely good software engineering practice. You sure know what you’re talking about

Honestly I would expect someone to understand what you mean if you said that. If they are perplexed and you follow up with "you know, like 404?", anyone who had a clue would realise you meant status codes, because what else could response codes be for HTTP?

Why remove react router and what do you go for instead

Yes HTTP.

I see your Javascript.wasm and I raise you a guy I know who's implementing a javascript engine in javascript.

So many feels