/wdg/ Web Degenerate General

Previous:
→ → →

>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 - Web Development in 2018 - A Practical Guide

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:

developers.google.com/youtube/v3/guides/push_notifications
developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification
twitter.com/NSFWRedditGif


>I've never used PHP after leaving college. Is it really that great to work with as people say
I couldn't say but I can tell you that there's still tonnes of jobs in PHP. I use old school PHP with no frameworks and get paid well for it.

What is the best domain format for a personal portfolio site?

>johnsmith.com
>jsmith.com
>john-smith.com
>smithj.com

And is .com fine or are .org or .net more appropriate?

>Do you have a cool sounding name?
johnsmith.com
>Do you have a boring or ethnic sounding name?
Use the name of your company.

>or ethnic sounding name
can confirm
doesn't matter what race you actually are, if your name sounds ethnic (and by ethnic I especially mean African, Central Asian or South Asian)
everyone is automatically going to assume that every article you write is full of shit

t. someone with an ethnic name who assumes that articles written by people with ethnic names are full of shit

.hamburger {
display:visible;
}
.sidebar {
display:hidden;
}

@media (min-width: 750px) {
.hamburger {
display: hidden;
}

.sidebar {
display:visible;
}
}


Is this considered hackish?

Topic: redux

What's wrong here?

I have a remove method that filters an array of objects to remove one object.

Only, when it's the last object, it doesn't get removed.


My method:

case types.REMOVE_COLLECTION_SUCCESS:
return Object.assign({}, state, {
activeTitle: null,
keyAndValuePairs: state.keyAndValuePairs.filter(
item => Object.keys(item) !== action.uid
)
});


I want my method to return the keyAndValuePairs array to filter by UID and to return empty when there's only one object.


Any help appreciated.

Math brainlet here, pls halp
I have two numbers in an array, total female and total male population of a country.
How can I use them to calculate the "female to male ratio" of the country?

let female_amount = 825
let male_amount = 275

let female_to_male_ratio = female_amount/male_amount;

console.log(female_to_male_ratio) // 3

// female_to_male_ratio= 3:1

is there a YouTube API such that I can get notified when a channel uploads and get certain info about the video?

yes

okay cool, is it free to use and shit?

developers.google.com/youtube/v3/guides/push_notifications

media queries aren't hacks, they're almost always necessary for responsive design.

there was this technology, wufl or something like that that let you set up pages with content served for different resolutions independently, is that still kicking? it would save you from media queries

*wurfl

Hi guys! Me again, brainlet here. Assignment: make a Fleet of cars with attributes: producer, model, registration number, etc. Methods for: deleting, adding, showing all, showing last, editing certain. After giving it a bit thought i decided to make it stack of dictionaries. Here is code:
import json


class Fleet:
def __init__(self):
self.items = []

def push(self, new_car):
self.items.append(new_car)
def pop(self):
return self.items.pop()
def peek(self):
return self.items[len(self.items)-1]
def print_last(self):
print json.dumps(self.items[len(self.items)-1])

def print_all(self):
for i in range(0, len(self.items)):
print json.dumps(self.items[i])
def change_key(self,car, key, value):
car[key] = value

fleet = Fleet()

car1 = {
"registration_number": 12345,
"passangers_number": 3,
"production_year":1990,
"producer": "Mazda",
"model": 2,
"type_of_car": "Sedan" }


car2 = {
"registration_number":44662,
"passangers_number":6,
"production_year":1990,
"producer" : "Toyota",
"model" : 5,
"type_of_car" :"Sedan"
}

fleet.push(car1)
fleet.push(car2)
fleet.change_key(car2, "producer", "Mercedes")
print(fleet.print_last())
print(fleet.print_all())

What would you do better? I certainly would add some constructor for keys, so without writing dict like that
dict = {
"a": "b",
"c":5
}

I would make old, good contructor:
fleet = Fleet("b", 5")

So without writing keys! Is there a way to do this?

How does everone sell their web design services?

Attached: 1530432867296.jpg (800x1103, 252K)

a friend of my borther wanted to tweak his website

Attached: 1533398633232.jpg (766x960, 64K)

How do I allow users to make an e-mail address on my domain themselves ?
I am completely new to all of this so I'm sorry if this all sounds incredibly boring for the more experienced devs here. The hoster does have directadmin to create email accounts manually, but I cannot find a way to allow users to create them themselves.

this doesn't consider if male amount is higher
well it doesnt need to if it's a simple exercise, but it's a good thing to think about, you don't want silly issues in your program

>name of your company
for a personal portfolio site?

of course it works if the male amount is higher

you should revisit some math

> this doesn't consider if male amount is higher
dude, wtf?

you could just do this with your back-end by querying the client's user agent or screen size before delivering the page

that's what wurfl (or whatever it's name was) is for

