/wdg/ - Web Development General

>Previous thread
>Free resources to get started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good introduction (independent of your browser choice)
developer.mozilla.org/en-US/docs/Learn
freecodecamp.com/
codecademy.com/

>Further resources
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
github.com/kamranahmedse/developer-roadmap - Roadmap
stackoverflow.com/ - Developers asking questions and helping each other

>Tools
jsfiddle.net/ - Use this and post a link, if you need help with your code
caniuse.com/ - Check browser support for front-end web technologies

Other urls found in this thread:

e-grotto.faith
phaser.io
fonts.google.com/
strawpoll.me/14070765
addyosmani.com/resources/essentialjsdesignpatterns/book/
hostingadvice.com/blog/comparing-node-js-vs-php-performance/
youtu.be/hER0Qp6QJNU
codility.com/programmers/lessons/1-iterations/binary_gap/
codepen.io/user/pen/aLVqLO
twitter.com/NSFWRedditGif

if anyone here is into web art, cyberpunk stuff, web 1.0 and occult / esoteric stuff and looking for a subdomain to host their site on, feel free to join the E-Grotto Collective.

just email GOD and he'll work something out for you

e-grotto.faith

What's a good way to make a browser game?

There are a few Javascript frameworks I'm currently experimenting with

Anyone knows if rerouting all non static traffic to the index.php file in an nginx website affects performance worse than not using redirection? in the sites-available config:

# reroute all non static req, to index.php
location / {
try_files $uri $uri/ /index.php?$args;
}


does slows the server down more than just letting it try and open the requested file?

Trying to learn react + redux.

Having some trouble making my components respond to state change.


What are the best tutorials + must read code for react and redux?

I'm interested in this too. Which frameworks are you experimenting with?

What are some good programming habits to pick up?

I've been creating my own projects/websites and trying to learn stuff by myself+etc. While I'm learning syntax, I want to know how most professional programmers structure their code. Do I always want to make a separate file for style?

What's the fastest non-micro php framework?

I want to make a webpage to show the works of my uncle who is cabinetmaker.

Are there any easy web platform to make a personal website with photo gallery and shit?

Maybe an e-shop for him?

Wordpress?
Shopify?

I need some recomendations pls.

phaser.io

Shopify if you want something fast. For wordpress you will need to buy premium shit to get things done

Stop thinking about it and just make new folders and files whenever it makes sense. When you're learning the syntax you just want to make things work first.

Any good guides to learn debugging.

I just read the console and use intuition. Can take time!
I never actually learned to do this in any organized manner.

What is the best editor fir programming

Would you guys happen to have an answer to this ?

Laravel

Squarespace

I tried CreateJs and it looks easy enough

Is anyone here good with laravel? How would I make a shopping cart with laravel? With vanilla php i can do it using session variables but im not sure if you can use them with laravel. Are you suppossed to use session variables with laravel?

Laracasts
Google
Docs

Laravel is almost the absolute worst for execution speed. Phalcon is probably the fastest, but it doesn’t hold your hand, and while he documentation is expansive, there aren’t a lot of tuts. Codeigniter used to be good, but I think they are turning it into laravel lite.

You would probably composer install one of the five hundred bloated shopping cart libraries already written. Barring that, you can access the session from the dependency injector.

I always feel anxious writing funky modern js, scared of O(n^n) hiding around every corner in hip fp constructs

>Are you suppossed to use session variables with laravel?
You can if you want to.

Don't use fp for performance intensive tasks (in javascript), otherwise it's ok

I've got 3.5 days between lectures and im not working on anything, got no job so far. Only made basic sites with HTML,CSS and JQuery.

Dabbled with node.js making the basic to-do and weather apps. Trying to find a web dev job but what the fuck do I look for? Which stack is good to learn today??

LAMP, MEAN or some other new shit? I just need to do something during the week and no job, project or side learning is killing me

Where do I host these meme javascript frameworks for Node.js and React apps/sites?
My basic hosting only has PHP/wordpress shit

any vps hosting

What font is this?

LAMP is dead unless you wanna work in a shit hole.
MEAN should be renamed meme

Enterprise (Hospitals, Banks, Ect) Spring or ASP.NET.
Start looking at companies in your area for what they want.

Pic related. It's the life of a web developer.

Please respond I beg you

fonts.google.com/
find it nibba

Anyone here uses angular and its cli? the root styles.css is the global stylesheet, but where do I put stylesheets like normalize.css or a custom grid system? In the assets folder? Is it better to import them from the CSS or use a link in index.html?

