/wdg/ - web development general -- "We're all gonna make it" edition

>Old thread

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

Don't forget to check the i's ;^)

Other urls found in this thread:

gyazo.com/3c2155ff964bd64e08116c69bce838c4
cors-anywhere.herokuapp.com/
developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange
twitter.com/NSFWRedditGif

Are relational databases best for polling applications or is a non-relational fine as well?

2nd for dotnet core

Why don't you have ramnode listed as a VPS provider. Performance for buck it blows the rest out of the water.

how do i into remote jobs as a backend guy

>using the smiley with a carat nose

:→)

>using the smiley with a right arrow nose

What do you guys think of NativeScript?

I want to use it but I feel like there's not many resources

Have you looked into Upwork yet?

>60394823

sounds super neat, will do friend. I was trying to push myself to do this back in August 2015 but never got around to it. Really need to buckle down. I work a 9-5 but I have no real life so I can easily redirect the 5-6 hours I spent up after work doing a few hours of coding.

best of luck, but be warned, it won't be easy. Learning is the easy part, the hard part is dealing with all the frustration that comes when you're fucking up and can't find the reason. When you spend the whole day trying to fix your code and it turns out you were using [""] when the correct thing was {''}, or you import the header files but you import them in the wrong order so nothing works, you just get so pissed you wanna smash your computer and go jerk off to 2D anime trannies.

Really, for me the hardest is not the learning itself, but dealing with all the bullshit surrounding it. Getting your IDE properly set up, getting git to run (with the shell, not the lazy drag-and-drop), compatibilizing your software version with the one from the book you're studying from. Just don't let it wear you out. Remember, we're all gonna make it.

Anyone here has used Microservices?

>tfw first project with node

gyazo.com/3c2155ff964bd64e08116c69bce838c4

Post your website, /wdg/.

I'm doing a flask app, and would like a lightweight document noSQL document DB to live on the server with the app until I build out some hardware for it.

What would you recommend?

Are dynos from Heroku the same as Doker's containers? Can I run mutliservices on dynos and they'll work as well as in Doker?

-Question-

How do you offer users the light version of your site? I looked it up and SO recommended using a JS timeout to trigger a user notification.

The problem being that if you have a server problem - the load event may never be fired. Any ideas Sup Forums?

I don't give a shit, fuck the user.

Has anyone here ever made anything with Phaser.js? I'm thinking of making a cute little mobile game, maybe wrapping it in react native and putting it on google play for $0.99 or w/e. It seems like a meme but so far im impressed with how quickly I could slap together a prototype, and it seems like the strongest contender for JS vidya frameworks.

How do you guys deploy web apps? I've developed a weak little app and I've been struggling to figure out how to get this thing uploaded. Websites are much easier, but the buzzwords and choices on AWS and IBM Bluemix are killing me.

It's just a shitty little MEAN application. Need to figure this out soon. Help? Any advice? Would be forever grateful, I gotta get this up soon.

Containers and dynos are not the same type of thing. In fact, you can run docker containers in dynos.

Containerisation is an alternative to virtualization (like virtualbox), the difference being containers share a kernel with the host OS, and virtual machines do not. This makes virrtual machines much more slow to start up and more taxing on your computer, which is the cost of supposedly more security. There is much debate about the pros and cons.

Heroku is just a layer on top of aws EC2 instances to make it more developer friendly. Any server + db combo that runs on linux can be run on Heroku just like AWS' EC2 + RDS. Dynos are merely how Heroku measures how much stuff of theirs you are using so that they can charge you. Dynos are not used anywhere else and you do not really need to worry about dynos or how they work unless you are specifically looking at your app to optimize for cost when deploying on Heroku. However, it doesn't make sense to put int he effort to do that unless you are a business that is reachinc considerable scale. For learning and side projects, just deploying to heroku should never be to costly, unless you are intentionally writing an app to use as many resources as possible as it's primary function (why you would do this, I don't know).

Yeah, phaser is pretty cool. i made a small paltformer with it, and a flappy bird clone with my roomate's face. The platformer is designed for a keyboard, but the I wrapped the flappy bird clone in Cordova and put it on the Play Store (apple denied me because flappy bird clone, this is to be expected).

So yeah, I would recommend it.

Do what you feel user. db choice doesn't matter except at large scale. How many users do you already have?

The polls will be anonymous but there will be some sort of data analysis later on. They're more like surveys.

Polling like voting or ajax?

I do. I use digitalocean. They have an install guide for most stacks.

Is anyone here into server-side rendering?

Some things I've noticed.

