/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:

nodejs.org/api/modules.html#modules_modules
github.com/Praisebetoscience/openshift-cartridge-python-3.5
validator.w3.org/
developer.mozilla.org/en-US/docs/Web/CSS/transition#Browser_compatibility
caniuse.com/#feat=css-transitions
twitter.com/NSFWRedditGif

Haven't been in one of these threads in some time. What are you guys up to?

[Embed]

The more I work on complex SPAs at work, the more I want to just make and use simple sites. Anyone feel this way? I've been challenging myself to keep bundle size as small as possible and speed as fast (while trying to keep experience similar).

Previous because OP is a faggot

How do you pick good highlight and default underline colors? Any tips?

1. Pick a color
2. Make the thing that color
3. If you don't like the color, see step 1.

Uncaught RangeError: Maximum call stack size exceeded(…)

What are the advantages of using firebug? How to inspect an element while hovering?

>chrome

So yesterday I learned how to use "class" keyword with the help of /wdg/

BUT

When I tried to use it in a node module, I had no end of trouble.

Turns out node already does a bunch of scope protection as part of their module concept.

nodejs.org/api/modules.html#modules_modules

So I ditched the class sugar and it just works.

Are classes and node modules not meant to be together ?

If you inspect post divs on Sup Forums, you can see that the margin-top of of the bottom post overlaps the margin-bottom of the top post. How can one achieve this effect with CSS?

I have become very proficient at full stack development. What should I build to make money?

What ever the company is paying you to make

hey guys i have 2 pages made with flask, one that acts as the frontpage and the other one that works as some kind of admin or extranet for the first one.

the pages use their own views and models but they share the same database and this is starting to mess things up when i try to do changes to the schema.

so how could i merge these 2 pages into 1 database, 1 sqlalchemy model and 1 or 2 views files?

We can and will go further.

I love openshift but so many of their cartridges are out of date. I can't even get my Python app up and running because they're still using v2.7 instead of ~3.5

Do they have a free db tier, if so what do you get?

Anyone upgraded to Angular 2 RC 5? Breaking changes all over the place!

Then use thirdparty ones
github.com/Praisebetoscience/openshift-cartridge-python-3.5

They offer a lot for free.

what's a simple, performant (in the server side), retard proof shopping cart?

>RC
>breaking changes
Jesus.
Won't adopt that meme until it's final.
I'm hugging my Angular 1 as long as I can ;_; it's too comfy

What do I do for responsive image resizing on the client-side?

So im not front end dev and i need some "nice looking" quick and dirty ui (preferably small i really dont need huge frameworks), any ideas?

Ruby on rails is fucking ugly and coffeescript is even worse.
>CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.
Holy shit, fuck web developers

Is it important to be validated?
validator.w3.org/

why is it called web development is the is decidedly crappier than 20 years ago?

its still web development just shitty one... Something doesnt need to be good or better to be called web dev

>Are classes and node modules not meant to be together ?

Works for me. Are you sure you're following this pattern?


// foo.js

class Foo {
constructor (name) {
this.name = name;
}

sayName () {
console.log(this.name);
}
}

module.exports = Foo;


// bar.js

let Foo = require('./foo');

let jimmy = new Foo('Jimmy');

jimmy.sayName(); // prints 'Jimmy'

You could also instantiate the class as a singleton and then export that I guess, but there's really no reason to do that over just exporting a function or object literal, etc unless OOP gives you a hard-on or something.

Most browsers will render *something* even if you manage to fuck up the html pretty bad. That *something* will probably be something other than you intended though, and different browsers will try to fix your mistakes differently.

Who the fuck still uses coffescript? We typescript now.

Bootstrap?

>Who the fuck still uses coffescript? We typescript now.
both turned redundant by ecmascript

For a browser game with multiplayer should I just use codeigniter or a different language/framework? I'm pretty bad at javascript.

ECMAscript is literally just the official name for JavaScript. Typescript is a strongly typed superset that transpiles to JS. So no.

Paletton.com

>ECMAscript is literally just the official name for JavaScript
picrelated

I meant ES7 or even ES6

>being this dense
Again, the entire point of of TS is that it's strongly typed and transpiles to JS. It is also a superset of ECMAscript, meaning all valid ES is valid TS. Neither ES6 nor ES7 support strong typing out of the box. So...still no.

