/wdg/ - Web Development General

>Discord
discord.gg/wdg
OR
discord.gg/0qLTzz5potDFXfdT
(they're the same)

>IRC Channel
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

>Frontend development
github.com/dypsilon/frontend-dev-bookmarks

>Backend development
en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md (embed)

>Useful tools
pastebin.com/q5nB1Npt/ (embed)
libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
pastebin.com/4YeJAUbT/ (embed)

>How to get started
pastebin.com/pDT82mQS (embed)
pastebin.com/AL6j7GEE (embed)

>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com

Other urls found in this thread:

thebestinslot.gg
github.com/nginx-boilerplate/nginx-boilerplate
github.com/h5bp/server-configs-nginx
w3schools.com/html/html5_webworkers.asp
twitter.com/NSFWRedditVideo

Noob here. Excuse my My php tags doesn't work in my html document and if i change it to .php it turns into plain text in browser.

I'm running this on a server that supports php.

It's the

For PHP to execute, the file must have an .ph extension.

If you do change the extension and still won't work, there is some problem with your web server.}

Try making a file with only:

This should run in any PHP version, afaik

a php extension. Fuck

What web server are you using?

no problem, the problem is that my (currently .html) file becomes plain text when i change it to .php

should index.html stay .html or not?

might be a serverside issue but im using my teachers server and he has his website uploaded to the same server that uses php scripts. If nothing works i will see him next tuesday and ask then.

In the project directory, run php -S localhost:8080 in your terminal

That will start a basic php webserver

Hey guys, can you recommend me some web hosting providers?
I need to host more than 10 websites from this company that i started to work for.

They're all wordpress and prestashop sites so i dont need a dedicated server.

We are using hostgator but they suck, it looks like their storage is HDD based and they only gives us 50gb of bandwidth.

can people recommend me some good Udacity courses? CS101 is on my list, what else should I do? Looking for core knowledge, not necessarily beginner stuff.

Should i learn frontend dev if i suck and allways will suck at design? I did some basic HTML and CSS stuff a long time ago but now im wondering should i get into it more seriously?

This dude fron work landed a gig as an angular dev.

Those fuckers make a shit ton of money here.

Digitalocean is fine.

Each droplet is 5 dollars a month, but with virtualhost you can cram many websites onto one droplet.

Thank m8, ill check them out.

you can do js engineering and not need design skills

Hey! Computer Science student here just looking for fun.

After building my first website for other purposes, I've started entertaining the thought of making a blog from scratch with a php and mysql management system and it seemed a little aids. Is there a good api I could use for making sure blog entires are secure, but also give more freedom to format?

>tfw angular dev
where is "here"
how much?

Just lock down your apis the right way (require authentication) and you'll be just fine. Don't be afraid! What's the worst that could happen anyways?

Yeah, designer and developer are separate jobs at any place that knows what they're doing. I mean, what downie would expect a programmer to also be a designer or vice versa?

Thanks for the reply! And I'm not scared, I just was unsure whether to use php and mysql, or try something new. I made a blog system for my site thebestinslot.gg (my first site so bear with!) and it is more of a glorified tweet in the sense that it strips it down just to text and looks awful :'D

Dfw.

Over 60k. Usually 90k+

Average family income is 50k.

I lie at work and say things took me longer.
They get to bill more and I get to do nothing for longer.

Okay so I''m about to enter my second year of experience and I make like 67 in Austin. I'm from Dallas and I'd love to go back, just grown so many damn roots down here

post 1337 code you've written today, developers. No framework babbies allowed. No .NET shills, either.

$('#resultList').on("click", "li", function() {
var clickedName = $(this).text();
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
xmlhttp.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200)
{
var data = JSON.parse(this.responseText);
if (data)
{
bindData(data);
}
else
{
errorMessage("Error: could not fetch record.");
}
}
}
xmlhttp.open("GET", "loadNameData.php?Name=" + clickedName, true);
xmlhttp.send();
});

