/wdg/ Web Degenerate General

Previous:
→ → → →

>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
youtube.com/watch?v=Zftx68K-1D4 - Web Development in 2018 - A Practical Guide

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:

npmjs.com/package/mysql?
twitter.com/SFWRedditImages

How do I make custom post types in a wordpress theme?

Check the codex

Rails is so much better than anything else
I don't get why people would change, especially if converting from rails to django or something where there's not even any benefits

Learn rails then when your shitty startup is good you rewrite it in elixir and scale 10x harder for half as much now you actually have money

ez, problem solved

how many startups did you scale with Elixir?

how does one implement language switching for a website? I'm imagining a link at the top of the site that when clicked, renders all the text for the website in spanish.

google "wordpress handbook"

it got theme, plugins and restapi in details
will keep you busy for a while

0 i'm just larping, but a lot of companies have done similar things.

In terms of complexity, how would you guys rate a service that uses an e-commerce platform API to facilitate things like changing prices and renaming products in bulk, answering to buyers in mass and automatically, calculating profits and generating reports, automatic delivery of digital products?

I'm planning to follow MDN to the end and use a JS frontend/Python backend with MySQL, but I'm starting to think that Python might facilitate some things, but end up overkill, so maybe PHP with a framework like Laravel? Would you guys think another stack could be better? I'm going all in. I do think I can make a few bucks since competing services are expensive as fuck and the cheap ones seemed abandoned and there are lots of complaints of lacking features. They charge 10 bucks per account (estimated, I'm in South America) in the intermediate plan and 50 for the premium.

Thanks in advance, guys.

Attached: 1529024270265.jpg (1224x814, 156K)

What is the point of blocking javascript http requests due to the same origin policy in 2018?

Attached: 1533232214377.png (1176x664, 1.36M)

lads i'm almost a week off from finishing my first big project. I'm so fucking hyphy

Attached: happening.gif (312x213, 973K)

fuck tgus

I have a .json like this:
{
"name-short": "",
"code": "10000",
"name": "1. Natural Sciences",
"child": [
{
"name-short": "",
"subchild": [
{
"name-short": "",
"code": "10101",
"name": "Pure mathematics"
},
{
"name-short": "",
"code": "10102",
"name": "Applied mathematics"
},
{
"name-short": "",
"code: "10103",
"name": "Statistics and probability"
}
],
"code",
"name": "1.1 Mathematics"
},
...


How do I map it to a table that only has fields like "name-short", "code", "name", "parent" (FK) in Django/Python/anything?

Thank you very much.

Why should I use SCSS / Less over vanilla CSS, /wdg/? Sell the concept of another layer of abstraction to me.

Attached: emoji-thinking-3d-model-low-poly-max-obj-3ds-fbx.jpg (1400x800, 30K)

Should I 'use strict' religiously in TypeScript?

No. ES2015 is implicitly in strict mode already so there's no need for 'use strict' directives. The TS compiler will compile it down to es5 "strict mode" anyways.

Absolute newfag to web development here.

At what point should I shift my focus from html/CSS and start learning java?

java? did you mean javascript?

My site has many elements in it but they do not fit all of the vertical space together. There is still some space at the end of the page but I can't get the footer element to use up the remaining space. I've tried height: 100% to no avail. Any way to solve this and be able to fill up the remaining amount of space?

Attached: site.png (741x224, 52K)

>java
When will people LEARN

JavaScript I mean

It was an accident. I fucked up. I'm sorry.

What's the best practice for callbacks, should I always use arrow functions for anonymous callbacks by default nowadays and only use normal anonymous functions when I explicitly want 'dynamic' scope, or should I stick to normal anonymous functions by default and use arrow functions when I explicitly want lexical scope?

What are the pros and cos?

is it still common practice to store the hashed password with the salt?

Why is webdev such a big thing? All the companies like FB and Google already have more than enough developers, for the shitty sites you can just use something like SquareSpace.

Damn, it's almost like startups and creating customized websites to actually do shit can't be done with a shitty wix/wordpress website that is just a glorified poster.

If only apps like uber knew about this one small trick, fuck man they could have saved so much, literally just scale it to infinity on squarespace for $19/month using basic web pages!

you got it fucking solved omg

Of course Uber needs a better website, especially a more complex backend. So do FB, Google and so on. But how many of those companies exist? And it's not like they change things every day.

>But how many of those companies exist
you have no idea, kid

Depends on the usage tho.
What particular callbacks?
const zz = (arg1, callback) => {
return callback(arg1);
};

const xx = () => {
return zz("arg1", (arg) => {
return `callback contents ${arg}`;
});
};

xx();

const kk = (el, ev, callback) =>
document.getElementById(el).addEventListener(ev, (event) => {
return callback(event);
}, true);

let els = [
{
id: "id1",
ev: "click",
callback: (event) => {
console.log(event.target);
}
}, {
id: "id2",
ev: "mouseover",
callback: (event) => {
console.log(event.target);
}
}
];

els.forEach((i) => {
return kk(i.id, i.ev, i.callback);
});

Just look up startups online or B2B companies and you'll see just how many exist, for every single thing you can imagine.
The whole entire point of webdev is to create new things that don't currently exist, not make shitty wordpress sites.

It's like saying a guy who wants to be a professional Michelin star chef should give up because mcdonalds already exists and has him beat

Kind of makes sense. I didn't realize those startups really needed to employ so many people or if there really were so many of them. I think I am an ok programmer but maybe a bit oblivious to the business side of things.

Are there any disadvantages to writing a div like a button (i.e. the user clicks on it, it has an :active selector, etc) because you don't want to have to write code that runs e.preventDefault() when the button is active and the user hits the enter key or space bar?

Do people still use extensions like NoScript etc that block JS? How are they able to browse the web in 2018 without having to re-enable every individual script manually again?

Something in my brain is still not really clicking. What is webdev really about, why are there so many frameworks, what is the huge difference to desktop programming?

So I develop some web backend, obviously since this is webdev it will run on some server. ok. I receive some http request and then I just handle it. If some user wants to create a new account, I will put it into a database or something. Why is it so important which langauge I use? I can just use any Java http server and PostrgreSQL and put it into a database? Seems to me like after I parse the JSon or ProtoBuf or whatever I am back to dektop programming pretty much? I feel like I am missing something? Is it one ot those things where you miss the big picture if you don't use it yourself?

how bad would it be to just use firebase for auth so i don't have to fuck around with auth myself?

Yes. You loose ARIA compliance, so any kind of accessibility software for blind / disabled users will have a hard time functioning properly. This may or may not be important to you depending on your audience.

Besides that I have no idea why you wouldn't want enter and space to trigger a focused button. You should look up a11y so you can have a better understanding of how web controls are intended to function.

You should absolutely not try and fuck with auth if you don't know what you're doing. This is probably the #1 thing you should not try and roll
yourself. Whether you need to use firebase for this is up to you. There are plenty of good solutions out there for authentication.

I see. I guess I'll keep it as a button then.

People are lazy. That's why.

two websites, one in spanish and one in english

Ok, need advice.

I have a site that is more popular than a competitors and theirs is funded for 3 mil.

How do I get funding? I could 10x the users of the site within 6 months if I could work on it full-time since that would put me up there with the 20mil funded competitors.

Anyone have experience with this?

The fact there are a lot of languages and frameworks is good.

If there was only one main language and framework then every dev would know it which would decrease demand and thus decrease pay. We would quickly go back to devs capping at 35k like they did in the early 2000s when most sites used html, javascript, and cgi.

there are a couple major difference between webdev and desktop programming.

1) security
unauthorized people may not read/write critical data to/from a database. this necessitates that the front end only interact with the database via a pre-defined api. i.e you get a frontend/backend model.

2) render to the screen
where on desktop, to render a screen, you're pushing some sort of buffer containing pixel data you wrote to the screen, on the web, you're stuck with an archaic and outdated layer of abstraction between you and the pixels: html.
frameworks such as react and angular exist only to make html workable. literally no other reason.

