/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 - Collection of PHP links.

>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: webdevAnonDevelopingAtIncrediblyHighSpeeds.png (824x553, 467K)

Other urls found in this thread:

github.com/mbeaudru/modern-js-cheatsheet
developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
github.com/dingo/api
twitter.com/AnonBabble

Attached: 1383763081332.jpg (319x188, 7K)

Any good books for understanding Bootstrap 4? I just need a book I can consult when needed.

>When that first paycheck at the new job rolls in

I FUCKING HATE JAVASCRIPT
..b-but I have to write some
Is this the best tl;dr for JS? I just want to get productive ASAP
github.com/mbeaudru/modern-js-cheatsheet
Aside from tooling, if I memorize that shit I'll be able to be a JS autist? I already program in other languages

Attached: FUUUUUUUUCKCKCKCKCKCK.png (1280x403, 214K)

>js cheatsheet
>cheatsheet
lose your high schooler mentality first

>const variables are not immutable !

Looks pretty updated to me.

Are you implying they are?

I mean there is probably no point trying to warm you up to JS, but maybe approach it with a different mindset.
You probably don't really have a good reason to hate it, if you leave out the /dpt/ memes.

This might be a good read too.
developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
MDN is a great resource in general.

const variables (identifiers) are immutable. Objects (references) are not immutable.
const foo = { bar: 'blah' };
foo = null; // causes an error, you're reassigning the foo identifier
foo.bar = 'baz'; // not an error, you aren't reassigning the identifier

If you want immutable objects, use immutable data structures or Object.freeze.

yeah, it's more accurate to say, that const variables can't be reassigned, rather than talking about mutability

True, but I'm tired of people expecting the semantics of other languages to apply universally, then claim some shortcoming of JS just because their assumptions don't hold. (not that JS is perfect by any means)

*relevant because i am tired of explaining well-documented features

Help this noob.

Im trying to print with different margins depending on the browser the page is loaded.

@media print{
.chromu{
margin-left: -3mm ;
margin-top: 5mm;
}

.firefoxu{
margin-left: 37mm ;
}
}

Problem is not working. It gets the one or the other. Any idea?

you can come to appericiate JS
what started out as a joke language has turned into a pretty unbounded language
that does mean JS has a lot of quirks, but it also means it can reduce symantics a whole lot and is very flexible
once you grasp the fundamental rules of JS (ecmascript 5 is a great starting point), it'll become understandable
there are so many features of JS, it's just a damn shame it's mostly confined to webdev

nice...

Attached: Captura de tela de 2019-06-21 19-36-56.png (892x569, 92K)

works here

Attached: 5656.png (863x691, 36K)

simply a collection of bloat

Can someone point me towards a resource on security, especially payments and login type stuff? My googling wasn't very successful and I really don't want to fuck this up

Is there anything Svelte can't do that React can? If not, how is Svelte not strictly superior to React?

The only advantage of react I can think of is being able to handle mutations that happen outside of the component, for instance when connecting an external store like Redux.

the what?

You don't need Redux when you use Svelte tho, because svelte has built-in store support.

Web dev makes me feel like I'm a 1930s convict breaking stones.

Glad it's Friday.

JR fullstack dev here. Because we're lacking dev capacity right now and our senior dev is on vacation I got assigned to be the backend dev on a project that has a tight deadline. I gave my estimates and they ended up being just under 80 hours total (2 work weeks) which is still barely enough time to get the site done "correctly". I hate projects like this that do not give me enough time to learn & work instead of learning I'm basically googling everything I don't know, copy and pasting the answer and hoping it works so I can move onto the next part of the site. This is just life in a very busy agency. Everything is go go go. You learn as you go or whenever you can.

I've never done anything with pagination and ajax together before and it looks like this site is gonna require it and I have no idea how I'm gonna do it but It'll get done somehow.


But it's the weekend and I'm gonna turn my brain off from code and worrying until Monday.

// ==UserScript==
// @name test
// @namespace Violentmonkey Scripts
// @match *://*/*
// @grant none
// ==/UserScript==

alert("it works");

document.addEventListener("keypress", function (event) {
console.log(event.keyCode);
});

How can I capture keypresses on every website? Alert and keylogger work on every other site, but I couldn't get it to work on nhentai or sadpanda. I want to add some custom keybinds on those, but I got stuck at the very beginning.

