[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: 331
Thread images: 32

File: 1488427793549.png (868KB, 822x552px) Image search: [Google]
1488427793549.png
868KB, 822x552px
>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
>>
why is wdg so fucking dead all the time
>>
>>59248196
Because web development is fucking awful
>>
The Discord invite seems to have expired.
>>
>>59248196
there's not much to talk really
>>
Hey, I have a memory test game, the user can add up to 6 grids and select
different cells in each of those grids, later they will be tested
(Is D3 on grid 2 highlighted).

In JS/JQ what is the best way to implement this, I have the grid highlighting
and adding/deleting grids part done, I just don't know what the most sensible
way to "Store" the info is to be passed on later.

https://jsfiddle.net/egae2wnr/20/
>>
How do we save webdevelopment
>>
>>59248196
because wdg isn't full of neets. we have jobs and shit to do on the week ends. come back tomorrow
>>
>>59249175
kek you replied to me and im a junior web dev with fuck all to do on the weekend but personal projects and imageboard shitposting. i thought people here were like me
>>
>>59249012
Just.......... use.............. React.............................
>>
>>59251020

How long does it take to learn though, I am going to have to overcome the same obstacles with react that I will with JS eventually won't I, React will just make some of the repetitive stuff faster and more manageable.
>>
File: 1488664539882.jpg (17KB, 399x276px) Image search: [Google]
1488664539882.jpg
17KB, 399x276px
>>59247917
>mfw after I learned javascript and networking/hacking , everything makes sense now.
>>
>>59251757
>How long does it take to learn though
If you're already reasonably familiar with JavaScript, you can do the official React tutorial in a couple hours (including tinkering around with stuff as you go, getting dependancies working, etc.). Redux and Webpack and all that will take more time, but the create-react-app utility takes care of all that for you. React itself is pretty easy.
>>
>>59249045
Replace CSS with something not as retarded
Ban ad platforms from using JS
>>
File: 722_1488742906486.jpg (241KB, 1080x1920px) Image search: [Google]
722_1488742906486.jpg
241KB, 1080x1920px
>>59253200
Also very easy to wrap your head around and makes complex projects very simple small steps.

Pic related, my new logo for my small agency, thoughts?
>>
Doing a website with a lot of videos (provided by YouTube) that will probably watched on smart phones.

It a simple MVC framework (like Django or Rails) enough here or is there a certain advantage if I make it with something like Vue or React and use Django or Rails as API only? I'm not really good with JS though..
>>
>>59254148
you should ask this in /gd/
i'm not sure logo quality for small shops is even relevant, most of them seem terrible to me but it doesn't prevent them from getting customers
>>
Updated and on website now
>>
Tell me anons
$a= new class() ;
a->func() ;

Or
$a= class::func() ;

And why
>>
>>59255198
first if the function is relevant to the object created
second if it's a general purpose function.
>>
How often are algorithms and data structures questions asked in front-end interviews? I don't know anything about those, or design patterns (design patterns mostly seem to be related to OO-programming).
>>
For real tho how to write css and don't have suicidal thoughts?
>>
>>59249045
Get rid of the shittiest language ever made known as javascript
>>
>>59254248
When will the js meme die?
You don't need a retarded front-end framework for 90% of shit on the web. Yes, Rails and Django are more than enough.
>>
File: croatiannativeman.jpg (116KB, 760x507px) Image search: [Google]
croatiannativeman.jpg
116KB, 760x507px
are some of you in Eastern Europe?

I live in Croatia and can't see myself doing webdev without a degree (even though there aren't real webdev schools here)

pls respond
>>
File: 1063178-bigthumbnail.jpg (47KB, 450x253px) Image search: [Google]
1063178-bigthumbnail.jpg
47KB, 450x253px
>>59247917
help me /g/ Im new to javascript or programming in general , i have a good background in python

should i learn web development or Machine Learning? Im not new to machine learning , i know basic neural nets etc,but I heard its a fad and u cant find jobs that require ML only research jobs (need PHD for those) , so should i pursue ML or learn about javascrip and its frameworks?
>>
>>59256798
>can't see myself doing webdev without a degree
why? just like make a few semi complex sites and show it to employers
>>
File: 1483420427501s.jpg (2KB, 125x101px) Image search: [Google]
1483420427501s.jpg
2KB, 125x101px
>>59256878
because this is eastern europe.

people with multiple degrees cannot find jobs.

I know I sound like a newfag, because I am a bit of a noob, but doing webdev for an employer in eastern europe seems impossible 2bh
>>
>>59257042
>eastern europe
profit off the fact that your country's currency is worth nothing when compared to usd. freelance for america if you really want to webdev.
>>
>>59256827
>not learning both

Why is 4chan filled with sub humans?
>>
BOOOOOOOOOOOOOOOOOOOOOOOOOOOONG
>>
I'm almost finished completing a book on vanilla javasript. The next book in the series is on Jquery. Should I bother reading it? I keep hearing that no one uses Jquery anymore. If not, what is a better library to learn?
>>
>>59257042

>>59257107
This. Americans are generally fine working with foreigners as long as they can understand your weird accent, and you can make higher wages without the higher living cost.
>>
File: readit.png (49KB, 228x184px) Image search: [Google]
readit.png
49KB, 228x184px
How do you guys structure your JS? I find myself switching from the revealing module pattern to a simpler object literal, specially when working on simpler sites that just need a few animations here and there.
>>
>>59257710

>I keep hearing that no one uses Jquery anymore.
Unfortunately that is still not true. There are newer, memeier options out there, but it's still pretty common. You should generally prefer to use vanilla js where possible and convenient, or at least use smaller, lightweight utilities if you're only going to do one thing e.g. to make an ajax request, just use fetch instead of importing the massive monolith that is jquery just to use $.ajax

>If not, what is a better library to learn?
You're almost always going to be better off mastering vanilla js over ${framework_of_the_week}, however some popular front-end options are Angular, React, and Vue. It would also probably be a good idea to dive into some backend stuff if you haven't already.
>>
>>59257916
>>59257710

It's worth pointing out that one of the most powerful parts of jQuery (in my opinion) is Sizzle, which is definitely worth using on its own. Here is my really simple way of implementing the selector (which returns an array):

var Æ’ = function(selector, context) {
var array = Sizzle(selector, context);
var el = (array.length === 1) ? array[0] : (array.length > 1) ? array : false;

return el;
};

//returns single result, if more, return array

//Æ’('.foo').className = 'bar';


