/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:

appstoreconnect.apple.com/
github.com/react-native-community/discussions-and-proposals/issues/6
thenextweb.com/dd/2017/09/25/facebook-re-licenses-react-mit-license-developer-backlash/
styled-components.com/
addons.mozilla.org/en-US/firefox/addon/load-time/
adminlte.io/themes/AdminLTE/pages/UI/timeline.html
twitter.com/NSFWRedditVideo

>Why do I keep getting these? I get the "Please send updated resume" emails at least once per day. Whats their angle?
It's total bullshit.
They're just harvesting resumes because they want a big database of resumes so that they can tell clients they have 10k programmers looking for work. When they get a client, they'll give them a small number of real candidates and a bunch of filler. You might be in either pile.

No, those are called virtual hosts and are trivial to do. Apache does them very well.

>Web Degenerate General
You think you're being funny or clever discordfag?

Do I need bot a mac and an iphone to deploy a react native app to the iStore or whatever it is called? Fucking hate these sojboys so much but too many Anglos use apple so I gotta serve them.

Attached: react-native.png (1920x1080, 29K)

I managed to set up an OSX VM using VMWare Workstation on my Ubuntu machine just so I could deploy my react native app.
You need to get XCode and have a developer account though as well.

although pic related does happen from time to time because I'm using an older version with modified libs which requires me to run a custom script (to the right)

Attached: file.png (1334x454, 330K)

yes if you want to make your life easy (check ebay no need to buy something brand new or top of the line)
no otherwise

They do this because schools in india are garbage. They get MS here in US, but it's really a cheat. For one they will pick ONLY pajeet professors who go super easy on them. I swear they give them the answers to the tests beforehand.
I worked with them in school during my senior year for BS, a few would come up to me with freshmen tier questions. It was my first experience with them and my jaw dropped to the floor.
The guy had just copy pasted some random code from the web into his IDE, dropped it in front of me and asked what was wrong with his code.
there was so much wrong I didn't know where to start, it was like he expected me to do his whole assignment for him.

i'm sure some of them are fine but a MS pajeet is still a pajeet

you can't connect your iOS device to it so testing becomes a bit more difficult. That being said the Android development experience for React Native is much worse.

Attached: file.png (1104x931, 1.08M)

>want to build something with react to add to my portfolio
>can't think of anything interesting
>continue browsing Jow Forums
life is suffering

Attached: 1531623319652.jpg (750x471, 37K)

here's some of my ideas:

>multiplayer song guessing game, games are in rounds where a portion of a song would play, and the fastest people to answer within the round get the most points
>collaborative story writing game
>youtube sync -- sync youtube videos with others in a chatroom format (i.e. cytube)
>cards against humanity clone
>react-based UI library for something like admin dashboard components so you could re-use them in other projects you do
>a job seeking website :^)
>any data source that you could get your hands on and generate a static site using Gatsby

>For one they will pick ONLY pajeet professors who go super easy on them. I swear they give them the answers to the tests beforehand
Universities go easy on international students in general. They want the graduation rate to be high because they want more international students since they're usually allowed to charge whatever they want and can make a tonne of cash from them.

There's a balance between graduating these students and not tanking their local reputation for graduating only the best students but if it's not a high-tier university, they may not have much of a reputation to lose.

International students are usually charged double, a little less if you're also living on campus. Also most unis receive a lot of international funding in general, a lot of wealthy people from other nations force their kids to graduate in the US as that's a sign of success and all that jazz even if they have zero intention on staying in the US.

>a job seeking website :^)
pic related

Thanks for those ideas though, going to save them.

Attached: 1529253911225.png (576x645, 276K)

it was weird because there are several required junior level classes (taught only by white professors) that were super hard. I never saw a single pajeet in any of them.
we had a few Dominican students that had to do them but the pajeets were exempt somehow

god damn
imagine the amount of RAM you need for this emulator not to lag

it's horrifying

Attached: file.png (766x376, 101K)

after all that trouble, did you had any success?
published any apps?

>$100 bucks a year

