/wdg/ - Web Development General

>The #1 archived general on Sup Forums

>Previous Thread
>Free resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
freecodecamp.com/
codecademy.com/
bento.io/

>Further resources
github.com/iRaul/awesome-portfolios - Portfolio examples
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:

youtube.com/watch?v=1L9Boau5nBU
fullstackreact.com/articles/how-to-write-a-google-maps-react-component/
github.com/tomchentw/react-google-maps
medium.com/front-end-hacking/using-the-google-maps-javascript-api-in-a-react-project-b3ed734375c6
npmjs.com/package/google-maps-react
angularbootcamp.com/.
discord.gg/wdg
twitter.com/NSFWRedditGif

...

Is there an easy way to sanitize a url/verify that a url is an image?

That would involve downloading it, or at least the few bytes. File formats generally have a magic number at the beginning that tells you what type of file it is.

Pic related is the jpeg file format, which has "JFIF" ascii encoded at bytes 6-9. Exif is also a jpeg file format, and with have "Exif" ascii encoded in the same place.

They're not all in the same spot; PNG has "PNG" at bytes 2-4. You can look up other formats online.

What exactly can I do to maximize speed when loading my websites?

- pictures/video size
- load order
- more concise code?
- ??
- ???

I'd like to know all/as many as possible so I can start truly building websites in a more efficient way...

A couple of us guys are trying to start a new IRC channel for /dpt/ on #Sup Forumsdpt at rizon.

i'm working on my CDN as some of you may know and I've decided to open up development to the public on my livestreams. Please check it out, I'm streaming in 15 minutes. youtube.com/watch?v=1L9Boau5nBU

As a student trying to build a portfolio in order to get hired into a entry level position, what's better? Quantity or quality of projects? I mean, I'm in vacations until March, and I could either build like 5 crud projects or a single complex project.

Is using vanilla PHP considered harmful?

v7 looks nice
performs ok too

why would it be harmful?

Anyone want to help me implement some simple google maps stuffbintk my react app

Web based chat application. Which would be better, Elixir or Go? Trying to learn something besides Node.js

The language is irrelevant.

lel that guy is famous in Sup Forums?

>fullstackreact.com/articles/how-to-write-a-google-maps-react-component/
>github.com/tomchentw/react-google-maps
>medium.com/front-end-hacking/using-the-google-maps-javascript-api-in-a-react-project-b3ed734375c6
>npmjs.com/package/google-maps-react

I feel like everything has been done already

Well, not at scale. But yes for whatever application I will be writing it will most likely be irrelevant from a technical standpoint. I guess I should rephrase my question as to ask if anyone has been writing applications in either of those languages and if they could give some input on what they liked / disliked. I head Elixir with Phoenix is really good for websocket heavy applications

it's just a meme image, bruh

just do it in go
elixir is pretty much ded so leave it for another project later on "for funsies"

Elixir, read some of discord's blogs about it.

>elixir is pretty much ded

How do you know a language is dead?

When i go on GitHub, elixir projects have hundreds of stars, and there are companies that use Elixir...

Yeah I did actually, thats where I got the idea from. They really speak highly of it. I'm not a seasoned programmer though so I was worried that the community might be too small for me to find answers for all of my questions. With Node.js it has been really easy, but I would like to expand beyond just javascript. Which of the two (Go and Elixir) do you reckon have the most potential for the future? I would assume Go since it is backed by google.

Oh a friend of mine showed me the music video of that guy resently.
I could not stop laughing

How do you guys do it bros?

How do you do it? I legitimately don't get it.

So i thought i would become a webdev. I thought, how hard could it be? I started simple, messed around with html/css on w3schools. I thought hey, this isnt so bad. I eventually got into javascript- okay that is a little harder but it isnt too bad. Well, i guess it is time to start putting it all together.

So i pick a framework, angular 2/3/4/5 whatever the fuck it is called now, and things start to get really hard. Okay, i gotta learn typescript i guess. Okay, i gotta learn how to interact with the DOM, with views, with logic, with data over HTTP. Okay, now i gotta learn all the CRUD operations over http. Okay now i am only learning the frontend so if i actually want to do something with it i have to hook it up to the backend. Okay now i gotta learn sails. Okay now i gotta learn a specific DB language like mongo. Okay now i gotta do....