>Only vroomjs and only v8 is actually cross platform, anything by taritsyn seems to be exclusively Windows and can even break vroom
>it's plausible react.net, or packages associated to it, are deliberately broken and breaks too often to be normal, vroom won't work with it even if it works on its own as of writing
>Babel does run on v8 3.1, don't bother using requirejs just refer to it as "Babel", aka Babel.TransformFile. Only libraries that use the document variable don't run.
What's interesting here is the possibility people are deliberately breaking their own packages or making it only work with obscure settings. I strongly suspect its a webdev pro thing to write your own JavaScript Babel interoperability code because it's deceptively simple and so extremely powerful. I suspect everyone has a project that pools vroomjs and then runs Babel with it.

After my experience in this, I now completely believe the powers that be think web dev would be too easy and too powerful with server-side rendering. The "contributors" posting literally broken code who happen to have Microsoft connections says it all. Microsoft don't like how no one would use mvc and razor if reactjs can be used instead.

If this gets out, web dev becomes too easy.

>msboogeyman
might i suggest tinfoil.js? or am i too much of a shill?

Not sure if I should post here or in /sqt/ but here it goes.
Long story short I want to make a chrome extension that posts a random op or reply from Sup Forums to a discord server me and a few buddies are part of.
I don't need any help with the discord api or creation of the chrome extension because they're very nicely documented. My problem comes from my complete lack of web dev knowledge and being bitch slapped so hard by Allow-Control-Allow-Origin that my head is still spinning. I just now saw that Sup Forums has an API but as stated earlier my complete lack of web dev skills prevents me from knowing how to use it. If anyone could point me in the right direction for starting to understand the API and how to pull individual posts from Sup Forums at random from a chrome extension that would be super appreciated.
TL;DR
user is too fucking stupid to understand how to use the Sup Forums api and is groveling for help.

You really think the company that created the whole "only Indians may be paid to code" wouldn't stifle web development? They're literally the kind of idiots that would have people excavate with teaspoons instead of trucks because more jobs.

No, it's actually a possibility that Microsoft, or more likely Facebook who have always had lefty leanings, is actually making this difficult on purpose so more people can be employed.

>lol that's insane there's no real need for it so it couldn't possibly exist
Just like hiring quotas don't exist and any white male complaining about unemployment simply has a victimisation complex.

Alinsky called. He said you're too radical to radicalise anymore.

i tried out herouku yesterday, it's really simple to use and free, you can try that.

well actually it didn't deploy the jar correctly for some reason but i wil look into it later today and i expect it to work

anyone know how to get a folder path based on the current directory in nodejs?

An API has different meanings depending on the context, but in this case it refers to a web server that can return data in JSON format. Once you have that JSON you can manipulate it and feed it to the discord api. You need to use http methods to talk to a web API, e.g GET, PUT, POST or DELETE. In this case, since the Sup Forums api is read only, the only ones you'll be allowed to make are GET requests. I recommend you download the Postman chrome extension, its a gui for making http requests, and its pretty essential for debugging web apis. I hope this helps.


btw I saw your post on stackoverflow too and it made me smile

will Sup Forums help me with my homework

to anyone here who only has 4gb RAM, are you satisfied with it?
i just need to code while having several tabs open in a browser with one of them being a youtube HD video. can i do this without the computer freezing or stuttering all the time?

I want to have some weird repositories for Git and I don't know if it's possible.

I am making a framework, and I want two different groups of people to get the latest version of it, but from their branches they each can do some upgrades and changes, that I want to accept and change back to my main branch.
The problem is, I don't want each other to know that the other branch exists, and I want them to be at different locations/servers

Is this possible? How would you do it?

