/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:

stackoverflow.com/questions/37280274/syntaxerror-unexpected-token-in-json-at-position-0-in-react-app
codepen.io/user/pen/qrZjzR
twitter.com/AnonBabble

how do you guys deal with mit-licensed codes? so lets say i have a comnercial peoject that uses a mit-licensed code from github ill just include the license file in my project folder right? or do i just go full pajeet-mode and delete all licenses and license notices and pretend i invented the code?

I had my first day of work today.

The job description? PHP dev. Add things that the accounts want added. Basically customize an already customizable framework.

>arrive
>hey, here's how you clock and here's your desk.
>desk covered in boxes for monitors and computer shit
>put computer together and get it working
>they didn't make any of my accounts, so I have to read over 3 pages of stuff for 4 hours while they make my accounts
>windows 10
>phpstorm
>in-house framework (like not even MVC, just MV or more like MMMVVVVVVVVVVV) I don't use frameworks so this is bad for me.
>writing when and what we are doing at every minute of the day in an excel spreadsheet.


I have no idea what I'm doing. Their framework is a mess, you literally add things by running batch files that add shit to the clients page. Like what the fuck is this?

>get trained in the software that the CLIENTS use
>everything is a gagglefuck all over the place and I can't even learn that in less than 2 hours. This is software the CLIENTS use
>get quizzed on terminology in a 9 page PDF I had to read, obviously fail because I burned my brain out on their terrible software and figuring out shit with phpstorm for 7 hours.
>guy that's been there for months literally runs out laughing when I can't answer the definition of some acronym.


God dammit! I could have never prepared for this and it has made me feel so fucking retarded.

Is this normal when you go to a new web dev job? I know everywhere uses different things and you kind of have to train on it for a while, but good lord, fucking windows 10 running WAMP and some GUI git alongside PHPstorm that can apparently svn or some shit and jira all while talking to clients who can't computer and filling out a minute by minute time excel spreadsheet?

WEEEEEEEEEEEEEEEEEEEEEEEEEW

I like it though and I hope I learn it fast. I also hope dickhead stops laughing because I can't cram like a 12 year old on adderall can.

like the guy that was laughing at me was drawing out how associative arrays work on the whiteboard just an hour earlier.

fucker, I nailed that when I WAS a 12 year old cracked out on adderall.

If you have a script with a src in html, will it automatically run when you open the page?

It will run when the HTML parser gets to it. Right after all elements before the script tag have been constructed.

React is fun.

enjoy getting cucked by zuck

>mfw his app refreshes the browser

how much are they paying you jw

also yes this is the downside to taking over a project that you didnt write

Well the guy seemed disappointed that I couldn't answer the shit in the document when I "nailed the interview questions" so fast.

I cant believe that dude ran out laughing. I know 3 full stacks and he later called javascript a weird language. I'm going to train anime style.

dude get out of there now

I need the experience. If they take me into a room to fire me then I will just quit.

I've been trying to land a job for over a year. Cant go back to that.

They lose devs faster than they get them. 1 guy left the week before and one put in 2 weeks today. There are only 9 devs.

I'm giving this my all right now.

I knew I should have learned frameworks.

You picked a bad company first of all.

Second, it'll make sense in a week. Your boss is probably more experienced and understands the adjustment period. If it is how you described than yeah you picked a bad company.

My small new agency landed its first big client today.

A chemical company, hired me at 100usd an hour for 40 hours a week for the next 6 months to create a dashboard for clients to monitor data output from machines.

Feels good senpai. If I do this well I'll be able to secure bigger and better contracts.

Been using Angular + Typescript and it's /comfy/

True, I just hate feeling behind.

Post from last bread, one last shout out for help...

So I'm using chrome Postman to send a GET request to an API. Can't use an XMLHttp request from a script because of access control issues.

After copying the contents of Postmans GET request (valid json) to a .json file I'm trying to fetch that and format it into a JS object with the .json() fetch api function but guess I'm fucking up somewhere. Not sure where though?

>I "nailed the interview questions" so fast.

What were the questions?

How do I link in bootstrap in an html document if I have it downloaded?
I know you can just use the CDN links but I'd rather use what I downloaded. Do I have to make copys of the bootstrap files and put it in my project folder and link it like a style sheet?

stackoverflow.com/questions/37280274/syntaxerror-unexpected-token-in-json-at-position-0-in-react-app

