/wdg/ - Web Development General

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap (don't be overwhelmed, ignore the later parts and go step-by-step)
youtube.com/watch?v=UnTQVlqmDQ0

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

>Further learning resources and documentation
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
hackr.io - crowdsourced collection of tutorials (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages
pastebin.com/gfBPg24A - Collection of PHP links.

>Need help with some HTML, CSS or JS?
jsfiddle.net - create an example here and post the link

Attached: 1520763440985.png (1280x720, 180K)

Other urls found in this thread:

localhost:8080
baeldung.com/spring-tutorial
web.dev/discoverable
developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Supplying_request_options
codebuddies.org/,
chingu.io/,
twitter.com/SFWRedditGifs

First for have sex

I told my interviewers I knew Java/spring boot. And there's 10 minutes left until my first day
What do?

how much time was there between the interview and now?
Probably plenty to give yourself a quick crashcourse to survive the start.

I got to do something similar.
Got something coming up where I need to work with Java/C#/MSSQL. Complete noob when it comes to those, but if you already have some dev skills, then other things can be acquired without much pain I guess.

install nixos

+upper-intermediate knowledge of vanilla JS
+upper-intermediate knowledge of Node (2.5 years of making shit with it)
+intermediate knowledge of browser JS APIs
-junior level CSS (but I can improve it really quickly)
-no knowledge of React etc. I've looked into it and I get the idea, I just prefer vanilla for my personal shit so I didn't bother studying something I'm not gonna use
-dropped out (went for a Physics degree, got bored half a year in)
-no experience, worked all my life in small fish e-commerce
-very few personal projects I could put in a portfolio
-eastern european

is there any chance I could get a remote gig or get into freelancing? I'd be willing to work at pajeet rates for a few years, I have other income anyway.

Attached: 1561155967296.jpg (959x1080, 291K)

>YOU SHOULD DEPLOY YOUR PORTFOLIO WEBSITES SO EMPLOYERS CAN SEE IT

What if i am a backend dev and not a front-end whore tho?

Laravel is pure shit

You think someone is wasting time giving you advice with that attitude?

Any good guides for using CMS? Specifically Drupal 7. It seems like using a preset theme is super limiting and I'm trying to customize those molds.

Attached: 1552486538486.jpg (700x687, 56K)

working from home is great.

Any of you work remote?

Experience matters more than knowledge when it comes to remote work.

Also being able to show that you can work by yourself is important. So doing a few years of freelance or launching a bunch of websites in your free time can show that you don't need to sit in a supervised office to stay on task.

Best piece of advice for using Drupal?
Don't use it!

I WFH two days and go to the office three days. It's pretty comfy.

>server sends a set-cookie header back to the browser
>but browser doesn't set cookie
why

I'm building a Django website and want to include Solr or ElasticSearch. Is Haystack still commonly used or is there a newer/better option now?

does it get loaded from a 3rd party resource? is the domain the same?
Post the set-cookie header.

yes same domain different port

Server: WSGIServer/0.1 Python/2.7.9
Content-Length: 81
Access-Control-Expose-Headers: Set-Cookie
Vary: Cookie, Origin
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: localhost:8080
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
Set-Cookie: csrftoken=I461AjyfyFH9jWGfFskHeSxc0jcCxhObN3b1FrsA8k0OKGNXNY8QhofqhIbjavct; expires=Mon, 22-Jun-2020 15:53:21 GMT; Max-Age=31449600; Path=/

it sets on postman but not in the browser

>different port

where can I learn about security? I know basic xss/sql injection/sanitize input/hash+salt type stuff but I want to be more confident in the area, especially with regard to transactions and users

Experts say to price based on the client (Value Based). How much would you charge a restaurant?

I know fuckall about UI so I have to ask; how should a layout like pic related respond in mobile? There's a column for nav, one for main content, and one for what I'm assuming to be secondary info. Collapsing them on top of each other doesn't sound right

Attached: FullSize.png (1920x1228, 828K)

I don't understand the use case for create-react-app or vue-cli. Can someone explain?

I've tried them out and they're great for quick prototyping, but it seems like for any actual production project, you would need a more customized config / webpack.config file.

Am I missing something?

Attached: picard.jpg (600x461, 36K)

what kind of restautrant?

Different port does not make it sameorigin

I know this probably has been asked a millón times, but what would you consider the best CMS? Or is it better to dont use one at all?

depends on what the CMS is for

Friends, what Is the diff between react/vue/angular vs HTML & CSS? I'm learning the last two and now I read about the first three. Are those alternative languages? I need someone to explain to me what they are as if they're talking to a rookie, which I am

Contentful

>Are those alternative languages
no, just learn HTML and CSS for now. You need them in any case and there is little sense diving into React,Vue,etc, before even having started with JS.

HTML and CSS are the bread-and-butter for the web.

React/Vue/Angular are frameworks for JavaScript. Don't even think about learning them before learning HTML, CSS, and plain JavaScript.

And don't breeze through HTML and CSS in a month and think that you "know it well". I see WAY too many web developers who rushed through these straight to JavaScript and end up writing absolutely shitty HTML and CSS while claiming "it's easy". The reality is, especially with CSS, they are easy to learn but hard to master.

TLDR; build a good solid foundation for yourself with the basics and you'll be a step ahead of other jr developers when it comes time to get your foot in the door.

>for any actual production project, you would need a more customized config / webpack.config file.
npm run eject

Thanks senpai

owasp

very well put.

Webenis

>try to 'ng serve' an old project which used to run without problems, if I remember correctly
>ERROR
>find ERROR on gitHub forum, try to solve it
>new ERROR
>same thing again, can't solve the new error
>decide to migrate to 'ng new' project
>IT HAS AN ERROR FROM THE VERY BEGINNING because of some rxjs incompatibility issue

and even a hello world project takes up more than 1/4 GB memory on your disk

Is angular a fucking bullshit meme?

Attached: ang2.png (823x869, 19K)

You won't be expected to do much actual work on your first day. Read this: baeldung.com/spring-tutorial And Spring is a big framework anyway so it's acceptable if you don't know anything except the basic MVC and ORM/data stuff.

bump

Attached: windows_95_dog_firefox.jpg (1202x1004, 150K)

what does it have to do with cookies

>using MySQL with node.js won't get you nearly as much benefit as using MongoDB, because of the event driven nature of both MongoDB and node.js.
can someone explain this? why does mongo play nicer with node than a sql database?

So I see a lot of jobs asking for experience with SEO or even hiring based solely on that. I have a friend who had no CS background (was a business major) who jumped into SEO and is now working another job as a SEO. As someone with a background in web development (2 year associates in CS and 1 year internship) should I bother with anything SEO and how do I get into it at least to fluff up my resume?

>work couple weeks on interview project only to be denied or low balled with an intern tier salary

you can learn seo in 20 minutes and a google search, it's not a deep topic unless you're trying to publish a paper

>you can learn seo in 20 minutes and a google search, it's not a deep topic unless you're trying to publish a paper

considering my friend's case that is what I figured. How do I get the point across that I am an expert on that for apps though?

I don't know about the event driven part, but my understanding is that you pick node with mongo because they scale well together.
Google has lighthouse which lets you test and see a score of any webpage. It tells you what needs improvement.
web.dev/discoverable
If you can put a bad webpage into lighthouse, get the report and say "I know what all this means and how to make Google happy with your page" then you're good enough. You could also look at the recommendations from other search engines, but let's be real, they just don't matter.

What's wrong with try-catch in PHP? boss found out I use it to validate all my API calls because fuck API calls and was told to stop using it immediately because it was a huge performance hit.
When I successfully call the API I wrap everything in a try-catch and if it fails I just tell the user to fuck right off because someone that isn't me did something wrong

Attached: 1528131086719.png (631x480, 488K)

thanks on the SEO stuff, going to read it right now.

Any good resources/tutorials for building an ecommerce site? I figured I could make one for my portfolio.

lmao what

Your boss is retarded if he tells you not to use language features because it would be a perf hit.

The only noticeable perf hits come from slow IO, synchronous tasks such as network calls and loops.

The only reason why he would make sense is that you're returning a large payload back to the client on caught errors where you sometimes just want to return back http response codes.

Oh yeah unless there's something after the try catch that doesn't need to be executed after the failed API call as well.

It's just a generic "something went wrong when calling the api" message in the catch. I hate validating soap shit because it doesn't tell you anything useful anyways so I always put it in a try-catch block
All the input my function gets from the user is validated and sanitized before calling the API so I'm about 90% sure if something goes wrong it's something on the API end I have no control over.

What he means is that cookies set on requests to localhost:8080 will not be used for requests to e.g. localhost:8000, since it’s considered a different origin, so it has its own set of cookies.

However, if the issue is that the cookies aren’t included on subsequent requests to localhost:8080, then this is probably an issue with fetch. When using the fetch API, you need to explicitly state that you want to use cookies for your requests, by setting the ‘credentials’ option to ‘include’. (Default is ‘same-origin’, which this request is not, for the reasons above.)

developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Supplying_request_options

Formerly employed front end eng here,

>should I bother with anything SEO
Yes. SEO means doing things that will make your website appear higher in Google search results. As a developer, you do this by putting as much information about your website into the HTML that a browser receives when it visits it. This includes information like meta tags and OPEN GRAPH TAGS in the and as much SEMANTIC HTML in the as you can - things like , , , and instead of plain old s. As a front end developer you'll also want to provide a SITEMAP and links to your other pages.

From the marketing perspective, SEO means creating tons of BACKLINKS to your site, which basically means spamming your site all over the internet.

Anyone here had an issue with Laravel complaining that a Facade root has not been set? No idea what that means. I've deleted vendor folder and cleared composer cache, I'll cleared the config cache, I've recloned the repo.

i thought port numbers didn't matter for cookies
anyway the request is being made from localhost:8080 to localhost:8000 and the issue is that they will not set when localhost:8000 responds with a set-cookie header.
i don't have a problem sending the cooking on subsequent requests if i create them myself in browser storage

Any good updated React courses?, price doesn't really matter if it's good.

>i thought port numbers didn't matter for cookies
Huh, I looked it up, and I guess I was wrong, they don’t matter.

The fetch thing I mentioned still applies though, since the request is technically cross-origin, so try that if applicable. If not, how exactly are you making each of these requests? Fetch, XHR, normal browser page load, etc.?

using axios so probably similar to fetch
i don't see the cookie as soon as i get the response in storage which i should be able to right?

How can I have an image resizing realtime with javascript (or jquery)?

I have this banner that's a carousel of pictures sliding right from left. Now I'm quite happy with the result, the only thing that bothers me is that the picture doesn't resize when resizing the window. It resizes but at the next interval set (where the slide happens), meanwhile the picture isn't the good size for a short time (until next interval ticks to slide).

How can I have the picture resize realtime on resizing the window?

I'm confused about useState hook in React. Let's say I have something like this:

const [counter, setCounter] = useState(0);


and 2 buttons:

setCounter(counter - 1)}>
decrement

setCounter(counter + 1)}>
increment


