/wdg/ - Web Development General

Shit, missed thread dying.

Previous thread: >COMPLETE BEGINNERS GUIDE
github.com/kamranahmedse/developer-roadmap

>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.org
codecademy.com
hackr.io
theodinproject.com/

>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
youtube.com/watch?v=Zftx68K-1D4x

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

>PHP resources
pastebin.com/gfBPg24A

Attached: wdg_gonna_be_a_computer.jpg (611x761, 73K)

Other urls found in this thread:

jonahmann.x10host.com/bluerectangles.html
developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Adding_bouncing_balls_features#Creating_our_new_objects
jsfiddle.net/9jw3du6q/
jsfiddle.net/fvnasg6t/
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
youtu.be/OSSpVLpuVWA?t=1206
en.wiktionary.org/wiki/drop_cap
codepen.io/user/pen/JexJmo
getgrav.org/
pagekit.com/
octobercms.com/
subrion.org/
bolt.cm/
roadiz.io/
twitter.com/NSFWRedditVideo

awooooooo U//w//U

Attached: 1538967569539.png (1000x1124, 3.06M)

What's the closest/best Node.js equivalent to Laravel?

Made this in p5.js.

jonahmann.x10host.com/bluerectangles.html

Pretty cool.

Thanks for the trip down memory lane with that song.

i'm tired of being a poorfag
I want to MONEY

Attached: 1786871.jpg (1920x1080, 240K)

np bro.

Reposting asking for help.

Have any of you gone through MDN JS assessments?
I'm currently stuck while trying to add features to the bouncing balls demo.

Talking about this part exactly

developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Adding_bouncing_balls_features#Creating_our_new_objects

Apparently it should work after finishing the first part but I'm not seeing shit.

>"You also need to add a new parameter to the new Ball() ( ... ) constructor call — the exists parameter should be the 5th parameter, and should be given a value of true."

Everything works fine if I remove any mention to the exists property. Is there any reason for the entire script to shit itself if you declare a property and never use it?

I don't really like to spam this much but I've been looking at VSCode for an hour and half, checking that my code looks the same as the final version as MDN (at least this part), and I'm not even sure if this should work.

Send help please.

can you post a codepen or jsfiddle

>Initial example
jsfiddle.net/9jw3du6q/

>Updated code from the first section of the assessment
jsfiddle.net/fvnasg6t/

If I remove any trace of the exists inheritance works just fine, I just can't nail down the problem.

your ball constructor has 7 parameters, but when you create balls you only use 6 of them.
since you added the exists parameter on the 5th position you now set the "exists" parameter to the color and "color" parameter to the size.
So when you call new Ball() you need to give it the exists parameter.

You should put breakpoints and step through your code to easily spot mistakes like this, pic related.

By the way, this seems really outdated, classes exist already.
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

Attached: 1525772801718.png (1036x130, 10K)

>since you added the exists parameter on the 5th position you now set the "exists" parameter to the color and "color" parameter to the size.

Thank you. So right now, the part of the code I modified is correct but, as it is, the whole thing shouldn't work, as opposed as MDN stated.

I know about classes and I plan to rewrite this using them, it's just that this example started with prototypal inheritance and I just went with it.

Thanks again.

>So right now, the part of the code I modified is correct but, as it is, the whole thing shouldn't work, as opposed as MDN stated.
Not quite, you missed setting it to true.

>the exists parameter should be the 5th parameter, and should be given a value of true.

>tfw I love web development but I want to kill myself everytime I have to do initial mockup

Attached: basset-hound.jpg (335x285, 31K)

Wouldn't being Aoi be a horrible existence?

That's the part that really confused me since I didn't know exactly where I should do it.
Since I was working with the constructor I thought about doing that there, but it didn't make much sense to me.

>late reply to a reply I got from last thread

I don't think employers go around asking specifically for MERN stack in job description, it's usually keywords like 'javascript', 'frameworks like node, react', 'nosql' instead of 'mongodb' and stuff like that they ask
I dunno if it's true but as far as I'm aware most startups nowadays are going either javascript route (MERN stack fits perfectly here) or python/flask/django, right? I wanted to know which route would be smarter to follow (considering competition for positions, time to learn/get good at etc) so I can get a foot in the door. thx for replying, user

