/wdg/ - Web Development General

yeah

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap
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 from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)
pastebin.com/gfBPg24A - Collection of PHP links.

>Asking questions
jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

Attached: who.png (1280x720, 652K)

Other urls found in this thread:

php.net/manual/en/function.preg-replace.php
youtube.com/watch?v=S1y3UVmmFMo
youtube.com/watch?v=pW-SOdj4Kkk
twitter.com/SFWRedditGifs

First for writing the styles in plain HTML, fuck CSS, fuck JS, fuck sever side

Interview time.

These things always make me nervous for some unknown retarded reason.

I'm scared shitless for my first one, oh boy i'll be asked a ton of retarded questions about why i changed my career path after a couple years in a totally different industry and decided to become a webdev all of a sudden.

>mfw I have to explain this in my late 30's after only having a janitor job

Attached: 1551373304510.jpg (520x678, 85K)

>so user, you were a janitor? why do you want to get into webdev
because the internet is full of shit and somebody's gotta clean it up

how do I replace all \n in a string with
or some equivalent using php? Is there a function for doing this or will I need to do it myself?

You're nervous because you're not confident with your skills.

php.net/manual/en/function.preg-replace.php

Not necessarily.

youtube.com/watch?v=S1y3UVmmFMo

You are nervous because you think you won't pass as a girl.

he probably wont
just go as a man and say you're transitioning after you're hired, frend

thank fren

yw, I hear calls from my old and forgotten PHP nymph, can't wait to get into it again next year

This is true. I am a """mid-level""" interviewing for a senior-level position. I have very senior-level experience with everything from development to server administration, BUT that experience is personal because I've launched just under a dozen online businesses (all flops, lel).

I failed the technical interview because it was all based on terminology and I never went to school. He placed me at mid-level knowledge and I said no. It's not fair to quiz over that stuff though. The language literally has over 50 functions for dealing with arrays. You can't remember everything.

Anyways, interview went well and I have an in-person scheduled.

drop some tips for the newbies.

Just say you took it as a hobby to help a family friend make their website but you then became obsessed with learning and perfecting your skills in web development. Then you decided that you were super serious about web development and had skills that could bring value to any company hiring so you wanted to give it a shot.

Sure. Anything specific?

>skills that could bring value to any company hiring
Sounds rather selfish, better say that you want to get skills from a professional environment and grow as a specialist.

How to not fall into degeneracy and not do anything. What projects to add to your portfolio. How to apply, etc.

youtube.com/watch?v=pW-SOdj4Kkk
found this pretty interesting, but I like stuff by him in general

It's not directed at webdev, but the connection is pretty clear.
I am actually a fan of all that new stuff like SPAs, Webpack, etc., but it seems like there is quite some truth in what he is saying.
There are constantly new Generators and meta-Frameworks and while I think that Vue is pretty awesome, the way you go about creating modern sites and webapps is so far removed from the 4-part HTML, CSS, JS base, that everyone is told to start with.
Not that I know a solution, but it's something to keep in mind imo.

>say that you want to get skills from a professional environment and grow as a specialist.
If you're applying to be an intern, sure, but not for anything else. The purpose of an interview is to portray your value to the interviewer. In the interview for my current job, the owner was looking bored out of his mind. I could tell he didn't like me, so I asked about his plans on expanding the business. I got him all excited to talk about his company and future plans, then I said oh if I integrate this and this and you branch to the rest of the US that will make the company some serious money then? I got an offer that night even though they hired someone else for the original position before I even interviewed.

give a vid quickrundown? I aint watching 1h of video to understand the point you're trying to make

You have to make a conscious effort to sit there and develop stuff. Set a time you know you will be free and do it for 1 hour every single night. It's like going to the gym. The hardest part is starting.

I don't recommend a basic bitch portfolio. Develop useful stuff that people would want to use. You can make some sort of community page or a SaaS. It also provides that opportunity for it to become popular so that you don't need a job.

With that said, my portfolio hasn't mattered. I talk about the projects I have done but no one ever wants to see them.

When it comes to applying you need to put your resume on Dice, ziprecruiter, and angel.co

Work with the recruiters that call you because they will call you. Find places that use web developers and email them directly or go there and ask to speak to someone. When you're applying you are a salesman selling yourself....like a prostitute in a way.

In the actual interview get them into a position to talk about their company. Smile and nod while they talk for 30 straight minutes and fire off questions related to what they were saying every time they have a pause. Every single time I interview I am told how great my interview went and how easy I am to talk to and I never even say hardly anything.