for what purpose? That would be like importing jquery just so you can use the fucking $ sign

What language or set of commands should I use for passing strings through a socket? JSON?

it comes with libraries and automated functions that serve content appropiate for the target
it scales images, for example and has the option to serve video in one way or another deppending on the device
is like a framework

I mean it is so theorically awesome that it shocks me that nobody ever talks about it, my web teacher mentioned it to us, and he talked wonders about it, he was a webmaster for some important news website that had this philosophy of serving any browser(speciall olders) so they had to put up with serving info for all devices

has anyone here used wurfl?

Attached: wurfl[1].jpg (200x200, 11K)

>webmaster
what the hell is a webmaster?

simple css does 99% of the work. Your teacher just sounds like one of those meme framework riders

why is learning sql so dry

I want to do this:
let cube_1 = {
x: 10,
y: 10,
width: 150,

geometry: [{
x: x,
y: y,
dx: x + width,
dy: y
},
{
x: width,
y: y,
dx: width,
dy: y + width
},
{
x: x + width,
y: y + width,
dx: x,
dy: y + width
},
{
x: x,
y: y + width,
dx: x,
dy: y
}],
color: "F00FFF"
};

Where i enter the values of x and y and width which i then use inside the same json object. But it doesn't work since it's undefined. How can I do this in a similar way? I've been working all day now and i can't come up with something as simple and elegant as this (which works)

That isn't true unless you're only exclusively supporting the latest Chrome and Firefox releases. Which I guess is fair, chrome has majority of the market no matter how you slice it.
But for literally everyone else, you need more than simple css to deal with different browser inconsistencies - which you can write yourself, but why bother when solutions exist that can make writing css a breeze?

geometry is undefined

he was talking about serving everything, from old mobil devices to dad win XP IE5, he was a good teacher, didn't seem like a framework rider to me
the lead of the web department of that particular news channel

No the error is that x is undefined. Geometry is another object in the json file (which itself is a list of json objects).

it'll just log 0.3 which requires an additional step before giving you the 3 you're looking for

what does a webmaster do and what tech/knowledge i have to learn to become one?

Why not make a class car with all attributes and make the fleet a collection of cars?

Object-oriented programming is taboo in Jow Forums.

If you maintain a website, you're a webmaster.

Ok I solved it.

let cube_1 = {
x: 10,
y: 10,
width: 150,
geometry: [],
update_geometry: function (x, y, width, geometry) {

geometry = [{
x: x,
y: y,
dx: x + width,
dy: y
},
{
x: width,
y: y,
dx: width,
dy: y + width
},
{
x: x + width,
y: y + width,
dx: x,
dy: y + width
},
{
x: x,
y: y + width,
dx: x,
dy: y
}];

return geometry;
},
color: "F00FFF"
};

cube_1.geometry = cube_1.update_geometry(cube_1.x, cube_1.y, cube_1.width, cube_1.geometry);

I suddenly understand why i'm unemployed.

If you masturbate a website, you're a webmasterbater.

But how do i print all cars in the fleet?

Iterate through all the objects in the collection/array

I'm a regular non-web software developer and even though I've worked with php, JS, SQL etc before I really have no idea about the broader scope of web development. What's a good framework to make a simple portfolio website with? Honestly I don't want to spend too much time on it, I just want it to look simple and professional, but still custom-made.

do you know what a ratio is?

do you know what proper ratio format is?

"Appropriate responses are built using event.action within the notificationclick event."

What the fuck did they mean by this?

I am trying to get my Push Notification to be clickable and have NO idea how to do it.

WTF MOZILLA

developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification

anyone done it that cares to assist me?

Attached: kjgjfe7mnj111.png (1280x720, 1.11M)

explain it then

Starting my first proper code cucking job next week. It's Java EE. Anyone here made web apps with Spring/EJB/etc?

Attached: That+s+exactly+what+i+m+talking+about+except+it+was+my+_f3b09155b6173962b78d9de4de17d5a5.png (512x512, 8K)

