/wdg/ - Web Development General

>Discord
discord.gg/wdg

>IRC Channel
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

>Frontend development
github.com/dypsilon/frontend-dev-bookmarks

>Backend development
en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

>Useful tools
pastebin.com/q5nB1Npt/ (embed)
libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
pastebin.com/4YeJAUbT/ (embed)

>How to get started
pastebin.com/pDT82mQS (embed)
pastebin.com/AL6j7GEE (embed)

>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com

Other urls found in this thread:

templeos.org/
github.com/facebook/react/issues/7293
example.com
alissa.ninja/paint/
XXX.XXX/REACT_SRC/Simon
XXX.XXX/REACT_SRC/Tic
make.wordpress.org/training/handbook/user-lessons/setting-a-static-page-as-your-homepage/
wphierarchy.com/
php-fig.org/
php.net/manual/en/function.escapeshellcmd.php
php.net/manual/en/function.escapeshellarg.php
color.adobe.com
bootswatch.com/default/
github.com/camspiers/porter-stemmer
twitter.com/NSFWRedditImage

Previous

First for PHP

Post some pretty sweetly designed sites. I need inspiration.

First for Go.

tag: golang

If i know a bunch of C# MVC will i have an easier time learning other webdevs?

node.js + angular2 is the way to go

prove me wrong

What's a good barometer for number of processes/threads? I got a 4 core VPS. Tried 4 processes/2 threads and noticed my app was considerably smoother.

As I'm the only one testing it right now I can't judge how it handles concurrent requests, but monitoring system resources shows that there's minimal CPU usage though an extra 800mb of RAM is used than when there's only a single process/thread.

templeos.org/

You'll have the concepts down. Models (data structures), Views (templates), and Controllers (routing, app logic).

Try out Go and marvel at how little bullshit you need to internalize before you can effectively write an app.

>single threaded
>callback hell
>runtime errors
>equality comparison fuckery

>angular is thoroughly infected with javascript tool AIDS

node + angular's only merit is that it is widely established (for front-end designers turned web """developer"""), easy to get a job for, and verified SEO-friendly. Google is working on front-end javascript support, though.

Go + Vue.js is the future, my friend.

>callback hell
I'm pretty sure with ES2016/ES2017 that you don't need to worry about callbacks as much since there's now promises, async/await and yield.

I just finished udemy's web developer bootcamp by Colt Steele, how do I earn money now?

How do you guys deal with reactjs license?

github.com/facebook/react/issues/7293

Start with doing some projects, if you're out of ideas there are a few android apps (like programming ideas) that can help.

Learn how to use Git and start using it with the projects that you do.

Buy a domain (.work domains are pretty cheap)

Rent a VPS from something like digitalocean or linode

Search digitalocean's guides for installing a LEMP stack

Search digitalocean's guide for securing your server with ufw and fail2ban.

Search digitalocean's guide for configuring HTTPS certificates using Letsencrypt with nginx

List all your personal projects on your site along with previews and the git repositories

Look in to how to use LaTeX and start making your Cover Letter/CV using LaTeX (moderncv or awesome cv are great starting points)

I already use git with heroku and cloud 9

Im not too keen on lemp since this course was mean stack...

thanks for the answer though

You here often?

example.com

alissa.ninja/paint/

any alternatives to skeleton?

Question about React Development on Local / Server.

Im building a React app with create-react-app for my personal portfolio. For now i cant afford a backend (my hoster allows PHP only) so I plan to make a folder/file structure on my local machine, loop through it with python, push everything to a JSON and then use this json to manage state on my react app.