3) apis
there are different types of databases and different ways to talk to them. that's how backend frameworks distinguish themselves.

>documentation for new version of Thing that describes how Thing works in terms of differences from how the old version of Thing worked instead of actually describing how Thing works now, requiring you to know how old Thing worked to understand new Thing docs

why do people do this?

Attached: penguin.jpg (600x424, 41K)

I'm pretty good with JS, but also know PHP basics. I looking for some very basic CMS, what would you guys recommend?

Attached: chinch.jpg (700x701, 87K)

see

fund a website for 3 million? what?

A shittier version of my site is funded for 3 mil and I know they get less traffic than me so I'm trying to figure out how to get my site funded.

maybe find out who funded your competitors and offer them to buy you out?

>Hate my job
>Want to learn webdev
>Jobs leaves me with little time and willpower

How do I escape?

Should I take the fucking gamble and just quit?

I guess if I can land a job as webdev in 2 years I can always off myself.

kill yourself discordfags, you're a bunch of virgin losers who will never be liked in real life by anyone who isn't as much of a pathetic fuck up as you

Basically just have a link to example.com/es/ at the top of the page. Then set the text on the backend based on the route requested.

If you want, you can check for language preferences in the "Accept-Language" HTTP header. If it's spanish, then you can redirect automatically. Just make sure you have a button to switch back to the english page, and to set a cookie with that preference so you don't redirect on subsequent requests.

Well in general, same-origin policy makes it so that sketchywebsite.biz can't do an Ajax request for facebook.com and youronlinebanking.com. You're authenticated on those sites via cookies so by sending those cookies, the JavaScript on sketchywebsite.biz looks like you making a normal request, and could grab your personal data and send it back up to their website.

You could just block cookies from being sent with cross-origin requests, but then there's still the issue of sites doing authentication by IP address. Not necessarily directly authenticating you, but if your company has an intranet server that only people on the network can access, you don't want a random site loaded on somebody's computer to be able to get the same level of access. This example is more contrived, and the fact remains that mobile apps already have this privilege, but I guess it's valid reasoning on why all cross-origin requests are blocked.

