/wdg/ - Web Development General

What's everyone working on?

Previous thread: >COMPLETE BEGINNERS GUIDE
github.com/kamranahmedse/developer-roadmap

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
javascript.info - curriculum providing a strong basis in JavaScript

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
youtube.com/watch?v=Zftx68K-1D4x

>Learn anything not covered by the above tutorials
hackr.io - crowdsourced collection of tutorials from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)

>Asking questions
jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

>PHP resources
pastebin.com/gfBPg24A

Attached: wdg_imac_coffee_shop.jpg (646x700, 98K)

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Web/HTTP/Overview
7chan.org/pr/src/OReilly_JavaScript_The_Good_Parts_May_2008.pdf
medium.com/the-andela-way/introduction-to-web-scraping-using-selenium-7ec377a8cf72
twitter.com/AnonBabble

How do you handle timeouts, /wdg/?

Alright niggas, I'm familiar with programming desktop software, now I'd like to get started on bots. Specifically, internet crawlers. I figure, there are probably bot frameworks or IDEs or libraries or whatever. Anyone can comment on those?

In a previous thread, someone mentioned Lisp, but it would still require me to program the actual bot from the start, wouldn't it?

Attached: fidget-spinner-teeth.jpg (640x513, 82K)

What is your purpose with the crawling?

Boomer here, i'm back.

Why do zoomer webdevs write their websites in some weird abstracted form and then "build" them into webpages? It's not like you're actually compiling anything.

Attached: 1528411094587.jpg (1600x1600, 596K)

I built a non-trivial webscraper with Scrapy. I recommend it.

What do you mean? Like setTimeout in JS? Like web request timeouts? In either case, what specifically are you talking about?

Some sites have APIs for bots, e.g. Discord. Other sites you just need to send HTTP POST requests to an endpoint, essentially imitating whatever a browser does on a website. Plus GET requests for grabbing content.

If you don't know about HTTP requests, here's an explanation of some of the basics:
developer.mozilla.org/en-US/docs/Web/HTTP/Overview

That's the broad strokes of the conceptual stuff you need to know. After that, things are more specific for individual sites, so you'll either need to look up guides for making bots on those sites, or find the API docs for those sites, or reverse engineer how those sites work on your own.

>some weird abstracted form and then "build" them into webpages
Are you talking about backend frameworks for dynamic sites? Or frontend frameworks? Or just like templating engines in general? Can you give me a concrete example of what you're talking about?

>Are you talking about backend frameworks for dynamic sites? Or frontend frameworks? Or just like templating engines in general? Can you give me a concrete example of what you're talking about?

I'm talking about writing your websites to be built through NodeJS. I'm currently messing around with Vue and they explicitly recommend vue-cli or webpack as opposed to "stand-alone" (ie. just writing your HTML/CSS by hand).

If I got this route, will I be able to output partial template files or will insist on only building valid/complete HTML?

by websites I mean static HTML pages. I already use the template package in Go, this isn't going to change.

Could you post the original /wdg/ image? I might try and contribute some silly op pics.

Also may I just state that react-native is the biggest piece of shit ever made.

> B..but we wont have to learn Swift

Ya but I could have mastered Swift in the time I spent chasing all these goddamn compilation errors. The ride never ends. Fuck react-native and fuck facebook

30 yo boomer here

IDK about Zoomers, but there is not much wrong with SCSS. Im using React/ES6 which is ...ok... I'd rather do projects in vanilla JS but React is flavor of the month in all the tech companies so Im stuck with it for work right now

Attached: 46d.png (692x390, 200K)

So the whole point of the build environment stuff is for SCSS?

Seems like what the doctor ordered. If we had spoilers I'd post tits in return.

Mostly, just data gathering. My first project would be to try to find bot- and shill-rings in Twitter by cross-referencing the people they follow, like, comment on etc. Seriously, you have no idea how damn many profiles in social media are fake.

I'm familiar with the occasional requests and APIs, the issue is in handling a million simultaneous requests, organizing all the information and all that grunt work. That's what I figure a IDE/framework/library/whatever would cover.

Attached: tumblr_ox99t4HUeD1tq8bfxo1_raw.jpg (828x803, 107K)

SCSS and compiling ES6 to plain JS because browsers cant run ES6.

But I pretty much agree, Webpack and build packaging is generally awful. Id rather just do plain JS than React/ES6 compilation

You people are fucking idiots

t. Zoomer
Get off my lawn faggot

Would an european company paid me re-location if i'm junior and not living in europe?

>Company in EU is looking for juniors
>"Relocation paid"
>Relocation from america isn't as cheap as relocation from an EU country.