Does anybody want some help with their current project? I'm a bored learner with no interests in my own projects, so instead I'd rather just help someone else.

I'm having trouble learning margins and the shit about the box method in css. is this normal to have roadblocks when learning webdev or am I stupid

also I bought these books since I heard they were good

>Start looking at companies in your area for what they want.

For all of you learning on your own chasing a job, do this. Different cities have a different market. Some are super startup-ey (Berlin right now, Sillicon Valley?, etc) and demand tons of python/ruby/go and always javascript. Other cities are more big corpo and they want C#, Java, etc.

no idea about redux, but I thought codecademy's react course was good enough, albeit very simple and retard centered at first

I'm in london?

Would deciding on Webpack, React work? And what do people use for databases these days mySQL or Mongo?

Been seeing a lot of jobs asking for AWS I dont know what they mean by that exactly i know its their web services but what about it is so special that actual hosting is in the job desc.

This.

But if you really want you can look into MVC.

You can put them in the same folder and then add them to the styles array in the angular cli json

>works of my uncle who is cabinetmaker.
Totally read that in the borat voice.

.Net or Java but really C# is hot and will teach you best practices pretty easily

read 'thinking in react' first. then read the redux docs

Learn Vue, fuck the masses.

man there are some really high paid contracts in London for React. Focus on that

Just changed collation on 1GB table...

What do I do until it finish itself?

Yh I've noticed react is very popular not just with start ups but big established companies in the canary wharf(financial) area. Paying BIG bucks

Which is better /wdg/, Javascript or PHP?
strawpoll.me/14070765

Anything is better than PHP, idiot

What are some good resources to learn design patterns, particularly in JavaScript syntax?

addyosmani.com/resources/essentialjsdesignpatterns/book/

Come on dude, first Jewgle result

What's wrong with PHP?

Latest performance is not that bad, when you actually do something in it it's done fast opossed to assembler.

What do you mean? O(n^n) in particular is a pretty big fuckup, I don't think you could really accidentally manage to write code that bad..

>Performance argument
PHP performance is a complete meme, considering they do the shittiest thing they can do: COMPILE the fucking webapp PER REQUEST. What the fuck is that even?
>Only alternative is lower-level.
yeah, right, because nodejs / go / python doesn't really work for webdev? Is that the argument?

i got a perhaps stupid question, but i couldn't find an answer anywhere:
what's the point of loading style sheets with webpack and being able to import them in javascript? shouldn't css/sass etc. apply to html and not javascript?

> Compiling per Request
If your aproach to setting up enviroment looks like 'sudo atp get php' than maybe it does compile per request.

It's called lazy programing for a reason...

I was interested in phyton, but I can get PHP hosted cheaper per view of website than phyton...

Also some benchmarks on nodejs could be effective argument...

People are somehow affraid of performing same operations on node...

Promises and Async are good...

But, why the heck? I'm living in stone age country and there is php...

I actually love nodejs more than php, but can't see the downsides of php so hudge as people describe them...

javascript is the stuff that moves on html basicaly... webpack is compiling stylesheets into just stylesheets that are somehow optimized

yeah bro I saw one for 800 GBP a day! holy shit, wish I had rights to work in the UK because I've been using React since it came out

>If your aproach to setting up enviroment looks like 'sudo atp get php' than maybe it does compile per request.

*ahem* what?
Here's the lifecycle of a request in a typical LAMP-stack:
1. Client opens TCP to Apache
2. Apache starts PHP runtime
3. PHP runtime reads source files, COMPILES, runs code
4. Apache returns output from PHP to client.
5. Connection closes.

Other stacks DON'T do the interpret / compile / run step PER REQUEST. This has nothing to do with env setup.

>I actually love nodejs more than php, but can't see the downsides of php so hudge as people describe them...

The downsides are ridiculously huge... This compilation-per-request thing also of course means that any database connection must also be created and destroyed PER REQUEST. Which makes things even slower if they weren't slow enough...

Enviroment setup is that you are not so dumb and know there are php extensions to solve that issue... So php WON'T compile PER REQUEST.

Actually database interaction is not so huge, we've got like cached stuff. Sometimes it doesn't even have to RENDER anything, it just load cache.

Which extensions? Prove your statement

:^)

You haven't provided any benchmarks either...

What are some good node js nodes for web developement?

I'm 2 weeks in to my first programming job. I had no idea just how terrible I was going to be at it. I'm spending 18-20 hours a day working, I'm not getting any sleep, and I'm not getting anywhere. I really don't think I'm going to make it where I am. Jesus fuck. Holy fuck, I had no idea it was gonna be like this.

