[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/wdg/ - Web Development General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 314
Thread images: 43

File: wdg_432968.jpg (161KB, 824x553px) Image search: [Google]
wdg_432968.jpg
161KB, 824x553px
weeb dev general

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good intro (independent of your browser choice)
https://developer.mozilla.org/en-US/docs/Learn

>Free online courses
https://www.codecademy.com/
https://www.freecodecamp.com/
http://www.coderbyte.com/
https://www.bento.io/

>Next
https://www.youtube.com/watch?v=sBzRwzY7G-k
https://github.com/kamranahmedse/developer-roadmap

>Useful resources
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://stackoverflow.com/ - Developers asking questions and helping each other
https://caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
https://www.youtube.com/user/TechGuyWeb - Traversy Media
https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
https://www.youtube.com/learncodeacademy - codecademy
https://www.youtube.com/derekbanas

>in-depth comparison of VPS hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
post what you're working on
>>
File: doggo.png (109KB, 640x480px) Image search: [Google]
doggo.png
109KB, 640x480px
>>61728798
trying to figure out the best way to do multiple textures in webgl so everything doesn't get fucked up
>>
>>61729356
Is this for a browser game ?
>>
Given that internet explorer is no longer worked on, how much longer will IE 11 be supported on the web since it lags further and further behind all other browsers.
>>
>>61728798
dicking around with d3js for data presentation since the higher ups at my place wants to make the data more "DYNAMIC"
>>
>>61729448
you're lucky, graphs are fun
>>
>>61729448
Anything you would recommend for d3 senpai?
>>
File: converter.webm (696KB, 386x292px) Image search: [Google]
converter.webm
696KB, 386x292px
r8
>>
>>61729494
Not sure because I just started looking into it, I'm mainly the backend guy to be honest.
>>
>>61729494
look at gallery on their wiki and start off by adapting exiting stuff
>>
>>61729412
Nah, I just want to learn some basic 3D stuff.
>>
I'm about a month into learning web dev, at what point should i get a web server?

Can you suggest any cheap ones? Most I've seen still cost a minimum of 70 bucks a year, is that the lowest i'm getting?
>>
>>61729731
not gonna spoonfeed too much because you won't learn
but digital ocean and GitHub pages
that's all
>>
>>61729731
you don't really need to rent a server until you have something you want to host
before that just dev on localhost

if you're a student you might get some coupons from github student pack
>>
>>61729731
AWS is a pay-for-what-you-use type deal, so you won't end up paying that much for a small low-traffic server.
>>
noSQL or SQL?
>>
>>61729749
>>61729764
>>61729985
Okay, i'm gonna check out DigitalOcean, AWS and Localhost. Thanks for the suggestions fellas.
>>
File: zeromq-logo.png (5KB, 402x146px) Image search: [Google]
zeromq-logo.png
5KB, 402x146px
Sup, /wdg/.

I'm currently using ZeroMQ for messaging and I'm happy with it. By "messaging" I mean "clients subscribe to the publisher (the server) to receive data and also connect to that server using client/server pattern to send requests".

The problem is that I want to eventually have browser clients that connect to it, but ZeroMQ doesn't have a proper JS client library (with CurveZMQ encryption support, etc.).

What's the solution for me? Should I use another separate library for browser clients only? If so, I guess I should mention that my server backend is in Python for now and might be moved to C++ later.
>>
File: 1501447184205.png (9KB, 300x300px) Image search: [Google]
1501447184205.png
9KB, 300x300px
>>61730731
at a glance it seems zeromq communicates through tcp sockets
browser clients use websockets tho so you probably want to use a setup similar to this
http://artemyankov.com/tcp-client-for-browsers/
and have a proxyserver bridge websockets to your tcp zeromq endpoints

i'm assuming your point is to have synchronous client-server communication otherwise you could just send ajax to proxy server who would then send stuff to the remaining of your system

in both cases proxy server just interfaces the api for browser client to some existing zeromq client

also please share what you are using this messaging framework for
>>
Just bought a whiteboard
Feeling like a real boy
>>
>>61731022
>and have a proxyserver bridge websockets to your tcp zeromq endpoints
But doesn't this mean that I basically have to reimplement the whole of ZMQ spec in JS by myself? Doesn't sound fun. But regardless, I don't think a proxy is the right choice.

>i'm assuming your point is...
i dunno what my point is, anon. I'm basically a noob in JS and webdev in general, and right now all I want is to tick a mental box that says "have a vague idea on how the backend for the web clients will work when I get around to implementing them".

The real mystery for me in JS is Pub/Sub, where Sub is the web client and Pub is my Python or C++ backend. how does one do that? (obviously ignoring the whole ZMQ thing I already have going on)

>also please share what you are using this messaging framework for
I'm making my own Pushbullet clone, i.e. a messenger where devices talk instead of people. A browser extension (or a web app) is a thing that's pretty important to have for a project like that.
>>
Hi
Im learning Angular4 because i dont trust the stuff from facebook (react).

Is this tutorial enought to get the basics?
https://angular.io/tutorial

Is typescript the way to go?
>>
File: mental_breakdown.jpg (28KB, 500x273px) Image search: [Google]
mental_breakdown.jpg
28KB, 500x273px
>want to set up own forum system from scratch, figure it will be easy since I'm already a Javascript pro and PHP looks pretty similar
>my face when grappling with MySQL tables, columns, private keys etc
It's just so mind-numbingly dull /wdg/, I fucking hate working with databases!
>>
Is python Flask gay or worth learning
>>
There's a link in the OP about VPS hosts, I know, but which one do you guys use? I'm looking at Linode now to host my portfolio site as well as its variety of projects. Traffic isn't expected to be big so I'll prolly go for the cheapest options. Any recommendations?
>>
File: 1493226076004.jpg (669KB, 960x1280px) Image search: [Google]
1493226076004.jpg
669KB, 960x1280px
>>61731348
You want different clients to send and receive data to each other. You want this to happen synchronously when possible so that client receives notification when getting sent stuff without having to poll the service every 20s or so. You also want to make sure each client gets its data after being disconnected for some time.
Standard way to implement this is to encapsulate data as events and make them pass through a centralized message queue which in turn makes sure to dispatch messages to the right clients in the right way. So you use a messaging framework since implementing all this crap would be a hassle. So you have to define the messages your applications will communicate to each other in term of event, and user interactions with applications in term of sending and receiving events.
So for web client, you'd translate application interactions into events but then would have to send these to server which in turn would pass them to messaging queue. Since you want synchronous communication you use websockets. You could use native notification apis with service workers like this https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/
but i don't think you can send more than some text and small images through this, also ios browsers don't support service workers.

Alternatively you could use another messaging system like this one which supports websockets apparently
http://activemq.apache.org/websockets.html

TL;DR use activeMQ
>>
>>61731863
>which one do you guys use?
Vultr and Scaleway mostly, though the latter I would only use if you are from western europe, since they only offer servers in Amsterdam and Paris.

Though you can't really go wrong with any of them
Might check if they fullfull your need for automated backups, networking, block storage and whatever else you might want.
>>
Trying to learn reactjs. Is all I do with reactjs rendered on the server and then outputting html documents to the client? I thought you wanted the client to do the front end rendering, to not strain the server, so this is confusing to me.
>>
I want to start doing full stack shit. I know some babby HTML and CSS to toss together static pages along with Angular for SPAs, but I have no fucking clue how talking to backend works, or really anything at the backend. Where do I start for full stack shit? Is MEAN stack the best stack to master for someone starting out?
>>
>>61732035
Thanks, anon. I'll think about it.
>>
>>61732300
Just learn php and javascript like a normal person.
>>
Anyone here with document base database knowledge like mongo and such?

Is it possible to have something like an array of schemas inside a schema? Something like this:

UserSchema = {
name: String,
email: String,
hobbies: HobbySchema[]
}

HobbySchema = {
name: String,
type: String
}


How would it work? Does the user document references the various hobby documents?
>>
>>61732300
Pick a backend you want to learn. Possibly in a language you already know.
Look at AJAX, REST and Websockets.
Make a bare bone app and implement it for the sake of learning.

>>61732199
You can prerender/server-side-render the initial response from the server afaik (never done so)
React still runs in your browser and takes care of changing state.
>>
>>61728798
invoices and credit notes
>>
>>61732300
Yes, MEAN is the easiest if you know Javascript and a bit of object oriented programing. The hardest part to learn there will be Angular though since it's a complete MVC framework, you could replace it with React since Angular tends to be overkill for most simple starting projects.
>>
>>61732673
The MERN stack, I like it
>>
>>61732300
Start with Node and no express, to get an idea of how things work on a somewhat lower level.

It's super easy to get started, once NPM is installed and stuff.
const http = require('http');
const server = http.createServer(function(request, response) {
// get data from request object, such as URL
let url = decodeURI(request.url)
// set data in response object and then send it with the end() method
response.statusCode = 200;
response.setHeader('Content-Type', 'text/html');
response.end(`<html><head><title>ayyy lmao</title></head>
<body><h1>you made a request for ${url}</h1></body></html>`);
});
server.listen(8000, '0.0.0.0', function() {
console.log('server running at http://0.0.0.0:8000');
});


That's basically the simplest server implementation you can do.

In most situations you'll use the HTTP.get() method, and give it a URL, or you'll use Express or something.

But anyway, read the docs:
https://nodejs.org/api/http.html
>>
>>61731407
Setting up dbs is fun in its own extremely boring and tedious way.
>>
I've been working with JavaScript for a few years now, but I'd like to have a better understanding of JavaScript in general and how things happen under the hood.
I was recommended two books: "JavaScript: The Definitive Guide" and "JavaScript: The Good Parts."

How are they?
>>
>>61733318
Eloquent Javascript > Both
>>
>>61732604
Please respond.
>>
Opinions on mLab?
>>
oh damn this is sexy af http://graphql.org/
>>
File: vulcop 3.jpg (29KB, 246x266px) Image search: [Google]
vulcop 3.jpg
29KB, 246x266px
>>61733413
UserSchema = {
name: String,
email: String,
hobbies: int[] //array of hobbySchema id as fk
}
HobbySchema = {
id; int,
name: String,
type: String
}
>>
>>61733728
That's very SQL like, are foreign keys even a thing in shit like mongo?
>>
>>61732884
thanks my dude
>>
Where do I buy domain names? Does it even matter? Don't need hosting since I'm just gonna use /based/ github pages
>>
>>61733820
Not him, but no, not in the relational database-sense. But you can build a search index over hobbyschema identifiers and look them up very fast.
>>
>>61733864
majority of them are basically the same price, if anything you'll just find some that offer better customer support or some promo price

also look into gitlab pages
>>
>>61733864
>Where do I buy domain names?
Namecheap.

>Does it even matter?
Customer service, privacy policy, policies about takeovers, etc.
Some registrars will yank your domain if someone waives enough money at them, or will give your personal details to anyone that asks.

Namecheap has the best customer service. They only disclose your information for a valid warrant.
>>
Is Heroku just for testing shit? Can an actual enterprise level application be hosted there?
>>
File: vulcop 4.jpg (29KB, 267x266px) Image search: [Google]
vulcop 4.jpg
29KB, 267x266px
>>61733820
Otherwise you can do this and optionaly make an index on hobbies if you need this to make queries.

UserSchema = {
name: String,
email: String,
hobbies: [{
name: String,
type: String
}]
}


It depends on how you model your domain realy, maybe you're actually storing relations between entities rather than documents
>>
>>61733940
https://www.heroku.com/customers
>>
>>61733919
Word. Thanks
>>
>>61733963
Can I create an API endpoint like this
users/:name/hobbies/:name
with that approach?
>>
File: 1500687840784.jpg (53KB, 435x514px) Image search: [Google]
1500687840784.jpg
53KB, 435x514px
>>61734032
ye
find({"name" : "anon",
"hobbies" : {"name" : "shitposting"}})

or something

maybe you'd rather build your request like this tho :
/anon?hobbies=shitposting

wouldn't make sense to query for users named anon having a specific hobby unless username field is not unique
>>
How the fuck do I get started with front end? I'm doing a project with node js right now and I have the backend part done but I have no idea where to even start with the front end. I mean I know basic html, js and css but I don't know how to tie it together without it being a super dumb solution. How do you guys get started when you don't even know where to begin? Just try to copy other projects on github or what? I'm thinking of doing it with react js, is this a really dumb idea if you're a novice?
>>
>>61734195
Make use cases to describe interaction. draw out the interface before even touching or thinking of the markup and js behind it.
>>
>>61734195
you define user stories, so how you want user to interacts with application through ui
then you draw shit mockups with pencil and old napkin of how your application looks like, what the different screens are and how they change in relation to user pressing buttons
use these mockups as general guidelines when making html and css
don't bother with frameworks for small projects unless you really want to learn one, maybe use some css boiler plate
comfy points for using sass and setting variables in css since you'll end up autistically wanting to try 15 different color schemes and typefaces
>>
>>61734195
wake up
head to starbucks
open up your macbook
open up facebook
and in 4 hours, everything should be complete!

hope that helps anon and if you have any questions let me know :3
>>
Give it to me straight /wdg/: Is node for gay fruitcakes?
>>
File: 1501755680155.jpg (134KB, 1140x813px) Image search: [Google]
1501755680155.jpg
134KB, 1140x813px
>>61734477
Yes but it's deceptively easy to learn
>>
>>61734477
Why would it be?
>>
>>61734477
Yep. It's still handy to have in your toolbox because most companies are gay fruitcakes.
>>
Give me the MOST readable font and text/background color combo EVER. No really, readability is the #1 purpose of what I'm doing here
>>
Why haven't you guys created an Amazon Alexa skill? You get a free Echo dot and a genuine pair of programming socks.

https://developer.amazon.com/alexa-skills-kit/alexa-developer-skill-promotion
>>
>>61734739
Oh shit nigga. How I do this?
>>
>>61734691
monospace white on black
>>
>>61731406
You'll save time and energy if you read the typescript docs first
>>
File: 1498946756359.jpg (50KB, 416x280px) Image search: [Google]
1498946756359.jpg
50KB, 416x280px
>>61734739
******developer socks
poor mans programming socks
>>
>>61734759
There are some tutorials. Basically you need to sign up for an Amazon developer account, and then go to
https://developer.amazon.com/home.html

There's an 'Alexa' tab that has some links to videos and stuff to teach you how to make a skill.

Basically, you have to define a 'voice user interface' in their GUI tool (you can do it with JSON, but the GUI is easier). You give it a bunch of 'utterances', which are phrases that people might say to your skill. Multiple utterances can map to one 'intent'. An intent maps to a function on a server, generally hosted on Lambda. The code is written in Node (or Java or maybe Python?), and you can also save data to a DynamoDB table pretty easily.

The easiest way to write the code is using the Alexa SDK, which basically makes it easier to handle requests and send back responses.
https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs

Anyway if you look through Amazon's documentation there are some tutorials and examples you can follow that guide you through this.
>>
>>61734775
White text + black background or vice versa?
>>
>>61734942
white text on black background
>>
> ctrl + f
> no elm
You poor souls..
>>
I made this with react and firebase:
https://hashtags.chat/

Basically anon discord (no voice though lol).
>>
>>61734312
thank you anon, I'm buying an apple macbookâ„¢ tomorrow.
>>
Do if/else statements in Javascript necessarily NEED else or can they just werk with if?
>>
>>61735506
Pretty much every language (including JS) allows just if statements without the else.
>>
Any good source to learn react that isn't the docs?
>>
File: baseball.gif (2MB, 450x297px) Image search: [Google]
baseball.gif
2MB, 450x297px
what is the coolest, hip-est, most next-level domain extension that I should be using for my startup?
>>
>>61735673
dotbussy
>>
Is there any way to get the if block to work properly without resorting to jQuery?

https://jsfiddle.net/kg261mc9/1/
>>
>>61735673
The latest meme is offensive domains

http://pedophile.top/
http://retardedpedophile.club/
http://pedophilenigger.faith/
http://pedophilenigger.accountant/
>>
File: 1498857030668.jpg (36KB, 640x360px) Image search: [Google]
1498857030668.jpg
36KB, 640x360px
>>61735673
.cool
you'll be hipster for reusing cool before hipsters start reusing cool before it becomes cool
>>
>>61735738
What's on those? I'm in Europe, I might get jailed
>>
>>61735673
.com

Seriously, don't bother with anything else unless your target is the tech crowd.

Make a retarded name like shizoopl.com before you even consider something like a .net or worse.
>>
>>61735673
Moist.js, it's a front-end rear-based webular Javascript framework for partnerization and next-generatizationised web app development for the Web 4.0 market dot io
>>
>>61735777
Trips.

Also shizoopl.com is available. Make it yours for infinite business dollars.
>>
>>61735123
ONE OF US!!!
ONE OF US!!!
>>
>>61735751
Just MDE shit
>>
Can I make mad bux with vanilla JS? How to make mad monie?
>>
>>61735123
have you used elm for anything?
>>
>>61735808
by stop posting on 4chan
>>
>>61735816
Yeah, I'm one of the early adapters.
I have been using it since version 0.12
It's included in an android and iphone app with >100000 users, in our website and in tons of my personal projects.

I start all new fronted projects with elm
>>
>>61734739
>I have to give my credit card number to AWS so I can make a lambda function

fuck this
>>
>>61735932
What are some prerequisites for elm? Just be good with js and familiar with fp?
>>
>>61734739
>Globalist company
>promotions and prices are still geolocked
This is not that future I was promised
>>
Question. If you were a business owner and you saw an advert in the local supermarket for 'website maintainence and repair' with an email address to contact, and you have been unsatisfied with your company's website lately so you send the message to the email address and the guy comes back saying that he charges £60 for a fix-up and £30pm for website hosting and continuous maintainence, would you find that extraordinarily cheap or an ok price?
>>
>>61735991
you need to have a solid understanding of lambda calculus and topological boolean algebra. This is true for any functional programming language.
>>
>>61735991
You don't need to know js to get started, but it helps when you wan't to do more advanced things, e.g. ports (elm's ffi).

You don't need to be familiar with fp, this will come automatically while learning. Elm is purely functional, so you will inevitably learn fp along the way.

The official guide is a pretty good starting point:
https://guide.elm-lang.org/

>>61736033
Ignore this idiot
>>
>>61736020
>£30pm
relatively cheap
but im assuming he's targeting smaller businesses which can't really afford the expensive stuff or these huge redesigns nor are they going to get millions of visitors, in which case it's a wholesome price I feel
>>
>>61736065
Thanks, will look into it. I was planning to venture into elm/purescript for a while anyway
>>
>>61731863
DigitalOcean. Easy to set up and really cheap.
>>
>>61735717
The if statement isn't in any event callback, so it only gets executed once: when the function is called; when you load the page.

You need to put it in one of the functions that runs every time one of those events happens. Note that if you're going to check the value of input on keydown, the value of it doesn't update until after that function is called. So it won't match the text until the next keydown event.

Also, just a nitpick, but you should use a semicolon after calling functions like addEventListener, even if you have a callback on them. And you don't need to use a semicolon after an if block.

>>61735954
The real bad thing is that you have to give them tax info in order to qualify for the promotion, which is annoying.

Giving AWS a credit card is easy in comparison. I've had my skill running for about a month and I've stayed within the Lambda free tier.

>>61735998
I just find it funny that US, UK, and German devs get an Echo while Indian devs get a t-shirt.
>>
>>61736087
You're welcome.
I wouldn't recommend purescript for a beginner, it's much more complex.
After learning elm, purescript and haskell will be much easier.

However, even after learning purescript, I greatly prefer elm. It comes with stronger guarantees, e.g. no runtime exceptions. Plus the simplicity of the language makes it incredibly easy to understand code written by anyone.
>>
>>61736020
Too cheap to be profitable. Stop driving down prices you desperate faggot.
Cunts want a change every week, and it's always URGENT
>>
>>61736489
stay mad faggio
>>
Looking for a project where can I try out elm, its cool if i need to write backend code to do it.

>>61729498
Where are you storing the conversion rates? Are you getting them from a request on page load?

I mean it's pretty cool I guess but nothing new.
>>
>>61732673
>>61732760
STOP USING MONGODB

USE POSTGRESQL REEEEE
>>
While searching for a proper way of "including" php files I stumbled across a high-rating code snippet from php.net. It was however posted 8 years ago. Is it still applicable these days? Here is the code
<?php 
// prepend.php
define('MAINDIR',dirname(__FILE__) . '/');
define('DL_DIR',MAINDIR . 'downloads/');
define('LIB_DIR',MAINDIR . 'lib/');
?>

<?php
// connect.php
// connection details, etc
$pdo = new PDO("mysql:host=localhost;dbname=dbname", "user", "pass");
?>

<?php
// main.php file
include __DIR__ '../prepend.php';
require_once(MAINDIR . 'connect.php');
// include MAINDIR . 'connect.php';
?>
>>
>>61736744
>8 years ago
Damn. Those fuckers are probably rich by now. While I'm still here climbing from the bottom. Fuck.
Oh well patience... patience...
>>
Need to make a small mobile game for the next step in an interview process. I'm thinking I'll use javascript since it's what I've been doing the most, should I just use Phaser and export with Cordova? Any other options for mobile game development using js?
>>
>>61737430
my company uses ionic for apps , you could look into that

what do you use for making mobile games?

did you start with Java?

t. trying to get into mobile development
>>
>>61737660
I started with C++ and cocos2d-x.
>>
>>61736604
from APIs on the spot. About to implement altcoin conversion soon.
>>
Got a technical interview to get into an immersive bootcamp tomorrow. Any tips?
>>
File: 1501336733482.png (7KB, 300x300px) Image search: [Google]
1501336733482.png
7KB, 300x300px
>>61738062
don't drink the koolaid
>>
>>61738062
The one I did had me sum a jagged (nested) array. I'm telling you this by way of explanation but be aware that if you look up the answer to this to prepare, they may well be able to tell that, and move onto to something else.
I didn't get the full answer, but they let me in anyway because they liked the way I thought. So above all, EXPLAIN your answers. If you explain your thinking, are on the right track, and have a decent thought process, you stand a good chance of getting in. If their admission process is merely "did you get the correct answer?", then I'd question whether that school's really good or not.
>>
>>61735673
>coolest, hip-est, most next-level domain
Eukarya. I've heard it's really going places.
>>
Is web development as jobs going away because of pre-built, template, drag and drop sites?

Is there a reason why a business would internally make a site?

But my uninformed thoughts concluded that the only thing I can imagine is control and security, but I figure that would be special cases
>>
>>61735506
They can werk with out it. It entirely depends on the logic. For example, a function might have a sort of last-minute 'safety check' that halts the function if something bad happens:
function myFunc(op){
if(op.isFaggot){
//this 'short-circuits' the function, stopping it before any of the remaining code can happen.
return false;
}
coolPeople.push(op);
}

And of course, if you have an optional bit that might be added, it's fine there too. So in your shopping cart, you might have an 'if(customer.hasEmployeeDiscount)' that subtracts some amount from the total for employees. You wouldn't need an else in this case, since both employees and non-employees would need the rest of the code (presumably, total up items, calculate tax, etc.) to be run.
>>
>>61734942
Caucasian text on African-American background.
>>
>>61733728
I'd be VERY careful using a property 'id', as mongodb already automatically creates an ObjectID datatype field "_id". As such, you may be better off doing:
UserSchema = {
name: String,
email: String,
hobbies: [Schema.Types.ObjectId]
}
HobbySchema = {
name: String,
type: String
}


Also, note that int (or int[]) is NOT a valid schema type in mongodb. It only supports Numbers (as well as strings and all the other stuff). If you truly want an int, you're going to have to filter that thru your routes or front-end.

You may also want to look up mongoose Populating, which is sorta similar to foreign keys in SQL: http://mongoosejs.com/docs/populate.html
>>
>>61735506
You don't need an else unless you want to return something specific like during a recursion call.
>>
Would anyone be interested in a web dev from scratch tutorial?

Like I see all this shit on Udemy and it's not fucking good. It's like "ok open code editor 9000 that cost 901 dollars and install your React module, now code your basic template of 10,000 lines and bam, you're done, thanks for the 189 dollars"

I want to do a from scratch teaching html, css, then javascript, then PHP explaining why it's only good as a back-end language that you interact with through AJAX, then move onto jQuery to interact with the PHP and make single-page apps, and then finally onto React.

Would that be good? I have one tutorial video on youtube and it has 40k views. My game videos have 10k views roughly. Tutorials are where it's at. How can I teach people and have them enjoy it?

Do it live on youtube and twitch and sell the recordings on udemy? I make a lot of stuff, like I made an app in one weekend that was a huge success, I can just make an app live and show people how to do it?

What would people want to see?
>>
Any suggestions for a good php pdo wrapper?

The one I'm using at the moment is from:

https://gist.github.com/danferth/9512172

Id would like to see other "trusted" pdo helpers
>>
>>61738957
I would watch your videos. I'm starting from scratch and it's difficult to find good from scratch tutorials
>>
>>61739017
I'll make them then. I'm going to stream them for free and sell the final edited version on Udemy.

If you need any help with anything then feel free to post here. I always try to help as much as I can when I'm available.
>>
>>61738957
>What would people want to see?
Just make a basic-looking but decent website without the bloat. Make it straightforward. One thing that annoys me when I was a beginner, is the majority of the """"tutorial"""" sites have plenty of unnecesary/misleading "blablabla...blablablablablablablablabla...
JUST.TEACH.IT.ALREADY! No bullshit intros!

Also they keep on doings things like ""...var1 is therefore var2" but never explain why "if var1 is var2 then why var1 is var3 on line 6". Keep it simple and direct to the point. I remember browsing a bullshit ad-infested blog about how to use "slots" in vue.js and he constructed an entire restaurant app instead of just telling how to use the "slots". Later on I found out that he's just using the tutorial for SEO purposes. Fucking pathetic
>>
>>61738957
If you think you can do better tutorials then do it.
Just pls don't only make videos, or at least make quality transcripts with copy pastable code snippets. I never understood this video tutorial meme, written articles are way better.

>How can I teach people and have them enjoy it?
I think that's supposed to be the hard part. You could try reading up on pedagogy. Don't forget to account for peoples different learning types, provide synthetic recaps as well as examples, text material as well as visual etc
Try providing exercises and write tests for students to validate their solutions or just make them push to some continuous integration setup to run the tests for them.
If you really commit to quality content you could even go full kike and only provide certain features behind patreon paywall

Or you could just try to monetize streams
>>
>>61739107
Good advice. I will make sure to not treat people like they are advanced programmers.

>>61739159
People learn differently. I would be happy to provide transcripts if not only for just ADA compliance.

I am already on patreon for something else and already monetize streams. I just want to do this because I don't think there is a beginner friendly tutorial series that is the standard for development yet.
>>
>>61737430
If you really want to use JavaScript, I think you have to use Cordova. I'm not sure how the performance would be. Probably fine for a relatively simple 2D game though.

If you're just looking to be able to deploy to web + mobile, then there are frameworks that let you do that, like LibGDX, which you write in Java but cross-compile to JS for web.

>>61737660
Ionic is a layer on top of Cordova, so I wouldn't bother with that.
>>
>>61734739
I'm going to make a skill that goes to a random thread on /b/ and reads all the comments
>>
File: 1432669193779s.jpg (10KB, 223x225px) Image search: [Google]
1432669193779s.jpg
10KB, 223x225px
>mfw photographyfag sitting on a domain that has seemingly no relation to their business
is there anything more disappointing?
>>
>>61739491
Go for it man. I'm usually lurking in this general if you have any questions. It's NodeJS, so it's webdev-related enough.
>>
what languages, frameworks, databases, technologies do I have to know in order to get an entrylevel job as a backend dev?
>>
>>61739597
css javascript html
>>
>>61739662
that's for frontend, isn't it?
>>
>>61734739
Because that's not worth the skill I would bring to the Alexa.
>>
>>61739597
Just CSS, HTML, and PHP. Knowing Javascript is pretty important though.
>>
>>61728450
I've been thinking about learning python because I see a lot of FinTech startups asking for people to have python experience, but the video in OP ranks node.js over python.

Anyone ITT familiar with the fintech scene that could offer their thoughts on how to get in?
>>
>>61740530
Python would be a good choice, I love Node personally, but I can see why Javascript would not be the go to for fin because of stuff like this
http://blog.blakesimpson.co.uk/read/61-fix-0-1-0-2-0-300000004-in-javascript
>>
>>61740688
Doesn't python have the exact same problem though?
>>
any good resource to learn angularJS? (1.6)
>>
>>61741037
Yes it does
>>
>>61741037
>>61741141
Huh, I dont know why i figured that wouldn't be an issue with python
>>
File: Untitled.jpg (89KB, 946x846px) Image search: [Google]
Untitled.jpg
89KB, 946x846px
how do I do this in bootstrap?

I can't mess with the tags either, only add classes. I tried adding panels row and col-lg, but nothing looks like the image
>>
What is best service for shared web hosting?
>>
>>61741483
>I can't mess with the tags either, only add classes

Is that a school thing? Did your professor told you that? He is bullshitting you man. You can't make it look like that because the tags are already structured wrong.

Here is the markup structure that your idiot professor should have provided:

<!-- single 12 -->
<div class="row">
<div class="col-sm-12">12</div>
</div>

<!-- double 6 -->
<div class="row">
<div class="col-sm-6">66</div>
<div class="col-sm-6">66</div>
</div>

<!-- triple 4 -->
<div class="row">
<div class="col-sm-4">444</div>
<div class="col-sm-4">444</div>
<div class="col-sm-4">444</div>
</div>

...

<!-- 8-4 -->
<div class="row">
<div class="col-sm-8">84</div>
<div class="col-sm-4">84</div>
</div>


Fucking universities these days. And yet companies favor
"""""""university graduates"""""""""""""
than people who know better
>>
I'm entirely new to PHP and MySQL - is there any good documentation on what best practices are regarding connecting to the database? I know there should be a file that establishes a connection and it should be included in all other files but then I have the database's credentials stored in plaintext for dastardly hackers to view...
>>
I'm trying to setup a static website using AWS, i have made the buckets and when i click the endpoint link it takes me to the right files, the problem is that even though i have gone to the route 53 panel and made a record for my domain that points to the Alias but it doesn't work?

I just get "This site can’t be reached". What am i fucking up?
>>
>>61742438
no DB or security expert, but maybe make the DB only accept connections from localhost.
And if someone really gets access to your server, what's the difference in having access to the DB server password or having access to the DB itself.
>>
>>61742438

have a look at:
>>61736744
>>
>>61742497
>no DB or security expert, but maybe make the DB only accept connections from localhost.
If it only accepts from localhost then what if I host the message board I'm making up on the internet? How will people be able to view the contents of the database (i.e. browse the message board) without being able to view the connecting file with the database credentials as well?
>>
>>61742467
Ignore this, im a fucking retard and had a another folder inside the bucket.
>>
>>61733318
just go read "you don't know js" on github. it's the best and it's free.
>>
Ok so this may just be the noob in me speaking and I just need to grab my balls and rock in like Leeroy Jenkins but PHP + MySQL is much more complex and cumbersome to manage than I thought it would be, coming from Javascript. All this server shit. I want to sign up with a VPS host too so I can run a server but it is all very complex as you guys know. Is there anything I can read or watch to get into back-end and server development?
>>
>>61738248
Boomers still think they have more control if they forsake the cloud so most companies use shitty internal web servers maintained by uberimposters
>>
File: crying_potato.jpg (70KB, 700x393px) Image search: [Google]
crying_potato.jpg
70KB, 700x393px
Is there something like PHP and MySQL but easier?
>>
File: 1476009648557.gif (2MB, 265x257px) Image search: [Google]
1476009648557.gif
2MB, 265x257px
>trying to understand closures

Retard reporting in, is it necessary to understand that shit if I just want to make goofy sites with RoR?
>>
>>61742438
>but then I have the database's credentials stored in plaintext for dastardly hackers to view...
No you don't.

You have the credentials stored in php which gets interpreted by the server.

The only way they will see those details are if they have access to your server.
>>
>>61742646
Clients never directly connect to the DB in the first place.
Clients request some content (a thread, profile, etc.) from the webserver and the webserver/backend fetches it from the database and sends the response back to the client.

The client is completely separate from the server implementation and doesn't even know that some kind of database exists.
>>
Is it okay to post my new website here? I just want someone to look at it real quick and tell me what they think
>>
>>61742190
desu so many uni courses have inbred teachers who think creating artificial challenges is the way students learn instead of giving them actual real world challenges like hey let's learn to make a simple blog piece by piece.
>>
>>61745359
sure, go for it.

btw, what's everyone working on?
>>
>>61745473
okay here it is, it's a cool new social networking site:

http://habbo.com/
>>
>>61745539
when is habbo 2 coming out btw
>>
>>61745558
It already did!

http://gaiaonline.com/
>>
>>61745603
guess the meme is true sequels are trash
>>
>>61745558
>habbo 2
wtf, no when is club penguin 2 coming out?
>>
>>61745644
why would they make a follow up game just so you can spam 'nigga', get banned, and then share the screencap with your autistic friends
>>
I'm looking for a loonix vps with 100-200GB storage and unlimited bandwidth if possible, any suggestions?
>>
>>61734936
Is there an emulator to test with? I never used mine and ended up selling it.
>>
File: 1402954828001.jpg (10KB, 215x235px) Image search: [Google]
1402954828001.jpg
10KB, 215x235px
What's the state of PHP in this day and age?

I've never used it but always heard bad things about it. Although lately I've heard some people say it's not that bad anymore.

If it's not bad I might consider using it for my next project since it's so damn popular, i.e. all noob problems have answers on stack overflow.
>>
>>61746766

It's been fine since PHP 7.

There's still a lot of finicky stuff you need to know about so your code isn't an insecure mess.
>>
>>61746450
https://www.kimsufi.com/us/en/servers.xml
check the cheapest one out
>>
If I have a server, how can I detect someone came to it from another website without using HTTP referer because that can be easily disabled.
>>
>>61747046
Analytics.
>>
File: illfaiteyoum8.jpg (18KB, 250x177px) Image search: [Google]
illfaiteyoum8.jpg
18KB, 250x177px
>>61747046
proxy your services and web apds through apache or nginx, read the logs
there are programs to display and analyze these
>>
>>61747225
>>61747268
I want to automatically block or automatically redirect anyone who is detected to have come from another website, is that possible without using HTTP referrers?
>>
>>61747337
no i think you have to rely on http referers for this
>>
when would one use GraphQL over REST?
>>
>>61747360
Alright then, thankfully normalfags will never know what an HTTP referrer even is.
>>
>>61735123
Currently building a game in Elm.

It's coming along but it's a challenge to figure out how to do things

But the fact that there's an objectively proper way to do things is satisfying as fuck

It's getting increasingly difficult to modify the nested records within my model and I'm wondering if there's a way to split it out the way one would using React+Redux.
>>
>>61747034
sold out :'(
>>
>>61747408
always
>>
Is there a resource anywhere which has data on the highest paying technologies to specialise in, for web development?

I want to get good at whatever is paying best/ is the easiest/ has the most longevity.
>>
>>61748957
it's a perpetual joke already that technology is changing way too fast for web related things, so I wouldn't be too rigid in that regard if I were you.
>>
>>61748957
well for web dev I would assume Javascript is the best/easiest to get good at because it's full stack.(which is why like the entire internet uses it)
>>
>>61748957
>Hey is there this tool that tells me exactly what to do to live a very easy and comfortable life thanks.
All you had to do was follow the damn train.
>>
>>61749341
>All you had to do was follow the damn train.

Rare and appreciated reference
>>
>>61731406

is react being made by Facebook an actual issue or is this tinfoil shit? react is open source right?
>>
File: 1500631569797.jpg (116KB, 640x480px) Image search: [Google]
1500631569797.jpg
116KB, 640x480px
Hey guys, ET here, so my programming knowledge is hold to C, some cpp and some python so far.

I thought of getting a bit into building a Webapp over the summer so I could experimente a bit with "smart machines" after.

Obvious approach would be learning HTML, css and node.js, but after some browsing I thought it might be more fun/interesting to use Lua.

Thoughts on that?
Other recommendations?
Like I said in the beginning, it's mostly for personal interest.
>>
node -v
v6.11.2
node -v
v4.7.2

What the fuck? Pls help. Ubuntu
>>
>>61751619
>node -v
>v6.11.2
>node -v
>v4.7.2

SIGH. I meant:

node -v
v6.11.2
nodejs -v
v4.7.2
>>
File: 1499170337699.jpg (91KB, 640x480px) Image search: [Google]
1499170337699.jpg
91KB, 640x480px
>>61751362
no don't use lua
check html and css out as you said, use regular javascript for front end scripting
use python for applicaiton server since you already know it or learn something else if you feel adventurous
>>
>>61747046
check for the existence of window.opener
if the user came from a site with a link that opens a new window (and that link doesn't have rel="noopener"), window.opener will not be null.
>>
File: file.png (669KB, 1100x994px) Image search: [Google]
file.png
669KB, 1100x994px
I got asked these questions in an interview. Needless to say, I thought I managed the first one until it gave me an error at the end, and bombed the next 2.

Can you solve these simple Javascript questions, /wdg/?
>>
How long ago did you become involved in web development and how long did it take from the beginning for you to find a job, /wdg/?
>>
>>61751362
learn PHP
>>
>>61752548
1. 'A'
2. 7
3.
for ( var i = A.length ; i <= 0 ; i-- ){
for ( var j = 0 ; j < i-1 ; j++){
if ( A[j+1] < A[j] ){
var n = A[j+1];
A[j+1] = A[j];
A[j] = n;
}
}
}

>>
>>61752901
1. is 'C', sry
>>
>>61752548
2. Binary search, fucking duh
3. Any competent CS person should be able to puke out merge sort in 2 minutes

What company is this so I can apply
>>
this is correct ?
void EmptyList(List *list)
{
if (list>head == NULL)
{
printf("\n\t Wrong, no elements. \n");

} else {
free(list->head);
if (list->head->next != NULL)
list->head = list->head->next;
EmptyList(list);
}
list->elements = 0;
}
>>
>>61752901
why 7 for number 2?
>>
>>61731407
If you're making something new, why in the hell are you using PHP? Also you could try a non-relational DB if you don't like SQL
>>
>>61753039
no
first check if list is NULL
>>
>>61741418
>>61741141
>>61741037
# Python
>>> print 0.1 + 0.2
0.3



# javascript
console.log(0.1 + 0.2)
0.30000000000000004
>>
>>61752548
1. The function will recursively call itself, decrementing val until it ends up at 2, since it's the highest number that will be zero when divided by 3. The element at index 2 is 'C'.

2. Binary search takes log(n) time*. Since n is 100 in this case, log(100) is 6 point something, and it rounds up to 7. Doing this in your head basically requires rounding 100 up to the nearest power of 2, so since 2^7 = 128, 7 is your answer.

3. Learn quicksort. Preferably an in-place version of it. And with random pivot index for better worst cases. Generally in the real world you're gonna use the built-in sort function, but if you ever can't use it, then quicksort is pretty much your go-to option.

Although I guess in this case you would probably be better to use a lower overhead sort like insertion sort or something. Also it's a simpler algorithm so it'd be easier to debug when under time constraints.

*by log I mean log base 2, as is standard when measuring time complexity in computer science
>>
>>61753433
That's something specifically that the print keyword does. See pic related; the REPL doesn't get rid of it.

Also, this seems to work only in Python 2, not Python 3.
>>
What's a good super cheap web host? I'm currently with 247zilla but my files have started getting randomly deleted which is pretty concerning. They claim to have 24/7 support but in reality there's zero support and their website is half broken. I don't mind no support, as long as the service actually works...

Looking at GitHub, NoSupportLinuxHosting, and KimSufi, but could consider others. Any recommendations?
>>
>>61753552
aruba has a 1€/m +tax vps
>>
File: 1501101094459.jpg (49KB, 665x574px) Image search: [Google]
1501101094459.jpg
49KB, 665x574px
I normally never post for help regarding code, but I am completely stuck on something.
Might be tiredness or sudden retardation.

let activityHistory = history.slice()

console.log(history[0].y, activityHistory[0].y)
//93.42982470478503 93.42982470478503

for (let entry of activityHistory) {
entry.y = Math.round((entry.y / topPPM) * 100)
}

console.log(history[0].y, activityHistory[0].y)
//87 87

history is a lengthy array with objects of {x: ,y: }
I want to make a copy and modify the y property in the new array.
How are both results the same? .slice() should make a copy, not return a reference

I could make an empty array and just push results on it to circumvent the problem, but I still would like to figure this out.
>>
>>61753908
According to MDN it is a shallow copy. The original array is not mutated in the sense that its list of elements remains the same, but any changes to the object will affect both elements.
>>
>>61751643
nodejs was the original package name for node on APT since node was already taken. At some point the original node package was renamed or dropped, and nodejs became node.
>>
>>61753961
ah damn, thank you. Totally missed that.

In another part of the code I am slicing an array of strings and doing something similar. The whole time I thought slice and concat would always copy by value, no matter the data type.
>>
I fell for the css-grid meme and now my checkerboard looks ayylmao instead of checkerboard. What do?
https://pastebin.com/4rPbSxdD
>>
>>61730110
>screwdriver or hammer? Which is better?
>>
>make the mistake of trying to install Google's material icons via NPM
>NPM downloads ~90k files because Google can't into dependency management
T-Thanks Google
>>
I'm stuck. I'm accepting values from a multiple select dropdown and my arrays looks like this:

 Language input from dropdown:
Array ( [0] => 1 [1] => 2 )

Current languages for user 1:
Array ( [0] => Array ( [language_id] => 1 [language_name] => English ) [1] => Array ( [language_id] => 2 [language_name] => Spanish ) )


My code for inserting is like this:

 //for inserting //iterate through all new languages
foreach ($new_language_data as $new_language) {
//iterate through all current languages
foreach ($current_languages as $current_language) {
//if language id doesn't match, insert it into the database
if (!$current_language['language_id'] === $new_language) {
$res = $this->user_model->insert_language_for_user($user_id, $new_language);
}
}
}


My question is, how do I do the process for deleting?
>>
>>61755902
nvm got it
>>
>>61756157
>nvm got it

JUST
>>
>>61756475
Lol, here's how I got it. It's much cleaner too.

 $new_language_data = $this->input->post('user_language');
$current_languages = $this->user_model->get_languages_for_user_id($user_id);
$current_languages = array_column($current_languages, 'language_id');

//for inserting
foreach ($new_language_data as $new_language) {
if (!in_array($new_language, $current_languages)) {
$res = $this->user_model->insert_language_for_user($user_id, $new_language);
}
}

//for deleting
foreach ($current_languages as $current_language) {
if (!in_array($current_language, $new_language_data)) {
$res = $this->user_model->delete_language_for_user($user_id, $current_language);
}
}
>>
Jay-Sawn
Jason

How do you pronounce JSON?
>>
File: 1362960884714.png (28KB, 499x322px) Image search: [Google]
1362960884714.png
28KB, 499x322px
>make a shitty website
>do a google search for my site a couple days later to see if it's showing up
>notice another site with a different domain that's redirecting to my site

Is this common? I don't understand what they gain. Search ranking?
>>
>>61758008

redirect on the http level or the DNS level?
it could be someone that was using the same IP you're using now and forgot to delete his DNS rules
>>
>>61758037
DNS level I guess, if you visit the site it lists their DNS in the address bar but looking at the logs on my server it's very clearly redirecting all traffic to me. The domain was just registered today so it's clearly intentional.

I managed to block redirected traffic after some googling on the topic in case something malicious was going on, but I'm still not clear on what they hoped to gain from it.
>>
File: 1501593718628.jpg (315KB, 913x768px) Image search: [Google]
1501593718628.jpg
315KB, 913x768px
>>61758056
maybe the dood is just puting his name on your work to pas his cv and get a comfy job
>>
>>61758083
Maybe. In any case, he didn't seem to be injecting any scripts or anything. Can't say I really know enough about the security side of webdev to know if anything like that would be possible.

At the very least, if it was getting a lot of traffic through his redirect address I guess he could then point the domain to a malicious website one day and try to trick some idiots into installing malware or giving up their user info that way. So, definitely best to block it.
>>
>>61757626
https://www.youtube.com/watch?v=cp3LFwFdPf8
>>
File: text editor.png (29KB, 1312x116px) Image search: [Google]
text editor.png
29KB, 1312x116px
Pic related is taken from the Mozilla web development intro in OP.

Is there any point in using these editors in pic related? I use NetBeans and Eclipse for my university projects in Java. Would NetBeans or Eclipse work well enough for web dev? The most web dev I've ever done is bullshit made on Notepad.
>>
File: a.png (170KB, 1116x764px) Image search: [Google]
a.png
170KB, 1116x764px
are there any libraries/frameworks that can generate background stripes/gradients like this
>>
>>61758939
You could do web dev with a plain text editor if you wanted, the difference is the conveniences of that editor like autocomplete or things like intellisense.
>>
>>61759065
something like this?

linear-gradient(
to right,
#fffdc2,
#fffdc2 15%,
#d7f0a2 15%,
#d7f0a2 85%,
#fffdc2 85%
);
>>
I just added adsense to my website.

It looks so cancerous. But freedom aint free. It has to be littered with the blood of privacy and aesthetics.
>>
>>61753495
Besides the first question, which I got wrong because of a single character being wrong or something, I'd never have got the second two since I never did CS. What a fucked interview (only one like it before I got an offer).

What did I do wrong in my answer to question 1?

var A = ['A','B','C','D','E','F','G','H','I','J'];

var proc = function(int){
var result = Math.floor(int/3);
if(result % 3 === 0){
console.log(A[result]);
} else {
proc(int - 1);
}
};

proc(8);
>>
help

    var allLists=['a','b','c','d']
var listTitle = 'c'

var n = allLists.filter((list,idx)=>{
if(listTitle==list){return idx}
})



This is wrong. n is c.
I want n to be 2 -- the index.


What's the best, ideal code to achieve this?
>>
>>61759088
Nice dubs. I was recommended Sublime in another thread. I'll just take it from there and I'm sure I'll figure out what's best for me.
>>
>>61759381
Single character wrong.
Their code: /
Your code: %
They wanted divide, not modulo.
So it will print A for 0, B for 1, and C for anything 2 or greater.

>>61759440
Why not allLists.indexOf(c)
Or, if you really want to be kinky or if allLists contains some structures you need to dig into:
var n = allLists.map((list,idx)=>{
if(listTitle==list){return idx}
}).filter(function(idx){
return typeof idx === 'number'
})[0] // n == null if nothing, otherwise Number
>>
>>61759630
Wait, val / 3 = 0. The only possible value for val is 0. So the answer is A.

ehhhhh
>>
n=allLists.indexOf('c')
is perfect.

THANKS A LOT !
>>
>>61750990
its tinfoil
>>
File: 1495084440121.png (219KB, 750x800px) Image search: [Google]
1495084440121.png
219KB, 750x800px
Whats a good resource to learn PHP / Wordpress?

I used MDN to learn HTML / CSS / JS and the MEAN stack, but now I realize I'd like to know Wordpress for churning out simple sites (I'm not building out a node webapp from scratch when my friend asks me for a simple ecommerce site).
>>
>>61759822
Oi, what's wrong with res.render()?
If you feel like it, you could study WP's developer documentation and get a feel for just how WordPress is ""organized"", then start by developing a theme, which is pretty much how major user-facing addons are done in WP. You might well find that shopping carts are easier done in MEAN than WP's learning curve.

>>61759684
They specified integer division rounding down for their pseudocode. Therefore, val / 3 == 0 for any val from 0 to 2.
>>
>>61760090
Oh, I see. All way too much for a non-CS person with very limited programming experience like me to take in, in a timed interview. wew
>>
>>61728798
job quoting platform in golang. it's boring
>>
Why is it encouraged to use typescript in angular apps when ES6 is practically speaking the same thing?
>>
>>61759822
I just learned Wordpress by making a theme.

The documentation of Wordpress in the codex is quite lacking in a lot of regards, especially if you want to do someting non-standard or edit the comment section. But it's manageable.
>>
>>61760655
Because a "Supplied parameters do not match any signature of call target, ..." is useful sometimes.
>>
>>61761955
>I just learned Wordpress by making a theme.
Teach me senpai
What would you recommend?
>>
>>61762000
Just read
https://codex.wordpress.org/
That's pretty much all you need.

And this website will tell you about the file structures of themes
https://developer.wordpress.org/


When I started I had no knowledge of PHP yet and just learned bits as I went on. As you already know html/css you should have sufficient knowledge to start off.
>>
Anyone got some excellent and straightforward React code I can browse?


I just made a CRUD app -- simple app, user can upload book covers and text, descriptions. Image uploading using firebase. It's starting to become very unwieldy.
>>
>>61762180
Divide and conquer
>>
>>61757626
/'dʒeJsən/
>>
How do you make money in web development when you have just started out? I'm high-functioning autistic and don't usually fare long in usual jobs but am in dire need of income. I love web development but it is going to take a while to reach a point where I can apply for jobs, especially since I'm only a month in learning Javascript.

Any ways to make money with only knowledge of the base three frameworks (HTML, CSS, Javascript)?
>>
so i have table
inside table i got id, user and message
1 user1 message1
2 user2 message2
3 user3 message3
4 user3 message3
5 user3 message3

How could i select messages from user3, but i want it to:
if there is same message few times, output it only once

>mysql
>>
>>61753495
>quicksort
Interviewers will knock you because it's O(N^2) for worst case class input. Merge sort is the easiest logn sort to shit out quickly
>>
Are there any downsides to removing referrers?
>>
>>61762429
if it's for mysql it goes something like this

SELECT * FROM table WHERE user = "user3" GROUP BY message
>>
What's the best way to have people with the ability to navigate menus and sub menus on mobile?


I have this website which has a menu system like this:

Option 1
Option 2
Option 3

Then when you tap for example, Option 2, the menu expands

Option 1
Option 2
Sub Option 1
Sub Option 2
Sub Option 3
Sub Option 4
View Option 2
Option 3

But there's a lot of a sub options, and the person has to scroll down on their phone and they don't realize View Option 2 means to open that option.

What's a better way to organize or name this menu? I was thinking of putting maybe View Option 2 at the top, or by putting an icon next to Option 2.
>>
>>61762477
They are fucking retarded then. Big-o notation doesn't tell the whole picture. In most cases quicksort is faster.
>>
>>61731406
just use preact or inferno, same API + compat without the patent bullshit
>>
>>61762477
>it's O(N^2) for worst case class input
If you do it right, it's nlogn even in the worst case. That's why you have to randomize the pivot.

I'll admit thought that merge sort might be easier to implement in pinch.
>>
>>61753283
the array is sorted. you can chop off half of the array every time you look at an index.
1. 100/2 = 50
2. 50/2 = 25
3. 25/2 = 13
4. 13/2 = 7
5. 7/2 = 4
6. 4/2 = 2
7. 2/2 = 1
>>
Any really nifty way to write this?


If there are entities, defaultList = entities, else, defaultList = []




const defaultList = (Object.values(listObj)[0].entities
>>
>>61763493
Close, but you actually round down when there's an odd number, since you're subtracting 1 and then dividing by 2. (So 25 -> 12 instead of 25 -> 13)

But then you have to check the last 1 that's left over to see if it matches your target number, so it ends up being 7 anyway.

>>61763521
Assuming 'entities' is a falsy value like undefined, then you could do
const defaultList = Object.values(listObj)[0].entities || [];


The short circuiting behavior of || means if the first thing is false, the second thing is returned. If the first thing is true, it is returned and the second part isn't evaluated at all.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Short-circuit_evaluation
>>
Is there a book about webdev foundations? Like Tannenbaum book about os
>>
>>61736020
>https://hashtags.chat/
If you want cheap make a wix site
>>
>>61764491
Nice plug for your Discord clone. What sort of crowd are you aiming for with this project?
>>
>tfw you revisit an old project which was stalled because it wasn't working but now you know enough about the coding language to make it work so you fix it up ezpz nice and clean
>>
>>61728450
Have any of you guys seen this before [pic related]

This span with an id of "sbmarwusw"....

I wrote this page from scratch, and I did not create this element. It's not in the markup, nor do I have any js to create this element

I've started seeing it when I open a new tab. It didn't bother me because I assumed it was some google thing

But now its appearing on webpages that I've written, and I most certainly did not place it there

Why am I getting this mystery element on my pages? I've googled it, but can't find anything.

I'm on Chrome 55.0.2883.87 (64-bit); Any of you guys seen this before?
>>
>>61766426
>sbmarwusw
is the text below the span yours or is that suspect too? Did you load the page over https? Have you tried different browsers, pcs, etc?
>>
>>61766723
The text below the span is mine. It's a download anchor that is inserted after clicking a button. (probably why it is below the span; the anchor was created after page-load)

I loaded the page over https

The span didn't appear when I loaded this page at work

It also doesn't appear on firefox

So it must be a chrome-thing local to this pc, but why is chrome inserting this span?
>>
>>61766817
have you tried disabling any addons you might have installed? is it on every page in chrome? including new tab page, error pages? you could try interacting with it in the console, see if it has any event listeners by doing
getEventListeners(document.getElementById('sbmarwusw'));
>>
>>61766426
Seems like something an addon would add. I know password managers regularly add shit.
>>
What are some must follow sites/people/blogs/etc for web devs?
>>
I have an onclick event listener that won't go away after it has served its purpose, where do I put the removeEventListener() method so that it will remove this pesky onclick? Inside the addEventListener() or outside?
>>
>Bootstrap is garbage. Ever tried to edit the css from a bootstrap site someone else built. It's a nightmare. Don't use it.
>Bootstrap is for novices.
>Now you are really starting to lose it. Grid doesn't have full browser support yet. Bootstrap is for the lazy and the less skilled coder. This nonsense about efficiency is bogus
>It's sad that people have come to a point where they rely on other people's code because they can't create something on their own. This is how monopolies form. People become dependent on frameworks creating a very lucrative business for big corporations. Maybe we should just stop coding altogether. We can just use WIX to build our sites.

How do we prevent women from voicing their "opinions"?
>>
>Node, Rails, Spring, Asp.net

I currently work as a front end react/redux developer and am trying to get to the next level as a full stack developer.
What backend technology do you think I should focus on that will make sure I have lots of job opportunities, preferably both in enterprise and as a remote freelancing position?
>>
>>61767662
Rails, Node
>>
File: 1501450265605.jpg (144KB, 756x686px) Image search: [Google]
1501450265605.jpg
144KB, 756x686px
>>61767662
use spring, it's not only for enterprise fags
>>
File: so_questions.png (106KB, 1188x720px) Image search: [Google]
so_questions.png
106KB, 1188x720px
>>61767662
Node is steadily on the rise and also nice to use
>>
File: temp.jpg (41KB, 681x1007px) Image search: [Google]
temp.jpg
41KB, 681x1007px
>>61763083

What about having sub-menus which slide over the actual menu?

You click a menu item and it takes you to the sub-menu, with an option to go back.
>>
>>61767662
Try elixir, it's awesome.

Probably doesn't have too many job opportunities, but if you find one, it will be paid above average.
>>
File: kennedy01.jpg (37KB, 440x319px) Image search: [Google]
kennedy01.jpg
37KB, 440x319px
>>61765642
Holy shit this.

I've resurrected so many old programming projects this year that I didn't have the technical sophistication or mathematical knowledge to finish.

I also did a rough estimate of the time I've spent programming over the last 10 years and it's at about 8,000 hours.

tl;dr you really can improve if you work at something with sheer brute force
>>
>>61767417
But bootstrap is garbage. Explain to me why I need 150kb worth of bs files for a responsive grid system I could implement in <30 lines of css.

>implying anyone uses bootstrap for anything else

Also the menu system is pure trash.
>>
File: kid pc.jpg (78KB, 960x640px) Image search: [Google]
kid pc.jpg
78KB, 960x640px
The arrow keys on google search results stopped working for me. Could I write a chrome extension to replicate it?
>>
>>61768839
yes
>>
>>61768759
This is for bootstrapping projects, making quick uis to demo your projects without spending time customizing trivial stuff
Also it makes it easier for your fellow pajeets to modify your stuff since they also know bootstrap and don't have to look up what css class you gave to your menus and whatnot
To make bigger fancier projects you want to either modify bootstrap or make your css from scratch
>>
>>61767984
That would work, now I just have to figure out how to do it. I'd probably put the back on the top though.
>>
I'm trying to change a class name on an element. I'm using classlist.remove("before") to remove the old class and classlist.add("newname") to add a new classname.

However it doesn't seem like it's affecting the css. Is there a workaround for this?
>>
File: bulma.png (4KB, 469x55px) Image search: [Google]
bulma.png
4KB, 469x55px
>>61769078
How is anyone supposed to give you an answer based on that.
Post your code.

>>61768759
CSS frameworks don't have to end up in your code as a bloated mess though.
Maybe try Bulma + "purifycss-webpack" plugin
>>
>>61769409
My bad.

$card1.classList.remove('card');
$card1.classList.add("card");
$card1.classList.add("diamond");
$card1.classList.add("rank1");



But for some reason it's still just showing the back of the cards. Even though I've got the style sheets set up for diamonds and rank1-rank13.
>>
>>61769521
if css classes are properly added to the right elements this means you fucked up at css selectors
>>
>>61769521
Use the developer tools of your browser, and inspect the active css rules of the element.
If you have enough knowledge about css precedence it will be even better.
>>
>>61769576
I think that's what I'm running into trouble. In the html inspector the div classname is changed. However it doesn't seem that the change is reflected in the css. I'm not really sure where to start looking.
>>
>>61768890

There's no confusion if you use clear BEM naming. However, there is confusion if the reader is familiar with the only a bootstrapper (BS, semantic, skeleton), rather than being able to understand and modify themselves.

Bootstrap creates bad habits because it doesn't teach anything. It puts simple things like flex, responsive design, onclick events, hide/show menus inside a black box, so newbies can get immediate results. Ask said newbie to create an n-level deep submenu system and see how far they get.
>>
>>61767962
steady rise.

comfy
>>
redpill me on let's encrypt
>>
>>61770032
It's amazing desu.
>>
>>61770032
Certificate authorities can no longer just print money.
Still trying to figure out how to use it with an express server though.
>>
>>61769576
>>61769545
>>61769521
>>61769409

I'm so stupid. It was a typo. For two hours I was stuck because I was misstyping something.

>wew lads
>>
>>61770532
It is more common than you think. That's why code linters and autocompleters exist.
>>
>>61730218
Do you even know what is local host? When you caps it it makes me think that you don't know.
>>
>>61731775
Python for web
Pffffffffft
But i guess they're all the same shit
>>
>>61738406
This is a good way.
Another way is to store a document inside the hobbies field. Search the docs for it it's possible but I forgot how.
>>
>>61765063
I didn't make the site, another Anon did. It was referenced only by mistake
>>
>>61735506
Wow.
>>
>>61730218
lol
>>
>>61731775
learn node, if you won't to get ultra micro without doing much bottle for python
>>
Got an interview tomorrow for some company that uses Laravel. I've used PHP before. Any good links / resources / mini projects I can complete tonight or tomorrow morning to be prepared to answer some basic Laravel questions?
>>
File: 10461647262.jpg (61KB, 482x427px) Image search: [Google]
10461647262.jpg
61KB, 482x427px
how do i stop using global variables?
>>
>>61774079
Scope them properly?
Thread posts: 314
Thread images: 43


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.