Also, you can build leaner builds of jQuery containing just what you need from it: github com/jgallen23/jquery-builder
>>
>>59257042
I am from croatia and I earn $3k+ from webdev a month. Dont be a retard, learn typescript+js+react/inferno+ node +html/css and go on upwork/freelancer and lowbail first few jobs,after that you can start charging more or just go on google.de and pick a small town and write town + pizza in search, check those sites, contact them (call or email) tell them you'll build a site for them for $500 + 50 eur a month maintenance/ or 100 if you got good website portfolio.
>>
>>59256693
Use SCSS? Less? Stylus?
>>
>>59251762

what exactly do you mean by

> networking/hacking
>>
>>59256827
There are jobs if you know both lol.

Financial algorithm development requires a lot of machine learning as well as a couple common languages
>>
I'm getting my portfolio ready and it uses php and I'm setting it up on a digitial ocean vps


What's the ideal way to actually host multiple php/laravel apps on one site?
>>
File: logo.png (32KB, 800x600px) Image search: [Google]
logo.png
32KB, 800x600px
Should Lua replace JavaScript?

Please discuss.
>>
File: 1486869809126.jpg (196KB, 911x1301px) Image search: [Google]
1486869809126.jpg
196KB, 911x1301px
So I heard you can make a pretty decent living being a freelance webdev and by "decent" I mean at least double min wage. If I go full good will hunting and bust my ass studying can I start getting somewhere in let's say 3 months time?

pls I don't want to stock shelves anymore you guys.
>>
I learned it on /g/ but I forgot it all. How do you do an HTML include without using javascript or other janky non-HTML stuff?
>>
>>59264468
iframe?
>>
>>59262499
It can't, and no.
>>
>>59264604
It was like a javascript include but it doesn't need javascript.

It might have been
<!--#include virtual="footer.html" -->

but it doesn't seem to work locally.
>>
>>59259948
Not the same anon, but how do you find decent jobs on freelance sites?
Almost all of the ones I've seen either don't tell you anything, want you to do something shady, or something completely absurd...
>>
File: layout.png (358KB, 1392x884px) Image search: [Google]
layout.png
358KB, 1392x884px
Anyone got an idea how to solve this?

As I add overflow:auto, greenbox gets mangled.


I want to keep the formatting, but I want the autoscroll feature.
>>
>>59264863
It's much easier to help when you provide a jsfiddle link. Maybe I know how to fix it, but I'm too lazy to reinvent entire structure of your page.
>>
File: 1455388320252.gif (3MB, 627x617px) Image search: [Google]
1455388320252.gif
3MB, 627x617px
sorry for being an insufferable novice but

I have no experience with web development and I'm trying to make a website from scratch. Without any coding experience, I was using Dreamweaver for a bit but it's frustrating to use and clunky. I realize my best bet is to just learn to cote, but realistically how quickly could I pick it up and get to work on the actual website I want to create? What's the best course of action? I just want to know what are my options are here so any advice would be appreciated.

I want to make a website that looks something like Drudge Report just so I can post links.

Advice?
>>
I've been spending a few hours a day at Codecademy these past two weeks. Enjoying myself so far. My plan is to transition to freecodecamp eventually, I like the idea of basically doing work experience at a non profit.

Just wanted to say thanks for the resources in these generals and for shitposting enough to finally give me the motivation to start.
>>
>>59265183
Is it fun?
>>
>>59265155
Go to drudgereport.com and press f12
>>
>>59265187
Yeah it is pretty fun. Just put some headphones on and play some music without lyrics so you don't get distracted. My girlfriend was in the kitchen doing dishes and the noise was distracting me.

Also, if you can't figure out what you've fucked up you probably either need to reread the instructions or you didn't format one thing correctly.

It is really easy so don't stress.
>>
>>59257042
You need a degree to get accepted for working visa in USA.
>>
>>59265155
>make a website that looks like Drudge Report

Unless you're some sort of brutalist adherent or just plain incompetent, you could shit out something better looking than DR in about two day with enough experience. Getting to that point requires learning HTML, CSS, JS, and some backend language (Python,PHP,Ruby,Node.js) and for your purposes, it would probably take about a month or two of study to get to that point. Take the time to setup a virtual machine/vagrantbox so you can test on your computer and go nuts in your own little environment.
>>
>>59262499
NEVER!

Also, thread bump!
>>
>>59249398
I'm either visiting family/friends on the weekend or building projects or making youtube videos or streaming.

I'm starting to tackle a CMS like wordpress with the accessibility of squarespace.

Also trying to figure out how to monetize other projects. I need to learn the PayPal API...

Basically I'm only here because I'm in the bathtub before work.
>>
>>59256798
USA and got a web dev job without a degree or job experience.
>>
>>59261893
Apachr virtualhost. Digitalocean has a great articlr on how to do it. It's just config edits and took me maybe 20 minutes.
>>
Can anyone recommend me a beginner design book?
>>
File: unnamed (3).png (33KB, 300x300px) Image search: [Google]
unnamed (3).png
33KB, 300x300px
is wordpress /our guy/?
>>
>>59267501
for better or worse
>>
>>59263530
Give yourself about a year.
>>
>>59266071
>Take the time to setup a virtual machine/vagrantbox so you can test on your computer and go nuts in your own little environment.

I appreciate the comment, but what does this mean? I'm not familiar.
>>
Once you start using ES6's tagged template literals for non-trivial operations your code really starts looking like some ancient form of voodoo
>>
This is sort of an odd question, but does anyone have good resources for breaking up large projects into smaller tasks? It's a skill I'm finding is harder than I thought, and I'm needing it for a club at my university, we're developing a decent sized Node.JS/Express website.
>>
>>59268142
Sorry, what I mean is that setting up a virtual machine makes development a heck of a lot more controlled and easier, since it gives you a clean virtual computer on your computer to work in not tainted by what's on your main computer. While you can do dev directly on your computer, it's a lot easier once you get your feet wet to just set up something that hosts your website on the computer in its' own environment to make working on more complex applications more easier to manage.

It's probably a little while away assuming you know absolutely nothing about webdev, so just take your time and figure out how a web page is built before you jump off that pier.
>>
>>59268647
The more files a project is broken into, the easier it is for more people to work on the same project, but also the harder it is for noobies to understand what's going on
>>
File: ss+(2017-03-06+at+06.09.03).png (4KB, 435x28px) Image search: [Google]
ss+(2017-03-06+at+06.09.03).png
4KB, 435x28px
>currently looking for a student part time job
>find this
startup.meme
>>
How big a meme is WebAssembly?
>>
>>59269651

its still years and years away
>>
when doing requests with AJAX, is calling serialize() on my data enough to communicate with the server? or do i also need to do

xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");


and if I do need to use the above code, do i need to call it for every ajax request i call?
>>
>>59270772
serialize() on what?
XMLHttpRequest doesn't have a serialize method.

if your server requires POST data to be like that then yes, you need to do that every time you create a new XMLHttpRequest object.
>>
>>59271069

