/wdg/ - Web Development General

Revamping the OP edition. What should be added, what should be removed?

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 to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
theodinproject.com/ - curriculum including HTML/CSS/JS, Ruby on Rails, and SQL
hackr.io - collection of tutorials from across the web for learning languages and libraries

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
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_gameboy_advance_drake_and_josh.jpg (900x900, 482K)

Other urls found in this thread:

youtube.com/watch?v=HaEPXoXVf2k
blog.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/
csgnetwork.com/memconv.html
bytesizematters.com/
aws.amazon.com/api-gateway/pricing/
redux.js.org/
developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator
stackoverflow.com/questions/36347205/connecting-redux-with-django-and-postgres
stackoverflow.com/questions/15594905/difference-between-observer-pub-sub-and-data-binding
x220.mcdonnelltech.com/.
twitter.com/SFWRedditGifs

Is a production mongodb really that bad or is it a meme

I'm learning, Is instantiating classes inside other classes common? Like

class One {
constructor(two, three) {
this.two = two;
this.tree = three
}
}

class Two{}
class Three{}


Seems like it could get messy real quick

>falling for the OO meme

Attached: 1543957741322.jpg (906x1280, 153K)

So in the year of our lord 2019 what is the best back-end to use that is all around the best. .Net-core? Go? Node?

Attached: 2352353225323.jpg (310x162, 7K)

It's common, but you're not doing it there.
>falling for the OO meme meme

>falling for falling for the OO meme meme meme

brainfuck

Building UberEats but for weed.

Today I'm redesigning this shit ass left side bar complete with overflowing buttons and garbage everywhere.

Then starting the optimized route planning, oh boy.

Typescript/Ionic 3/Cordova, Hybrid web app.

Attached: sneakpeekuberweeddude.png (1538x1162, 868K)

How do you even use that?

Client gets a website templated with their info like wordpress.
People place orders, dispatch gets text message/push notifi.
Dispatch assigns order to driver based of distribution rules or some shit
Driver recieves push notification/accept order popup
Driver goes and drops off purchased product, uses buttons to automatically open GPS, send an eta text message, other shit.
All communication goes through a two way proxy sms/calling server
Customer placing order has an interactive interface to see how long their order is taking and where the driver is.

Then you got like analytics/marketing/etc for owners and shit.

It just looks like shit :/

Attached: driverinterface.png (2072x1560, 163K)

well, make sure it no longer looks like shit when it's finnished because I think it is a very good idea.

Also make sure you insert mechanisms in there to keep the house of the weed smuggler anonymous, since he might get stick up if the info shows for the wrong client. Otherwise yolo, it's none of your business to protect them.

Appreciate it man, thanks.

That's one of the main features yeah, it's impossible to locate the origin of the driver, any of the drivers information, etc.

It connects to weedmaps profiles for dispensaries and delivery companies and automatically imports the product line and information, best part is I scraped all of weedmaps for every dispensary and delivery service email in north america.

I also built my own delivery dispensary to use as a testbed for the functionality, it's a nightmare but shits money, so, evens out.

Attached: checkoutcustomerside.png (2098x1728, 225K)

i use asp.net and jquery

Attached: 1538727460602.jpg (724x540, 29K)

t. Zoomer with no business experience.

Keep writing those fizzbuzz applications in school kiddo.

kek

Actually I was just building a React frontend with Material UI while sipping craft coffee.

Attached: 1541099082285.jpg (900x557, 111K)

t. Zoomer with no business or business experience*

test

How the fuck do you guys enjoy doing this? webdev is obviously the worst and least fun sector of software development.

What do you do to make this bullshit fun or at least gratifying?

>What do you do to make this bullshit fun or at least gratifying?
Normies think you're smart because to the average person there's literally no difference between webdev and ESP.

I'm trying to start a project. Let me explain what I'm doing and what tech I think I should be using.

Basically I'm developing a Twitch extension that will require time sync with a master server. A timer is initiated and synced between all clients and clients can pay to increase the timer.

