/wdg/ - Web Development General

'Fixing the links that none of the previous fags did' edition

> 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/
>Crockford on Javascript
youtube.com/playlist?list=PL7664379246A246CB

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

>Backend development
en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

>Useful tools
pastebin.com/q5nB1Npt/
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/
>How to get started
> [YouTube] WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice -
youtube.com/watch?v=zXqs6X0lzKI
> [YouTube] Javascript is Easy - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.
youtube.com/watch?v=zf_cb_Nw5zY


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

Other urls found in this thread:

codepen.io/user/pen/JKmbyW
programming-motherfucker.com/
youtube.com/watch?v=sBzRwzY7G-k
youtu.be/sPlhKP0nZII?t=24m32s
stackoverflow.com/questions/3255993/how-do-i-remove-ï-from-the-beginning-of-a-file
blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
twitter.com/AnonBabble

Fuck, I forgot:
>Last thread

Reposting

Is there a better way to do this?

codepen.io/user/pen/JKmbyW

First for Javascript is the best language ever devised and it is the only language anyone needs to create high-quality software for any platform, and if you don't like it enjoy being a language cuck for the rest of time.

Another note to myself for the next thread:
>programming-motherfucker.com/
should be plain HTTP.

Just get your shit together, OP.

Also the guy who did
> [YouTube] WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice

has updated it for 2016/17
youtube.com/watch?v=sBzRwzY7G-k

Is there a reasonable explanation for the hate for php or is it just a bunch of elitists pushing their memes onto others?

lets say im building a mini youtube just for me. where could i store all my files apart from my local hard drive?

oops didn't mean to reply

PHP is just about the shittiest language known to man because of it's total disregard for standard programming paradigms. That being said: the 'creative' programmer can achieve the weirdest things with PHP due to said crappiness, like constructing objects from string literals.

>because of it's total disregard for standard programming paradigms
is that it? there's no restrictions, it just didn't follow classic syntax or w/e?

PHP doesnt pay a lot, they said.
You will only work on legacy apps,they said.

Average family income is 55k here.

It's a pre-hypertext processor, not a serious language.

This is the standard critique:

eev dot ee/blog/2012/04/09/php-a-fractal-of-bad-design

> I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.

> You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.

> You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.

> You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.

> And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.

> Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.

> That’s what’s wrong with PHP.

PHP was created by bad programmer to be simple and basic and it shows. That said there has been a lot of improvements lately that make possible to write actually pretty decent code.

In your webserver. Or CDN. Or some file/video storage site.

You can replace PHP with Javascript and that has a lot of fans here.

Those jobs are pretty cool, unfortunately average PHP job is still Wordpress pajeet.

I'm new to web development and so far have written about 2 sites, but I'm curious about something.

In most of the amateurish sites I've made so far, I've used Python, HTML, and CSS, and some Javascript.

How exactly do all of these different languages coexist and work together like they do? Flask provides a layer of abstraction to this so I don't need to know exactly how it works, but now I want to learn about this.

What do bigger sites like Vimeo and Youtube do?

what the fuck do you think? google has server farms storing all that bullshit with redundancy

Anyone got any good reading material on how to pass data between an HTML page and a PHP program with ajax? I think thats what Im looking for. I've made an IRC client that works in the command line, and I want to make an interface page for it. Or should I be going about this a totally different way? Real new to this stuff.


Also, I tried running the irc.php file in the browser just for shits, and it obviously spat out the stuff from the construct function and the first run of the main loop and didn't update after that. Then I sent the shutdown command (just type "kill" into the channel its connected to in another IRC client) and somehow the page updated by itself without refreshing. Can anyone explain how the hell that works?

well i was thinking there might be companies that let you store on their servers or something. jeez, ya dweeb

haven't you asked this already here? use websockets for this not ajax

>Did 1.5 years of WPF
>Follow up by 1 year of Xamairn
>Get new job
>Learn AngularJS to use with ASP.NET back-end, hosted on Azure
So far seems fun. Seems easy. It's Angular 1.2, company doesn't feel comfortable enough switching to 2. Angular is cool, right?

Something along the lines of this. I've got a working version of what Im trying to do with websockets, but Im still fucking around with the IRC version just for the fun of it.

Still want to learn how to have a process doing shit in the background while sending and receiving stuff from a webpage, because that seems like it will be useful later.

if by cool you mean deprecated then sure

By what? Pretty much, whatever you're making in Web is obsolete technology after 3 months, so I'm not fussed, just curious.