{
"content": [],
"file_path": "wwwXXX.XXX/REACT_SRC/rg_prev.jpg",
"project_id": "bcfb6729-8111-4993-97c9-a1328dd69131",
"project_name": "rg_prev.jpg"
},
{
"content": [],
"file_path": "XXX.XXX/REACT_SRC/Simon Game FCC_prev.png",
"project_id": "ae3789b0-2c63-4d2b-bc7c-bc0a67ac9aab",
"project_name": "Simon Game FCC_prev.png"
},
{
"content": [],
"file_path": "XXX.XXX/REACT_SRC/Tic Tac Toe FCC_prev.png",
"project_id": "8c667c30-2830-4055-a04e-fcb17dfbea23",
"project_name": "Tic Tac Toe FCC_prev.png"
},

my portfolio component loops through this JSON and generates portfolio items in a grid with 3-4 columns with each item with its preview, tags, links etc. onClick loads an array which is stored in content and changes the content section to the right of it.

1.) you have to require() each image asset for webpack to load it but because my image assets are "unknown" i cant develop on the local node server (right?) because you cant dynamically require() images

2.) i can build my app and upload it to my hoster which works perfectly fine. Is there any way to develop with create-react-app on a remote server without having to build and upload every time i've made some changes? How do professionals develop react apps on remote servers?

3.) is there any way to automate this (i'm using webstorm)?

4.) can i use herokus free plan to build my own pseudo-CMS (with python or node) that i can access from anywhere that manipulates the content on my server?

Obviously.

Laravel made this for me
public function view(User $user, User $user)
does this make any sense? how come they're named exactly the same? How do I distinguish them from each other then?
$0 $1? those work?

func_get_args, can't you just rename the second one?

sure I can but just wondering why they're not named user and user1 to begin with

Laravel bug?

I think Vue.js deserves more exposition, it's simpler and more elegant than angular and react and doesn't require transpilers and fad techs to run.

t. web dev who has been forced by management to do a whole site in angular with management approved outdated and buggy angular plugins. never fucking again.

When/where does it give you that?

php artisan make:policy UserPolicy --model=User

it's the --model=User fucking it up
it even 'use \App\User' twice
once for the policy and once for the model

>only merit is that it is widely established, easy to get a job for, and verified SEO-friendly
So in other words, it's the only combination worth using. Thanks for the input m8!

Anyone use Python? How can I optimize?

I tested generators against for loops. They're marginally slower but apparently good for memory optimization.

It looks like Python is never going to be as fast as Node which I don't necessarily mind, though I might test PyPy out.

Very simple one but my vocab is shit.

How would you call it when you scroll and it changes the page? reroute on scroll? Any framework, or even React I don't care.

trying to find a demo of something like that

It uses the HTML5 History API, so start there, don't know if there's a specific name for what you're looking for.

here, I think I fuckin did it after all these hours

EXPLAIN

SELECT
t.TId,
t.TName,
t.TAuthorId,
u2.UName as TUName,
t.TDeleted,
p.PId,
FROM_UNIXTIME(p.PDate/1000)AS PDate,
p.PAuthorId,
u.UName AS PUName

FROM forum_test_posts AS p

LEFT JOIN forum_test_threads AS t
ON t.TId = p.TId

/*
LEFT JOIN forum_test_users AS u
ON t.TAuthorId = u.UId OR p.PAuthorId = u.UId
*/

LEFT JOIN forum_test_users AS u
ON p.PAuthorId = u.UId

LEFT JOIN forum_test_users AS u2
ON t.TAuthorId = u2.UId

ORDER BY p.PId DESC
LIMIT 50

the only thing I've noticed is how I have to limit it otherwise it never finishes but it's getting the job done, any problems you guys can see with this query?

>redid 15 files because I had one namespace wrong and I did not realize
not even salty

best way to get webm duration in php or js?
>i dont want to include some masive script if it is possible

Call ffmpeg from PHP
Or create a video element and check the length in seconds.

thanks had a look it's not exactly the thing but will keep looking around

Anyone using/used an uncommon language or tool or library for web dev? How's the experience?

how long did it take you to do the course?

Is there any profit in making Wordpress themes?

