/wdg/ - Web Development General

CSS media queries are either really hard or really easy depending on who you ask edition.

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: smoking_phone.jpg (1050x591, 96K)

Other urls found in this thread:

gist.github.com/azjezz/6ad9c4df52645137154166053bece88f
medium.freecodecamp.org/moving-away-from-magic-or-why-i-dont-want-to-use-laravel-anymore-2ce098c979bd?source=rss------laravel-5&gi=dbb2d610c44d
github.com/nuxed
github.com/nikic/PHP-Parser
github.com/ircmaxell/PHPPHP
github.com/gabrielrcouto/php-gui
github.com/php-ai
getcomposer.org
github.com/reactphp/
github.com/amphp/
youtube.com/watch?v=BFkYoT5Gezo
github.com/hhvm/hsl-experimental/pull/36
github.com/hhvm/hsl-experimental/pull/36#issuecomment-465724654
vuemastery.com/free-weekend/
pastebin.com/qByGu69c
twitter.com/SFWRedditImages

God dammit I uploaded the wrong image. Welp, it wasn't that good anyway.

In any case, I'm retarded.

Attached: smoking_wdg.jpg (1050x591, 182K)

>In the second example, a and b are both variables that are declared as parameters or is that incorrect in thinking? Rather when you use parameters they can also be used as variables later on?

Yes, calling addNumbers(a, b) like addNumbers(8, 12) means that "a" variable is assigned to 8, and b is assigned to 12.

>Returning a value is the only way that a function can pass a value to a variable? If the third example was missing the return statement, const result would be undefined later?

It would be undefined because it was defined in the scope of a function. Scopes are anything that are between curly braces "{" "}".

For example, copy paste this in your console.
{
const result = 10;
console.log(result); // 10
}

console.log(result); // error


Now try this:

let a = 5;
{
let b = 24;
console.log(a); // 5
{
a = 10;
console.log(a); // 10
console.log(b); // 24
}
}

console.log(a); // 10
console.log(b); // error

I've been out of programming for quite a while, recently am getting back into the flow of everything and wanted to do some open source stuff.

Any interesting projects that a newbie could contribute too? I'm trying to make my github look active with personal projects but I'd like to actually do something.

Attached: center scan.png (931x673, 386K)

So is it accurate to think of return as taking a value within the function's scope and applying it to the global scope? Does that make sense?

Return means to stop execution of the function and take a variable/value out of the function and (typically) assign it to a variable.

By default if you don't have a "return" statement in your function, the function returns "undefined" when it's reached the end.

For example:

// Get the body element (querySelector returns a HTML DOM element if it can find "body").
const bodyElement = document.querySelector("body");

// The console.log function returns undefined because it just does something, so I'm not assigning a value to this function.
console.log(bodyElement.innerHTML);

what's a good place to learn rxjs? I've been able to get away with knowing only the absolute basics of observables etc. at work by re-purposing existing code when I need to use them, but my limited knowledge of it is definitely starting to bite me in the ass

Thank you for taking the time to answer my questions.
Your example is what I want to get to, that is using JS to actually interact with a web page. Learning all of the semantics is so grinding and monotonous especially while lacking any foreseeable practical use for what I'm memorizing.

At my job I do react but lately they've brought me on to do DB and backend work as needed, which is fine except our backend is Luccee / Coldfusion. Should I omit this from my resume because of the stigma around these languages?

php guy here once again.
ask me anything php related ( standards, how-to, frameworks, libraries, php development and other things )

I'm getting confused, what's the difference between using jwt, passport and passport-jwt and just using jwt and express-jwt. They seem to do similar things

How many users can a 100mbps link support? Assuming I'll be running a forum with images?

100Mbps or 100MBps? If you are using a VPS with somehow only a 100Mbps link the bottleneck will probably be the hardware, not the link

defer the images to a CDN if you care so much about bandwidth.

What's Jow Forums's favorite CDN?