I would like the sync to be pretty accurate to within a second, but doing an ajax call every 5 seconds wouldn't be too terrible. I'm just not sure if websockets are better because I've never ran a websocket server before. I've only used them with js WSS for twitch chat.

I was thinking of trying a swoole docker on elastic beanstalk and using js sockets. Would this work or should I do something else?

The fastest way I could do this is with just a PHP backend and a setInterval ajax call that gets db updates. I just don't want to crowd the server.

I am the twitch guy that pops in here every so often and this extension will get 10s of thousands of active simultaneous users, so I want to do it right. I just don't know shit about sockets or how to feed data to them from a server.

Would learn node and whatnot but I'm going for a 2 week launch.

>write shit on a text editor
>a web is displayed
>write more shit
>it does more neat shit connects to back end and iteracts with it

It's gratifying, a little work shows a lot of results.

it's a fucking meme, don't fall into it, use SQL, I can't think of a single use case where it's easier to use a noSQL

Your example is more like dependency injection which is common inversion of control technique.

The formatting part is what gets me, making shit look nice is like carving a soap sculpture with a tooth pick

what is fun in your opinion ese?

You actually need design knowledge for that, or just copy shit, that way you also learn.

You're going to need websockets for that ideally.

psuedo:

All participants are connected to your websocket 'lobby'.

You initiate a timer via some interface or call on server. eg 5min

You broadcast this to every connected client in the lobby.

Frontend JS/HTML displays the timer on the screen or whatever.

You have button to pay, figure your payment provider out or whatever and simply have a callback to increase the timer variable on your server then rebroadcast the new timer.

This way you just start a countdown timer on client side and only need to send updates to it, not ping your server a million times a second.

Only communication is a user paying and you broadcasting a modified time.

A properly defined NoSQL table will be more efficient in terms of CPU and scale a lot better. Both have their uses. Watch this: youtube.com/watch?v=HaEPXoXVf2k

Google maps API is bae
Gotta go beta test, brb

fuck it looks so bad, hiring ui designer hmu

Attached: ithinkmythemeisgreenmilkyshit.png (2078x1566, 767K)

>Only communication is a user paying and you broadcasting a modified time.
Perfect. That's exactly what I need.

Here's the question I have though. Some of these streamers have like 40k viewers and these updates will be pushed to all of them. Will that beat the shit out of my server or cause it to fail? I'm reading that Swoole allows like 1000 concurrent connections which isn't even close to enough.

or is this something most servers handle on their own.

I'm not sure how I would be able to push back data to 40k people at the same time.

blog.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/

"I want to broadcast a 5 minute timer"
1 min = 60s = 60000ms * 5

payload: "300000"
That's roughly 6 bytes of data, uncompressed obviously.

csgnetwork.com/memconv.html
&
bytesizematters.com/

Quick napkin math you're looking at sending 300mbs of data out every broadcast which might cripple you, I don't really know how it will translate to a production app environment.

NOSQL for raw data that won't recieve complex queries SQL for complex queries, anything else?

>It's the CORS nearly ruins everything again episode

>be retarded senior dev
>too gay to push back on mgmt when they ask for unrealistic data requests on existing db
>dont want to think about data schema anyways, what a chore
>see mongodb
>impressed with being able to store json objects, wow so much like javascript
>end up defining a schema anyways because you need to know properties, values, and types
>realize that none of your shit is indexed
>conclude that mongodb is garbage and make your entire business suffer

Attached: chooselife.jpg (728x960, 85K)

I'm not sure what to do then. This tool will generate a decent amount of revenue, but if it's going to cost me thousands a month in server fees then it's not really worth it.

I figured it out maybe. Fuck the client. It'll be a streamer overlay and only need one socket.

This, fuck cors.

aws.amazon.com/api-gateway/pricing/
my bad dude you're all set
You're going to pay $3 per 1 million requests

But thats an api and I don't know websocket which is stupidly efficent.

I'd say go for it, you can prototype test 50k connections on your websocket then simply manually broadcast and watch your internet usage