>should I just use codeigniter or a different language/framework?

depends on the game, but if it's real-time multiplayer, you'll probably want to use websockets, which I don't think codeigniter supports. Node would be good, or maybe Go.

>I'm pretty bad at javascript.

If you're making a browser game you pretty much don't have a choice but to use JS for the frontend.

It's turn based, not multiplayer. I've heard really good things about websockets but it seems like a huge jump, I've really only used rails and bare php for web devving before (I'm a student).

You are not limited to one class per module.

If you expect to refresh the page after each turn and not even use AJAX/Websockets, find a different idea.

Fucking with webpack took way too long.

// foo.js

class Foo {
name: string;
constructor (name: string) {
this.name = name;
}

sayName () {
console.log(this.name);
}
}

// bar.js

import {Foo} from "./foo";

let jimmy = new Foo('Jimmy');

jimmy.sayName(); // prints 'Jimmy'

/dpt/ here

Your threads are a joke and you will never get high paid jobs

Lmfao

you think refreshing the page after each turn is bad?

Jokes on you, I browse both /wdg/ and /dpt/.

Yes. Not only will it introduce additional latency on each move, but also FoIC and persisting any UI state will become much more problematic.

hmm I guess I should use ajax, unless you have any beginner-style websockets resources you could give me. I've never used ajax though, that might be more useful to learn.

Like Haskell will get you anything other than a grad student stipend if you're lucky.

Use AJAX as a start, but reading up on Websockets will come handy in the future. Note PHP is the shitiest choice for a Websocket backend, because it pretty much requires a stateful server, not a oneshot script.

what's the best choice for one then?

node

Go or Node are good picks. Each has its plusses and minuses.

I think I might use go because a friend of mine won't shut up about it and I've heard .js are memes.

Node is good for JSON APIs, which is a substantial part of all web backends. Not much else though.

If you're not using LAMP, you're a hipster.

>Not much else though.

Ehh, it's pretty good generally at I/O-heavy/CPU-light operations.

It's also pretty fantastic as a glue language since there's a library to support pretty much any weird database or peripheral out there.

What the fuck is a Webpack? Is that like a GRUNT?

There is hardly a need for a glue language these days with good statically-typed multithreaded alternatives like Go. Node's main advantage is JSON being native.

If anything makes you a hipster, it's using dusty old bullshit and parading it around like that somehow makes you better than everyone else.

I'm working on a shitty game simulator and I don't really know much about efficiency with JS prototypes, should I be concerned with nesting over and over?

e.g., in Typescript:
class GameManager {
Ally: GameTeam;
Enemy: GameTeam;
// constructor creates both the above
}

class GameTeam {
units: GameUnit[];
// constructor fills units[] with placeholder units
}

class GameUnit {
// blah blah, unit-specific stuff
}

What's the best php ide? No memes please.

Is it bad that my code is making me hungry? It looks like spaghetti

Vim

It should be fine unless you're making a huge number of units. And if you're making a huge number of units, you're using the wrong language.

good go frameworks to go with websockets?

phpstorm probably

net/http and github.com/gorilla/websocket

in how much time can you master angular.js?

t. knows javascript, jquery and PHP

>master

Trying to livestream music to a webpage through my server and also create a live visuliser based of of the music, can anyone point me in the right direction

I'm using react and redux. Would it be a bad idea to update the browser's url from a reducer?

Just use react-router

Do you want to LIVEstream it or just stream it? If you just want to stream an mp3 or something, that's easy. Doing it live is a bit more complicated.

I'd start with node.js streams. But that's because I know and like node.js best.

I suggest you start with Google, since I'm not sure what you want to accomplish

Anyone with WordPress experience can help me with some problems with the comment section on a custom theme I am working on ?

>installs wordpress
>puts effort into it instead of just using off-the-shelf plugins and themes

>cheap vps hosting in most western locations
everything listed under that is either shit, expensive, or both. i wouldn't trust 9/10 of the crap posted to lowendbox.com. the european vps dealers are probably the worst though.

You either haven't used any of those services or are just pissy

>Digital Ocean
>shit
>expensive

Pick one.

currently following FastRecord's node.js tutorial series, apparently it's a straight rip from the udemy course
I like it so far (only 3 projects in) but sometimes I feel like I have no idea what I'm doing