Attached: 1532971447926.jpg (897x1276, 263K)

yep

Attached: file.png (1613x492, 40K)

sweet.
does apple offer all those analytics for every app in your developer account?

Why do you still stick with a VM?

Yeah, it's kind of like the Google Play console.

appstoreconnect.apple.com/

I have an older iMac that's just really slow. I only use it to debug the app on a real device if certain features don't work on the simulator (e.g. voice recognition)

Attached: file.png (1273x710, 82K)

nice.
last question if you don't mind: did you had to learn objective-C/Swift to make your apps or just went with React Native?

You sure do need to know a bit of objective-c if you're going to access any native features that are outside React Native's scope which seems to be increasing as of late.

React Native is going with a "slimmening" to reduce the base app size which means that they're going to start removing more of their native modules in the future in favor of community solutions. They're just starting discussions now about this -- github.com/react-native-community/discussions-and-proposals/issues/6

If you need to do anything like access any native features, such as:
- video, audio or any media besides images
- camera
- file system (reading, writing, file upload)
- bluetooth
- speech recognition
- maps
- configuring the splash screen
- notifications
- attempt to do javascript bundle code pushes
- error tracking through Sentry/Bugsnag, etc
- utilizing native navigation controllers (e.g. react-native-navigation)
- accessing device info (such as current timezone, device manufacturer, etc)

You'll need to install and link a third party community library to your ios/android projects, often which are badly coded because usually what happens is that there's one maintainer that only knows one platform well and can't develop the other one well.

Good luck!

You also may want to consider trying out Flutter. It solves a lot of these issues I mentioned because most of this is already built in to the Flutter library.

I'm following a Flask tutorial and this came up pretty early on:

from flask import Blueprint

home = Blueprint("home", __name__)

from . import views

What the fuck? I have to delay the import of modules manually by placing them under the relevant bit? That looks brittle and ugly as fuck. When I try to put it at the top of the file it doesn't run.

Is there a way to avoid it?

>it was weird because there are several required junior level classes (taught only by white professors) that were super hard. I never saw a single pajeet in any of them.
There might be some sort of alternative that they get to do as part of their 'program'. By offering some degree course that only the international students enrol in, they can fudge the requirements. Maybe it's an Master of IT or something instead. Alternatively, with a B.CS from wherever, they might be exempt from it. Masters programs usually only require stuff like that if you are a graduate of the same institution.

I don't know how customizable the older imacs are, but surely an investment in your own business is worth it?

Is it true that you can't use React to create a website that will compite against Facebook?

it sucks desu.

top notch answer

Attached: 1532471438311.jpg (1920x960, 906K)

Facebook made react so they get to choose whatever

I just finished making the PUT request work for a data table using SQLite, Express, and React. When the request is made, it will update the page without having to refresh. It's such a great feeling! I can update the different values in the row separately too! I had to add a bunch of subfunctions and use methods that I wasn't comfortable with. Filter, for example, was very tough for me to get used to. I had to get comfortable using callbacks and asynchronous functions as well. I've used GET, POST, and PUT so far. I think I'll try to use DELETE (or maybe just make it a post again) and I'll feel comfortable in my ability to use JavaScript to make HTTP requests.

This is another in a series of victories which included: learning JavaScript -> learning React -> getting React to talk to Express -> Getting React to understand SQL data by using an Express server. Each of those was a significant step forward that took a long time to get right.

Attached: 1524524513718.jpg (249x249, 7K)

No. They used to have a licence that you couldn't sue Facebook if your business used React but now it's just MIT licenced if I'm correct.

>No.
Facebook made react

thenextweb.com/dd/2017/09/25/facebook-re-licenses-react-mit-license-developer-backlash/

What the fuck are you talking about? This took 3 seconds to google "react license"

I hate web dev

Attached: smash.jpg (600x447, 37K)

FUCK Polymer
In fact, FUCK UI work in general

have you met our lord and savior, React?

One major problem with that
>react talking to express/node.js
>sqlite