you know you don't actually have to "compile" it to use it? At least you don't with Vue. I'm just wondering if I should bother with the build stuff, and I can't figure out why I should.

Also from what I understand all modern browers support ES6.

I feel good with Javascript but feel like i should learn another language for jobs... i already know C++ (Did like 8months on it and a few games on SDL), should i go for Java or C#? or try with something new like Go?

should I start my web dev journey by reading sicp and learning C?

does js use OOP? I've seen that shit in languages like java and php and the whole object concept is confusing as hell

>writing your websites to be built through NodeJS
Having a compilation/build step can be helpful because you can use ES6 and newer features and compile them down to ES5 with Babel, and at the same time you can package all your JS dependencies into a single file and uglify/minify that.

>vue-cli or webpack as opposed to "stand-alone" (ie. just writing your HTML/CSS by hand)
I don't know a ton about Vue, so correct me if I'm wrong in some places, but as far as I understand it:
You need to have a build step if you want to write your components in .vue files. Otherwise you can only use string-based templates within your JS files, and your HTML files need to be valid.

Pic related

Most browsers can run ES6 just fine. It's really just a few old versions of browsers that a handful of people still use. However, JSX code in React projects need to be compiled with Babel or whatever, since JSX isn't a standard, just a thing Facebook created.

Attached: wdg_web_development_general_logo.png (822x552, 814K)

Yes, you don't have to use it if you don't want, but don't expect to get that far without it.

Anyway, it isn't that hard user desu, once you get used to it, you will love it... i have to admit it is hard at first, but then it becomes easy and great!

Don't give up.

Anyone know why socketio works in Chrome but not FireFox? In FireFox, I get "Firefox can’t establish a connection to the server at ...".

Attached: last_thread_(10.01.2019)_1.png (2500x2500, 2.37M)

Thank you OP

>Most browsers can run ES6 just fine. It's really just a few old versions of browsers that a handful of people still use.
Ya but for enterprise development everyone is expected to support crap versions of IE.

Also some people run there JS through minifiers before shipping it to make it smaller

aren't there a thousand shill detecting bots already? I'd love to see one that works in Jow Forums but I guess that's impossible unless everyone suddenly becomes a tripfag

Yeah, but they try to be one-size-fits-all, and end up being terrible. I noticed the patterns of shills and bots change a lot according to country and subject, so I figure a more tailored detector could work much better.

I got around to putting my traditionally written code into the webpack. I really like how minifies and merges everything down. Though, the fact that a default minimal template is 200MB is extremely cancerous.

Currently learning my way around rails. Is it a waste of time? Not looking to make a career out of it just a quick and easy way to make small web apps.

then you're wasting your time. Just use a static site generator like hugo or gatsby. Rails is dead

Are those the js equivalent of rails? I want to do more than generate static pages, ie communicating with other rest apis, backend for mobile apps etc

>haven't heard from Job application since December 1st when I applied despite contacting people I'm connected to multiple times as well as cold emails
Kill me, I was qualified for the job too.

>have put in at least 15 applications to different companies since november
>only 1 phone interview where the recruiter told me my resume, communication and tech skills were all good, but they found someone better
>tfw graduated from uni in december and i'm twiddling my thumbs and trying to learn more shit

I know where you're at my man.

What do? I left it overnight and mysql was full of these errors, I made more space available and the application that was making the INSERTs continued normally but the files are still there...

Attached: 1517882997603.jpg (956x566, 166K)

>be in interview, seems like its going well.
>tech lead's voice seems to indicate he wants to hire me
>manager maybe doesn't, can't tell
another failed interview where i can only be left to guess why. or maybe they just really liked the other guy better.
also I really fucking hate super generic questions like "how do you debug something". I dunno i just fix it. do you really want me to list every problem solving tool i've learned over the years? say "i know what a debugger is?" fucking hell

a static site generator won't serve as a backend with a database. by definition its static. rails is a fine choice for what you're trying to do as long as you don't expect it to scale into a giant complex system. other choices are django/flask for python, spring/play for java/scala and you can roll your own with go. bad choices are perl and php because they create buggy and hard to read code for the purpose of CRUD web apps

how can I convert a .tex file into a pdf for a website? The goal is to take user inputs and generate a pdf. Is my only option to do execute a shell command?

Attached: found_on_road_dead.jpg (1280x720, 82K)

send the input to a PDF API. ive never used one, but there are many

>15 job apps is a lot
buckle up fellas