yes i know i can call ffmpeg, ffmpeg is already in use for this app
>using it to create gifs from videos for thumbnails
how could i grab just duration value from ffmpeg output?

I have video element, i use video.js so duration value cant be found

>cloud 9
I'd like to signup there but it requires creditcard#

What about heroku? is it free?

/r/place is a pretty cool idea.

Reminds me of the milliondollarhomepage

I'm using node and express, I have a route which gets a count from one table and renders the page using jade, when I visit the page normally it works but if I start opening alot of pages at the same time the app just freezes and never stops loading. How do I even begin to debug this

Is there any way to use Visual Studio on my machine and edit files on a hyper-v virtual machine or remote server?

Just getting into wordpress.
Still tinkering around with the CMS.

How do I set up a landing page as the main page.

All I can do in the CMS is fiddle around the edges; add more or less blog posts.

What i want is to hammer my already made HTML into my page. Which file do I edit? What option do I set?

make.wordpress.org/training/handbook/user-lessons/setting-a-static-page-as-your-homepage/

wphierarchy.com/

share the files and open them as usual.

Need some advice /wdg/.

I've got 2 options
>stay in shitty paid junior web dev position while gaining a university grade qualification and has high job security and flexibility and i use standard wamp stack
>move to junior dev position with 3 times my current pay BUT low job security and can use wamp stack but also must learn java and will be under very high scrutiny and pressure due to regular work reviews

what do?

your best option is to kill yourself.

>t. jealous neetfag

second option, job security is a relative concept in web dev, you'll never stay unemployed for too long
also java is prety gud

Not employable wannabee here, but I agree with , you'll learn more and that pressure will be good for you if you can handle it.

Certified best stack:

React + Mobx front end. Try it and you will feel like a retard for ever using anything else.

Whatever the fuck you feel like back end. I like AWS lambda (js or python), Koa (js), and Flask (python). Go also looks pretty cool too despite garbage-tier null handling

is this proper way to create class?

make $video private, don't set it in your setPlay method, use the existing one from the constructor.

Anyone ever made a new site for a local company and then offer to sell it to them?

What is the difference between VS Code and Visual Studio?

>google

Is this UI too bloated or ugly? The advanced board settings only show up if you click the button.

Too many fields at once, use tabs or something so you only see what's related to what you want to do.

Yeah fuck cloud 9. Fucking amazon wanting credit card numbers for non-premium accounts, I've never heard of such fuckery in my life. I wouldn't use them out of spite.

Yes heroku is free for your first dyno. For more than that it costs money.

Looks like this on pageload. I mean it will only be used a few times and doesn't need to look pretty as its admin only.

It has some kind of descriptions atleast lel

Still too much, if you're bothered by not having good UX you should keep the focus only on what's important.

As it is right now you have to read through all the fields before you know what does what.

I'd make the buttons stand out a bit more as buttons also, when disabled they look like text fields.

Yeah I'm gonna restyle them. I'm just a very bad UX designer, it's the part I hate the most desu.

I'd try to keep new/rename/delete buttons in the same order for each section. And try to make them look more distinct. Maybe use links for the non-destructive actions (e.g. show boards, advanced settings)

That's a good idea, I will make the destructive actions associated with red, the changing actions neutral like and the creative actions as green.

Makes sense too to fix the order, did not even think about that.

I read the UX board on SE when I have some time over at work, helps with the thought process.

You should follow PSR's for your coding style.
>php-fig.org/

Also you're sanitizing and properly escaping $video, right?
Else, read about command injection.

>www.php-fig.org
tnx for this

>Also you're sanitizing and properly escaping $video, right?

i dont rly know what this means but i use trim and strip tags on $video.

I feel like it looks like total shit now. I really can't design for shit.

>php.net/manual/en/function.escapeshellcmd.php
>php.net/manual/en/function.escapeshellarg.php

dood pick a few colors using a color wheel and stick to them
use something like this color.adobe.com
maybe darken / lighten some colors if you really need more than 5 colors for those buttons
i can't into graphic design but this should already help

