/wdg/ - Web Development General

Moot was a web developer

Previous Thread:
>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io
Start your own project, no better way to learn and stay motivated.

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtu.be/Zftx68K-1D4 - Web Development in 2018

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS

Attached: who.png (1280x720, 652K)

Other urls found in this thread:

youtube.com/watch?v=Ttc5AXUOcFQ
github.com/emdiet/WebRTCConnection.js
github.com/webrtc/adapter
expressjs.com/
youtube.com/watch?v=vSnCeJEka_s
youtube.com/watch?v=ame2PH67gnk
twitter.com/NSFWRedditVideo

Sublime Text or Atom?

snacks was the dev
youtube.com/watch?v=Ttc5AXUOcFQ

Sublime

200+ line constructor in jabbascribbd, and it's not even done

kill me pls

what for?

webrtc connection

Attached: qq2.png (1037x847, 69K)

Tell me about Electron.

What are you using it for? I've always wanted to do something with webrtc.

for what?

>take stupid idea
>implement it the single worst possible way in existence
>refuse to admit that you were a complete moron or try to fix your mistakes
>Electron

>just put your app inside browser dude

real working Zeronet for the actual Interweb

do you understand how the webrtc handshake works yet?

is there any way to further shorten/simplify this code? inb4 jQuery and the pajeets

addEvents: function () {
document.getElementById(this.btn_prev).addEventListener("click", () => {
this.flip();
});

document.getElementById(this.btn_next).addEventListener("click", () => {
this.flip("next");
});

document.getElementById(this.pageSelector).addEventListener("change", (event) => {
this.showItems(event.target.value);
});

document.getElementById(this.perPageSelector).addEventListener("click", (event) => {

});

document.getElementById(this.pageJumpBtn).addEventListener("click", () => {
this.pageJump();
});

document.getElementById(this.pageJumper).addEventListener("keypress", (e) => {
if (e.keyCode === 32 || e.keyCode === 13) {
this.pageJump();
}
});
},

Best stack:

Flask backend
React frontend
Postgres database

Suck my dick phpfags

don't know JS very well, but can't you use something like (this is probably wrong)
function foo(a, type, thing_to_call) {
document.getElementById(a).addEventListener(type, () => {
thing_to_call();
});
}

addEvents: function() {
foo(this.btn_prev, "click", this.flip());
foo(this.btn_next, "click", this.flip("next"));
foo(this.perPageSelector, "click", this.showItems(event.target.value);());
foo(this.perPageSelector, "click", this.pageJump());
foo(this.pageSelector, "change", None);

document.getElementById(this.pageJumper).addEventListener("keypress", (e) => {
if (e.keyCode === 32 || e.keyCode === 13) {
this.pageJump();
}
});
},

i dont know shit about java
what is the equivalent of node+express? I need to create a simple webapp with a sql database

Attached: 1443386801596.jpg (300x300, 21K)

Vim

servlet and hibernate

Looks interesting. Im going to try it. thanks

would this work?
for(let item of [
[this.btn_prev,"click",this.flip],
[this.btn_next,"click",() => this.flip("next")],
[this.pageSelector,"change",(event) => this.showItems(event.target.value)],
[this.perPageSelector,"click",(event) => {}],
[this.pageJumpBtn,"click",this.pageJump],
[this.pageJumpBtn,"keypress",(e) => {
if (e.keyCode === 32 || e.keyCode === 13) {
this.pageJump()
}
}],
]){
document.getElementById(item[0]).addEventListener(item[1],item[2])
}

vscode, though Atom is fine too I guess

Assuming I study Data Science and ML (I already have a solid background in Linear Algebra and Multivar Calc and Python), would it be easy to get freelance jobs that can be done after work hours and during weekends?

Sublime is very nice desu, and doesn't crash when opening large binary blobs or log files

not really

upwork or similar sites are filled with pajeets doing your work for pennies

what you might, maybe, be able to do is work for local faculties. I often got jobs from the psychology dept (mostly sempai, how2 matlab pls).

Everything is possible.

No I don't. Never really got around to digging into it. Want to learn, anything you recommend?