great code mang, would cum inside of it.

What do you think jQuery is? :3

A library.

why do you check for existance of xmlhttprequest object when you don't have an alternative if it doesn't?
why are you using jquery for your click events but not for ajax requests?
why aren't you using promises?

Daily reminder that a single drop of javascript will taint you forever as a web dev. HTML+CSS is the only path to freedom.

1. idk thats what was on w3schools raw ajax tutorial
2.im doing ajax with both jquery and raw js, wanted to learn how to do it either way
3. no idea what promises are, i've heard of them, but haven't got there yet. they sound really gay, desu

i promise you are a shit

>muh promises

just sounds really gay. No thanks, Jeff.

>code he writes belongs to him
Yeah, good luck finding a job out there kiddo

Trying to set up a new website on the same server, but it's being redirected. Is there a way to determine if PHP is fucking me or whether my changes to my nginx config / gandi settings haven't taken hold yet?

uhh it does belong to me? i just wrote it. Doing a replacement request system for a company

fuck off

the company doesn't own the code?

It might be an issue with .htaccess or web.config files in the parent folder.
How to check if you are having issues with PHP? Just print random data and exit in the first line of your script.
Can I post a 10000 spaguetti LOC I wrote on jQuery a long time ago? If I had enough interest/energy, I would rewrite it with a modern framework.

??? you said good luck finding a job my point is i do

The PHP is working, I should have clarified. I don't know if my current site has some sort of redirect (it does use them) and it's interfering with my access to the other site.

crysik.io is redirected via 301. I am going to do some work to the nginx config as it's a mess. gonna use
github.com/nginx-boilerplate/nginx-boilerplate
or
github.com/h5bp/server-configs-nginx

but I don't know which. I have a feeling if I do that it'll fix the redirects, just want to wait and see if domain and DNS changes are not odne yet

scratch that, it has now stopped redirecting entirely but is not taking me to my webste, gandi must be doing shit. I'll wait and then do my server files tomorrow

is there a limit how much data JSON.parse can parse? if i get too many results it returns false. I could set a limit on the query but i'd rather not.....

My evernote clone is shaping up nicely, I'm only missing tags and conflict handling sync logic.
Maybe throw in tinymce for rich text if the need arises.

And unlike those assfaggots on github that do similar things,l but with hundreds of dependences and hundred thousands files, this shit only takes ~1.5mb full and can run on the simplest LAMP setup.

If you want a job well done you gotta do it yourself, trusting memesource devs was a mistake and huge waste of time.
Bet they need a whole framework and fifty hundreds dependences just to walk to the bathroom and take a dump.

B-but you are using the full Bootstrap stylesheet. Do you have modals, accordions and breadcrumbs in your app? Do you really need all those classes and containers?

Actually no, I'm doing pretty much everything myself... I wanted to use modals and some stuff, but then I made my own.

Probably just need the normalizer and border-box sizing.

I'm learning about web workers from here w3schools.com/html/html5_webworkers.asp
The code below is a js they put in a web worker, why does the script area have a separate call to timedcount?
var i = 0;

function timedCount() {
i = i + 1;
postMessage(i);
setTimeout("timedCount()",500);
}

timedCount();

because the method would never run otherwise.
without that it would never get called for it to set the settimeout.

Been hunting for a job for months. Self taught. At completely unrelated basic bitch job right now.

Have two interviews next week, one for this company in a role that pays twice as much as I'm getting now. Another is being arranged through Launchcode at a start-up in the trendy part of the city.

Just got a voicemail from a place I interviewed at earlier this week and they offered me the job. So now I have to call them back. Do I just blindly accept their job offer and keep pursuing the others?

you barely told us anything. Job title? pay? location? etc etc forget the fact that only you will make a decision we wont do it for you but if you want our opinion we have to know the details