You gave me a kick ass idea for a project. Some kind of portal where you'd set to do lists for other members of your team, have a common to do list for projects and some sort of messaging based on account. Challenging too!

how do I convince my manager:
not to version control all of our dependencies
the virtues of using .env files instead of global constants loaded in from a php file

very fucking insightful, thanks man, I'm saving this

not him but what landed me my last job was
>bought a .work domain (they're probably the cheapest domains)
>get a VPS provider for the domain (something like digitalocean's $5 droplet is adequate)
>get a email provider for the domain and use it for applying for the job position, (Zoho, atmail, etc) configuring it yourself is just not worth it because security config and avoiding getting marked as spam is a pain.
>use the VPS to host your web based projects. Demos are pretty cool and you probably want to put each project under its own subdomain so that visitors can actually use the projects that you've created.
>Keep learning and staying ahead of the curve. Watch tech conference talks on YouTube, apply the new concepts to your projects. Find projects that you want to do and just do them without worrying too much about the tech stack/frameworks.

Like Trello, Microsoft Planner, Slack or Monday?

Using .env files means that you can:

1. have custom configurations based on your development environment (which you likely will)
2. make sure that sensitive data is not stored on the repository.
3. not mistakenly commit changes to the constants file because you were using it for development

I'm not so sure what you mean by versioning your dependencies but you should probably have your dependencies locked to a specific version (or commit) in case any installations update the package introducing bugs in to production which happens often.

I have no clue of what any of that is, sorry.

much appreciated, thank you very much

project managers, seems to be what you wanna build

Yes, the idea can be expanded in many fields, but I'll keep it simple. My other idea for a project is a small CMS or blog.

Just like technological knowledge has disappeared in the past, currently the general ability and productivity of developers is also in decline.
We produced so much abstraction, between the way you create things and the way PCs actually work, that with time, the people that actually know/knew how to create those abstractions will disappear.
This leaves us with a situation where a lot of people are extremely skilled in using these abstractions, but are unable to actually innovate or maintain the systems they are using.

Attached: hgfdhdgfhgdfh.jpg (871x4850, 646K)

this shit is deep, why I've always wanted to into C and assambly, to be a "real" programmer

very interesting point but
do Computer Engineers not learn about the inner workings of computers? I'm a Computer Engineer graduate from Brazil and here we do learn about it (although it might be cause our universities are like 50 years in the past)

they do, but many dismiss it as some shit they don't have to worry about, also keep in mind most web devs aren't computer engineers

Modern CPUs and compilers are complex for a reason though. Assembly was simple so that people could write it. Now since people generally don't have to write it, becoming complex has many advantages in the form of speedups and more efficient memory usage.

It's partially the same thing with web dev. You can still write a normal web site using vanilla JavaScript to manage interactions and stuff, and that's doable.

When you add a library on top like React, it makes managing the DOM more simple. You could implement something like React in a barebones, simplistic way that was easily understandable to anyone. But you would end up with something that ends up slow in many situations. So under the hood, React is pretty complex, adding extra abstractions and code that you don't need in a normal web app, but the developer using the library doesn't need to care about that.

It's all a tradeoff, making the underlying layers more complex (CPUs, compilers, libraries, etc.) so that the applications that use those layers can be simpler, while still maintaining some degree of performance.

I graduated recently with a "computer science and engineering" degree, and I learned about the low level stuff of how computers work, but more at a conceptual level.

What if you could write HTML via valid JSON? HTML, as of now, is loosely based off XML but it looks like ass in 2019. What if it was instead JSON.

E.g.

{
"head" : {
"title" : "Example Page"
}

"body" : {
"h1" : "Section",
"p" : "It just werks."
}
}


Obviously there are some problems. For one, you can't have no-value attributes or nested elements, but imagine if we could get around those problems.

Attached: bank.jpg (480x480, 47K)

just encode html into utf8 string and send around

???

But that isn't fun. The problem with HTML isn't that it's hard to transport but that its syntax is relatively archaic by today's standards.

ah smug C / C++ programmer syndrome again
necessary complexity. necessary abstraction.

but no user you don't get it. unless a web developer knows every single line of React and could reproduce the entire framework on the spot he is not a "real programmer"

>ts syntax is relatively archaic by today's standards.
make a proposal for HTML6, what is stopping you?

Or I could just write a compiler for this gimmicky project idea.

Well he clearly wanted to share his idea publicly which means his ideas isnt just for his personal gimmick compiler, he think it is objective enough to be widely adopted. Otherwise he'd just do that and put it on github to be forever forgotten

If I modify a GPL licensed Wordpress theme, but I will only use it for my site, do I have to share my code?

Any react.js pros?

{
"type": "h1",
"text": "nigger",
"class": [ "jew", "poos" ],
"id": "title",
"stlye": {
"text-transform": "uppercase",
"color": "red"
}
}

Fuck that. It might work as a high-level structure, like in your example. However, when it comes to attributes, it would be a nightmare.

How do I manage multiple socket connections and state updates in the client? Redux-observable?

That's what Jade is close to and I fucking want to murder whoever thought it was a good idea.

I wish I'd get the time back I wasted on trying out Pug and dealing with its dumb
|
|
| pipe syntax
|

hey guys whats your opinion on amazon hosting? im looking for some hosting solutions for my car sales website

>amazon hosting
Wow, user. Such a creative and brave choice. I had to look up this company since no one has ever heard of them. I think it's ran by bozos or something, I didn't really get it. Anyway, great choice and good luck.

pretty rude,
that guy just wanted some opinions on AWS

Boom. Second recruiter called. Set up a phone interview for 140k full remote. In-person interview later this week for 125k 90% remote. Average household income here is 36k. I was making 10 dollars an hour in early 2017 when I first started posting in /wdg/. I love web dev!

Put your resume on Dice. Endless calls. Ignore every caller that sounds Indian because they are trying to hire you for Java jobs and are probably a scam anyways.

This has been a good week!

what kind of cool shit did you list on your resume that made them interested in you?

>HTML, as of now, is loosely based off XML
Obligatory correction that HTML was an application of SGML, XHTML is HTML using XML, and HTML5 is technically its own thing entirely (neither SGML nor XML)

Dude you give me hope! I switched to IT about two years ago and have been doing sys admin/network stuff but I really want to do mograte more to programming and web dev. Remote work sounds great.

Any good HTML5 quick intros? I know the concept, just need to get up to the speed with some concrete stuff.

>switch to ORM to make our data model more apparent at first glance
>end up with this for a database schema

__PACKAGE__->add_columns(
id => {
data_type => 'integer',
is_auto_increment => 1
},
[ map { $_ => { data_type => 'integer' } } qw(start end stock total_uses uses_per_user) ]->@*,
map { $_ => { data_type => 'text' } } qw(code sub args)
)

yikes

>he
That's me. I admit that it's a trash idea but I like the gimmick value.

That's true.

This is absolutely true. HTML is also a derivative of XML though and so XML and HTML exist as cousins (or siblings). HTML5, while technically not SGML or XML is still largely derivative because it's mostly an extension of HTML4 so much of the same still applies.

Nothing really. I just increased my professional experience by listing freelance development as a job prior to my actual related job experience. So instead of just over 2 years I have 6.

I do put only my strongest languages on the resume though. I helped with hiring at my current job and learned listing 20 languages is a bad idea because it suggests you don't specialize in anything specific.

It's a good time to get in. It's hard to find remote work because that's what I was initially looking for, but once you have a little experience it's not so bad I guess.

>client sends me email
>takes 16 minutes to email him a detailed response

Easiest billing ever.

what's the best way to make an account creation that ties into google? i.e.
>click create account/login
>use google authentication
>tie that to user info

I've used google authentication before to have a user only able to log in once they logged in with google, but I've never tied it into any information.

woah

Attached: 1529760540367.png (214x236, 6K)

quick question, in javascript when using a for of loop, can i get the iterator+1. Something like...

for x in X
if x == x+1

or should i just use a regular for loop

That example seems naive. You can't just have elements named by their tag name, what if there are multiple with the same tag at the same level?

Here's a more robust example for JSON to represent HTML:
[
{
name: "html"
lang: "en"
children: [
{
name: "head"
title: "Example Page",
children: [
{ name: "link", rel: "stylesheet", href: "/style.css" },
{ name: "scirpt", type: "text/javascript", src="/index.js" },
]
},
{
name: "body",
children: [
{ name: "h1", children: [ "Section" ] },
{
name: "p",
class: "my-paragraph",
children: [
"It ",
{ name: "em", children: [ "just" ] },
" werks."
]
}
]
}
]
}
]


Each object corresponds to an element, whose tag name is denoted by the 'name' attribute and whose child elements are in an array within the 'children' attribute (and the lack of this attribute would also indicate no children). All other attributes on the object correspond to attributes on the element.

Also bare strings in the 'children' array are text nodes. You might have just one as the entire contents of an element, or you might have multiple with real elements in between them.

Probably not as lightweight and easy to write as you hoped.

This is quite close to how the DOM is handled by browsers already.

Do you organize backend components by
1) their functionality (controller, service, entity, repository, etc.)
2) a business-logic grouping (user, product, cart, etc.)
3) a hybrid (controller, user, product, etc.)
4) another way?
This is for a medium-sized application. Thank you