>flask
Slow as fuck bro.

it worked thanks

Attached: werks.jpg (734x508, 144K)

>Slow as fuck bro.
post your stack

How many of you use css variables? It's pretty comfy and powerful at the same time.

When I started out I had to reverse engineer the toy examples to understand it. Then I built an MWE to serve as future reference:

This a full example handshake from my toolbelt. use chome for best results

github.com/emdiet/WebRTCConnection.js

if, in the future, you wanna make it more compatible, you may need to use the adapter

github.com/webrtc/adapter

this, along with the moz docs should be enough to get you started.

There might be better tutorials out there nowadays but when I look at all the bullshit you have to wade through at e.g. tutorialspoint until you get to the meat, idk.

Attached: 6719169.png (460x460, 24K)

Not him but, how much do those pajeets charge for Intemediate and Expert-level jobs?

i only read recently, that css variables are actually reactive and not just pre-processed, when the stylesheet initially loads, which seems really nice.

Way too little. Seen people who do "expert" stuff for $15-20/h. It may sound like a meme, but you do have the cultural upper hand on rajesh though. They simply can't make things that people are meant to use. I've done some product development projects with Indians and, god damn they are bad with the more soft skills of development. They think everything can solved by data and calculations.

10-20 bucks

but the real problem is a lot of platforms don't even let you sign up anymore, even for "expert level" jobs.

Yeah, and css variables make it really simple and easy to create a consistent css architecture and a modular approach with minimal code. I would recommend it to everyone dealing with the frontend to try it if they haven't already.

If I were to choose among meme frameworks for small mid size project I'll probably go with nodejs.

Is this your repo? I'll try it out. A screen sharing project would sound good when I've got the basics down. Implementing it anywhere real-world is going to expensive I would think.

> but the real problem is a lot of platforms don't even let you sign up anymore, even for "expert level" jobs.

Could you name some of these platforms? I've heard that Upwork started to reject applicants some time ago. I don't know of any other.

>Could you name some of these platforms

upwork. haven't tried anything else.

Node.js isn't a framework

have you heard of vert.x? would that work?

>this guy again

nice

downwork

wut

Yeah I meant express or whatever new stuff that's better now.

In that case, it isn't a great loss. Upwork's terrible. Huge fees and 95% of projects are trash and there was a number of horror stories from some freelancers about accounts getting terminated for no reason and rude support.

>vert.x

i have not. I don't know if it meets your requirements, but it seems interesting. maybe overkill for what you (or the other guy) is trying to do.

>Is this your repo? I'll try it out. A screen sharing project would sound good when I've got the basics down. Implementing it anywhere real-world is going to expensive I would think.

yep.

if you aren't too concerned about security you might be better off using some other libs, instead of using the api directly.

screensharing like teamviewer? might not be as hard as you think, as long as you don't overengineer it. you can send video straight through a video channel, there isn't much else you need to do on the recipient side.

Could someone explain to me in a simple manner what serverless means?

serverless means that the developer is not exposed to the nitty gritty aspects of hosting.

you are running your webapps in environments that don't care how many concurrent users you have, how much CPU time, RAM or HDD space you need, regardless whether you have 10 users on monday, 1000000 on tuesday, and 15 on wednesday.

lol

Not the pajeet guy, although he's not wrong. But even amongst primary English speakers, there's a saturation of developers. And they all come with much more experience than you do.

Now, I'm not saying it is impossible. All I'm saying is, if you're asking this question and "studying" you're probably a somewhat beginner programmer. And these guys have been at it for years. It will take you just as many years to make a legit living out of it.

You're better off getting a corporate job, and gaining some experience. You should be at a point in your career where working with someone more experienced than you will expose you to many things you don't know.

tl;dr You are bad at programming; don't.

What are you using to generate comments? ex:
/**
* complete a connection
* @param {String} sdp
* @return {Promise} void on successfully established connection
*/

Or do you just type it manually?

Oh, I see, thanks! So, it's basically delegating the server part to 3rd parties while allowing the developer to focus on the coding part. Got it.