does chrome not support "image-rendering: -webkit-optimize-contrast" anymore? i remember using it to make images less blurry when downscaled but it makes no difference now
devtools suggests a few other values for the css property but the only one that makes any difference is "pixelated" which is too sharp
using chrome 71 on linux btw (tried with gpu acceleration on and off, not using any exotic ricer flags)

Read the docs for python beautiful soup

Attached: 1540313652937.jpg (971x1122, 1.07M)

cc bois
>bad choices are perl and php because they create buggy and hard to read code for the purpose of CRUD web apps
>writes bad PHP Code
>blames the languages
aww

>How do you handle timeouts, /wdg/?
Patiently sit in the corner as instructed until they're over

200MB?

What do you mean? I don't think I have any 200MB files in my build

I feel like I really get interviews. But I also, left to my own devices, would challenge interviewees to a game of 7card-stud, so

>rails is a fine choice for what you're trying to do as long as you don't expect it to scale into a giant complex system

Can you give a more recent example than Twitter to prove that rails doesn't scale well, or are you still harping on rails for something that happened a decade ago and making the assumption that no improvements have been made in the last 3 major releases?

Probably wasting your time. I'm biased cause I'm a JS Dev, but I think python is the way to go. Jow Forums shits on python, but it's just more flexible and common than Ruby. Chef is dead and RoR is next on the chopping block. Abandon ship, consider PHP even, that shit ain't going anywhere. Or Microsoft .net if youre into massochism and cuckoldry

What do you mean by "more flexible"? Where do you think all the rails devs and software are going to go?

Attached: 1235649841651.jpg (480x360, 22K)

Thanks again

> 9000 hours in MSPaint

Attached: quit-shitpoting.jpg (600x706, 64K)

Lol, nice. I'll definitely use this

>What do you mean by "more flexible"? Where do you think all the rails devs and software are going to go?
I mean RoR is a very strict framework. Python at least has the options of Django for a comparable framework and flask for very fast
and lightweight projects. And python is used for data crunching, server scripting, google apis, and more. Python is just the more established language. Nothing wrong with Ruby exactly, I even bought and partially read a book on it. But python is the same thing but better at this point. It already has a good share of the market and its still growing.

I spent the last hour looking at node and express. I like this level of simplicity. Not sure how I feel about JavaScript though. But at least I understand what's happening where as with rails I'm just trying to remember shit I read in a tutorial.

7chan.org/pr/src/OReilly_JavaScript_The_Good_Parts_May_2008.pdf
Read this so you understand how to avoid JavaScripts pitfalls, it defines a subset of the language that is actually enjoyable to work with.

my build is tiny, but my node_module is 170MB.

How fast could a decent webdev recreate DSiPaint.com (but for phones) using the lavarel framework?
Are lavarel + bootstrap a good combo?
I've only made things similar by hand configuring a LAMP server, and writing all my php from scratch, but someone I only somewhat respect told me
"It's not 2002 anymore bro learn a fucking framework watching you dev whole websites like that is hurting my soul"

Is this person full of shit?
Asking for my cat.

Attached: https___whyevolutionistrue.files.wordpress.com_2013_03_cat-in-box.jpeg_w=500.jpg (500x375, 80K)

would do it rather with express.js than laravel. Node is more flexible and faster, don't see the point of using php frameworks anymore...

It's not that php can do something magically different than node...

Will it be worthless if learn React now? Will it be obsolete by Vue or whatever in the next 1 - 2 years?

Attached: 4858725352765372.jpg (500x375, 31K)

>Will it be obsolete by Vue or whatever
doubt it. React does things differently than vue/angular.

As far I know, you need to write html with vue+angulare, whereas in react you write everything in JS except the wrapping div.

I don't know why vue/angular even exists. Having to create 2 files instead of one like a virgin incel..

>Rails
>Quick and easy small web apps
Quick and easy, Rails is an absolutely fine choice. It was practically made for rapid prototyping.

However you'd probably be better off with a static site generator then communicating via REST API unless you want Rails' ecosystem (Active Record, Action Mailer, Active Storage, etc and all those gems for whatever you need.)

meant for

Where can I get good .psd templates to practice html and css?

>psd templates to practice html and css
Is that a thing?

Attached: 1522934317646.jpg (337x367, 83K)

I think he's talking about .psds of website designs that he can practice converting into DOM.

wtf are you talking about
react is the standard and will be it in at Least next 5 years

So is Firebase here to stay? Months ago i thought it was a meme but most new courses include it and people keep talking about and i heard its insanely fast, is it that good? I also heard its prices are fucking retarded tho

Attached: 23525325253.png (1600x800, 17K)