This is not hard to find...

Image source: hostingadvice.com/blog/comparing-node-js-vs-php-performance/

>2 weeks in
>expecting results
wat

youtu.be/hER0Qp6QJNU

Geocities is a good node, chad

I work for and stare enterprise java code designed by some space cadet architect and written by pajeet, secretly hoping that I have an aneurysm. Lucky if I write one line of dogshit java per day.

I thought had some good motivational shit built into the job for their tech dudes

I think it's PHP 5.3

PHP 7 had 56% increase in performance, and also I bet they haven't used proper code...

Only if you're a woman

Lulz, in comments everybody do some own benchmarks resulting in PHP being faster.

"This HTTP-controlled “hello world” benchmark used Zend PHP 5.6.6 with OPcache enabled."

kek

Saw him this past weekend at PHPNW

He's a nice guy, very funny

About to sit down and start my 2-hour long Codility test, which is my first interview for a really nice webdev position. Wish me luck, guys, I'll be back in a while and tell you how it went.

Break a leg

Kek, first time I've heard about this Codility thing, and I've been hired already :P

codility.com/programmers/lessons/1-iterations/binary_gap/

These are fun!

function solution (n) {
let leadingBit = false;
let longest = 0;
let current = 0;
while(n !== 0) {
const bit = n & 1;
if (bit === 1) {
if (longest < current) {
longest = current;
}
leadingBit = true;
current = 0;
} else if (leadingBit) {
current++;
}
n = n >> 1;
}
return longest;
}

You seem to have that backward. If you want to work in an SJW shithole, use some meme tech stack. If you want to have a job in a company who values getting shit done rather than showing off, use PHP.

>requests per second

Be more vague, please. This benchmark graphic is totally garbage.

How?

There is no context. What constitutes a request? There is no indication that the requests are even the same.

You know what a HTTP request is, right?
There is definitely a CRYSTAL clear indication that they are equal...

>web dev
>ever

So how the fucking hell do I solve this? Im using Django and I want the user to only be able to select a date in the future.


models:
class Post(models.Model):
author = models.ForeignKey('auth.User')
title = models.CharField(max_length=200)
description = models.TextField()
date = models.DateTimeField()


def clean_deadline(self):
data = self.cleaned_data['date']
if data < (datetime.today() + timedelta(days=2)):
raise forms.ValidationError("2 days from now")
return data


views:

def add_post(request):
if request.method == "POST":
form = PostForm(request.POST)
if form.is_valid():
post = form.save(commit=False)
post.author = request.user
post.save()
return render(request, 'archive/good.html')
else:
return render(request, 'archive/bad.html')
else:
form = PostForm()
return render(request, 'archive/add_auction.html', {'form':form})


I can't get the fucking function to ever throw a validation error

Didn't you make your own thread for this ? Zozzle

Yeah but no one on Sup Forums seems to have knowledge about Django

Seconding Squarespace for your situation user.

they are, and they have pdf's that teach you cool techniques for each section.

4 tasks, got 50% overall, starting at 100% and down to 9% as they got harder. Fml. Maybe that's enough to make it to the next interview...

you are stupid and have no idea what you're talking about
you are just repeating what other morons say

don't listen to him, he has no idea about PHP obviously

You know a request has to return something, right? Is it returning an empty response, plain text, is it making a single database query and returning data? All requests are not created equal, newfriend.

I need help with a simple contact form. Its just a basic php form from a template but when i test it, the messages arent sending. it gives a message in the site saying 'message has been sent' but i dont get it in my email.

html and php here

codepen.io/user/pen/aLVqLO

i replaced the [email protected] with my site's name. Is there other changes i have to make in the php to receive messages? or change anything in PHPMailerAutoload ?

how do I add paypal to my site?
>Register@paypal
>generate code
>paste code into site

and paypal takes care of everything?

how will I know my customer paid me? how do I keep track of the finances?
e.g. service is $10 per month, do I increase some credit field in my db and decrease when paypal pings back?

red pill me on vue vs react

>mfw i build enterprise like software for medium sized businesses using MEAN stack
>mfw when they prefer using my software instead of SAP because its "Facebook" like
>mfw when spoonfeeding normies is where the money is at

>Requires that you run a web server for the game

Just look at this . How can anyone in their right mind defend this ugly piece of shit over javascript (not even saying that javascript looks nice either)? The reason PHP is still around is because of legacy codebase and "muh facebook" meme.

People writing shit code is the fault of the language.