depends on what your coding setup is. I was using VisualStudio2015 (for C#, obviously), with 4gb RAM, and it was utter shit. Granted, my laptop was shit overall, it was the cheapest Acer I could find, which I bought before I started coding.

So I bought a Lenovo T430, 8gb Ram, i5 processor, everything runs smooth and fast. I also use PyCharm, and it works great, never had any problems.

Any recommended books on wordpress development?

i used to have 4gb and ran into limits sometimes
i upgraded to 8gb and it hasn't ran out yet

If we're talking about github you can just create N branches and assign the people (groups if you have premium) as collaborators.

Then you just merge your branches manually.
git checkout master
git pull origin master
git merge he_was_right
git push origin master

>The problem is, I don't want each other to know that the other branch exists
why? That seems retarded.


>and I want them to be at different locations/servers
That's entirely possible.

when I'm browsing a site and the url ends in whatever.php, that's just bad/lazy coding on their part, right? There is a way to hide that, right?

>why? That seems retarded.
it's not retarded
it's because I'm making work once, and selling it twice

i only use vscode as i dont compile at all (php, node). i think i will try 4gb since i only need another cheap ass 2gb stick. if that wont work ill just buy an 8gb stick

It's still retarded.

Don't put revision control in your releases. just make a script to package up a version.

I have a phone call from a LinkedIn recruiter regarding a front end dev position in 10 minutes what do lads

go to sleep

Hard to say on your security situation. Is it a private app or a public facing app>

If private, Mongodb is fine. For multu user public apps, Mongodb will be a pain in the long run.

Hiring quotas do exist as do promotion quotas.

I knew a very high up person in Oracle that was fired for promoting a more qualified white guy because it didnt meet the quota.

Thank you based user, that explains so much. Yeah I'll probably take down the question on stackoverflow now. Again thank you so so much.

Now that Rails has all the Webpack/Yarn bullshit loaded into it, i'm a little confused at where everything is supposed to go. What do I put in javascript assets vs package?

I bet you just can't wait till configurationless web development.

I'm just frustrated because i'm too inexperienced to instinct my way to the right way of doing it, and all this shit is still new enough that I can't find a good article to explain it to me like i'm a dipshit.

The more shit you use the more configuration you'll have need and the more shit you'll have to set up.

Find a simpler way to get whatever you need to get done.

I'm just confused about where to include an outside JS library like Konva, and whether or not to add it to vendor and use the asset pipeline, or to add it through Yarn and work with the new webpack structure.

anyone have experience using cookies for user setting permanence? Like they would never have to log in but whenever they go to the site from that device their profile color would be the same as what they set last time, etc. Anyone got a good article or something?

I bought a used T420 for very cheap, I thought 4GB would be a problem (I has 8GB on my previous box), but it really isn't.
Memory is very rarely the bottleneck due to it being so cheap. Nowadays everything comes with 4GB minimum so people don't always realize just how much memory is that. Just run "hfree" yourself and check just how many times you go over 2GB... Probably very rarely, and above 3GB, I'm gonna say never.
If all you do is have a ton of tabs open one of them being an HD video, your computer would be fine on 2GB even.

35.185.204.188 - - [15/May/2017:15:51:45 +0100] "GET / HTTP/1.0" 301 0 "-" "-"
139.162.114.70 - - [15/May/2017:16:02:35 +0100] "GET / HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
104.198.219.180 - - [15/May/2017:16:21:51 +0100] "GET / HTTP/1.0" 301 0 "-" "-"
184.105.139.68 - - [15/May/2017:16:24:12 +0100] "%\x00\x02ABCDEFGHIJKLMNOPQRSTUVWXYZ[\x5C]^_\x02\x00\x01\xFBJ" 400 182 "-" "-"

what did these IPs mean by this?

Is there an easy way to view unique visitors? My setup is django + nginx.

>tfw solving a difficult problem
>tfw finally able to use modulo

i remember the first time i had to use it too

it was a nice feel

lel

they'll just ask you what your experience is and ask you what you know, to see your stuff, might not even go that far actually. Recruiters are boring to talk to its not a real interview

Should I do Full OOP or Microservice architecture on my planned side or project?

I think that OOP is kinda hard to follow once the system is already quite big

Hey guys, what's the best practice for making a search form in the header and navigating to a different page to show the results in Angular 4?

what else should i learn if ive already perfected js/ajax and php? as in what can i do that i couldnt do with js/ajax and php...

>difficult problem
lel anywhere where you have to separate between even and odd is a good occasion to use modulo

how on earth are you meant to fit anything within the iphone 5's ridiculous width constraints?

learn design cunt

I do that and I have no problem honestly. I'll even have a podcast app running, sometimes I'll pop open a game, I'll have a text editor and an IDE open.
Zero problem honestly. Especially because I'm not using some sort of vast multi monitor setup where every opened program needs to be going full blast 24/7. If I were to get into video editing and more into graphic design/content creation I can see wanting to go 8/16gb.

design doesn't help much when trying to show code snippets

thank you for the absolutely unwarranted expletive

I have a web application that I developed using PHP and MySQL. One of my clients need it to also be available offline because a few of his offices have shitty internet connection.

Setting up a local server that syncs from time to time with my current online server seems to be the easiest option as those places hardly ever need data from other offices, but I dont know who is going to be responsible for those servers and can't trust them not to steal my code/product. What should I do?

design has everything to do with showing code snippets wtf are you on
design dictates how the snippets present on various interfaces
your entire existence is unwarranted tho LMAO

GNU/Linux with LUKS on all partitions is what i think would be the best, they wont be able to start the machine without the volume key though, so be sure to add an big UPS to the server.

What CMS is best if I want full control over the look and feel of my website (I don't give a shit about themes), but I want someone else to be able to edit the content of the site without having to actually go into html files? I guess preferably a wysiwyg editor, but just the ability to edit text files or something simple like that would be ok.

Basically I'm going to handle the actual design of the site myself, but I need it to be easy enough for a non-programmer to edit content and possibly deploy the updated stuff to a host.

From what I've read, Wordpress, Joomla, and Drupal are the most popular options. I've also looked into Jekyll.

Does anyone have experience with any of these?

I'm working on a wordpress site and I'm trying to create a very specific effect. I'd like the active section of the main navigation to have a box shadow surrounding it with absolutely no shadow on the bottom. I've been able to achieve this effect through giving the main content div a solid background and a higher z-index than the nav div but this clearly isn't the right solution because then the dropdown menus are hidden behind the main content. Is there some clever positioning I can do to make this sandwiching of divs work? Is there something obvious I'm missing here? Any input is greatly appreciated. Thanks.

I'm not entirely sure I'm understanding exactly how your setup is laid out. Which div has the box shadow? And is the other div covering it on the bottom?

In any case, I think you have two options:
1. Use a separate div solely for the purpose of covering the box shadow. (Assuming that won't cover up some content in turn.)

or

2. Force the dropdown menus to be on top of the other divs. Put an invisible div at the level where you want the dropdown menus to appear. Give it a transform:translate(0,0) property. This makes it the new frame of reference for any descendants with a position:fixed property. I think if you make the dropdowns fixed, they should be in the same stacking position as the invisible div. (You can also just add that transform to a div at the desired stacking position.

fuck that just have them remote in

there are plenty, ghost and wordpress come to mind

Jekyll is amazing for dev bloggers, there are some products you can stitch together to give yourself the wysiwyg editor, but for clients I don't recommend at all.

Wordpress is popular for a very good reason, it gets a lot of bad rep due to being bloated and insecure but that can be avoided by not loading everything under the sun as a plugin for a simple site.

Thanks for the info, I'll look into Ghost. But I'll probably end up going with Wordpress, since everyone seems to say it's the easiest for non-technical people, and it looks like a lot of hosts integrate with it pretty seamlessly, which are both plusses.

why does this work in the console but not when used in a script?

var buttons = document.querySelectorAll('button');

buttons.forEach(function(button) {
button.addEventListener('click', function(event) {
console.log('button clicked');
})
})

nevermind put the script tag before the elements had loaded

damn amateur

any tutorial projects for angular 4? step by step preferably.

best way to make a web-based phone app?

Ideally something with the same kind of UI design tools as android-studio.

Any tools you'd suggest for making writing userscripts easier, but not full-blown jquery?


element selection, and receiving and parsing html are my main problems. As is adding buttons to sites like youtube.

They are two completely different things not different solutions for same problem - you can use them together.

Yeah sure you have perfected those. But learn new languages, libraries, frameworks,.

Angular is dead, learn react or vue.

Apple doesn't allow web based apps. You can look into Xamarin.

Why not jquery?

nativescript can target iOS. So I know that's not true.

Because it's either enormous, or a black box.
Plus there's way more tailored functionality I'd need to write myself anyway, or never find in the huge API.

Fuck I hate design.

Even with bootstrap this shit is hard to make look good.

Okay guys another quick question, you may know me from and after a day of messing around I finally got what I wanted. (please don't laugh too hard)
function testing(){
var httpGet = new XMLHttpRequest();

httpGet.open("GET", "cors-anywhere.herokuapp.com/

I've been out of the webdev loop for a while.

If Im not looking to build a full web app, but instead want to build a mostly static website for a business (about 10-15 pages), what are my options in ways of a framework? I'd like to have a general template (a lot of the pages will look the same and share most css) but full control of how everything is displayed on a page by page basis through code

Last time I had to do this was years ago and I used Drupal. But I'd rather not touch php. Django seems like it could possibly be a good but also kind of heavy weight.

I know I could just write everything in straight HTML, CSS, and JS but that seems like a recipe for disaster.

>I know I could just write everything in straight HTML, CSS, and JS but that seems like a recipe for disaster.

How?

If I want the same header and footer on every page, I'd have to change 15 files if I make any changes to one.

Dude why doesn't CSS allow overwriting?

Like


section { width: 100%; text-align: left; }
shit1{ width: 50%; text-align: center; }
shit2 { width: 50%; text-align: center; }

durr broken, width 100%, elements not blocked, can't override shit. Fuck CSS

You may want to set onreadystatechange before you call send().

developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange

The 'return' statement in your function doesn't go anywhere. You need to call your print function (console.log()) from within your onreadystatechange function.

Alternately, you could pass a function into testing() and have that function called as part of the onreadystatechange function. Then your call would be testing(console.log). Or something similar; I don't usually work in JS.

Thanks for the reply, I'll give these a try when I'm back at my PC.

Here you go:
function testing() {
return new Promise(resolve => {
var httpGet = new XMLHttpRequest();

httpGet.open("GET", "cors-anywhere.herokuapp.com/ {
console.log(test);
});