/wdg/ - Web Development General

Death to PHP!

Previous thread: > Discord
discord.gg/0qLTzz5potDFXfdT

>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/
codewars.com/
>Crockford on Javascript
youtube.com/playlist?list=PL7664379246A246CB

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

>Backend development
en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

>Useful tools
pastebin.com/q5nB1Npt/
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/

> How to get started
youtube.com/watch?v=pB0WvcxTbCA
Good videos on the channel too
youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

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

Other urls found in this thread:

pastebin.com/xWgrGF0i
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions#Function_constructor_vs._function_declaration_vs._function_expression
jsfiddle.net/zzwLrdop/
jsfiddle.net/jd7004ha/2/
jsfiddle.net/jd7004ha/3/
nsa.gov/assets/js/main.js
nigge.rs
96.61.17.240.
twitter.com/NSFWRedditGif

First for Go.

second for we're all gonna make it

Third for vanilla JS

Fourth for TypeScript

Fifth for Gentoo

sixth for PHP bing the only viable learning platform.

7th for not being a pajeet

Haha, no.

we are all pajeet here, friend sanjay

sorry pajeet got busy.

but where was i
oh yeah punctuation.

the reason i used the word punctuating was to imply that user should himself punctuate before he judges. thus had you been able to understand my logic you would have read the sentence as such

>Pajeet, I would love to see proper English and punctuating used in your sentences.

Pajeet, I would love to see proper English and you punctuating your sentences before you tell me what to do; fag.

*but tried to word it nicer :)

yes

As someone who likes PHP, I disagree.

mysql, mysqli, PDO, mysql_escape_string, mysql_real_escape_string (depracted) mysqli_real_escape_string

It's shit and 90% of the documentation is deprecated defecation.

>It's shit and 90% of the documentation is deprecated defecation.

what PHP has the best documentation with some of the best looking examples and comments I have ever seen.

Then why is it every time I am researching an issue I have to wade through deprecated answers for a decade before finding something relatively useful?

I can go to php.net and find documentation that hasn't been updated, nor has comments, after 2008.

What's the difference between

var funcName = function() {};

and

function funcName() {}

Why would I use one or the other?

can one of you gentlemen explain to this poor pajeet why this fucking sidebar wont extend to the bottom of the container?

pastebin.com/xWgrGF0i

developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions#Function_constructor_vs._function_declaration_vs._function_expression

If you don't put that in a jsfiddle, I'm going to both not answer your question and murder your family

Whats the meme behind Code writing books always having sketched out animals, specifially O' rielly? Why do they do that

Should I keep a table with attempted logins?
If so, what columns?
I have user,attempted password hashed, timestamp, ip, and a session id to check for invalid sessions.
Any suggestions?

It's just a thing O'reilly does with a bunch of their books. Why not do that?