THERE IS TOO MUCH SHIT. WHY IS THERE LIKE 1,000 DIFFERENT THINGS I GOTTA LEARN AND INSTALL 1000 DIFFERENT PACKAGES AND 1000 DIFFERENT CLI TOOLS JUST TO FUCKING MAKE AN APPLICATION THAT ADDS SHIT TOGETHER.

Like what the fuck, is all programming like this? I feel lost, like there is just too much shit out there. How am i supposed to learn how all of that shit works and make a functional program and get a job doing this shit?

The weight is tearing me down. I dont think i am going to make it bros. How do you guys do it?

Welcome to the club.

realized that learning IS the job.

it will never stop.

task chunking

yep learning is the best part
if you can't find testing new stuff/learning/improving past systems as enjoyable, this just isn't the career field for you

I started with learning a statically typed language like Java at university (non - CS degree), then a bit of C# and SQL databases. Upon graduation I was hired by IBM and they threw me into a role as a developer for applications running on IBM Bluemix (Like AWS or Azure). I had never touched a line of JavaScript or really HTML or any of that in my life.

The stack they were using was CouchDB, Nodejs and ReactJS in the front-end. NPM or Yarn as package managers. The first few weeks I felt like a total moron and I could barely separate front-end from back-end and half of the shit felt like magic to me. Stuff like pulling down modules from NPM and including them in your app seemed unsafe and strange (still does desu). Anyways, little by little things started to become clearer and now I even do it for fun. Quit my job at IBM and started working for a digital agency because I wanted to do more web stuff. Just find something that you would like to code and then move slowly. Don't be afraid to read all of the documentation and properly understand the tools that you are using (including protocols like HTTP etc). I guess what I am trying to say is that things will be fine if you hang in there, and if you have some little project that you made on your own that you can show to employers that will go a long way. Just don't rush it and you won't feel overwhelmed. Any large problem can be broken down into small steps and then just go one step at the time. All gonna make it bro

>All gonna make it bro
except like actually majority of the people who get into the field but y'know, details who cares

This guy gets it.

nearby server location.
Possibly on a CDN with servers across the world.

Separate your JS and CSS into 'critical' and 'non-critical' parts.
Load the critical JS/CSS immediately, maybe even inline and defer everything else, that's not needed to render the immediate visible view.

Optimize images (tinypng/etc.) & obviously minify JS/CSS.
Purify CSS from entries, that are actually not used on your site. (for example if you are importing a whole css framework but only need a small part of classes)

But one retarded hueg image will of course offset any minimal improvement you might have made in other areas.

>Okay now i gotta learn [insert X]
Rookie mistake.
Don't learn things just for the sake of it.
You set out to build something and figure out what you actually need along the way and everything else is secondary.

Thx bro, ill try and hang in there.

Would anyone recommend taking a bootcamp or something like it? For instance, i was looking at angularbootcamp.com/.

It is $1,000 for the 3 day course. Does anyone have any experience or recommendations with stuff like this?

It is a meme from /fit/. I don't know about the actual successrate of people coming into this field. But out of the ones who fail I struggle to believe that they were really that interested or put in the required time. Web-dev honestly isn't THAT complicated. If you enjoy it and if you put your ass into it I am convinced that you will find employment. I'm from Sweden so I don't know if things are drastically different in the states, but atleast in western europe it is easy to find work.

Also your idea of making it may differ from mine, but if you can support yourself doing what you like you've made it in my book.

yeah you should definitely give them money maybe they'll be able to turn your retarded ass into a wizard for $1000

>Also your idea of making it may differ from mine, but if you can support yourself doing what you like you've made it in my book.
sure, but most people don't get to that stage

>It is $1,000 for the 3 day course.
Lol

what a scam.

everything you need is already on the internet and free

Aye don't worry, just keep coding every day. Problems will never disappear, they are part of programming (regardless if you do web-dev or system programming). You will just become more adept at handling them.

I have no experiece of bootcamps but I would not pay that amount for 3 days. There are plenty of resources online to build pretty much anything you could imagine. The most important part in my opinion is to build something of your own. If you just follow tutorials you will be limited in how you tackle new problems. Find a project you want to build (even if it is just copying an already existing application) and then get started.

I have a website that when I look on responsive design for my phone, it looks fine.

But on the actual phone there are a few things wrong. Like the background is overflowing and shit.

