/wdg/ - Web Development General

/wdg/ - Web Development General

>Discord
discord.gg/wdg
OR
discord.gg/0qLTzz5potDFXfdT
(they're the same)

>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.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

>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
pastebin.com/pDT82mQS

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

Other urls found in this thread:

vikingcodeschool.com/careers
databases.today/#jyUonm1lycaUF6-VBCyLcA
api.jquery.com/jquery.post/
api.jquery.com/jquery.post/#entry-examples
databases.today/#CJKXGhXlgHiIBEXtPQ4OfA
publicdb.host
twitter.com/SFWRedditImages

use the fucking subject field, you fucking shitstain

last time you escape my filters, i hope

Terrible mobile app has no subject line. Rip clover

What are you guys working on?

Not true.

>buying a can of Sapporo at a fucking pub

>tfw I should've gotten into web dev earlier instead of senior year
I spent all this time doing low level C and compilers when I could've been getting gud at this.
Well at least I'm well rounded and picking up high level frameworks quick.

How do you git gud at design? Just use bootstrap and hope for the best?

Rate my python templating system for python!

def gen_tag(html_tag_name, *args, **kwargs):
def template(*args, **kwargs):
attrs = ""
for k, v in kwargs.items():
if k == "Class":
attrs += " class=\"" + v + "\""
else:
attrs += " " + k + "=\""+ v + "\""
html = ""
for htm in args:
html += htm
return "" + html + ""
return template

html = gen_tag("html")
div = gen_tag("div")
h1 = gen_tag("h1")

res = html(
div(
h1("Greetings World!", Class="h1-css"),
Class="div-wrap"),
)

print(res)

html = gen_tag("html")
div = gen_tag("div")
h1 = gen_tag("h1")
h2 = gen_tag("h2")

res = html(
div(h1("Hello"), h2("hi")),
div("hi")
)

print(res)

returns:

$ python3 http.py
Hellohihi

Trying to figure out the current framework memes. Did angular 2 end up being shit? Is react/redux still the new hotness or is there something else now? Should I just delete all my code and switch to Elm or Clojurescript?

legit

Better example:

html = gen_tag("html")
div = gen_tag("div")
h1 = gen_tag("h1")
h2 = gen_tag("h2")
span = gen_tag("span")
img = gen_tag("img")

res = html(
div(
h1("This is a Header", Class="bootstrap-h1"),
h2("This is a smaller Header", Class="bootstrap-small"),
div(
img(src="this.nice.image.com/img.jpg"),
Class="image-border-div"
)
)
)

This is a HeaderThis is a smaller Header

It wasn't an tap though. There's nowhere else to get sapporo around here.

On topic: does anyone here make money from their websites? Even just enough Google Adsense to pay their server costs?

I'm making a quiz webapp with vue right now. It also has a custom CMS that runs on sails. Currently trying to implement Google Analytics. Or is there a better way to send custom data, i.e. this question was answered wrong 32% of the time?

happiness increases tenfold upon ditching webdev

ayy lmao

Writing a web scraper to get the names of frequent /r/the_donald posters so I can put ((())) around their names

there are some qt donald posters ngl
especially the jewish ones they're pretty qt

absolute

MADMAN
A
D
M
A
N

I like react but vue.js is the latest frontend meme js framework

I made a le eddit image gallery and I'm trying to figure out wtf is going on with the imgur api. I have never uploaded an image with it. Someone stole my api key or they are making stuff up.

I hate my job as a front end dev.

>Designer sends a shitty image?
oh, can you fix that with css? Maybe resize and tile it?

>Api is shit and returns bad data
oh, is there a way around that? Can you fix that on your end?

holy fuck why in this company is everything my fucking job.

tell them some of these things are out of your control or not your responsibility. Be professional about it but be strict

Are the books Web Design with HTML, CSS, JavaScript and jQuery Set by John Duckett good? I want to learn how to build websites but video tutorials are fucking useless and I hate them, as well as Codecademy

Thing is, there are technically "workarounds" for these things and the boss is a "developer" who likes to suggest shitty messy ways to do stuff and doesn't give a shit about good code.

They'd rather me struggle than ask the outsourced designer to send the right fucking image.

>Use the right tool for the job.
Just like every program shouldn't be written in asm, every website shouldn't be written in js.

You are ruining the internet
with your overuse of javascript.

sounds like you just wanna do front end. In that case you dont really need a book unless you really want a physical copy. w3schools and many many other sites teach front end just fine.

e.g. this week i was told to write a massive css in a js variable and append it to the document head with a timeout function 5 seconds the page load. Due to "compatibility" issues. Never even got to look at the problem to determine if this was the only solution.

if they are providing the images and in charge of the images, they ought to provide the correct dimensions, etc. Not your job. Tell them this or you'll just continue to do other peoples work

I do want it in print since I can't concentrate when learning things online.

ok then i would look on amazon and find a recent html5, css, javascript/jquery book with high reviews, though i still wonder about why you can't concentrate when learning online. Your ability to concentrate shouldn't weigh on whether your reading words on paper or on a screen. In any case, good luck

I'm almost finished with my website, most of the functionalities are done, I only have to design a few more things.

Would it be ok if I linked it here for you to test it a bit and give me some feedback on the performance and UI?

>pic related
This is the latest version of a front page (you maybe remember me from some older threads). At first glance - is the hierarchy good? I tried to do it the best I could.

I was thinking about it for like a month and I'm still not sure if I should make a sidebar collapsible or not, and if it should be hidden or shown on default. I designed everything around it so it doesn't get too busy (and I think I succeeded at it more or less). Honestly, this possible overthinking is killing me from the inside.

php question...a user submits a form, they get a success message, but if they refresh the page at that time, the form will try to resubmit. How to prevent this?

Put the form submission in between the form and the success page:

[form] -> [uploaddata.php] -> [success.html]

uploaddata.php will redirect to success.html so that the success page is not the same script that's doing the uploading.

Or, use an Ajax request to send the data. Then, if the ajax request returns a success message, redirect to the success page, and if the request returns with a failed message (maybe the password was wrong, or the message body was too long), you can let the user know without having to redirect to an error page.

sorry, forgot to mention i am not redirecting to a new page after submit. I have a success messages display next to the form, but i dont want to go to another page

Looks pretty nice, post it here.

I'd suggest making it collapsible but visible by default above a certain screen width.

So does it redirect to the same page, or are you using ajax requests?

i left the action blank, i'm using php

Thanks for the feedback. I need to do a few more things and then I'll post it here.

Since there are tabs on the left, I could either hide just the wider div with articles and then open/close that part by pressing on one tab, or I could put some icon like a hamburger button and show/hide everything. Will need to decide about that.

So the upload script is inside the same file? does your file look something like:


All in the same file?

font on the left bar looks odd (both in the left-most bar and the bar with images), perhaps it's just your screen rather than objectively.
I would make the gray text (actual article text) darker, or perhaps another font choice (it's a little hard to read).
Menu button should be a bit bigger.
Simultaneously, the bronze color choice is nice, but not paired with that thin font above article titles (the bold at the top under kinematograph is fine).
I would test around with making the headline image bigger by about ~200px, which would leave the articles at the bottom showing only their headlines. This should mean all focus goes to the headline, then articles and their titles, and then the sidebar.

All in all, looks great. All that's left now is refining and testing.

Many thanks for a feedback. I agree with almost everything. Pic related is what one of the article pages looks like. I tried making bronze small font bolder and it looks better, just didn't change it in a CSS yet.

Also, I have yet to add icons to tabs in a sidebar and the font was some default one (I guess Helvetica). The one above the articles doesn't look right either.

I'm trying to get a good contrast with text on the cards, maybe I should increase the size of a title instead.

Will think about increasing the header image even more (I already did), but I'm just not sure about that since a lot of people want to see more content above the fold too.

yeah but im using post, and im deleting stuff not uploading

Yeah it's looking great. As I said, all that's really left now (from the looks of it) is refining and testing. A lot of little details you got to now test and change and re-test.

18 year old American with a high school diploma here. Going to start my associates with a CS specialization online from a local CC regardless soon, but what's the best path to getting out of my mother's house ASAP.

Do I get my A+ and another cert or two and maybe some volunteer IT work and land a helpdesk job and work my way up from there?

Or do I do something along the lines of the FCC cert with the nonprofit stuff and build a portfolio and try to land a webdev job?

I'm not the most well-versed in webdev at the moment, but I could hold my own in an entry-to-mid-level IT gig wonderfully with the knowledge I have now.

Then you want an ajax request. Do you know what an XMLHttpRequest is?

>volunteer
best way to stay in your mothers house

>no degree
Become a lifeguard. Class is 3 days long

yeah i'll be looking into ajax stuff soon, seems async is hot right now. Would it replace the current php code I have that's handling this specific request? The entire app is done with php

sounds like you don't know if you want to be a sys admin or web dev, in that case, that's up to you.....don't ask us to make that decision

Leave the tabs open at all times and just collapse the big part with articles. That way it's clear that there is a menu.

Your php file would be an entirely separate file. When the deletion returns successfully, you'll have it return some code. You can simply make it print 1, or 0, or some JSON formatted output so you can attach all kinds of messages to it like "error in your syntax" or something. it might look something like this in a flowchart:
[form.html] -> (print Success/Error on return)
| ^
Ajax |
| Success!/error!
V |
[delete.php]


So the browser never redirects, it just gets the text returned by the php file, and then updates to say "success" or "failure" depending on what you want

The fastest way is learn Wordpress, php, CSS/HTML, Js, and become a 'Wordpress developer' or Salesforce dev, or Magento.

Then go apply to toptal, or the thousands of people hiring for remote Wordpress devs. It typically pays anywhere from $25USD/hr to $50USD/hr depending on experience and skill.. that being you are making customized Wordpress plugins or you are just providing WPengine support.

How to get job teaching/tutoring programming/web dev?

Go on jobspresso or weworkremotely or hnhiring.me

Look for teaching, they pay around $80k/year to teach at those dev bootcamps. vikingcodeschool.com/careers

I'm looking for something more on my own schedule. Tutoring at the library rather than with a firm or something. Trying to make extra cash, not a career

>market yourself
>leave contact info
>hope you get contacted

there ya go

So to get the result from the PHP file the only way is to echo right?

Print it as text, but yeah. Echo isn't the only way to print things in PHP

>not using this in favor of shitty anime file hosting sites
>2016
databases.today/#jyUonm1lycaUF6-VBCyLcA

So for example if I want to make a form that sends an email is it better to use the form action or submit using jquery button click -> ajax request?

>Downloading
>Decrypting

Wtf am I looking at

up1 a file host that encrypts and decrypts files on the clientside.

Neither is better than the other. It depends on what you want to do. If you want the user to stay on the same page without reloading, then use jQuery + ajax. If you want the user to be redirected to another page after sending the message, then use a php form.

Make both. For my sites a very large amount of visitors use noscript so being able to submit a form despite you not having javascript makes things so much more pleasant for privacy-oriented/autistic people.

It's better to troll your users and tell them "enable JavaScript like a normal person". That way autists, vir/g/ins, and Sup Forumstards don't join your community

as someone who has js disabled by default I'm okay with a message that I need to enable js.
I just don't want a million external scripts to load on a site I've never visited before.

You might also want to use umatrix instead of noscript. it's shit compared to it.

>a million scripts enabled

My blog uses no javascript. I didn't know this was a good thing until Sup Forums users praised it for no js

yahoo bought tumblr? weird

also i found out that jquery has a built in shorthand for the ajax post. I don't really get it though

$.post( "test.php", function( data ) {
alert( "Data Loaded: " + data );
});


what is the function( data ) part?
how to set the data being passed on?

api.jquery.com/jquery.post/

Is there any relevant html preprocessor that actually saves time?

yes that was what I was reading but I still dont get it

PHP

api.jquery.com/jquery.post/#entry-examples

Has anybody here used Piwik? It's an open source replacement for Google Analytics. Seems pretty good from what I've seen so far.

We have used it at work, it's very VERY slow.
Up to the point that it is unusable.

Actually, don't do it. Having a button that says "Sending..." for 5 seconds makes it feel like nothing is happening. Studies show that doing an actual page reload after a action is complete often reassures them that things are happening.

The function(data) part is what's called a callback. When the post request finishes successfully, it calls that function (alerts "data load:" to you). If you want to send data, you need to include an object with that info:


$.post("test.php",
{
name: "Collin",
message: "Hello, jquery!"
},
function(data){
console.log("Here's the data: " + data);
}
);


The second thing there, { ... } is the parameters.

Okay i'm starting to get it. can you rename "data" to whatever you want?

Also Jquery brackets / structure looks confusing as fuck

you should start learning javascript basics first before you start using jquery.

...

Proof JS is slow and shit and PHP is god language

databases.today/#CJKXGhXlgHiIBEXtPQ4OfA

Nodejs is as fast as C cause fucking google engineers. It literally compiles to machine code before execution.

Can you guyz post the sites your working on?

should be fine for a site with low visitors though?

publicdb.host

Just use the mobile version. It works perfectly fine.

The site that will hopefully either give me stable income or give me a job.

It's a website with mobile version and an app courtesy of Cordova.

I just need to figure out how the fuck to implement CAPTCHA, how the fuck to make it look pretty and then it's done. Everything else is donezo.

>Recruiter #354 ignores your email again


WEW, WHY EVEN TRY.

I succeed at everything I do besides web dev.

Yes thats a very good book

Are there any cheap hosting services that support python?

DIgitalOcean, Aws...just install it I think.

how do i get my html table to update after i run a delete x amount of rows query? the delete query removes the records in the actual datase, but i have to refresh the site page for the table to update

nvm i just needed to fetch the data again after the delete query ran

but what about clearing the table?

what do you mean

you get the new results and then you have to echo them again right?

Anyone with experience with forms working with multiple models in Laravel?

>first webdev job
>day one
>made like 3 shitty Laravel projects before
>here, look at this code a guy has been working on for 2/3rd of his stay here
>apart from all these things you're supposed to do, user, add an option to hide/display a certain information
>no rush, deadline is today
>no content seeders, live data on the test platform that cannot vanish
>hours later after I finally get the grip of the code and have done all the previous stuff I'm thinking this will be easy
>kekno
>frontend create method simply ignores the hide/display
>frontend edit method works and changes the value
>both backend methods throw sql errors because it seems as if I'm trying to put the info in the wrong model
>one form is simply using the table column names for all the models, one is using the column names for the main model and pseudo items for the other ones and then adds the pseudo ones to an array before saving

I edited the controller so it takes in the new value but as I said, it only works with edit on the front.

Any suggestions? First time seeing something like this and I'd like to have that job for longer than a single day.

god forbid you download 100K that is cached and reused by every site

you might lose your seat at the Fedora club

oh. Yeah i fetch them then i have a few foreach loops to display the table/data again. I'm not "clearing" the table....thats what confused me

If I have a bunch of small (

follow your passion

if your passion is money or feeding your kids then plumbers make $100/hr and most of the people in this thread are cranking out absolute drek for the equivalent of a buck a page so you do the math