>mfw I have to restart Tomcat every time I change code in my beans
>mfw I don't have to restart Tomcat when I only change JSP pages
Make up your fucking mind whether you respect mtime!

Attached: 1543171654389.jpg (578x605, 42K)

eyem gey

>2018
>Java

if i have a database table for cars that has columns for brand, model, color and lets say transmission type

should i make separate tables for brand/model/color/transmission and then reference them by foreign keys in cars table?

yes

even if transmission type table contains only two values ( automatic and manual ) and they will probably never be changed?
im just trying to understand are there situations where foreign key and separate table are unnecessary like perhaps in transmission type case
i would understand to make another table for brands since there are dozens of brands of cars and they will probably increase in size in future (adding new brands etc.)

you could use something like enum if you know you wont need that many

thats a good middle ground
thanks user

In Redux what is BindActionCreators used for? can't find a clear answer

In this video he uses it at the 20min mark but nothing has changed by using it
youtu.be/OSSpVLpuVWA?t=1206

How do you theme a Bootstrap navbar using SASS? Changing $navbar-light-color just sets text color, but I want to change the background color.

What would be a good all-around web project for a portfolio to prove I know my shit? Do I just cram every fotm library/framework in there and hope for the best? Was thinking e-commerce.

Attached: BRRAAAAAAAAAP.jpg (1200x1200, 227K)

i also want to know

Learning Javascript classes. Why does this function work when it's called in the constructor, but then it fails when it's called on resize???

Attached: 1520236516040.jpg (1179x612, 66K)

imagine having table "countries" that has USA and Canada in it
another table called "cities" has all USA cities in it but none of Canada because reasons
and now user is creating his account and he has two options for choosing the country he is from
if he chooses USA he gets to select cities from cities table
but if he is from canada he gets to input his city in an simple input field

what confuses me what should i write in to "users" table under "city" column? for USA i can go with city_id foreign key that references "cities" table but for canada i have to write the string "name_of_city".

How do I handle this properly?
Should I just go and write the name of the city (string) into the field regardless of country ?

Attached: 1537119957865.jpg (3264x1836, 832K)

Probably not in scope?

I have a list of coordinates for x and y and I'd like to access them with an array in javascript, what's the cleanest way to store them? I thought about a two dimensional array (something like coord[n][n]) but it's pointless because I will never access an x or y from different rows (something like coord[n+1][n]). should I just use something like this and carry on?
> var test = ["x1,y2","x2,y3",..,"x9,y10"];

What's the naming convention for the first paragraph, usually in blog posts, when the text is a bit different from the rest, like bigger font size, drop cap, letter spacing etc.? Is it intro paragraph or paragraph heading? How do you call that usually?

Preamble is what I usually call them.

Thanks!

I think this is what you are looking for en.wiktionary.org/wiki/drop_cap

I know what the drop cap is, I even mentioned it in my question. It's the initial paragraph that often differs a bit in styling from the rest of the text and I just wanted to know the naming convention of that thing. Thanks though.

I thought everybody used drop cap for that

There should exist a HTML tag that ignores all the CSS inheritance and starts the style anew inside it.
Writing a partial inside layers of DOM elements, with dozen of classes changing the style properties of it makes me wanna kill myself.

>furfaggot in disguise
kys

lrn database theory, you make relational schemes, then you translate it to logic scheme then you actually build the database

codepen.io/user/pen/JexJmo

I have no idea but I'll give my input anyways, your user creates a new canadian city that doesn't exists in the database, if it doesn't exist you create a new table if it doesn't already exists that is called "canadian cities", then you add a new element to cities in that table to what the user wrote. Next user comes, and inserts the same city then you set that field to lowercase and compare it to the other in lowercase as well, if they match you set the foreign key that links the both tables

not sure if that makes any sense and I'm aware it's slightly complex, hope that helps

>all:inital
what is this wizardry? never seen it before

express js

I want to create a simple website, for my new engineering company, nothing fancy.

A contacts tab, our mission, a tab that shows our previous projects with a few photos, and a domain name.

Any pointers on where should I start and what should I use to begin with.

An !important may still ruin everything.

