<wdg/> - Web Development General

Prev thread: >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 (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtube.com/watch?v=Zftx68K-1D4&feature=youtu.be

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS

Attached: wdg.png (822x552, 868K)

Other urls found in this thread:

youtube.com/watch?v=6G3kQyqMFpQ
magicalwasteland.com/shenzhen-io-ost/
npmjs.com/package/node-persist
reddit.com/r/startups/
reddit.com/
twitter.com/AnonBabble

First for [embed] [embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed][embed]

What is the purpose of a session store? like DynamoDB for example.

Can someone enlighten me on what is the difference between Join and Union and when should each be used?
I got asked that in todays interview for a php backend developer job
I somehow made it to the second part of the interview (they will give me a shitton of tables and ask me to show them rows from a lot of tables)

dumb question, but how come I can't rename url or method to anything else in this case
app.use((req, res, next) => {
const {url, method} = req;
const time = new Date();
const message = `${method}: ${url} - ${time}`;

console.log(message);
});

I thought this is creating two variables and assigning the first two values of the req object to them? Why do they become undefined if I called one something like method 2 IN BOTH references?

Am I retarded?

>Is middleware in expressjs basically just the code that actually does something with the res/req? And express is just a framework that allows the application to receive/send http messages?
That's basically correct yes. Though middle-ware is more like any module that can hook and process some bit of Express without getting in the way too much, things like the body-parser are also middle-ware, as is passport. Though technically, they really just 'do something with the req' too so your description is pretty accurate even if it does cover a lot of things that you might not think of as explicitly handling the request/response.

>Can someone enlighten me on what is the difference between Join and Union and when should each be used?
I think you mean in the context of SQL.
A union just adds the results of two different queries and makes it look like one query. So, query A returns 4 rows, query B returns 6 rows, (A UNION B) returns 10 rows. If the columns aren't identical in both queries then it comes down to the SELECT line to see what gets returned but otherwise, some columns will be null in one set or the other.

A join connects two tables and then the query gets one set of results from them, usually we join things in the sense of:
SELECT patient.patient_id, patient.first_name, patient.last_name, patiend.dob, doctor.last_name, doctor.first_name, appointment.date_time FROM patient
LEFT JOIN appointment ON patient.patient_id = appointment.patient_id
LEFT JOIN doctor ON doctor.doctor_id = appointment.doctor_id

That connects the three tables together (technically, it connects the first two tables and then connects the result to the third table) using the primary/foreign keys named, you don't have to use keys either though you usually should.

Generally, UNION is used to connect queries that are the same shape, JOIN to create connected queries.

>how come I can't rename url or method to anything else in this case
You initialized them as const. You can't change the value of a const.
Also const and let variables only exist in the blocks they are defined, if you want a global variable, initialize them as var.

just google it

Thanks a lot, user.

I've had ton of fun learning php and mysql by myself in these 3 weeks(4 hours each day reading docs, watching tutorials in youtube and coding any stuff by myself) to the point of being confident enough to apply for a backend job but after this interview, I feel I have a loooot of stuff to learn about php and sql in general.

you applied for a job after 3 weeks and got an interview? What the fuck?

If you didn't know what UNION and JOIN are then you don't know SQL period. You shouldn't be applying for this sort of job. In the unlikely event that you talk your way into it, you're just going to have to explain to the next company why you got fired after a week.

I've known a few people who talked there way into jobs they weren't qualified for. The one that didn't end badly was already a CS graduate with development experience under his belt and he just made up some experience in a language that he didn't know and then studied to learn it as quickly as he could, since his coworkers were pretty shit and basically didn't study or work to improve themselves at all, he actually ended up being one of the better guys there.

The rest...they were like you, not qualified, talked their way into jobs they weren't qualified for and couldn't do and got fired when it turned out they didn't know anything. One even took a project down with them since they convinced the PM to switch to a meme technology that they'd done a tutorial in but nobody else had the slightest clue about and by the time anyone else could work out that the technology couldn't actually do what we needed, so much time and money had been burnt that the project was cancelled (and the faker was fired).

>you applied for a job after 3 weeks and got an interview? What the fuck?
Some combination of lots of lies, few candidates, junior role or desperation.
They obviously said that they had experience or something in PHP/SQL/Back-end but it took until the interview for the employer/agency to realise that this was bullshit and user was calling their tutorials/youtube shit experience and everyone's time was being wasted. The interviewer is probably kicking themselves for not checking the education history, they probably just assumed some relevant degree was there because who'd apply for jobs like this out of wishful thinking?

I an a frontend developer actually (freelancer with no degree working for a small company and yeah I bs about having some experience using php and mysql).
The job is for a junior php developer and I thought I could apply for that kind of job as well.

>freelancer with no degree
Honestly I hate little shits like you who never step on a college
>working for a small company
why the fuck are you looking for another job if you already have one?
Let another qualified guy get that job ffs

what´s the best way to memorize code? we 'learn' Php in institute right now. I can hardly keep details from the codes in my memory. How you did it user?

By using it.

How do I get employed? I've been doing this stuff for a while now. What do I need to do to actually get hired? What sort of basic portfolio do I have to assemble?


Any advice greatly appreciated.

Unrelated pic.

Attached: seasonal greenman.jpg (1025x505, 720K)

>What do I need to do to actually get hired?
A CS degree.
H2H

web dev is incredibly oversaturated because it is incredibly easy to learn,
so it's the buyer's market
It's no longer about skill but rather the culture. You will be able to get a job in this field if you become transgender gay gender neutral female for example

is backend web dev?

what if I'm europoor and willing to work for peanuts... Will I still have to cut my dick off?

I work as a web dev for minimum age ($500/month) and it had to fight for this spot with 5 different applicants.
A college degree in computer related shit helps a lot and you need to have some hobby or client projects in your portfolio.

I need some webcontrol collection that work on mobile device and normal desktop. jquery mobile looks old and bloated. Some other choice that don't need autistic framework like vue, react that need nodejs cli and compilation stuff.

>500$
yeah no, I'd rather go gay and start sucking dicks. I could make 500 for 5 dicks...

One does not do this kind of work for the money, one does it because one enjoys it.

If you think you can just jump in and make a bundle you are shit out of luck and need to come up with a different career choice. Web developer is the most underpaid position in IT by far

I already know web dev (focusing on react and getting into mobile dev)...

It's not that fun. Maybe in the beginning when you start learning new stuff. But once you know shit, its boring as fuck...

For example, I'm here, procrastinating instead of working... If it was that fun, why would I be here?

is asp.net worth learning nowadays at all?

why do people like you even take a post like that seriously


LOOK AT JOBS IN YOUR AREA
LEARN THE SKILLS REQUIRED
APPLY

>we don't need you right now, but please join our talent network!

I'm starting to suspect that up to half of the job postings are disingenuous, even from reputable companies..

Here in the Netherlands I see about 4000 php vacancies open on indeed right now.
Ranging from 2500 euro to 4500 euro a month (saw a few of 6000 as well).

2 years of experience in php/symphony. 4k to 6k.

Microsoftshit is always worth learning

Have a look at your local jobs site and see for yourself.

youtube.com/watch?v=6G3kQyqMFpQ

just watch this, the general rule of thumb is if you hit like 60% of the "must have" portion just fucking go for it, as the HR person who wrote that shitty job listing probably doesn't even know what any of the words mean anyway.

>Honestly I hate little shits like you who never step on a college
Life goal achieved!

>lots of ASP.NET jobs require a degree
>I have no degree

RIP in piece then

You guys got any music recommendations while coding? I grew tired of the lofi streams on youtube

yes, im using sox now. it works. thank you and everyone who've helped.

I'm fond of the Uplink soundtrack. You'll find it on youtube.

>I grew tired of the lofi
Oh, if you're referring to the bitrate rather than a genre, you'll find it elsewhere online as well in whatever quality you want.

That and magicalwasteland.com/shenzhen-io-ost/ are great!

I think he means LOFI HIPHOP RADIO BEATS TO STUDY/GAME/RELAX/CHILL TO 24/7 LIVESTREAM

just use spotify on chrome with adblock, any music you want

Does adblock blocks also the annoying sound clip ads?

What's the point of iterators and for...of?

In a sense, nothing...they're syntactical sugar for a for loop and/or an index you pass around. However they avoid all sorts of problems and simplify a thing that people used to fuck a lot. Also, for...of can do some seriously classly stuff when used with destructuring assignments. See the top of the previous thread.

Iterators (as in the object) are neat to pass around, they take care of indexing, bounds checking and keep the collection pure no matter what you're doing to it.

>See the top of the previous thread
Sorry, thread before last. I meant this post:

yep, but if you use other browsers the audio quality is trash.
it's limited to like 128kbps but it's good enough considering it's free

>Need a comments form but don't want to pay for hosting or a third party service.
>Make a google form and route all responses to my email
>Strip out the action URL and input names and put it in my own /form
>Target a hidden iframe
>Write a an onload event for that frame that runs a script that looks for "Your response has been submitted" and replaces my /form with "success" text.
This is on a site with hundreds of daily visitors. No one will know they're just submitting to shitty free google forms

Attached: (((cute anime girl))).jpg (563x765, 66K)

If it's stupid and it works...

>Going to build an order cart for a restaurant to pick up orders
Wish me luck

just import a library breh

>making waiters and waitress useless
sometimes I feel we are the bad guys

Nothing? Someone?

>Trying to build and maintain an ecommerce checkout alone
Give me the restaurant name so I can exploit it for free meals.

What do you mean by webcontrol collection

why do you think i'm building it myself m8

A Join combines two tables and returns them as a record set. A Union combines two SELECT statements.

Are there any real entrepreneurs on /wdg/?

I mean by that, someone who had to search for funds to launch their projects/start-ups etc?

Tell us about yourself.

Attached: 20170924_star-trek-discovery-crew_f840.jpg (840x441, 51K)

>Music while working on a mentally exhausting line of work
Enjoy being unproductive

>let somebody else have a better job than you because it hurts my feelings!

What the actual fuck are you talking about?

I'm noob, ould this be ok to store high scores in an online game or is there a better option than a simple .json file?

npmjs.com/package/node-persist

reddit.com/r/startups/

How many scores? You could probably just use a flat file

>can't work in open office settings

Stuff, like input box, sliders, gallery, tabs, etc.

>$500/month
Where do you live? My rent alone costs more than that so I'd be homeless.

Judging by the minimum wage, balkans.

>reddit.com/r/startups/
>reddit.com/
>reddit.com
>basedddit

Hey lads. Do your guys use your real name for your portfolio or do you use a company name?

I'm about to register my company and I don't really want to use my real name.

Any tips for portfolio domain/company naming?

Attached: tips-on-getting-your-copywriter-portfolio-started[1].jpg (860x484, 485K)

How do you handle deadlines at your werk without over stressing yourself?

Easy. I don't have a job

I'm making sure I give my best and if it happens it happens

why would anyone want to work with someone who won't even show their real name?

?
Session storage is a way to store short-term data on a browser that accessed the site. It goes away when the session times out or the browser is closed.
DynamoDB is a nosql database, which is long-term storage for whatever you want on the server(amazon's server)

Because my real name sucks and is not international-friendly.

better to let them know you are looking for a visa before hand so they don't waste their time, pajeet

Not pajeet, just European.

Rameesh my son

Why do people still use node when so many better languages exist now? Is it just inertia and people unwilling to learn something new?

>mfw I was scared of making my first pure HTML and CSS page
>mfw everything ended up going fine

Attached: eat this.jpg (750x1000, 65K)

Uhh.

Listen here, $500 is not a Web Dev salary. They might have hired you/that person as a web dev, and you might be doing the work, everything included.
But you are NOT getting paid for what your title is and the work you do. There's just no way.

Not in any of the major countries/metropolis. $500 is like what the government gives disabled people monthly.

It's on you to take the job, but don't talk about "starting from the bottom" when you accepted a $500 job. You're really not within the "minimum-wage" margin for developers. Way below that.

Anglicize it. In Balkans we get immigrants with real names like Assholepole Belmondo and they just turn it into "Mike" or "Charlie" when they introduce themselves.

It's better than zero and plus he's gonna have a year of experience to negotiate down the road.

I don't care, user.

The point of my argument isn't "it's better than zero" or whatever. $2 is better than $1, big deal.

The point is, it's not within a developer's salary margin. And by a large distance. He's an abnormal case. Which is fine, if he's ok with it.

It's just difficult to recognize someone as a serious professional in the field when you're getting paid like that, you know? Money matters. Again, not THAT much when you're starting but his case is just ridiculous.

Is it normal that I don't care about HTML and CSS as much as the backend or even JavaScript?

I don't even know what the fuck you're trying to say with that question. I doubt anyone cares what you like.

Shit nigga go take a break outside or some shit if your reading comprehension takes a hit or stop smoking weed who cares if you can't understand what I'm typing lmao

Yo nigga...you was straight chirpin on that bitch.

You don't have to get offended. But your question literally had no meaning to it other than you don't like HTML/CSS. That's your problem.

Is it a common occurrence for people to hate dealing with layout and design and like logic? Should I be trying to like it because it will hurt my job prospects if I don't?

Yeah. HTML/CSS from pre-2010 would mostly look like ass, but nowadays, you can make a pretty damn good looking website with just those basics -- it might even look good on both phones and desktops, and it might even have some basic interactivity.

Is there a simple npm script that I could run to copy css files from the bulma node module into my assets folder?

>Should I be trying to like...
If you have to try to like something, it's probably not for you.
Then again, people aren't paid to do stuff because they like it.

Rent alone is like 4 times that. How do you eat?

Manage expectations early and often. If the deadline seems unreasonable from the start make a case for why. If at any point during the work it seems that the deadline may be tight or missed tell people as soon as possible. Tho ultimately as long as I "give it my all" during my 40 hours a week I don't care. They can fuck themselves if they want me to work overtime I will find a new job.

There are both types of people in this industry.

But only the third type matters; the ones who will do a good job independent of whether they like it.

He probably lives in east europe desu

>$500 is like what the government gives disabled people monthly.
It's even less than that, unless you're living in a more rural state. $500 wouldn't cover shitty apartment rent in a somewhat small, poor city.

Is the following code the best way to check if the page has loaded?
document.addEventListener("DOMContentLoaded", function(e) {
// do something...
});

I am trying to append text to the top of notes stored in a database, but for some reason only my new notes are being saved and not being appending to what was there.

Here is my current code:

// Header
$header = "----- Updated on " . date("Y-m-d") . " at " . date("h:i:sa") . " -----
";
// Header + Posted Notes + Current Notes
$appendednotes = $header . $_POST["notes"] . "
" . $row['notes'];