just go backwards till 0

Attached: 1382502481599.jpg (218x265, 21K)

You're looking for Oauth
and if you have to ask, you're not ready for it yet.

Have any of you ever downloaded MySQL and NOT received a copy of the GNU General Public Licences and sent a letter directly to the FSF asking for a copy?

Attached: pic.png (547x460, 117K)

Reminds me of Flutter.

Attached: 28498671-6ec16dba-6f9a-11e7-82fe-8fec8d0a3b2f.png (634x580, 40K)

Can you recommend some modern good looking generic font for a single-page company webpage?

there are just so many choices and i have zero aesthetic feel

>too dumb to understand service workers
I'm never gonna make it bros

MySQL is Oracle property, they can distribute it the fucking way they want.

How fucking old code is this? You don't need to use 'new' with Dart these days.

>Junior position
>Requires 1+ year of experience

I swear i will kill a bitch soon

Redpillo n flutter and giv tutorials.

>I swear i will kill a bitch soon
At least rape her beforehand

Spoonfeed me on Gtasby? What is static website

The fuck is this shit?

>main
>section
>article

Have you ever seen anyone using this in prod? Every site I see is just a bunch of divs with custom class names. I've never seen #footer or #main in few years

What the actual fuck

Attached: 1535093596036.png (1746x954, 380K)