Shit works, but what if I need additional logic, like not allowing counter to be less than 0? Should I define an additional function (setCounter is already defined, so naming this function sound like a chore) that passes the value through some logic and returns a value that is then passed into setCounter? Something like:

const anotherFunction = (num) => {
if (num < 0) return 0;
return num;
}

setCounter(anotherFunction(counter))}>
...

A reducer would probably be the best but you could do this as well:

const [counter, _setCounter] = useState(0);

function setCounter(num) {
_setCounter(num > 0 ? num : 0);
}

composer dumpautoload might fixit

Are you me? Same setup, indeed max comfy. I have Monday and Friday wfh so it's a really nice buffer for the weekend.

you must really know how to center a div within another div

I'm trying to get Redux working but when I try to use connect like so
export default connect(mapStateToProps)(SomeComponent);

I get
>Uncaught Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function

Anyone have a clue what the cause might be? I already checked and React and React-Dom have the same version number so that's not it.

nice

ok here's what I know:

- html
- css
- sass
- vanilla Javascript

plus, on a basic untested level:
- C
- C#
- Bootstrap
- SQLite
- PHP

Is this enough to get an entry level job? Should I just kill myself?

Attached: 1561237106337.png (750x929, 1.12M)

goys come on, pls link me to any resources that offer actual quizes/tests or excerices in css pls and thank you! tests are the best way to study