Why not
>react talking to an API running on an actually good back-end and using a proper relational database such as Postgres/MySQL

I used to shit on front-end devs, and then I started having to fuck with CSS and JS, and now I understand their pain. Thank god for you guys. I could never do it.

dude just use jQuery

b8ed

why not keep them comfy together?

styled-components.com/

Attached: file.png (668x475, 73K)

>Use component-style javascript front-end frameworks like vue/angular
>Can apply CSS to specific components rather than having one gigantic clusterfuck of a css file.
>Can now just write raw CSS3 in an organized way without meme tools like SASS/SCSS

>Asynchronous function
>I want this promise to resolve and ***then***, if it resolves, then I want you to go ahead and do the next step
>promise throws error
>function catches error
>goes on to .then function anyway
>unhandled error
>crashes and have to refresh

Attached: 1520378427611.jpg (526x588, 89K)

wrap it around a try/catch with async/await instead of using that stupid syntax.

I found a solution. The whole situation doesn't make much sense. The error was in relation to the size of an array. It would catch the error just fine using the syntax I'm familiar with if the number was less than the size of an array, but if it was larger, then it would go on to the .then regardless of catching the error. I just inserted the same logic into the .then function and it magically started working.

I'm honestly just not going to question it.

Are you wrapping the asynchronous function in a promise yourself, or does it already return a promise?

Vultr or Digital Ocean?

You probably have a mistake in your code somewhere.

>emojis
>"folks"
>huffpaintpost

That link gave me cancer

Linode

yes

React or Angular? Backend is an MVC API.

Attached: 1510184285665.png (561x1260, 650K)

neither, go vanilla js

No, just add a wildcard subdomain entry in your domain records. Then configure your webserver to serve a directory with the same name as the desired subdomain, via virtualhosts.

I still have nightmares of the vanilla JS + JQuery clusterfuck that I had to deal with in my previous job.

React js is the best choice.

>vanilla JS + JQuery clusterfuck
I do that plus PHP backend with no framework, not laravel, not even zend2

I imagine that works fine for small projects, but I had to deal with 1-1.5 million lines of undocumented spaghetti. It was horrible.

>Facebook code
>JSX
Just fuck my shit up.

Really?
Never tired laravel and vue? can be pretty comfy

Depends on what you need

>Angular
Batteries included framework with a learning curve, but once you get the initial hump it becomes quite simple and straight-forward

>React
It's more powerful than Angular, but it mixes UI with business logic, is not batteries included(need to find and integrate libraries yourself) and is overall harder to get shit done with. If you like the power and freedom of React but something more productive, then I would recommend Vue.

>I imagine that works fine for small projects
This isn't a small project, it's a large application used by lots of clients including many of the world's largest companies.
What they don't know about the backend, wont' hurt them. Besides, it works for the user, they don't need to know how the sausage is made.

>Never tired laravel and vue? can be pretty comfy
Actually no, I haven't but I understand them to be nice to work with. I don't set the technology stack though, I just joined an existing team full of old crusty devs.

I was told today that one of the old devs rage-quit the company because nobody would listen to his ideas about using frameworks and coding styles and shit. He just couldn't take the spaghetti anymore.
It's vaguely OOP PHP but it's still a mess.

How do I access a property of a property of an object literal? I'm trying with this code:
const upgrades = {
'per-click': {
title: 'per-click upgrade',
desc: 'Upgrades per-click intake (+1 per click).',
effect: () => {
val['per-click'] = val['per-click'] + 1;
},
level: 1
},
'per-second': {
title: 'per-second upgrade',
desc: 'Upgrades per-second intake (+0.3 per second).',
effect: () => {
val['per-second'] = val['per-second'] + 0.3;
},
level: 1
},
}

for (let upgrade in upgrades) {
console.log(upgrade.desc);
}

Upgrade.desc is returning undefined when I want it to return the 'desc' properties of the two 'upgrades' properties. Is it not possible to traverse down two levels without writing up a tree or some shit like that?

well. You can always, you know, move on to something else