Out of curiosity, for those working as web developers, how much do you make per hour and where are you from? I've been reading some Discord shitters giving me 50-60 jewros per hour for Python backend wtf that's insane

you dont understand. Class car, objects: toyota, Mercedes with atributes: engine, model, type - how to iterate throughs objects?

Yeah but bro that's nothing. Some of these companies make like $500k a month with like 3 employees

That's low? Wow alright, thanks for the insight. I'm googling shit out.

You make several cars... Javaish pseduo:
car car1 = new car(attribute 1, attribute 2)
car car2 = new car(attribute 1, attribute 2)

list list_of_cars = new list(car1, car2)

print cars and attrib{
for(car in list_of_cars){
print car
for(attrib in car){
print attrib
}
}
}

and so on, but however you'd do that in python. Adding and removing by simply adding and removing to the list of cars

>tfw i bought an expensive PC instead of a MacBook

Why are these Unix based pieces of shit so fucking expensive? They're so much more comfortable to work with than this cuck Windows shell.

>Not dual booting Loonix

what editor do you use for linux?

>display:visible
Visible is not a valid value for the "display" property.
Other than that, the actual usage of media-queries to show/hide elements is not hackish. It's very much the intended use case.

p.s. use ems in media-queries, too.

Can anyone help me figure out how to set the authenticated user in a created_by field of my model through a CreateView class in Django?

In a function view I can just do something like Item.created_by = request.user but I don't know in a generic createview

how can I pass state from one class component to another?
while i had a functional component i could always render the state as arguments, but now the i can't fetch them from anywhere.
And I don't understand what does constructor(props){super(props)} do

java ee !== spring
sort yourself first

Literally only a sperg calls macbooks "unix-based". Absolutely nobody cares about the unix base, not even web devs, they care about macbooks because software quality is much higher on average than alternatives.

nvm, I'm retarded
still don't get the constructor thing tho...

how the heck do i get these hide-reply-buttons to be within the post divs and not outside
i want them all like the middle one in my image

Attached: styling.png (853x598, 155K)

negative margin-right on the btns, and then padding-left on the "Anonymous" containing element

well it looks nice but when i try clicking on it my mouse cursor and the button start strobing like it\s a rave and i can\t click on it

uh,. not sure. if it's a z index issue, just slap position:relative; and z-index:999; on the btn. if you mean something else, idk right now. I',m going to sleep. ciao cunts.

thanks user i think i'm well on the way of getting this shit clean just need to fiddle a bit with these relations

just use vscode, it's the best

why is doing this a bad idea?

someFunction = () => {
this.setState({
value: this.state.value + 1
});
}

Because you should do it based on the previous state at the time of calling the function, setstate is async

What you want to do is

>find current state (eg counter is at 0 when you call the function)
>change state to count + 1, from 0
>state of count is now 1, based on the previous state being 0, which is what you expected to happen

What you are doing is this
>change count to + 1, no matter what the current state is

It's not bad in that example but if you imagine pushing things to an array and you can imagine things might get out of order in which they "should" be

I'm worried that I might not get hired by a company because I have a long work gap for years. So would it be easier for me to find work as a free lance web developer rather than applying for a corporate company?

>gaps
>"i took some time to find myself"

Everyone knows that just means "I jacked off for a year"
Year gaps are a huge red flag for companies for some reason. You had better have something to show for it, otherwise they're going to think that you were some kind of unemployable homeless drifter who has mental problems preventing him from holding a job for long periods of time

I'm a design brainlet. Please call for help.

Attached: combochar.webm (640x360, 999K)

Yeah I understand that. But I was a NEET for 9 years because I was living off welfare. I don't know how I'm supposed to explain that. I need real advice. I really fucked up. Do I lie on my resume and I can tell them I did odd jobs, a couple years of volunteering and self study. Or I can try to become self employed and pursue my own projects/free lance.
I get that. I could work on as many projects as I can, work on acquiring a diverse skillset, and maybe get into college and try to get an internship but would that be enough?

>all that
yeah that'll probably be enough
what they're worried about is the idea that you don't have the mental fortitude to handle living in society and putting a steady and meaningful amount of work into one thing for a long period of time.
College and internships should have you covered in that respect.

You might as well tell them "I inexplicably became homeless after [insert sob story] and took a really long time to pull myself together"
You'll seem less full of shit when some truth gets mixed in.

use em's everywhere if your'e going to use them, makes everything so much easier.

I don't understand what you want nor what your terrible application is intended to do.
Give us a user story. You'll be able to build a sensible user experience on top of that. Then UI follows from UX.