More of a business question but does anyone know how electronic signature websites are considered "legal"? Like what makes the digital signatures on services like Docusign or Signnow hold any legal weight compared to a real signature? If I or any other random pleb builds a website that collects and secures digital signatures, do those signatures hold legal weight as well or would I have to get some kind of licence/legal status?

ive posted my shitty website before and I dont mean to shill it again but i just rewrote a bunch of it with flexbox, which I just recently learned and I would like someone to look over the source for it and see if i did it all correctly. It all appears to be functional but I want to make sure i have the syntax and everything correct.
www.grime.online

Entry-level developer here trying to make programming friend/mentor. Preferably someone more skilled/knowledgeable.

What languages do you use?

I'm good with Javascript, Python, and have been steadily learning Haskell (Learn you a haskell book) tho it's hard as shit. I haven't done much low level programming yet but I'd pick C over C++.
For web technologies I know express, react (react-router, redux), and nodejs.
I just hate this solo study/coding shit, been doing it for too long-- want to switch things up and collaborate.

JWT is the name of the standard; passport-jwt and express-jwt are competing implementations of that standard, as far as I can tell. Not sure if they have any explicit differences, but overall they're meant to be pretty much the same.

Nah, it shows you can learn old boomer technology and work with older codebases.
If you word it the right way it's a positive for sure.

>refactored their older x to improve z by 50%

i simply cant understand interfaces and abstract classes
i cant understand why do i ever need them?
i fuckin almost made a big website in laravel and never used interfaces or abstract classes
i just used repositories which is just a fancy name for separating work and logic from my controllers into these "repository" classes that contain needed methods that i call in controllers just so controller can look clean
can you help me?
level with me please, dont just recommend some technical explanation from so or some books

Opinion on Repository pattern?

What does const in Javascript do?

it marks something to be constant, non-changable

You can't just go and contribute to a random repo. Just look at packages you use and add what should have been there.

redpill me on Laravel.

it just werks

It brought back life to PHP. Without it, people would probably only be using PHP for Wordpress.

Or just not using it.

php will literally outlive everything in web programming

not the php guy, but i can explain a little ( i mostly work with hack not php )

( ended up making a gist : gist.github.com/azjezz/6ad9c4df52645137154166053bece88f )

i personally dislike working with laravel, here's a blog post on why :
medium.freecodecamp.org/moving-away-from-magic-or-why-i-dont-want-to-use-laravel-anymore-2ce098c979bd?source=rss------laravel-5&gi=dbb2d610c44d

not really, better options : symfony, zend expressive, or the php league packages ( they make a framework if you just combine them the right way )
but i can see why people like it, its easy to work with but as mentioned in the blog post i linked, too much magic.
( i personally like writing strict code - you can't really do that in laravel - , and that's why i use hack and i made my own framework - github.com/nuxed )

>.onions domain

kek

>gist.github.com/azjezz/6ad9c4df52645137154166053bece88f
thank you user for your time really appreciate it
i will dig in and learn about it more until im 100% content with it

Why do people use PHP for anything other than back-end?

the other guy did good explanation, i don't have much to add
cause it can be used for other things?
i would say php works for web + cli

but you can use for anything you want and there's no problem with that
of course you can't compile it so you can't use it for everything but you can bundle applications inside PHAR and just install php in the client side

here's some stuff you can do with php and it's okay to do them

