[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Search] [Home]
Board
Settings Home
/g/ - Technology


Thread archived.
You cannot reply anymore.



File: wdg.jpg (108 KB, 1280x720)
108 KB
108 KB JPG
Have a nice day.

Previous thread: >>70914360

>Beginner Roadmap and Overview
https://github.com/kamranahmedse/developer-roadmap
https://www.youtube.com/watch?v=UnTQVlqmDQ0

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

>Further learning resources and documentation
https://developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
https://hackr.io - crowdsourced collection of tutorials from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
https://learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)
https://pastebin.com/gfBPg24A - Collection of PHP links.

>Asking questions
https://jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
https://3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang
>>
First for jQuery master race.
>>
>tfw my code monkey brain finally got it together and got JWT token renewal & socket authentication working
>>
is there a magic declarative shit, like I just give it some REST API and it makes a nice functional frontend of it? Probably with an option to use some specific css framework as well? I hate doing frontends
>>
Vue.js
It looks cool but I find it weird.. Are people mostly launching it from CLI or using it from a Webserver dedicated html page ?
>>
>>70951843
no, how would that remotely be possible?
The only thing you could reasonably expect an automated process to put out with current pre-super-AI technology is the same thing you can create in ~10 minutes. Basically a page with some buttons, text fields and some AJAX calls woven in.
>>70951899
You don't really 'launch' Vue from the command line. Maybe a dev server or some server-side-rendering framework.
Normally it's just part of your sites JavaScript.
>>
>>70951986
like react-admin without the retarded react-adminness. Just display these items like a pack of cards or table and be done with it
>>
>>70951843
What do you need it for? Would Postman be sufficient?

>>70951986
>no, how would that remotely be possible?
Not the guy you're replying to, but I don't think it would necessarily be that complex. Not actual functionality, but just the basic dashboard. Just taking the field names and types, plus the format to send in (get vs json post vs form post vs whatever), and then spitting out a reasonably pretty set of form fields with a submit button, and some JavaScript that sends the request and displays the result (as opposed to letting the form submit for real and causing a navigation).
>>
>>70952147
no, I need it for customer facing saas
>>
>>70951010
Whats the best practice for running jobs in backend and letting front end know its done?

say im uploading a video and its gonna convert, i want it to redirect to finished video when its done. How?
>>
How can I detect memory leak from my script on the page?

I have no idea how to approach it. i already detected there is a leak and I'm confident it is my script I injected into the page but I dont know how to figure out what exactly in my script does it.
>>
File: 1546741451045.jpg (20 KB, 326x326)
20 KB
20 KB JPG
If i have certificates from in my native language should i translate them for my CV or nah?
>>
>>70952442
websockets
>>
>>70951899
Vue allows you to build a JS bundle file that, when called in an HTML file, renders HTML in a browser. You can serve that however you want

There is a Vue CLI that automatically generates a project for you, so you don't have to set up babel / webpack. It's very very good and I recommend you try it.
>>
Someone said in a previous thread you need to do a basic todolist to get a job in webdev, what the fuck is this true? I made two full stack sites and two front-end only ones and i am still scared to apply because i think i am too stupid for it
>>
Can anyone help me out with these questions? Got sent these by a recruiter for an interview I have tomorrow but they’re stumping me. I know I’m supposed to use either focus or autofocus for the first one but I’m not really sure what it’d look like (does it go in the a tag...?)
And the second has be completely stumped.
>>
>>70952569
apply while grinding algorithms
>>
>>70952582
These are some crucial basics anon, maybe you should develop yourself some more before applying at jobs like this.
>>
>>70952582
set the onClick handler of any button with class "skip" and set the focus onclick?

second, a simple for loop?
>>
>>70952582
If you can't solve those, what is some employer going to pay you for?
>>
>>70952582
>jquery

drop the place asap
>>
>>70952719
this
>>
>>70952584
>Grinding algorithms
>But the questions you will get are shit like this
>>70952582

Dont know, seems really not worth it, especially when i asked how to make a binary ATL tree to my friends who work in webdev and they all didnt know what the fuck was i talking about
>>
>>70952524
if you need padding yes, otherwise nah
>>
>>70952812
Webdev is a joke. I've got a coworker who constantly rants that the API is often too low level but when asked to implement the api he wants, he just sits there browsing reddit.
>>
Is Django a good framework?
>>
>>70952582
The second one just seems like a bad question, why would you even be doing that on the frontend?

>>70952812
>when i asked how to make a binary ATL tree to my friends who work in webdev and they all didnt know what the fuck was i talking about
Could it have been because you meant AVL tree?

To be fair, I never learned the details of AVL trees in my CS curriculum and I got a job just fine.
>>
Do I go freelance again lads? bored of my job of 2.5 years (senior front end), have freelanced before successfuly but got bored of dealing with clients. Thinking either try for full time remote job or just freelance and have more free time.
>>
>>70952952
Shit of course i meant AVL, still they knew what i was talking about because i showed them yt videos (and didnt fuck up the name like this time) but they didnt bother to give a fuck about it.
>>
>>70952961
>freelanced for 2 years
>worked for 2 years more
>suddenly nobody wants to hire me anymore
God fucking damn it I hope crash comes soon. Especially due to >>70952582
>>
>>70952658
Could you give me some pseudo code or something if you have time? Like I can guess what you mean, but I don’t know how the syntax would look like at all.

>>70952952
I dunno, it’s a company that makes websites accessible for the disabled so maybe that answers your question.
>>
>>70953109
>pseudo code
Not being mean anon but do you know any javascript or have you used jQuery before?
>>
>>70952936
If you want Python i'd suggest Flask, Django is just too "big", flask can do the same shit
>>
>>70953260
It does not have integrated database management tho, right?
I am writing a front-end to a database, not a static site.
>>
>>70951843
Yup, API Platform does all of that,
and it's extremely powerful
>>
>>70953402
Literally instal SQLAlchemy
>>
>>70951833
Good job Anon.
Did you use socket.io?
>>
How do i call my personal site about myself? For now its literally called mywebsite lmao
>>
>>70953402
If you want an ORM baked in, Django. Also, django is fat.

If you want to write your own and be lean, Flask and SQL alchemy
>>
is it dangerous to just forward a port on my router and expose my IP to share webpages i make with friends and stuff
>>
>>70953699
Just host your site on Heroku, its free with a DB that has up to 10k rows
>>
>>70953601
Yes. Mainly to use specific libraries. Now I can start promisifying my async callbacks that aren't really async. If I ever do another socket project I'll look into websockets or whatever that another anon mentioned
>>
Docker really is handy

