/wdg/ - Web Development General

20170526 edition
youtube.com/watch?v=9hDKfBKuXjI

>This season's Advent of Code:
adventofcode.com/2016/

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

>Useful Youtube channels
derekbanas
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 (embed)

>Useful tools
pastebin.com/q5nB1Npt/ (embed)
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/ (embed)

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

stackoverflow.com/jobs/136806/frontend-developer-fielmann-ventures-gmbh
careerbuilder.co.uk/uk/jobseeker/jobs/jobdetails.aspx?siteid=int_indeedUK&Job_DID=J3K37Z6PFYPPT4HY1CP
nuepage.com/
twitter.com/SFWRedditImages

arr.forEach(function(pageID, index, array) {
var url = 'fullurlgoeshere'+pageID;
console.log("Opening page "+url);
page.open(url, function (status) {
console.log("Inside");
if (status !== 'success') {
console.log("Failure!");
phantom.exit();
} else {
console.log("Waiting...");
window.setTimeout(function () {
//console.log(page.content)
console.log("Creating first file");
fs.write(pageID+'.html', page.content, 'w');
}, waitTimeInMS); // Change timeout as required to allow sufficient time
}
});
}, this);
Why in the fuck does this loop over every item in the array immediately, then close? It doesn't block or wait on anything. I'm trying to make multiple page scrapes in sequence instead of opening and closing the JS server for each page. The logic works totally fine if I take out the loop and only pass in a single page.

should I go to kode kamp or get a degree?

Nevermind, it's because I had the exit clause right after that loop. No fucking idea why that's executing right away though.

Is there some way to block that call until everything in the loop executes?

>that callback hell

what's the problem? It runs and closes immediately? Maybe page.open doesn't buffer calls so it spazzes out. Rewrite it so you don't call page.open again until after it gives you a result

Yeah it just spits out "opening page blah blah blah" for every URL I want and then immediately kills itself.
Doesn't matter if the exit call is inside or outside of the loop either. I have no idea wtf is going on, I never write in javascript, I just need this because the pages I'm scraping are dynamically generated so I needed something to open the DOM and wait a second before spitting out the page.

Again, it works perfectly fine if I take out the loop, but I don't want to be starting up a new process for every single page

const promises = arr.map((pageID, index, array) => {
let url = 'fullpagegoeshere' + pageID
return new Promise((resolve, reject) => {
page.open(url, status => {
if (status !== 'success') reject()
fs.writeFile(pageID + '.html', page.content, err => {
if (err) reject(err)
resolve()
})
})
})
})

Promise.all(promises).then(data => {
//do work with data here
})


try something like this. you're dealing with lots of asynch shit and doing it wrong.

you need to make a bunch of promises and resolve them only when everythings ready, then use Promise.all on the array of promises to make sure they're all done

[Embed][Embed][Embed]

How can I make a list in HTML that looks like pic related? I'm new to web design, I'm usually just a programmer but trying to make my own webpage.

List:

Item
Item
Item


Something like this probably. I didn't test it

.benis {
display: flex
li {
list-style: none;
}
}

List:

Item 1
item 2

This one worked, thanks!

1. Will I get the skills needed to start working from FreeCodeCamp?
2. How much should I expect to earn as a web dev from South America working remotely part-time?

None of you guys actually do web-dev using PHP anymore, right? I mean, nobody can be that autistic.

Follow your passion and try to fit a degree in but don't over pay.

What sort of applications are you guys using a frontend framework like react or vue for?

Materialize on the web and with electron

stay koding

I want to point out that the video you have posted, if you check the person's website it has all sorts of issues, like no scaling properly, menu not working, also the videos suggestions are questionable at best.

i want to get into web development but i only really know C++ and a little bit of python

can i do ANYTHING web related with my current knowledge of C++?

how about you stop being a lazy shithead and learn some webdev languages?