Pretty sure I know more than you and about ready to commit self-pwn myself.
>Vanilla JS, CSS (SASS, Materialize, Bootstrap), HTML (Semantic)
>Node, Express, MongoDB, sqlite, MySQL, even PHP (Wordpress, Laravel)
>Version Control (Git)

Untested
>Java, C, C++

It's probably lack of confidence bro. How many years of professional experience do you have?
>1 professional, 5 just messing around leaving projects half-finished, maybe 5-6 projects delivered and still maintain

Attached: flat,550x550,075,f.u6.jpg (550x446, 54K)

I'm getting started in webdev and working on my first big project, do employers want to see version control with Git/Github, or do they just care about the final version of the project being uploaded.

Just learn React or Vue and you are all set as a frontend dev.

I want to make a forum style website with postboxes and a user feed.

Would php & sql be good for service side?

>It's probably lack of confidence bro. How many years of professional experience do you have?
I guess about a year in general, but only 5 months learning front-end

I can use git too btw, forgot to add it.

Thanks. I have a feeling it takes quite a bit of time to learn it and I really need to find a job asap

>is there any chance I could get a remote gig or get into freelancing?
Absolutely. It all comes down to marketing yourself. You need to convince people that you can accomplish what they want. This isn't just for development work, it applies to all areas of life. It's all psychological, for the most part (if you're trying to convince an autistic nerd, i.e. myself, it's going to be more difficult.)
>I'd be willing to work at pajeet rates for a few years
Do NOT do this. I thought about doing this myself about 2 years ago. Even applied to non-paid internships. They all accepted me, but I'd ghost them instantly. You have skills, you can do the work, you deserve to get paid. My last gig was $75/hr. for 18 hours. I'd say not to start anywhere under $35/hr.

