[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: 19

File: 1487701743799.png (731KB, 824x553px) Image search: [Google]
1487701743799.png
731KB, 824x553px
>Discord
https://discord.gg/wdg
OR
https://discord.gg/0qLTzz5potDFXfdT
(they're the same)

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/
http://www.w3schools.com/
https://developer.mozilla.org/
http://www.codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

>Frontend development
https://github.com/dypsilon/frontend-dev-bookmarks

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md (embed)

>Useful tools
https://pastebin.com/q5nB1Npt/ (embed)
https://libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
https://developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
http://www.programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/ (embed)

>How to get started
http://pastebin.com/pDT82mQS (embed)
http://pastebin.com/AL6j7GEE (embed)

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
Noob here. Excuse my My php tags doesn't work in my html document and if i change it to .php it turns into plain text in browser.

I'm running this on a server that supports php.

It's the <?php tag that doesn't register as a valid tag.
>>
>>59334379
For PHP to execute, the file must have an .ph extension.

If you do change the extension and still won't work, there is some problem with your web server.}

Try making a file with only:

<?php phpinfo(); ?>

This should run in any PHP version, afaik
>>
>>59334418
a php extension. Fuck
>>
>>59334379
What web server are you using?
>>
>>59334418
>>59334427
no problem, the problem is that my (currently .html) file becomes plain text when i change it to .php

should index.html stay .html or not?

>>59334436
might be a serverside issue but im using my teachers server and he has his website uploaded to the same server that uses php scripts. If nothing works i will see him next tuesday and ask then.
>>
>>59334379
In the project directory, run
php -S localhost:8080
in your terminal

That will start a basic php webserver
>>
Hey guys, can you recommend me some web hosting providers?
I need to host more than 10 websites from this company that i started to work for.

They're all wordpress and prestashop sites so i dont need a dedicated server.

We are using hostgator but they suck, it looks like their storage is HDD based and they only gives us 50gb of bandwidth.
>>
>>59334269
can people recommend me some good Udacity courses? CS101 is on my list, what else should I do? Looking for core knowledge, not necessarily beginner stuff.
>>
Should i learn frontend dev if i suck and allways will suck at design? I did some basic HTML and CSS stuff a long time ago but now im wondering should i get into it more seriously?
>>
This dude fron work landed a gig as an angular dev.

Those fuckers make a shit ton of money here.
>>
>>59334729
Digitalocean is fine.

Each droplet is 5 dollars a month, but with virtualhost you can cram many websites onto one droplet.
>>
>>59336215
Thank m8, ill check them out.
>>
>>59335923
you can do js engineering and not need design skills
>>
Hey! Computer Science student here just looking for fun.

After building my first website for other purposes, I've started entertaining the thought of making a blog from scratch with a php and mysql management system and it seemed a little aids. Is there a good api I could use for making sure blog entires are secure, but also give more freedom to format?
>>
>>59336094
>tfw angular dev
where is "here"
how much?
>>
>>59336325
Just lock down your apis the right way (require authentication) and you'll be just fine. Don't be afraid! What's the worst that could happen anyways?
>>
>>59335923
Yeah, designer and developer are separate jobs at any place that knows what they're doing. I mean, what downie would expect a programmer to also be a designer or vice versa?
>>
>>59336643
Thanks for the reply! And I'm not scared, I just was unsure whether to use php and mysql, or try something new. I made a blog system for my site http://thebestinslot.gg (my first site so bear with!) and it is more of a glorified tweet in the sense that it strips it down just to text and looks awful :'D
>>
>>59336626
Dfw.

Over 60k. Usually 90k+

Average family income is 50k.
>>
I lie at work and say things took me longer.
They get to bill more and I get to do nothing for longer.
>>
>>59336775
Okay so I''m about to enter my second year of experience and I make like 67 in Austin. I'm from Dallas and I'd love to go back, just grown so many damn roots down here
>>
post 1337 code you've written today, developers. No framework babbies allowed. No .NET shills, either.

$('#resultList').on("click", "li", function() {
var clickedName = $(this).text();
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
xmlhttp.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200)
{
var data = JSON.parse(this.responseText);
if (data)
{
bindData(data);
}
else
{
errorMessage("Error: could not fetch record.");
}
}
}
xmlhttp.open("GET", "loadNameData.php?Name=" + clickedName, true);
xmlhttp.send();
});
>>
>>59337149
great code mang, would cum inside of it.
>>
>>59337149
What do you think jQuery is? :3
>>
>>59337306

A library.
>>
>>59337149
why do you check for existance of xmlhttprequest object when you don't have an alternative if it doesn't?
why are you using jquery for your click events but not for ajax requests?
why aren't you using promises?
>>
Daily reminder that a single drop of javascript will taint you forever as a web dev. HTML+CSS is the only path to freedom.
>>
>>59337342

1. idk thats what was on w3schools raw ajax tutorial
2.im doing ajax with both jquery and raw js, wanted to learn how to do it either way
3. no idea what promises are, i've heard of them, but haven't got there yet. they sound really gay, desu
>>
>>59337410
i
promise
you are a shit
>>
>>59337421

>muh promises

just sounds really gay. No thanks, Jeff.
>>
>>59337149
>code he writes belongs to him
Yeah, good luck finding a job out there kiddo
>>
Trying to set up a new website on the same server, but it's being redirected. Is there a way to determine if PHP is fucking me or whether my changes to my nginx config / gandi settings haven't taken hold yet?
>>
>>59337565

uhh it does belong to me? i just wrote it. Doing a replacement request system for a company

fuck off
>>
>>59337625
the company doesn't own the code?
>>
>>59337609
It might be an issue with .htaccess or web.config files in the parent folder.
How to check if you are having issues with PHP? Just print random data and exit in the first line of your script.
>>59337625
Can I post a 10000 spaguetti LOC I wrote on jQuery a long time ago? If I had enough interest/energy, I would rewrite it with a modern framework.
>>
>>59337665

??? you said good luck finding a job my point is i do
>>
>>59337715
The PHP is working, I should have clarified. I don't know if my current site has some sort of redirect (it does use them) and it's interfering with my access to the other site.

crysik.io is redirected via 301. I am going to do some work to the nginx config as it's a mess. gonna use
https://github.com/nginx-boilerplate/nginx-boilerplate
or
https://github.com/h5bp/server-configs-nginx

but I don't know which. I have a feeling if I do that it'll fix the redirects, just want to wait and see if domain and DNS changes are not odne yet
>>
>>59337715
>>59337772

scratch that, it has now stopped redirecting entirely but is not taking me to my webste, gandi must be doing shit. I'll wait and then do my server files tomorrow
>>
is there a limit how much data JSON.parse can parse? if i get too many results it returns false. I could set a limit on the query but i'd rather not.....
>>
File: fakenote.png (54KB, 788x564px) Image search: [Google]
fakenote.png
54KB, 788x564px
My evernote clone is shaping up nicely, I'm only missing tags and conflict handling sync logic.
Maybe throw in tinymce for rich text if the need arises.

And unlike those assfaggots on github that do similar things,l but with hundreds of dependences and hundred thousands files, this shit only takes ~1.5mb full and can run on the simplest LAMP setup.