>I feel like I have no idea what I'm doing

This is normal in programming and in life.

I'm starting to hate coding because of my job.

Anyone else with a shit job? How do you cope with it?

Anyone that uses javascript as a backend for anything besides browser games should kill themselves on the spot.

who are you quoting?

I do.
I'm a software developer for 7 years now, I hate it.

But all the money. So easy money.

k

How long until it gets easy tho? I got a new job about a month ago and it's been fucking me up. They keep asking me shit that I'm not good at, or have me dive into legacy code of 1 million lines. I feel like a complete fucking retard. In my previous job I could get shit done easily enough.

>less than 30k
>good
ha

You must be new here.

no u. it was an [s4s] maymay.

Its entirely possible that you just work in a shitty place.

I've been in my job for about 6 months and I still like it and the people I'm working with.

What is it specifically that you don't like?

Noob here.
Can somebody maybe link me a good tutorial to help me better understand the firefox developer tools.
(Console, etc)

Also:
Do I need to include the "keyword" -webkit into the .css file when I want to use something like:
-webkit-transition:

(For different browsers there are different keywords and it is a pain in the ass to do it for everything)

Oh right. I don't subscribe to that subreddit.

>subreddit

>They keep asking me shit that I'm not good at, or have me dive into legacy code of 1 million lines. I feel like a complete fucking retard. In my previous job I could get shit done easily enough.

The codebase I have to work with is a clusterfuck.

What makes a codebase a clusterfuck or a pain in the ass to work with?
(Honest question)

>Can somebody maybe link me a good tutorial to help me better understand the firefox developer tools.

I dunno. Google it? Look on youtube. There's probably something.

>Do I need to include the "keyword" -webkit

developer.mozilla.org/en-US/docs/Web/CSS/transition#Browser_compatibility

That is MDN, its basically documentation for CSS and Javascript.

Under the browser compatibility you'll see if you need to include a flag or not. You usually do if its an "experimental" feature.

caniuse.com/#feat=css-transitions

This is another useful site, which will tell you which versions of which browsers support which features, and whether or not they need you to include the browser prefix. So for example Andorid Browser 4.3 requires the -webkit prefix.

Generally you might as well just include it for max compatibility.
Or you could use a CSS precompiler like SASS to make that process easier.

Thanks for the (You) upvote, friend :^)

>no standards
>no tests at all
>no dependency injection
>400+ lines methods
>5k lines "helper" classes
>1000k lines views with mixed JS (JQuery) and HTML
>ViewModels in the backend with fucking methods in them, instead of just being, you know, ViewModels
>Controller folders with a fuckton of them instead of using submodules
>"custom" css framework, because surely those fags at bootstrap don't know what they are doing
>no css columns framework
I can probably come up with more shit, but those are some of the issues.

Right now I'm doing a stupid attempt to contact a third party API that requires me to attach a certificate on the request (I'm a complete retard when it comes to security) instead of using API keys, secret, etc. so I'm running in circles.

Forgot the most important one. No patterns, at all. Anywhere. There are no clear layers, the viewmodels contain business logic and sometimes data access too.

Okay well is there anything other than the code? Shitty non-technical managers? A shitty culture that expects you to stay late to make up for unrealistic arbitrary deadlines promised by those retarded non-technical managers? The expectation to answer emails out of hours and effectively be on-call all the time? Stupid office politics etc?

If its just a shitty codebase then it might be good old Dunning Kruger effect, and that'll wear off in time.

How long have you been there?

People are nice, really nice, but there are no working hours so to say. On paper that sounds great. In practice I see people working more than 8 hours, so I've been having to work much more just to keep up. This can also mean that once I git gud I could work just as much as I need I suppose, but I can't see the light at the end of the tunnel yet. I know some of the other programmers have stayed at stupid late hours at times.

So far there have been no real deadlines, I was told to get something for this past Monday and I sort of did, but didn't get time to write up the test suite.

>If its just a shitty codebase then it might be good old Dunning Kruger effect, and that'll wear off in time.
I fucking hope so, user. This is as good as it will get as far as pay goes for me. My previous job was 1/3 the pay, but the codebase was a joy to work with 80% of the time.

I've only been her for about a month and a half so I'm trying to go for at least 4-6 months before I consider killing myself or bailing.

>hate non mobile friendly sites
>hate js
wat do?