>C++ and a little bit of python
you can learn any non-functional language with ease (you'll probably want javascript at least)
once you get past the syntax differences and the couple gimmick features that make a language ~unique~ it's all written the same way in the end

There are a few c++ web frameworks out there but they aren't used very much in the real world. Python on the other hand is very common and you'd probably be much better off diving deeper in that.

reconsider. the most exciting thing you'll do in web development is query a database and put the information into a html file. Go learn qt, you're halfway there.

how is that autistic? using assembly or coq for webdev is autistic, not php

an application that calculates and servers some sport stats, charts and match results

I like Vue

Just got a £15k wordpress project in that's a week of work. I'll drop shit languages and libraries when people stop paying me to use them.

if i make my own webdev 'company', how hard is it to get clients?

how long is a piece of string?

Alright fuck it, gonna learn WordPress development. Any tools I can use?

wordpress

Aspiring webdev here How to get job?

Do all the courses in the OP. When you're done with that, come back and ask again.

1. no
2. $20/month

juan. si
chu. treinta y siete pesos

>NEET guide to web dev employment
That should probably be replaced. It hasn't been updated in 2 years.

Stop giving them ideas! Let them think Wordpress and PHP are shit so there will be more jobs for people like us.

>when you finally achieve react server-side rendering with just the cross platform v8 interop library and it's faster than MVC and react.net
Dunno what to do with this. I'll probably never get credit if I release the source, people never donate.

Also there's another guy here that's already done this.

Depends on what your market place is like in SA.
If you're trying to get hired by a USA based company then you're fucked unless you have legal clearance to accept work inside their country (trust ne, I've been applying for remote jobs as a non US citizen for over a year now).
Feel free to do work on sites like Upwork and Freelancer though, you'll probably just make enough to survive once you build up a reputation on those sites.

Venezuela. I'm fucked.

What if I send emails to random European startups?

win7 or win10 for work env fellas?

im coming from ubuntu because im gonna into old school emulators im thinking win10

10 because WSL

>WSL
good shout

que tal amigo. No es imposible, siempre hay empresas que ofrecen VISA sponsorship:

>stackoverflow.com/jobs/136806/frontend-developer-fielmann-ventures-gmbh

Claramente no son la mayoria, pero existen. Tambien conozco otros sudamericanos que hicieron competencias (hackathons, etc) y les fue bien, y a partir de ahi fueron contactados por empresas europeas. Pero para eso tenes que ser muy bueno. Si te lo propones como meta a largo plazo y te esfuerzas, se puede.

Y mientras, freelance a traves de UpWork o algo asi, para juntar experiencia.

heast du oasch, es is ned grod freindlich in irgendana ondan sproch auf ana multi kulti seitn zu schreibn, so bleib bei englisch du brunzn.

get these wooden toy languages out of here

this is an american imageboard where we speak american only

kindly fuck off

Worried about foreigners taking your jobs?

VISA sponsorship is good yes, but also rare. Still try anyways, if you're good enough they will move mountains to get you on board.

i am going to hack you now

le anonymouse send their regards

Just kind of starting off with this whole webdev thing kinda, I feel like I am. Got some good knowledge in html, css, bootstrap/Foundation, basic javascript concept (never really built anything with it though) and Adobe shits. Basically I'm a web designer (with no experience) that wants to move into dev.

No idea where to go from here. Focus on javascript? I was about to into Rails or C# but wasn't sure which to pick? I know rails is easier but there are also no jobs. C# is harder but job market is better?

What do?

>I know rails is easier but there are also no jobs. C# is harder but job market is better?

I was faced with the same question and went with C#. Hopefully it'll pay off later on.

How are you finding the adventure with c#? Seems like MS actually has a lot of free resources for people to learn it and everything.

Also if anyone else wants to help me figure which path to take I'd appreciate it.

>How are you finding the adventure with c#?

Visual Studio and C# are pretty comfy, but it is annoying how even the smallest thing requires so much code just to run. The VMC model on C# is just a huge clusterfuck, I think it's too much for newbs like us.

I took a break from C# and am doing Python + Django now, which is a much simpler and transparent language and framework. You learn pretty much the same thing, only the implementations are so much easier. Once I get the grasp of things in Python I want to move back to C# because there are waaay more jobs, but learning basic webdev concepts through C# is hell.

I found a few good books on .Net and MVC, was following along, nice and dandy, but when I tried to do my own thing, I was completely lost. With Python + Django, everything is a lot more intuitive.

Also, those hour-long videos on the .Net Academy or whatever are fucking awful. When you want to go back to see something you got wrong the first time, it's impossible to find the right spot, because they're re-writing the same bit of code over and over again. For me, a book is the way to go.

Should I become a web dev? I'm balls deep in learning C rn but don't think I want to be dull as fuck accounting work for the rest of my life. WD has a more creative flair to it.

Writing REST Apis in DropWizard/Java, it's comfy pals

Do what you enjoy doing most man.

Thank you very much for the write up. Very informative stuff user. I was actually wanting to go the route of rails because it was easy and gives you a good look into the MVC model. But I NEVER see job postings asking for rails.

Python is also an option I suppose, I always forget about it for some reason. The Microsoft videos did sound too good to be true to be honest.

Sounds like C# is more of an intermediate language then. Thank you for putting the breaks on that idea before I got heavily invested.

Don't quit your day job. Learn C on the side, branch out into doing dev part time, and if you find that you can make a decent living off it and you like what you're doing then switch to full-time dev.

Same user. Don't rule out C# just yet, it's a very nice language, and the beginner's stuff is the same in every language, so you could easily learn it in C#. Check out pic related, I plowed through it in one week (up until part 4) and all of that, Parts 1-3, are the same in every language.

Also check out CS50x on coursera, the Harvard intro to computer science, pretty good. It doesn't rely so much on the videos because you get all the slides and the transcripts, plus the only thing that matters are the excercises. By week 7 you'll be doing Python + Flask, making a cool website. Definitely recommended just to get started. Go through the first weeks which are heavy on C, but don't get stuck on them if you're struggling too much.

Don't have a day job, still an unemployed student

get a day job, and then you'll be ready to follow this guy 's advice

I guess it's not bad advice. I'm still not 100% on what I want to do with my life desu.

Are part-time programming jobs all that common? I've only ever seen typical 9 - 5 offerrings around here, and I'm not sure how I'd go into freelance if that were an option.

careerbuilder.co.uk/uk/jobseeker/jobs/jobdetails.aspx?siteid=int_indeedUK&Job_DID=J3K37Z6PFYPPT4HY1CP

> DO YOU ENJOY LEARNING PROGRAMME CODES

>Are part-time programming jobs all that common?

Freelancing. You could find clients on your own or do odd jobs on Freelancer, Upwork, etc.

>Are part-time programming jobs all that common?
I wish.

Part time hours at 30 an hour would be comfy and give me time to build my own stuff on my own time.

I got offered 2 different positions for 2 different companies. One, as a front end developer, and the other as a data analyst.

Which one should i take? Pay is about the same, but i'm wondering which career is better in terms of long term stability and money.

I'm pretty happy being a Wordpress developer. Stay mad.

Me too. It's like react and angular had a baby, but nobody wants it.

>Venezuela

Shit, son, I feel sorry for you.

>data analyst.
this one for sure, because you can use it in any context or industry. Front-end is pajeet-tier. With some data analyst experience, you can go to Google, Uber, Facebook, or any other fucking company in the world.

You call yourself a developer? more like plugin installer.

> there are wordpress developers who think making a website with Jquery is "bare bones"

What's it like user? I'm thinking of looking into that for a first position. What kind of stuff should focus on? What would impress a potential employer on my portfolio?

Thank you in advance

Don't senior developers make a lot of money while analysts will eventually have their pay capped at a certain point? (I have no phd for data scientist).

so what's your take on .net core /wdg/

I'll take a look at it after it matures and stabilizes

Im trying to make a website thats mostly user based

What can I use to show how many users are currently using my site, on the site itself.

daily reminder that react and it's siblings/cousins are all junk and you should just use a lisp instead of using an ugly half assed reimplementation of one. or just write plain js.

>working on personal projects while looking for a job in the industry
>big dreams
>"I can't wait to get a real job in web development and learn while I'm working! I'll have so much more time in the evening to get my personal projects up and running and some day they'll be live and people will use and love them"
>get job I want
>haven't touched project repos in six months

Can't ask a question like that without telling us the language and/or framework you're using.

wtf I hate react now

>create unique id for each visitor
>save it in a cookie
>record it in the database along with last visit time
>when user opens the page check if a cookie with visitor id exists
>if yes then update last visit time for that id in the database
>if not then create the cookie as described above
>query the database for the count of visitor ids with last visit time not more than for example 5 minutes from now()
>that number is your count of online users

great post, really opened my eyes. I'm now rewriting react in plain js, although I might just copy their code because it is written in plain js too. would that be ok?

ha, at least you got the first half of the dream, a job. A lot of us here are not even at that point.

But go on, tell us a bit about the job you got, and if you're willing, tell us about that personal project as well.

What does "paid relocation" mean? What does it cover?

Differences between Apache and Nginx? Pros/cons, etc

they'll probably give you a fixed sum, my guess is between 2-5k euros, and that's it. But don't worry about that now, first get the interview, then you can ask them in person.

posting pic related because it's a great guide for back-end devs. Once you're confident in one or two languages, and you can do most things on the Web Server-Docker list, you should start applying to jobs. I'm almost there, /wdg/uys, I'm almost there...

How'd you get a data analyst offer? Sounds interesting

Nothing special. I'm a cs grad who also does web development for fun. Applied to different areas and that's it.

Depends what the front-end dev is using. Angular? Go for it. Anything else? Take the DA.

Data analyst is fine, but I'm not sure what they cap at. With web dev you can go to being CTO making 400k a year in a startup environment or several million in a larger company after a few decades if you can act the part.

The front end position uses angular, but I'm hesitant because it's a small company that basically makes websites for local businesses. Doesn't seem like the company had any more room to grow.

React is actually the replacement for razor, it just hasn't realised it yet.

Nginx is what I use, but I doubt it's better. The only trick is that to set up a backend you need a "proxy pass" setting. Set this to the port on localhost your backend is and give it a location, or route.

Because MVC is horrible.

Because we want to build pages with backend data, static html fails and it needs to be rendered on the server. This is where react comes in.

It does mean everything changes. It means writing entire webpages within jsx files. I'm so sorry but this is for the better, MVC and razor must end.

C# gets the "I'm hard, actually not really, idiots just gtfo" thing. It's not a hard language, it's not c++ levels of syntax and it doesn't do the tricks c programmers do.

IMO web dev can be just c#, JavaScript and html thes days. People like c# because it's not difficult and does things on the single digit millisecond time frame rather than the double or triple millisecond time frame most other languages do.

Only because HR people prefer them.

Full circle, this is me.

The only thing people actually want from mvc is getting backend data to the client before the page loads. Last I checked mvc had delay of 30ms, that's fine since anything below 200ms is technically unnoticeable ignorable, but it adds up. Firing up v8, making an object pool and loading scripts, has a delay under 10ms.

>People like c# because it's not difficult and does things on the single digit millisecond time frame rather than the double or triple millisecond time frame most other languages do.
there's nothing really special about C#'s performance

>Because MVC is horrible.
are you talking about MVC as in the pattern or the product called "ASP.NET MVC" (by a company that is the fucking worst at naming and versioning their stuff)?

No I'm talking about the horrid razor stuff from "Microsoft® ASP.NET MVC WEB APIs." 10 years ago it was probably the thing, because backend data sent when clients first connect, but at the moment everyone seems okay with react so replacing it with server-side rendered react seems to be what people actually want.

>there's nothing really special about C#'s performance
Depends what you're doing with it.

That horrid Microsoft framework has delays hidden somewhere that the "pros" know how to turn off for benchmarking and can make ASP.net respond in microseconds. It's all colluderism, even if you're a loyal Microsoft customer cuck they'll still tell you to wrestle with .netcore rather than tell you the setting.

If you reimplement an entire web framework with sockets you'll get similar speeds to Go and Node.js hello worlds. This is basically the minimum if you think there's a chance your site would get hundreds of clients a second. When node is actually executing JavaScript code it starts taking double digit milliseconds, it's at least 4ms to open the engine and something simple like rendering a jsx file takes about 2 or 3 ms.

I digress, for sites with at best one client a second no one actually cares if everything is responding under 300ms. That being said, picking a framework that responds 10-20ms than the alternative is at least a head start.

BTW I don't trust those benchmarks.

>React is actually the replacement for razor, it just hasn't realised it yet.
The scooter?

1. Build a websocket server.
2. Ping users every N ninutes

Razor is a horrid templating language used by Microsoft for MVC ASP that introduces several new syntax characters and when you look under the covers is literally just injecting things places and then sending it as a string.

This is fine because until server-side rendering was really a thing, which really meant engines like v8 existing since clients are JavaScript so you'll probably have JavaScript used for client pages, until relatively recently.

The mindblowingly good idea about react is it does all your html/javascript in one file and is artificially popular because Facebook uses it. Against Razor it's everything you want in scalable web development.

What do you guys think of my website company

nuepage.com/

are there any unofficial >best resources for learning node.js? i have around 5 years of on-and-off experience with programming already (mainly java/C#), but i've never done anything involving the internet before

Why would I want my html and js in the same file? If that's what you want then just use s-expressions. I'll admit that XHP is cool and is how PHP should have been designed from the get go, but JSX is just not..

The official api docs for learning node. MDN, 'js: the goodparts', and 'js: the definitive guide' for learning js.