But doesn't pressing the startworker button cause the function below to run the js as it's turning on the web worker?
Start Worker
Stop Worker

Note: Internet Explorer 9 and earlier versions do not support Web Workers.


var w;

function startWorker() {
if(typeof(Worker) !== "undefined") {
if(typeof(w) == "undefined") {
w = new Worker("demo_workers.js");
}
w.onmessage = function(event) {
document.getElementById("result").innerHTML = event.data;
};
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Workers...";
}
}

wutz a webworker?

Right now I'm doing temp clerical work for a large life insurance company you've heard of. Their new position I'm interviewing for on Monday would be for a permanent role in the department I currently support. It's bullshit but it would be secure and pay a hair better than the job I'm about to accept, which is a PHP developer position at an online furniture retailer. The third position is front end development for a geospatial mapping company. It would pay best but I haven't heard good things about the way they treat junior devs.

sounds like you have options. I would honestly take the most cutting edge job. It's best to be in position where youre continuing to learn. MY first job was just front end and i hated it. Became full stack and love it. front end is boring and you dont learn anything about programming.

but thats just my advice do whatever the fuck you wanna do

yes, that's why you don't need to run it manually because your button will do that.
that's why they didn't do it in their sample either.

It is worth it to complete a couple of projects completely from scratch frontend wisem right? I feel dumb using bootstrap all the time.

So im a bit new to all of this so here is a dumb question just so i get the hang of things:

What is the best and correct way of doing the following, should i let mysql do the work, or should i let the scripting do the work?

Lets say i need to show some stats on the page. These stats are based on calculations from tens of thousands of rows in different tables.

A) Use one or a few SQL queries that uses lots of count, sum, round etc, so the data wont need any more processing after its been retrieved form the database. Its finished and done when fetched.

B) Fetch all the relevant rows (tens of thousands), and then iterate through them and make the calculations using whatever back end language you use.

Which way is healthier for the server if you have lots of requests doing this? Or is it basically the same thing?

its like a Promise but JS is single threaded and "JS worker" actually asynchronously executes on a new thread

don't do B.
Never load large amounts of this into memory.

Database servers are made exactly for this, they are optimized to calculate sums of large rows together efficiently and fast.

Loading thousands of rows into memory for each requests your server will go boom very fast.

I just got off the phone with the offered job, took it, pays just a little more than I'm getting now to start but at least it's the field I want.

We'll see how next week goes but I'm putting in my two weeks after the insurance company interview on Monday if they don't straight up give it to me with much better pay

i would guess let SQL do that

No

>Loading thousands of rows into memory for each requests your server will go boom very fast.

not necessarily. I've made a search function that loaded around 1000 rows really quickly. The key is to write your queries as lightweight as possible. But yes youre right SQL should do calculations on the data. Back end language should be used just as the middle man between client and server.

>he's not an asynchronous programmer

Is Wt cool?

1000 is nothing.
I had a guy at work loading 500000 rows into a list, sort them and then only render 10 of them.
the machine the application ran on was on it's edge.

ohh i read that wrong i thought you said A thousand. Yeah thats hilarious though what an idiot

web assembly is here guys!

still years away my friend

the examples have nothing to do with each other.

the first example is without a button.
so for it to run at least once, it gets triggered manually.

the second example has a button which triggers it, so it doesn't need to trigger itself manually because the button will do that once pressed.

I'm dumb, made the files on my desktop to try and I see why now. I thought the thing would run the function inside the js file when the webworker was created but no you need to call the function inside the file itself.

how long were you studying for before you landed these job offers? Self-taught in process here.

dood you want to be making serviceworkers instead
they run in a background process as well but can do all sorts of cools shit
they're used to make progressive webapps which are lightweight mobile apps installed from the browser

Really ramped it up about a year ago exactly.

give me a good web app idea, fek

so what are your skills today? You got a github to share with us? I've been studying for about 3 months... Hope to start throwing out CV's in another 3