>he doesn't code for pleasure during off-work hours
never gonna make it

We need to have a VERY IMPORTANT DISCUSSION right now.

This concerns all of us.

>Preface
I've spent many years working odd jobs and learning how to write software.
I've invest a considerable amount of energy focusing into actual programming and am in a stage where I need to pivot to a job in development.

>Problem
There are seemingly two types of work in demand:

a) installing wordpress plugins
a+1/2) using front-end javascript frameworks
b) enterprise software engineering

Former is not programming and the latter I still can't break into.

>Solution

What seems most reasonable is to leverage experience and deep understanding how woocommerce codebase works in hopes of earning $200 by

>take our existing ecommerce site (currently living on bigcommerce) and rebuild it using wordpress and beaver builder

>Dilemma

How would you do these when it's the first time you've ever heard of things like beaver builder?

Do I glance at these things' codebase;
then proceed to explain to a client that even though I've never used it I have a deep understanding of it's essential functionality?

>Not alone

I know some of you are in the same boat.
This is a fresh thread I'll bookmark this post and keep coming so throw any thoughts you have on this please.

their documentation is already good, why do you want a book?

I look at GH's most starred repos for many things I need like API boilerplate and libraries, and so many of them are full of problems and incompatibilities with newer versions like this github.com/dingo/api
How can you not NIH everything except the base framework, that often is already awful to upgrade, when tech is in this sad state.
I think I'm going to leave development. Glueing retarded packages just to make some prick rich is making me hate my life.

Attached: fuck.jpg (800x523, 164K)

Been working as a front end dev for almost 2 years and I am burn out. It was fun at first when I learned react and got to do pretty cool stuff like state management but now I feel that front end is just over complicated and unimportant. Is backend in any way more challenging?

>mfw I got my first job and I am a first year
>mfw it gives me more than 8 times the minimum wage
>mfw my boss is a falangist from spain and he got me the job thanks to a Whatsapp group
>mfw they ask me if I can make the company's website
>mfw I tell them I could make it on a localhost
>mfw when I don't know how to do it
ff a month of Youtube tutorials
>mfw I finished the LAMP stack and installed wordpress on a 1000GB Hard Drive
>mfw I just need the domain and the SSL certificate to get it online
I am living the dream anons

Attached: feelsgoodconquistador.png (800x747, 218K)

>using google

no. it's just gluing together microservices you have to configure, barely even touch code. it's more sysadmin devops shit than actual programming.

Congrats dude

fake it till you make it

thanks user
the only concern I could have is to get security problems but I am sure I will be able to handle it

Not sure why you're so jaded about front-end, but maybe your shit attitude is part of the reason why you get turned down? Maybe your programming horizons aren't as broad as you think.

