/wdg/ - Web Development General

>Discord
discord.gg/wdg

>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

>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
pastebin.com/pDT82mQS
pastebin.com/AL6j7GEE

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

Other urls found in this thread:

w3schools.com/bootstrap/bootstrap_tooltip.asp
w3schools.com/bootstrap/bootstrap_popover.asp
css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/
jsfiddle.net/UNs9J/1/
grandmastreams.info/
jsnice.org/
blockadblock.com/blockadblock_basic_script.php
twitter.com/SFWRedditImages

Thanks nigga I couldn't find the thread at work.

Also, I have nothing to contribute.

what's the best way to make pop-up info boxes? I'm looking to click on a word and an attached info box pops up with some text. I'm using react if there's a good package for it

best book on Django?

Give it to me straight webs. Am I wasting time with Laravel? I am fairly beginner with php so I am learning it simultaneously with Laravel.

I recommend bootstrap

You can use either a tooltip to display something simple:
w3schools.com/bootstrap/bootstrap_tooltip.asp

or a popover for something more complex:
w3schools.com/bootstrap/bootstrap_popover.asp

No, it's perfectly normal to learn a framework first. I think in many instances you're better off for it

>Tooltips must be initialized with jQuery...
>Popovers must be initialized with jQuery...

lol

How does one get gud at angular?

I tried reading the documentation and even watched a few videos but I can't seem to hack it. Also the new lingo is making me all the more confused.

Yeah wtf is this? Isnt it enough to be just loaded like other scripts? Jesus fuck these js fucks

>something that needs only CSS
>defending that not only you need to load 3rd party libraries you also need to manually initialise the state of the functionality

lol

Why do you want to be good at it? Get good at plain javascript. When you do that you'll find that you don't need a framework.

fuck this world

Like there's 0 reason to use a javascript framework unless it's for something like animations. If you're trying to build some ultra complex GUI application where react/angular start to look like a good idea then do the world a favor and learn c++.

Welcome to big boy code

>big boy code
Bet you're certified in 70-483.

Because if I don't I might get laid off,
Up until now I used jQuery, ajax and php for requests, databases, backend but now we have a new TL and he told me I must learn angular

What should I do after I've learnt some basic javascript. I mean projects that I could do to improve and learn more.

How do I use a sqlite db in a flask project that needs to handle concurrent users?

>inb4 don't use sqlite
the sqlite website itself uses sqlite, and it has hundreds of time the amount of pageviews my website will serve (I already know that the daily users will be around ten)

Yeah I guess fucking Google is wrong for making Angular.
Get off your high horse you autistic jobless fucks from Sup Forums

>certified in 70-483
lolol I'm in the process actually

Watch out - sqlite is single-user-mode only.

Do really multiple users use this application at the same time? You could try a workaround by queuing the database actions and running them one-after-the-other through a service user.

Have you ever made a large app in js?

Their second most used product isn't even written in angular. I doubt they use it much for search either. Secondly that's an appeal to authority and not an argument. I'm not saying these frameworks don't have their purpose, they do, just like dreamweaver and wordpress. They let non-technical people prototype inefficient and insecure apps, something they wouldn't be able to do without them.

>angular is for non-technical people
>like DreamWeaverâ„¢
Yeah, just gonna have my designer go to town with angular XD
You've clearly never used Angular

kys

even if what you say is true and its not , it still is not enough reason for people write stuff in pure js because using these frameworks like angular is saving huge time for devs

It reminds me of that stupid blog post of the woman who doesn't know how to program and is mad she got rejected for a web development job: css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/

PHP guru's, want your opinion on this code. I think it works, gonna test it some more, but im trying to update some rows if they exist. If they dont exist then I want to insert them. Worth noting that removing the rows then re-creating them is not an option because i can't lose any data. I'm using an SQLite db.