I dropped out of high school. Of course I don't mention this. You don't have to mention that you dropped out of college either. Just say you studied Physics for x amount of years.

>I guess about a year in general, but only 5 months learning front-end
Get working on the confidence, create a couple of bootstrap front-end themes or some other front-end project (aliens in vue.js?). It's what I want to do. I just finished my mandatory army service, it's like all tech knowledge got thrown out the window....

This user knows, but you also have to keep in mind what's trending. Vue might not be trending next year. I remember Angular was all the rage almost 2 years ago, now it's falling off.

Attached: 1545627558298.png (750x742, 738K)

Better options?

>do employers want to see version control with Git/Github
It depends on who is doing the hiring, but yes it's important.

How the fuck did you do this? I can't find a remote job if my life depended on it. Seriously I really really need a job.

They really want to see that you actually understand that github is not just a drop box for projects.
if you are given tasks and just push commits to github at the end of the day without knowing anything about version control or putting messages in your commits, You will piss people off.
You might as well be a ghost that randomly changes code.

I participated in a bunch of online meetup type things. Basically got my Linkedin profile like a famous person's Instagram. People who are higher-up in companies frequently contact me to work for them.

Take advantage of these online meetups.
Some that come to mind are codebuddies.org/, chingu.io/, and whatever udacity is running (they throw out "scholarships" for free. You wont learn much with them, but your connects will increase 10-fold.) Basically, surround yourself with other developers. I don't know if this will work for you, but it should increase your chances. I also have a bunch of top-tier projects up and running with custom domains, etc. Also published a few courses teaching web development. You could do it too, no doubt.

>online meetups
not the other user, but I wonder why I never heard of that.
Going to look into that stuff as well.

is there a sexier meme backend than Elixir?

I am doing front-end and I was thinking of having my main front end projects like apps and stuff on my personal portfolio, and just having a Github with public stuff like coding challenges and anything open source I contribute to that shows I can pass those interview challenges.

Does that sound sensible?

>like coding challenges
That's lame. Skip this.

>work on web app project again after a year
>no comments
>forget what any of my code does
>ugly UI

Oh god someone help me with UI. I have no idea how to make this look okay. I made all the assets myself except the character portraits. You can't even see the outlines because of the dark theme.

Attached: uglyuiplshelp.png (1998x840, 159K)

is no one going to defend Angular?
Shurely, there is a reason people shill it so much

download this from somewhere

Attached: book-cover-sm[1].png (824x962, 55K)

>Get working on the confidence, create a couple of bootstrap front-end themes or some other front-end project (aliens in vue.js?).
I am roughty following the path of the projects advised by freecodecamp. Starting from a "tribute page", then a product landing page. I will kind of copy some stuff here and there I find on the internet (I need a job asap so I can't really do otherwise). My resume itself will be a webpage, that's my secret weapon. I will keep adding small websites on the resume website while I churn them out. A website-inception.
I wanted to learn React and use it to make the resume website, but I am really out of time.

Attached: DomzR3_X4AMZSb_.jpg (720x718, 44K)

when have you ever seen someone shill Angular?

>the virgin React shill
>The Chad Angular enterprise agent

>Be me
>Internship offer
>"oh sweet, I should apply"
>Requirements:
>php, asp.net and C#
>HTML5/CSS/Javascript
>JQuery, Bootstrap, AngularJS 6
>Wordpress, PrestaShop, Magento
>MySQL, SQLServer
>optional skills that will be considered a plus: 1 year of cocoa experience, 1 year of experience in Augmented Reality projects

HOW IS THIS AN INTERNSHIP? WHAT IS EVEN THE POINT IF I AM ALREADY SUPPOSED TO KNOW EVERYTHING?

Attached: aaaaahhhh.png (922x1176, 605K)

but I use Vue

Attached: 1547173804437.jpg (1200x792, 439K)

based Nadal

i see req's like this all the time,want to know what they always ask,fizzbuzz level gotcha's.welcome to the industry user.

well, not here on Jow Forums, but many of the 'top webdev technologies' lists I've seen put Angular to a very high and sometimes even the top spot

this isn't a real internship, this is likely an attempt to get free or cheap labor AND local/government subsidies for entry level tech jobs or mentorships

Most likely cheap labour, since the government doesn't care about tech jobs here

Wordpress works well, even Joomla is better than Drupal, last time I tried to use Drupal each plugin I would install would mean 5 new problems to fix, tons and tons of bugs and solution to mitigate them would be in some comment or forum hidden somewhere.
Maybe if you only plan to use Drupal base system and none of it's plugins then it works ok but at that point I think I would rather learn how to use django or something since my only reason to use a CMS is to use it's plugins.