Use DynamoDB it scales the server needed with the requests made :^)

I'm trying to figure out if Twitch has a thing where it takes one update and sends it to all clients. They really should.

I don't know how they would expect people to dev useful extensions if they expect us to eat the costs of a several 100 thousand concurrent socket server for 20% of bit revenue. Talk about a gamble.

I'll look into if they don't have a better way. Thanks.

I was just memeing, just watching the DynamoDB presentation, but if that helps... :^)

I cannot seem to change the font to Chivo for some reason. Other fonts work fine with my code. Any idea?

@font-face {
font-family: Chivo;
src: url(C:\Windows\Fonts\Chivo.woff2) format('woff2'),
url(C:\Windows\Fonts\Chivo.woff) format('woff'),
url(C:\Windows\Fonts\Chivo.ttf) format('truetype');
font-weight: 12px;
font-style: regular;
font-display: swap;
}
body {
font-family: 'Chivo', sans-serif!important;
}

Rate my django project sstructure for a leending app

sweet talk, I know now NoSQL :^)

Don't reference the entire path from your C drive, make an assets folder and reference like:
src: url("../assets/fonts/Chivo.ttf")

Alright, I'll try. Thanks.

*steals your idea*
nothing personnel kid

I'm thinking this is what I need

"Twitch provides a publish-subscribe system for your EBS to communicate with both the broadcaster and viewers. Calling this endpoint forwards your message using the same mechanism as the send JavaScript helper function. A message can be sent to either a specified channel or globally (all channels on which your extension is active)."

it's a (profitable) bitch, have fun.
update tho, mobile screens coming in hot

there ya go, all set. go make millions.

Attached: realdevsuseproddatabasewhiledeveloping.png (866x1494, 242K)

It worked out, thanks bro :)

btw you have cors to blame
>>It's the CORS nearly ruins everything again episode

which programming language should I learn/invest for long term back-end career: c# or java?

.NET #memeing
but no srsly check the wages, the job availability, the future proofing, etc.

thanks user

Seeing as how you're being charitable with your ideas, I think it's only fair we contribute some suggestions of our own
>allow dealers to register
>put in a brand logo
>shows up on the map
>menu n all
>with 'regular spots' dealer's at

I am learning Spring Framework with Spring in Action 5 right now. I would like to add javascript Webgl/Three.js animation inside app, and make for example cubes flying around input forms. Any of you guys have experience with shit like that (3d graphics in browser web 3.0 futuristic stuff)??

How smart do you have to be to make sense of Redux?

redux.js.org/

Is it worth learning?

CSS question, working on a Jow Forums theme. I want to edit the style of posts but only the ones containing images. .postMessage works but it acts on all the posts, is there a false positive I can use to only work on posts that contain an image?

try .postMessage:nth-child(4)

Yeah I meant this.two = new Two()

Is there any other way for objects to communicate with each other?

You got the long term plan.
That or sell out asap.

Basically going to be a weedmaps with ubereats interface.

Any others?

This selector will isolate only the posts with images:

.postContainer .post .file ~ .postMessage


developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator

Attached: dbmfy60-97b95424-622a-4270-a72c-c5fa46158fb9.jpg (3240x1120, 642K)

ayo, that's a really good album if you're deep into vaporwave and noise.

Thank you very much.

What laptops do you all use? Currently using a x230 with xubuntu, but wishing I had a 2015 macbook pro. Anyone have any good resources on how to get one that isnt trash?

About 100 IQ

Best way to connect Redux with a PostgreSQL database?

why the fok do images have rounded borders all of a sudden?

Hey all, i have a question. I'm submitting a form in Laravel and the data consists of user created questions and related answers. When I submit the form I have no way of knowing what answers are related to the questions so I implemented AJAX and created a JSON object to send. But I figure there has to be a simpler solution with out AJAX.
Help plz

Attached: form.gif (300x144, 2K)