Because shitters gonna shit.

Also because it was a html templating language that accidentally turned into a programming language by having way too much shit added to it.

But if you like it, use it. Don't listen to the shitters, 90% of the time those people are Python zealots who have fully bought into the """Pythonic""" circlejerk. Just ignore them.

/PDG/ - Pajeets and Deprecated languages General

>3 months
Angular 1 has been around for almost 6 years now

Angular 1.2.1 is Sept 2015, so it's not that bad. As I said, company would prefer using it for this project until everyone got up to speed with TypeScript + ASP.NET Core for Angular 2. Not such a big deal, senpai.

The fact that combining strings is done with a period instead of the logical plus sign, and the weird obsession with arrows, is more then made up for by the fact that splitting a string is done with the EXPLODE function.

You're migrating to .NET Core already? isn't the platform a little too immature right now?

It is. Which is why we're not going to use it (in conjunction with Angular 2) until the next project.

>Angular is cool, right?
I fucking hate single page apps, I think they're janky, gimmicky bloated bullshit, and using Javascript to do things that HTML and CSS can do better is just frontend developers wanking all over themselves and their users.

I'm all for Javascript and the dynamic functionality that it adds, and AJAX loaded content is great. But Javascript has its place in the browser (and the server because node.js is gud)

Also not every backend has to be a RESTful webservice by default. Server-side templating is fine for the vast majority of cases.

Concatenating with the plus sign doesn't make sense, it's just what you're used to. You can't just add strings.

2 + 3 = 5
3 + 2 = 5

"hello" + " world" = "hello world"
" world" + "hello" != "hello world"

grandpa detected

>doesn't provide an argument to defend his shitty meme gimmick frameworks
>uses 3dpd smug girl instead of superior 2d smug girl

I saw some new Django course on Code school or whatever. Is it worth learning Django? Better or worse than nodejs? Where is the future?

They both do the same shit. If you want to learn something diferent from what NodeJS does go with Haskell or C#/Java/Go.

What kind of music do you guys listen to while coding?

Usually some generic dubstep shit from random youtube playlists. Anything with lyrics/speech fucks with my concentration. When I don't need to concentrate, I usually listen to podcasts.

DESU the only strong reason to use Django is if you just really like Python.

I would think dubstep would be distracting and uncomfortable for long sessions with the constant wub wub wub. I feel like acoustic type music is best, but you get irritated if its too simple of rhythm. Some Deep house would be chill if I could find a playlist without lyrics.

Python is a general-purpose scripting language that runs on your computer, or a server. You can get all kinds of shit written in Python.

Node.js is an interpreter for Javascript which is a language traditionally associated with the browser. If you want to make stuff happen in the browser, you need Javascript. But Node makes it possible to use outside of the browser on your computer (or a server)

Django is a web framework for Python.

There are various frameworks for Node.

Pick a language, learn it, see if you like it. Dedicate time towards it. It really doesn't matter which langauge it is. But personally I prefer Javascript

If you're enthusiastic or knowledgable about the thing you like, someone will probably pay you to do it.

>learn Haskell
This is the shittest advice for anyone who wants to do anything besides fizzbuzz on Sup Forums

youtu.be/sPlhKP0nZII?t=24m32s

I'm programming some stuff with javascript and php.
Currently I'm working with files, and for some reason, once php sends a file name to javascript, it adds %EF%BB%BF%EF%BB%BF to the file name.
Javascript show me those hidden character with an alert(), but php don't if I echo $file, it just show me the good file name. If I use strcmp(file, "file.txt") it tells me those strings aren't the same.

Any idea why it happens and how can I solve this ?

Hi Sup Forumsuys, I really need your advice.

I recently finished my course of web development (vocational school) and found that an internship would be a nice idea to solidify my knowledge and learn new things from professionals.
One month later I find myself not learning anything from them but instead fixing the shit none wants to even touch, for example:
>Making old-ass websites responsive
>Translating and updating dunk newsletters
>Slicing/resizing shit in PS
>Optimizing/changing non-documented JS code (total clusterfuck)
>etc...

But the worst part is, I virtually have not had any training, mentorship or assistance from the start. Sometimes I feel like I'm being exploited.
Even setting up the dev environment wasn't explained to me not to mention the stack, tools and techniques company uses.

Right now I'm seriously considering stopping my internship and just start looking for another one or job at a junior position?

What you guys think, any relevant advices are much appreciated.

They're URLencoded byte order marks

stackoverflow.com/questions/3255993/how-do-i-remove-ï-from-the-beginning-of-a-file