Why is that? I'm using the correct viewport. It also makes it pretty annoying to develop when I have to keep checking the phone.

>figure out what you actually need along the way and everything else is secondary
I really struggled with this for a long time. I'm curious by nature and I feel insecure in using something if I don't fully understand how it works, but you just have to get over it and ultimately trust yourself to be able to figure out what went wrong when shit breaks. It definitely helps to have in-depth knowledge of stuff but at the end of the day you've got to a have a finished* product. You could spend your whole life dissecting all the tools and frameworks as much as they change. If it were required nobody would ever get anything done it seems.

Prove it

are you using a reasonably modern browser on your phone as well?
Does it happen both in mobile FF and Chrome?

from grad statistics to income per field statistics to longevity in the field, it paints a pretty grim image desu
people keep thinking tech in general is this super seductive easy field that's just dying to pay you $150k a year to write fizzbuzz and use your framework of choice
but lmao reality ain't that easy babe

Oh crap, you are right I'm retarded. I downloaded FF and worked fine. I know what it is now, I just need to change a few things to make look good on Chrome/etc.


Thanks friend.

Still waiting for the prove

proof*
and finding it is pretty easy but depends on region
so hit up your fav search engine and start glancing at your local region statistics
>spoonfeed me
you wont make it LOL, add another to the stats

What makes you think I want to be a web monkey?

Hello anons.
I am a 27 y/o user and I've decided to start learning web development. I've started reading tutorials for HTML and CSS3. My programming experience is almost 0 and only remember stuff from high school and remember some concepts about declaring variable and some stuff.
How much time did you take to be good? Am I too late to start learning?

Do you have a degree?
What are you doing for living?
I will advice you depending on your answer.

>you wont make it LOL, add another to the stats

Start now

I have no degree. I graduated from high school and then started working in many low IQ jobs like shop assistant/carpenteer and some illegal jobs. I lately got interested in programming and I was good at maths so I started read info and liked web programming.

why do you think /dpg/ hates us?

Webdev is a lot of learning

its only harmful if youre querying a DB /w no framework

inline JS and CSS is not faster its much much slower

IMO its too late to start getting into programming for you.

it takes like a year to MASTER data structures and algorithms. I could teach a chimp webdev in a week.

What is the correct way of doing responsive CSS?

Learn how to learn. The entire web stack rewrites itself every 2 years so essentially nobody has any advantage over you.

Depends on your goals but usually the answer is "a grid" and you pick the grid based on your overall needs and libraries/frameworks you pick. Feature detection libraries have their place. Honorable mention to using CSS3 media queries.

I was only talking about the critical sections.
So it's all there in the index.html and you don't need another request to the server.
Of course with HTTP2 you can just go and push it together with the initial response.

If the browser has to parse your inline stuff to render above the fold content its gonna slow down render time doing all that parsing AND you increased the bytecount doing your styles inline. Not to mention its a maintainability nightmare.

Is it even a JS lib? I thought it was a framework and a half wrapped in a meme shrouded by insincere shitposting?

Just go and learn. It takes time.

No matter how you do it, it will take time. The universal truth about programming is you learn by doing it.
You can pay for bootcamps, you can pay for videos, you can be self-taught. It will result the same. The only real difference is the last forces you to do actual research on your own. So you might need to use your little monkey brain some more.

It's important knowing how to do that in this field. And again, study/practice/practice. For every chapter you read, practice twice as much. Nothing, I say NOTHING will teach you how to program like programming.