Some google-ing might help you out.

should be:
then data = data.object1;

assuming object1 is inside the json file.

then console log the data.length

This did not help, that guy's parsing html by mistake. I'm trying to parse valid json. Thanks though...

Have you tried actually reading the license? It's pretty clear on what you have to do.

Are churches and non profits good customers? Most have websites from 1990 and it wouldn't take too much effort to improve them, but are they able to afford it?

...

Having a website from 1990 indicates they have no willingness to budget for a new one.

I would consider doing to for free in my parish, but there's no reason to fix what aint broke, a fancy site isn't going to lure in more people, unless it's one of those places that are all entertainment and no substance, and they have lots of expensive advertising already.

You'll fuck it up.

What's a Sup Forums approved cpanel?

replace lambda with old fashioned function

Yes, just make sure you get the full scope of the project before starting. You don't want to walk in thinking you're doing a 10 page site when they have 40 pages you didn't see. Start small, don't do their whole site to begin with, start with one new page. Starting small can help you limit your risk, build trust, and gain experience at a reasonable pace

replace lambda with old fashioned function

CEO is making me mess with the CTO by having his coffee cup on my desk. He apparently stopped drinking coffee because someone drank from his cup before. The CTO already thinks I'm an idiot.

Help!

Not a chance, already made it.

Nice one, user. That's some sweet income too.

How much experience do you have and are you a one man show?

what the fuck

6 months of 100 an hour? jesus christ

is .insertAdjacentHTML still good and modern to use? works like a charm so im assuming so

I mean, bill rates where I work (consulting firm) won't touch a project that isn't $100+ / hr for at least a month. I work with 4 other consultants at our current client and our averaged bill rate is $130. So some of the guys are billing at somewhere near $200/hr while I'm bringing down the average at somewhere near $85 I think

rate my javascript

switch (data.ActionTaken)
{
case "Need Proof of Purchase":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
case "Sent to Warehouse":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
case "2nd Request":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
case "3rd Request":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
case "Completed":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
case "Unable to Fulfill":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
case "Unknown":
document.getElementById("ActionTaken").value = data.ActionTaken;
break;
default:
document.getElementById("ActionTaken").value = "Need Proof of Purchase";
}

how do i get my site/app to not cache? or if i want only images cached or something

google cachebusting for whatever you are using

Laravel has a versioning system which deals wiht it.

its weird cuz i can be editing and saving for most of the day just fine. But then all of a sudden it will get cahced and no updates i make to my files will show on my app (even when im in incognito mode). Is this server side or client side? i'm using PHP on IIS

It's server side, not sure how it would be done easily without a framework but it basically just adds some numbers at the end of the file name for versioning. Automatically changes the file name references to it as well.

for example my css would be
app.1c0fdebf355e83afadce.css
(the long thing changes every time I change the file)

and referencing it would be

yeah but you would need to refresh the page everytime for that part of the url to be generated to something different. Wouuldn't it be better to just disable caching in the server settings?

looks like something my coworker would do.

It's automatic

so like generate a random number every second or something, store it in a variable and use that to put at the end of my .js url?

It does it automatically just use a framework

why not just disable caching on your server tho

It's the browser that does it

but i thought its server side? i disabled caching on my IIS and so far no more caching. I don't think it matters if you disable it client or server.....?

>tfw VS Code February update
>inb4 shill

I've been trying to get a grasp of Angular 2 with their own docs this week, do you know of any good external resources to progress with afterwards? A book maybe?

Thanks senpai

it's k, companies shouldn't expect you to be 100% productive right off the bat, there's always supposed to be a few months period before you actually earn them money

>If they take me into a room to fire me then I will just quit.
never do this you retard, if they actually want to fire you let them do it and collect welfare moneyz before finding a new job

fugg how do i get people to pay me 100 / hour
is this the true power of self employment ?

data.json() returns a promise

does this "load" the php file each time or only on the first time its called?

xmlhttp.open("GET", "test.php", true);

Does anyone here know how to delete a files contents with golang??

Why do you work with retards? Start looking for a new job.

open it up and clear all the characters?

open just initializes, nothing will be loaded.

How?

you need to put gender assignments on titles? I assume it would be to know how to refer to them in the email, but if thats the case, what about the blank ones..

£300-£350 a day is the going rate for an experience (but not senior) developer on contract here.

thats real simple, Go should have some methods to do that...if not just use php or some shit