Not him but single page apps as mobile apps packaged with cordova are great.

Not everyone has time to learn Java and swift.

Di.fm

This mix was good.

>Not him but single page apps as mobile apps packaged with cordova are great.

Or you could just make your website not be a pile of wank on mobile.

There are few things more annoying than following a deeplink somewhere and getting a webpage telling me to fuck off to the app/play store and download an app so that I can continue using what is basically a website.

If you're not designing mobile-first websites when mobile is now the biggest web browsing platform, then you're a retard.

>One month later I find myself not learning anything from them but instead fixing the shit none wants to even touch

Yeah you're an intern. That's what you're for. And you are learning because you're working on an existing codebase. I'm a node.js developer, you'd think there wouldn't be enough shit written in node yet and I'd be writing new shit, but no I'm maintaining a pre-existing codebase.

>But the worst part is, I virtually have not had any training, mentorship or assistance from the start
What do they do if you ask a question about something?

>Making old-ass websites responsive
>Translating and updating dunk newsletters
>Slicing/resizing shit in PS
>Optimizing/changing non-documented JS code (total clusterfuck)

All of that is part of web development. It's not all fun and games, that's why they pay people to do it. It's a job like anything else.

> I virtually have not had any training, mentorship or assistance from the start.

Have you tried asking? Mentoring someone is actually a lot of work and responsibility and most people aren't going to jump at the chance to add that to their workload. If you ask and seem eager to learn, people will make time for you when they can. Just don't expect them to hold your hand, you aren't a baby.

>Right now I'm seriously considering stopping my internship and just start looking for another one or job at a junior position?

Leaving a job before you have another one lined up is usually a pretty fucking stupid thing to do. Especially if it's a temporary internship. Obviously if you had a job at google or something lined up, that might be a little different.

>Yeah you're an intern. That's what you're for.
I must disagree with you on this one. During my first interview I explicitly said that my goal is to learn new things so I can decide where I want to go (front- back-end or something completely different).
What can I possibly learn by slicing images, or copy-pasting text?

>What do they do if you ask a question about something?
If I get a hold of anyone who is willing to help, he usually:
A) Spits an incomprehensible shit that I have no idea about
B) Takes over the keyboard and quickly types something, while I'm desperately trying to memorize wtf he's doing.
C) Refers me to his colleague which does points A and/or B

Right now, even if they'd offer me a job after the internship, I wouldn't accept it, and I'm saying it as someone whose being unemployed for the past 2 years and broke right now.

Look for the company paypal password. In my experience, its probably in a text file. I've seen that in three out of four companies I've worked for.

desu you sound like a whiny ungrateful child who has never had to do any real work before and expects everyone else to just hand everything to you on a silver platter.

r/a/dio

Feels like this thread is at least tangentially related to my question, so I'll ask here instead of bumping something else off the board with a new thread.

One of my hobbies is ripping live streams of audio/video from regularly occurring events in other countries. I then clean them up, split out the audio, etc, and share them with other people interested in the same events. They're pretty low-key, it's not a super popular thing so I'm not concerned about copyright violation notices or takedown orders.

But my computer isn't on (or available) 24/7 so I'd like a place to store the archived older events that doesn't require leaving a torrent active.

Was hosting them on a dreamhost shared plan, but they got butthurt about the space it was taking up once I hit 100gb, and pulled out the bullshit TOS clause about "muh file sharing blablabla" and nuked the site.

TL;DR who do you folks with similar hobbies prefer to use for hosting direct downloads of media files that doesn't cost a fortune and won't bitch about a bunch of disk space being used?

Was considering the new backblaze cloud stuff for storage with a generic host for the physical page that links to the files, but even that gets expensive when you're talking 50ish GB of outbound traffic per month.

Apologies for the walloftext.txt

Lots of people are saying Node is a trend... I dont have enough evidence to have a personal opinion, but from what I hear Django has been around for a while (like Rails) and by all accounts is here to stay.

Django vs Rails is like Python vs Ruby... all preference. NodeJS is too minimal for my tastes. Get ready to write a lot of boilerplate code for Node... like, a LOT...

>cute

What? You've seen actual companies store their passwords in a text file?

Maybe a seedbox? You can probably find good deals in the Private Tracker general.

Different guy, but the small business I work for literally has an "Accounts.xls" file in the shared office directory that every login related to the company is inside of.

I'm talking EVERY login, from payments to hosting to 3rd party services to all associated email accounts to clients' logins, etc. It's fucking bad. I shudder to think of the fallout that would happen if someone managed to stumble/break into the internal network.