If you set the names on each form element (e.g question1, answer1, etc.) dynamically using JS, you can utilize the default POST request on form submit. But you'll be sending data as either url-encoded or formdata-encoded, and you'll have to reformat the data to the way you're saving it on the backend. If you want to send JSON you need to do your own POST request, outside the default form stuff.

Yeah, in OOP that's called a "has-a" relationship. The nice thing about doing this is you can avoid the diamond problem people run into with multiple inheritances.

However, you're not instantiating any classes inside another class. You're passing a reference to an object.

In this example, you would be instantiating objects within an object.

Attached: ___.png (275x99, 2K)

>Is there any other way for objects to communicate with each other?

Global data or a god class, but why? Passing a reference to the object you want to communicate with avoids having to use global data.

I use the new macbook pro with the touchbar.

Recently upgraded from my lenovo laptop with ubuntu on it after I found developing on mac to be a lot easier.

any clues why this is happening bros? just noticed it, few days ago i could hover anywhere on the thumbnail to expand it now the thing is messed up

Attached: chrome_IbJS8yIhZt.png (516x112, 67K)

>any other way for objects to communicate with each other?
event handling via callbacks or dependency injection.

stackoverflow.com/questions/36347205/connecting-redux-with-django-and-postgres

Anyone else's SO completely annoying anytime you try to dev?

Busts in ruining my train of thought and starts reading the screen like wtf are you doing I'm trying to work here.

>Most people use an API to do so
I was wondering if there was one but I'm assuming there's not

I've just this morning learned about thunk, but I'm still a bit aimless. I'm trying to authenticate a login request with my database.

>just dispatch the action to fetch the data at the start of your app.
I guess this is what I need to do, but the instructions are a bit too big of a picture for me to understand where to start.
The action is quite clear to me, but it's the method of dispatching it that's confusing me.

>tfw so is web dev
She is still distracting, but it's fun to check in with each other. Having more obligations in your life means less time to do the things you want user.

I have two ThinkPads.
- X220 (this has been my workhorse for the last 3 years)
- X1E (I gave myself a christmas present, and it's a beautiful beast.)

The X220 is running Ubuntu 16.04 and the X1E is running Pop!_OS 18.04. I may upgrade the X220 the Ubuntu 18.04, but it's not a top priority at the moment.

That could be cool if yall work on projects together.

GF doesn't understand web dev much and just likes to come in here like I'm not about to lose 10 minutes of brain math the second she starts talking to me about the cat or whatever.

Auto route optimization is complete, god bless.
Fast af too.
Not sure whats next

Attached: routeoptimization.png (842x1468, 354K)

bump

Can someone give me info on pubsub?

I would just like to say
>fuck spring
Thank you.

Have you tried telling them about it? "Do not bother me while I'm working, I need to focus". As long as you're not literally dev-ing 24/7, they should respect that. If they can't, you shouldn't be in a relationship with someone actively trying to screw you over (and not in a good way).

I've been thinking of posting youtube tutorials for webdev shit but instead of the 10,000th 'here is hello world with react' I'd actually quickly demonstrate using real APIs, building real shit, etc etc

Think it'd get any interest?

>video
why not write some blog post instead?

stackoverflow.com/questions/15594905/difference-between-observer-pub-sub-and-data-binding

It's winter though

I just feel like a big issue with web developers is not being able to break down a complex application into very simple small parts.

At least from my experience and the dumbass's I've hired.

Fucking weeblets and NodeJS children use it as a default because "DURR STORS JSON!"

NoSQL is meant to address and solve items like big data storage, files, etc. NOT websites. There is a reasons we have related tables in SQL. Also from what I recall, NoSQL is not ACID compliant. There is no reason to use this in in the method that most plebs use it.

I ignore 80% of mediumshit and blogs, and so does most of the population

I have a hackintoshed x220. Easy if you follow this tutorial x220.mcdonnelltech.com/. I did a Windows dual boot too, just in case I need .NET stuff

>so does most of the population
source?

bump

are you using an extension or something? 4chanx?

explain in more detail