$qry = $dbh->prepare("UPDATE ...");
$qry->bindValue(":replacement_num", $replacement_num);
$qry->bindValue(":item_num", $item_num);
$qry->bindValue(":part_letter_control_num", $part_letter_control_num);
$qry->bindValue(":part_letters", $part_letters);
$qry->bindValue(":comments", $comments);
$qry->bindValue(":control_num", $control_num);
$qry->bindValue(":height", $height);
$qry->bindValue(":width", $width);
$qry->bindValue(":depth", $depth);
$qry->bindValue(":is_direct_import", $is_direct_import);
$qry->bindValue(":id", $id);
$qry->execute();
$qry = $dbh->prepare("SELECT changes();");
$qry->execute();
$numOfChanges = $qry->fetchColumn();
if ($numOfChanges == 0)
{
$qry = $dbh->prepare("INSERT INTO ...");
$qry->bindValue(":replacement_num", $replacement_num);
$qry->bindValue(":item_num", $item_num);
$qry->bindValue(":part_letter_control_num", $part_letter_control_num);
$qry->bindValue(":part_letters", $part_letters);
$qry->bindValue(":comments", $comments);
$qry->bindValue(":control_num", $control_num);
$qry->bindValue(":height", $height);
$qry->bindValue(":width", $width);
$qry->bindValue(":depth", $depth);
$qry->bindValue(":is_direct_import", $is_direct_import);
if (!$qry->execute())
{
http_response_code(404);
die();
}
}

guis
what nodejs do?
also how to get gud at js

I read it.. She was mad that they expected programming ability from a position with the word, "design" in it. The title was, "UX Engineer/Interaction Designer". I can't blame her. There are jobs where "design" or "UX" is in the description and I don't know whether to apply or not because I'm strictly a developer.

I just took the code school course.. was bretty gud. But there are lots of courses probably

i have a bucnh of courses i got for free but they are not in depth ;-;

what depth are you looking for? What are you looking to do with it?

idk, some real life js based apps
pretty clueless how to approach problems
js functions are intimidating ;___;

these are what i have

I know the codeschool one walks you through building a socket based chat app. That's a good application of node

js is the easiest programmming language user

...

how many web apps out there do you think are running on pirated windows server for iis?

jsfiddle.net/UNs9J/1/

it is

extremely high level and untyped

The best way to learn a framework is work through a couple or 3 tutorials.

I think I would have found Angularjs (i.e. Angular 1) to be particularly awkward if I hadn't had experience with a lot of the concepts beforehand. The way that Dependency Injection and Scope are handled in Angularjs *looks* awkward because of the limitations of vanilla ES5.

That being said, I think I would have understood things more quickly if someone had just straight up told me:

"AngularJS abstracts scope. Rather than using Javascript's scoping, each component should keep all of it's things in the $scope object that it is provided. This just makes it a lot easier to keep things organised and make sure that components aren't reaching across to other components and fucking with eachother in a disorganized manner.

"Dependency Injection is basically just a next-level factory pattern where you only use a single, global, omni-factory. You tell the factory what to build (in AngularJS you do this by giving it the name -- as a string -- of the thing you want. Avoid `new`."

>js is the easiest programmming language user

scrub detected

lol k

Why does /wdg/ constantly die?

Does anyone have a good resource to learn elixir or Erlang?

>C++
>GUI
>Webdev
Unless it's compute heavy it's a retarded idea.

I'm going through Colt Steele's udemy webdev course right now. I got it for $10 but I think it's $15 right now, definitely worth it if you feel like you are grasping concepts but are unsure of how it all fits together in the big picture. He does a pretty good job of leading you into topics while providing real world examples. When I was going through FCC I was grasping concepts but when it came down to writing my own I was like "ok how does this actually come into play and when do I use it". The real benefit of the course was his JS sections and the projects that he has you do. I got a real good grasp of functions after I finished a few of the more lengthy projects. No shill, just found it genuinely helpful.

>Colt Steele's udemy webdev

that shit's $200, at least for me. Just gonna torrent it desu