You have two options:
1) Wordpress and install a few plugins.
2) Build it from scratch using CSS HTML and
2.1) An external API that takes care of the cotnact form mailing for you (I can't give you directions on this sorry, but they exist)
2.2)Building the php mailer yourself for the contact form.

why the fuck is redux so hard to learn the docs are utter trash and medium is a disgusting website

is an action changing the store/state in any way or is it just calling a reducer?
how does it even call a reducer on dispatch is it magic?
how does the action payload play into this? is it passed to the reducer somehow

so wordpress it is,

I think it would be much easier to go with it than starting with css and html from scratch.

what is the best place to host it, and if I want to register it as a new domain, and have a couple of business emails on that domain, will I have to pay a few extra bucks for the hosting service, or is that related to wordpress and it's addons.

please not wordpress, i can give you 100 other CMSs you can use

better options :
- getgrav.org/
- pagekit.com/
- octobercms.com/
- subrion.org/
- bolt.cm/
- roadiz.io/

hey guys, don't know much about webdev but have a question.

I have a website and want to include a bunch of short clips from a YouTube video in a step-by-step tutorial type of article.

a few years back I would have used gifs, but now it seems like there are better formats. My question is, what file format would be best? I would want the clips to:

- auto-play much like a gif would (user doesn't have to click)
- work on mobile/tablet and desktop
- load as fast as possible, but first two things are really more important to me.

Attached: UntriedIdealisticIncatern.webm (1920x1080, 1.11M)

nta but what about using something like Gatsby?
I agree that WordPress is trash, and that's coming someone that earns a good amount of $$$ from developing WP themes.

the video tag lets you specify multiple sources so you can support more devices.
VP8/9 in a webm container and h264 in a mp4 container should cover almost everything already.

There's a knock at the door. You walk over to the door to answer it. It's your old friend, Jake Weary. You thought he was dead.

"Come back to me, user", Jake says, "come back to papa Jake Weary."

"I...I can't", you stutter like a Japanese schoolgirl in a cartoon, "I've moved on, Jake."

"You'll come to regret this." Jake replies. And then the door shuts. You never see Jake Weary ever again. He may as well be dead now.

It's simple, but a bit verbose to define everything. Consider the following:

Action:
const increaseCounter = amount => ({ type: 'INCREASE', amount });


Reducer:
const counter = (state = { count: 0 }, action) => {
if (action.type === 'INCREASE') {
return { ...state, count: state.count + action.amount };
}

return state;
};


When you call the "dispatch" like dispatch(increaseCounter(5)) what you're actually doing is calling it with the return value of the action, so in this case dispatch({ type: 'INCREASE', amount: 5 }), the dispatch function is what calls the reducer with the "state" and "action", where action is what you put into dispatch, and state is the previous state.

So to answer your questions:
>is an action changing the store/state in any way or is it just calling a reducer?
It's only for moving logic away from the caller, you can do API calls and such in them.
>how does it even call a reducer on dispatch is it magic?
Only magic in the sense that you don't have to worry about it.
>how does the action payload play into this? is it passed to the reducer somehow
By dispatch

Makes sense?

still better than WP, but i guess grav ( getgrav.com ) would be a better fit.

Stop namefagging. It's so fucking cringeworthy. Post/answer questions about PHP, you don't need a fucking identity, faggot.

fuck off

Can I build it for you? I'll use gatsbyjs, because I really like it. It's super fast, can set up a site with the pages you need in like a day. Need portfolio creds.

Are there any CMSs other than WP where you can develop themes and/or plugins and sell on marketplaces?

I'd really like to completely move away from WP for multiple reasons.

Absolutely not. If you've been here long enough, you'd know not to do such stupid fucking shit. The same applies to all boards.

most of the CMSs i mentioned, check their website.

again, fuck off.

AdonisJS would be what is closest warts and all.

>again, fuck off.
I will when you do, cringefaggot. Otherwise every time I see you I'm going to talk shit.

If I learn MVC do I have to learn javascript

I do don't I?

Fuck off namefag

I thought about wordpress, for the simplicity of the project, and frankly for the abundance of resources when it comes to it.

Do you think grav would be the best option for something simple like the things I mentioned here

thanks, I will. Do you have a personal favourite from that list?

thanks for the big answer so if i understand correctly the action.amount could be anything? and that's essentially what will be changed/updatrd in the store/state

also if the only way that action and reducer are linked is by the case in the switch couldn't you have a second reducer function counter2 for example which also is called whenever the action.type INCREASE is dispatched?

also the reducer is not directly invoked by the coder it's automatically invoked by dispatching an action?

I'd be more than happy if you did, where can we talk?

are you on any Jow Forums related irc channel?

pretty soon he'll be posting his facebook telling people to add him. completely defeats the purpose of even coming here. should just go to reddit.

yes, you don't even need a database.
it shouldn't take more than 1 hour to finish it.

this was meant for

I'm not specifically on any Jow Forums related channels, but I am on IRC. What is your nick? I'll msg you

send me your email to
finep@robo3 dot club (temp email inbox)

>so if i understand correctly the action.amount could be anything?
Exactly, all the data you need to update the state.
>reducer function counter2 for example which also is called whenever the action.type INCREASE is dispatched?
Yepp, as many as you want
>also the reducer is not directly invoked by the coder it's automatically invoked by dispatching an action?
Yepp

Also, if you have the redux-thunk middleware you can dispatch other actions inside actions, it's useful when you have things that need a loading state for example.

Why would you use index.php over just using index.html and call php scripts?

Call them how?

for the form in WP use contactform7, it's the standard, it does what you need

I would personally like gifs more than youtube videos.

I would *try* to do the following, all videos set on autoplay, BUT, if you are not on scroll sync with the video in question it not playing and not even load, offcourse when you scroll to the video it continues at the point where you left it, seems like some crazy work with js scroll and vid current position

I have an application that involves a user uploading JSON and then plugging the data from that through some Javascript to populate a page; do I need to be worried about them slipping malicious code in there or something? it all stays in the Javascript so they can't do anything they wouldn't be able to do anyways, right?

holy shit, that's spooky, even for Jow Forums

Can't get much worse

namefags and tripfags go in the same cancer category

Attached: 1543597688193.png (1125x681, 151K)

Todo list

Where's that one guy who's paranoid over the word sweetie? I want his autistic input on a sweetie dating website.

Are we still using grid to align items or is there something new already?

>Identifying posters
I'd swear this didn't use to happen back in the days, we were more users (o so it feel like to me), and it was harder to identify anyone, plus we didn't cared enough to do so, it was nice to help a /b/ro out

e-commerce that sells to-do lists? gotcha

>pic
>GHOST IN A SHELL
i fucking despise people stealing others' intellectual property. I know the guy who made that meme. He has a facebook page called "Welcome to my meme page" and posts similar hilarious stuff (pic related).
Why in the everloving fuck would someone do this?

Attached: Frogs - a review.png (900x900, 189K)

CSS grid is fantastic but is there anything, a library perhaps, that can act as a fallback in case the user doesn't have a browser that supports it?

My current hoster fucked me over with prices (by making them 500% the previous price when it's renewed next time).
What's a good hoster for simple websites (just html/php/javascript kind of stuff since i'm still starting out with webdev).

So lets assume that I have some html tables and I need to be able to update every cell in them in under a couple ms. What can be done? At the moment buy just doing a naive approach I can do it in 60ish ms but I am a back end dev and not a front end , any help would be appreciated.

Might as well get your own server, there are a lot of cheap ones and it's a valuable skill to understand how to set one up.
Personally I'm using Scaleway C1, they're dedicated so you don't have to worry about being shut down for maxing the CPU.

How many cells are we talking about here and what are you currently doing? Updating the DOM is the heaviest task, so instead of updating each cell by itself I'd update the whole table in memory and only write to the DOM once.

The only real reason I picked them was because they were super cheap (50 cent per month) but yesterday they just sent a mail saying that the packages were going to be changed and everything was better and bla bla bla oh yeah your hosting is now 5 times as expensive as it was before.
I was also looking at vultr (heard some bad stuff about digital ocean so trying to avoid that), never heard of scaleway before.
Thanks for the info user, appreciate it.

Well I am maintaining an order book which means quite a lot of updates , at the moment I just update every cell every second. I am trying to get fast table updates so maybe it can be displayed in real time or I can push table updates more often.

All in all tables are:
table = 3*100
3 * table
so 900 cells

why don't you update each cell individually but only when there are updates available?