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

eloquentjavascript.net/10_modules.html
hackerrank.com/challenges/summing-the-n-series
electron.atom.io/
twitter.com/SFWRedditImages

Long time ST3 user here, I want to use a new editor with better git support.

The avaliable options are:
- vim (neovim)
- atom
- vscode

what do you mean by "git support"?

I use Sublime Text as my primary editor and there's a great extension called "Git Gutter" that marks uncommitted changes by highlighting the line number on the left side of the screen.

You can also hover over the highlighted numbers to show a popup of what the code was like in the last commit so you can compare.

Oh, you just said you use SublimeText. I'm an idiot.

Any of you guys have experience making a news aggregation and / or blog site?

should i just use word press?

Yes, i've been using git and git gutter shortly after discovering package control.

Git support is the main reason, but also want a quick config setup. Getting sublime linter with some node es6 packages takes its time.

I've heard that setting a vimrc takes its time but it does not futher need a lot it mantaining.

The other two text editors came with some functionality that I like, but they are kinda slow 'cause fucking electron. However if that improves my workflow, I'll settle for one of those.

PLS NO WORDPRESS

why though?

I've never used it tbqh but if it's the simpelst solution to get something up and running I dont see why not?

As mentioned I havent used it so I dont know fully what it is / isnt capable of or good for

Well user, it has a lot of pluggins, themes with wysiwyg and it can be managed by the customer...

> but

If you start using it cause its fast to set up and saves you a lot of work, there is no coming back from that monstrosity. You'll be developing plugins and themes that will never be used, you'll try to use it for everything that you can think of, even for your own stuff. No APIs, no Web Apps, no websites... just WordPress.

Use it carefully, user.

atom is great but slow even on small projects. I love it but its slow and deserves to be abandoned.