i thought both serialize() and the setRequestHeader code did the same thing (take the dta and properly encode it to work with a POST request).

So looks like i'll need to do both then. Which is weird because at least locally, it does the POST just fine without the setRequestHeader function....
>>
>>59271149
there's no serialize().

are you talking about jquery?
>>
>>59271167

yeah my bad, im doing my POST with jquery ajax function
>>
>>59271181
jquerys default content type is already 'application/x-www-form-urlencoded; charset=UTF-8', so you don't need to set that.

your code >>59270772 is for a normal XMLHttpRequest object without jquery. (Though it does work with jquery too, you're better off just setting it using the contentType property when creating the request).
>>
Kinda in the mood to learn hipster stuff like Angular, vue, react. I am familiar with closures and other shit from lisp. Should I just read js reference for starters?
>>
>>59271261

ok so i have the dataType as "text", what do i set the contentType to?
>>
>>59271360
dataType has nothing to do with the contentType.

dataType = type of what the server sends back
contentType = type of what you send to the server

so set it to whatever the server expects.
>>
>>59271397

if my POST requests just updates a record, i dont need to set the dataType then right? since im not having the server send anything back. So remove that and set contentType to "text"?

Also, if i am just using ajax (no jquery) for GET response, i need to setRequestHeader in that case, right?
>>
editComment(comment) {
let comments = this.state.data;
let currentIndex = comments.findIndex(item => {
return item._id == comment._id
});
comments.splice(currentIndex, 1, comment);
this.setState({
data: comments
//bgcolor: comment.color
});
document.body.style.backgroundColor = `rgba(${comment.color[0]}, ${comment.color[1]}, ${comment.color[2]}, ${comment.opacity})`;
document.body.style.transition = 'background-color 0.5s ease';
document.body.style.backgroundColor = 'white';
document.body.style.transition = 'none';
}


none of the css stuff at the bottom is firing off in my react app, am I doing anything obviously wrong? The idea is that whenever a comment is edited, the body background-color flashes the color of that comment (unique) and fade back to white after .5 seconds
>>
>>59271477
if you don't send anything meaningful back, then you don't need to set dataType.
If your server accepts text, then set contentType to text/plain.

setRequestHeader sets a header that gets sent to the server.
so if your server requires a specific header to be present, then set it.
If you do a GET request, then you don't need to set a content-type header, since it's for payload only.
>>
>>59271579

never heard the term payload before but thanks for the help anon
>>
>>59271600
the stuff you send to the server with POST requests
>>
File: 1465123843479.png (602KB, 963x720px) Image search: [Google]
1465123843479.png
602KB, 963x720px
Is Flask a meme framework?
>>
>>59247917
>thenewboston

>unironically recommending this piece of shit
>>
django or flask pls respond
>>
>>59271672

more lightweight than Django

i dont use Python tho so idk. If you're 1337 then you'll just use vanilla Python
>>
>>59271480
you put that rgba into a seperate string value to make sure output is correct

and you obviously tried it manually in chrome console, right?
>>
>>59271480

this is react? why even use it? looks like vanilla JS, so just use vanilla JS. If you know how to program you don't need meme frameworks.
>>
File: 1475540245256.jpg (72KB, 600x600px) Image search: [Google]
1475540245256.jpg
72KB, 600x600px
Is it worth it to migrate my session user authentication to jwt?
>>
File: topdis.png (22KB, 1091x405px) Image search: [Google]
topdis.png
22KB, 1091x405px
top rated, 60k+ earned

ama
>>
>tfw fell for one screen meme

wew lads live-reloading with sublime text on one screen
preview of site on the other screen
fast prototyping comfy as fuck
>>
>>59272430
how did you first learn javascript? did you do CS in college.? are you from USA or from a third world shithole?
>>
>>59272544
>using sublime text
>not using the superior webstorms
>>
>>59272569
age 16~
started doing web dev at age 10 though, making neopets bots and weird autistic shit.

Canada, no education past highschool, just read like 20~ books about web dev.
>>
>>59272569
I'm in the same situation. I'm American. Did info systems in college, started teaching myself JS in college. Hired as my first job out
>>
>>59271268
>Angular, vue, react
>hipster stuff
lel

But seriously, those are all JavaScript frameworks, so you should probably start by learning JavaScript. There are roughly a billion guides for that, check the OP for some resources.

>>59271701
depends on use case. Django if you wanna shit out a CRUD app e.g. Rails, but in Python. Flask if you want a lightweight microframework that lets you DIY your app and make it do things exactly how you want e.g. Express.
>>
brehs im using sublime and unfortunately im working with a database with crappy column names like "cust-po-#"

when i write my code to handle the data sublime takes the dash and hashtag and thinks its a comment. It then comments out the rest of the code. What the fuck do i do brehs. I really dont want to have to change text editors. Man i really loved sublime too....
>>
>>59272815
what are some true hipster things
>>
>>59273221
You probably haven't heard of them
>>
File: rekt.gif (410KB, 600x338px) Image search: [Google]
rekt.gif
410KB, 600x338px
>>59273312
>>
I'm a programmer but suck at design. How do I learn to make things look good?
>>
We use LAMP for our local testing.

Live runs LEMP.
>>
>>59273728
By imitating the designs of others that you like.
>>
>>59273728
You don't need to imo. I know no programmers who can design and no designers who can program. Some do both jobs at once.. but they should be based off of their work
>>
>>59273728
Do some tutorials on photoshop
>>
NODE,JS or PHP?

I'm a beginner but from what I've gathered if I learn node.js it will build on my Javascript knowledge, be easier and make me popular with women?
>>
I'm almost finished learning HTML/CSS - should I learn a framework instead of vanilla javascript?

If so, which one?
>>
>>59273921
yeah, it's fairly simple if you've never seen php.

Learn, really learn what get post update delete put do and use express and have fun
>>
>have amazing idea
>my work would be my first client.
>not a single fucking relrvant domain name


Time to add 'lr' to the end of it or make it 1337 speak.
>>
>>59273943
not the guy you responded to, complete noob - I have a question: If he learns node.js does that mean he'll struggle with wordpress?
>>
>>59273982
The two are nothing alike
>>
>>59273921

why not learn both? never limit yourself to 1 or 2 technologies

the more you know...
>>
Fuck whoever owns chrono.com

Waste of space.
>>
>>59274046
I know both,

Love node js after years of PHP,

only get work for PHP.

>>59273982
Nothing alike. I picked up wordpress to the point of being paid for my work in about 6 hours.
>>
>>59273921
depends on what you want. If it's women you're looking for, this is the wrong job
>>
So I know a guy who is a dev ops who doesn't know barely any code, he mostly manages servers at a corporation and makes $160,000 a year. He's in his mid thirties. How is this possible?
>>
>>59274157
I know a guy that went from making burritos to a sys admin job to then making 55 an hour doing server shit from home.
>>
>>59274157
wait for new tech to come out
learn everything about it instantly
congratulations you're now the top of your field, go charge 200$ an hour
>>
File: 1485889119752.gif (8KB, 645x773px) Image search: [Google]
1485889119752.gif
8KB, 645x773px
>he doesn't use asynchronous technologies
>>
File: web-audio-api-h1.jpg (37KB, 409x323px) Image search: [Google]
web-audio-api-h1.jpg
37KB, 409x323px
If I am building a website for a multimedia project that is requested to use incidental background music, what are the best formats to use?

I was thinking this:

Firefox, Chrome, Edge & Opera: Opus 96kbps VBR

Safari: HE-AAC 128kbps VBR
>>
how do i prevent people from changing the value of an input? im running an update query from a form and i bind some of that form data to a query. However if you edit the values or names in chrome dev tools then submit the form....well that newly changed data is now the data the query has. If someone changes the id number, they could overrwrite that record with that id number.

wat do?
>>
Should I use drupal, joomla, or django for a CMS for a website I'm making that is just going to have articles I write.
I only know HTML/CSS/vanilla javscript and I figure it would be better and quicker to just grind the rest of the way by making something.
>>
>>59274685
authenticate requests you nignog
>>
File: 1426596211887.jpg (41KB, 630x524px) Image search: [Google]
1426596211887.jpg
41KB, 630x524px
>>59247917
/g/ i love u

what the fuck is web assembly

will we ever see shit like wow played through the web browser
>>
>>59274459
Don't be an autist and just use mp3
>>
>>59274867
>MP3
>for low bitrate audio
>>
File: almostCryLAIN6.gif (438KB, 1164x1080px) Image search: [Google]
almostCryLAIN6.gif
438KB, 1164x1080px
>>59273964
i know this feel
>>
>>59274685
validate everything on the server
>>
>>59274270
>he un-ironically thinks shoving everything into 1 os thread makes things faster kuz MUH V8 MAKE GO FAST ASYNC PROGRAMMING
>>
>>59249175
but its your job to post here anon
>>
>>59275251
>he thinks multiple threads can write to disk at the same time
>>
I hate git so fucking much.
For something that is supposed to make development easier it sure busts your balls on a regular basis.

Anyone here use SVN or Mercurial?
Worth making the switch?
>>
>>59275957
oh yes because at the end of the day perf is io bound with nodejs since it's such a gay shit language.
>>
>>59276058
web servers in general are io bound
>>
>>59276034
I've used SVN, it worked well but I caught the git bug after a few months of struggling with it. Why dont you like it anon?
>>
>>59276115
perhaps for your shit tier 1 core vps, in which a toy webapp written in node would make sense. for anything that needs to scale the choice is obviously anything BUT js
>>
>>59276115
If all you're doing is serving static html, maybe
>>
>>59276034
What's wrong with git?

Use some systems to make it good. Git through command line sucks balls.

I push a button to commit to whatever branch.
>>
File: quality.png (126KB, 1280x948px) Image search: [Google]
quality.png
126KB, 1280x948px
>>59274915
>128kbps
>>
>>59276151
what do you do that's so cpu intensive and how long does it take per request?
>>
>>59276188
you should learn the command line anon its really powerful
>>
>>59276205
cryptography and digital signal processing
couldn't i offload it onto hardware? sure. Do i look like I am made of money? take a guess.
>>
>>59272430
What site is this?
>>
>>59276034
I still see no reason to use git if you are making something for yourself and don't care if anyone else sees your code.
"Version Control" my ass, nothing special about git, I can just copy paste past versions into a different folder which is a lot quicker than using git and you don't have to learn anything else.
>>
>>59276282
yeah what site is it senpai
>>
>>59276321
senpai plz
>>
>>59276282
looks like upwork
>>
>>59276132
I have a bunch of minor complaints about it that don't really negate Git's usefulness but they sure add up to an unpleasant user experience.
To me it's like vim, it can do fucking everything within it's domain but god help you if you're a novice.
>>
>>59276250
you just made that up. also you never answered how long it takes per request.
>>
>>59274747
>>59275108

ive never done this before what do you mean? what is the process and how is it done? pls anons
>>
>>59276605
if the data you update is user bound, make user authenticate and validate server side that requests from said user only affect his own data
to authenticate users you probably need some kind of login form and a session mechanism using cookies and whatnot
since security is a pain in the ass due to the amount of stuff to keep in mind, csrf, xss, password hashing best practices etc look into some security library to handle this for you in whatever you used to make your server
>>
>>59276841

ok ok ok i think i may have not explained myself correctly. Cuz i dont see how i would need a login form or anything complex like that. This is just a simple CRUD app im making for a company. You can filter through record in a database and one of the tables has a primary key called orderid and if you make changes to it you can save it. But what if before you save it, you open up chrome dev tools and add in "value="123" but that input actually had a different value. Now when you hit save button it thinks you want to save record 123. Know what i mean? Is there honestly no other way to prevent that from happening besides a login form or the other stuff you suggested?
>>
Feeling like a retard

Can someone direct me to a solid introduction to manipulating git and heroku from the windows command line? Like from setup to use. I'm fucking my life up trying to deploy a web app to heroku.
>>
>>59276578
> how long does it take per request
a god damn long time without multiple threads that's for sure
>>
>>59276980
why is that bad? do all users have the ability to access all data?
>>
Do you guys use Cloud9 at all or is it a SJW hipster faggot meme?
>>
>>59277007
ballpark it man. how long do your users wait before a request completes?
>>
>>59277027
everything in this entire thread is a hipster faggot meme
i.e. js monkey number 1262 here >>59277035
>>
>>59277021

well the thing is if this were to go live, then people could try overwriting existing records or create a record with an id of 10000000 or something

you know what i mean?
>>
>>59276222
I can do all that though. It's easier
>>
Launchcode fag here.

Started applying to jobs on my own a couple weeks ago. Have an interview coming up for a known local sweatshop. Not great pay and not great leadership but others who have worked there tell me I'd still get a ton of experience under my belt from taking the job.

Hopefully I get it. At this point I just want my foot in the door. The next job should come much easier once I actually have web development on my goddamn resume.
>>
>>59277114

full stack i hope?
>>
>>59277121
does full stack stop at HTTP or does it keep going down to layer 2 ? if it's the former then by god that has got to be the most easy programming job in existence, how does anyone manage to be a fuckup with that?
>>
>>59277121
Full stack. Focus on PHP and JS

There are a lot of local agencies reaching out to me on Slack, I've been going to Meetups and talking to people, but God damn if they don't want you to have either a CS degree or professional experience.

I think in about a year this is going to get a lot easier.
>>
>>59276980
your web page is like an interface to the server, you can interact with server using other tools to generate http requests so because there're only a few http requests acessible from your ui's buttons doesn't mean people can't just send other requests as well
if the fact that anyone having access to the server can overwrite random data is a problem to you then you probably need some authentication
a super cheap way of doing it could be to use your http server's authentication mechanism, i know there's a setting somewhere in apache to do this
otherwise you also can make your ajax requests use http authentication like so
xhr.open(method, url, async, username, password)
>>
>>59277228

nobody using the app will do anything like what im talking about, no

BUT if this were to be open to the public, people could definitely fuck with it...
>>
>>59277197

same. PHP and JS is all im doing. No frameworks either. Been doing custom applications for awhile

good luck breh make sure to read the latest docs for updates. PHP is known for having shitty old code out there
>>
>>59277272
if the app is only on the company's lan or something i guess you probably don't need to care unless it was specified that they wanted authentication
>>
I have a photo archive with 5000 images

What would be the best way to display them?
>>
>>59277366

all of them at the same time...?

do a for loop that reads the directory and spits out the file name in img tags
>>
How do I trigger a css animation on the body where the background-color quickly fades from a provided color back to white?
>>
>>59277062
>users are not allowed to overwite existing records
dont allow this server side
>users are not allowed to generate their own ids
generate the ids server side
>>
>>59277114
>At this point I just want my foot in the door.
I feel ya. I'm the other launchcode anon. I would have taken minimum wage to get some experience on my resume. Good luck on your interview!
>>
>>59277366
>>59277386
if you show them on the same page only load them a few at a time using paginated requests to not cause lag
also make sure to sort them into categories, eventually tag them so you can search for photos by category or tags
>>
>>59277161
This dude at my company couldn't find the nginx folder and hes been there for years.

It's what happens when you land a job that you don't care enough about to learn.
>>
Gonna make a web store for my portfolio - is there a stack for node that handles the basics? user accounts, payment processing, etc
>>
>>59277387

https://jsfiddle.net/d8h3cmqs/
>>
>>59277403
Thanks anon. Seems launchcode has taken on more candidates than they can place by a wide margin. Wish I'd started with them back in 2015.
>>
>>59277436
danke
>>
File: racistfrog.jpg (47KB, 800x522px) Image search: [Google]
racistfrog.jpg
47KB, 800x522px
>>59247917
Does anyone know why my JavaScript doesn't get any errors but still doesn't run?

I tried moving stuff out of document.onload and even tried window.onload but I'm still getting nothing besides the occasional "Cannot set property 'onclick' of null" if I move everything out of the window.onload() function.
>>
>>59277539
Nvm figured it out, I have my script linked within my <head></head>
>>
>>59277539
What happened? Did you try to access a dom element not yet available when the script was executed?
I'm asking you this so you know what's going on.
>>
>>59277645
Yeah, the onclick couldn't run because the button button wasn't available for the script.
>>
>>59257891
i use es6 or typescript modules with webpack
>>
>>59278345

not him but i use raw javascript. Why is typescript better?
>>
>>59262499
not much point, it's too similar
>>
>>59264863
use floats or flexbox
>>
>>59268588
worst feature. we banned it at my work
>>
>>59262499

no

much slower
>>
>>59278355
es6 is for better variable scoping and oop
>>
I don't get OOP in web dev. To me it seems like those data structures should be the database stuff.

class Person {string firstName; string lastName;}


why would I need something like this when I have a database with a person table that resembles that code? After you read it from the database and encode to JSON, you have your object ready to go.
>>
>>59278355
For type safety which in addition to making your code self-commenting also allows for IDEs to give much better suggestions than the "here is a list of anything you've ever typed after a dot, is it one of these?" that you usually get with Javascript.

That being said it can be a bit of a pain figuring out exactly how Typescript wants you to syntax your types when you're doing some of the more dynamic type capabilities of Javascript or when looking to access non-standard features (then again, when all else false, you can cast something to any and use it the same way you could in Javascript).
>>
>>59278355
more expressive, helps refactoring, catches more bugs at compile time, good ide support (intellisense). also it's a superset of js, so all js is valid ts. easy to pick up
>>
>>59264468
>>59264604
>>59264698
HTML5 or iframe. Otherwise you're going to use JS or a backend language OR you could use Liquid templating, etc. and you're compiled site technically wouldn't be using a back end language
>>
>>59278440
Why stop with web dev? The same could be said for any programming domain in any moderately dynamic language.. Once your Python backend pulls a dict of dicts out of the database, why make an object out of it?
>>
>>59278500

lol exactly what im trying to say

i dont get it. Seriously what the FUCK is the point of OOP? How do I even apply it?
>>
>>59278522
you have do DO things with the data, right?
>>
>>59278522
OOP is just a style people lean on because it offers them a familiar approach when using new libraries etc. Just creates a standard which makes things easier for some people, similar to coding your shit to return promises
>>
>>59278466
What's the HTML5 way?
>>
>>59278534

well yeah.

lets forget the obvious solution which is to just encode it to JSON for the sake of my argument. How would I even assign these classes to my database tables to reflect the data? This has gotta be a super old way of doing things....
>>
>>59278440
>>59278522
Just like structs is just linking numerous different data together, all objects are is going one step further and associating a group of functions with that data as well (functions that only make sense when they are acting in the context of that data).

What you're complaining about isn't OOP, but redundant encapsulation (which can be done for structs just as shitily as with objects). In which case why are you encapsulating redundantly? If JSON is giving you an object why not just use that object? And if you want to extend functionality of that object why not extend the class rather than encapsulating it in a new one?
>>
>>59278623

youre right about OOP being innocent here, my bad. Point still stands. It really is redundant extra steps you don't even need. Fuck man people still do this shit?
>>
>>59278605
Now it sounds like you're asking an API question (how do I convert in-program data to a form that the Database table can understand). If you don't like migrating classes into API calls requires too much manual labor then you'd HATE the way C deals with this kind of stuff. Converting logical data from one format (logical constructions of code in memory) to another (database entries) is a non-trivial task.
>>
>>59278605
>>59278675

Sometimes you aren't the only programmer, and redundancy isn't as dire as you think. Abstraction can make things simpler for others. OOP helps create a system.
>>
>>59256790
>implying a scripting language and a frameworn can replace a front end language... NO!

You know your shitty Django framework is copy pastaing JS for you?
>>
>>59265155

>Drudge Report
out of all the sites in the world. why would you want to have it like that? Aspire better, pls. There are a far lot more better sites than that.
>>
>>59269545

>student
>part time job
>need at least 9 skills.
this is why its fucking hard to get into the industry. you need a fuckton of languages to be good at just to do something so simple.
>>
what else is a js stack besides react

i need a couple pages static but i want to use react for most of it (a customer interface with a bunch of stuff and flow). Is that going to be horrible?

what orm?
>>
Am i making a huge mistake using raw sql commands instead of an orm?
>>
If I learn a framework for javascript but not vanilla javascript will node.js be too hard for me?
>>
A job might say they want a thousand languages but it's not really like that.

At a senior-level or mid-level where you're making giant features and rewriting everything? Yeah, sure, but at a low level where all you are doing is fixing bugs then all you need is the base language.

That job with all the meme javascript will settle for a javascript newbie eventually because no one knows their specific stack. Even if you knew it perfectly they would probably miss your app anyways because you're resume is in a trash pile of mcdonald's employees that can't program trying to do something with their lives.

The trick here is to mass apply to places that use your base language.

If you're a javascript vanilla dev and you're thrown in a MEAN environment as a JOB you would learn the stack very very fast because you're immersed in it.

Finding a job in this field is broken. People who would be good candidates are never found. I'm working on it.
>>
>>59280982
no.
Just remember to sanitize inputs.
>>
File: meeveryfuckingday.jpg (42KB, 780x780px) Image search: [Google]
meeveryfuckingday.jpg
42KB, 780x780px
>>59282241
>mfw plan on moving across the country to have a better chance at finding a job
>mfw wanna try to land a phone interview before I even move so I wouldn't have to stress
>mfw nervous I'll fail
>>
>>59281969
learning node will be an ordeal regardless
>>
>IE8 uses a version of ECMAScript from 1978
>scripts that do not escape keywords such as "default" or "catch" are considered invalid and won't run
>babel plugins that are supposed to fix these issues are not fixing these issues
Well fuck
>>
>>59282387
It can still take forever to find a job in a good area. Im in a hotspot for dev jobs and it took me a year and a half.
>>
>>59278440
The only reason I've really come across to keep class definitions in JS is when you're working with a large project with many people. The dev who updates the model knows everywhere they need to update the person before checking it in without needing to search the project. Likewise when the next dev comes along to create a new person object, they're forced to make it uniform with the new model.

But at the same time I work on a 150+ page app and we only use the same model 3 times max. Updating 3 areas is easy, and you can just search for the specific api call made throughout the app ("saveUser"). We use TS in our project and we all (4) agree it only gets in the way with its wanting to create classes
>>
>>59282387
why are you afraid to fail? what would happen if you wouldnt land a dev job in the first year?
>>
What does 'full stack' mean? Does it mean Client/Server/Middleware/MessageBus/Database/OS/Virtualisation/DevOps, including release management?
>>
>>59282705
Nothing really, I'm a retail cuck and I plan on transferring to a location in the new area as a means of income. But I just hate my job and financially/experience wise it'd be nice to finally get into web dev as a career.

>the location I'm moving to is Seattle btw, so already really competitive as it is.
>>
>>59282779
>Front End: HTML/CSS/JavaScript
>Back End: Server side languages and databases(php/sql stuff/C#/etc..)
>>
>>59269545
>>59279769

Are you fucking retarded, let me tell yo how to deal with this:

1) Assume you have done something with one or two of them, else why would you want to apply to that student job?

2) Do a mini project with two or three that you dont know anything about. Should take about a weekend, maybe two (20-40 hours).

