/wdg/ Web Dev General - Sponsored by jQuery (the /wdg/ frontend framework of choice) Edition

trying out updated OP from three threads ago
improvements welcome (do we even need Discord/IRC?)

>old thread
>Discord / IRC
discord.gg/wdg
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
Everything you learn will have these as their base.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

>Online courses
codecademy.com/
freecodecamp.com/
bento.io/

>Further reading/viewing
youtube.com/watch?v=sBzRwzY7G-k
github.com/kamranahmedse/developer-roadmap
github.com/dypsilon/frontend-dev-bookmarks
github.com/vhf/free-programming-books/blob/master/free-programming-books.md

>Code challenges
codewars.com/
hackerrank.com/
codefights.com/

>Useful tools
developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
programmableweb.com/ - List of public APIs
caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
derekbanas
learncodeacademy
funfunfunction
computerphile
coding train

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

feminine penises are probably still more gay than not, but what do I know

Other urls found in this thread:

stackoverflow
drawasaurus.org)
play.google.com/store/apps/details?id=com.drawasaurus.game
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
pastebin.com/raw/jgXf7RJc
youtube.com/watch?v=kDRmqabrmag
youtube.com/watch?v=C2_BQ0PhEM8
collinoswalt.com/games/buggy/
twitter.com/SFWRedditVideos

>he's not an asynchronous programmer

>when you realize the real cucks are front end developers
>when you realize back end is where the money is

Who /back end/ here?

ideas to work without JS? any dead ends you can't ignore?

Thanks

Just send one request, that contains info about all the files you need from the server

>Sponsored by jQuery (the /wdg/ frontend framework of choice)

How many people have server side rendering projects? I just finished mine, almost, I think. C#, react, sockets and vroom btw, ditching react.net was the best idea ever. Responds under 10ms (react.net was 30ms) almost every time and 2ms most times.

If you want you must promise to donate neetbux.

Lol I had an epiphany that all of web is just javascript and your favourite language.

There is literally nothing wrong with jQuery, but it is a purely client side library. Don't be shocked if weird things happen when you're trying to use it server side.

>backend stuff and over complicated ajax
Asynchronous backends are fun, they can take like tens of thousands of requests a second.

Why? Just send as many as your server can handle and let the cpu go up and down. Otherwise unless you're threading horribly or running really dumb code, 300ms is fine. Actually it's kind of annoying and feels like php.

>There is literally nothing wrong with jQuery, but it is a purely client side library. Don't be shocked if weird things happen when you're trying to use it server side.

My reaction was just to using jQuery in general. There are a lot of things wrong with it.

not the guy you quoted, but for some stuff jquery is great, if you want cross browser support for some events, for example.

Sure, it's bloated and you probably (
won't use it all. You can implement in vanilla javascrip stuff like adding and removing classes, or even choose to use on of the many lite distributions of jquery.

nowadays what kind of operations are still not 1:1 browser compatible, unless it's some experimental feature.
Do you have an example of JS code, that works in one browser but not another? (excluding ES6 obviously)

Genuinely curious.

Novice web developer with no academic background here - is it worth going back to university to study in some sort of programming course or is school not very effective at keeping up with the latest happenings and transitions in web coding?

Doing anything is better than nothing. If you learn better from university, do that. If you learn better on your own, do that.

School gives you a frame to build upon and the chance to meet people that you can work with in the future.

It does cost an absolute fuckload of money though, so be smart about it. School is not an absolute necessity since the material on the web is fine, but nothing beats a university for networking possibilities.

So i'm trying to make a webpage where the user enters their last name and it searchs through a csv file and displays the number that matches there name. I have no idea how to go about this. I have been googling madly for the last 30 minutes.

do you want the client to search the file or abstract it through a server side operation?

Which one do you think is easier. All I need is the client to beable to enter there name and have the code/number attached to their name appear in front of them.

This can be anything as easy as string.indexOf, looping over the contents and equality checks, or something slightly more complex like a database.

Either way it sounds like you're missing some very basic programming skills. Go back to the classroom user and do you a learning.

Google "make ajax request to php file"

bind an event to the input field that makes an Ajax request to the PHP file that is reading the CSV

Thanks and I am missing very basic programming skills, I can only do basic shit in python. I'm doing this for free for a fundraiser

you can do this easily with PHP

give me a good beginning node js project, /wdg/

TODO app

if you know python consider using heroku, they have a tutorial and a complete working web app using python when you do the tutorial.

it includes the connection to the database, and how you process them. definitely check them out

Build a simple website with express as the template engine.

please install Vue.js

Str_tocsv or something like that.
Foreach through the rows.
Column 1 is row [0]
Column 2 is row [1]
Etc