>Create project that combines like 5 different programming languages
>Throw them all in containers
>Combine them with Docker compose
>Call it a day
>>
What's the best phpmyadmin alternative/trendy replacement? Preferably something with a Docker image I can put in a compose file.
>>
>>70953980
Its a lot to take in at once. I had a tool chain that did a lot of what Docker did which I felt bad about needing to replace, but once I was able to totally digest what docker (and kubernetes I guess, but I haven't delved that far in yet) can do for scaling individual parts of our stack/software across different machines, VMs, etc. it began to feel worthwhile. I still haven't totally wrapped my head around everything though, which is annoying.
>>
>>70953699
isn't this ngrok?
>>
>>70953156
I’ve built my own website but I shy’d away from using Javascript beyond making a register button, honestly.
I kinda lied earlier though, the interview was today. Got asked two questions, how to target a specific <td> tag and add a role to it, and how to change the innerHTML of an <a id=“learn>Learn-More</a> to “learn more”. Think I got my thoughts across but I ended up having to write pseudo code.
>>
>>70954208
>layered fs with shared kernel

wow, that was hard. 90% of docker use case is static linking binaries because brainlets can't into dependency management or pick a language that supports it. The rest is writing shell scripts into yaml files.
>>
Is this a good way to handle having different services running in a development environment vs production?

https://docs.docker.com/compose/extends/#adding-and-overriding-configuration
>>
>>70954350
what is your expected salary for this position?
>>
>>70954448
$30 an hour
>>
>>70954475
nice, hope you get it
>>
>>70954430
We have a system in place for dependency management, but the remote workers that we were trying to hire couldn't follow instructions/debug build failures or even send the logs over to me reliably. Also I don't want to store binaries in our git repo, and even then its not like static linking makes cross-platform compatibility magically possible. Docker solves the issue and a lot of others (that I'm sure to encounter in the coming months) in the process.
>>
>>70953109
>I dunno, it’s a company that makes websites accessible for the disabled so maybe that answers your question.
Damn I should do this on upwork. I spent a long time getting a law firm's site up to date when the new regulations came out 2-3 years ago in the US but after that I did nothing with what I learned. That company makes their money solely off of that?
>>
>>70954548
Yeah, purely off of it. I don’t think they have any competitors either.
>>
>>70954145
Alright never mind I'll just use the default phpmyadmin image. I wonder why its not Docker official? I won't enable it in production anyway so I guess it shouldn't matter.
>>
>>70954145
>>70954633
Do you need a web based solution?
I much prefer something like dbeaver, heidisql, mysql workbench, ssms when working with databases.
>>
Does anyone know if Array.map() is an ES5 or 6 feature?
>>
>>70955096
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#Specifications
>>
My client switched up what I'm doing.

Originally I was supposed to add some stuff to WordPress which I'm bad at so I charged low.

Now he wants to use something I know how to use so I want to charge more since I will be able to go a lot faster.

Would it be normal for me to void and rewrite the contract with a higher hourly rate?
>>
>>70955412
I honestly think you better ask that at reddit.
>>
>>70955574
because the spacing? I space like that because the reply box is so small and it helps me read it better. Also it looks better than having one really long line.
>>
>>70955412
Depends, did you sign anything yet and does he know you set that price because of that reason?
>>
>>70955412
I've told clients before that I charge differently for more intensive work. Are on-site, only ever take on a single client, or they've got a low cap on hours/week? If not, just bill them appropriately. Don't bean count your own hours to minimize what you make.
>>
>>70953699
Sharing your ip means two main vulnerabilities. IPs give away your general location, and if you've got an open port with a known vulnerability they can exploit it. Both are pretty low if you know the people and can do basic computer administration.
>>
How good is DJagno?
>>
Started as an intern only knowing shitty html and css in August 2018 making a $1500 monthly stipend. Got hired on as a jr fullstack dev in November 2018 for $50k a year. Just had my 6 month review and salary went up to $54k. Nice $4k raise but I'm still a jr :(
>>
>>70956720
i wish i'd earn 50k usd a year
>>
Review my code please : https://www.codewars.com/kata/noobcode-01-supersize-me-dot-dot-dot-or-rather-this-integer?utm_source=newsletter&utm_medium=email&utm_campaign=weekly_coding_challenges&utm_term=2019-05-14

function superSize(num){

let arrayString = num.toString().split("");
let arrayInt =[];
//Convert to int so I can sort them
arrayString.forEach(function(element){
arrayInt.push(parseInt(element,10));
});

//Sort the array , reverse the order , join them and finally convert them to Int
return parseInt(arrayInt.sort(function(a,b){return a - b }).reverse().join(''),10);

}
>>
>finally get contract at $50/hr. after years of searching
>easy work, but unfamiliar platform/template language (PHP)
bros, I can't fuck this up. Halp.
>>
>>70957710
Are you working with WordPress too?
>>
>>70957962
Not wordpress, but something similiar. How is wordpress for you?
>>
>>70953723

`${true && 'big'}`
>>
>>70957566
function superSize(num) {
const arrayString = num.toString().split("");
const arrayInt = arrayString.map(str => Number(str));
const sorted = arrayInt.sort((a, b) => b - a).join("");
return Number(sorted);
}
>>
>>70958601
I see. I gotta practice more.
>>
File: fbf.png (78 KB, 250x250)
78 KB
78 KB PNG
Got a stupid question to know how fucked I am. Not gonna lie, it's for school.
I have 2 weeks and half to make a simple e-commerce wich means just doing the product lists pages, the product page, a login system, a CRUD for the products and customers and a cart.
I don't have to deploy it or make a real implementation of a payement system and stock management, just basics operations will do and I just need to run it on my computer to present it to my teachers.
All that with Angular and Spring Boot for the backend.

I don't work, I don't have school and I don't have to stylize it in a certain way. So I'm going to do that all day long from now on. Already started I'm like 10% done with the job.

How doable is it on a scale to 1 to 10 ?
>>
>>70957566
function superSize(num) {
return Number(num.toString().split("").sort((a,b) => b - a).reduce((a,b) => a + b))
}
>>
>>70959249
alright then
const superSize = (num) => Number(num.toString().split("").sort((a,b) => b - a).reduce((a,b) => a + b))
>>
>>70959736
const superSize = (num) => Number(num.toString().split("").sort((a,b) => b - a).join())
>>
>>70959001
2 weeks? easy.
>>
>>70959001
I have to build a complete website in 2 days, in unfamiliar territory, with a template engine I've never seen before. You're much better off than I am.
>>
i feel like it shouldn't be too difficult to go straight into web dev as freelance with no work experience, as long as you have a portfolio proving you know what you're doing. am i being idealistic? will people care if i am fresh out of university with no real experience?
>>
>>70960370
Well having a website with testimonials and a real portfolio of client work is always going to be better than just showing off your to-do list and weather app. With that said it's not impossible to snag freelance jobs especially online if you use freelance websites that help find you work. Personally if I'm new I would learn wordpress, buy the elementor pro plugin and just sell clients pre-made templates with their content replacing the template dummy content and use elemetor to drag and drop bullshit components on the site. While you're doing this you can practice your real web dev skills, maybe actually get a real job and use the fact that you have freelance experience as a way to get noticed from all the other jrs.
>>
>>70960455
>I would learn wordpress, buy the elementor pro plugin and just sell clients pre-made templates with their content replacing the template dummy content and use elemetor to drag and drop bullshit components on the site
sounds soul crushing tbqh. i need to do my own thing or i will go postal. i could get a real job as a java codemonkey but i don't want to end up stuck in some fag "open office" silicon valley hand me down ideology skinner box. web dev seems like the most in-demand area of coding and the easiest to weasel my way into freelancing.
>>
i feel lonely learning to web dev. what do i do?
>>
How do you choose between MySQL, postgres, and sqlite??
>>
>>70955412
just dick around for a few hours
>>
>>70955585
No because they have a freelance sub with some good info.
>>
>>70961562
sqlite for offline applications or things that dont require many writes
Postgres for anything else
For cloudatabases noSQL ones either MongoDB or Firestore if you are rich

Thats all you need
>>
Been pretty busy over the past month or two, but found a couple hours a short while ago to work on Maniwani, mostly on some bugfixes and some minor performance boosts. The rampant HTTP 500s on Futatsu that were due to gevent not properly cleaning up database connections should be fixed now, and the gevent worker pool-based code is now purely sequential again, but backed by subqueries (the way it should have been originally, if I'm honest).
It's not immediately obvious in pic related, but Maniwani now outputs media/thumbnail links directly to S3/the CDN instead of outputting an URL that hits the app server before redirecting, so Maniwani installations that are CDN-backed like Futatsu should see a nice little page load time boost.
Next up on my personal todo list is extending the caching system to save fully-rendered pages wherever possible - page rendering with Jinja is currently taking up the lion's share of response time - and migrating the Jinja templates to a universal React setup, though the latter will likely take a while.
>>
I'm a complete retard and know nothing, can I get some help?
I need a local html page to get text from a local txt file on load, place it as an object, and change the font color. Last part is what I'm failing to achieve.
<object data="file.txt" type="text/plain"</object> is what I have right now. background-color works but color doesn't because plaintext. Any workaround for this?
>>
>>70961788

what are good reasons to use noSQL? almost all resources i have found on the net seem to say that noSQL is just a meme.
>>
These days do you also have to be a graphic designer to be able to sell yourself as a front end dev?
>>
>>70962655
might help a little bit, but its not necessary
>>
>>70962120
any specific reason it needs to be an object? otherwise use ajax to import it into your page and then you can style it however you want
>>
>>70962266
/*NoSQL databases - DynamoDB*/
https://www.youtube.com/watch?time_continue=1095&v=HaEPXoXVf2k

tl;dr non relational databases
>>
>>70961903
what?
>>
It feels sad that we won't have Scythian songs bros, Mongolian bros help though, but fuck, we'll never hear them sing.

https://www.youtube.com/watch?v=TsgKnb1E8jA
>>
>>70963788
Pay no attention, its a guys custom imageboard where he makes zero progress for months while the rest of us have shat out a dozen complete projects
>>
>>70959757
This still looks too understandable and maintainable for a codewars answer.
>>70962120
probably not really possible if you load it like that and also access the content.
Either request it via an http server or use a file input element to load it.
>>
>>70963270
>any specific reason it needs to be an object?
I guess not. I did say I know nothing.
>otherwise use ajax to import it into your page
Managed to get that to work after some stackoverflow searching, though I'll have to add linebreaks manually. Whatever.

Thanks.
>>
>>70964077
Okay,sure.
Why dont you list your dozen o projects you\e made in recent months?
>>
>>70964077
mean
>>
>>70961903
based
>>
I just finished implementing a loading indicator class/element that took an embarrassingly long time to design the way I want it to function... But now I can pass along callbacks to wherever the fuck I want and toggle loading states on any active window/dialog.
>>
File: work.jpg (236 KB, 800x450)
236 KB
236 KB JPG
https://codepen.io/weebdev/pen/LvPoGP

R8 babby's first project?
>>
>>70965665
>feets and inches

Madness.
>>
>>70965665
>tfw manlet
https://www.youtube.com/watch?v=H5d42w4ZcY4
>>
>>70965713
'Murica

I'll add some fun stuff for non-manlets, and a metric version later on. Trying to get caught up on some other content and gitgud at Jquery atm
>>
>>70965737
>gitgud at Jquery atm
skip jQuery, go vanilla and then React/Vue/Angular (check the job offers in your region pick what works best for you based on that)
>>
>>70965665
>>70965737

You should avoid jquery.
It was useful years ago, but all of its must have features are natively supported by now.

You should also avoid binding your events in your markup, do it in your script.
>>
>>70960645
you sound unhinged anyways
recruiters, unless blind, should be able to tell you're a red flag factory
>>
>>70965773
Noted.
Why's that bad practice, btw? Curious for muh learning purposes
>>
>>70966051
Because events added with onclick can be overwritten by other scripts.
So a sloppy written script could potentially break yours.

addEventListener lets you add multiple event listeners to the same event without overwriting the existing ones.
>>
>>70966073
Gooootcha.
Thx bby, internets++
>>
>>70966051
jQuery did what JS couldn't do at the time, but the thing is JS evolved to pretty much do everything jQuery did, so now there's no point in using an external library to do something you can do natively.
>>
>>70965665
Kek'd
>>
I find Discord's and Steam's user interfaces way beyond bad. am I turning into a boomer? by not catching up with the newer tendencies?
>>
Trying to lean Node, Express, and CosmosDB for work. I already know frontend basics so I'm really just looking for something to cover me on the backend stuff. Won't act like my JS can't use some sprucing up too though. I feel like freecodecamp doesn't have enough to really help me. Anybody know a better thing to look at right now?
>>
File: t1.png (514 KB, 704x403)
514 KB
514 KB PNG
This may have been asked earlier, but what is a good portfolio project that I could show a potential business to get hired?
>>
>>70966279
depends if we're talking entry level or other levels here
>>
>>70966295
entry, sorry forgot to specify
>>
>>70954447
Yes it is.
Even more awesome with a Makefile to create kind of aliases : https://github.com/mykiwi/symfony-bootstrapped/blob/master/Makefile

make install && make start


And you are done !
>>
>>70952582
You are way too unskilled to have a job, and I genuinely hope you don't get it, for your own sake. If you can't answer that, then you're hardly qualified for an internship/student position, never mind an actual salaried position.

>>70952812
>>70953015
The problem isn't with web dev as a concept, the problem is that it is such a broad area that you can skate by with really limited skills but still call yourself a "web dev". I don't deal with any particularly complex algorithms on a daily basis, but I definitely have both broader and deeper skills than most "web devs", just because I didn't get into the field to make a good salary, I actually learn because I'm interested.
>>
What's the easiest profession to outsource? I was thinking of taking a second from home job so I can outsource it completely
>>
I have a page that performs an AJAX request (using jQuery) to another endpoint on the same server and awaits the reply from these.

const promises = [];
for (const foo of bar) {
promises.push($.ajax(...));
}
try {
await Promises.all(promises);
} catch (e) {
// This is reached if at least one request results in a HTTP 4XX
}


Sometimes when the user has been logged in for too long, the endpoint replies with HTTP 302 Moved Temporarily when an expired token is detected.

How do I detect this? I would like to be able to catch HTTP 3XX replies using the same method as above.
>>
>>70966279
Anything moderately complex that isn't clearly made of a bunch of copy-pasted code, or from some tutorial. Make a project using third-party API, render results in a simple React/Angular/Vue app, Write tests in whatever the popular framework is for your UI library. If you want a job that also does backend work, write your own backend instead of using a third-party API and write documenation for its endpoints.
>>
>>70966640
No clue about the jQuery-specific way, but you can always disable redirects when using the Fetch API you can set the redirect mode to 'error' and it will cause the Promise it returns to reject upon redirection.
>>
>>70966215
Steam and Discord have very different UIs imo. I'd say Discord is definitely the better of the two because it has one of the most valuable properties of a UI: consistency. It looks the same on every platform, and they don't change it in a fundamental way very often. Each element is pretty self-explanatory too, so it is easy for new users to get acquainted.
>>
I remember hearing a lot about SVG and XML vulnerabilities back in the day. It seems like SVG has gotten really popular lately though. Have the security issues been addressed?
>>
I'm going to begin to show myself as a professional.

I'm going to rebrand everything under my name instead of pseudonym and start writing articles and having input on crunchbase and places like it.

I wish there was such a thing as a popular dev community. No one really looks up to developers as influencers or celebrities and that feels wrong. If authors can be celebrities and business owners can be celebrities then why can't web developers?

Only devs that have huge followings are hot girls.
>>
>>70967108
Wouldn't those vulnerabilities be for the user, with sketchy sites serving malicious files. From a developer perspective, as long as your SVGs specifically are safe, it shouldn't really matter, right?

And I've never heard anything about XML/SVG vulnerabilities, so I imagine that's no longer a concern in general.
>>
File: peanutbutter.jpg (45 KB, 644x449)
45 KB
45 KB JPG
I'd like to host my own website/blog to keep track of my progress. But I'm not really interested to get deep into web development, I'd like to keep it clean and simple. Any tips? Where do I start?
>>
>>70967121
become a hot girl then
>>
>>70967294
start with static website generators
>>
>>70966711
Thanks!
>>
>>70967294
Wordpress or static website generators
>>
What motivates you to code, /wdg/?
>>
>>70967957
Everything I try working right away. Finishing first than the class nerd. Doing it better than the class nerd.
>>
>>70964077
>>70964210
so?
>>
>>70967957
Money.

I wish I had a fanclub. Maybe I'll write some ebooks or some shit about passive income generation with web development.
>>
>>70968483
>passive income generation with web development.
h-how
>>
>using bootstrap
>mixing css and html
ishygddt
>>
>>70968548
>what's jsx
>anything wrong with bootstrap
>>
>>70968548
I don't get it, isn't it just adding classes?
>>
>>70968548
>not always using bootstrap even when there is no ui
>not installing all of bootstrap along with its JS and jQuery just to use "float-left" and "float-right"
>>
>>70967294
a fucking html file on gitlab, no need for generators
>>
>>70968509
Guess I should write the book then.

Basically you browse the internet enough and learn about things people are obsessed with. Like every board on 4chan is an obsession or area of interest. By immersing yourself a little you can find opportunities in that market for some sort of SaaS. You create it and then tell them about it. Passive flows in.

You can also email companies and ask them what software would make their job easier. If a few of the same type of business say the same thing then you've got a product. You can charge a lot more for this kind of product.

There is so much more though. Resell hosting. Freelance development with hosting where you charge more for the hosting than it costs you. Selling work on codecanyon and themeforest.
>>
>>70968744
>selling to 4chan

where to I subscribe to your blog?

real b2c goes like this, have connection in business who will pick your shitty service instead of big name service. No one will look at some shitty one man shop saas seriously
>>
i wish i could use php to write the frontend so that i could have server side rendering without so much bullshit. i dont want to fiddle with php's v8 extension.
>>
>>70968974
just use haxe and transpile to php and js :^)
>>
>>70968973
It is easier if you know someone. Everything is easier if you know someone. Reaching out and communicating with business owners is how you get to know them. Also business owners are going to work with whoever can make things easier.

If you came up to me and said you had software that could find out what software businesses need then I would buy that software even if I didn't know you.

and no, not to 4chan; to everyone.
>>
>>70966741
>Each element is pretty self-explanatory too, so it is easy for new users to get acquainted.
this is what bounds them together imo, they're both hard to get used to and aren't intuitive at all. I'm not saying they're bad programs and maybe Discord even feels overwhelming because of its wide variety of features. either way, it's still anti-intuitive
>>
>>70969504
Do you have any examples of what you mean? Looking at Discord, I'd say all of the UI elements stand out from one another. Everything has an icon, text, or tooltip accompanying it to explain what it is, and I think there is some kind of intro tour for new users (I wouldn't know for sure). Colors are fairly consistent across the app. the only thing I can think of is that there isn't a very consistent way of illustrating hierarchy, but I don't have specific examples.
>>
>>70969504
>>70969641
It could just be that you dislike the general style or theme of the UI, which is fine, but doesn't mean the UI is poorly designed, just that it isn't to your taste. In that case, the fact you feel the UI is poorly designed is because you are accustomed to a different style, so it just feels foreign to you.
>>
my god what the fuck are these frameworks.
how do you frontend guys even tolerate this shit, jesus christ.
>>
>>70969944
we live with the pain
>>
>>70969944
which frameworks?
>>
>>70965808
you have to be unhinged to consider sitting in front of a computer for 10 hours a day to be a life
>>
File: 1160625.jpg (34 KB, 640x480)
34 KB
34 KB JPG
>>70970469
>he says, as he posts from the computer he's been sitting at, watching YouTube for the past 7 hours
>>
>>70970754
>watching YouTube for the past 7 hours
That's where you're WRONG anon. I was watching
jerk off instructions
>>
File: 1556031964043.jpg (21 KB, 340x270)
21 KB
21 KB JPG
>>70970923
Instructions unclear.
Got dick caught in ceiling fan.
>>
So my work doesn't involve web development but my coworker from another unit has been trying to sell me on "modern webdev" and how pleasant it is to work on.
I wanted to give it a go and decided to reinvent the wheel and make an imageboard (I know it's probably been done a lot of times but I've no intention of running it, figured it'd be just a nice medium level project to learn the tech).

Anyway, I did some research and I settled for Python with Flask on the backend and Vue with its other components (store, router etc) for the frontend.
Does that make sense? As far as I can tell those are alright and should be sufficient but I'm not entirely sure if maybe there's something that's absolutely superior and I shouldn't bother.

Also from what I figured I'd want to make a REST API or something, now from reading about it I figured the different methods (like when you should use GET, POST, PUT and DELETE) but for the fuck of me I cannot visualize in my head what would the actual routes look for an imageboard.
Like should making a post in a thread be POST /thread/<id>/post or POST /post with thread_id in the params and basically the same for all other routes. Both make sense and I cannot figure out what's the way to go.
>>
imagine CardGenerator and Card components in React that render cards in a container.
I have my CardGenerator receive an array of objects containing the Card data as a prop, that it then maps through to generate Cards. Is it considered best practice to take static data out of props like the title and subtitle of the cards and add it to the state of each card instead of just keeping it in props?
>>
>>70971312
Neither of those routes make sense. Why would you have post in the route if you're already making a POST request? The server knows what kind of request you're making, having post in the URL is redundant. Just make a POST request to /thread/<id> if you're looking for standard REST practice.
>>
>>70972144
But if I'm going to make a post by sending a POST request to /thread/<id> then what about creating a thread? Just POST to /thread? And what about a board for administrative tasks? Post to /board? Then why creating a thread wouldn't instead be in POST /board/<id>?
>>
>>70972184
Is the board name part of your url?

For example for 4chan:
Create post:
>POST /g/thread/<id>
Create thread:
>POST /g
>>
>>70971594
Simpler the better. If they're being used as-is, then keep them as props. If you're creating a card but then changing the values, state.

>>70972184
(different anon replying)
>what about creating a thread? Just POST to /thread?
When you're creating a resource it doesn't have an ID yet. So, yes.
>>
>>70972252
>Is the board name part of your url?
Does it matter if the URL display would be purely cosmetic on the frontend side (that's as far as I understand it; I haven't touched the JS thing yet).

>>70972255
>When you're creating a resource it doesn't have an ID yet. So, yes.
But how do you associate it to a board then? POSTing just to /thread won't know the board unless you send some data in the headers/body, right?
>>
>>70972281
>But how do you associate it to a board then? POSTing just to /thread won't know the board unless you send some data in the headers/body, right?
Yep.
>>
>>70972369
Alright, that makes sense, but I really get conflicting results, some people tell me to just create convoluted nested URLs and not send any data for this in the request, some tell me to use simpler URLs but to ship extra data with it.
>>
>>70972390
Personally I'd lean towards using URL parameters but either would work. I'd probably use something like:

>create a new thread
POST /{board}/thread
>create a reply to a thread
POST /{board}/thread/{threadId}/replies

See this guide: https://restfulapi.net/resource-naming/
>>
>>70972554
I must say this is a bit confusing given how I've read multiple articles now and have gotten a very different idea of it from them, but I'll keep digging, it's nothing that I need to do right now, thanks for the help.
>>
>>70972554
>>70972576
Actually the URL would probably be
/boards/{boardName}/threads
/boards/{boardName}/threads/{threadId}/replies

Alternative resource and resource ID
>>
>>70952582
you need this
>>70952719
>>
>>70959001
if u not consider making responsive for mobile and make styling it perfect than 2 weeks is gud enough to roll a functional simple e-commerce tho. I made a site like that in a week back when i was a students but it look like shit.
>>
Is it possible to have something like hotkeys on android?
Perhaps some swipe gestures or something?

I have some pages i need to navigate between often so i made some hotkeys in js i use on my desktop, but i also often access the site from my android phone where i obviously can't press keyboard hotkeys, so the only way to navigate is through link menus for ants
>>
>>70951010
So I'm using JS and the navigator API to grab a users location, 90% of the time it works great however about 10% of the time I get 'ERROR(3): Position acquisition timed out' is this normal? is there a way to reduce this? Is this mostly a linux/firefox issue?
>>
>>70974383
Add a sticky fab that, when clicked expands to a menu?
>>
https://idiallo.com/blog/18000-dollars-static-web-page
>>
>>70976192
I work on a CMS that we sell to a certain type of business so they can make websites. One of these businesses hired a guy for 15k to link pdfs on a page. Let me tell you that the work required to do that is about 2 hours.
>>
So i just completed this laravel project and i am already having itch of rewriting it and organizing it in better way this time. How to control myself I have to deliver it to client tomorrow.
>>
>>70977045
finish it as it is, fully, then rewrite in a separate file
>>
>>70977045
I mean if you want to do extra for free i'm not stopping you, do whatever you want with your life big boy.
>>
>>70977114
actually this is my first client and most probably i will never touch this code again and no one is ever gonna read it but still i feel really bad.
>>
>>70974383
why not a normal burger menu that expands to fill the mobile screen.
Swiping can be fine too, but you have to figure out a hood way to explain it, since it's an uncommon type of input. But so are the hotkeys.
Unless it's something only you use.
>>
any nice, simple, node cms. i essentially just have to build a static site, but one of the pages needs to have club listings that the client can update themselves. will be building the front end in react
>>
>>70977553
Contenful or Prismic free tier?
But might as well use Gatsby with a git-based CMS like Netlify CMS and merge the content right into the components during the build.
(Though Gatsby can also pull in content from external APIs during the build afaik, so you wouldn't even have to query for it on every page load)

https://headlesscms.org/
>>
I have a problem.
I create a bunch of elements and add them to specific node:

for (blabla) {
document.CreateElement("p");
node.append(element)


Alle is great and stuff but I need to keep tabs on these elements in a live collection, so when says specific element is removed the collection will have null/undefined instead of static copy of the element.

What do?
i tried populating [] with them but it is static and after element removal copy s still there
>>
>>70978191
getElementsByClassName() returns a live collection
>>
>>70978254
Anon, read the question. I do not want to retrieve a collection, I already have it. I create elements myself. I want to have direct references to them.
>>
>>70978191
>>70978265
have a mutation observer observe your elements and on removal check if it is in your array and remove it from there as well.
>>
>>70978285
I guess my broken english might be an issue here.
>>
File: live.png (10 KB, 586x197)
10 KB
10 KB PNG
>>70978265
what? you said
>I need to keep tabs on these elements in a live collection
A live HTMLCollection is something very specific, that is returned by that function.
If you mean something else, then it's maybe unfortunate wording in your post.

>>70978285
this would have been my second suggestion.
>>
>>70978310
Anon, I dont need to retrieve elements, I create them myself. I have them. All I need is to keep referenes to them properly as live elements.

1. Create element myElem
2. Add myElem to Node.
3. Add myElem to collection that will be live
4. myElem is .removed() or parent Node deleted
5. myElem is now null/undefined in collection (or not present)
Capish?
>>
File: 1551297853523.jpg (29 KB, 300x500)
29 KB
29 KB JPG
>>70978338
dude
>>
>>70978338
So you want the elements be set to null or not?
Because the normal behavior is that elements are not removed or set null, they still exist in the array even after you remove them from the DOM.

If your elements are suddenly null, then your removal function does something more than just removing the element.
>>
I have a JS file I'm trying to include in another JS file that will run in node. Is there a way to import the first file without adding "module.exports = ..." to it?
>>
>>70978546
You can import a file that has no module.exports, but only the variables/functions/classes included in the exports will be accessible to other modules.
It's pretty much the "public" modifier in NodeJS.
>>
>>70978492
No, nothing is being set to null.
Ok, look, I will give unnecessary context: I have a DOM tree with elements, I add to each element button element as a child. All cool. Then DOM tree with parents get deleted/removed but for some reason my button elements still alive despite ME having zero references to them anywhere. I doubt the page script/logic actually keep that DOM tree referenced because a) iti s huge b) I see GC doing its job and memory going down after that

So, I have no idea what keeps my ustom elements alive but I need to null them out/delete them so I thought introducing collection to keep them referenced during creation loop and later when DOM pruned - delete my elements too.
>>
>>70978691
Well they are still referenced in you array.
Just how an element can exist in the array before you add it to the DOM, it will continue to exist when it is taken out of the DOM again.

read >>70978310 again. It's not about 'getting' the elements. It's about the returned value being a ***LIVE*** collection.
The ***LIVE*** collection always represents the elements, that are present in the DOM.
It's fucking ***LIVE***
>>
>>70978841
>Well they are still referenced in you array.
WHAT arrya, nibber? There is NO array, I WANT to create array/collection to keep them referenced so I can destroy them later.

But I already googled you cant destroy element
>>
>>70978888
>WHAT arrya, nibber? There is NO array
>i tried populating [] with them but it is static and after element removal copy s still there
>>
>>70976608
As long as the pdf's are numbered in sequence you could do that easily within 2 hours.
You could use a javascript loop to print a certain segment to the html of the page and add a number to it for the next one
www.website.com/subfolder/name.pdf
www.website.com/subfolder/name2.pdf
www.website.com/subfolder/name3.pdf

If it were to be with dates though then I don't know how he would be able to add them, maybe have php or something read the folder content and add the links dynamically ?
>>
>>70980426
>>
File: landing1.png (49 KB, 1152x692)
49 KB
49 KB PNG
Who can build a landing page like this real quick? Lines are borders. The right is a sort of navigation with images behind them. Under this is a footer that I'll build.

I'll give you $5-10 via paypal. I haven't fucked with HTML/CSS in months and don't feel like toying with CSS.
>>
>>70980553
Anon, just look into bootstrap tab, shit's piss easy.
>>
>>70980553
>real quick !!!!
>only offers $5-10
you could have probably had it for free, if you just asked and said you are interested about learning how to use css grid and if someone could give you an example that looked like that

are these supposed to be kind of like tiles?
>>
>>70980553
Honestly you can do that with grid I think (or even a table if you want that sweet backwards compatability).
>>
>we are allowed to listen to music
>sometimes i larp as fox mulder
>https://www.youtube.com/watch?v=_cIADV6kfTw plays while coding javascript
>act like i am actually hacking the goverment to find the truth about aliens
>it goes deeper and i am in my zone
>its dark and late because i did overtime
>see shadows around the office and lights in the kitchen going off
>its the cleaning woman
You guys do something simliar right?
>>
>>70980553
Here you go bruh
https://grid.layoutit.com/?id=7Oawjdh
>>
>>70980704
Javascript.... hacking the government. Hmz.
>>
>>70980648
I probably could have had it done for free, true. I imagine someone in here just started learning html/css a couple weeks ago, though, and getting paid for doing something this easy would bring them joy.
>>70980668
I hate css with a burning passion, anon
>>
>>70980738
>>70980553
https://grid.layoutit.com/?id=cmGKaYR
Made the content part a bit bigger so it's the same as the menu part, see which works best for you.
>>
File: 1544213321941.jpg (63 KB, 600x600)
63 KB
63 KB JPG
>>70980553
>I'll give you $5-10 via paypal
Go Pajeet Go!
>>
>>70980742
I will hack you with html mane.
>>
>>70980738
>>70980762
That's what's up bruh, I appreciate it. What bout the left side though? Do you want $5, homie?
>>
>>70980785
topkek. sorry m8s i know it's cheap, but i'm poor
>>
>>70980788
01011001 01001111 01010101 00100000 01001010 01010101 01010011 01010100 00100000 01000111 01001111 01010100 00100000 01001000 01000001 01000011 01001011 01000101 01000100 00100001
>>
>>70980810
>but i'm poor
aaawwww
>>
>>70951010
There is a web host with site #1 and a db. Can I FTP into a different site's db and put that info on site #1. How different is that from FTP'ing into site 1's host's db? No difference, right?

I volunteered to do web design for a small nonprofit and now they want me to do minor db stuff too. I'm kind of nervous desu because idk much about db.
>>
>>70980802
Well that's only the menu so it probably doesn't have to be that big, you can change the % that the sections get by changing the grid-template-columns: 75% 25%; to 66 and 33 or something if you want the left side to be bigger.
Keep the money, buy some beer or something I dunno.
>>
>>70980876
You can't access a database over FTP. Generally databases are accessed over HTTP, and for security that interface is only exposed within the network or possibly just on localhost.

So assuming you have full access to both sites, I guess you could probably export data from the other site's DB to a file, grab that and upload it to the main site's server, and import it into that site's DB. Assuming things are compatible or you have a way of importing that data or whatever.

Also assuming you're not expecting to get that data updated live, because this would be a one time transfer.
>>
>>70980893
Yeah, i'll toy around with it. thanks again anon, i'll drink a beer in your honor tonight
>>
>>70980974
Why would it be a one time transfer? Honestly not even 100% sure if I should do this or if I should tell them I just can't help them with that. I'm not an idiot but it's been about a year since I took a class on DBs and I don't want to fuck it up. I just wanted to do web design. My "client" doesn't even speak 100% fluent English. I'm not even sure if I need access to their DB to get the job done, but they keep telling me they want to give me their password.
>>
>>70981076
*sorry, I understand why it would be a one time transfer. What I meant to ask is why do you have to export the db rather than just accessing it directly and pulling stuff from there?
>>
>>70981076
>Why would it be a one time transfer?
Because you can't just directly query a database hosted on a different server (assuming things are properly set up).

If you need live updated data from another site's database to show up on your site, the best way of doing that would probably be to set up a web service within that other site in order to be able to query specific data, when you need it.
>>
webdev retard here
how do I set up a
 position:sticky 

element that stops being sticky after a while?
Basically, I want it to be sticky up to something like a third of the website, then leave the screen after that
>>
how do I make it so a text becomes transparent (aka disappears) after a certain point in an image?
I want it to disappear gradually as it reaches the top of the screen, or does this need js?
>>
How easy is it to switch web dev jobs to ones that use a different primary programming language? I've been a django developer for over a year but I find Java and C# more interesting than Python.

Say I wanted to move to a Spring or ASP.NET MVC job, would I need to apply for junior roles?
>>
>>70981659
>after a certain point in an image
Not sure what you mean by that.

>as it reaches the top of the screen
There's no way of detecting scroll position in CSS, so yeah, you'd probably have to use JS.

Look into
https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
and
https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event
>>
>>70981737
So you have only a year of experience? Probably yes.
>>
>>70981760
My idea would be to have a sticky image (or some other element) on top that applied this "transparent" filter to the text. Sorry, reading my post now it really quite confusing
>>
>>70981774
Makes sense, say I had 2-3 years experience, would the web dev 'transferable skills' trump knowledge of language specifics?
>>
>>70981631
put it in a container with that height
https://jsfiddle.net/30r5mbs2/
>>
>>70981857
thanks frend, also nice color choices
>>
I'm a mid level front end dev mostly using vanilla JS and JQuery. I want to get in to React, does anyone have any experience moving from vanilla js to React? What's the best way of getting up to speed with the component lifecycle?
>>
I want to implement some data from https://www.internetlivestats.com/ on my site, localhost (same style, a number increasing but has to stay synced with the number on that site) without paying for it (they charge $30 per counter, holy fuck) How do I proceed? I just want to learn to do cool stuff honestly
>>
>>70982151
>https://www.internetlivestats.com/
If you just want to build stuff and play with REST API's then just use from free ones
https://rapidapi.com/collection/list-of-free-apis
>>
>>70982108
>vanilla JS and jquery
i am a noob and perplexed by this since i am reading eloquent javascript to try to get into the industry,but don't the built-in features make jquery redundant?
>>
>>70982108
brainlet here with a lot of sources, what I have:
/*React super props*/
https://overreacted.io/why-do-we-write-super-props/

/*react talk*/
https://www.youtube.com/watch?v=nLF0n9SACd4

/*reac guides*/
https://www.youtube.com/watch?v=sBws8MSXN7A
https://www.youtube.com/watch?v=Ke90Tje7VS0

/*react spa*/
https://www.youtube.com/watch?v=rTjiCnFyA3Q
>>
>>70982151
>30$ for an increasing counter
lmao

Just google how many 'x' happen per day on average and run a number from 0 to that count each day, interpolated by the current time of day.
Then reset on midnight again or whenever you want.
>>
>barely knows css and client-side javascript
>starts learning node.js
Oh nononono look at his head!
>>
How do accelerators and all that work?

Is there like a hackathon accelerator where I can go with an idea, build a team, and get funded if investors like it?
>>
I have a parent element and a child element.
I add an emtpy div between them and now I want to use css only to display an image/ background image applied to that div

But the image wont show up. i can fill element with color and I can see it but no image displayed. What I'm missing?

background-image: url("muhimageurl");
>>
>>70982436
literally me
>>
>>70982473
just make sure they don't make you sign up that article where you have to sell your whole company if someone is interested in it, and look at government funding for interpreneurs... you're expected to have done a lof work to get funded usually, while some really lucky people will get funded at idea stage
>>
>>70982174
Very cool list
>>70982233
Yeah I'll probably end up doing that, will research web crawlers for fun though. I'm just getting out of exercism.io so it's definitely a challenge for me
>>
>>70951010
>mfw first job
>real estate agent
>boss ask "so anon, what are you studying?"
>"Software Engineering"
>mfw my boss asks me to make a web and intranet for the real estate company
>mfw I don't know anything yet cuz I am a first year and the only things I know is pseudocode and the very basics of html
>>
>>70982501
>>70982436
me as well plus i started learning react
>>
>>70981856
I'd say why not as long as you are proficient with your tools.
>>
>>70982552
Wordpress
for the intranet no idea gl kek
>>
Ok, nevermind, different question: can I use external resource in background-image? Let's say I uploaded image on imgur.com and the image ITSELF nowhere loaded on the mypage.com and the only reference is in CSS - will it be fetched to be rendered later through CSS or it HAS to be loaded somewhere on the page as local resource?
>>
>>70982695
the thing is, imgur particularly blocks other links to it's url, try it might let you, but what usually works is any other page that lets you upload images, yes you just grab the url of the image and put it in the src of the img tag, but with this, if the img goes down in the server permanently you'll have a broken img link
>>
>>70982695
It doesn't matter where it's from.
But I am fairly certain sites like imgur block these kind of cross origin requests, so people don't use them as an easy website asset host.
>>
>>70982743
>It doesn't matter where it's from.
So it will fetch?
I'm trying to change background-image in devtools but I guess it wont fetch it in live editing
Unless there is a trick to force it to fetch for preview without reloading page?
>>
>>70982608
>for the intranet no idea gl kek
Literally google it. I am all for developing real skills, but if you are still learning and you boss pushes you there is no shame in it. Try to read multiple sources and do it right though.
>>
>>70982755
yes
here try live editing this
https://jsfiddle.net/amoyb13s/
change the background URL from 200x200 to 200x201 or something and it will load a different one
>>
>>70982876
in the dev tools on the element I mean, not in the CSS editing box on the page
>>
>>70982883
>>70982876
it is wrapper there in <script> ofc it will work
Im talking about proper stylesheet
>>
>>70978691
So, if they are removed from the DOM, and you have no reference, how do you know they are "alive" (whatever that means)?
>>
>>70978691
I have no idea what you are trying to do or what is happening,but I have a feeling that you might need to use .removeEventListener
>>
File: maniwani-cache.png (184 KB, 1882x1012)
184 KB
184 KB PNG
Maniwani (or my local branch of it, anyway) now has whole-page caching. For catalogs, a pre-rendered copy is returned until a thread is added/bumped/deleted, and for threads, a pre-rendered copy is returned until the view counter increases by a user-specified amount. This makes response time much faster and roughly constant regardless of thread size (a large thread on futatsu.org that took about 440ms to generate a response now takes 21ms) until the view counter increases enough that a new render is generated. The system should still function without modification after the move from Jinja to React, though I think the contrast between a dynamically-generated page and the cached version shouldn't be so stark.
There's relatively little extra effort from this point to get etag support, so getting the application server to properly return 304s where prudent is next. I might try to finish that off this evening, but I'm pretty happy with what I've done today already, so I may just merge and work on etags some other time.

The picture shows how the view counter now skips a little bit depending on how large the margin between the true view count and the view count recorded in the cached render is before Maniwani decides the re-render the document. The margin is stored as a ratio; the reason being that the larger the view count gets, the longer Maniwani will hold onto the cached renders - which should increase performance for popular threads while still keeping a relatively honest view counter for new/quiet threads.
>>
After 4 months, I managed to learn HTML, Basic CSS and Javascript. I am learning PHP but I've been reading I should learn how to use a PHP Framework ASAP.
I've read I should avoid Laravel like the plague and learn Zend. Is it really true?
>>
File: _1.png (33 KB, 231x550)
33 KB
33 KB PNG
I need help deploying my express + react app to heroku. I'm pretty sure it's looking for a file path that doesn't exist. This is my first time doing this. I have googled the error and followed the top stackoverflow, but no luck.

This is my index.js not in the client folder.
https://pastebin.com/6QGK981z

Heroku is giving me this error:
Error: ENOENT: no such file or directory, stat '/app/client/build/index.html'
>>
>>70984393
Are you running the build of your react app at all? I'm not sure how you configure it for heroku but it would need to run "npm run build" as a script to create the files in your build folder before it runs the server.
>>
>>70984366
No. Laravel is a good framework and many libraries for enterprise use.
>>
>>70984366
You should avoid PHP in general.
>>
>>70986070
not an option anymore
>>
>>70986070
PHP is objectively better than node.js in any medium-large sized projects.

The worker-per-request model is just much more stable than relying on a single threaded process to reliably serve requests, not drop all connections if it crashes and to not cause memory leaks.
>>
So I've got a domain and have messed around with some html, how should I go about actually hosting tho? It's just a little joke site for me to goof around with and show to my friends
>>
>>70986779
If it's just static HTML, you can host on Github Pages for free. You should be able to find a tutorial for doing so pretty easily by googling.

If it involves backend code(e.g. PHP or Python or Node or something), then you need an actual host. I think you can host small stuff for free on Heroku, or you can get a VPS like Vultr, DigitalOcean, or Linode, for a couple bucks a month, which can hypothetically host as many sites as you want.
>>
File: flanders_blabbing.gif (1.88 MB, 300x225)
1.88 MB
1.88 MB GIF
>>70986070

What's so bad about PHP? It doesn't conform to your ideal language of preference? I guess we should all just go fuck ourselves and write everything in x86 assembly, eh?
>>
>>70986130
>>70986947
>>70986587
is it possible to use puppeteer or phantom.js with a PHP server to scrap other javascript based sites.

just asking for fun, because I am not switching from node
>>
>>70987268
>with a PHP server
Puppeteer isn't meant to be used on the server. It's mostly meant to be a frontend build tool, so its interface is for Node.js in order to be a part of the NPM build ecosystem, plus JavaScript can tie into the existing browser APIs seamlessly.

So if you're looking to scrape sites with it, you should do so in batches, caching the data. Definitely avoid doing any puppeteer stuff on each request.
>>
>>70987401
>Puppeteer isn't meant to be used on the server.
stfu lol, I am gonna use it however the fuck I want.

Also, you are not explaining how you would scrape sites that only work with JS enabled with php.
>>
>>70971312
Your API endpoints should look like this
'/board'
GET: get index of boards on site
POST: create a new board (omit this if you're not going to have that functionality)

'/board/:board_id'
GET: get the board of id (ie all the OPs)
POST: post a new thread to board id
DELETE: delete board board_id

'/board/:board_id/:thread_id'
GET: get OP post and all replies to thread id on board_id (or just OP post and return the replies separately below, depends on how you design it)
POST: post a reply to thread_id on board_id
PUT: update the OP post (that's how I structured my image board, all OPS are also a thread object)

'/board/:board_id/:thread_id/:reply_id'
GET: get the reply reply_id
PUT: update the reply reply_id :thread_id on :board_id
probably don't need a post for this one
You could then configure your vhost to route all requests to yourdomain.com/api to your backend server

So if you want to get the content that would be on boards.4channel.org/g/thread/70951010, you make a GET request to https://4channel.org/api/boards/g/70951010. if you want to post a reply to the thread, you make a POST request to https://4channel.org/api/boards/g/70951010, etc
>>
>>70987505
that is just bad
>need to use plural "boards"
>impossible to figure out what those wildcards are

"/boards/:id/thread/id" is readable
"/boards/:id/:id" <-nope you don't know what that second wildcard does
>>
>>70987417
So for each request to your site, you would be launching a headless browser, making a request to a website in that browser, waiting for that page to get its JS and data resources, waiting for those resources to parse, run, and render the thing you want, and then you can get that data, close the browser instance and return your data to the user.

Anyway, to integrate it with PHP I guess you could just have a Node.js script which invokes Puppeteer etc. to get your data, and then returns the data via stdout or whatever, and then in your PHP code you could launch that process like a normal shell command, like `node scrape.js` or whatever, and then returning to the user once you get that result. I'm not sure if that's the best way of doing all that since I wouldn't do it that way.

Have you considered looking through the site and reverse-engineering it enough to be able to scrape the data more directly? The JS isn't doing anything that you couldn't replicate in PHP or whatever. This way you could avoid running a browser at all, which is a lot of overhead.
>>
>>70987554
I am just scraping my own site to get a screenshot of the landingpage for graph-ql img tag.

And obviously it's cached. Only gets activated once the landing page changes.

But I've used it as well to login to websites, obtain auth-token for their api and fetch data via api. There are many usecases for it..
>>
>>70987601
also, talking about phantom.js... never tested puppeteer on the server (but probably works the same)
>>
File: 1557800405848.gif (23 KB, 664x305)
23 KB
23 KB GIF
Do you need to understand the basics of frameworks other than yours as a web developer?
Say I want to learn React after JS/CSS/HTML.
Do I have to bother with jQuery?
>>
>>70987601
Ok, that makes more sense. If all the posts I've been replying to are you, then "other javascript based sites" in >>70987268 makes it sound like you're scraping data from third party sites.

If it only changes when the landing page changes, then maybe consider making a part of your build/deploy scripts, which could be outside the PHP code. Otherwise I think the solution of just running a .js script via a shell command would work. Also there might be others doing this or similar things, so you could look for a PHP wrapper for Puppeteer or PhantomJS that has enough functionality to work for you.

>>70987633
You don't absolutely need to, but if you ever have to migrate from one library to another, or find a stackoverflow answer which uses jQuery and want to understand it enough to translate it to vanilla js, it can be helpful to know what you're looking at.

I wouldn't invest too much time in worrying about it, but this document has some of the basics of jQuery if you want to look through it now, or save it in case you need it in the future:
https://learnxinyminutes.com/docs/jquery/
>>
>>70987807
Thank you loads.
This is one of the best generals on this website.
>>
>>70987633
jQuery is a utility library that is somewhat deprecated now due to widespread support of es6 on modern browsers.

React, Vue and Angular are similar in the sense that they're component based frameworks that declaratively describe the UI.
If you picked up one, it shouldn't be too difficult picking up another.
>>
Is there a short version of how Angular works and how to get it working on my application.
So I got a github project that uses it and it works great.
I want to create a new project and copy paste everything so i recreate it but idk what it is exactly
>>
File: 1550628998151.jpg (41 KB, 796x1026)
41 KB
41 KB JPG
>>70983545
Wait what?
If the hmtlelemeny/node gets yanked by GC the attached eventListerner wont?
>>
File: 81gtKoapHFL.jpg (284 KB, 1352x1701)
284 KB
284 KB JPG
I'm reading the design patterns book. That is all.
>>
>>70989090
It is a javascript framework. You need a lot of boilerplate to get it to work, just use the angular cli and once you make a boilerplate project just copy everything
>>
>>70989318
Is it actually useful in JavaScript programming?
>>
>>70989359
Didn't they publish an updated version recently with examples in js? If so then it's a great read.
>>
Should i learn gatsby?
>>
>>70989371
Sorry i think i got it mixed up with Fowler's Refactoring.
>>
>>70985372
>https://pastebin.com/6QGK981z
I have this in the package.json for my express.
"heroku-postbuild": "cd client && npm install --only=dev && npm install && npm run build",

I've also build the files locally and tried to push those.
>>
>>70952582
I'm a bit rusty but I think the first could be done like this:
$(".skip").click(function() {
$("#main").focus();
});

And then the second like this:
$("a:contains('learn more')").addClass("learn");


Can someone verify that these are good answers and I'm not just talking out of my ass?
>>
File: 1558090436787.jpg (90 KB, 792x528)
90 KB
90 KB JPG
>>70989280
Anyone?
Do I really need to manually remove event listeners from orphaned/detached elements that will be deleted eventually by GC?
>>
My knowledge of javascript is extremely limited. What does this do?
export const getBacklog = () => async dispatch => {
//some code
}

I understand that "=>" is similar to a lamba function in Java in that it's shorthand for an anonymous function. However the fact that there's two of them here confuses me. I'm assuming that you're replacing the implementation of the first anonymous function by another anonymous function. If so, why?
>>
File: 1439849632074.png (151 KB, 449x442)
151 KB
151 KB PNG
I fucked up big time.
went for a temp employment company, and told them more skills than I actually have. Can you learn node in 5 days?
>>
why ask for email confirmation on user registration? What is the point? To send spam or just to get password reset working?
WordPress wants it by default, it seems, and I'm pretty baffled as to why the fuck
>>
>>70989974
Yeah you can.
>>
>>70990117
how about node + react?
>>
File: sssss.png (1009 B, 413x279)
1009 B
1009 B PNG
on Linux you can put your static files (CSS/JS) in
/var/www/html/


but where is this location on Windows?
>>
>>70990152
You mean making react work with node or learning react from scratch as well? First case it's nothing, second case you fucked up big time but i'd say in 5 days you can still get on the basics.
>>
File: mig.jpg (17 KB, 300x224)
17 KB
17 KB JPG
>>70990172
the 2nd. I expected them to take 2 weeks at least.
>>
>>70990437
How the fuck you managed to get the job? Anyway i'd reccomend you watch Mastering React (Mosh Hamedani), at least half of it.
>>
>>70987633
Not really. And even if you ever have to use it somewhere, it's not like you have to 'learn' jQuery in the same way you had to take time to learn the ins and outs of React.
>>70989484
If React is your thing, then yeah.
Seems like it has already established itself as de de-facto React SSG.
>>
>>70961217
Have a gf.
>>
Okay. I have a problem.

My extension injects some javascript and css this way:

https://hastebin.com/obefofukav.coffeescript

css has this:

.myClass { background-image: url("http://cool-url-to-svg"); } 


PROBLEM:
> Refused to load the image 'http://cool-url-to-svg' because it violates the following Content Security Policy directive: "img-src 'self' data: //bunch of allowed namespaces here".

How can I solve this besides:
https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security

because if you do it through unsafe css inline everyone will shit you to death even through there are no known cases of executing javascript through inline css but whatever fuck this gay earth
>>
>>70990955
hm, does the background change often?
If not, you could just include the image in the extension and inject it from there, instead of fetching it from a different origin.
>>
What is the advantage of using rest/spread operator shit instead of passing a normal array? I cannot see a single one.
>>
>>70991079
I dont think I can because style is injected. I tried using `chrome-extension://id/icons/image.svg` but no dice
>>
>>70991156
read the manual page on manifest.json
>>
>>70991192
As I said I tried that already.
But it is irrelevant because I need to use external url anyway
>>
>>70991201
you didn't, though.
>>
>>70991156
If you can inject a style, can't you inject it as a Base64 string?
>>
>>70991221
What would this accomplish?
>>
>>70991106
Give an example of the cases you are thinking of.
Spread operator isn't used instead of an array. You spread the items into something else, where you normally could only use individual items.
It's just syntactic sugar though. Nothing you couldn't also accomplish with other Array or Object functions.
>>70991239
it wouldn't have to send a request to fetch the image from somewhere, since the data is present in the style declaration itself.
https://jsfiddle.net/3c1k2sjv/
>>
>>70977767
thanks fella
>>
>>70991288
>it wouldn't have to send a request to fetch the image from somewhere
at least that's what I guess. No idea if the content security policy still complains in this case. But if it solves your problem, then why not.
>>
I can't get my monkey brain to make a table with two columns. One for the keys and one for the values in those keys.

Do I do it in css or javascript? Right now I have this.

 for(const key of Object.keys($scope.sex.data[entry]))
{

let row = thead.insertRow();
let text = document.createTextNode(key);
row.appendChild(text);


}
>>
>>70991321
>>70991288
>it wouldn't have to send a request to fetch the image from somewhere, since the data is present in the style declaration itself.
>https://jsfiddle.net/3c1k2sjv/

This works but kinda... I dont know, ugly and dirty?
Thanks though I will consider it as a fallback if I wont find answer
>>
>>70991345
assuming you really want a table and not some divs
>have a <table> with a <tbody> in your HTML
>for each of your key/value pairs, create a <tr>
>put key and value as individual <td> into the <tr>
>stuff your filled <tr> into the <tbody>
>>
>>70984393
Try putting the client folder in a folder named app
>>
>>70989973
getBacklog when is called actually returns the async function that you see, meaning that could have various vars getting that async function assigned, anyway, i don't get it would be necessary to do that when you could just assign the async function to getBacklog
>>
What's the expected salary for a full-stack web dev internship? in upstate new york (not nyc)
>>
What are web interviews like? Do they have you solve whiteboard problems or what? I'm from a more swenge background but I have an upcoming interview and would like to know what your experiences have been.
>>
>>70992135
Well, in my case I got a job as a junior php development last year.
I had an normal interview and then a technical test (code a to do list)
>>
making a many-to-one. Should I make a pivot table or not? Not really, right?
>>
>>70992087
Internship? Nigga you need to get yourself a paid job.

Okay, I'll tell you what my first web dev job paid me - £17k initially ($22.36k in USD, apparently). Bear in mind salaries tend to be higher in the US though. After nearly a year I went up to £25k ($32.89k USD).

You should probably just look around for yourself though what jobs in your area will pay.
>>
Is it possible to make a shop website with login and whatever with GraphQL and some simple non-sql database?
>>
>>70992301
Fucking this
Also check in you area which language is mostly required in your city. In my case there are more jobs for PHP developers. Node.js is on the rise so I am planning on learning it too in the following months (MEAN/MERN stack))
>>
>>70989974
>>70990152
>he's a fucking weeb
>and he's so fucking stupid that he lied about his experience in a job application
Fucking lmao, good riddance. We don't want degenerates like you in our industry.
>>
>>70992413
He managed to score a job though (probably not for long but still).
>>
>>70992301
>>70992356
>you need to get yourself a paid job.
I made the poor career choice of a gap year after graduating. that combined with a lack of useful network connections has made finding a real job somewhat difficult; I figure if I get an intern position it'll make getting a real job easier
>>
I'm looking to get back into web design/light development, basically putting together sites for restaurants, construction companies, B&M startups, that sort of thing. And I notice a lot of designers use a bunch of shit I just don't seem to think is necessary.

Extensive wireframing? Bootstraps? Using wordpress by default? Most sites I've seen could be implemented fully without even touching Python or Ruby or whatever implementation of js is popular this week.

Am I like those people who say high level code is silly and you should ALWAYS code EVERYTHING in assembly because otherwise you're wasting muh megabits or are most web devs just shit at their jobs.

My process is pretty much sketch -> send to client -> mockup -> approval from client -> deliver.

I can understand things like using a standard CMS but anything more bloaty than that sounds like feature creep
>>
File: 4chin.png (5 KB, 252x172)
5 KB
5 KB PNG
Need help, /g/ents.

I don't understand why webpack (I also use react-hot-loader and react-hot-dom-loader) doesn't update the content in the browser when I save any change to a file. Only when I comment out this line it works, but from what I've read the devServer should serve me new updates version when there is any call to original bundle.js.
>>
new thread
>>70992715
>>70992715



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.