Serverless is here to stay.
Providers of any service come and go. However Firebase is owned by google so yeah it's likely to stick around.

I would never use serverless though. I like having control of the back-end

What does Firebase have to do with serverless, you can still connect to mongoDB or SQL hosted on the cloud if you are going serverless

if my backend is located at domain app.fag.com, can i issue cookies for other domains like google.com or whatever?

No.

Fairly sure they are only interested in europeans (freedom of movement no visa shit)

I bet firebase is just an minimal node server running, using sockets to comunicate with clients.

I could create my own firebase server lol, so why does everyone use google and feed them their data?

just ask them

yes it makes a lot of money for google why wouldnt it stay

Great, then do it yourself and sell it for cheaper than firebase and make millions.

It's just one fag who thinks spamming buzzwords is a good replacement for humor.

I already do it myself for mobile apps and my services idiot.

It is not a general purpose solution like firebase, but that makes it even better for my needs, since it's 100% customisable.

you have your own firebase server for mobile apps?

I'm building a toast notification system and after a signup I want to show a toast notification saying "Signup successful!".

I'm thinking of ways to go about this. An obvious choice would be after the signup, I add a record to the database, which is then pulled on the next successful pageload and displays the "queued" notification.

However, this seems like it would be extremely heavy on the DB.

Would PHP sessions be a good way to temporarily store these instead?

Please hit me with suggestions.

Attached: niVG4[1].jpg (432x308, 22K)

I'd just store them locally on the client.

JUST

Hmm, I guess localstorage might be a good idea. I don't know how I'm going to handle a no-js fallback though. I really don't like adding query variables in my URLs.

>no-js fallback
Just don't bother. People who have JS disabled by default know that it breaks sites and how to fix them.
I'm one of them.

yes, something built with similar technologies
-express js
-websockets

As I said before, it is specific purpose, since I built it for myself. It is also trivial to build too..

I don't trust google. They are a data mining company.

Absolute illiterate here. I'm trying to write a discord bot, which is apparently java based. What IDE would you guys reccomend me to write it in?

Why not write it in python instead? Much, much easier.

What makes you think it's java based? It's an open API, you can use any language.

Just use a bot framework instead.

According to this, I can use any language, correct?
Does this mean I can try it even in C++? (Given that's the only programming language I know even the basics of)

I had some problems with npm recently, solved, but I want to know why the fuck this happened. Basically, none of my npm start commands were working, and I was getting a huge error. To discuss the problem, you'd need to know the file structure, which was:
code/project_dir
running 'npm start' in project_dir was throwing errors, because there was a node_modules folder locked in code/. I don't remember how it got there, but why the fuck would that interfere with other directories?

You could use Python for Web/Networking:

Selenium could be used to mimic human use of a web browser
medium.com/the-andela-way/introduction-to-web-scraping-using-selenium-7ec377a8cf72

(I like to also use Scapy for TCP/IP stuff)

can you get jobs knowing nodejs? I've used it for years because it's so simple but it seems only small companies use it or large companies use it but in a limited capacity in addition to other backend languages. So I mean are there jobs where all you do is express.js and some frontend. That'd be such a comfy job.

Getting ready to launch my first python/flask webapp. Been building websites for a living for 7 years and finally have my own project that I think will *actually get used*

Any recs on hosting? I was going to use pythonanywhere just because it's really easy to set up, but it's about $120/y. I pay for a deluxe hosting package with godaddy but I don't think I can run a python/flask site on it

>So I mean are there jobs where all you do is express.js and some frontend

Thats literally the most popular thing right now, full stack node.js + react or some shit.

In mvc framework architecture is there a function to check which classes are initiated on the page, and/or which method are called?

New to mvc, trying to understand mvc logic and workflow.(I'm using a mini framework just a very very basic build mvc). Would be cool to check which code, which classes functions methods are currently running.

Is there a way I can check that?

>and how to fix them
how the fuck do you fix it dude? do you code the functionality of every page each time you find a good website or what?

It's much more simple, I just selectively enable JS. Or allow all JS.

I don't allow random pages I get to to run it, hence it's disabled by default.

>Most IT jobs are in another city
>I live in a small town
>Don't have enogh money to move on
>tfw can't get my first job
>tfw can't work remote neither bc junior

i have a real problem bros

i started webdev last year, started earning money and supporting my family, but..

as the jobs were harder and harder coffee wasn't enought, started chuging energy drinks. then that was also not enough. started adderall, even snorting it. now my back hurts i take a shitload of painillers and weed.

started drinking because of stress, addicted to all kinds of shit now. webdving is ruining my life desu. how do you guys deal with this shit. i really need help