:(

any opinions on redux middleware?

currently using thunks, trying to decide if sagas are worth it, or maybe doing redux-observable (since i'm already comfy with rxjs)

How can I go about creating unique URLs for my user's profiles? I can't find an up to date Django tutorial

Attached: 1547506077768.jpg (1077x1053, 84K)

>unique URLs for my user's profiles


>generate random 32 bit string
>put it in a set()
>pop a string from the set()

done

>How can I go about creating unique URLs for my user's profiles? I can't find an up to date Django tutorial
Generate a uuidv4.

what kind of website is it? is it a contract gig or are you their sole IT guy?

A client purchased a framework license and had me install it to develop with it.

It's on my server and the guy is refusing to pay my invoice but is asking me to remove it from the server.

Can I say no until pays the invoice?

no typescript support which means no autocompletion and type checking templates and props passed to components
awkward vue-like event emitting which you cannot force parent components to listen for (like required props using react/ts), and you'd have to properly document the events emitted from your components to let other users know what event names and data types get emitted, so that they don't go sifting through your code.

You can do whatever the fuck you want if it's your server and he hasn't paid you for work.

Just started to develop a cards against humanity clone.

Not sure if I'll complete it but I must say that implementing the card animations & dragging were quite a fun challenge.

Attached: output.webm (1087x875, 2.58M)

tell him to fuck off until he pays

please add the custom text cards again.
xyzzy fucked up hard with that one.

Wait, they don't have them anymore? I remember playing custom sets about 2-3 years ago with some chan-based communities (v4c).

Anyways, I'll definitely let people make their own sets.

the sets, I think still exist maybe? but yeah, the custom cards were amazing.
I think xyzzy removed the custom text and the chat because people were makin death threats or school shooter threats, and feds wanted the logs. So they decided to fuck outta there.

lmao, oh yeah now I remember. You had a wildcard in your set that you could type any text in it.

Yep, I completely forgot about that.

you throw that in, you can easily replace xyzzy (cus not to mention the UI there is trash)

Best way to learn wordpress & woocommerce for a node/rails/django dev? I guess I need to get to speed with php too?

>#if
>#each
>#await
trash

more like

#trash

am i rite

That makes sense. I've thought about it after making that post.

Maybe installing a wordpress plugin is programming, in reality you are instructing the machine to behave a certain way when faced with certain input. That's a program.

Could you please elaborate on your phrasing on shitty attitude?

From my point of view I've strictly decided to specialize in back-end so I had absolutely no interest in front-end. Perhaps it's time to rekindle it?

elaborate what? when you write stuff like
>Could you please elaborate on your phrasing on shitty attitude?
it's clear you have a shitty, hostile attitude

didn't you answer that yourself?
The way is to write your own code, which in the long run is much better anyway, since whoever is developing it is much more familiar with the source, it's easier to change things and much more tailored to what you exactly need.

As you said, and I agree, base frameworks like Vue/React/Axios/chart.js/etc. are A-ok, but putting up another 3rd party layer on top of those is going to make the code of the final result pretty shit.

>the guy is refusing to pay my invoice
what's the story here?
Did you make a contract?

Nice, I want to make a rock, paper, scissors game with extended rules this weekend.

long url:
1. generate uuid
2. insert
short url:
1. generate random string
2. insert
3. go to 1 if unique constraint failed

Those things are mostly just worse developer experience though. What matters most is not developer experience, but user experience - Svelte is by nature far lighter than React.

Storing business state in view components is a huge mistake. You need an external global store if you want to produce maintainable code.

Anyone?

Any Angular Devs here?
I'm creating a canvas inside a TypeScript service, so that I can use that service inside BabylonJS.
This works, but how do I insert/access that canvas inside my Angular HTML?

Is the Script displayed as activated on those sites? If not, the URL matching might not work.
If it is activated, do you have anything else blocking.
Instead of // @match *://*/*
try // @include *

>Is the Script displayed as activated on those sites?
Yeah, it is.
>If it is activated, do you have anything else blocking.
I have a bunch of other extensions and config tweaks, but the script works just fine on like 90% of the sites.
>Instead of // @match *://*/*
>try // @include *
Nothing changed, still shows up as activated and doesn't work.

I added an additional console.log at the end - it doesn't show up either.
Just tried it in a fresh firefox profile with no other addons, settings, etc - still doesn't work.

does brad traversy have the best udemy courses for webdev?

use experience what? just don't install any packages from that john slickert retard and also learn about how and when react triggers re-renders and your app won't be a piece of shit

No, you can't hold things someone else owns as collateral.
If you want to see your money, go to a courthouse and file a claim. Ask the clerk or whoever works there. It's just a simple process, you don't even need a lawyer.

Yes, I made a contract and he was bitching about my first invoice saying "What did this 7 hours get me?". I set up the server to run the framework and created repositories, and began familiarizing with the code to see if it would work for his project. Because he was able to install the framework with cpanel in 15 minutes he didn't think I knew what I was doing and told me to quit working on it.

Well that framework uses a license key and it's currently activated on my dev server and his server at the same time so it's probably alerting the framework creators.

It's just irritating because I bill out at 75 an hour and I cut the dude some slack and was working for only 25 an hour. I scrubbed several hours of meetings and phone calls from the invoice and he's bitching about this. I'm never going to accept a client like that again.

But yes, he signed a contract.

I should add that 2 of those 7 hours was a meeting at a coffee shop, 2 was setting up a lamp environment with the necessary stuff and got, and 3 was writing design docs for creating the affiliate system he wanted me to implement. That's not at all bad for less than one full work day.

Maintaining a virtual DOM is still unnecessary overhead and decreases page performance and increases resource usage, even if it's not easily perceptible when you're running one simple page on a powerful machine.

use pluralsight if you can afford it

>lowering your rate
retard

I used to set up servers for every job but today managed hosting is my go-to solution. I will even go shared to save costs and time if I don't need to run background stuff.

i think i can get a trial through vs dev essentials so maybe i'll try that, thanks

I'm a Max man myself.

Who's that?

Attached: .png (256x256, 106K)

Guess what, it's never gonna go away. Suck it, java developer.

How do I make VSCode autocomplete with only parentheses without those dumb names that I have to erase every time?

Attached: Desktop 2019.06.22 - 18.35.14.09.DVR.webm (722x204, 256K)

You are supposed to press tab and it automatically jumps to them....and then you name them whatever you want.

Cool, now how do I disable them altogether?

Should I just cave and get a squarespace subscription? I'm a starting photographer I have been following html/css tutorials on youtube on creating a simple portfolio grid site with hover capabilities but everything is just really messy

By switching to a proper editor, pleb.

It's sadly not clear to me. I'm aware that something's wrong, but don't know what.

read some self help books and take notes

Attached: 71e0msPF7jL.jpg (1313x2043, 164K)

I'm the person you replied to.
What I mean is that your original post pretty much claimed that front end doesn't qualify as programming, which comes off as very elitist, and oftentimes people who are arrogant in one area are arrogant in others. I work on a variety of things, sometimes frontend, sometimes backend, sometimes not web related at all, but having an elitist attitude will only alienate others. I'm not saying you need to enjoy or even learn front-end, just appreciate that there are different skillsets for different areas. If you want to learn about "enterprise" development, there isn't really much to know. It is a different definition for everyone you ask. To me, I think of enterprise as highly tested and, hopefully, maintainable codebases that probably don't use the very latest stuff. Then again, my employer considers me an "enterprise" developer, and I definitely don't work on anything that fits my own definition.

Have you learned how to set up a CI/CD pipeline? Have you worked with the various kinds of testing? (unit tests, integration tests, end-to-end tests). Do you have an understanding of the various parts that go into delivering web applications to end users? (basic understanding of DNS, HTTP(2), TLS, etc.).

Arguably these are all things that a backend developer should have a decent handle on, and that's aside from touching on things like how different databases perform, their syntax, or even their failure conditions, since some companies may or may not have a dedicated database team.

Hopefully this answer is more helpful.

I'm writing a craigslist scraper in nodejs, using node-fetch for the GET. It's returning
This IP has been automatically blocked.
If you have questions, please email: [email protected]

But I can still visit craigslist in my browser, so I figured it was looking at the user agent. I copied my browser's user agent info and still get the "IP blocked" message. Any idea what it could be? Should I just use a headless browser instead?

don't bother they have a whole team to stop scraping

puppeteer it is

Yes or go with Wordpress and get a plugin like Elementor that will let you drag and drop elements / effects onto the page and create your own site using that. Elementor also has pre-made templates you can just edit the pictures and words to your own liking.

You're a photographer, not a web developer. So don't try learning code to make your website when you can use one of the many tools available for non-developers to create their own website. It would be like me, a web developer, trying to learn photography to put professional looking images on my website. Why wouldn't I just hire a professional photographer to just take the pictures? Or better yet, why not just go and use some free photos on Unsplash. That's what they're there for.

As someone new to webdev (< 6months) and minimal python experience (read/worked through headfirst python) I'm trying to scrape information from a set list of websites for certain projects... Would it be easier just to setup/incorporated something like scrapy or Beautiful Soup than using axios + cheerio?

just make your bot send a normal chrome or firefox as useragent.

Yeah I think I get it now, the cause of it, even. Sorry.

I did, I just copied the user agent info from firefox, didn't work

That's it.
I'm stuck in the so called 'tutorial hell' and I have no idea how to make any real progress.

Why does every article showcasing a new library and/or showing a way to do something has to be quirky and sassy and interspersed with animated memes and macros every two paragraphs

its all a scam to make good looking cvs and have a popular repo in your belt
everything in this industry is about cargo cult and self promotion

Thanks user, I'll poke around with WordPress more first I guess. I had fun learning coding at first but it just got frustrating after a while with all the issues that keep cropping up. Was highly satisfying when I manage to solve something though

Pick some trivial project and force yourself to work your way through without the use of copy-paste.