/wdg/ - Web Development General

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap
youtube.com/watch?v=UnTQVlqmDQ0

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
javascript.info - curriculum providing a strong basis in JavaScript

>Further learning resources and documentation
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
hackr.io - crowdsourced collection of tutorials from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)
pastebin.com/gfBPg24A - Everything PHP

>Asking questions
jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

Attached: 1501602119972.jpg (1604x1213, 1.71M)

Other urls found in this thread:

cssgridgarden.com/
jsbin.com/cevufojeqo/edit?js,output
stackoverflow.com/a/4960020
youtube.com/watch?v=yxHJIIwh60Y
xchandb.xyz/board/vg/
violentmonkey.github.io/api/matching/
regex101.com/
jsbin.com/miyabiyegi/1/edit?js,output
archive.ics.uci.edu/ml/datasets.html
jsfiddle.net
stackoverflow.com/questions/24371367/using-post-object-inside-acf-repeater-field
twitter.com/NSFWRedditGif

fuck CSS, fuck JS and FUCK PHP

Are there any ways to analyze the archives for trends, without having to crawl the databases whole? I just need to see the usage over time of a couple specific words, I wonder if any archives have APIs with a feature for this.

why is unit testing in html/javascript so dogshit

horry shit even with React and react-testing-library, shit just doesn't work

Fuck you!

you forgot semantic html and angular/react/vue

cssgridgarden.com/
over what kind of timeframe?
I don't think there is an easy way.

what are some flashy 2019 front-end css/javascript memes that I should put on a porfolio demo site?

i've been out of webdev for 6 years, but it appears I might be getting a job doing it as frontend again. i have about 24 hours to throw some fancy shit together.

Attached: kaz.png (526x431, 384K)

shut the fuck up

cookie notice
gdpr popup
intro animation
jumbotron logo
locked scroll-to-section
bitcoin miner script

unit testing is dogshit in any language unless you're specifically coding your unit tests first and functionality second

Hi, I want to create a WordPress plugin that can display a social media feed or two, basically just facebook and twitter. I'm doing this for a not-for-profit client.

Why not use an already made plugin?
I don't want their logos/shit on my site and I don't want to pay for premium versions.

Any suggestions for resources that I should look at? The Google god only has ads for already existing plugins.

When you google, don't include wordpress in the query. When I search for "show twitter feed on website" (same for facebook) I see official documentation.

make a board game called E-TEAM using ES6+ and css grids. Play it on the side of WTC 1.

Attached: 1550947862978.jpg (600x456, 89K)

Werks for me. Although I use Jest in my React projects

will vue fuck you over in interview for using it instead of react or angular

Why would anyone here be able to tell you what the specific guy interviewing you thinks?
Whenever I read job ads, most seem to be happy with someone knowing at least some kind of frontend library.

Ideally just take 2-3 days to get the basics of React covered. That should go a long way if you can actually talk about the specifics and know how to theoretically use it, even if you otherwise use Vue for most of your other projects.

In interview? If you don't know React/Angular, and you don't put them on your resume, then they probably won't ask you React/Angular specific questions in an interview.

Not having React or Angular might preclude you from certain jobs at the resume screening stage. But if you put it out there that you don't know React, and a React-using company decides that you might be a fit for the job anyway, then they'll probably just be vetting your JS, algorithms, and general web dev knowledge, and be alright with teaching you React the job.

Did React win?

Attached: Screenshot_2019-03-05-08-53-26-294_com.android.chrome.png (1080x1920, 301K)

Yes, and that's a good thing.

I'm trying to build an application with my friend, but we both don't know what we are doing to be honest. He is building the front-end with React and I'm trying to build a "rest api", aka a basic crud that is a mess.

My problem is with user authentication/authorization. I read some articles on the internet and the concept is still flying over my head. I don't know what am I supposed to do to stop users from accessing "private" routes like disabling a user account. I guess I should let everyone access a page like /login that with the real credentials you can get a token to have access the rest of the pages. So at each request I would look at the token and find if the user has permission to make that action or not. Is that right?

I'm using Node.js, I guess I should be using passport but I wanted to implement by myself in the first time so I get the concepts. I'm thinking on creating a middleware before everything but the register/login that check if the token is valid for that action. Is that the correct approach?

Vue is better.

I got fired from my job, anons. I didn't last more than 3 month.
I was hired in a small company (40+ people) and I was with a team of junior developers. I was assigned withthe task to create gutenberg blocks based on patterns and I couldn't even think of a way of how to do it while another dev got an idea and implemented it like it was nothing.
The team leader decided I wasn't experienced enough and a couple of days later, I was fired.
How can I git gud at problem solving, anons? I know basic data structures, know the basic of OOP but even in my wildest dreams I'd never thought of solving that problem like that guy in my team.