So anyway, what are you trying to do that same-origin policy is blocking?

>where on desktop, to render a screen, you're pushing some sort of buffer containing pixel data you wrote to the screen
What? No one actually does it at this low a level though. Everyone is using some UI framework or toolkit, many of them worse than HTML.

fuck you

Attached: fuckyou.jpg (1195x636, 93K)

but does the website provide a service or it's just a static website?

>projecting this hard

i discord with you

Provides a service.

Problem is that there are much larger competitors with 10s of millions in funding. It can't hurt to ask, I suppose.

ask them if they want to buy the piece of tech which distinguishes you from all competitors

Just use mongo, express and node if you already know JS.

Make three tables that use the structure you have. You have one parent table, one child table and one grandchild table. FK can be the parent element if there is one.

When you want to add functionality for example you want div-containers since there is so much content in each container that it makes your site hard to read or you want to add a searchbar that filters content and only show content that have your searched keyword.

False, only esmodule code and class bodies are in implicit strict, everything else is sloppy

SquareSpace has limited functionality. If you are just presenting your company if you want to offer some functionality for your users then you are fucked. As far as I recall SquareSpace in particular does not have table elements. You need to write tables yourself in HTML or you can pay for addons from third parties for something as simple as making a table.

you can style buttons such that it looks like a container. what is your problem with a button

ghost js

It's more about functions and cleanly defined structure than anything else. It's just CSS with a little bit of icing on top. And being able to use variables is very nice. I don't have to find and replace seven thousand instances of a particular color, I can just change a single variable.

use sites like codepen.io and you can webdev casually in the browser while you are working.

Because buttons look different across browsers and are tricky to apply universal styling to :(

I can't do anything with this heat. I can't think properly at all. How do other people do it?

AC or fans

>quit my job today
Time to update the old portfolio I guess. Having my own personal client's website up that I can show off is good, right?

why does mysql require python

Reminds me of my situation. My website, which I keep up for free, has a competitor with 4 million dollars of government funding every year. And I'm pretty sure I'm offering a higher quality website. I have no idea what those faggots are doing with all the money.

It's really ridiculous.

Not him but maybe it is nepotism and they keep the money in their network

AC gives me headaches and fans are not enough.

I think I'll just move to Iceland or something

Yellow and green on the same page, your thoughts please

Attached: colors.png (446x525, 24K)

how does ac give you headaches, it's literally just cold air

idk man, but it just does.
I wish it didn't.

Harsh lights give me headaches, and if they flicker they give me migraines. It happens. Probably sat too close to the PC monitor as a kid.

put it lower man, and don't stand in front of the air current

I'm going to try, thanks man

does anybody use this npmjs.com/package/mysql?

do i have to connect() every time i want to retrieve data?

Well the huge competitors keep stealing my features. I am launching something they won't be able to steal soon, so once that is done I'll hit them up.

If you quit work and had enough savings to allow yourself to code from 9-5 every day 4ish months, you should be able to get a jr webdev job.

21500 eurobucks and counting, and I can live with my parents.

Even if I had to pay rent and everything I could live by myself and study 8 hours/day for around 2 years.

Where do you live, if I may ask?
That sounds dreamy. 20k wouldn't even get me 6 months on rent+bills+food,

Spain.

Not the paradise but food and booze are cheap.

use scss if you have varibles that need to be calculated on page load, otherwise vanilla css

brb packing my things

Your english seems pretty good, try applying for english speaking jobs for a bigger target market.

You should be able to do it living at home, coding for 2 years. No need to move out, just pay your parents rent (more than 0 but way less than moving out on your own)

If you're looking to share place with a sperglord hit me up.

meant for

>do i have to connect() every time i want to retrieve data?
No

actually user for plenty of small businesses they are absolute retards at using wix/ss.

I've converted so many shit pages into wix for stupid amounts of money with a little bit of design work.

in fact wix has limited templating ability which makes it even easier.

>get 18 applicants for open position.
>17 applicants are Indian with Masters degrees and can't speak proper English.
>1 underqualified white applicant

I hate tech.

It could work, moving out would help me focus though.

About the English, that was part of my plan. Got the advanced level certified. Teacher was surprised at my level after I told him I hadn't touch an English book in 10 years.

Pretty much all my English knowledge comes from browsing Jow Forums, music and video games.

Thanks, mate. I honestly would but currently, I still have a codemonkey job to do. Though, I plan to do the same as you in a year.

honestly there's people born here with worse english, you wouldn't have any problems fitting in if you knew what you were doing.

You could probs get a job within 6 months of coding every day. Enjoy your new life user.

well I mean speed is a big portion of it, like take for instance a firm that sells some sort of subscription service. People are going to think its super shady if they use some cookie cutter wix/squarespace.

I'm using grid, writing responsive CSS for different display resolutions. is the parent element, with display: grid. Is it possible to shift elements out of one parent into another parent using grid or will I need to separate the element I wish to move from in the HTML?

Attached: site.png (1280x387, 37K)