So I'm learning node and I can't seem to wrap my head around some of the callback and filesystem stuff. Anyone have some links to some decent resources that explain some of this better?

Post some shit you have a problem with

Other than Armstrong's boom and Erlang/OTP in Action, no, not really.

After these books, reading source should be able to satisfy most of your learning.

For Elixir, learn Erlang first, and if you can grok that you're probably at a point where you can pick up Elixir through hacking (as it's 90% the same semantics).

nice post user
thanks

I'm doing the learnyounode stuff for FCC on cloud9, and basically I've never used an callback function before and the explanation they gave me is pretty vague beyond "It's asynchronous!".

Opinions on web dev v.s. system administration?

sys admin seems like it may be more interesting.. I also am under the impression that sys admins have the potential for a lot of autonomy, but this also seems like something web devs enjoy as well.

all udemy stuff goes on sale for like $15
not that im trying to tell you to not torrent, but yeah the $200 price is just so the $15 sale price looks so much better

The main website if you're just starting out. It's really well documented, and they have a tutorial for a questions app that will get you all the basics.

Node backend frameworks?

Two different things, user

They could complement each other in great ways

>"It's asynchronous!".

It sounds like you're unfamiliar with the idea of the Event Queue, which is really crucial to understanding how JS works and why JS can be really nice for certain applications.

The Event Queue is a First-In-First-Out collection of functions to be called in the future when the current call stack is exhausted.

Each function is executed whenever the current function finishes executing.

As an example, there exists a function called `setTimeout`. It accepts 2 arguments, a callback function and a time in milliseconds. What it does is wait for however long you tell it to wait, then it appends whatever function to the event queue.

So if I wrote:
================================

function barf(){ console.log('barfing'); }
setTimeout(barf, 0);
console.log('farting');

================================


I end up with the following output:
================================

farting
barfing

================================


By setting the timeout to 0ms, I'm telling the JS interpreter to immediately append `barf` to the Event Queue. This allows the interpreter to continue onto the following line(s) of code and execute them, then once it's run out of things to do it will execute whatever function is up next in the Event Queue.

The Event Queue is SUPER HANDY. Suppose I wanted to make some AJAX request to grab an image. The request is performed by native code, outside the interpreter. The interpreter provides the `XMLHttpRequest` API so that we can give instructions to that native code. When we do, it could potentially take a long time to go get that image. We don't want our whole program to stop while we wait for that image to download, so we provide the `XMLHttpRequest` with a callback function that will be appended to the Event Queue when AJAX request is finished and will be executed once the interpreter has run out of other things to do.

Yeah that's not a great explanation. Its literally just a function passed to another function that gets executed at some point. Neither function is necessarily asynchronous

Note that Javascript provides lots of nice features for Asynchrony, but not concurrency. Javascript is, BY DESIGN, single threaded and each line of code is executed sequentially. The Event Queue allows us to delay execution of code, but that code is not execute simultaneously with any other code.

>Its literally just a function passed to another function that gets executed at some point

This is a much more succinct answer than mine, but I do want to emphasize that its typically not just "some point." The callback will be executed upon completion of some task, often one which is being performed by native code, outside of the JS interpreter.

This break down really helped! Being relatively new to javascript, I have never actually had to think outside of single-threaded processing yet.

These helped a lot, thanks!

how the fuck do I find clients?

>Jquery
>Big boy code

Are you Indian?

In MySQL or pretty much any SQL db is SELECT count(field) ... any faster or slower than SELECT field ...?

What is the best platform to start a new project in 2017? I am now considering node js, but since it is a new project and it is my own I may aswell learn something new.

Upwork, but be prepared to outbid poo in the loos doing work for a buck an hour

pajeets gtfo of this thread

...

A callback function is a term use for convenience,

A callback function is called after a function completes it task,
Example 1:

Suppose ur make a function that sends a request to an api thn u want to return tht data into a variable, a callback function is called only after tht request is made n finished