If you want a job well done you gotta do it yourself, trusting memesource devs was a mistake and huge waste of time.
Bet they need a whole framework and fifty hundreds dependences just to walk to the bathroom and take a dump.
>>
>>59337883
B-but you are using the full Bootstrap stylesheet. Do you have modals, accordions and breadcrumbs in your app? Do you really need all those classes and containers?
>>
>>59337963
Actually no, I'm doing pretty much everything myself... I wanted to use modals and some stuff, but then I made my own.

Probably just need the normalizer and border-box sizing.
>>
I'm learning about web workers from here https://www.w3schools.com/html/html5_webworkers.asp
The code below is a js they put in a web worker, why does the script area have a separate call to timedcount?
var i = 0;

function timedCount() {
i = i + 1;
postMessage(i);
setTimeout("timedCount()",500);
}

timedCount(); <- why is this here
>>
>>59338180
because the method would never run otherwise.
without that it would never get called for it to set the settimeout.
>>
Been hunting for a job for months. Self taught. At completely unrelated basic bitch job right now.

Have two interviews next week, one for this company in a role that pays twice as much as I'm getting now. Another is being arranged through Launchcode at a start-up in the trendy part of the city.

Just got a voicemail from a place I interviewed at earlier this week and they offered me the job. So now I have to call them back. Do I just blindly accept their job offer and keep pursuing the others?
>>
>>59338278

you barely told us anything. Job title? pay? location? etc etc forget the fact that only you will make a decision we wont do it for you but if you want our opinion we have to know the details
>>
>>59338263
But doesn't pressing the startworker button cause the function below to run the js as it's turning on the web worker?
<button onclick="startWorker()">Start Worker</button> 
<button onclick="stopWorker()">Stop Worker</button>

<p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support Web Workers.</p>

<script>
var w;

function startWorker() {
if(typeof(Worker) !== "undefined") {
if(typeof(w) == "undefined") {
w = new Worker("demo_workers.js");
}
w.onmessage = function(event) {
document.getElementById("result").innerHTML = event.data;
};
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Workers...";
}
}
>>
>>59338180

wutz a webworker?
>>
>>59338314
Right now I'm doing temp clerical work for a large life insurance company you've heard of. Their new position I'm interviewing for on Monday would be for a permanent role in the department I currently support. It's bullshit but it would be secure and pay a hair better than the job I'm about to accept, which is a PHP developer position at an online furniture retailer. The third position is front end development for a geospatial mapping company. It would pay best but I haven't heard good things about the way they treat junior devs.
>>
>>59338402

sounds like you have options. I would honestly take the most cutting edge job. It's best to be in position where youre continuing to learn. MY first job was just front end and i hated it. Became full stack and love it. front end is boring and you dont learn anything about programming.

but thats just my advice do whatever the fuck you wanna do
>>
>>59338380
yes, that's why you don't need to run it manually because your button will do that.
that's why they didn't do it in their sample either.
>>
It is worth it to complete a couple of projects completely from scratch frontend wisem right? I feel dumb using bootstrap all the time.
>>
So im a bit new to all of this so here is a dumb question just so i get the hang of things:

What is the best and correct way of doing the following, should i let mysql do the work, or should i let the scripting do the work?

Lets say i need to show some stats on the page. These stats are based on calculations from tens of thousands of rows in different tables.

A) Use one or a few SQL queries that uses lots of count, sum, round etc, so the data wont need any more processing after its been retrieved form the database. Its finished and done when fetched.

B) Fetch all the relevant rows (tens of thousands), and then iterate through them and make the calculations using whatever back end language you use.

Which way is healthier for the server if you have lots of requests doing this? Or is it basically the same thing?
>>
>>59338395
its like a Promise but JS is single threaded and "JS worker" actually asynchronously executes on a new thread
>>
>>59338599
don't do B.
Never load large amounts of this into memory.

Database servers are made exactly for this, they are optimized to calculate sums of large rows together efficiently and fast.

Loading thousands of rows into memory for each requests your server will go boom very fast.
>>
>>59338478
I just got off the phone with the offered job, took it, pays just a little more than I'm getting now to start but at least it's the field I want.

We'll see how next week goes but I'm putting in my two weeks after the insurance company interview on Monday if they don't straight up give it to me with much better pay
>>
>>59338599

i would guess let SQL do that
>>
>>59338573
No
>>
>>59338632
>Loading thousands of rows into memory for each requests your server will go boom very fast.

not necessarily. I've made a search function that loaded around 1000 rows really quickly. The key is to write your queries as lightweight as possible. But yes youre right SQL should do calculations on the data. Back end language should be used just as the middle man between client and server.
>>
File: 1485889119752.gif (8KB, 645x773px) Image search: [Google]
1485889119752.gif
8KB, 645x773px
>he's not an asynchronous programmer
>>
Is Wt cool?
>>
>>59338737
1000 is nothing.
I had a guy at work loading 500000 rows into a list, sort them and then only render 10 of them.
the machine the application ran on was on it's edge.
>>
>>59338801

ohh i read that wrong i thought you said A thousand. Yeah thats hilarious though what an idiot
>>
web assembly is here guys!
>>
>>59339112

still years away my friend
>>
>>59339311
the examples have nothing to do with each other.

the first example is without a button.
so for it to run at least once, it gets triggered manually.

the second example has a button which triggers it, so it doesn't need to trigger itself manually because the button will do that once pressed.
>>
>>59339347
I'm dumb, made the files on my desktop to try and I see why now. I thought the thing would run the function inside the js file when the webworker was created but no you need to call the function inside the file itself.
>>
>>59338636
how long were you studying for before you landed these job offers? Self-taught in process here.
>>
>>59338180
dood you want to be making serviceworkers instead
they run in a background process as well but can do all sorts of cools shit
they're used to make progressive webapps which are lightweight mobile apps installed from the browser
>>
>>59339456
Really ramped it up about a year ago exactly.
>>
give me a good web app idea, fek
>>
>>59339702
so what are your skills today? You got a github to share with us? I've been studying for about 3 months... Hope to start throwing out CV's in another 3
>>
>>59339789
this
I want to see what sorta skill level will make me money (student wanting to make some on the side)
>>
>>59336970
Do a search. 90-140k. They are dying for senior angular devs here. You could totally land it.
>>
>>59337149
I would but it's under NDA.