You're the reason why the likes of Bootstrap ships with a bunch of default shit. Use it to your advantage instead of creating a hideous monster.

text editor with features vs full fledged ide
basically

spring boot + angular frontend

what's your opinion

That looks cool. I will create a color scheme then and keep all buttons blue.
I know but I'm not using bootstrap. I do mobile support with pure CSS. And yes that color scheme is an ugly behemoth.

Hey, I am new in this and I am doing a personal project in php.

I have a database with a total of 75 char entries. I already run a function to remove all the stopwords from it. Now I need to take a random entry and compare it with the rest of the database and get the 4 most similar to the random one out of it.

Any suggestion on what could I use for the similarity? Should I search for some algorithms or simply use the integrated similar_text function?

Even if you're not using Boostrap (or alternatives) look at their default situation. As inspiration. bootswatch.com/default/

Notice how it all looks uniform. How even though the colors are all different, they operate on a tetradic basis, and the colors hold obvious meaning (success = green).

You do not have to reinvent the wheel in design, doing so typically leads to really bad results.

Pretty new to web development. Can anyone give me a possibly simple resource to host and display images. I'm currently using heroku and node.js Also looking for a comment system as well that isn't disqus.

I'm looking to have the photos and comments be in small separate squares around the page.

spring boot is comfyness made into a library
not sure why angular seems to be used this much with spring boot, it's an ok front end framework anyways

Pythons advantages come in less for any UI frontend stuff, but it excels in automation because of how easy it is to write, leading to a vast amount of libraries. I am a backend automation guy and Python is my bread and butter, but my Nodejs guys on my team handle the forward facing things.

I'm convinced now. I'll use bootstrap for these things, that will save me a lot of nerves.

hey fellas, i've been away from webdev for a while. is react still alive? what are the latest trends?

React is king of frontend right now for sure, don't listen to the vue babbys and Angular shills

anyone into /functional JS programming/ here?
I have an array of functions with the same signature, and I want to reduce them all into a single function. How tho?

There is nothing to deal with

>for sure, don't listen to the vue babbys
vue has superior MIT license without all facebook bullshit though, is react much better still?

doesn't make node good

lots of production code is just waiting to run into runtime errors

Not really sure what it is you are asking for. If you want the single function to return an array of the results from the functions then you can do this:

const first = (a, b) => a + b;

const second = (a, b) => a - b;

const combine = (...functions) => (a, b) => functions.map(fn => fn(a, b));

const combined = combine(first, second);

console.log(combined(5, 2));

>node is not good

how did you fall for this meme?

I use a lot of LINQ and Entity Framework with C#, are do the other webdevs have similar things?

>are do
Do*

I think laravel has a query builder similar to linq and you can generate a database with code first.
Java 8 has streams now which work similar to linq, but no idea if it works for SQL as well.

having an education in computer science and learning all about software bugs, not to mention experience using scripting languages and their runtime errors

node is the meme

Can someone guide me how to install a php stemmer on windows because it seems I am an actual retard. I found this stemmer among many others github.com/camspiers/porter-stemmer

>install composer
>create a compose.json with the code in the folder the rest of my code is
>run composer install
>try it
>Fatal error: Class 'Wamania\Snowball\French' not found in C:\wamp\www/the folder

If your best argument against nodejs is lack of compile time checks I feel bad for the time you wasted getting your 'computer science education' where you learned 'all about software bugs'.

If you want handholding in JavaScript there are options for you - I actually have professional experience with JavaScript (unlike you), and I would never in a billion trillion years give up the flexibility and development speed JavaScript provides by using TypeScript or similar tools.

Your sole argument against nodejs is something you can literally just opt in to. Come back to me when you actually know what you are talking about - the echochamber that is Sup Forums is not qualified to discern what is good or not, so you should probably stop letting them decide what is good or bad for you.

not him but which tech community are you from mate