Tried to force people into at least using a shared password manager or something many times, especially with all the high-profile hacks happening constantly, but it all falls on deaf ears.

At least my workstation is secure, there's no fucking way I'd put my real login information in that file.

Not a bad idea, hadn't considered that. Will take a look, thanks.

just starting out with Django and oh boy am i already getting a sense of future comfort

samesies. I actually dont "love" python, but it is such an "easy" language that I can already feel myself getting more done. Lets hope I am not just imagining things... I DO have a history of LSD use.

Stop bitching.
There are plenty of programmers who never took one college course or had an interneship you whiny bitch. Do you think the only way you can learn is from some other person like a waste of life professor who is a failure in the field they are teaching about?

I did everything said on your link and yet it's still here...
I'm just going to sleep. If someone knows what the fuck is going on... I'll lurk this thread tomorrow.

Show me an animation
I dare you

CSS?

ok, why do I lose my external stylesheets on AJAX load if my pages use UTF8-BOM encoding?

I had to convert all my crap back to ANSI. I'll try UTF8 without BOM, but why would it even do this???

yeah... it works fine with regular UTF-8, but not UTF8-BOM

wtf?

>tfw Elm will never be popular

Filling out a webdev portfolio. What's something neat I can do with socket.io?

How the fuck do I get out of QA

>By what?
Angular 2 and React

I thought QA paid relatively well.

I just finished Learn Python the Hard Way. What do I do now?

Follow the flask tutorial

blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world

t. resident Flask shill

BOM adds special characters to file that can fuck some things up so always avoid it. UTF8 itself is good.

Not gonna lie, after skimming through a few of those pages Python looks very appealing. I started gathering the basics to make a web app using PHP, but I guess I'll use Python instead.

I started messing around with it a few months back but got frustrated and dropped it after I couldn't get it to connect to MongoDB on my machine. Fuck Mongo btw.

Video:


In the php I'm simply trying to see if the uploaded file's extension is mp4 or not. When I deliberately upload a jpg or something not mp4, the else prints just fine, but when I try to upload a file that actually ends in mp4 there is nothing printed so i assume the code in lines 3 and 4 is where the error would be. Anyone have a clue cause I'm lost.

Also I got the html from w3schools and i'm not entirely sure what input type file and input type submit are doing exactly. like which one does the filename get saved on?

Try to use file magic instead, anyone could simply upload any other kind of file renaming it as .mp4

not sure what that is.

Just check some file upload tutorial, your current code is too wrong.

holy shit angular is the worst

>He fell for the Angular meme

You should've known by now that Google are a bunch of retards who can't do anything right.

There is no way I'm learning Angular 2 after working with 1.

Also, React seems ok, even though even at a tutorial level it looked very messy to me. Kinda worried about that t b h.

Also,
>tfw have more exp with JS and Node is popular, but Python is so comfy to me and want to use that instead

And I'll mention that now that I worked with SPAs in my internship, I fucking hate that shit. Don't know if they were just overly bloated and badly coded, but their web apps literally took longer to load a new page than a normal refresh would do. They were made with Angular1 btw. Incredibly slow shit.

Explain to me why I shouldn't rely on node.

I can't.

I only put in part of the code. It seems to be working for other extensions but not video files. It works for jpg.

bump for this

i wont use it for personal projects
im supposed to use it at my job

reminder that if your website doesn't support full unicode you're a shit developer

>Python looks very appealing
indeed. Django and Postgres is comfy as fuck. i hope to give Flask a try someday.

Do your own research now you know what to search for faggot

this

Does anyone here use webpack what do you think of it by comparison to just writing your own tasks via grunt or gulp?

>using Javascript to do things that HTML and CSS can do better
$.ajax({
method: "GET",
url: "output.xml",
dataType: "xml",
success: function(data) {
var lastRegion = "0";
var lastTown = "nowhere";
var lastLocation = "0";
var lastLot = "0";
$( data ).find( "ROW" ).each( function(){
var thisRow = "";
var thisRegion = $( this ).find( "REGION" ).text();
if (thisRegion != lastRegion){
thisRow += "Region: " + thisRegion + "";
lastRegion = thisRegion;
} else {
thisRow += " ";
}
var thisTown = $( this ).find( "LOT_TOWN" ).text();

So is PHP still the go-to server backend?

A client has asked me to create a website that is kind of like kickstarter but I'm contemplating trying out another server backend other than PHP.