Wouldn't using an existing lib be better security wise? I need to get basics down before doing anything though. Screen sharing just off the top of my head. What are some interesting uses you've come across with webrtc? I have never had to use it anywhere til now.

What do you think about costs?

I'd love to and also transitions as well.

I'm aware that it's considered a good practice to drop semicolons in JS because if you write good code then semicolons are redundant, but man I just can't. It feels so wrong.

Removing semicolons is like writing a sentence without periods " . "

bad analogy

>Minification:
If you happen to minify a JavaScript snippet that doesn't explicitly end the statements with a semi-colon character, you might end up having a hard time trying to figure out what is wrong with a snippet that was just working before the minification and now doesn't work.

>Ambiguity:
Semi-colons are optional, true, however by eliminating them from the source-code, you might leave some ambiguous scenarios to the parser to decide on its own.
If you are writing a 100 lines of code for an online shop, yes, maybe it doesn't matter, but more serious tasks would require a 100% clarity.

That's exactly how I feel about it but apparently, it makes me a bad developer.

in your ide, just type /** and hit enter above a function

I don't know. You have to do that analysis for yourself.

what are your threats, and what do you stand to lose.

The reality is that a lot of libs are never audited or reviewed. I don't know how easy it is with node or js, but in PHP it was pisseasy to install a backdoor into a module or plugin, and no one would ever figure it out.

the worst that will usually happen in clientside vulnerabilities is probably account hijacking. is that apocalyptic for your project? it is for mine.

costs:

hosting costs with webrtc? virtually nothing.

development costs? only your soul :°)
that really depends on how good a developer/manager you are

I understand that however according to many articles and some "big" voices in the JS community, tech talks etc. etc. provided that you write good JS code then there should be no ambiguity or any errors even after minification.
Regardless, I don't think I will be dropping semicolons, it just feels too odd.

Frankly PHP is miles ahead in this region, because NodeJS has a situation where it's normal for a library to have six layers of its own dependencies that noone can ever review.

It really doesn't matter all that much.
It's like spaces vs tabs.
Even if you deal with code that uses a different style, you are just one Ctrl+S away from your linter autofixing it to the style that you use.

And even those cases where you need a semicolon, like the next line starting with "[" or such, then your linter will notify you, if you don't notice it right away yourself.

Attached: 5SPXph.jpg (750x744, 186K)

Hello guys!
I'm currently learning mongodb and looks like I need some RESTApi
Where can I download that thing??
NPM installing some kind of modules but I can't get how to run it

Express?
expressjs.com/

REST API is something you make, or use, not something you download.

it's like asking where you can buy html.

Web has always been about code resuse now you can reuse you web code in a desktop app

Which is your javascript templating library of choice (underscore, handlebars, nunjucks...)?

What's the reasoning behind dropping semicolons?

Nunjuncks, but haven't tried any other.

Webpack and ejs

It supposedly enforces good practices.

>tfw job provides lynda and pluralsight for free
>tfw nothing left to do for the current sprint so just watching lessons unrelated to the current project so I can do freelance work on the side in my meme MEAN stack

Noice, I like nunjucks too though at work I've used mostly either pug or handlebars.

Interesting. I've heard a lot of praise about ejs but I just couldn't get over the syntax.

It really enforces nothing at all. I've never seen a strong argument one way or another.

Personal preference. Some people say the code looks cleaner. I always have semicolons, but only because it is pretty much muscle memory for me.

>nothing left to do for the current sprint
doesn't sound very agile
youtube.com/watch?v=vSnCeJEka_s
(it's an interesting video by itself.)

I unironically use Vue even for simple templating, because single-file-components are super nice to use and I also really like the HTML templating directives.
Then just prerender the components into the final HTML output.

Pug as a secondary choice I guess.

semicolons should be optional
parentheses in control statements should be optional
curly brackets should be optional (when proper indentation is used)
operators should be up or downgradeable (evaluate /+ before *, or + before /-, ).

Semicolons are optional from an interpreter perspective. The parens/curly bracket argument is basically Python. The operator thing is asinine imo. Certain things like the associative properties of an operator have no truly good reason to be changed. Changing it adds zero benefit and adds overhead both to the compiler as well as the reader.

Honestly, I think none of those things belong in any language, because the more stuff that is "optional", the more irregular the coding standard for the language. Moreover, it makes writing decent compilers that much more of a pain in the ass. tl;dr: I respectfully disagree.

>doesn't sound very agile
I'm not complaining as long as I get paid the same
Last couple sprints were very busy, we created only a few user stories because we were unsure how long it would take since we're all still not 100% familiar with the framework, but it only took a week, testing and all for the component. So we're working on the "framework training" story which is just following tutorials and doing scratch projects to understand what we're doing. We'll probably come up with actual stuff to do at the next stand-up, but there's nothing else for now

argumentum ad laziness

Call it whatever you want, doesn't make the points untrue. Languages are designed by people. Compilers are written by people. Code is written and read by people. Good design, from a language perspective, is something where all of these things can come together without too much friction. By adding a ton of "sometimes this way, sometimes that way" to a language, you inherently blow up its complexity, and for no tangible gain. If you had an argument as to how any of those things give someone an actual benefit, something worth the complexity, I'd probably agree with you. Look at the pipeline/partial application proposals in the TC39 pipeline already. They add additional syntax but provide meaningful functionality. What does what you're proposing provide?

>Moot was a web developer
well that explains a lot

Attached: you lost the game.jpg (768x1052, 183K)

Alright, so I've been learning the basics (HTML/CSS/JS/React/Bootstrap) and all that for a good while now, but I still have no clue on how to make a site looked polished with smooth transitions and shit like that. Where should I start looking for general design stuff like working with CSS preprocessors and flexbox vs grid?

My interest are more in the backend but I'm sick of my sites/projects looking like they're barely out of the early 2000's.

Attached: nicebuttersnigga.jpg (1200x900, 249K)

>Stealing nipsites code
>Re-purpose it as your own
>web-development
Oh brother.

Attached: meirlerrday.png (542x512, 52K)

There is so much hate for Node.js on this board

I don't get it

>Netflix
>Paypal
>LinkdIn
>Walmart
>Uber

they all use Node.js
is this like a running joke between you guys?

Attached: 1518651081496.jpg (540x720, 49K)

youtube.com/watch?v=ame2PH67gnk

that's fair

1) optional semicolons:
semicolons aren't required when you write a statement per line. however, you should still be able to have multiple statements in a line. if you want to do that, use semicolons.

1) python indentation is obviously superior to javascript brackets, because the });}); you often find in javascript are, imo, unreadable.

curly brackets do however still need to remain, for the minification processes, and to allow multiline lambdas (lambda as objects)

2) parentheses in control statements:
"if (a >b) {...}", what's the point of the parentheses? they don't add any meaning. as in python, use a colon: "if a > b : ..."

3) operator upgrades:
syntax is just an example, but the idea is to reduce parenthetical clutter. this reduces "if ((a+b)/(c-d)) > e" to "if a+b /- c-d > e:

>stealing code for web development in 2003
moot was ahead of his time, really

probably spent more time networking desu

Walmart's use of NodeJS is trivial (ssr). Their heavy lifting server side code is on the JVM w/ Clojure.

I personally don't have anything against NodeJS. It's easy to onboard people with and the performance is fair enough. Horizontal scaling works great as well.

okay.

That does not explain the hate. It's functional enough to be used by big corporations.

thank (you)

There is no magic quick solution.
You just build things and get better.
>ayy
>reddit humor

Attached: Bjarne-Stroustrup-Quotes-1.jpg (2000x872, 110K)

I'm sure if you posted a site or an image of what you're making people would happily rip into you and tell you what's wrong.

Is there hate? IMO Node is comfy af.

Which is the best source to learn node aside from the node official docs?

nothing to learn, just do it

it just werks

i think user might be confused
there's hate for everything except the nichest of niches on this board
node is included but in general it's not hated at all

NPM is psycho sjws though.

WebStorm

literally doesnt matter tbqh

NPM is a package manager and run time environment?

how is it different from yarn?