which module code generation option do i use for a browser extension for modern browsers and where do i get a library that supports loading modules in that way (assuming that's how it works)

i looked at requirejs but it seems to be 2000 lines of ie/opera/playstation 3 compatibility code with the actual module loading code nowhere to be found

(that's probably like ten times the lines of code needed for all a module loader should do)

it seems like everyone else on the internet was born knowing everything about module loaders but they're not telling anyone else

i just want to use modules without waiting another year or two until browsers actually support them

Just use CommonJS modules

but wait

> i just want to use modules without waiting another year or two until browsers actually support them

dafug are you talking about?

>dafug are you talking about?

using the es6 module syntax in typescript

it turns it into module loader modules

i'll look at commonjs

Thanks user

I read somewhere that it could not handle large files (10 MB), so atom it's out of the question.

typescript doesn't wrap generated commonjs module code in a function or anything and i don't know how requiring them like that would work

does it fetch and then eval them or something

because that sounds stupid and chrome extensions forbid eval anyway

f*ck it i'll just have everything in the global scope and make a mess of their dependencies

Ohh I see. Thought you meant general module support instead of es6 modules.

You may want to read a little about this:
eloquentjavascript.net/10_modules.html


Also RequireJS is using AMD.

Read the link here
Also, don't you now about
new Function()

>new Function()
that counts as eval to the content-security-policy

Bundle them, then.
Maybe webpack can help ya

>wake up
>it's 2017
>there is literally a GORILLION of webdev tools
how
what should I
help
where do I start. I can into php and js (vanilla, I guess)

i'd like to avoid adding another build step when typescript already supports several module loader formats

Good old stable HTML/CSS/ a bit of browser vanilla JS / PHP if you want sanity. And a job

RTFOP

>Also

Three questions user

Backend or FrontEnd?
PHP or JS (or other)?
Hipster?

Thanks guys.

>RTFOP
Reading right now. Just so overwhelmed I needed to post, sorry

>Backend or FrontEnd?
Preferably both? I guess I will start with frontend stuff which seems more alien to me. Not new to programming (C/C++)

>PHP or JS (or other)?
I don't have a preference. Whatever works. I assume PHP is still the king, right?

>Hipster?
Not really

>I assume PHP is still the king, right?
Where were you?

hello world

start with front end, then slowly integrate backend. start with small projects, ex: creating a nice login page (front end) then attaching a functional db to it(back end).

php is for comfort but nowadays js frameworks are in. if you are brainlet you can do php, but you say you want to go fullstack and fullstack js is very nice/profitable (120k positions in ny).

php is not king lel.

hello world

Fullstack, polyglot and can use any tools.

> MERN stack
> MEAN stack
> Laravel+Vue+MySQL+WebServerYouLike

>Where were you?
Dealing with tons of irl shit

Nice faam, thanks again. Feeling better already
Gonna drink lot of coffee and read a lot now, this is going to be lit

can someone explain the purpose and goal of Enterprise Integration Patterns to me?

I don't get it, at all

seems like a bunch of completely overblown, worthless horseshit that will only make everything a lot more difficult

start making shit bitch

basically, yeah

Any Rails developres in here?

I'm working on splitting some long-running tasks into background jobs.

I'm interested in anyones thoughts on Resque vs Sidekiq vs regular ActiveJob.

My boss suggested using Resque. I've been working on it today and reading about various libraries, and I'm beginning to think that Resque was probably the best solution a couple of years ago but maybe it's not the best way to go nowadays.

Anyone have any opinions?

>basically, yeah
thank you

what differences are there in rendering a web page on a phone vs a computer? I have normalize.css in place but this still look different on my phone compared to my laptop. I have " " in place also

install webpack

Use reset.css from meyer

But to answer your question:
There should be no difference

Tell me again why codeacademy is bad?

It's not horrible if you're just getting in to webdev/programming. It just holds your hand too much and I feel like you don't retain that much without problem solving for yourself.

Freecodecamp is the way to go senpai.

turns out a package I was using only set 'transform' not 'webkit-transform', all good now

>It's not horrible if you're just getting in to webdev/programming.

Yea I'm new webdev, and so far it's been easy. Ill take a look at freecodecamp though thanks!

Wow dude I couldn't find the correct words to say this but you got it right:

Atom should just stop. Electron too.

you honestly don't really learn until you start doing your own projects, I did the thing where I marathoned through freecodecamp and by the time it came to making my own projects it had all slipped away and I was back to googling most steps in my program. That's what you want to be doing, figuring out conceptually what needs to be done to complete the next step- and then using google to find the actual code that completes it

Have you read the article where it explained how Atom it's basically Chrome? I thought GitHub would do better than that

It's breddy gud!
And yeah, what said. Most of what you learn will be frp, the algorithm challenges and the projects. Luckily if you get stuck there's solutions out there and project walk through. Just make sure you build what you can on your own before you start looking at the solutions.

Hints:
Write down the logic behind the solutions once you either solve them or look them up.

Pen + Paper or a white board is your best friend when it comes to thinking these problems out, don't be like me when I first started and try to do it all in your head.

A lot of the algorithms can be solved by thinking with arrays and loops. Arrays and loops are the bread and butter of programming. Get well versed with both and you're already better than a chunk of devs who can't even pass a fizzbuzz test.

Good luck and have fun!

I do have a website that I started a good portion of the front end via watching nothing but youtube vids and taking notes for later reference.

Starting Codeacademy now though, it just seems like it would have been easier at the get go.

I was given this question in an interview today and my head just went blank and fucked up :( could someone please explain this to me:

hackerrank.com/challenges/summing-the-n-series

I understand arithmetic progression but how did some guy figure out it's

n = int(input())
print((n**2)%1000000007)

That make sense?

I guess it really should have been f(x) rather than f(n), but the point is the area under that line on an integral interval is equal to the corresponding term of Sn. So you integrate f(x) to get a closed form of Sn

By the way, what the fuck kind of web dev job did you interview for that gave you a question like that? I'm old and just got into Webdev and every interview question I've had has basically been "how familiar are you with ___some_tool_or_framework___?"

I'd love to get a job where I thought about cool shit like that all the time.

>wdg
is this what web dev interviews are like

>is this what web dev interviews are like

Not any interview I've ever had. That's why I want to know who he was interviewing with and how he got that interview. I've never had a logical/mathematical problem-solving question in an interview.

But I fucking love math. There was a time when I was really depressed and fucking up my life hardcore. Math was my escape from reality and I spent so much time just working through textbooks. I'd love to be able to incorporate mathy shit into my life again, but in a non-self-destructive way.

This is fizzbuzz mixed with the first problem on project Euler

>Math was my escape from reality

Kind of man, thank you

It's a junior developer position, I've just graduated college. They do a lot of machine learning and related stuff so they probably need someone who can understand / apply mathematical formulas. Btw math was nowhere in job description so I was caught completely off guard.

Emacs has the best git integration I've seen (magit)

Are the rumors true?
Is emacs an OS?

>They do a lot of machine learning and related stuff

Huh. Like I said, I'm old (I'll be 30 in November) so I'm worried that age bias might work against me for getting an interview/job doing neat shit like that.

I'll look into doing some open-source ML shit, I guess. My open source work is what got me my current (and first) webdev job about 6 months ago.

>the fug

Also pot. Lots and lots of math and pot.

data science would be a good area to get into if you're into math. I specialised in data science for my final year. My math skills are so shit though, I took stats 1 and 2 this year and struggled throughout. I do love this shit and it's what keeps me trying.

It's a fully featured lisp environment that you can modify on the fly, so almost.

...

Well it does sound powerful, but could i use something other than (((((((((lisp)))))))))))?

For the most part, no, but you don't have to know much to install and use packages.
Lisp is a fun language anyway, even if you don't care about Emacs.