REEEEEEEEEEEEEEEEEE

What is Facebook's game with react? Is it possible for them to fuck people over?
Can they spy on you through their framework and data mine you?

I know they're not doing this shit for free. What the fuck is their game?

It's fine! Don't worry about that LICENSE.md :^)

It must be horrendous to be that retarded, honestly, truly.

anyone here 1337 at JS deobfuscation? what is this snippet doing?

> view-source:grandmastreams.info/

have you tried anything like this? jsnice.org/

You're fucking retarded, but if you want to know the real reasons why Facebook does it:

- LICENSE.md
- Improves their engineering reputation which makes it easier them to hire top talent, among other things.
- Makes it easier for them to onboard new engineers into their way of doing things (because everyone else is already doing it)

...

What are good ways to obfuscate it? Not that I will write anything worth stealing anytime soon but it would be nice to know how.

>people catch on to h1b fraud
>make 'framework' that makes throwing together crappy but passable 'applications' easy enough to teach retard
>open code 'bootcamp', flood industry with retard
>salary drop
>5 year later
>google, facebook: "these frameworks are joke, if you don't know how to program, you're fired"
>lose crappy useful idiots, keep talent but at half the salary

...

it's from one of those spammy ad networks that they use on porn sites

1. If anything I think React makes application development much more complex. Especially when you factor in state management, immutable paradigms, and server-side rendering.

2. Companies like Facebook and Google interview on CS fundamentals, not frameworks. My guess is you've never interviewed at a company like that before otherwise you wouldn't make such a retarded statement.

3. These companies don't give a shit about H1Bs for the reasons you're implying.They already pay engineers 300k+ base.

TLDR: You are a moron.

wow nice work

what tool / technique did you use, for future reference?

nvm, googled a string in the code

blockadblock.com/blockadblock_basic_script.php

>nvm
oh

whats with the license.md?
So let's say I made a github repo that uses react, how do I deal with it?

You think every engineer at google is getting paid 300+? holy shit you are a retard.

I'm trying to read the reactjs docs on how to change the state but all I got are clock/timer examples!

Do they really think that I'm doing a spa just for a goddamn clock? I hate clock/timer examples!

fuuuuuuuuu!

real world app development yes, very complex. it wasn't designed for that. it was designed for prototyping fluffy todo list apps to put on your github and get a job and flood the market.

there isn't any single "engineer" position at either google or facebook. the interviews vary depending on position like any other company or organization. either way, those 2 companies aren't the only companies that set salaries. they're flooding the industry with no talent, not themselves.

you're an idiot if you think google is paying every engineer over $300k, you're an even bigger idiot to think that they WANT to pay a single one of their engineers over $300k.

learn typescript
make a simple web game

appreciate it, the only thing preventing me from making it myself is the fact that a popover done at the top of the screen should be positioned differently from a popover done at the bottom of the screen

wish i heard this when starting out on ng1

btw, if you haven't started ng2 + Typescript give it a shot. it's legit

10/10 ty user

Uh. React was designed for facebook's use case which is definitely not as simple as a todo list app. So you're dead wrong right off the bat.

There isn't a single engineering position at Google/Facebook, but for FE/web development there is more or less a single role at both companies that encompasses this, and they will both interview you on CS fundamentals. They will likely ask you very little about frameworks.

I didn't say Google/Facebook was paying every engineer 300k, but for senior engineers it is not uncommon.

I love seeing salty old developers whine about React, because it shows they can't actually bring themselves to learn and understand it. It's easier to embrace the cognitive dissonance than admit that they themselves are sub-par engineers who probably learned a lot about one specific older technology and now cannot move forward. So instead they try to poke holes and create scapegoats for the way that the industry is clearly going. lulz

you've been programming for 4 months. you are not qualified to make those statements

so salty

im not sure if theres a pure css way to do it, but i guess you could use scripting to change the hover styles based on cursor location