<wdg/> - Web Development General

Previous thread >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 (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtu.be/Zftx68K-1D4 - Web Development in 2018

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

Attached: wdg.png (822x552, 868K)

Other urls found in this thread:

en.wikipedia.org/wiki/Peter_principle
ibm.com/training/course/WPL47G
ibm.com/training/course/WP490G
webdev.singlehtml.com/
mean.io/)
spidr.today/
*.deviantart.com/art/*
theguardian.com/technology/2017/jun/20/turning-smartphone-greyscale-attention-distraction-colour
ashleynolan.co.uk/blog/frontend-tooling-survey-2018-results
cors-anywhere.herokuapp.com/https://a.4cdn.org/g/catalog.json').then(a=>{a.json().then(b=>{b.forEach(c=>{c.threads.filter(d=>d.sub).forEach(d=>{(d.sub.includes('/wdg/')||d.sub.includes('wdg'))&&(window.location=`https://boards.Jow
twitter.com/NSFWRedditVideo

First for Peter Principle in action.
en.wikipedia.org/wiki/Peter_principle

I'm guessing this is for promotions at your current company? Makes sense considering it was written in 1970.

New companies don't know what you can do outside of whiteboarding and what they see on the resume. I am a part of the hiring process so I can confirm.

I don't think that principle is relevant here.

Also I'm in talks with a company in San Francisco because I run a competing site so I have experience with their tech. They even use the same languages. So your experience on paper isn't everything.

>Titles are bullshit, you're a code monkey with delusions of grandeur.
Ok. lol.

how can one design modern web sessions (token (JWT or ad hoc) that's can be used in http headers with no csrf token) like it's designed in the new reddit website and discord website

Sounds like you want to implement your own identity provider and service provider.
I recommend you don't. They're easy to write, but they're also easy to fuck up.
If possible try to find a library that allows you to implement a OAuth/OIDC or SAML IDP that doesn't take much fuckery.

well I am not completely brainlet like you would expect from the usual Jow Forumstard, My project is a SPA website with an API so that I can expand it to a mobile/desktop app if I wanted in the future. but for now I have only the website, here is my plan

use the usual session cookie, whenever the user requests the first page which is html, the session id is checked against the database, if it matches, generate a JWT that contains the user id and unix timestamp so that I can invalidate the token if it's too old, store the JWT in the initial state in the html that's gonna be used by Redux in client

for subsequent requests, only the API is gonna be used, so I will attach the token in the request HTTP header, no csrf token is needed since the whole credential that's gonna be checked in the API is the http header and not the session cookie.

How is embedding the JWT in the HTML supposed to prevent someone from clickjacking your users?
The user has the session cookie in their browser.
They get clickjacked.
They receive an HTML page with the JWT embedded
???

The JWT is supposed to be used in place of a session cookie, not with one.

>How is embedding the JWT in the HTML supposed to prevent someone from clickjacking your users?

what do you mean by clickjacking? you mean xss? clickjacking can be easily prevented by X-Frame-Options header, also content security policy header can mitigate xss to a great extent. JWT can be also obtained from a GET request after the first html page is reloaded and stored directly in the Redux store

Look at your past work next year and you'll realize how inexperienced you still are.

Any of you anons worked with IBM Web content manager?
I swear there's like 1 redbook and a reference manual pdf on this thing and that's it.
Would be cool to have an alternative example reference besides the riverbend bs.

IBM here, I'm checking our internal sources and the latest documentation I've found is from 2014

the fuck you doing?

That stopped happening years ago. I did say I've been launching sites for a decade, right?

No, you said you had a year and a half experience.

It's just maintenance on a business web portal. From what i've seen adding content , editing templates and styling it.
I'm a junior (first job) and i'm gonna take over this so a senior can switch to a new project. Currently learning wcm.
Thx for responding user , was just curious if there was extra docs for this thing.
It's not so bad after 2 weeks , already got the hang of how it works.

That's about what I expected.
Anyways, I literally cannot find any other docs for this thing.
I assume the business plan was to have people pay to take courses on how to use the software, in which case these links are your best bet.
ibm.com/training/course/WPL47G
ibm.com/training/course/WP490G

Also if you actually are going to go for it, I'd pay close attention as to which companies hire the pajeets to teach the class :^)

Don't think i'll invest much on wcm , it's not a big client , few hours.
It's a small company so we take all kind of jobs . My first 2 weeks as an intern i fixed a visual basic 6 + access db, lovely stuff , especially the closed source dlls that i had to reverse engineer to try to fix.
Hope i can get into the new java ee / angular stuff we are getting , but for the moment i'm happy to have a job , even if i'm the dude that gets all the weird jobs.

I learned that nginx is a fussy bitch who needs to be coerced into sex^H^H^H working properly.

>even if i'm the dude that gets all the weird jobs
That's a fun job to be in desu
Most of my career was being the guy that didn't hide and make excuses when something out of the ordinary came along. It made me indispensable (or at least look like it) in several places because everybody else looked incompetent when they dove for cover or passed the buck to me and I just sat down, learned what the fuck this things was and fixed it.

Not being afraid of work will make you pretty handy to have around.

A year and a half of professional experience.

I'm going to negotiate a support contract on Monday. A company that I've done a lot of contracting for in the past needs me to be able to answer emails and fix bugs when things go wrong but aside from some monthly maintenance, they don't have any other work for me anymore.

What's a good mechanism for pricing this kind of support?
I don't want to say no to extra work, especially since it can probably be done after-hours from whatever other gig I have, but I can't really guarantee getting any work from them since support is unplanned by definition and if I charge too much, they'll just say no and try to handle it themselves.
They do have other developers on staff but they're all Microsoft people and shit, not full-stack linux guys like me, they might be able to debug my code but it would be a pain and they just don't know the codebase like I do. So, I can set my own rate but it has to be a fair price or they'll take it in-house.

I already have a daily rate for them for actual development and planned maintenance so I'm looking for an hourly rate as a fraction of that, or something similar.

What would you do?

Why doesn't this thread have Sakuya in the OP anymore? Was that too much for the discord redditors?

Either go on full hourly compensation, or decide on say X hours/month for the monthly maintenance and then hourly for the other fixes.

Seems like a pretty shitty setup if you're not guaranteed work unless you have other sources of income.

>Seems like a pretty shitty setup if you're not guaranteed work unless you have other sources of income.
It sucks a bit but they don't actually have any regular work for me so why say no to what little they do have?
Of course, if they don't offer enough money for me to stick around then I won't. The rate needs to be balanced to suit both sides obviously.

I can charge one day/month for maintenance and that's cool but I don't really want to just say that support is day-rate/8 since they'd never pay me for a full day again.

from the previous thread
var asyncAdd = (a,b) => {
return new Promise((res,req) => {
if (typeof a === "number" &&
typeof b === "number") {
res(a+b)
} else {
req("must be numbers dumbass!")
}
})
}

I think you meant rej, not req. And I assume this is just satire on making everything promise based now.

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}

I have actually done this when faking a delay in sagas.
It's not funny. Stop it. Get some help.

Hey guys,

With Symfony (and Doctrine in general I guess), I'd like to set a property to true for a certain amount of time, like 24 hours. How could I do that? I can't really find anything helpful on the doc and I'm a bit dumb.

FREE WEBDEV COURSES
webdev.singlehtml.com/

Attached: GIMP_Pepper.png (240x240, 47K)

Is there something like MEAN (mean.io/) but just webpack/browserify + babel + gulp?

at that point you can just as well write the config yourself.
Take Webpack, add babel-loader for your JS and maybe sass-loader/css-loader for your CSS and you have what you are asking about.
You don't need a magic premade build scaffold configuration for basic things like that.

ur cute

Tell me about Elixir and why should I choose it versus more commonly used server-side technologies such as Node.js and Python

You shouldn't
If you don't know what you are doing then you should pick one of the most popular options, if you do know what you are doing then go for it

I'll summarize your experience with anything niche
>Oh wow I'm gonna be SOOOOO hipster and pick this c00l language nobody uses! I'll get a 300k job next year with my niche skills!
>Oh..How do I do this..?
>Google it
>No results
>Stackoverflow search it
>No results
>Continue on anyway, spend hours on end googling shit that is trivial and can be solved easily with any popular language
>Keep going, at this point you're putting in 2x the hours of everyone else for half the results simply because it takes so long to get shit done, and you have to learn while you're at it
>Try to learn more advanced things
>No tutorials exist
>Have to spend entire weeks to do things people can do with JS in 30 seconds installing something
>1 year later you start looking for this magical 300k job
>Turns out none exist
>Shill on Jow Forums to make yourself feel superior and better
>Post benchmark images of your being 0.03s seconds faster in certain situations

Congratulations you now have sunk cost fallacy and spend your days trying to come to terms with your choice to invest so much time into something niche, but you just keep digging further because why the fuck not, you've already come this far.

I can't answer sepcific to Symfony but in general, you set the property with an expiry date and when checking the property, you also check the expiry date and if it's expired, delete the property (or not, it doesn't matter much) and report that the property is now false.

This is handling short-lived password reset/account activation tokens in nodeJS but the principle is the same for any other language or framework you want to work with.
User.findOne({ loginToken: req.body.token }, function(err, user) {
// If not exists, throw error
const now = new Date();
if (err || !user || user.tokenExpiry < now) res.status(401).send({ error: "This token is not valid." });
else {
...
}
});

>MEAN without Angular or Node or Mongo or Express
I'm not sure what you're looking for. You need a backend for any real website, do you mean just not using frameworks? It's not really a stack then, just a Javascript website. Which is fine, I did apps like that and they were ok.

I like the design. It could be slicker but it does what it needs to and nothing it doesn't.

maybe he's just looking for a project template or a """boilerplate"""
there's a fuckton of them on github, but in the end it's worth it to invest a day or two and build one yourself from scratch so that you know what the fuck is going on
also using gulp now is probably an overkill nowadays, npm scripts should be enough

>maybe he's just looking for a project template
Maybe, create-react-app would do that for React but if you're not using a framework, I think it's pointless.

desu, I built my own just by trying to install React-toolbox. By the time I had satisfied all their dependencies and configured the necessary CSS pre-processor loaders, I'd built a project template already.

So now that the shadow dom is faster than react's virtual dom, is react doomed?

What's shadow dom?

>shadow dom
The DOM's evil counterpart

The news site spidr.today/ requires modernization but I lack artistic talent. What would be the most necessary improvements you'd make if you had the chance?

Made a userscript for filling in DeviantArt's age verification form for viewing adult content. Must be somebody else as perverted as me on this godforsaken general. I get it needs refactoring but it works. I like the effort at recursion I made since I am still learning the ropes. Any critique is very welcome.

// ==UserScript==
// @name DeviantArt autofill
// @version 1
// @grant none
// @match *.deviantart.com/art/*
// ==/UserScript==

let found = [];

const nodeSearch = ((parent, node) => {
parent.childNodes.forEach((child) => {
if (child.tagName === node) {
found.push(child);
} else {
nodeSearch(child, node);
}
})
return found;
});

if (document.querySelector('.agegate') !== null) {
nodeSearch(document.querySelector('.datefields'), 'INPUT');

const month = found.filter((item) => item.name === 'month');
const day = found.filter((item) => item.name === 'day');
const year = found.filter((item) => item.name === 'year');

month[0].value = '11';
day[0].value = '11';
year[0].value = '1991';

document.getElementById('agree_tos').checked = true;
};

Cheers Pepperman

document.querySelector('.submitbutton').click();

A nice addition to the end to click the button that submits the whole thing. There is no actual element so the submit button is being clicked instead. JavaScript is awesome. I love automating all my shit.

Is it a better design practice to have separate components/pages for viewing, creating, and editing a record?

I.E. I have a table of organizations that do business with us, and there is a column in the table for view/edit/delete, and an "add organization" button on the page. Should view, edit, and create all route to the same Angular component (and check route parameters for disabling/enabling of functionality) or should I have separate components for each functionality?

how much would the logic branch if you used one component?

If the functionality is kept all in one component it does get a little messier when it comes to checking the route parameters and deciding what to hide/show. Plus if I want to make a tweak to how one looks it be more complicated to manage that. So multiple components is probably better in that case

This. Why does this board shit on Python, PHP, and JS but praise shit nobody gets a job in? That’s a rhetorical question.

Attached: serveimage.jpg (638x491, 29K)

>pic related
For what purpose?

Attached: Screen Shot 2018-05-11 at 2.31.27 PM.png (754x98, 16K)

To give the look a dull, "official" stint.

A complete redesign because nothing is right.

theguardian.com/technology/2017/jun/20/turning-smartphone-greyscale-attention-distraction-colour

>nothing is right.
Wrong.

The website is perfect as it is.

A bit more constructive feedback, plz or examples of modern sites that could be helpful.

don't worry. i'm already working on it.

Well it makes the whole website look depressing

Anyway, my general impression UI-wise is that it's not bad. The comments feature needs some work. Popping out into a new window is dumb. I guess the individual story boxes are too small to expand the comments from there, but maybe do a modal instead. And then keep track of stories that the user has commented on, or maybe just add a bookmark feature, which would also let users get updates on stories as they develop. Oh, also, don't use default html look for the form stuff, it looks lame.

The website is just a news aggregator. nothing more..

stop with the 'tism

Thanks for the feedback. I'll be thinking of those things.

Fonts are fucked, hierarchy is fucked, colors are fucked, layout is fucked, images are fucked, padding is fucked, flags take up way too much space and aren't accessible, dark mode is an eye sore, you have some rounded buttons but then everything else is sharp corners.
I mean I could literally go on for days, it's best to start over. Look at things like flipboard and google news and understand why they made the choices they did, and how you can implement something much better.
Design is a legitimate field, you can wing it but it'll always look off unless you invest some real time in understanding design.

>girl starts learning html and CS 1 month ago
>thinks you can develop a full website with it
>somehow lands a multi-year contract high-paying remote web developer job

Don't let anyone tell you they don't have it easy.

Literally a web developer with cereal box knowledge of HTML.

CSS not CS

It's because she is a girl, user.

Gotta fill those gender quotas.

>Linkedin motto: It's not what you know but WHO you know

this
everything's wrong.

Despite what retards on Jow Forums tell you, there's still exceptional demand in any programming field and they're more than willing to train people.
Just don't be a school-shooter-in-progress and you'll get a job. Well, excluding certain regions desu

>and they're more than willing to train people
In my experience they're more likely to let people languish in their noviceness than actually train anyone.
The industry is fucked in terms of mentorship.

For reference, I think this is a situation caused by the something like 10 year gap between the dot com bubble, and businesses beginning to hire people again.
So for a huge corporation, you've got a 10 year gap between your senior devs and your junior devs, with no one in-between, it's little wonder the situation is the way it is.

Frosh out there who want to learn something should go join a startup and watch their backs so that they don't get fucked over by nonpayment.
Silicon Valley's built an entire industry and could write libraries worth of books how to not paying people what they're owed

ashleynolan.co.uk/blog/frontend-tooling-survey-2018-results

Just because big tech companies aren't willing to hire novices doesn't mean that nobody is hiring and training them. Start small and work your way up, the experience is valuable and you won't starve while learning.

>For reference, I think this is a situation caused by the something like 10 year gap between the dot com bubble, and businesses beginning to hire people again.
That isn't a thing.

She has one month of learning HTML. Not even enough grasp on it to know that you can't make dynamic websites with just HTML. She was saying she wanted to make this big site that needed to use APIs and that she was learning HTML to consume the APIs.

Her job is paying over 60k a year apparently.

I think it's because she's an internet personality and the person hiring her is hoping to get in her pants.

Either that or it's a scam. No one could be this stupid and hire someone that's not even a novice, right?

Like in her mind how can she think that one month of training can land you a 60k+job? That doesn't even make sense. I knew HTML/CSS when I was 10 and I didn't have a 60k a year job.

Since you wanted to be soooo unique with your thread title, I've had to change my bookmarklet to accommodate for people who don't put literally '/wdg/' in the title field.

javascript:(()=>{fetch('cors-anywhere.herokuapp.com/https://a.4cdn.org/g/catalog.json').then(a=>{a.json().then(b=>{b.forEach(c=>{c.threads.filter(d=>d.sub).forEach(d=>{(d.sub.includes('/wdg/')||d.sub.includes('wdg'))&&(window.location=`https://boards.Jow Forums.org/g/thread/${d.no}`)})})})})})()

Maybe 'train' is a bit much.
But any places I've been at were more than happy to fork up for a pluralsight sub which I took advantage of.
Classic mentorship doesn't exist at all anymore, this isn't unique to the industry. There's no vet waiting to take a young lad under his wings granted he can handle the bants. Hollywood fucks with people on such a deep level it's kind of amazing.

60k isn't much at all, literally fresh out of grad school and those faggots literally only know abstract concepts.

my autism if FLARING someone make this less ugly.

let checkTag = function(tag) {
if(tag.includes(",")) {
tag = tag.replace( /,/g , '').trim();
let cleanTags = [];
cleanTags.push(tag);
}
};

It's 60k plus. She said with that job alone she would be able to pay 60k student loans in 1 year. So add living expenses and stuff. Probably closer to 70 or 80k.

It just doesn't make sense for someone with a beginner understanding of HTML.

It's a thing at Raytheon. I asked and they confirmed.

What are you even trying to do? Pushing the tag into a local array and then?

>any places I've been at were more than happy to fork up for a pluralsight sub
See, this is what I mean, and I think we're having a fundamental misunderstanding.
You're expected to learn on the job, and that's normal.
I'm seeing a lot of people not getting real work under real senior developers.
These people aren't learning basic shit that you would learn by just doing their jobs under a normal and healthy work environment.

Instead they're doing everything on their own, literal pioneers of their time... except everywhere has already been explored, and they're just wasting their time exploring it again because all of the world's maps had burned into thin air or something.

You forgot taxes.

>You forgot taxes.
That has to be a scam, right? We're talking like 100k then for 1 month of learning.

nigga don't worry about me or what im doing, just make the code less autistic.

Which is the best domain for a job site for finding remote jobs.

remotefaraway.com
remoteemploy.com
hirefar.com

I make $100k/year myself as a junior developer. Except it's in, you know. New York. Taxes are high, that's just how it is.
You're paid according to what it would cost to bring you to that location. In New York, I'm paid $100k because living here is naturally expensive on top of taxes, and this also isn't exactly the "hub" for software engineers.

So I'd make back something like $60k. Which would be enough for that girl to pay off her student loans. So it's plenty feasible.

Anyways, whatever she told you doesn't have to be the absolute truth. Maybe she didn't bother to calculate tax or living expenses.

Now that I read it again, 1 month of learning for $60-100k sounds a bit steep.

Who knows what the fuck happened. Maybe it's the legendary Silicon Valley homeless $100k

I know that pay isn't the same everywhere. It just makes no sense that someone who can barely hello world in html can land a job making that much.

Anyways, she will probably be fired within the first month if I had to guess. Will be interesting to see.

It's actually funny because she was asking what people did. I sent a picture of me in Cancun saying I'm a remote web developer and I get to go wherever and make money and now she's a remote web developer. lol

What do you bring to the table that Upwork, Fiverr etc do not?

It's always amazing seeing this salaries as someone from Europe.

like, what the fuck

Attached: 1526081072385.jpg (446x595, 60K)

It's not that kind of remote work.

In many US cities if you earn under 100k you are at the poverty level.

Is this the general to ask questions about cloud dev and serverlets or could someone direct me to the proper thread?

Why are you so obsessed with her btw?

Eh, I'm jelly because it took me 2 years to land my first dev job.

Best JS code style? I'm looking at Airbnb and it's looking pretty good + has a React code style guide. I was using Standard with Vue before.

Get over it, in the time you've spent thinking about this bitch you could have shipped a product.

When rewriting my frontend with React some time ago, I skipped the "enable push notification" button, which I rewrote today.

How have you guys furthered your projects today?

Attached: panic.png (392x361, 124K)

Y-yeah moving from jQuery to Vue mate.

I am and I am.

const validtest = (a, b) => {
return new Promise((resolve, reject) => {
typeof a === 'number' && typeof b === 'number' ? resolve((a + b)) : reject('invalid data');
});
};

const asyncAdd = async (a, b) => {
try {
const valid = await validtest(a, b);
console.log(valid);
} catch (e) {
console.log(e);
}
}

asyncAdd(1, 2);
// 3
asyncAdd('test', 2);
// Invalid data