this
I want to see what sorta skill level will make me money (student wanting to make some on the side)

Do a search. 90-140k. They are dying for senior angular devs here. You could totally land it.

I would but it's under NDA.

:(((((

I'm not making anything big yet just learning the basics

I'm not sharing my GitHub because the address is my legal name. But I'll tell you I did cs50x, then just started watching YouTube tutorials and cranking out projects.

The project I've demoed at interviews is an instant messaging platform I built in PHP.

I know PHP, MySQL, JavaScript, HTML and CSS very well, and have been using Bootstrap to make everything look tidy.

What courses did you do before getting to cs50x? Im not that far ahead yet

Start with codecademy. Anything on there that interests you. If you're brand new learn html and css

or, w3 tutorials
they are pretty simple to follow

I have a Sybase database that I need to query from an API in another place, what should I do? Put web services where I have my database? Sry for my English

Guys, don't worry about learning an entire stack to get your first job.

Most likely your first job is going to be in a base language like PHP or Javascript or whatever. So even if you go there as a fullstack it's not like anyone is going to let you touch anything outside of your role.

Also the chance of you landing a fullstack gig as your first job is very low. Only a gigantic retard would hire a newbie for a position where they could crash and burn everything in one sitting.

Basically enjoy your 30-40k a year job doing bug reports and maybe feature requests for at least 3 months then start applying everywhere for everything again. You'll get a lot of offers for entry and junior still, but hold out for a mid-level. Remember, you already have a job so you don't have to jump into a junior role again. You'll get a mid-level eventually. Stick to that for about 6 months then start applying. Senior-level can take a while. You might even hit senior level from your mid level job before you get a bite. If you do, then start applying for senior level once you are a senior level and you'll get the bites.

Remember to keep pushing for the next rank though. Don't sit complacent.

So...go out there and get your junior level and stop worrying about cramming stacks that aren't going to be used by the time you land senior anyways.

Also your job might "promote" you to mid-level and give you a few thousand dollar a year raise. That's ok because you only care about getting the mid-level title. Same for senior. I know some senior-level that got there after being with a small company for a year and being the most senior dev there, so they got the title.

Do those website builder sites just make pretty looking pages? Stuff like database and more complex shit I don't have examples of aren't included? Just curious where the money comes from for being a web dev

Developers build applications, not static websites. That's the job of a web designer.

No.

If you wanted to do a thing where it was a website builder but had databases, then everything would have to connect together as modules of the same thing. At that point you have basically WordPress, which retards still can't figure out.

What exactly do mobile developers do? What kind of apps do they create that haven't been done already

corporate mobile apps for example

There are a ton of apps that haven't been created yet.

Just sit and watch as the next billion dollar app rolls out with a simple idea that anyone could have thought up.

thanks dad

this

if youre not full stack, kys

why not be full stack when you can be full stack and get a full stack job? i dun git wut ur tryin 2 say, user

I thought I won a scholarship through Flatiron school that I signed up for and wrote an essay for a few months ago.

Turns out it was a "partial scholarship" for 50% which still takes it to $750.

Fuckers.

Jokes on them, I got a web dev job now.

I know people here like react.js better than angular.js.
What is the difference?
Are both available through CDN?

dude react and angular are shit m8 check vanilla.js honestly google it its the best frameworks/library/whatever. Really fast too.

So I've been a developer for a little over a year; should I go back to school for a CS degree?

I'd say only if it's gonna teach you higher level CS stuff. if it's just frameworks and languages it'll be outdated and you'll get ahead more by staying employed.

What's the difference between buying hosting from guys like GoDaddy vs hosting from Linode?

will teach you approaches that self taught might not, good pratice etc
adds something to CV, should arm with new skills and give more time for portfolio
(if its a good uni which focuses on emplyment pratice at least)


really if you are good at dev your portfolio should land you whatever you need