1: Imposter syndrome never goes away as a developer, you get used to it.

2: the first week of any new coding job is "omg wtf I don't understand any of these wtf is going on, are they going to fire me?". Expect it to take a couple of months to truly understand how things work and 6 months to a year to understand every bit of the code. The most important thing is always to not let it get to you and make you feel it's hopeless.

3: Messy built-from-the-ground-up CMS with stupidly complicated work flows are also common. You get used to them.

4: Half arsed MVC frameworks that miss out one of the letters are also common.

I once worked for a company that took on a project from some Quakers. It was a nightmare. We delivered, they messed us around with paying.

Here's the thing with small tech illiterate charitable companies:

They will not understand project management, tech specs and 'signing off'. You will do a 30 age design document listing all the features. you'll get 3/4 of the way through the project and you'll get the following exchange:

>"Looking good, when are you going to add feature X"
>"Feature X wasn't in the specs..."
>"Feature X should have been obvious, we need feature X"

They won't understand the 90:10 rule where the site looks great after a few days but it then takes several weeks to do the backend code.

They won't understand how long things take. "It should only take a day or so to add a shop to the site right?".

Common misconceptions:
>space is cheap
Sure, let's see how cheap it is when you have to upload one hundred thousands files on FTP. This is the true package manager experience.

>PHP is easy
Sure, for simple stuff it makes things easier, but god help you if you need to make complex stuff with it.

>Just save as JPG
You damn fucking cunts, back in the days people knew when to use PNG GIF or JPG, what the fuck happened.

>I like Angular
We'll see how much you like it when management will force you to make a whole multipage website full of angular broken third party components, because reasons.
Also $timeout is the magical panacea for everything.

>Package managers are good
They're very good at bloating everything. They could at least have the decency to compile modules into fewer files or zipping or some shit.

>They won't understand how long things take. "It should only take a day or so to add a shop to the site right?".
I feel you.

>They lose devs fast
>laugh at new employees to make them feel stupid

Pretty big red flags senpai.

you wouldn't webdev a video game

I think the most common misconception is you need to use frameworks. I honestly see no upside to them besides getting things done a little bit faster. If your boss is some hot shot who doesnt understand it takes time to write good clean fast code and wants you to write apps quickly, then yeah go ahead and whip something up real quick. Fuck it just use word press! I can understand bootstrap or something if you hate front end and want something quick, but thats it.