:(((((
>>
>>59339692
I'm not making anything big yet just learning the basics
>>
>>59339789
I'm not sharing my GitHub because the address is my legal name. But I'll tell you I did cs50x, then just started watching YouTube tutorials and cranking out projects.

The project I've demoed at interviews is an instant messaging platform I built in PHP.

I know PHP, MySQL, JavaScript, HTML and CSS very well, and have been using Bootstrap to make everything look tidy.
>>
>>59340174
What courses did you do before getting to cs50x? Im not that far ahead yet
>>
>>59340249
Start with codecademy. Anything on there that interests you. If you're brand new learn html and css
>>
>>59340410
or, w3 tutorials
they are pretty simple to follow
>>
I have a Sybase database that I need to query from an API in another place, what should I do? Put web services where I have my database? Sry for my English
>>
Guys, don't worry about learning an entire stack to get your first job.

Most likely your first job is going to be in a base language like PHP or Javascript or whatever. So even if you go there as a fullstack it's not like anyone is going to let you touch anything outside of your role.

Also the chance of you landing a fullstack gig as your first job is very low. Only a gigantic retard would hire a newbie for a position where they could crash and burn everything in one sitting.

Basically enjoy your 30-40k a year job doing bug reports and maybe feature requests for at least 3 months then start applying everywhere for everything again. You'll get a lot of offers for entry and junior still, but hold out for a mid-level. Remember, you already have a job so you don't have to jump into a junior role again. You'll get a mid-level eventually. Stick to that for about 6 months then start applying. Senior-level can take a while. You might even hit senior level from your mid level job before you get a bite. If you do, then start applying for senior level once you are a senior level and you'll get the bites.

Remember to keep pushing for the next rank though. Don't sit complacent.

So...go out there and get your junior level and stop worrying about cramming stacks that aren't going to be used by the time you land senior anyways.
>>
>>59340800
Also your job might "promote" you to mid-level and give you a few thousand dollar a year raise. That's ok because you only care about getting the mid-level title. Same for senior. I know some senior-level that got there after being with a small company for a year and being the most senior dev there, so they got the title.
>>
Do those website builder sites just make pretty looking pages? Stuff like database and more complex shit I don't have examples of aren't included? Just curious where the money comes from for being a web dev
>>
>>59340885
Developers build applications, not static websites. That's the job of a web designer.
>>
>>59340885
No.

If you wanted to do a thing where it was a website builder but had databases, then everything would have to connect together as modules of the same thing. At that point you have basically WordPress, which retards still can't figure out.
>>
What exactly do mobile developers do? What kind of apps do they create that haven't been done already
>>
>>59341522
corporate mobile apps for example
>>
>>59341522
There are a ton of apps that haven't been created yet.

Just sit and watch as the next billion dollar app rolls out with a simple idea that anyone could have thought up.
>>
>>59340800

thanks dad
>>
>>59341352

this

if youre not full stack, kys
>>
>>59340800

why not be full stack when you can be full stack and get a full stack job? i dun git wut ur tryin 2 say, anon
>>
I thought I won a scholarship through Flatiron school that I signed up for and wrote an essay for a few months ago.

Turns out it was a "partial scholarship" for 50% which still takes it to $750.

Fuckers.

Jokes on them, I got a web dev job now.
>>
I know people here like react.js better than angular.js.
What is the difference?
Are both available through CDN?
>>
>>59342330

dude react and angular are shit m8 check vanilla.js honestly google it its the best frameworks/library/whatever. Really fast too.
>>
So I've been a developer for a little over a year; should I go back to school for a CS degree?
>>
I'd say only if it's gonna teach you higher level CS stuff. if it's just frameworks and languages it'll be outdated and you'll get ahead more by staying employed.
>>
What's the difference between buying hosting from guys like GoDaddy vs hosting from Linode?
>>
>>59342766
will teach you approaches that self taught might not, good pratice etc
adds something to CV, should arm with new skills and give more time for portfolio
(if its a good uni which focuses on emplyment pratice at least)


really if you are good at dev your portfolio should land you whatever you need
>>
anyone got any resources for nginx? My website works but adding another website to the same server is really killing me, I hate my life. Just want a setup that gives me clean URLs, PHP, multiple websites and no bullshit :'(

I haven't done anything today but try and fix it, and now I'm getting into bed, with nothing to show for it :(
>>
File: hesonly510.jpg (19KB, 480x360px) Image search: [Google]
hesonly510.jpg
19KB, 480x360px
>when all he knows is front end
>>
File: 1458543761536.gif (74KB, 278x340px) Image search: [Google]
1458543761536.gif
74KB, 278x340px
>>59343111
>learning web dev at all when you max out at $100k unless you start your own business or make your own website that gets big which is a very low chance
>>
>>59343404
You don't max out at 100k. It goes all the way to CTO.

Also my websites make me 12k a year. Not much, but still worth it.
>>
>>59343679
>Also my websites make me 12k a year. Not much, but still worth it.

how? teach me your ways. ads? subscriptions? spam? porn?
>>
What the fuck is Angular 4? Is it going to be entirely different just like Angular 2? Google keeps fucking me in the ass
>>
>>59343882
It depends on the site. If it's just a tool or something then I use ads. If it's something where I can let people pay to be cooler than others then I will do that. I never paywall though. I'll be a zuckerberg someday ;_;
>>
File: file.png (45KB, 640x401px) Image search: [Google]
file.png
45KB, 640x401px
>>59343918
Never heard that it existed, but here's the rundown on Angular's Blogspot.

• Nothing has really changed
• Its still backwards compatible with Angular 2
• They started using Semantic versioning (how the versions of Angular are displayed)
• Due to the misalignment of the router package’s version on NPM, the team decided to go straight for Angular v4

Their conclusion:

• don’t worry about version numbers
• we do need to evolve Angular in order to avoid another Angular 1 to Angular 2 change, but we should do it together as a community in a transparent, predictable and incremental way.
>>
>>59344077

unless you show us what youve made no believes you
>>
>>59344109

why you need angular to do web dev is beyond me
>>
>>59342881
Digital Ocean's documentation is what gave me my start.
Also this book is interesting/useful:
https://www.nginx.com/oreilly-guide/
>>
>>59344155
When you're making large scale web apps you do need to have a set MVC pattern to make it easier to know the state of the app and to avoid problems later in the pipeline when adding new features.

Facebook uses react and Google uses Angular for their products
>>
>>59334729
Heroku, aws
>>
>>59342881
Look up DigitalOcean's guide to creating a LEMP stack, their guide to configuring Letsencrypt CA with NGINX and a guide to installing and configuring fail2ban and ufw
>>
>>59344257

this is not real programming tho...

<ul>
<li ng-repeat="x in names | orderBy:'country'">
{{ x.name + ', ' + x.country }}
</li>
</ul>
>>
Anyone here a react dev? Trying to learn redux saga wondering how i should organize every thing, or should i be like fuck it put everything in the app index.js
>>
>>59344299

what is redux? redpill me
>>
>>59344315
Redux is a predictable state container for JavaScript apps.
(If you're looking for a WordPress framework, check out Redux Framework.)

It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.

You can use Redux together with React, or with any other view library.
It is tiny (2kB, including dependencies).
>>
>>59344299

Just a few examples from one of my projects


Main entry point app/app.jsx
import { render } from 'react-dom';
import thunk from 'redux-thunk';
import { createStore, applyMiddleware, compose } from 'redux';
import rootReducer from './rootReducer';
import routes from './routes';

const store = createStore(
rootReducer,
compose(
applyMiddleware(thunk),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
);

render(
<Provider store={store}>
<Router history={hashHistory} routes={routes}/>
</Provider>,
document.getElementById('app')
);


app/rootReducer.js:
import { combineReducers } from 'redux';

import flashMessages from './reducers/flashMessages';
import auth from './reducers/auth';

export default combineReducers({
flashMessages,
auth,
});


app/reducers/auth.js
import { SET_CURRENT_USER } from '../actions/types';

const initialState = {
isAuthenticated: false,
user: {}
};

export default (state = initialState, action = {}) => {
switch(action.type) {
case SET_CURRENT_USER:
return {
isAuthenticated: action.isAuthenticated,
user: action.user
};

default: return state;
}
}


app/actions/types.jsx
// Flash Message
export const ADD_FLASH_MESSAGE = 'ADD_FLASH_MESSAGE';
export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE';
// Auth
export const SET_CURRENT_USER = 'SET_CURRENT_USER';


app/actions/authActions.js
import { SET_CURRENT_USER } from './types';

export function login(user) {
return {
type: SET_CURRENT_USER,
isAuthenticated: true,
user
};
}
>>
>>59344126
and guess who doesn't care what you believe? Everyone.
>>
>>59344579

you make 100k a year and post on 4chan

cool story bro
>>
File: notch.png (26KB, 599x195px) Image search: [Google]
notch.png
26KB, 599x195px
>>59344629
Because people who make 100k a year can't possible be lonely enough to go on 4chan, right?
>>
>>59344629
100k is nothing though.
I make 110k and all I do is project management. I have plenty of time to shitpost here.
>>
Is there a way to interpret or run programs written in other languages on the local machine from the browser? Is this a browser-specific capability?

Say I have some C++ file that just adds 2 plus 2, and I want to display the results in the browser. How would I do this?
>>
>>59345083
For running code in the browser your options are javascript, anything that compiles to javascript, and webassembly. I think it's possible to compile C++ to webassembly.
>>
>>59345193
>webassembly
maybe im a dumbass, but I'd never heard of this.
Thanks.
>>
>>59343404
>earning web dev at all when you max out at $100k unless you start your own business or make your own website that gets big which is a very low chance
You do have a point, I'm grinding away every day to learn all this shit just to be able to get hired for MAYBE 60k and not get fired within a few weeks and maybe be lucky enough to make a few hundred a month from my own websites. I wish I could get some hard labor job that paid well so I could quit this shit but there is nothing but minimum wage near me.
>>
Is the ruby on rails industry still alive.
Been learning node.js and I think it just looks like ass compared to ruby.
>>
Why doesn't this ternary render??
I'm using REACT, and, for some reason, this makes my Component not render.


{displayMember ? (
<TabPanel>
<MemberPage member={members[0]}/>

</TabPanel>
) : (
<TabPanel>
<Members members={cabinetcurrent} />
</TabPanel>
)};
>>
>>59345839
Node is very good for prototyping, but on the packager side is just as shit as ruby.
Modern devs are retarded and use dependences for no rhyme or reason, just like ruby. And of course they have to be 100k files 300mb ones, god forbid they attempt at efficiency.
>>
>>59346000 (checked)
General things to check:

• Are you importing the TabPanel, Members, MemberPage components in your file?

• Is the whole jsx what you posted inside a single parent div?

• Have you double checked if the props you're passing the correct data type?
>>
File: Cyclists_4k.jpg (3MB, 3840x2160px) Image search: [Google]
Cyclists_4k.jpg
3MB, 3840x2160px
>>59334269
>For the noindex meta tag to be effective, the page must not be blocked by a robots.txt file.
>If the page is blocked by a robots.txt file, the crawler will never see the noindex tag.
>the page can still appear in search results, for example if other pages link to it.

So the site, file, directory must not be blocked - it must be available FOR crawling in order to not appear in the search results (when noindex is applied).

So, what's teh logic? Why doesn't block/disallow by robots.txt also apply noindex - why would you want to index a site in SERP that can't be crawled?
>>
How do I take data from a database and put it in a html document? I'm using node.js. Is this what template engines like Jade are for?
>>
>>59347300
You either generate the HTML page server-side (in node) and then send it to the client with the data already filled in, or you give the client a HTML page that runs some JavaScript code that asks your server the data and then adds it dynamically to the page (you'll probably want to use AJAX)
You can use Jade/Pug for the former approach if you want to
>>
>>59347300
Well yeah I guess. Template engines allow you to render a html page instead of serving it statically.

So when you visit a HTML page it would be rendered on the server side. That could include fetching database data and displaying it on a page.

There are other ways however to get database data. One way is to serve an API endpoint on your server and have it set to respond with data from a database. Then your client would do the work of rendering the database data in to HTML.
>>
File: city-627335_1920.jpg (1MB, 1920x1911px) Image search: [Google]
city-627335_1920.jpg
1MB, 1920x1911px
ANYONE got a good resource or primer on where I can get a overview of THE DEVELOPMENT PROCESS FROM A TO Z??

Meaning, all the steps it takes to complete a basic product.


I'm working on a business webpage, so it could be something along those lines, but anything general is fine as well.
>>
>>59347433
on what language are you coding? I'll find something for you
>>
Has anyone been through the Jumpstart Labs Rails tutorial?

Its my first exposure to Rails as a beginner. I'm getting though it but barely understand what I'm doing most of the time.
>>
>>59347484
front end html css and js pls
>>
>>59347334
>>59347336
So how do I decide which approach to choose? I imagine they both have up and downs?
>>
>>59347594
They're all essentially the same.
Jade is like python. It gets annoying if you tend to copy paste a lot of code. I typically use handlebars
>>
>>59347433
There's plenty of great Udemy courses that do just that.
>>
>>59347718
such as...
>>
>>59347831
Just search for what you want to learn and the first few results should have the most popular courses. You can preview the course content and check the ratings.
>>
>>59347831
>asking someone else to do your homework
>>
>>59344297
Well then it lets you save the real programming for the tasks where you really need it.
>>
File: TOOK.jpg (16KB, 248x365px) Image search: [Google]
TOOK.jpg
16KB, 248x365px
>>59347484
Guy who actually asked the question here.

I'm coding in node, express, some react. Mostly JS based stuff.
>>
>>59348278
>>59347560

just go here, you'll find at least one book related to your thing

http://gen.lib.rus.ec
>>
>see people talking about Laravel
>go check the official page to see what the dela is
>The PHP Framework For Web Artisans
>For Web Artisans
I think this is the first time I started hating a framework before even seeing it
>>
>>59347433
Search the /g/ archives. I wrote out a long post on it about a month ago.
>>
File: 1476009648557.gif (2MB, 265x257px) Image search: [Google]
1476009648557.gif
2MB, 265x257px
>going through some simple algorithm challenges
>try to solve it without google
>only google after it's solved
>tfw seeing the 'proper' solution compared to your hideous loop laden monstrosity

I'm not cut out for this man.
>>
>>59349418
lol interested but can't be bothered to look in the arch. Anybody wanna go for it?
>>
>>59349494
nah man, first step is to get it working. Those highly stylized and efficient 3-line solutions are from pro's with years of experience. Don't give up and you'll get there one day.
>>
How much back-end is a Junior Front-End dev generally expected to know? I mean, what level of expertise in a back-end language/framework is usually expected?

I'm self-learning and interested mainly in Front-End and not sure whether to spend most of my time purely honing my HTML/CSS/JS skills or focus on Back-End/testing just as much in order to improve my chances of eventually getting a job.
>>
as a Java/C# guy (inb4 poo-in-loo, I know) I use the MVC model. Are there other models/styles I should be looking into if I wanna get in with the hip crowd?
>>
>>59349709
MVP MVVM
>>
>>59344378
I like keeping my actions and action types together, so it's just a single import. I visualize each reducer as a tiny state machine, and actions as transitions between them. I find this makes the code more readable when revisiting it, since you can tell exactly what each action should change.

+1 to using thunks for asynchronous. Would post actions.js but character limits (also, I for one don't mind the boilerplate, lol)
reducer.js
import * as actions from './actions';
import { combineReducers } from 'redux';

let id = (state = null, action) => {
switch (action.type) {
case actions.AUTH_LOGOUT:
return null;
case actions.AUTH_LOGIN:
return action.id;
default:
return state;
}
}

let token = (state = null, action) => {
switch (action.type) {
case actions.AUTH_LOGOUT:
return null;
case actions.AUTH_LOGIN:
return action.token;
default:
return state;
}
}

let isFetching = (state = false, action) => {
switch (action.type) {
case actions.AUTH_REQUEST:
return true;
case actions.AUTH_SUCCESS:
case actions.AUTH_ERROR:
return false;
default:
return state;
}
}
let error = (state = null, action) => {
switch (action.type) {
case actions.AUTH_REQUEST:
return null;
case actions.AUTH_ERROR:
return action.error;
default:
return state;
}
}

let message = (state = null, action) => {
switch (action.type) {
case actions.AUTH_REQUEST:
return null;
case actions.AUTH_SUCCESS:
return action.message;
default:
return state;
}
}


export const key = "auth";
const reducer = combineReducers({
id,
token,
isFetching,
error,
message
});
export default reducer;
>>
>>59344315
its a flux implementation
>>
>>59349709
Would you accept advice from a PHP internals maintainer?
http://blog.ircmaxell.com/2014/11/alternatives-to-mvc.html
>>
>>59344299

The general pattern for a large scale redux project is to completely seperate all your components, actions and reducers. But when you're starting a project I think you should code first and refactor second. I usually find it easier to start in app.js and then moduralize it as I go.

Unless you're just using it to learn, when you're deciding to use redux in a project you always need to ask yourself if you really need it. Are you actually updating front end in real time? Or are you just rendering some blog posts?
>>
>>59348914
You mean you're not a ninja pirate rockstar demigod developer?
>>
Brain hacks for programming concepts for a newb? Ways to visualise/remember stuff?
>>
>>59349902
https://illustrated-algorithms.now.sh/

This illustrates some search algorithms, it goes line by line, explaining what's going on.
>>
>>59349966
>>
>>59349879
I read the official Redux tutorial a while back and remember thinking it was neat, but then I never really got to use it in any project
I wish guides stopped using fucking todo notes as toy projects and went with something more substantial
>>
what resources can grant you a deeper knowledge of js to solve challenges?

i wanna git gud and have my eye on some books i know are superb (and arent available on the bay) but i dont have the moneyz

are there any good online resources for problem solving with js?
>>
>go to 4chan-x repository
>it's fucking coffee script

How do I convert this clusterfuck back to readable javascript so that it's actually possible to understans what it's doing?
>>
>>59351070
Open the compiled version?

https://github.com/ccd0/4chan-x/blob/master/builds/4chan-X.user.js
>>
>>59350395
You only need two.

https://www.ecma-international.org/ecma-262/7.0/index.html

https://developer.mozilla.org/en-US/docs/Web/JavaScript

Study those and you'll kill literally 95% of web devs.
>>
>>59351124
>ecma-international
one hell of a resource thanks anon
>>
>>59351326
Yeah well, its the javascript standard. It's actually really straightforward, and describes all the "bullshit" like null vs. undefimed, objects vs. primitives, etc.

Read it with the certainty that 99% of people won't ever touch it.
>>
Ok, so API authentication question.

I have a Javascript SDK that I'm using to authenticate people. I want a PHP script to make sure they are still authenticated. Would that be possible?

Basically I want to use the JS authentication to AJAX to a PHP page and store stuff for that user. I don't want random people to be able to just see "Oh, this is how it works, and change to someone elses name."
>>
>>59352981
>would that be possible?
that's how it works.
how else are you authenticating your users now without checking anything in the backend?
>>
>>59353014
I'm sending an authentication request to the JS SDK.

I guess I can just send the token to a PHP page, get the user info from that token, and store their username in the db?

That way you have to have a valid token to save stuff to the db and then it's only under the token holders name.

That works, thanks rubber ducky.
>>
>>59353238
look at stuff like oauth and jwt
>>
You guys ever written a chrome extension?

The chrome platform is really comfy. It gets features much faster than Node.
>>
Learning how to make a simple PHP login script. Using a separate PHP file to check the login details.

Would the form method be POST or GET?
>>
>>59334269
is there a thread which i can go to for advice on c++? Like another general or whatever
>>
>>59354754
either >>>/dpt/ or >>>/sqt/
>>
>>59354751
Prefer POST for sensitive data. GET requests append the form data to your URL, making it easily visible.
>>
>>59354754
the /dpt/, daily programming thread. Don't know how helpful they'll be though

Also, general question, is anybody here employed in web dev?
>>
>>59354751
post unless you want malicious code run on your server
>>
>>59354794
I work with a .NET WebMVC codebase, using KendoUI for the controls and grids, as well as an AngularJS codebase, also using kendo.
>>
>>59354792
>>59354798
Thanks.
If the details are incorrect, would I need a separate page to ask for the right details? Or is there a way of doing it through the already existing login.html or login.php?
>>
>>59354906
Typically you redirect back to the login page, something like "server/login.html?message=credentials_invalid" and add code to show an error message
>>
>>59354798
I can use postman to post whatever I want. It doesn't matter.
>>
>>59354901
located where (country)?
So now sincerely, what are you doing here? I thought this thread was just for us NEET's trying to escape our neetdom through the magic of web dev. Do you learn stuff on these threads? Isn't stack overflow better for that? And how much $$ you making?
>>
>>59354794
Yes, I do PHP for a company in inventory management software.
>>
>>59346000
Check imports check if u have something like this.
Import { Poo } from 'loo';
Insted of this

Import Poo from 'loo';
>>
>>59354978
How would you go about adding code? Through HTML or PHP?
>>
>>59355162
Go learn some basics and then come back.
>>
>>59355154
same questions as here >>59355142 please. Would also be helpful if you mentioned whether you have a degree or are self-taught. Thanks!
>>
>>59355162
just watch a 10-20min youtube tut for a simple php form and you'll be able to do it yourself no prob
>>
>>59355177
Or just tell me which one does which and I can continue working and learning from there.
>>
>>59355237
>tries to learn web dev shit
>wants to be spoonfed every tiny thing he doesnt know
as a rule of thumb look something up yourself before asking for help like a little bitch
>>
>>59355142
This thread was originally to share projects and ask for input, or at least that's how it was used before the wave of "how 2 make text bold??" people came along.
>>
>>59355187
USA.
These threads aren't like SO...you see some shitty posts, but a lot of people post their stuff. Also this place is a good way to learn about new technologies and see what's becoming popular.
>>
>>59348914
>looked at styled(framework tht renders css with the component, so only tht components css will render when tht react components is being showned)

>look at docs, blood begins to boil

>forced to use this sht

can someone tell whats the diffrence between this

var Letter = React.createClass({
render: function() {
var letterStyle = {
padding: 10,
margin: 10,
backgroundColor: "#ffde00",
color: "#333",
display: "inline-block",
fontFamily: "monospace",
fontSize: "32",
textAlign: "center"
};

return (
<div style={letterStyle}>
{this.props.children}
</div>
);
}
});

and using the styledcomponents framework
>>
>>59355263
I didn't know it was so difficult for you to type out an acronym.
Are companies hiring people like you nowadays then?
>>
>>59355265
>>59355295

Right, it's just that the OP is so full of info for beginners, I thought that was the target population. I myself am a noob trying to learn, that's why I make so many dumb questions, and it surprises me to see people posting code so complex that I have no idea what it does.
>>
>>59355342
you're literally a fucking noob asking a ridiculous question and you're not self aware enough to know it

you've recieved the following advice
>>59355177
>Go learn some basics and then come back.
>>59355232
>just watch a 10-20min youtube tut for a simple php form and you'll be able to do it yourself no prob

if you wanna be spoonfed try >>>/reddit/
otherwise go learn how to solve your problem
>>
>>59355451
The OP has the beginner info to keep beginners from asking the same questions 30 times an hour.

We are usually more than willing to help people who post issues with codepen regardless of their knowledge level.
>>
>>59355154
Does your company name start with flow?
If so, I've worked there, sup
>>
>>59355298
To me it looks like styledcomponents helps you build your own library, for reusability. Then youd
import BlueButton from './componentLibrary.js'


Still, I don't know how that's much different than just
<button className="blueButton" />


¯\_(ツ)_/¯
>>
>>59355698
No.

I looked them up though. How was it?
>>
>>59354771
thanks dude
>>
Who has that javascript oop thing where he makes the todo list?
>>
>>59356446
You just described approximately 30 different frameworks
>>
>>59334729
http://scaleway.com/
>>
>wake up
>cool kids shit on Ruby and Python in webdev now
last time I woke up ror was on fire and everyone was wet from python
shit's moving fast
>>
When doing for loops in javascript is it necessary to declare the iterative variable with var in order for it to remain local?
I.e
//Should you be doing this
for(i=0;i<=length;i++)
//Or this?
for(var i=0;i<=length;i++)
>>
>>59356720
Yes, unless it's defined earlier in the scope.
>>
>>59356006
Well, they use a custom rolled PHP framework. It was good; however it's operated like a consultancy, so it you had to work on custom code while also thinking about how to merge it into the main codebase for reusability. The people are pretty chill and the hours are up to you. The only drawback to working there was honestly the pay
>>
>>59356720
no. all var declarations are IMPLCITELY HOISTED TO THE TOP OF THE FUNCTION.

Technically writing var i=0 on every for loop would be bad syntax but it is allowed by loosy goosy parsers

Only using es6 "let i=0" makes it local
>>
for (const i=0;i<10;++i) console.log(i);
// Uncaught TypeError: Assignment to constant variable.


for (const i in [3,4,5]) console.log(i);
// works


for (const i of [3,4,5]) console.log(i);
// works


for (const i in { a: 1, b: 2}) console.log(i);
// works


Explain this wizardry
>>
>>59356744
>>59356893
Okay thank you.
>>
>>59356971
It's using an iterator behind the scenes, so really
 i == iterator.next() 
>>
>>59356873
How was the pay there? Also what do you do now?

We also use a custom framework and the hours are up to us. Guess it's a common thing or something something.
>>
File: flat,800x800,075,f.u2.jpg (123KB, 512x512px) Image search: [Google]
flat,800x800,075,f.u2.jpg
123KB, 512x512px
>been a web dev in various forms almost 10 years
>only just learning TDD now

I'm such a hack fraud. Getting another wave of imposter syndrome hitting me hard now that I realise there are people out there running tests and I've been cowboying it still this entire time. I thought using version control and having a good zero-downtime deployment strategy was the "proper" way to do things, and that I was better than the noobs uploading files manually via FTP. Now I'm realising I'm still a cowboy because I was missing the automated testing step.

On a more positive not Adam Wathan's Test Driven Laravel is a heckin good course. I have tried to figure this shit out a few times in the past, but this is the first time it has clicked for me.
>>
>>59357157
17$/hr, wasn't too bad. I'm at a biotech startup now, working on the reporting frontend
>>
>>59357232
There's always something to learn. Always something to be a complete noob at (for example, I still can't into microservices orchestration; what the fuck is a kube8).

Regarding TDD, it's pretty awesome, but I've yet to really understand it in the context of a webpage. It feels like you're tying the test to the underlying HTML (which I rearrange all the time). Selenium and webdriver tests are slow to run and again, really brittle. Any thoughts?
>>
Just spend several hours looking through various MDN docs trying to figure out how exactly to edit what ended up only being two pages.

Also, in the process, I discovered some weird undocumented Google search syntax. Apparently you can use the bar character ('|') as a logical OR, and you can use either the bar or just OR inside quoted queries. I'm not sure if it working inside quotes is a bug or not.
i.e.
"top | right | bottom | left"

is equivalent to
"top OR right OR bottom OR left"
>>
>>59357438
I haven't tried full jS front-end testing yet. From what I gather there's not really much consensus when it comes to this part of it. If you have a complex frontend UI then I guess you'd want to use a JS testing framework? But I have no idea what your goals are exactly there.

This course has proposed a middle ground I've found quite natural. Write a functional test, something that maybe posts JSON to an endpoint and asserts the data made it to the database, or an integration test that proves the data made it to a 3rd party service. Then as you try to make that test pass, find opportunities to drive out unit tests to get you there. The unit tests sort of become slightly unnecessary, because once you're done if the functional test passes, you can be pretty sure the unit tests will pass too, but it's more about the process of getting to that point.

I've also found it to help when it comes to mapping out your domain. I normally start with pen and paper and try to figure out the DB schema ahead of time, trying to get to 5th normal form.

But yeah the functional tests that emulate down to the level of HTTP requests, but not all the way to the UI, seem to be a pretty good target.
>>
>>59357595
All good points. Seems like testing when doing backend tasks is more straightforward, as it's "just" moving data through systems. It's great because as you refactor and move code around you still make sure what you wrote works, it's a great multiplier to productivity.

I guess what I'm seeking is a similar boost to my frontend dev. It's really good when dealing with state management libraries (redux, etc), but I hit a wall when thinking about testing HTML.

It might also help to mention that i'm developing a card game, so it might be a case of having different requirements than a traditional webapp (i.e: ensure menu opens when button is clicked).

Maybe I'm just terrible at designing :D
>>
>>59344231
>>59344284

Thankyou you two yesterday by the way, turns out I was just getting fucked by propagation and my DNS wasn't being transferred :s

Thankyou though! <3
>>
>>59357890
A card game ey? You're not that guy I'm following on twitter doing the React based Doom Trooper remake are you?

But yeah I dunno a good strategy for testing front end automatically. All I know is that I'll try Laravel's implementation of it first because that's a framework that always tries to make stuff easy for devs. https://laravel.com/docs/5.4/dusk
>>
What are you guys working on?


I'm building a trivia overlay for OBS that the streamer's chat can vote. Correct answerers get some revlobot currency.
>>
File: out.gif (508KB, 600x400px) Image search: [Google]
out.gif
508KB, 600x400px
>>59358064
Nope!
I wish my designing skills were that good. I've uploaded a gif of my project.

I'm definitely just procrastinating right now though. I just can't seem to get web design.

Not to mention, the animations are breaking the layout.. and that I have to implement a better polling mechanism. And write better copy for everything. Anyway, enjoy.
>>
Anyone want to write a vanilla JS library for revlo bot with me?
>>
PureScript is fucking awesome.
>>
>>59358655
What exactly would this do/entail? Would it just be to add rewards or whatever for visiting/using a website?
>>
>>59359006
I'm not going to do it anymore. The ideas I had are already possible.
>>
>tfw VPS booted me out for DDoS'ing
>tfw router from ISP blocks all ports for some reason
>tfw can't demo my websocket server
can anyone
oh well
>>
what are some advanced things to make with javasscript?
>>
>>59359766
A real-time grid based gardening game.
>>
>>59359821

not a game
>>
>>59359923
A real-time grid based garden simulator.


For real though, just front-end, or would it include backend too? Because anything that involves communicating with other users would be somewhat advanced and might be cool. And the client side would still have a decent amount of logic to it. Maybe make a chatroom with websockets. Node is easy enough, if you want to use only javascript.

If you want only front-end, then think of things that involve some degree of user input. Maybe make an image carousel. How advanced a project it is depends on how much you go into the implementation. Like making it efficient, mobile compatible/responsive, lazy-load images, etc.
>>
>>59359329
I can help you with that. VPS isn't doing much right now.
>>
>>59334269
You guys use custom marker icons with google maps?

I'm bad at colors, so i'm looking for some kind of pack of markers-icons.
>>
what is the point of trying to learn backend if you don't own a server
>>
>>59361206
All computers can double as a server.

Install some software. Make your computer a server. Practice backend. Get good. Get job. Get paid. Die. Get reincarnated. Survive childhood. Get skills. Get job. Get paid. Die. Get reincarnated.

life++;
>>
Learning javascript, trying to understand it's class implementatin

what the heck am I doing wrong?

class testx {
constuctor(x){
this.x = x
}
getx(){
console.log(this.x)
}

}

test = new testx(5);
test.getx()
>>
>>59361348
You misspelled constructor
>>
>>59361383
fuck me
>>
>>59357577
Not many people know it also supports fulltext syntax

For example you may want to search for JavaScript related questions and not have solutions in jquery you can type:
"my JavaScript problem -jquery -jq"

To make sure jquery related results don't come up.

"My JavaScript Error" (in quotation marks) searches for the exact phrase
>>
File: 148930244.png (430KB, 1024x540px) Image search: [Google]
148930244.png
430KB, 1024x540px
>>59361388
>>59361348
why the fuck don't you faggots use an actual ide with a working jshint/jslint/syntaxchecker?

what kind of shit tier editor are you using?

stop being edgy and use actual web dev tools that actually work and don't cripple your productivity.


retards.
>>
What do you guys use for OS? Some recommended Manjaro & openSUSE. Does wifi work after I install those distros ? So I just have to learn linux and not make excuses of not learning linux just because I can do it in a VM.
>>
>>59358313
are you an argie? I've never seen anyone else use those cards.

Quiero ReTruco!
>>
asp .net or spring boot

no hipster shit please
>>
>>59358313
Briscola
>>
>>59337149
it's just a simple ajax request, nothing interesting
>>
>>59338180
it's there to initiate the function

(function autoStart(){console.log('this function auto starts')})()
>>
Opinion on "Sinatra"?
>>
File: 2.jpg (7KB, 153x218px) Image search: [Google]
2.jpg
7KB, 153x218px
>>59362318
im learning asp.net with pic related. Fuck what everyone says, here in the UK half the jobs in the market are for C# and .NET, no meme languages like laravel and shit.
>>
>>59362862
Heard he was a bit of a dick when he was alive
I personally prefer Dean Martin
>>
>>59362939
fucking word man, it's the same here, 50/50 ASP NET and Java

but thx, i'll try that book
>>
Sup /g/.

Does anyone know if it's possible to create a table for each instance of a Model in django?

I'm toying about with writing an imageboard clone, and I've got to the stage of having multiple boards/threads/replies. The thing is, because the posts are all being stored in the same Post table, their post_id (primary key) doesn't reset for every board. For instance, if there were 5 posts on /b/ but no posts on /g/, then the first post to /g/ would have an ID of 6.

The solution to this (I think) is either:
- Have a new column called post_id that is set to the number of posts on that board + 1 when the post is created.
- Have a different table for each board's posts.

Any ideas?
>>
>>59363110
Separate field for the internal thread ID
>>
>>59362939
It's crazy how true this is.

The internet lead me to believe that all startups use hip, trendy frameworks like RoR or Django with Angular or React.

Nope. Here in the UK, like 70% of webdev jobs where I am are .NET MVC or Java Spring. It's crazy.
>>
>>59363136
I think those hip frameworks are a Silicon Valley/NYC thing. Here in europe most everyone sticks to the big traditional ones. Java/Python/.NET

I look up Ror or Rust or any of those and there's about 5 job offer in the whole fucking country.
>>
question for my lads:
When i append: style="bakground-color:#000000;" to this tag:
<div class="item list-group-item col-sm-4" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">';

i get a nice background color in my list-element. i am unable to replicate this in my css stylesheet, how do i go about this?
>>
Explain vagrant to me like I am a retard
>>
>>59363779
It creates a virtual machine for you.
>>
>>59363700
Maybe spell "background" correctly
>>
File: oswq4i.gif (2MB, 311x225px) Image search: [Google]
oswq4i.gif
2MB, 311x225px
Is there a good resource for explaining how each part in a stack relates to each other/how they all actually work? Trying to learn MEAN stack, and most tutorials I've seen setup the example MEAN page but never actually explain how anything fucking works.
>>
>>59363779
its program
>>
Need some advice here

I want to become a Front-End developer. I have a real passion for the visual/interactivity side of things. I have been going through The Odin Project and I am currently struggling with learning Back-End stuff and to be honest, I just don't enjoy it at all.

Is a Junior Front-End Dev usually expected to have back-end experience too? I get that the more skilled you are in general, the better your chances. But I feel like I'm spinning my wheels learning to code back-end when I could be spending that time learning more Javascript/JQuery etc. I basically need to know where to focus my efforts in order to try and land a Front-End role 6-12 months from now.
>>
>>59364505
What "backend stuff" are you having trouble with?
>>
is this good?
https://www.hostinger.co.uk/free-hosting
>>
>>59364311
>MongoDB
Database, used to store the content of your web page
>Express.js
Handles serverside tasks for your page
>Angular.js
Your user uses this to load the web page and navigate through it
>Node.js
You need this to run express.js on your server.
>>
torrent cli client that can work in background?
>skip transmission-cli
>>
>>59361611
Yeah, no, I knew about all that. I'm just surprised that logical OR operators work inside quotes. (It's slightly annoying, since you can't search for phrases containing bar characters.)

Also, you know about refining your search by domain, right? You can prepend "site:" to a URL to only return results from that site, e.g. site:twitter.com/templeos
>>
>>59364311
>>59364862
To expand on those a bit:
>MongoDB
Pretty much that. Fine for learning/small projects, but read into NoSQL vs relational databases before you do anything for real.

>Express.js/Node.js
Node.js basically just allows you to run Javascript on your server (including Express.js). You can use Node without Express, but I think Express helps you organize things better. Also I think Express basically has solutions for a lot of stuff you're going to be doing on a webserver, and it streamlines them. You could do any of those things without Express, but it would require several Node modules to replace the different functions that Express provides.

>AngularJS
This is a frontend JS framework. You can do a lot of things on the frontend, like have a totally dynamic page that does routing and templating and everything, and barely even require anything on the backend except a RESTful API. Or you can use it in conjunction with a backend that does the major stuff for you, and just have smaller dynamic changes to the page layout. You'll want this on top of vanilla JS if you're going to have the page's layout change a lot without having the user do a full reload.
>>
>>59364311
>mongo

Don't do this part. Use a relational database instead. There are no good use cases for mongo. As an unstructured, fast data store/cache, Redis beats it every time. For everything else, a relational database beats it soundly.

Mongo needs to die.
>>
File: d1gjoagv1re8sspfwzb3.jpg (56KB, 500x334px) Image search: [Google]
d1gjoagv1re8sspfwzb3.jpg
56KB, 500x334px
>>59340800
Shit nigga, I'll take 20k a year if it means I can get a junior dev job this summer.
>>
>>59365533
So Mongo, Express and Node are all on the back end, with Node doing all the actual database querying/logic, but then Express sits on top as a framework to implement and abstract all the fiddly Node/Mongo stuff + has extra tools.

Angular is the front end and is what makes the pages non-static html and is used to actually send off CRUD calls through Express via Node down to Mongo and back out, yes?
>>
What happens if I wrap all the js in a function so my objects array is in scope?

Currently I can't use the objects outside of the constructor.
>>
hey /g/ I know a bit of html and css
Also a bit of js
Which framework should I learn?
Just want to make pretty sites
(My main job is c++, just want to know a bit of web dev too)
>>
>>59365862
Angular.
>>
>>59362122
Is ReTruco a different artstyle or does it also have different ruleset? I can't find any info on it online.

On topic: does anyone have advice for animation? I can probably use position: absolute and manually set everything, but I really like using flexbox for layout. (Going for a responsive design) Right now I'm using CSS transforms for the slide animations, but sometimes it reflows in a weird way.
>>
>>59365793
That's mostly correct;

I'm actually not 100% sure where the querying stuff happens, but Node is basically just a javascript runtime. There may be hooks for MongoDB in Express itself, or the logic might be in a MongoDB Node module that's technically separate.

And it doesn't have to be just CRUD calls sent to the server, you can make any types of requests/send any arbitrary message you want.
>>
>>59365862
same here. webdev is overwhelming as fuck, don't you think?
>>
>>59365862
React
>>
>>59365862
Vue
>>
>>59365862
If your sites don't need that much logic, hold off on a framework. Learn some of the quirks and usecases for different aspects of CSS, and practice both CSS and JS by implementing some different things.

If you do need a framework, I'm with the other anon on Angular, but I've heard good things about React as well, so it's really a toss up.
>>
>>59365979
Learn react, node.js, skip over angular eventough it makes a ton of money nobody knows whts going on since angular 4 is coming out,(were skipping 3) n jobs just put angular on req, when thy can either mean angular 1 or 2 (completely different)
>>
>>59365610
Its good for quick projects, its really powerful since it very easy to make ur site have tons on functionality like chat, friendslist, user auth, with mongo all this can be accomplish pretty fast
>>
>>59366088
You can accomplish this equally as fast with Postgres with an ORM
>>
>>59365862
React or Vue
>>
>>59365862
materialize
>>
>>59365610
But you're wrong. You clearly don't know the differences.
>>
>>59366314
Not that person, but you can use postgres with a JSONB column. What's the usecase for mongo?
>>
How many people here use django?
>>
>>59366445
the use case where a company's time is worth money
>>
>>59366445
When performance matters.
>>
>>59366445
>performing inefficient conversions and type checks at every turn just so you can feel good about your choice in hipster-stack
>>
>>59366482
>>59366514
>>59366482
>performance
>mongo
>shiggydiggy
Are you guys even trying? It's faster without even using indexes, lern2/sql

RethinkDB is better document store; Mongo just has a bigger bandwagon
>>
How do I use my JS constructor?
The array is scoped into the function and I need it global.
>>
>>59366789
>my js constructor
show your js constructor then, no one can read your mind here.

>The array is scoped into the function and I need it global.
put it into the window object.
>>
>>59366809
I don't get how this is supposed to work.
"Cannot read property 'postMe' of undefined"

function triviaObject(id, question, answers) {
this.id = id;
this.question = question;
this.answers = answers;
this.postMe = function() {
window.alert(this.id);
}
}

function getTriviaObjects() {
var token = Twitch.getToken;
var data = {
oauth: token,
};
$.getJSON("api.php", data, function (result) {


$.each( result, function() {
var id = this.id;
var question = this.question;
var answers = this.answers;
window.triviaObjects = new triviaObject(id, question, answers);
triviaObjects[id].postMe();
});



});
}
>>
>>59366953
You're setting window.triviaObjects to a new triviaObject, not adding it to the map.

You should:
1. Initialize window.triviaObjects = {} BEFORE the $.each
2. Assign it like window.triviaObjects[id] = new triviaObject(..,..,..)
3. Then you can do window.triviaObjects[id].PostMe()
>>
>>59367055
Works perfectly. Thanks.
>>
>>59366953
may I suggest you update your documentation or look at newer tutorials.
this shit's so outdated it would run in IE6.
>>
>>59367083
What's so outdated?
>>
hol up

what would someone use typescript when there is 'use strict' in js?
>>
>>59367159
using var instead of let, using jquery each instead of forEach, using fake classes instead of actual classes.

a lot of stuff you do here got a lot better and easier to do already.
>>
>>59367188
Is there a website that shows new standards in js? I originally learned this stuff 15 years ago.

It would be cool if there was a website where you post your code and it suggests changes like you just did.
>>
>>59367172
typescript yells at you at compile time for doing shit wrong instead of at runtime.
>>
>>59367188
wtf is let
>>
>>59367311
https://egghead.io/courses/learn-es6-ecmascript-2015
>>
>>59367384
block scope aware variables.
>>
>>59367384
>>59367414
var is just function scoped
>>
You should make it a habit to declare everything as const instead of let (const is also block scoped) unless you need to change its value after declaration (which is surprisingly not that common), it makes the code more readable
>>
I'm looking to create a user management system where users can sign in and purchase access to various plans on the website. Really not familiar with the paypal ipn, etc so is there already something like this that doesn't require me to rewrite the entire thing, or do I need to re-invent the wheel?
Thread posts: 314
Thread images: 19


[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.