Make up a good story, but you're going to have to back this up with proof that you are reliable, contrary to your past behavior.
So this could be being homeless but now you regularly volunteer, this could be going to school and showing you can work long term, etc. Whatever you do, don't make up a long elaborate story that they could easily attempt to verify. You were in a rut, not in a sex dungeon under mcdonalds.
You can also get help from your local agencies who regularly deal with people who have been out of work for a very long time (assuming you live in a civilized first world country).
Internships are very competitive, but that's also a path, but they typically want grads or people in school.
You could try the self-employed path, but you still need money.

I'm actually going to college right now for Computer Science. Community college. But I'd like to transfer to a university. I figured I could try San Jose State, UC Davis or maybe any good university I can get into. I really want to get into an internship.

Don't have things jump around the screen. Have a placeholder image or just give the image container a fixed height so that doesn't happen.

Make custom pickers for the game list and character list, the default MacOS ones look lame. And the colors suck.

I'm not clear on what goes that text box, do you provide an explanation?

If you're actually going to go that route there's some things that you should understand about the UC and CSU system.
The UCs are research schools.
The CSUs are """practical""" schools, not too different from trade schools in respect to bachelors for STEM.
The tuition reflects this.

However, UCs have much better extracurriculars. I mean that industry like Northrop and Raytheon are more likely to spend real money at a UC than a CSU.

Any money devoted to extracurriculars at a CSU is going to be pity money that they spend because Obama forced them to if they wanted to participate in the F-35 project.

If you do not participate in extracurriculars (industry sponsored projects) you are wasting your time at a university. These are the greatest opportunities you will have pre-career to find people who are not fuck-ups, who can potentially also view you as not a fuck-up. This is a real connection, not some """connection""" that frat boys had some kind of fever dream about in high school.

t. I have experience in this subject

p.s. going to a CSU on FAFSA money is basically a government-subsidized full ride.
I went this route and have zero student debt. I don't know if this will work for you. Your situation is wonky.

If uni is what you want to do, go right ahead. Seems like you're all set, just don't drop out. Your gap will be irrelevant at that point as you've demonstrated A) it was just a rough spot in life B) you can stick to one thing for years (college/uni), and C) you aren't dumb enough to fail.
So don't give yourself a stress attack, you've got this! Good luck user I hope the fortunes bless you.

tell me why i shouldn't use adonijs because it looks too good to be true

I just looked at the website and it looks like no one proofread their copy. What features do they have that makes you so convinced it's the best?

>display:visible;

It's display: block

Do you have a github activity(the green boxes)?
If you have a github activity you could just state in your resume what you did during that timeframe. So if you have a github activity for 2 years you could just say "contributed to open-source projects" in your resume. So you already shaved 2 years from your 9 years of gap.

Now what to think for the 7 years...

I don't get what you're trying to do with "Object.keys(item) !== action.uid". Object.keys(obj) returns an array format of the keys on the object. action.uid is bound to be a number or string which won't ever be equal to an array so nothing is removed. You need to give us more information in your store structure for us to help.

Attached: file.png (458x157, 18K)

+1 this.
upvoted.

const updateObject = (oldObject, newValues) => {
return Object.assign({}, oldObject, newValues);
}

function appReducer(state = initialState, action) {
switch (action.type) {
case 'REMOVE_COLLECTION_SUCCESS':
return updateObject(state, {
activeTitle: null,
keyAndValuePairs: state.keyAndValuePairs.filter(
item => Object.keys(item) !== action.uid
)
});

default:
return state;
}
}

let store = createStore(appReducer);

is there a way to do web development without using Javascript/HTML/CSS?

oh god, it's so fucking disgusting!

What development involving creating UI have you done that's not disgusting?

literally and emphatically no.
HTML and CSS are the ~standard~, and JavaScript is just the thing that every browser implemented and now you can't throw it away because every website uses it

having said that there are ways to make HTML, CSS, and JavaScript tolerable.
Use modern HTML5 and modern CSS3, with grids and flexbox for layout. Use media queries to alter your layout for different devices. It's pretty easy with grids.

Use Typescript, which is a statically typed superset of Javascript which compiles to JavaScript. It's much less cancerous.

Use a javascript framework which follows the pattern of object-oriented programming for the creation of UI components.
Such frameworks include React, Vue, Angular 2, Polymer, etc.
I recommend avoiding Polymer. You will hate it.