>section/article w/o heading
>section b4 main
>>>>spaces

if you need the index, then either do a normal for loop or use .forEach(>What is static website
Dude just google that or read the part where Gatsby devs describe what their tool does.
It's one of the basic terms you should already be familiar with.
In short:
>Static
Website exists on the server as a group of unchanging assets.
If you request the site, the server simply responds with the already existing .html, .css, .js files.
You can still get 'dynamic' data by talking to APIs, but your browser is then responsible for updating the rendered view with the new data.
>Dynamic
Server renders the page specifically for your response and sends you different assets, depending on who you are or the path you navigated to.
If you click on your profile for example, the server might very well send you a completely rendered HTML page, instead of just your data as JSON, which the frontend framework would then handle.

Static sites are generally super easy to host.
If you think about it, the average Wordpress site probably isn't changing that often. If someone wants to read blog entry *xyz*, instead of the server going to the database and rendering the response on the fly, you might as well make that part obsolete by just pre-rendering all your entries beforehand.
This badly needs some vertical indentation lines on the left.
Pretty sure those semantic elements are actually good practice though. I started using them as well. Afaik there isn't a hard rule of which goes into which, you can have sections in an article or articles in a section, doesn't really matter... but it's actually much nicer to reading the markup and also immediately makes your site way more accessible (especially the broad elements like header, nav, main, footer), in case you need to impress anyone with that.

>You can still get 'dynamic' data by talking to APIs, but your browser is then responsible for updating the rendered view with the new data.
>If you click on your profile for example, the server might very well send you a completely rendered HTML page, instead of just your data as JSON, which the frontend framework would then handle.

Attached: 1558333905805.png (499x322, 28K)

I added that part because often people think, that 'static website' means, that there would be no interactive UI and no re-rendering views/components, when 'static' actually refers to how the site is kept on the server

How difficult would it be to get a live red to green volume gradient in a microphone gain slider? I want to take mic amplitude as a discrete number in JS and map it to a segment of color on the slider. Any thoughts or resources I could look into to implement this?

Attached: export.png (367x55, 6K)

shouldn't be too difficult. Like an element right on top or behind the slider, that you grow or shrink depending on the level?

Yep, that's exactly what I have in mind. Guess I should start googling

If you can't just do it by yourself and need to ask you shouldn't be a programmer honestly.

This is babby's first website. I learned HTML, CSS, and JS like a week ago.

Attached: e40.png (640x640, 475K)

>tfw 3rd year and still know jack shit

Yeah, I know. I told you that you should better stop.

Header/footer/main tags are pretty nice and commonly used.

I need advice.
Going to start a web app with a friend. He knows golang, I know C#, should we pick .netcore or go?

I work in financial sector in Java and I want to have slightly less boring-to-the-death job, so I started learning webdev few weeks ago, because both Java and finance are unpleasant to work with.

Should I use Redux of React Redux based on my experience? I worry that React Redux simplify too much and Redux is harder to manage.