Attached: 1509469093020.jpg (269x211, 8K)

for...in loops through the object property names. You still need to access the property on the object by doing "upgrades[upgrade].desc". I'd advise just accessing the object properties manually to make it easier to read.

I can't into firefox and IE profiling tools. I need to get the overall load time of loading a page, like in Chrome. Any add on that reports not just the time it takes to get resources from the network but also the time it takes for the client to load these resources?

Attached: 1533182686737.png (561x265, 13K)

>I'd advise just accessing the object properties manually to make it easier to read.
What do you mean by this? I have to loop through them, there'll be many properties of the upgrades object in the future.

I'm currently running through Colt Steele's bootcamp and I've just finished the intermediate CSS section, I'm off to learn bootstrap now. Am I supposed to remember everything from start to finish? Or is it normal to have to go back while working on projects to remember things?

I feel like I'm not absorbing as much as I should be. Anyone else have this problem or is this quite normal?

I have a problem with the Chrome devtools, specifically the network tab.

>pic related

On the XHR tab, CORS requests with preflight only show the preflight (i.e. the OPTIONS).

On the All tab, the subsequent GET shows up.

This is not unique for GETs, and seems to happen with all methods.

Any clue what's going on?

This only happens with CORS requests with preflight. As you can see, the final GET is visible in both.

It's a minor issue, but a bit annoying.

Attached: 2018-08-02-132347_1919x1079_scrot.png (1919x1079, 194K)

You'd be better off with an array of objects in that case.

try/catch

React or vanilla JS.

do you NEED React?

i've been doing webdev for a year now. i'm a react+node dev. i'm about to be promoted from junior to middle, but i'm worried about my long term future. work requires heavy js focus, but shouldn't i have learned c++ or something by now?

bait

>triggered over emojis
absolute yikes dude

Try to learn something about everything and everything about something.

Angular is MVC.

Desperate bump. I wasted much time looking with my weak google-fu.. and it's past 8pm where I live and I'm hungry.

It's fine.

CSS is mostly memorization and doesn't require much logic so yeah, you need time to remember all that stuff.

addons.mozilla.org/en-US/firefox/addon/load-time/

// styleA
// ======================================================/
const upgrades = {
'per-click': {
title: 'per-click upgrade',
desc: 'Upgrades per-click intake (+1 per click).',
effect: () => {
val['per-click'] = val['per-click'] + 1;
},
level: 1
},
'per-second': {
title: 'per-second upgrade',
desc: 'Upgrades per-second intake (+0.3 per second).',
effect: () => {
val['per-second'] = val['per-second'] + 0.3;
},
level: 1
},
}

for (let pajeet in upgrades) {
console.log(upgrades[pajeet].desc);
}

// styleB
// ======================================================/
const upgrades2 = [
{
id: "perClick",
title: 'per-click upgrade',
desc: 'Upgrades per-click intake (+1 per click).',
effect: "...",
level: 1
},
{
id: "perSecond",
title: 'per-second upgrade',
desc: 'Upgrades per-second intake (+0.3 per second).',
effect: "...",
level: 1
},
]

for (let poo in upgrades2) {
console.log(upgrades[poo].desc);
}

I'm working on an application in ASP.NET that has a timeline, similar to this:
adminlte.io/themes/AdminLTE/pages/UI/timeline.html

The timeline consists of several different kinds of "actions", each of which will be rendered differently within the timeline.
Each "action" type has its own table in the database, with its own unique model.
Collectively, they should all be displayed in order based on a timestamp for when that action occurred.

What would be the best way to handle this?
Right now I'm thinking an "Actions" table that keeps a record of all action types, with columns to identity the action type and a "target id" to store the ID of the resultant (like a comment's ID if the action was posting a comment).

Then it would be something like:
foreach(var action in Model.Actions) {
if(action.ActionType = ActionType.Comment) {
var comment = Model.Comments.Where(e => e.ID == action.TargetId);
//render a comment
} else if(action.ActionType == ActionType...)
}


Is there a better way?