php parser in php :github.com/nikic/PHP-Parser
php vm in php : github.com/ircmaxell/PHPPHP
php compiler in php : ( cam't find a link but i remember clearly someone was working on this )
php gui framework in php : github.com/gabrielrcouto/php-gui
machine learning with php ( actually used it in production before ) : github.com/php-ai
package manager : getcomposer.org
async programming, tcp/http/udp/websockets servers and more : github.com/reactphp/
another one : github.com/amphp/

>That PHP Guy
>php guy here once again.
why do you do that shit and can't just post as user like a normal person?

youtube.com/watch?v=BFkYoT5Gezo

hey bud, do you have any idea on how sockets work in php ?
i need help with this : github.com/hhvm/hsl-experimental/pull/36
i'm having an issue where i need to determine "is this the end of the response" ( EOF ), while doing async read from the socket.
see : github.com/hhvm/hsl-experimental/pull/36#issuecomment-465724654
i don't know if i'm doing it right and this is an ordering issue or something else.
please help

>async programming, tcp/http/udp/websockets servers and more : github.com/reactphp/
you mean as a replacement for ajax?

it would make more sense to use
flex-direction: column;
for elements like the .news-container instead of relying on the elements wrapping to new lines.

yes you can, retard. that's the point of open-source

Riot Dendrite server can really use some contributors, it's in Golang which monkeys can pick up over a weekend and the current tasks are low hanging fruits of implementing basic Matrix API specs

Excuse me?

>monkeys
dropped

what happens when we die?
i mean here we are making shitty websites and apps
at least we could respec to make something more meaningful and leave a legacy
we should all learn some serious actual programming languages and make something that matters instead of degrading ourselves with javascript making apps and programs that will be just lost in the sea of shit that is internet

i hate when these thoughts come up on my mind when im in the middle of the project that nobody will remember it

>what happens when we die?
make a thread on /sci/ or /lit/ to see your question answered.

or are you talking about the die function in PHP?

imagine being this much of a brainlet

Seething freetard. You can replace all the files in repo with install gentoo and make a pull request but no one will care. What I meant was that if you use a package yourself you will notice genuine features that are missing. If you add those features there's a higher chance of getting your pull request approved.

no ! i want you, the hard working gentlemen to discuss it, not the pseuds on /sci/ or /lit/

What are your interests or hobbies other than Web Deving, I'm hardcore into /his/tory, into Indo Europeans, Proto Indo Europeans and Ancient North Eurasians. What about you user?

Attached: 93972694.jpg (1024x671, 159K)

We go to Javascript heaven, it's hell.

Attached: 1547930030165.jpg (1728x2304, 425K)

biking,table tennis, chess, physics,music...

Music. I play pic related.

Attached: file.png (500x585, 415K)

>table tennis
ping-pong

badass

fuck off you cum guzzling faggot

>chess, physics
Hey, that's something.

why so mad, queer?

help me please Jow Forums
i have no programming or web dev knowledge but i have an idea for a site i want to do for fun
there are a lot of tutorials on youtube but i need the technical term for something instagram has for example, when you can put a tag somewhere in the picture and it displays it if you click on it.

"that pop clicky tag thing over the image"

i like fucking big tiddy prostitutes it's why i got into this shit; im a remotenigger so i can work from anywhere. in germany right and heading out to my favorite brothel in a bit

Tooltip

Hi Jow Forums
I have a personal site built with Bootstrap, should I switch to Bulma?

no, Android 18 is better

living the dream

why?

So... how do I set sticky bit by default in a folder and all of it's children? setfacl is failing me, there must be another way, permission masks? Or some shit like that?

better to ask /fglt/ for this I think

I trust this thread to deliver way more than that meme thread tbqh.

lol

I did that once with Foundation and I regret it. Just use what "just works". Don't overcomplicate things.

If I've got a frontend built with Vue or React served from a static file host, and then a backend API built on Laravel, what is the best way to handle authentication? I want to authenticate via my own backend, not use any third party auth services.

laravel

Your best bet is googling for something like "jwt laravel vue" or reac, whichever you prefer.

Anyone else working on an Angular project?

thats so 2017

They gotta pay someone to maintain it

what's the project about? another SPA?

thats depressing
people should make stuff that matter

So jwt is the best option? I don't really know the difference between jwt, passport, oauth, etc.

Laravel's built-in auth wouldn't work for a statically served SPA would it? I thought it was only session-based.

Angular project that connects to our custom hardware via websocket to provide a UI to control the hardware. Messages are encoded with protocol buffers

>Laravel's built-in auth wouldn't work for a statically served SPA would it? I thought it was only session-based.
i meant make it in laravel

Thanks, I'll stay with Bootstrap

>For beginners interested in learning Vue (as long as you understand basics of HTML/CSS/JS)
VueMastery is giving all their courses for free from Feb 22, 12:00PM ET until Feb 24, 11:59PM ET
I suggest OP add this as a free beginner resource in the next /wdg/ threads until this free period ends

forgot the link, my bad
vuemastery.com/free-weekend/

For those who don't want to make an account or that want to download the available videos, here's a pastebin with all the vimeo links(which you can download with youtube-dl): pastebin.com/qByGu69c

based

JWT may be a good option, or it may not be. The advantage is that it's stateless, so you don't need to store anything on the server. The disadvantage is that you can't revoke tokens if you ever need to, you just need to wait for them to expire.

When you say OAuth, do you mean authenticating via a third party login? (E.g. "log in with facebook") Or are you providing login to third parties? If you're not doing either of those, then I'm not sure you need OAuth. (Then again, maybe I'm out of the loop, and people are using OAuth for normal login stuff, so feel free to correct me.)

Passport is simple a library, or a collection of libraries providing implementations of different authentication schemes. But it's a Node.js library, so I'm not sure why you're looking at it if you're using Laravel.

I mean I just want to have my own SPA on my own static file server and my own Laravel backend API that provides auth and everything else. So basically I don't want to have people "logging in with Facebook/Github/whatever" and I also don't want to allow them to log in to other stuff with my app's credentials.

It looks like Passport is what I need, I didn't realize it was a Laravel library, I thought it was another competing technology (like "jwt vs passport").

The absolute state of the modern web

Modern websites all look sterile and dry, especially online market sites. Amazon was the last good original breakthrough in website and ecommerce design. Since then everyone licks Amazon's taint and copies their design in a stripped down version.

The "best designed sites" are always contractors jerking themselves off for making a barely interesting design on top of a white background with one or two unique design ideas which fall flat. People who commission these sites are boomers or otherwise disinterested in anything of any aesthetic value. Muh site functionality is king, fuck anything avant garde or good.

Everything is just a mobile-first view which scroll down vertically with alternating splash art images and unimaginative arrangements of items under categories. The only slightly imaginative sites are going for the "hip" or "punk" vibe. Even then, decent looking sites only look so because the top and foremost pictures they host are of girls wearing swimsuits.

Im drawing up some sketch ideas for my boss and, I'll admit, many of them are out there or pushing the envelope. But the ones he actively likes are plain boring, white background, cookie cutter looks which could be lifted from damn near any e-commerce site. Aesthetics is dead. Ayn Rand was right all along.

nice blogpost

thanks, I do my best.

A mostly boring design from my perspective.

thanks for subscribing.

>Ayn Rand was right all along.
about what? i'm not familiar with her philosophies

image

Attached: Screen Shot 2019-02-22 at 8.19.52 PM.png (748x1336, 171K)

are you a britbong?

>It looks like Passport is what I need, I didn't realize it was a Laravel library
What? I said it was a Node.js library.

Have you really looked into Larvel's authentication and determined that it's not sufficient/suitable for your purposes? I have to imagine that the implementation is broad enough to properly support this.

Click me


function myFunction(x,n,m){
var s = "";
for (i = (-x/2)*m;i < (x/2)*m; i+=m){
for (j = (-x/2)*m;j < (x/2)*m; j+=m){
let a = 0;
let b = 0;
//(a+bi)^2=a^2+2abi-b^2
for (k = 0; k < n; k++){
a = a*a - b*b + j;
b = 2*a*b + i;
}
if (a == NaN || b == NaN || (a == 0 && b == 0)){
s += "*";
} else if (Math.sqrt(a*a + b*b)>2){
s += "*";
} else {
s +="^";
}
}
s += "
";
}
document.getElementById("myid").innerHTML = s;
}


doesn't work

Attached: jf.png (794x613, 20K)