You should know the rest. If =

It`s mostly older browser stuff such as IE6. I remember have some problems with one of the windows events before and just changing it to jquery equivalent.

You can take a look at this stackoverflow thread for a rather lengthy discussion of examples. Most of them are edge cases or very specific issues.

Also, fuck IE6

stackoverflow dot com slash questions/565641/what-cross-browser-issues-have-you-faced

Just bought a new domain. Let's hope my 4th website becomes more popular than my previous ones.
>0 users
>0 users
>2k unique/day
>?????

Yeah, a lot of that stuff seems pretty annoying. I'm glad IE6 is down to basically no usage.

Currently it's pissing me off that Apple doesn't see fit to actually provide an update of Safari; you actually have to manually go to the mac app store and download the new version. It's not hard to do it if you know you want to, but I'm sure it hurts adoption of new versions, which apparently they just don't give a shit about when it comes to browsers.

Give me some idea of fun projects to do with Javascript

Put it on a server

Sorry, I shouldn't even joke about that. Too soon.

I can sense the retardation in this fellow.

This won't work will it /wdg/? Oh man I'm in too deep here, Mafia boss wants his Javascript done by midnight

The pic leaves out two closing brackets at the end, rest assured I didn't forget those

At least not retarded enough to think JS on the serv is a good idea

You forgot the semicolon at the end of each return statement

Math.random() doesn't take arguments.
Also you probably want to floor your result

Math.floor(Math.random() * 3)


instead of a switch you can also select from an array. Would probably look nicer.

Damn, that's basic shit.

Thanks m8. Learning erryday.

Semicolons are optional in JavaScript; as long as you have a newline you're good.

It's still generally best practices to include it though.

>half of the dev team at our company team just got fired for behavior reasons

Didn't even see if happen, was just surrounded by empty desks and got called into a meeting about it. Must have been pretty bad what they all did given the company is already short staffed.

I'd go so far as to say they aren't even really optional. Most minifiers will break if you don't use semi-colons.

I've been using HTML and CSS for a few years, last year I picked up Java and XML for app development, and did both front and back-end development for a pretty complex app. Now I'm wanting to actually get back into webdev but on a professional level. I'm pretty proficient at HTML and CSS, though that's generally the easy stuff as far as I can tell. If I really apply myself and learn the ins and outs of JS, jQuery, PHP, Python, etc, about how long should it take until I could reasonably expect to be hireable?

what?
Don't want to go "works on my machine", but I always write without semicolons and neither uglifyJS nor Babilify ever gave me any problems.

>Most minifiers will break if you don't use semi-colons.

If you're just stripping whitespace indiscriminately, then maybe, but I have to imagine that any proper minifier would detect that shit.

Do what I'm doing right now and focus on learning to be able to build a portfolio since a portfolio of work is what gets you hired.

Learn what you have listed and work through as many projects as you can so that you can show experience and knowledge in the respective frameworks

Put it through a gulp/grunt process and chances are something isn't going to cope.

if you are proficient as you say you are in html/css, as in could do exact 1:1 .psd -> html + responsive design, then all you need is js (vanilla + framework of choice - react, vue, angular) and a backend stack and you could be hireable in a few months (3-4 mo @ 6-8 hrs a day).

skip jquery and php, hot shit right now is node/express or elixir/Phoenix. for db mongo, postgres, mysql.

Will do, thanks user! I've already got an extensive portfolio of illustration and photography since my background was in graphic design during school. Now I'm on to different stuff than what I learned there.

What's a good way to showcase a portfolio of webdev/mobiledev work? I'm building a website for the app at the moment and fixing up some issues after doing some QA, but how do others generally format a portfolio for this stuff?

>exact 1:1 .psd -> html + responsive design

Very first things we were taught in my web design class during my graphic design studies, though we didn't go too deep into JS so I forgot most of that.

I could reasonably be working 8-12 hours on this per day since I'm between jobs, my last gig was as a videographer. I'm also a quick learner so maybe that'll help too. Thanks for the advice, user!

Pick up front end first, go JQuery and JS and also get to know compiled CSS formats like SASS.

Lots of dev studios struggle to get front end developers because half of them hate working with Javascript and the other half find CSS slow and annoying and only do it when they have to.

Can't really say how long it takes to learn JS and JQuery, I learnt it was I needed. It's very quick to pick up if you've a good working knowledge of coding in general though.

You can always try and pick up PHP on the job.

Well good to know front end is an easier field to find jobs in. I don't enjoy back end anywhere near as much as front end.

hm, maybe.
Using them as webpack plugins atm.

>JQuery

Hey guys, the web game I've posted on here a few times (drawasaurus.org) is now an Android app!
play.google.com/store/apps/details?id=com.drawasaurus.game
Hope you guys check it out and let me know how slow and buggy it is.

I first wanted
Do people actually click on those ads (on purpose)?
How much money are you making with this project?
You can tell us user.

Does anybody in this thread (or newcomers) do any freelance work for $$$? How does one get started doing so? What kind of gigs do you get?

>contains ads
no thanks

Wouldn't say it's easier, just that I frequently experience companies struggling for them. I'm a backend developer primarily so I can't say what the job market is.

Anyhow, this is what I'd call a good exercise in JS that'll reflect real world usage:

Make a form
Give it a bunch of text fields and validate them as the user types (ie phone number, email address, two passwords matching). Have it display an X next to the field if they fail.

Have Category drop down. Have that category filter the contents of a second drop down.

On form submission, load in an xml/json file through Ajax, go through that XML and search for an item that matches what's in the second drop down.

Display the rest of the contents of that item in a inline popup/lightbox using a third party library (even if it's just bootstrap).

The game's free and I'm broke, use an ad blocker ya fuck

Not much but a little so far. I actually made a couple hundred dollars from ads on a Sup Forums searcher site I owned.

Thanks, will do! I'll screenshot your post for future reference. I tend to get a ton of ideas on things to make and do, so as I work on programming I'll probably naturally do a ton of exercises on my own.

really cool user :D

i wish it scales up a little more in 1920x1080, too many wasted space imo

From my research, the best freelance gigs are gonna be when you are contacting prospects. Try to find companies in rural areas that have a lot of money but a shitty website.

Proposition then for a new website and explain to them how it will help them get more business. You will eventually find an outfit that has been meaning to update their web presence but are not the kind of folk to go looking for pajeet on the freelancer sites.

what language do u use for the website? java?

I've done contracting via an agency. Work varies massively. Can be a great way of getting experience and the money is very good.

I was getting £175 a day just doing html emails

lots of gotchas and compatibility issues when working with emails?
How does it compare to developing for the browser?

hey dude, the app is pretty good, much like the web version. Just a thing though, you should look for a way to maximize drawing screen size when you are the dude drawing. It's too small to be able to make significant detail. But keep it up, it's looking good. If you know of any way we can help you shill it, let us know, I'd be happy to help.

Can you guys help me out and tell me what is wrong with this code?
function getUserChoice () {
var userInput = prompt('What is your selection?');
userInput = userInput.toLowerCase();
if (userInput = 'rock', 'paper', 'scissors') {
return userInput;
}
else {
console.log('Error, error, ERRAR!');
}
}

function getComputerChoice () {
switch(Math.floor(Math.random() * 3)) {
case 0:
return 'rock';
break;
case 1:
return 'paper';
break;
case 2:
return 'scissors';
break;
default:
console.log('Something has happened.');
}
}

var userChoice = getUserChoice();
var computerChoice = getComputerChoice();

function playGame() {
function determineWinner(userChoice, computerChoice) {
}
}

function determineWinner() {
if (userChoice === computerChoice) {
return 'The game ends in a tie!';
}
if (userChoice === 'rock') {
if (computerChoice === 'scissors') {
return 'The computer has won!';
}
else {
return 'You have won!';
}
}
if (userChoice === 'paper') {
if (computerChoice === 'scissors') {
return 'The computer has won!';
} else {
return 'You have won!';
}
}
if (userChoice === 'scissors') {
if (computerChoice === 'rock') {
return 'The computer has won!';
} else {
return 'You have won!';
}
}
}

console.log(userChoice, computerChoice);

playGame();

It is self-explanatory in what it intends to achieve but has grown very large and full of brackets. If somebody can help me make it work (since it doesn't), that would be swell. For now, the Codecademy console returns 'rock' for my choice no matter what I enter into the prompt. Cheers /wdg/.

>if (userInput = 'rock', 'paper', 'scissors') {
compare variables with "==" or "===", but not "="

read and apply
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
for a better way

Basically, anything that's CSS and not a HTML attribute has really inconsistent support meaning you can't use them.

It's like web design in late 90's, complete with table based layouts (which are essential). There's such a limited amount of 'safe' things to use that it's fairly easy when you get used to it.

sit there until you find the solution yourself you babbling retard. rock paper scissors is about the easiest thing you can make besides hello world.

there's enough shitty devs in the industry.

Yeah it doesnt work like thay sadly.

Just got hired for what I suppose is a full stack dev position. They had me doing QA on my first day to help me get familiar with the platform I would be working on. Today they had me spend the day tackling one of the simple bugs I reported. I have no idea what I'm doing. They're using ajax, JSON, Js, C#, SQL and some large database thing. I have no experience with any of these (only html, CSS, php, Java and Python) and felt really out of my depth.

What would you guys recommended I do on the side to help learn this stuff?

Here comes the spoon.
Open wide

function playGame(userChoice, computerChoice) {
if (userChoice === computerChoice) {
return 'The game ends in a tie!'
}
if (
userChoice === 'rock' && computerChoice === 'scissors'
||
userChoice === 'paper' && computerChoice === 'rock'
||
userChoice === 'scissors' && computerChoice === 'paper'
) {
return 'You have won!'
} else {
return 'The computer has won!'
}
}

var userChoice = prompt('What is your selection?').toLowerCase()
var computerChoice = ['rock', 'paper', 'scissors'][Math.floor(Math.random() * 3)]
console.log(userChoice, computerChoice)

if (['rock', 'paper', 'scissors'].includes(userChoice)) {
console.log(playGame(userChoice, computerChoice))
} else {
console.log("ERROR: BAD USER CHOICE")
}


this is still shit btw. :^)

I've been at this web development game for less than a week m8, cut me some slack.

Thanks guys. That code looks so clean and tidy, oh lord jesus

Why didn't you switch to the most reliable and powerful webdev language yet?

What would you use to setup a email delivery system from scratch senpai? I was tasked to do it later in July, don't know where to start. Do people use thirdparty providers or?

>cut me some slack.
no, you learn the hard way like the rest of us.

when a company wants to hire you think they'll cut you some slack? you need to become a problem solver and the problems you're having this early in your learning are extremely trivial shit like syntax errors and minor logical mistakes that are gotten within one glance at your code by any competent person in this thread.

lol don't listen to that pissed off guy, there's plenty of us here who are quite a bit friendlier than him.

Most of us will gladly help you out, as this dude has done right here but also, do take some time before posting to google your answer a bit.

Always feel free to ask though, your questions help us all! I've learned tons of stuff from other people here. When I get my first webdev paycheck, I'll spend it all on a night of hookers and blow, and I'll think of you, /wdg/, as I blow my load.

Start with JavaScript, from there you'll pick up on Ajax and JSON easily. If you know Java then you won't have much problem switching to C#, start with ASP.NET or whatever the fuck they're using.

How the fuck did they even hire you unless they expect you to suck for the first couple of months? I got hired for iOS development, also started from scratch but with Swift and the whole Xcode/Cocoa ecosystem. Took me two months or so to get accustomed to the API's that I was working and be productive. Good luck.

Thanks user

>How the fuck did they even hire you
No idea, I'm an intern just for the next 3 months. I was 100% transparent on my resume with what I could do, they never even interviewed me, just asked for a background check then told me to come in the following week.

Well shit if it's that easy I might as well just start sending applications left and right and hope something sticks until I've got more experience for an actually good job.

>I might as well just start
I have no idea why aren't you doing this already.

I'm

You "can" get hired with precisely zero web dev related skill as long as you have some prior tech experience that shows you can learn this shit.

I was hired as a C# dev because I've edited a couple of C# scripts back in my University days. A month later, I've built a standalone UWP application for universally monitoring Azure tables.
I've got hired as a RoR dev because "well, I was debugging an ASP.NET webapp back then" - a month later I was in a team building electronic commerce website.

There are quite a few employers who are willing to hire a barely entry-level worker and teach them (wait till they'll learn on their own) the shit required. And chances are, you'll be learning on a much faster pace when you're actually working.

build pretty, simple websites that focus more on looks and pizzaz than functionality

pastebin.com/raw/jgXf7RJc

is to determine if im searching for student or professor
My question is how do i add id from input field into url
This way when i click on search button i get mypage.php?student_id=
I know it must be something stupid im missing, been coding like 10 hours today


>i get connecting error when i try to paste code, thats why im putting it on pastebin

>focus more on looks and pizzaz than functionality

Hey it's dick, hows the site going?

no mozilla, stop it
is it so hard to make something, that doesn't make me embarrassed to use firefox?

youtube.com/watch?v=kDRmqabrmag
youtube.com/watch?v=C2_BQ0PhEM8

collinoswalt.com/games/buggy/

3d syntax highlighting

Put url into variable, concat textbox value and then redirect to that variable.

>Firefox: It's better now!
What an appallingly pathetic tagline

Possible to use websockets with a LAMP stack?

>run into problem that takes more than 10 minutes to figure out
>think "omg this sucks, why am I even doing this, do I even like wdg?"
>solve problem
>think "man I was just being a little bitch"

errytime.

what are you trying to do?

>colleague was on vacation leave
>boss told me to re-arrange some of his layouts
>

oh boy am I pissed fixing somebody else's bloatstrap

you job sounds menial AFtbhfam

when you are so slow you have to realize it