but i like my family :(

jsfiddle.net/zzwLrdop/

It's just branding. McGraw hill had some publishing standards across their books too. With O'Riley they publish some really great stuff, but they also put our a lot of trash. MG/H only publishes shit

jsfiddle.net/jd7004ha/2/

Tips:
1: for scrollbar you need defined height and need to feel it what to do with overflow
2: when you float something, it's like you're shifting gravity for it. So float both objects one direction

ah. nice
is there any way to get the container div to the same height as the largest child element?

probably with max-height

jsfiddle.net/jd7004ha/3/

Does anyone know how much memory an idle TCP connection uses on Linux?

I've set the default send and receive buffer sizes to 32kb per socket connection on my web server as well as in the Linux kernel (my server will hardly ever even send or receive that amount per request to begin with which is why I set them so low). Does the kernel maintain these buffers even when an open connection is idle? I need to know this in order to figure out how much memory my server needs.

Also, I'm reading that in Linux, all buffers are maintained in a single data structure in the kernel labeled as "sk_buff". I assume this means that each socket buffer is actually an abstraction mapped to this data structure rather than separate buffers in their own right. I guess that means that a connection not in use would not use any memory with regard to sending and receiving data unless it was actually sending and receiving data at that moment. Is this correct?

This seems like a big load of bullshit just to allow programmers with poor algorithms skills to create functions without names.

Guys, I'm going to give some advice.

Write a Twitter bot. Search for people mentioning they want a website. Have a twitter named like "cuck's web development firm" and autosend them a message "If you're serious then we can work something out".

Infinite business. No one else is doing this yet.

you want to make the business with me? I can only do backend, if you can do the frontend.

i need to write a rest api with php + codeigniter (school project).. any good tutorial?

I'm back-end and a marketer. My front-end looks like a blind guy using dreamweaver, even with boobstrap.

I'm working on a website which uses various APIs from different video sites so you can make playlists of videos from different sources. The first one in the pic related is a vimeo video, and the second one is a youtube video. I've got those two APIs at least functional but I need to write the controls like transition between two videos, pausing, skipping, playing, randomization, etc.

Any suggestions for other video/music streaming services with APIs I can work with? I'm thinking soundcloud too

kek same here, gl with development user

>This seems like a big load of bullshit
It's just syntactic sugar, nothing to get worked up over. You can (and should) ignore the idea of "function names" since they're kinda dumb to start with. The primary difference lies in hoisting and occasionally function names are relevant in recursive calls but if you depend on either you're probably wiring bad code.

>just to allow programmers with poor algorithms skills to create functions without names.
Don't know what it has to do with algorithms skills but anonymous functions and closure semantics enable a lot of interesting constructs. Definitely worthwhile in the context of JS

It just has to work for the fucking user goddammit. How many other languages have a function structure half as complex and full of arbitrary rules?

nsa.gov/assets/js/main.js

I'll just leave our nation's finest codebase here.

i've come to the realization that my job will continue being just asp.net ecommerce stuff. Kind of boring. Been there a month now. I need a cool project to work on the side.

Well functions are pretty fundamental to JS. Compare the rules around function deceleration in JS to inheritance/access modifiers in C++ and Java and it's really rather simple. Plus you can ignore the subtleties of things like variable hoisting 99% of the time, I've had to recall the rules around it like twice in the last year.

NicoNicoDouga. Also there's a shitload of open file servers out there with music.

Implementing a custom audio player for nigge.rs

>can work magic with front end
>can't into design at all
>autism gets triggered if design goes ahead of usability
Working with designers is both a blessing and a curse

just wondering why you are doing it on the web? Shouldn't it just be a desktop application? Sorry im new to all of this.

Is using position:relative and just positioning everything like that bad practise?

why not a website?

I meant custom audio controls, it still uses HTML's built in support for playing sound

>nigge.rs
Oh my bad, i didnt see you were building it for a specific website. I thought you were building a music/video for a desktop, thats why I asked about the localhost

>tfw i'm also making an audio player

I am making a small business web page, 5-10 pages. Is there a guide to what I should be putting on each page, I know it sounds basic but I keep re-arranging shit and adding/removing stuff and would love a guide of what is the standard for small business websites (industrial/service industry)

Woul meteor make a good platform for a game streaming site (got a unity runtime i want to show to someone) or is a bit of a meme

It's standard to talk to your client. And look what competitors do.

>look what competitors do

This is both my issue and a bonus.

No one in my industry has a website that doesn't look 10 years old and I don't think any of them use up to date SEO techniques, if I can make on that looks half decent and uses proper practices then it will be really ahead of the game.

>look what competitors do
This is challenging because there are a bajillion web devs out there.

To www or not to www. That is the question.

What do you mean? Everything is position relative by default.

How often do users visit the parent page on a dropdown link, by that I mean if you hover over "services" and 4 services drop down, is it common for users to check the "Services" page or does it get avoided.

Depends. Live streaming or prerecorded?

Any godaddy subscribers?

If I buy a domain + hosting for 1 year and let's say
that my domain+hosting will expire soon, are they going to notify me about it if I would extend for another year or not?

never ever use godaddy. ever.

Never www.

See

Mostly avoided. That's why our business side insists that you CAN'T do that. Instead gotta first navigate to "services" and then navigate to whatever service you want. Drives me fucking nuts but they won't listen.

so whats a good domain+webhoster then?

Namecheap/Gandi for domain and see OP for a VPS.

That's interesting, cheers.

I have the issue of having 4 services, and the customer may not know what is best for them, so how will they know what drop-down to click on, and it seems like bad practice to require them to click on every service to check.

On the flip side we are a quote based company, so they tell us what outcome they want and we tell them what service we are using, they don't REALLY need to know how the magic happens so to speak.

This shit fucks with me so much as it seems like there is no right answer.

I understand, if someone has no choice but to use PHP because of legacy code or retarded management, but there is no excuse for willingly using PHP.

Best alternative?

Go.

What's wrong with PHP?

It's old. And everything that's old gets improved upon.
Plus most people simply suck at it.

What do I do guys, I can layout the website but when it gets to styling and picking a color pallet I shit the bed.

look up template sites and steal colors/layouts.

Are you guys all running on Macbook Pros?

No.

>guys
>guys

please dont be so patriarchal

there are no girls on the internet

what about me

tits or GTFO

FBI agent confirmed

but this is a worksafe board

Hey Sup Forums,

Just learned some HTML and built up a basic site: 96.61.17.240. I took some inspiration from Sup Forums.org/frames

What I want to start using is something like php, but you guys always talk trash.

Comments on the site and what back end I should use?

>

Ok wdg, I need to make a web app in Python or Ruby during a hackathon at work. Choice of language will depend on my teammates, but it'll probably be Python although I'd prefer Ruby.

I'll most likely be the most experienced programmer, and while i have extensive experience in web development, I have very little experience doing so with Python or Ruby. I am a systems engineer that mainly writes procedural scripts these days. My webdev days mostly involved PHP and codeigniter.

So back to the hackathon, it's 24 hours, it's at work, my project will involve using the github api to essentially choose available git tags for all repos in an org, and write the choices out to a file in a certain format.

Which framework should I choose? Rails and django seem really heavy for this. I've used Sinatra before and really liked its simplicity, so I might choose that if I go with Ruby. Is there something similar with Python?

If probably choose Python as this is my company org's default language, but there are already Ruby libraries to generate the file format I need.

>96.61.17.240.
Site seems fucking perfect to me, dont add or remove anything,

Why would you use anything but PDO, or better, simply an ORM?

No one else is doing it because it's spam and your bot will be caught by spam detection and probably banned.

That is beautiful user.

Easy to navigate and simple.

10/10

>using position:absolute on everything

I like your error handling. Well meme'd.

Everything? I only see it on the index.css' nav & section. Anywhere else?

mfw php will outlive every of your meme hipster languages

whats the best html/css editor with live preview support?

You should choose a framework that allows you to go back in time 6 months so you can start a flashy visually impressive project, and then just turn up to the hackathon with your project already finished and nicely polished, and then win with it despite not actually creating it at the hackathon.

Because hackathons are bullshit.

>outlive Go
Only if Google bankrupts, so no.

Sublime 3 with Autoreload.

Can confirm this is accurate. Most hackathons are judged by non-technical marketing people so you just need to make something flashy with a neat idea. It doesn't need to be functional or even technically possible.

Bonus points if you make something that utilizes the api of the company sponsoring the event and they get to take possession of your code afterward with no compensation to you.

This is a hackathon at work. While there will be winners, my project won't win because it doesn't involve using our company's platform, so you're right about that lol.

I don't care about winning I just want to get this project done and need a framework for a relatively simple app and api that can be used by novice programmers. Honesty I'll probably end up doing the bulk of the work so don't care so much about it being good for novices as I am about the framework vein simple enough that I can build a POC app in 24 hours.

Which OS do you guys prefer for your vps?

At first I tended to use CentOs + Directadmin because that was easy. But now I lean towards Ubuntu so I can just put Ubuntu on every machine.