From my experience that probably already solved something similar another time. It is much easier to solve something that you already saw how to implement. Look for exercises and solution, understanding how to solve different problems give you a lot of flexibility. I hope you find another job soon, user.

No. We all lose.

Live and learn, my friend.
To be honest (and this doesn't mean you should take accountability for not delivering) it's also the company's fault for hiring you and not training you properly.

Do they only have the team of juniors, or do they explicitly put you in a team of juniors with the purpose of eliminating you to hire only the best? If it's the latter, that's pretty dumb. It's like you were still in the interview process. Seems phishy. Good companies don't do that, they mentor and guide you.

>How can I git gud at problem solving, anons?
Practice and experience. That's why there is such a thing as "thinking like a programmer". It is real, there are people out there who know theory but cannot put it into practice. This takes a mix of creativity to problem solve.

My recommendation: Continue to build apps/websites. You will get better, but only if you don't stop. You can try coming up with a similar problem and solving it on your own if you want to begin there.

But don't feel too bad. You got given a chance. That's more than most people in this thread even get. I'll repeat myself, its IMPERIAL that you do not quit if you want to improve. Take this as a lesson, or you will not grow.

Btw, don't include this job on your resume when applying for the next one. It'll look bad. Just forget about it.

I have this nice prototype of a leaderboard here.

jsbin.com/cevufojeqo/edit?js,output

However the 'points' are too close together. How do I create a greater disparity between points?

React and Vue are LITERALLY the same exact thing

Ideally you would have some middleware that takes the token from a request, interacts with the database to get the user's info, and then passes that user info to your code that handles the request. In there, you can basically just say: if this user doesn't have the permission level 'admin', then reject the request with a 403 forbidden.

I honestly feel like shit because those guys on my team were younger than me (I'm 30 while the rest of them were 23-24 y/o and the team leader is 25 y/o) and the thought of "being late in the industry" is coming again to my mind and I can't shake it off.

stackoverflow.com/a/4960020

Why does it matter what SQL database you use? Companies want experience with certain database but they're all operated pretty much the same.

Didn't answer my question but I reckon the answer given below it helps

Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

step your game up

listen to this
You'll either off yourself or keep getting better
youtube.com/watch?v=yxHJIIwh60Y

Listen buddy. I'm 25, and a year and a half at my first job I was writing code better than someone who was there for 3. Why? I studied 10-14 hours a day (while working part-time to pay my rent) before getting that job, and even after I would constantly study an extra 2-4 when I'd get home. I wanted to get better. I know the other guy wasn't, cause he would constantly tell me.

So if you care about age, you can fuck off. You got a goal in mind, yeah? Are you going to fucking achieve it or not? It's all that fucking matters, bro. It's that simple. Yes or no. Everything else is just you bitching. You know this deep down.

You're in the wrong field if you think programming jobs care about your age. Maybe go join an unionised grocery store job or something.

Now that we got your bullshit self-pity out of the way, I suggest you take some time to cool off and chill (yeah, take a few days if you need it), then start planning your next move. And not quit. If you really want to make it.

[This industry is also constantly changing. We have people who come on this thread saying they did development 20 years ago and quit. Now they're obsolete/legacy. It's not about age, it's about keeping up fag].

>gutenberg blocks
you were asked to create some wordpress code to make a user editable area that would be displayed as some designer wanted?

what was hard about it? css? working within the framework?

I never used new wordpress but when learning that wordpress added some wysiwyg layout shit I got sad because theyre so gross to work with.

you need to build stuff. reading tutorials may get you in the door but it isn't enough.

Wow, tt's been a long time since I watched this. A bitter ending but a nice story so far.

>create gutenberg blocks based on patterns
I'm struggling to even think of what that means ?
Is it something they added to the new WYSIWYG editor in wordpress ?
If so I can't blame you, that hasn't been out for too long.

My company has an old web app that was written by a developer who quit half way through. The lead dev doesn't like the codebase at all and put me in charge of rewriting the whole backend from scratch. I basically have free reign to pick whatever language/frameworks I want. I haven't done webdev in few years and am not super up to date on what the hot frameworks are. Got any suggestions? The site is basically a way of displaying fancy graphs and reports. I'm thinking of using Haskell cause it's interesting I just started learning it, but I am more familier with Python and .NET.

// ==UserScript==
// @name nhentai right (or D) to the first page redirect
// @namespace Violentmonkey Scripts
// @match /https:\/\/nhentai\.net\/g\/[0-9]+?\/?/$
// @grant none
// ==/UserScript==

var url = window.location.toString();

document.addEventListener('keydown', onKeyPress, false);

function onKeyPress(e) {
if(e.keyCode == 39 || e.keyCode == 68)
window.location = url + (url.slice(-1) === '/' ? '1' : '/1');
e.preventDefault();
}

Why my @match doesn't work? Full script for reference.

probably the team was asked to do some shit and he couldn't because he was inexperienced or something or doesn't have years in the industry like the rest/been in college where students are taught these stuff.
Wordpress 5.X and Gutenberg can suck a dick tho. Worst thing those fag have done in ages. I had to fix some shit to some old clients because of the changes with the editor

>\/?/$
should be
\/?$/
still doesn't work though

can someone do front end for me site and make it look like Jow Forums
xchandb.xyz/board/vg/

Why did you publish a shitty version of your code that doesn't demonstrate the issue. Your compare is returning false when elements are out of order, which gets coerced to zero, which implies the two elements are equal. Your compare function should be something like
return records.sort((a, b) => +a.points < +b.points ? 1 : -1);

Anyway, I have to imagine you did the compare correctly at some point, because now I see that your top scores are in fact close to one another. This is simply due to how random numbers work. You're drawing numbers between 0 and 51 about 5000 times, and since the numbers will be distributed pretty evenly across your range, the top 20 that you're drawing are going to be close to each other.

So either have a larger range of points, or use a smaller list of names (maybe take a subset of the list before you sort).

kys if you use Haskell

What is it you're trying to match to?
\/?$/
Doesn't make sense either because $ is end of line and there's not going to be anything after it

I want to match only gallery links, eg:
nhentai.net/g/12345
nhentai.net/g/12345/
but not the image links, such as
nhentai.net/g/12345/1
nhentai.net/g/12345/1/

Jesus then go with Python or .Net
Why would you even consider Haskell if you are just learning it and it's a web app for a company, that someone else in the future also probably has to maintain in some way?

also
>\/?$/
>Doesn't make sense either because $ is end of line and there's not going to be anything after it
See:
>A string starting and ending with a slash (/). This way the rule will be regarded as a regular expression.
violentmonkey.github.io/api/matching/

Thanks for the help dude. Yeah it's late and I've been playing Football Manager all the time lately so I've been trying to get back into the programming mindset. I need to become better acquainted with .sort() too. Cheers again for the response

here's a solution
// length should be the same length as the list of names but w/e
const randList = Array.from({length: 40}, () =>( Math.floor(Math.random() * 40)).toFixed(2));
const names = await fetch('...')
const records = [];
let pos = 0;
for (const entry of json) {
const obj = {};
obj.name = entry;
obj.points = randList[pos];
obj.status = null;
records.push(obj);
pos++;
}

>Gutenberg can suck a dick tho
I used to do wordpress and my only real skill was adding fields to post types using cmb2.

Has gutenberg deprecated my skillz? I haven't needed wp work in years but it was nice to think I could fall back on it.

I always despised site builders cause clients wanted complex layouts they could easily add content to and for the css to magically know what they wanted but in practice it wasn't worth the effort.

Dude just use fewer people.
Of course it will be close together if you have a shitton and only show the top20

are you mentally changed m9? that's not the issue at all

If I learn elixir is that enough to get a job

...

what is the issue then?
The way I understood it from the follow up posts is, that the 20th position shouldn't start at ~50.8 and finish at 50.98 at the 1st.

That snippet is importing an array of a few thousand names, generates a score for each of them and then proceeds to show only the top 20.
If you cut down the list of names from 5000 to maybe 50 or so, you will see more of a difference between 1st and 20th.

What were you thinking about?

>However the 'points' are too close together.
if you run the snipped the points are always the same.

i think the problem was that the points being randomly generated were always the same

see here the points were generated before the ´´await´´ and the you just access them

Your Math.random is always outputting 1 instead of between 0 and 1. That's why the results are all close together.

I know python machine learning jobs require a degree, but does the same apply to javascript machine learning?

ML requires a degree. the lang is irrelevant since you can use the language you want.

python has far more libraries already developed though.

the hell you mean """"JS machine learning"""?

Did freecodecamp remove all its backend stuff? The curriculum has changed much since I last looked at it

is this what you want? add a "$" at the end if you want to only match the first two

also use regex101.com/ if you're doing any regex

Attached: Selection_025.png (478x271, 17K)

I hope they don't still start teaching jQuery within the first couple of JS lessons

I am not the user that posted that jsbin.
>Your Math.random is always outputting 1
what?
Points look different for me on every load and button click.


I just noticed there was a bug in his code and the list never sorted itself for me on Chrome.
Here is something where the name list is shortened to 50 entries (don't mind that they all start with A now I guess) and fixed point sorting
jsbin.com/miyabiyegi/1/edit?js,output

What's the best way to export assets from PSD and sketch files on linux?

Looking to start a project using Laravel/Vue with large scale data.
Problem is, have no idea where to get such data.
Any recommended datasets? Would rather have to do some processing rather than just visualizing a finished dataset.

bootstrap

So this happens(pic). How do i make button or input group stretch to full parent element width?


Select a Category:


All Categories.
One
Two
Three

Attached: Capture.png (763x96, 8K)

you mean scraping?

After looking in the forum of freecodecamp everyone posting success stories are women and minorities.

cum skin whiteoids are fucked

this good enough?
archive.ics.uci.edu/ml/datasets.html

>Gutenberg
isn't that shit still in development?
If not, thanks god I stopped doing WP jobs

>>Asking questions
>jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS

what incentive do white guys actually have to be in tech?

Attached: yt.png (582x541, 273K)

does finishing things like open source society universities computer science degree matter at all to employees? I dont mean as listening like its a degree from a university but as in something you can list that shows something like interest and maybe skill?

it may or may not, but it wouldn't hurt you to include it

this is the way we get around the hr degree required word filter boys. Just throw it in there toward the end you did this to show enthusiasm and interest

if you can, help with some projects in github. That'd show your interest in the industry and gives you more weight compared to others who don't even know what github or git in general is

is it useless to study independently then?
can I build apps with it / put it in my portfolio?

I need help saving form data to an ACF repeater in Wordpress. I'm desperate but i cannot post code (it won't let me)

stackoverflow.com/questions/24371367/using-post-object-inside-acf-repeater-field

got green text working. that shit was pretty compliated desu

Attached: Untitled.png (98x61, 1K)

Thanks, but that's not quite what i'm looking for,
pic related is my function and i need to save the next picture i will post which is is a form and i need to save it to an acf repeater without custom post types. I can do it with acf_form but i need to be able to customize the input fields which acf_form won't let me.

Attached: Screen Shot 2019-03-04 at 6.47.10 PM.png (1228x652, 143K)

And this is my form. Any ideas? i'm really desperate and i could not find anything related to the same problem.

Attached: Screen Shot 2019-03-04 at 6.44.44 PM.png (2006x900, 302K)

Or any idea on how can i customize the way the form and input fields are rendered?

I had this shit working a few hours ago until i met with the problem that i could not customize the form layout.

width:auto!important;

can't really help ya

sorry bruh

Is there any point to using a front end framework if you're not making a SPA?

you don't need an SPA to make use of declarative rendering

What the best operating system to run a web server?

I was thinking of openbsd cause i heard its secure and all that jazz.

What do you guys think? Or should i stick with gnu/linux (debian)

This, I use React (vue is ok too) everywhere with non-trivial Javascript functionality

OpenBSD seems like it'd be a headache tb.h
Debian stable is solid with regard to security

I'm somewhat new to front end, this seems like the place to ask
Is it considered bad practice to have all your front end code in the view layer components (react)? This is for simple projects,

Attached: C317BA4E-716A-4DC5-8ED8-A5B75B53591B.jpg (768x550, 40K)

Should I just turn this job down?
>Application process -> 4 pages of forums
>They sent it to me again
>"I already filled these out"
>"Please do it again"
>Have to build a project
>Passed.
>40 minute call with hiring manager about life and shit
>"There's two more parts of the interview. One with the engineers, and another with the CTO"
>"O-Ok"
>Just received an email, scheduled with three different engineers, over two days

This is a startup. The pay is absolute shit, I'd make the same working at mcdonald's probabaly. Should I just tell them to fuck off? Was going to take it because I've never had a job before, just for the experience, but they're hiring process is fucking broken. Thinking they're Google and shit, cmon.

Attached: 1547698912915.png (547x556, 275K)

Also, this is over the span of ~3 weeks. I feel like they're wasting my time. If I get on a call with an engineer and get thrown an algorithm challenge, I'm going to fucking flip.

pass it up, I started at ~50k at a startup. There is no reason to get paid a mcdonalds salary.

So I'm working on ditching my career and picking up web dev. I have a pretty good grasp of HTML/CSS to the point where I can quickly make decent looking websites. I'm working on javascript now.

What should I learn next? What has the best marketability?

Depends on what you want to do, front end and back end are pretty different.

I would like to be competent in both, but have been focusing on front end to start since I love design.

>find intern
>PHP
ffs.

php question

say I have this:

$data = 'something';


how can I update the content inside the tag with a variable or something? as in, I want the content to match user input that comes from a html form