/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/
>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] 2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developer
youtube.com/watch?v=sBzRwzY7G-k
> [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:

youtube.com/playlist?list=PLO-hrPk0zuI18xlF_480s6UiaGD7hBqJa
udemy.com/learn-nodejs-by-building-10-projects/
en.site.com/
en.wikipedia.org/wiki/Wildcard_DNS_record
trac.ffmpeg.org/wiki/Create a thumbnail image every X seconds of the video
darcyglennen.com/
twitter.com/SFWRedditImages

Front end is not programming

how could i snip an image off a video file uploaded to the server?

trying to save this image along with the video file. using php.

ffmpeg

is there any technology that will let me intercept HTTP/S traffic between the browser and the internet like a MITM local proxy but something more reliable

So I have 13 fucking checkboxes inside a page that registers an object (pushes it into an array).

That object has other atributes, but the checkboxes are the problem.

Right now I create the object and start loading it.
var c = {
"name": $("#name").val(), "id": $("#id").val(),
"country": $("#country").val(), etc, etc
};


I could go full nigger and them one by one
"atl1": $("#atlq").is(':checked'), "atl2": $("#atl2").is(':checked'), "nat": $("#nat").is(':checked'), etc, etc


But there has to be a better way

Find all check boxes in your container element and loop over them like so
const inputs = {}
for (let el of container.querySelectorAll("input[type=checkbox]")) {
inputs[el.getAttribute("name")] = el.checked
}

Gather all checkboxes, loop through and add them by name.

You're the reason Sup Forums is cancer.

Consider suicide, and I mean it this time.

Dropping by to mention that this playlist of NodeJS tutorials from the last thread:

youtube.com/playlist?list=PLO-hrPk0zuI18xlF_480s6UiaGD7hBqJa

Is actually this course:

udemy.com/learn-nodejs-by-building-10-projects/

He just added 2 more projects. So somebody just uploaded that to YT.

Definitely check it out. It's pretty good.

So /wdg/, my github has on it only a few shitty Wordpress themes, a blogging app that has an Angular front-end, and a few tutorial projects (mainly Rails and React.js). I also have a few freecodecamp projects on my codepen, all front-end.

What are my chances of finding a job in web dev assuming I live in a major tech hub in the US?

Also, the blogging app has an Express back-end. I plan on doing a couple more node.js projects before I start applying for jobs.

>vscode

yes or no?

primary use NativeScript (js) but always on the look out for decent php IDEs

fiddler?

I use it, it's perfect for me.

router.get('/new', function(req, res, next) {
res.render('new');
});

router.post('/new', function(req, res, next) {
// Get form values
var title = req.body.title;
var description = req.body.description;
var service = req.body.service;
var client = req.body.client;
var projectdate = req.body.projectdate;

// Check image
if (req.files.projectimage) {
// File info
var projectImageName = req.files.projectimage.name;
} else {
var projectImageName = 'noimage.jpg';
}

// Form field validation
req.checkBody('title', 'Title field is required.').notEmpty();
req.checkBody('service', 'Service field is required.').notEmpty();

var errors = req.validationErrors();

if (errors) {
res.render('new', {
errors: errors,
title: title,
description: description,
service: service,
client: client
});
} else {
var project = {
title: title,
description: description,
service: service,
client: client,
date: projectDate,
image: projectImageName
}
}

var query = connection.query('INSERT INTO projects SET ?', project, function(err, result) {
// Project inserted
});

req.flash('success', 'Project added.');

res.location('/admin');
res.redirect('/admin');
});

module.exports = router;


>Cannot read property 'projectimage' of undefined"

Anybody knows what is the problem?
I'm using multer.

if ('files' in req && 'projectimage' in req.files) {

}

Also, html (jade)

h2 New Project
form(method='post', action='/admin/new' enctype='multipart/form-data')
.form-group
label Title
input.form-control(type='text', name='title')
.form-group
label Description
textarea.form-control(name='description')
.form-group
label Service
input.form-control(type='text', name='service')
.form-group
label Client
input.form-control(type='text', name='client')
.form-group
label Project Image
input.form-control(type='file', name='projectimage')
.form-group
label Date
input.form-control(type='date', name='projectdate')
button.btn.btn-default(type='submit') Submit

And part of app.js

var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var expressValidator = require('express-validator');
var flash = require('connect-flash');
var multer = require('multer');
var session = require('express-session');

var routes = require('./routes/index');
var admin = require('./routes/admin');

var app = express();

var upload = multer({ dest: './public/img/portfolio/'});

Weird, tried it and when I click post, it just refreshes and clears the form, but it is not saved in db.

have your connection.query() callback return or console.log your err and result and see if anythings up.

I want to learn React but I don't know what I would even use/need it for.

Same. I went through some React tutorial and Thinkster and don't need it for anything.

How should I go with finding remote work/clients outside of my country? Let's say the US for example, I live in France but the situation here is shitty, webdev isn't valued (especially front-end), people want good job done for minimum wage. I believe my work to be quite decent (and I was never told otherwise).

show your portfolio

At least you have more available tools at your disposal for when you run into new problems.

Fuuuuuck, I always end up with some problem there is nothing about on the internet except for decades old stackoverflow answers with deprecated code. I'm stuck googling through dozens of pages and my head started to hurt... again.

Btw it just says 500 internal server error.

Jesus, why does this happen every time I get a will to do some webdev...

There's no reason to wait, start applying now.

I've never tried anything from udemy before, are the paid courses generally worth it at all?

...

This is a manifestation of your fear of success

in Sinatra, is there a way to ALWAYS pass some general parameters (say config vals) to the erb command?

hey Sup Forumsuys

If I make a iOS app and have a Node.js server with an API and host it on some VPS does that server have any reason to use a domain name? Or can I make all of the HTTP calls with just an ip address. Any pros or cons to either?

when your host ditches you for some reason you have to redeploy the app and hope everyone updates instead of just changing the domain records.

just get a domain, they cost like 50 cents per month.

in the following url:

en.site.com/

what do you call the "en." part?

en.wikipedia.org/wiki/Wildcard_DNS_record

... I'm not made for this. Still nothing.

Fug. It works now, finally. Nvm.

All you had to do is believe in yourself, user.

And by believe in yourself, I of course mean give up all hope.

Subdomain.

cecc

That aside, node is actually bretty comfy. I like having more control than I would have if I used something like Rails or Django.

Don't know if all these packages are worth importing, but I'm just following a tutorial atm.

sorry I don't follow Pokemon.

Actually I'm away from home at the moment, otherwise I'd already be applying to jobs while doing node projects.

Is it possible to develop the Next Big Thing as a white Pajeet with knowledge of Node, React and all the other webdev crap, but with lack of CS degree? And why is the answer no?

The answer is depends on if you are a lazy piece of shit with bad ideas or not.

how is that even a question
of course it is
if you have enough discipline and know how to google for stuff you'll get very VERY far.

I suggest you watch TheVerge's Small Empires on Youtube series (especially the first episodes) to inspire yourself a bit and see for yourself how others managed to do it.

What language should i learn for cross platform desktop programs?
C# with gtk#? Java with Javafx? C++ with qt? I want a desktop progam, that also runs without an internet connection

So /wdg/ I was reading about some productivity related stuff online to stop being such a lazy shit when it comes to web dev stuff and came across the old classic trick of getting gud, which is to study the works of a master in the field and it dawned on me. Is there a master in this field? And if there was how would one go about studying them?

Are there resources to see masters in this field or is it just the awwwards?

I'd also really like to see some great stuff at my level (which is garbage). Something obtainable for me.

How do you find awesome developers/designers to inspire you?

picture is not related.

>are the 'whatever gets the job done' kind of person?
Electron.js
>are you any other kind of programmer
anything else

Do any of you guys work with WordPress in the day to day or is it pleb shit garbage clients want that eventually fades away?

I'm learning some languages just for fun, but i'd like to make something useful. If i want to use electron, do i have to learn css, html and javascript? Do i need something else?

To be honest, i just need something that can connect to a local sql server. I heard you can make qt look nice with css, but html is ok too.

Is there an IDE\ editor you would recommend for html, css and javascript? Is atom a good choice?

The only reason i played with c# was because visual studio was nice

The masters are nothing special.

They just got off their ass and made a website.

The guy who made some viral website and the guy who made plenty of fish

Electron is pretty good. Another option is to make a chrome app.

> If i want to use electron, do i have to learn css, html and javascript?

Yes, that's the main reason to use it.

>Is there an IDE\ editor you would recommend for html, css and javascript?

Atom is pretty good. So is Sublime, Brackets, vim, emacs.

It's a cheap solution, so clients prefer it. Haven't come up with any problems with it, though it's easy to fucking ruin it by installing a shitload of plugins.

Hmm thanks I was just curious because it looks like almost all the entry level jobs are WordPress jobs, I was just wondering if senior folks deal with it too or if it's just something you hand junior devs.

Also get.

>C++ with qt?

You have no idea what you are talking about. You need a lot of time to tackle C++ and then also a lot of time to manage Qt.


>Java with Javafx?

Java is always the best for cross-plattform development.
But JavaFx is a little bit of a toy langauge. You can accomplish things, but it's missing some things.

Best go with plain old SWING, works everywhere.


>C# with gtk#?

Can't comment on that one.

echo exec("ffmpeg -i " . $target_file . " -vf fps=1/600 " . $thumbnail_dir . "");

I need help extracting an image file from an mp4 file.

$target_file holds the path to the video file.

$thumbnail_dir holds the path to an additional folder which would contain all extracted images.

I can already tell output is way wrong. What do?

trac.ffmpeg.org/wiki/Create a thumbnail image every X seconds of the video

can you help me with the php syntax?

I have no idea about php, but try this.

put the string into a variable and set a breakpoint before calling exec, check if the string is correct.
maybe you also need to use the full path of ffmpeg, not sure if exec has $PATH set, so try calling /bin/whereverffmpegis/ffmpeg instead

>work using spring (I know..)
>mess around in nodejs at home
>its actually fun

I thought node was a meme?

Considering it is a meme, and memes are only enjoyed by normies, maybe you're just a normieXDDD

you're a faggot.

>have job maintaining a node.js codebase that is in production
>one day learn that your livelihood depends on a meme

Why is the spacing off when I use Chrome's preview tool? It looks fine when I resize the window.

english, and a http||fr.***.com one is french

I want to make an online forum. Anyone know of a good resource for learning how to do it? I know I'll need MySQL for registering users, what else will I need to know?

PHP

ew, aren't there any modern forums out there?

bitch you don't know how to code and you're complaining? Fuck outta here.

>forums
>modern

Which database and why? Which noSQL?

Can someone kindly tell me why this won't work?

Use anything you like, but I hear Mongo is shite.

What is displayed when you load the file?

Different user. That vBulletin which is supposed to be packed with modern technologies sucks hard.

On OSX, when i press tab after html on sublime text, it doesnt automatically add the snippet,

neither do snippets work generally, yes i installed emmet and other packages

whats the correct shortcut?

I'm in the process of building a website that I expect will average about 10-20k users per day, but it might skyrocket above those numbers by a lot. The users will interact with each other in various ways.

Which SQL should I go with? I've heard about PostgreSQL's capability to manage many users but I'm just wondering if there's another alternative.

Among NoSQL RethinkDB, CouchDB and Riak are solid choices. Pick one suited to your task.

>that I expect will average about 10-20k users per day, but it might skyrocket above
How cute.

Mock my estimations all you want. I just need to know which db I should use.

Postgres is fine.

Is web development better for the person trying to start a business one day? More opportunities, right?

Are you asking if web development is a good freelance gig? Or if having a good web presence is important for your business?

Either way, the answer is yes.

I mean if its right to believe that with web dev there are more options to start a business whether that is launching a blog site or developing a web app or simply making a business out of creating sites for others.

I don't know much about strict programming. Not familiar with a lot of programs out there xept for the big ones.

There are plenty of web dev-centric business options, yes.

What does /wdg/ think about ASP.NET Core?

post css

Why is everyone shilling meme technologies?

What's wrong with simple HTML, CSS, Javascript, PHP, MySQL?

Cut out the PHP part and nothing.

Why? PHP is solid and everybody knows it. There is literally no reason to use another backend language.

Define solid.

Give me a better backend scripting language with proper C-like syntax and not hipster whitespace syntax and maybe I'll change my mind.

Why are you limiting yourself to scripting languages? But when compared to PHP even Javascript is a godsend.

>Why are you limiting yourself to scripting languages?
Is there another option?
>But when compared to PHP even Javascript is a godsend.
What makes JS better for backend?

>What makes JS better for backend?
Not that user, but PHP just feels awkward to write. I can't pinpoint any one thing about it I particularly dislike, but the whole thing just has a bad smell. Node is pretty comfy, especially using ES6+.

Go is one, if you are so adamant about C-like syntax.
Less pitfalls in the standard library, better performance, less stupid syntax like $variables and dot concatenation.

Can I get some critique on my first portfolio?

I know it's basically a simple slideshow, the images need to be replaced and I have no real work to show but how's the basic template?

darcyglennen.com/

P.S. Haven't gotten to test it on Safari/iOS, it might look fucked.

Any coding challenges involving React and Redux?

Can I echo in HTML like PHP in JS or Go?