>make static html/css sites for fun
>mobile friendly with moving menus
>try wordpress
>doesn't do anything I want
>make my own theme
>learn a lot of php while doing it, if/else/array/include/forms/getting stuff out of a database
>edit some javascript because my ad rotators and cookie notices are shit
>just made an awesome mobile friendly theme
>tell people about my website
>now I have half a dozen clients after showing them my hobby site
I just accidentally created a Wordpress farm.

Does that mean I'm ready for the job market?

To add: I also have a webshop now.

This is what I warned you about, user.

Effectively they give me 80 dollars per hour, while in my shitty insurance job I earn 15 dollars per hour.

I'm honestly considering switching fields. I would earn the same as I do now with 1 client and 1 work day a week.

Why are non webdevs shitting up the webdev gen

There is already a non webdev gen, go use it you junior dev shitters

If nobody would shit the thread up it would fall below page 10. So it's my moral duty.

Anyone else using express.js?

>make static html/css sites for fun
>mobile friendly with moving menus
>try wordpress
so far so good...

>ad rotators and cookie notices

I do, what's the alternative?

>be watching a webdev presentation
>developer 4 minutes into the talk drops a meme
>suddenly the next slide has a meme
>then a gif
>it's slowly growing to become a narrated buzzfeed "article"
>only 40 more minutes of this shit

This isnt even that uncommon of a thing.
So /wdg/ is the community as toxic as it seems or is this simply how millennials present?

I just started using it, but koa.js and hapi.js were on my top three list

At least shit up the thread on topic, the least you could do if your existence is literally just going to be trying to keep a dead gen alive.

strapi hapi koa

It's much worse. All fucking normies are this way. I cringe 6 times a day at work.

I actually removed the ad rotators and adsense, because I replaced them with affiliate search boxes. Which fits the content much better.

Unfortunately, yes. However, you could dig deeper to get to the worthy circles.

Those fuckers that say AWESOME three times in a sentence and use pun-jokey-shit to counter-argument.

REEEEEEEEEEEEEEEEEEEEEEEEEEE

i'm making an ajax call with jquery to a php controller, how can i echo the response to the browser instead of the ajax success function?

Yeah dude it's actually Chrome + Node.js: electron.atom.io/

>Electron: 1.6.5
>Node: 7.4.0
>Chromium: 56.0.2924.87
>V8: 5.6.326.50

Who makes so many bad decisions in one product?

Even on my shitty Mac it takes like 3 seconds to start up with only 300ms spent on packages and themes.

PROTIP if you're already using it: beta Atom had a major startup speed improvement so check that out if you want

I have some fucked up table I need to fix. There's a master page with its own css that defines a background-color change on hover.
Now this table has some long ass rows,
so it was originally made in a way that one row of data(let's call it a logical row) was actually 2 s, one after another.
So there's 9 headers(columns), but one logical row has 16 columns of data(first and last column are colspan=2).
Now, what I need is when I hover over a row, I need it to highlight the entire logical row instead of just that one . See pic related, the pink is the highlight color.
What do?
I tried s, it just breaks absolutely everything in the table, I've tried but then the whole content gets under one header. I don't know i lf this is possible with the nth-child property.
Black boxes are actual data I had to censor

Vim + fugitive is all you need.

Don't.

Write a function in php which echoes the value of the variable. Call that function using AJAX

Why use anything else but PHPStorm/WebStorm for php/js web dev?

Does anyone here sell html themes or have experience selling themes?
I've got a theme my old company bought a year ago on Wrapboostrap. The author right now is MIA, his Wrapboostrap profile is deleted/disabled (meaning they are not selling the theme), his website doesn't work, there's not even contact information inside the product files, you get the picture. I'd say it's shady, but that might be an exaggeration.

The theme came with no license and because neither the author nor the product are available, I was wondering if I can, giving the circumstances, redistribute the theme at my leisure.

I know it's more of a legal question but maybe some of you might know. Mainly because of the fact the theme came with no license. Pic very related.

>using an ide for web development
>using bloatstorm

Maybe if you want auto complete, inline documentation, proper error checking, code snippets that work specifically for your environment, reference and dependency checking, project wide refactoring, an inline command line and run configurations.

>it does the things your editor already does
>but you have to pay for it!

>using a text editor to manage a large project

>being a slave of hr buzzwords

...

>replying with anime images and not addressing the statement

The answer is: it depends on the contract. But by default the answer is no because it did came with a license. Its entirely copyrighted. And technically you might not even edit it.

But unless you are ripping off Oracle or something nobody cares. I also use copyrighted content, but I let a legal person (my company) sell it so Im not liable.

How do you include js/css file in your view in laravel?
wtf is this shit?
I added files in /public/js and css
shit aint working

Static files (files that aren't compiled with webpack) can be placed in your public folder and just normally indexed. You'd probably want to learn the ways of compiling CSS/js though. I haven't went much in to it myself using Laravel.

it is fixed, i made mistake in naming .js file