3) Do tutorials for every skill you are still missing, putting in 4 hours per skill. Read about them 4 hours each.

4) Apply for job, tell them you know (YOUR CORE SKILLS), you have done something in (WEEKEND PROJECT SKILLS), and you have done some tutorials in (TUTORIAL SKILLS) to prepare for this job.

9 skills. Time invested: 70 hours max. Chance to get that job: high.
Outcome for next job with 9 skills required: You have good chances to have had contact with more than half of them.

This is fucking easy.
>>
>>59282808
DFW is also good and not as competitive yet.

You can find these areas by looking for where codecamps are opening new schools.
>>
>>59276366
whats upwork? HAHAHAHAHAHAHA
>>
>>59282779
full stack means you work with everything. From the UI (user interface (things you click on and type in, view), to the logic behind that (javascript), to the APIs the javascript interfaces with (the back-end), to the database the back-end interfaces with. That's the full stack. All of those other words are just fancy words for "everything". Most are meme/buzz words the industry is throwing around. I would avoid a company with that as their job description, they don't know what they're doing
>>
>>59282972
Austin, TX reporting in. Don't move here, we're full! I'd move back to Dallas if my gf would go with me. That place is based, especially for jobs
>>
>>59283009
Ok thank you.
That means 'full stack developers' can only work in tiny projects, as it would be impossible to do full stack work in a project of decent size.
And that means, 'full stack developers' are the devs that earn the least money, and have the most shitty workhours and/or benefits.
I always thought 'full stack developer' sounds like someone who is high up on the paychain, but its funny to realize it is the other way around.
'Full stack developer' is a retarded marketing word to sound cool, but in fact describes a person that is good with computers and IT and has no unreplacable or hard-to-find skills whatsoever, and is fine with being worked to death.

Did I get that right?
>>
>>59283152
Not entirely imo. Full stack can mean you work on projects of any size. It can mean they want someone senior who understands how a stack all fits together (to manage architecture and high level decisions), but it can also just describe the nature of the work. For example if your job is just to smash bugs all day, I'd expect you to be working the whole stack looking for the issue. It's pretty evenly split between when they're describing the nature of the work and when they're wanting someone with a broader range of skills (more senior) when they say they want someone who's, "full stack". You'll just have to read between the lines
>>
>>59283152
> did I get that right?

Uh not really but I guess that makes sense because you went from not even knowing what it means to knowing everything about it. Yes sometimes full stack means you're ok at everything and good at nothing, but not always. JS is all over the stack these days so if you're good at that and don't suck at UX you're already more valuable that some neck beard that knows how to generate markup in C#. I know a shit of full stack devs that make over 100k in shitty areas. Also why would they work more hours? Also you realize most mobile developers are full stack right? Pretty valuable skill
>>
Does anyone know if the CSS calc() function can be used to get the height of separate divs and create a dynamic padding or margin?

like
#child-div {
margin-top:calc((#parent-div's height <= #child-div's height) ? 0 : ((#parent-div's height - #child-div's height) / 5));
}

or something like that?

Basically, I want the Margin to be dynamic based on the difference between the height of the Parent and Child divs.
>>
>>59283152
just got offered 95k usd yearly in dubai with relocation costs covered.

no income tax in dubai.

t. full stack developer
>>
>>59283688
shieeet
do you speak arabic ?
>>
>>59283636
Actually, I just set the Parent Div to display:flex and gave it align-items:center

But, is there a way to do the same with Calc? or a way that doesn't require Flex, if I wanted it to work on older browsers?
>>
>>59283722
no but the startup speaks english
they're hiring globally right now

the test was easy af and they made an offer 48 hours later.

take this json, make a carousel like bootstrap from vanilla js, use es6 if possible.
>>
>>59283688
what is cost of living there though? I imagine high
>>
>>59283772
Yeah it's going to be pricy, doubt I'll take it desu.

but looks like an amazing city, shiiit.
>>
I once wrote a page that went down pretty quickly because of too much traffic. I want to avoid that problem in the future.

I usually use the common LAMP stack on a single server. What do I need to make my website automatically scale with traffic? I don't want to throw out money for a big server that I don't need, but I also don't want my websites going down.
>>
File: 2720178213.jpg (210KB, 960x720px) Image search: [Google]
2720178213.jpg
210KB, 960x720px
Work got me a new keyboard.

Just bought another for home.

MX browns are nicer than I thought they would be.
>>
>>59283755
you're a lucky faggot, enjoy your arabian nights
soon you'll be drowning in oil and sandy puss puss
>>
>>59283819
RIP your coworker's ears
>>
>>59283822
not going to take it.
I like Canada and rather run my own company
>>
>>59283793
host on vps, have some way of getting traffic info on your server
when traffic to high, clone vm, get another vps with same application only the db stays in one vps and you setup a load balancer in first vps
if you have too much free time you can automate this process, most big hosting services have apis to automatically host new vms

wtf did you host that it went down because of traffic ? also any idea on how much it took to bring it down ?
>>
>>59283793
Severalac atom servers with a nginx load balancer.

Also, what page did you write that received so much attention which brought it down? A c2d can handle 1000+ requests per second
>>
>>59283927
Hosted at nearlyfreespeech.net

>>59283985
Reddit hug of death from /r/internetisbeautiful

It was a proxy that was pretty intensive on resources (wrote it in a few nights with pretty hacky code), also cached a million things.
>>
>>59284112
reddit ruins everything, again
>>
>>59272544
not using superior VS code.
>>
>can't make it to a meeting with a client that will be used to gather requisites for a new web/mobile app
>marketing/business guy decides to go alone instead of rescheduling
>comes back with a document that makes absolutely no sense in any way, shape or form
>unclear what the client wants and no idea how they want it done
>"lol no prob, I'm sure we'll come up with something as we work on it"
How do people deal with the marketing people, aside from constantly suppressing their murderous rage?
>>
>>59285043
Gotta get all the bricks in the wall. It's your responsibility to reschedule the meeting when you're missing key players. If not for the sole reason of this waste of time happening
>>
How do you guys test if you site display properly on different browsers? Is going on manually through each one is the only way?
>>
>>59285182

chrome dev tools
>>
>>59282808

dont come to seattle, everyone is already coming here we dont need more globalist hacks like you who thinks the more the merrier
>>
>>59285263
How does this help me with ie10 for example?
>>
>>59285292

honestly i wouldnt even worry about IE or FF. Both are at 10% share. They're done.
>>
>>59285305
I have to test it cause they tell me so at work.
>>
>>59285324

tell them IE and Edge or whatever the fuck its called is at 10% share. Nobody cares about IE anymore. It's old and it sucks. Edge is borderline the same thing, just a slightly better UI. If they still don't understand then get them to pay for BrowserStack so you can test in every device and browser possible
>>
>>59285305
if you only test on Chrome you only get 50% of the total market. The tail is long

https://en.wikipedia.org/wiki/Usage_share_of_web_browsers#/media/File:Browser_usage_share,_2009%E2%80%932016,_StatCounter.svg
>>
>>59283749
javascript mabe? i did not know css had math capabilities. thats a game changer.
>>
>>59285043
its your fault bro.
>>
>>59283152
Full stack knowledge lets you contract, start your own company, or manage web dev teams. All of which pay well.
>>
>>59283793
what was the bottleneck? db or application instance? either way, you'll probably want to look into scaling horizontally. but you might be ok just rewriting in go or getting a bigger instance
>>
>>59284524
o nigga what is mine
>>
>>59285353
listen to this guy
>>
>>59285623

if youre app completely fails on x browser then you really fucked up. If theres small differences which theyre probably is, then theres really nothing you can do about it. I remember back in the day i couldnt get everything in IE7 to match exactly in FF when FF was the cool new thing. Man have things changed
>>
>>59285353
issue with ie and old browsers in general is not the user market share but the fact that some companies still use them to maintain compatibility with whatever old as fuck internal tools and plugins they use
this means you have to support shit browsers when making stuff for said companies
>>
how do i call a function in scripts.js in my document ready function? it says its undefined, but im using other functions from it?
>>
>>59251757
You just need to learn these little things:

react
react-dom
react-router
redux
redux-forms
redux-middleware
redux-thunk
isomorphic-fetch
immutablejs

You probably also want to use webpack to minify and eliminate dead code to reduce your 12MB javascript junk down to 500kb. On top of that you should also use babel for ES6 transpiling.

I haven't tried it yet but couchdb appears to be good enough most webapps. You only need an application server to create users/databases though. Unfortunately it only has database wide read permissions so you create one database per user and one database for each shared resource (e.g. git repositories, chat channels, a chessboard, something like that) and then add users to that. Writes have to be validated by a custom javascript function which allows data dependent permissions (e.g. player black can only move black pieces on a chess board). For a react app I would suggest you to access couchdb via pouchdb which allows your app to be used offline.
>>
>>59256790
>writing application servers that generate the UI in 2017
>>
>>59286520
What's wrong with that approach? I still have a hard time wrapping my mind around modern js things. Can you explain really simply the purpose of react, vue, express, ember? Why are there so many?
>>
>>59256693
don't write it... bootstrap it. It's the only reason I haven't kms'd
>>
>>59271765
No because you still need to implement token revocation with JWT.
>>
>>59286568
they mostly are mvc frameworks so people can have common ground while working on big projects
but you can easily not use server side templating, make pages with vanilla javascript and be fine
>>
File: 1488819440954.jpg (600KB, 1869x1295px) Image search: [Google]
1488819440954.jpg
600KB, 1869x1295px
Learning PHP.
Is PHPUnit the best unit test framework ?
Trying small projects, like a CRUD/Tic Tac Toe app, any suggestions?
>>
>>59283859
The thing isn't that crazy. It uses brown switches. They wouldn't let us get red because of the noise.
>>
This might be a commonly asked question here (new to /wdg/) but what is the current state of Ruby/Rails. When I do a search on things like indeed it doesn't seem like there are too many entry level positions here in the states.

I dunno what language to go with.
>>
how do you apply a random string to the end of a .js file include? i have the string but i dont know how to append it. First I tried

<script src='"script.js" + str'></script>


didnt work. Halp
>>
Has anyone ever gotten a fucking interview off of indeed? I have more luck doing pretty much anything else.
>>
>>59288928
var name = "script.js";
var retard = "string";
var result = name + retard;
>>
>>59288928
Create a <script> node programmatically, set its src property to whatever and then append it to either the head or the body of the document
>>
>>59288960

yea but how do i append that variable to the script tag and have it still load the script?

>>59288971

yea i tried that but ill try again...
>>
>>59288928
Why would you do that? Cache defeat?
Just do ember build --environment=production and it'll fingerprint all your assets.
>using anything other than Ember for front-end development in 2017
>>
File: mesosad.jpg (82KB, 944x712px) Image search: [Google]
mesosad.jpg
82KB, 944x712px
>>59285284
But..I want a decent job and a career anon-kun...
>>
>>59289093
I find working in ember pretty comfy.
No need to deal with all the webpack nonsense., plays nice with rails. I like it.
>>
>>59247917
hi guys i wrote this code on pic related. humble me with your infinite Knowledge. This code creates bootstrap columns when i enter the path to a image/the name of the tag/and the alt. I finished and im feeling like a hacker, i know it does not feel right. How can this be better?
>>
File: halpJs.jpg (42KB, 635x367px) Image search: [Google]
halpJs.jpg
42KB, 635x367px
>>59289277
forgot the pic
>>
>>59289093

yes

too late to go back and re do the project in ember. I still cant get it to work. If I try to append the script element to the head section it seems as if it already read through the head section so by the time it gets put there it doesnt go back and re read it again so load the .js file in the src attribute
>>
>>59289303
>innerHtml
>>
>>59289377
explain to me why is it not good.
>>
>>59289373
maybe try messing with http cache headers for this specific file, server side
>>
>>59288928

<script>
(function(){
var s = document.createElement( 'script' );
var src = `killme.js${str}`;
s.setAttribute( 'src', src );
document.body.appendChild( s );
})();
</script>
>>
>>59289530
<script>
(function(){
var s = document.createElement( 'script' );
var src = `killme.js${str}`; //'killme.js'+str;
s.setAttribute( 'src', src );
document.body.appendChild( s );
})();
</script>
>>
>>59289303
>mixing K&R and 1TBS
DELET
>>
>>59289481
>>59289530

i got it brehs. First i tried with getElementByTagName and that didnt work. Idk why? So i gave the head an id and it worked. Weird. Also i heard the setAttribute methods are kinda old and not to use them anymore. What do you guys think of this? i load this first thing in my head tags works perfect.

var strId = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var jsFile = "js.js?";

for (var i = 0; i < 12; i++)
strId += possible.charAt(Math.floor(Math.random() * possible.length));

var complete = jsFile.concat(strId);
var head = document.getElementById("head");
var scriptTag = document.createElement("script");
scriptTag.type = "text/javascript";
scriptTag.src = complete;
head.appendChild(scriptTag);
>>
>>59289782
Any particular reason why you're going through all the trouble of generating a random string?
Are you trying to force a cache bypass? In that case you can just use Date.now()
>>
>>59289815

yea i am. And I never thought of that. Cool thanks
>>
>>59289782
Just add Date.now() as a string, no need for the random stuff. Or new Date().getTime() if you need IE8.

I prefer setAttribute, desu.
>>
Why is my website retarded on internet explorer? My header covers my content and the colours are not right. The website works fine on every other browser including edge.
>>
>>59289399

theres nothing wrong with it, hes just a framework babby
>>
>>59289972
>DOM is a framework.
>>
>>59278418

Don't say it until you benchmark it.
>>
>>59289963
Did you use anything in the ES6 stack? Forgot an -ms- prefix? Have fun.
>>
>>59290095
%s/stack/spec
>>
is this world ready for

<!--[if lt IE 11]>
<p> ye mind fecking of mate </p>
<![endif]-->
>>
>>59290136
ye, even normies don't use shit browsers anymore
i don't even bother supporting anything else than chrome chrome and firefox
>>
>>59290095
I didn't use any of that. It's just CSS and HTML, super simple. I don't understand how all browsers interpret my page well and this piece of shit sees a completely different thing.
>>
>app works on IE11
>add some babel plugins so the app kind-of-works on IE8
>app stops working on IE11 when the plugins are enabled
I swear to god they're doing this on purpose
>>
>>59290136
IE10 and above do not support conditional comments anymore.
>>
Can Angular do what Express does?
>>
>>59290365
Seeing as they do two completely different things, I'd say no
>>
>>59289963
InternetExplorer is the problem. Don't support it unless you like writing horrific code.
>>
>>59290524
It's an university assignment. I hope IE will die within 2 years time. Help microsoft shill Edge and get people to ditch IE.
>>
File: 1481244990406.jpg (84KB, 569x592px) Image search: [Google]
1481244990406.jpg
84KB, 569x592px
If I'm not using a CMS like wordpress and the website owner doesn't want to get into the code to add new products or services, should I just integrate sort of like a Dashboard with CRUD operations that only his account can have access to? Or is there a better/safer way to do something like that? I've never touched a CMS but as far as I know, that's how they do it right?
>>
>>59290625

and this my friends is why the country is failing and education is borderline useless.

universities are still teaching and caring for IE.

it's unbelievable, folks.
>>
>>59290670

The education system as a whole sucks ass for sure. I wouldn't spend 1 dime on any institution that has you dev on IE. Dedicated code schools are better but still not worth the price. Younger people just need to buy some fucking books and use the internet to learn CS.
>>
>>59290670
We are actually developing with Chrome/Firefox/Safari/Edge in mind but we have to also support IE sadly. I never even use IE but I still need to make it work.
>>
>>59290669
That's what I do. Just make a form with authentication.
>>
Is dreamweaver worth it? Lots of jobs require experience with it here
>>
should adding a new record in a db table be post or get?
>>
>>59291441
post, 100%
>>
>>59291438
no
it's a red flag
>>
>>59291438
Dreamweaver is a meme, human resources guy most likely put it as a requirement because he doesn't know shit. That application is just bloated garbage.
>>
>>59291438

dreamweaver, wordpress, wix, etc are the best

das reel web dev, yo
>>
>>59288930
Once, yeah.
>>
In traffic. Will make new thread when home.
>>
I'm making my portfolio page right now.
Any tips for making it actually look good?
My attempts at design are pretty horrific.
>>
>>59292101
pick colors from a colorwheel site, keep everything lean and simple, don't pick shit font
>>
>>59292260
NEW THREAD
>>59292260
NEW THREAD
Thread posts: 331
Thread images: 32


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