Which ever way you choose, please do your research well (it's all out there, I did it) and focus on learning the important things like good coding practices, the latest/best/concise syntax and technologies that use it, and last but not least your websites should be good on all devices. You'll find out more, but the most important of all is always knowing how to fix yours/others mistakes.

Godspeed. Your age is only relevant to yourself, it doesn't fucking affect the programming world retard. Stop asking that.

It calls itself a framework on its own website, but Vue and React are generally referred to as libraries, unlike Angular.
Not like there is a clear separation.
The best definition I heard so far, when it comes to JS:
"You are using a library. A framework is using you."

>half wrapped in a meme shrouded by insincere shitposting
it's really nice though

sry, with inline I rather meant to include the small critical style-block in the html, not to set the style of individual elements inline.

Also doesn't mean that you have to edit your CSS inside the html file or copy it back and forth.
With webpack you could set it up, to check filenames and inline anything starting with 'critical_'

Not that I am doing that or think it's really worth the effort. But it can be an option, if someone wants to experiment with any possible loading gains.

other user here
>The entire web stack rewrites itself every 2 years so essentially nobody has any advantage over you.
Could you explain that please?

>CSS
Just kill me now. How the fuck do I get
@media only screen and (orientation: portrait)
to work?

The whole point of external css is to increase pageload because you reuse the styles.

this lol, wont learn shit in 3 days

I'm still a peasant and I want to get learning web stuff, eg web programming/development/web apps/site & blog creation, all that good shit

Where do I start?

Seems fine are you trying to debug it with IE6 or something?

Play around with media queries and see what cutoff point looks good.

Test on real mobile devices because simulators don't always work properly.

Make sure your images are resized properly and don't overflow the content area, making the viewport not fit the page width.

Well, you've found the right thread, but seems like you haven't found the right post yet. Here, let me help you out (>^_^)>

No. Here is a pic of the situation. The crossed-out section should work on portrait but doesn't.

How do i find out how many page views i get monthly? No third btw. Just purely from commands or other pure ways from server

nigga, that's a fucking lie. I can teach a chimp to master web dev in a month. No fucking way someone can fully learn it in a week.

this is a specificity problem, the rules declared later take priority(media queries don't change the specificity of a selector)

it says a lot about your experience with webdev that you think data structures and algorithms aren't used for webdev

Wow, works now. Thanks a lot!

Wew, lad.

Server logs and roll your own log-analysis tooling? Whats the question all I see here is meme tier virtue signaling about how you don't use GA.

So what language for back-end is state of the art? I heard Java is deprecated and PHP pain. Is NodeJS the new thing or is there even something newer and better?

B-but webdev is easy to learn r-right? That's what Sup Forums told me!

yes, this was only about the initial render time.

is not hard

These days backends are done in/on all kinds of languages and platforms

The trick is separating your web/frontend server from your backend server, that's gonna save you a ton of grief.

By all means use this terrible practice see if I care.

Get the headers and check if the Content-Type is image/*.

it's hard to get in to because there's so many different languages and dev environment things to learn but you've just got to tackle them one at a time.

Give yourself a project, say building a javascript based website, and build it as simple as possible. Then start more complex version, say using Grunt to minify and uglify your code.

Once you're more comfortable with that move on to the next level of complexity, like a Slack chatbot built with Node.

Ignore frameworks for now, you don't need to know one to get a job, but if you do go for React.

I already said that I don't in You are looking for an argument, where there is none. So let's just get along user.

You're not too late. Everyone front end developer is self taught. I did a career change when I was 27. I took a pay cut because I went to a junior role when before I was a manager but now, a year later, I'm earning the same and have way more prospects for the future.

state of the art? Node.
Used most commonly, Python.

It's a strong practice but I can see see why you wouldn't want to cut off 150ms off the first meaningful paint time when your project will never be loaded enough times for those 150ms to add up to the hours you'd have spent understanding and implementing the concept.

Elixir is based on Erlang which was literally made for telecommunications.

I'd use Elixir for that

Come chat about React in #Sup Forumswdg on Rizon.net

discord.gg/wdg

A place where web-devs meet to share knowledge and resources for free.

Anyone use semantic-ui?
How do I change the background color for the site theme? All I see are overrides for all the "collections", "elements", "views", etc.

Go
Elixir
Clojure
Java is absolutely not depreciated you enormous faget

Ruby on Rails unless concurrency is a concern, in which case go for something like Scala, Go, or Elixir

Off-topic

What Sup Forums theme do you guys use?

I use Stylish but it's always crashing/ doesn't apply the themes corrrectly.

Share your themes if you use any, please

Red pill me on web application authentication and authorization, Sup Forums.

Im making a web application with a microservice architecture (and Im already regretting it), and I need to authenticate the users on the web page.

I figure JWT's are a bad idea for the end user, because they wouldn't be able to log out and I would have no real way to invalidate the user session, since JWT's are stateless.

I've decided to use JWT's inbetween web services, though.

The other method I know, is the good ol' cookie and session method. Is this the way to go here?

With Love and Admiration,
user

>Is this the way to go here?
Every one does it that way, why would you do different?