Attached: 1512857684107.jpg (2448x3264, 2.02M)

bump, help plox

Searching for this, I only get questions about what preflights even are, or just general info about the devtools and how powerful they are.

Looking for CSS tips. What do you guys suggest for making a button look pretty when :active (the user clicks and holds on it)?

npm start
[61] ../sockjs-client/lib/location.js 178 bytes {0} [built]
[62] ../sockjs-client/lib/event/close.js 295 bytes {0} [built]
[63] ../sockjs-client/lib/event/trans-message.js 292 bytes {0} [built]
[64] ../sockjs-client/lib/info-receiver.js 2.22 kB {0} [built]
[65] ../sockjs-client/lib/transport/sender/xhr-fake.js 456 bytes {0} [built]
[66] ../sockjs-client/lib/info-iframe.js 1.52 kB {0} [built]
[67] ../sockjs-client/lib/info-iframe-receiver.js 791 bytes {0} [built]
[68] ../sockjs-client/lib/info-ajax.js 1.03 kB {0} [built]
[69] ../sockjs-client/lib/iframe-bootstrap.js 2.9 kB {0} [built]
[70] ../sockjs-client/lib/facade.js 723 bytes {0} [built]
[71] ../strip-ansi/index.js 161 bytes {0} [built]
[72] ../ansi-regex/index.js 135 bytes {0} [built]

ERROR in multi main
Module not found: Error: Cannot resolve module 'modules/index.js' in /home/nedlo/fullst_react/node_modules/history
@ multi main
webpack: Failed to compile.

Please guys help, before there were errors "cannot resolve module 'history/lib/createHashHistory', then i just i simply delete lib from that, but then it compiled without error, but showed blank page on localhost. So i thought, maybe there is conflict between history and other dependencies so i thougt that i will npm install history@1, node_modules changed into 'history/es6/hashBrowser' itp so i changed path and now its error above. Help please. Should i post content of package.json?

darken the background colour by 5-15%
swap the foreground and background colours
adjust box shadows to give it a nice 3d effect
whatever you do, just make sure the animation doesn't take too long (150-300ms seems good for most things)

not really
i dont have a CS background so i worry a lot about my future

even if my something is fucking javascript? i have reached a pretty good level due to my autistic effort to get good, and while i have reaped recognition and improvement idk if it was put into the wrong area

You're talking yourself down too much, relax dude. I'm going into self-employment without a solid plan of how to make money since I'm a fucking badass. Everyone around you don't have any solid plan of what we're doing, adults just make stuff up as they go along.

build a library, and check it to reuse code from it

is there an industry standard resource for teaching oneself sql? i'm a nosql baby

I just learned SQL on-the-job.
It's pretty easy.

SELECT [columns] FROM [table] WHERE [conditions]


That's probably 90% of what you'll be doing.
Unions and Joins come later.

>I just learned SQL on-the-job.
what was on your portfolio? was it an internship?

>do you NEED React?
At first I don't even need JS but I will eventually have to create an UI to build shit, something akin to a resume where you let the user customize a ton of things.
The reason why I'd prefer a library / framework instead of vanilla JS is that I want to facilitate re usability with components and I want new developers to know what to expect from the code, instead of having to deal with some custom shit someone created and that they have to learn from scratch.

>That's probably 90% of what you'll be doing.
you forgot sub-queries, stored procedures, triggers and cursors m8

Haha, time for SQL injection.

idk man, it could just be a Chrome bug, or it could be a quirk of how Chrome handles preflighted requests.

It's possible that it treats the initial preflight request as triggered by the XHR in your JS code. And then the actual request is triggered when the preflight responds successfully, but it happens in the background, not as a direct response to an XHR, so it's not counted as such.

Do the preflighted GETs show up under any other tab, e.g. "Other"?

Post some cool looking websites.
What I got from some user from here:
Stripe, Zero Financial, Crypton Trading, KIKK, Epicurrence.

Attached: katvig_dk_en[1].jpg (700x351, 44K)

They do indeed show up in Other.
I suppose I could submit a bug report.