The downsides are youre not learning how to program at a lower level (even tho it's still high level cuz this is fucking web development for fucks sake), but you learn a lot more without frameworks holding your hand. Your app will be slower too. By milliseconds sometimes, sure, but it will be slower. Do all frameworks even support async? I've been writing apps for a few years and they're fast as shit even on the cloud. Make your back end deal data to you in the simplest way, dont try to do too much with it. Then use vanilla JS/AJAX to bind it. Boom. You have a really fast async app. You don't need a framework to write a fucking for loop for you.

Also, any M$ .NET shitty, layered, confusing, error prone framework faggots here? kys

Frameworks enforce discipline. When you are lazy and put code wherever it's incredibly obvious and will/should get spotted in a pull request.

A lot of fully featured frameworks also help prevent your code becoming a patchwork of libraries and scripts scattered all over the place. Frameworks can have built in async work, they have universal form builders, they even often have their own lightboxes so you don't end up with 5 developers putting in 5 different inline popup libraries in.

>They're very good at bloating everything. They could at least have the decency to compile modules into fewer files or zipping or some shit.

You mean front end package managers like gulp right ?

What should I have for applying to jobs as my github pictures?

I dont really need to have one of me IRL do I?

gulp, npm, gem, blower, composer

i use maven for back end project management, it downloads dependencies in a centralized folder and doesn't bloat my project folder up

i never really tried using front end project managers, this means i shouldn't bother ?
updating dependencies, running tests and minifying stuff through comand line seems nice

Seems nice, and it would be nice if there weren't incompetent module devs that can't prepare the modules correctly.
When you pull a dependency you don't expect to pull in the whole fucking repository. Too few optimize the distribution package.
The result is what you can expect.

At least npm3 no longer makes insane abyss deep submodule folders. That's something I guess.

>when you have to upload one hundred thousands files on FTP
Which is why you don't
Either you install the dependencies directly on the server (eg Heroku) or only upload bundles you create beforehand, either with a bundling tool (webpack, browserify, rollup, etc.) or manually with some other tool (gulp, grunt, etc.)

I will agree that it's pretty retarded to install a single package and have 75,000 files downloaded into your modules folders, though

>>guy that's been there for months literally runs out laughing when I can't answer the definition of some acronym.
This isn't OK. Your new job is a cult full of pretentious fuckups. Just give the bare minimum of effort while you apply to other jobs.

>Also $timeout is the magical panacea for everything.
Sounds like my experience with Swing. SwingUtilities.invokeLater sweeps all your problems under the rug. Don't worry about the smell, that's tomorrow you's problem.

Thanks for writing this up user. It makes us that haven't got our entry level position yet have a realistic idea of what expect.

>guy that's been there for months literally runs out laughing when I can't answer the definition of some acronym.

Fuck that guy. There's about 20 million acronyms in tech. I probably would've stared at him until he left. The elitism in tech is appalling. There's no way in any point in my life I would treat someone like that, especially someone new. I would go out of my way to never talk to that guy again. What a fucking asshole, I am triggered.

Get your experience and GTFO user. Also I'm curious about the questions in the interview too if you don't mind.

that's pretty constructive user, would you mind actually helping him?

I think the guy is past any help at that point

You're so far off its like you dont see the point of any of this.

I have a little more to write now that I finished day 2.

Things are getting interesting. Will post when home.

Is there a good place to find some vue.js tutorials? They seem to be kind of hard to find for vue for some reason.

I like learning by following tutorials making stuff that is actually useful and this is my first framework / library (they call themselves a framework, but they're actually a library?)

The official guide is pretty good

document.getElementById("ActionTaken").value = [
"Need Proof of Purchase",
"Sent to Warehouse",
"2nd Request",
"3rd Request",
"Completed",
"Unable to Fulfill",
"Unknown"
].indexOf(data.ActionTaken) !== -1 ? data.ActionTaken : "Need Proof of Purchase";

Not functional enough, throw a .reduce in there

I guess that's what everyone is learning off of then?

I've actually really pissed off my coworkers doing shit like this. I think it's fun

Ok, so day 2 is finished.

I spent the whole day configuring PHPStorm and Jira. We have to use PHPStorm 10. The documentation they provided is WAY outdated and half the office couldn't figure out why I couldn't get a pulled branch to work.

Eventually it was fixed by using someone else's apache config and making a random ass file that declared me as a developer. I had been there for 1.5 days and was making edits to the new hire install documentation so future hires wouldn't be as fucked.

I realized the guy that laughed yesterday just has a huge ego and wants to be known as the best. I used this as an opportunity to ask him a million questions. People with egos always help because they don't want to seem stupid. He seems like an OK guy honestly. I didn't realize how weird web developers were until I got this job.

I come back from lunch and the CTO is asking if I've been given any work yet. I explain that I just finished with being able to pull a branch (everyone else had a "default program" to run bak files and turn them into databases, I didn't. I had to find an exe and a bat that does it and set it) and getting it to run and am now able to do what was give on day 1. Day 1 I was told to learn how the software works in the browser. I had to use the receptionist computer for a while before trying to get mine working. So I started learning that and he just starts slamming me with tickets.

Little tickets, but terrible ones. "Make a folder named DocumentUploads with a decent readme so we can push it to git and the other guys won't have to do it. Push it to x account and to master"

Ok, where exactly in this mess of folders does this new folder go? What exactly does this empty folder do?

Another ticket that just said "Ask John how to do a heartbeat because he's good at it". Ok.

I understand what he's doing with these types of tickets. It's so I know how to use Jira and can make very minor changes to repositories and go through the review process without...

...messing everything up.

I wrote another long post, but it wasn't really relevant as I was just outlining how strange some people are there and this isn't my blog. I'll fuck off now.

sounds about like my first job.. down to the simple Jira tasks

As someone planning on starting working soon I appreciate it for sure. All of the stuff about getting jobs/starting them rarely have anything about what it's actually like on a day-to-day basis and what you specifically do.

FUCK THIS SHIT


I HATE MY LIFE


Why does the above always display as stacked rather than side by side?

i had this problem and the same feeling a while ago but don't remember how I fixed but i do know your pain senpai

There's probably padding on the div inside the col-sm-6 div. Use the inspector, you dumbo.

codepen.io/user/pen/qrZjzR
It is side-by-side