[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Death to PHP edition Previous thread >>54525416 >
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 36
File: wdg.png (979 KB, 824x553) Image search: [Google]
wdg.png
979 KB, 824x553
Death to PHP edition

Previous thread >>54525416

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

> Discord
https://discord.gg/0qLTzz5potDFXfdT

>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/
https://youtu.be/JxAXlJEmNMg?list=PL7664379246A246CB [Embed] - "Crockford on JavaScript" lecture series.

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

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
https://gist.github.com/dypsilon/5819528/

>Useful tools
https://pastebin.com/q5nB1Npt/
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/

>How to get started
https://youtu.be/pB0WvcxTbCA [Embed] - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
https://youtu.be/zf_cb_Nw5zY [Embed] - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.

>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
>>
File: 1425259319492s.jpg (3 KB, 125x120) Image search: [Google]
1425259319492s.jpg
3 KB, 125x120
>>54559081
>[Embed][Embed]
good job pajeet
>>
I'm building a blog site in order to learn express.js and jade, but I need some blog appropriate JSON data, the type that I could format easily into a list of clickable "posts".

Does anyone know of any online APIs that would suit my needs for this?
>>
Fuck me... Why is Angular 2 so complicated in comparison with Angular 1? I learned basics of Ang1 a few days ago but I can't comprehend this one. You have to import SHITLOAD of modules, everything is so spaghetti. I actually liked the first one when I began to understand it. What the fuck is this???

Is it bad if I only know Angular 1? Why is it "shit" like people say?

It sucks that companies need you to learn new frameworks constantly. I hate all of this spaghetti shit. I fucking hate web industry and I haven't even seen a day of work.
>>
How long to learn git?
>>
>>54559279
10 minutes should do
>>
File: CbuVMZZW8AACxe6.jpg (25 KB, 325x485) Image search: [Google]
CbuVMZZW8AACxe6.jpg
25 KB, 325x485
>>54559198
no angular 2 is just trash, its basically it's own ISA now(angular 1 being an operating system level of cluster fuckery), there's no way off this rape train except to jump, i suggest vue.js until that eventually goes to shit as well.
>>
>>54559385
what about react.js??
>>
>half of js libraries ending with .js
Stop this. I don't see this happen in any other language
>>
>>54559414
DUDE
>>
>>54559479
WHAT?? I'm using it and it works well? Come on, give me a bullshit argument to ditch it
>>
File: javascript-for-millennials.png (172 KB, 515x656) Image search: [Google]
javascript-for-millennials.png
172 KB, 515x656
>>54559495
i don't know shit about react so have an orielly instead
>>
>>54559471
json.net, asp.net, log4net, xunit.net, aforge.net, quartz.net, facebook.net, dotnetzip
sharpziplib, postsharp, pdfsharp, itextsharp
>>
>try to use pic related
>get the understanding of it, made quick easy things in one long index.html
"this isn't maintainable, better work on the modularisation"
>just use webpack!
>random errors
>no no you need webpack-vue-loader!
>can't install
>just follow this tutorial it'll show you how to set it up
>babel-runtime doesn't meet dependencies at install ( following the tut )
>we have a new tool to make it simple! vue-cli
>throws an error when init new project

Fuck i hate "webdev" - gentoo is literally easier than this shit.
>>
File: logo.png (11 KB, 400x400) Image search: [Google]
logo.png
11 KB, 400x400
>>54559623
forgot pic
>>
>>54559623
Can confirm webpack is an utter bitch to set up properly
>>
Why is PHP bad?
>>
>>54559735
because microsoft pajeets who push asp.net say so
>>
The problem is that you NEED to know all of this crap to get a job/internship.

I have a harder time learning this than anything else. There is so much shit going on and I hate all the imports and modules the most. I'm so... So lost...

What to even pick? Angular? React?
Node? What framework for node? Rails? Django?
Typescript? Ecmascript? Jade? Sass? Backbone? Underscore? Moustache? Coffeescript? Cappuccino? Versace? Mozzarella? Babel? Moses? Jesus? SCSS? Spring? Groovy? Grails? Grunt? Gulp? Burp? Fart? Kys? Djimsa? Flask? Laravel? Symphony? Padrino? Hanami? Picasso? Brackets? Sublime? Websocket? Webstorm? Wordpress? Joomla? Orchard? Ghost? Drupal? Sharepoint? .NET? Beard? Butts? Houdini? DiCaprio? Sinatra???
>>
>>54559623
just don't use crap like webpack
>>
>>54559189
try http://jsonplaceholder.typicode.com/

Or just set up your own with json-server and some lorem ipsum copypasta
>>
>>54560026

>The problem is that you NEED to know all of this crap to get a job/internship.

You don't need to know it all. You need to have a general idea what most of it is and be able to learn whatever the company uses reasonably quickly. The only stuff you NEED to know for web dev is HTML, CSS, vanilla JavaScript, and common design patterns. The rest is just gravy on top.
>>
File: 1462585294744.jpg (172 KB, 1024x1344) Image search: [Google]
1462585294744.jpg
172 KB, 1024x1344
>>54559198
Just learn Ember, m8. Super powerful out of the box, core team dedicated to not breaking things, not run by a big company, and a lot of jobs needing it.

Oh, and it's also really well documented and fun as fuck to write.
>>
>>54559189
try writing a scraper that gets blog posts from an actual blog. or, you know, just put some dummy data in your database by hand
>>
>>54560026

>What to even pick? Angular? React?
Angular is kind of a one-size-fits-all frontend js framework. You can make it do pretty much whatever you need it to do, but it's kind of clunky and also does a bunch of stuff you don't need it to do. React does UI/view stuff.

>Node? What framework for node? Rails? Django?
Node is a javascript runtime environment. If you want to use javascript anywhere other than on a browser, you need to use node. Rails and Django are backend web frameworks for Ruby and Python, respectively. They don't have anything to do with node, other than doing something similar.

>Typescript?
JavaScript except with syntactic support for static typing and classes and stuff. Actually breddy gud if you're doing a lot of OOP stuff and/or want your js to look more like java.

>Ecmascript?
"Official" name for standard javascript.

>Jade?
Now called Pug due to a lawsuit or something. Alternate syntax for web pages that compiles to html. Good for templating and such.

>Sass?
Like jade/pug for CSS. You know all that irritating shit about css? Sass tries to fix that. SCSS is Sass.

>Backbone?
Lightweight frontend js framework.

> Underscore?
General purpose javascript library with some useful functions and stuff.

>Moustache?
Templating engine

>Coffeescript?
Alternate syntax for javascript. Use this if you're a hipster who doesn't like semicolons and wants to make things slightly more difficult for other people.
>>
>>54560721
Part II: Electric Boogaloo

> Grunt? Gulp?
If you have a bunch of tasks you need to done to prepare your site like compiling scss/less/pug/typescript/coffeescript/etc, minifying and concatenating js, compressing images, automatically reloading your browser page when something changes, etc. you would want to use something like these. Gulp is more popular and there are some newer ones like webpack also. I prefer gulp, personally.

>Flask?
Really lightweight python web framework

>Laravel? Symphony?
Web frameworks for PHP

>Brackets? Sublime? Webstorm?
IDEs/Text editors. Use whichever you want, they all essentially do the same thing.

>Websocket?
Bidirectional real-time communication over the internet. Use this if you want to make a chat thing or multiplayer game or something.

>Wordpress? Joomla? Drupal?
Content management systems. They allow someone to log in to a site and add/edit content without having to write code. Wordpress is shitty but popular, and the second two are like wordpress but shittier.

>Sharepoint?
Some kind of WYSIWYG website creator from Micro$hit for giant megacorporations' intranets or something?
>>
>>54560225
>>54560520
Thanks for the links broskis
>>
Learning some Javascript and came to something like this in my guide

var guy = {name: "alex"};

function search(name) {
if (name == guy.name) {
}
};

search("alex");



The surprising thing was, it worked. First 'name' took over parameter of function while the second 'name' just went for the object.

How does that work? I was surely expecting this guide to flop.
>>
>>54560731
Kek, Sharepoint. Some company wanted me to come there and they are working with sharepoint and call themselves .net devs. I noped so hard.

Made me afraid though that this shit still exists and there still is a possibility I'll end up in something like that if I fuck up my life. At that point I'd rather just kill myself.
>>
http://stackoverflow.com/questions/37238085/embedding-only-a-json-object-to-website-and-let-client-handle-the-processing

What do you guys think about this? Using JS as a API Frontend, and the backend as an API, instead of embedding code into the HTML server-side.
>>
>>54561000
As far as I know that is not a same variable anyway. I mean, they are called the same, but when you call the "guy" and access his property, I don't think it matters if it's called the same as that parameter.
>>
Recommend me must read books for web development
>>
>>54561068

I know of a pretty good one for beginners:
It's called

"The post at the top of the thread" by The Faggot Formerly known as OP
>>
Anyone here with adhd felt major difference between learning before and after meds?
>>
File: 1458516762210.jpg (108 KB, 1109x677) Image search: [Google]
1458516762210.jpg
108 KB, 1109x677
>>54561097
Recommend me must read books for learning common sense
>>
>>54561000
Read up on variable scope and hoisting in javascript
>>
>>54559735
Because it was created by incompetent programmer and it still shows. Because of its simplicity and popularity there are way too many bad PHP programmers.
>>
>>54561000
Before that function, there is no "name" variable at all. There is a "guy" variable that contains a "name" property. Inside the function, you have defined a "name" variable. This doesn't conflict with anything because the previous "name" is not a variable.

Honestly I'm not sure why you wouldn't expect that to work. How else could the interpreter interpret it?
>>
is

$.ajax({
url: 'www.blablabla.com',
})
.done(function(data) {
alert(data)
})
.fail(function() {
alert("Ajax failed to fetch data")
})

a good way to open json api ?
>>
>>54561318
I was expecting it to interpret as

if ("alex" == guy."alex")

giving me an error.

After it worked I thought it works like this:
first it tried to put in the string 'alex', after getting an error it looks up for the second best thing, which is that objects property.

I don't know, I am dumb.
>>
>>54561415
what happens with guy[name]
>>
>>54561415
That might be what happened. It could also be the case that dot notation, the method you used to access a property on the object, doesn't take strings or something? I don't know, shit is pretty confusing -- I certainly wouldn't be naming parameters that share names in real world coding, but as a mind experiment shit is weird
>>
>>54561110
Before:
>don't code
After:
>code for 2 days straight
>crash
>repeat
>>
Are projects that you do by just following tutorials legit? (if you actually learned something from them).

Theoretically, could I just copy paste a bunch of tutorials and pass the interview if I can explain how things work?
>>
>>54561415
>I was expecting it to interpret as
>
if ("alex" == guy."alex")

>first it tried to put in the string 'alex', after getting an error it looks up for the second best thing, which is that objects property.

It's a variable, not a macro. Following a property accessor, the interpreter expects a property name, not a variable, so it's not even going to check if what you gave it is a variable. There is no conflict here and no fallback. It worked exactly as intended. guy.name is always going to access the "name" property of "guy". That is the only thing it will ever try to do.

If you actually ever want the behavior you expected, you can do
guy[name]
, which would resolve to
guy["alex"]
, which is equivalent to guy.alex

>>54561503
>That might be what happened
It's not.
>>
StackOverflow is making me a terrible developer.

It's so hard to try to work through a problem when I know I could do it faster and better by searching SO.
>>
>>54562089

pajeet pls

They don't just ask how your little project works. They're going to ask you things like "How do you think you could have done this part better?" and "Why did you use dependency X instead of Y" and also a lot of general knowledge questions related to the project. And you better not leave in a single shred of evidence to indicate it's not legit.

If I was interviewing someone and noticed that they were trying to pass off some bullshit tutorial as their own, I would mercilessly fuck with them and have them shitting bricks the whole interview. And then I would hire someone else.
>>
>>54562284
I don't mean I would just copy paste it, I would go through it and try to understand everything. I'm asking if I can have tutorials projects in my portfolio. Maybe change a few things at the end. I have to learn from somewhere anway.
>>
>setting up gunicorn on ubuntu 16.04
>service gunicorn start
>Failed to start gunicorn.service: Unit gunicorn.service not found.
d-do we have to use systemd now?
>>
>>54561110
ADD here. Meds are basically the pill from Limitless for me.

It takes me a while to ponder if code is a good fit, so I'm slow, very very slow. On meds I am a machine.

Trying to get my doc to put me on then again (havent taken since highschool)

There used to be this workout stuff called Craze that had some kind of amphetamine it, I made a HUGE website in 3 months with it. It got banned. I've been working on a tiny app for 3 months now with no end in site.
>>
>>54562340
I would disclose that it's based on a tutorial at <location> and be sure to have a few original projects as well. ("original" meaning I did it on my own, not necessarily that the idea is original.)
>>
>>54562386
Why did it get banned?

Also thanks. Needed to hear that. Been depressed lately. Hopefully getting an appointment soonish.
>>
I apologize in advance. But I must confess.

In order to curb some of the spam problem in a system I've been involved lately, I implemented a rather drastic system. Captchas aren't useful, because some of our legit users can't figure them out.

I noticed that most of the spam was written in languages like Russian and Chinese. Since those are not spoken natively in the (Western European) country I'm in, I decided to reject their moonspeak.

I take the form submissions and split all strings into plain Unicode codepoints. Then I brutally remove any and all characters that are not in our alphabet and reassemble new strings from the leftovers. If the reassembled strings are empty, the whole form submission is rejected.

Almost all of the spam disappeared instantly, yet normal form submissions go through just fine. I've been logging all submissions for a while now and I haven't seen any failures. It also handily strips emoticons and most other crap, leaving only clean readable text.

Here's the "fun" part: the whole system is written in PHP.

I might implement IP whitelisting at some point.

I feel dirty.
>>
>>54562454
Ok, if I've gone through Hartl's Rails tutorial and built a Twitter clone and then went and built an Instagram clone by myself, even if I again used information from Hartl's tutorial when I got stuck, would that pass as my "original" project?

Now I'm building some new functions for a JS pong game, but I made the main thing by following a YT tutorial. Can I say that's my original project?
>>
>>54562491
It got banned for having amphetamines in it.

It was a shame since it was the only thing OTC that worked.

Also yeah, don't get depressed over it. You arent the only sand grain on shitty ADD beach.
>>
Can anyone share a PHP image upload script? One which also puts the url info a database?

I have no idea how to do it properly and can't find any tutorials which aren't about fucking blob.
>>
>>54562525
It's hard to say where the line actually is. Tentatively, I'd say that for you to consider it an original work, it needs to meet a few criteria:

1. A significant majority of the app, especially "core functionality" should be your own. In other words, if you rip someone else's work off and just slap a different name on it and change the color-scheme and layout a bit, that wouldn't be original. Using something else as a rough guideline = probably okay.

2. It should be obvious which parts aren't yours. For example if you use jquery, it's pretty obvious that you didn't write it, and that's fine. If you copypasted parts of the jquery source code into your code with the intention of passing it off as yours, that wouldn't be okay.

3. You should familiar enough with your codebase to confidently explain what each part does. (This is where it really gets tricky.) If you were trying to do an ajax request with jquery and copied part of the example from the docs, that would be okay as long as you could explain what you're doing. Mindlessly copypasting from the docs without reading = no good.
>>
Guys, where to learn Angular 2?
>>
if your page has ads or js its shit
>>
>>54563754
http://lmgtfy.com/?q=angular+2
>>
>>54563949
>http://lmgtfy.com/?q=angular+2

Are you literally retarded?
>>
>>54563567
They exist. Stop looking to copy/paste
>>
File: 1377295747927.png (33 KB, 236x236) Image search: [Google]
1377295747927.png
33 KB, 236x236
Anyone know if you can host multiple HTTPS websites (with different domain names) on the same server, without needing distinct IP addresses?


Been routing about HTTP websites for a while, but I've moved one to HTTPS, and ran into this problem trying to get the others on HTTPS as well.


My shitty ISP doesn't allow multiple IP addresses unless I opt for their shitty business package.
>>
>>54564693
yes, it's called SNI which is integrated in I believe all modern webservers and browsers already for some years already
>>
>>54564735
oh, nice. Looks like I've got a bit of learning to do, but it's good to know hope is not lost.

thank you based anon
>>
>>54559735
The language is not bad, incompetent programmers are
>>
before i post a big old help post, what are the code tags again?
>>
>>54564962
code with square brackets
>>
 var lat;
var lon;

(function findPosition() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
alert('Your browser doesnt support geolocation');
}
})();

function showPosition(position) {
lat = position.coords.latitude;
lon = position.coords.longitude;
document.getElementById("posi").innerHTML = "latitude: " + lat + " longitude: " + lon;
}


var myUrl = "http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&appid=6497fd3fb664e5c26f7072e3eea70f83";
var somecity = "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=6497fd3fb664e5c26f7072e3eea70f83"

$.ajax({
url: somecity
, })
.done(function (data) {
document.getElementById("ha").innerHTML = data.wind.speed;
})
.fail(function () {
alert("Ajax failed to fetch data")
})


why are "lat" and "lon" undefined ater the 2nd function ? i want to use to them to create links for the ajax
>>
okay so apologies for what might come off as a "do this for me" post, but right now i'm learning backend dev by making a simple chatroom. i'm not super interested in being a frontend dev, just making it not look like absolute shit (like it is right now).

ideally, all i really want is the submit box and the list of messages aligned with horizontal wrapping and the ability to scroll up and see previous messages, with the list of participants on the right of both the submit box and messages boxes. below is the code i have

index.jade
doctype html
html
head
link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=Open+Sans')
link(rel='stylesheet', href='/css/style.css')
script(src='//code.jquery.com/jquery-1.11.0.min.js')
script(src='/socket.io/socket.io.js')
script(src='/js/index.js')
title ChitChat
body
h1 ChitChat
div
div#messages.inlineBlock.scroll
div.inlineBlock.topAligned.scroll
b Participants
br
div#participants
div
div.inlineBlock
span Your name:
input(type="text", value="Anonymous")#name
br
form#messageForm
textarea(rows="4", cols="50", placeholder="Type your message, then press Enter", maxlength=200)#outgoingMessage
//input(type="button", value="Share", disabled=true)#send


style.css
body {
padding: 3em;
font-family: 'Open Sans', sans-serif;
font-size: 1em;
}

textarea {
resize: none;
}

.flex {
display: flex;
}

.inlineBlock {
display: inline-block;
}

.topAligned {
vertical-align: top;
}

.scroll {
overflow: scroll;
word-wrap: break-word;
}


again, i not asking for my hand held or someone to do it for me, just tell me what's wrong and what shit should be done instead
>>
>>54565091
because getCurrentPosition is asynchronous and you set your myUrl variables before it finished.
>>
>>54565262
good that the tutorials doesnt mention anything about such things... well, how do solve this problem ?
I tried window.onload before and it didnt really work..
>>
>>54565351
what tutorial? I'm sure they'd mention something like this.

run your second request after the first finished.

        
(function findPosition() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
alert('Your browser doesnt support geolocation');
}
})();

function showPosition(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
document.getElementById("posi").innerHTML = "latitude: " + lat + " longitude: " + lon;

getWindSpeed(lat, lon);
}

function getWindSpeed(lat, lon) {
var myUrl = "http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&appid=6497fd3fb664e5c26f7072e3eea70f83";
var somecity = "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=6497fd3fb664e5c26f7072e3eea70f83";
$.ajax({
url: somecity
})
.done(function (data) {
document.getElementById("ha").innerHTML = data.wind.speed;
})
.fail(function () {
alert("Ajax failed to fetch data")
});
}
>>
>>54565436
it was a german site... whatever

just did something similar, I pushed the whole second part of the code in the showPosition function
is this a good way to "code" ?
>>
>>54564505
EVERY FUCKING TUTORIAL TEACHES HOW TO BLOB

HOW DO I LEARN IF NO ONE TEACHES HOW TO FUCKING DO IT
>>
>>54565540
>is this a good way to "code" ?
No. You should be using either callbacks or promises. Preferably promises.
>>
>>54565736
Use your brain mate. I know how to do it and I've not even read any tutorial related to php upload.
>>
>>54565736
user uploads something
take the file name and other info and put it into a database
generate a UID and save the file somewhere on the filesystem
when a user browses that UID select the file info and return the file with it.

it should be almost identical on what your tutorial is saying, just don't save images as a blob in the database but on the file system.
>>
>>54566248
What are the best ways to generate UIDs? I don't want to make any stupid mistakes
>>
>>54566329
let your database generate one, how depends on which one you're using.
>>
OK so I'm ready to start on my JavaScript journey.
I just have a question: recommended environment to code in JS (IDE, etc)? Thanks.
>>
>>54566470
brackets
>>
>>54566470
webstorm
>>
What's the opinion on building through wordpress? I've built a few websites for clients in the past but got out of the game for a few years and I've suddenly been thrown back in to web development through some pretty lucrative project requests. Is building with wordpress really as important for the client as it's made out to be, in regards to SEO? All this emphasis on SEO wasn't even really an issue the last time I was involved in web development.
>>
>>54565436
>>54566058

well, why does the script works in brackets preview but not on codepen or by opening the html file with other browsers.. I dont even get the location question
>>
>>54568128
works for me, did you disable geolocation?
>>
>>54568145
REEE fucking opera
>>
>>54559609
Well technically it's still not happening in any other language. .net is a framework, C# would be the most commonly used language in combination with that framework.
>>
>>54561271
This. It seems everyone is skipping scoping class these days...
>>
>>54561068
Stackoverflow, by "Every Programmer Ever". The text is not final though, so the book might change over time.
>>
File: bloated.jpg (25 KB, 520x377) Image search: [Google]
bloated.jpg
25 KB, 520x377
I'm looking for new technos to establish a bloat-less full stack for my personnel website.

Atm I got stylus (css pre-processer), mithril.js and yahoo's pure.css. For the backend I'm not sure between werc, flask or something in written in Go.

Any other project I should look at?
>>
>>54565351
Tutorials don't all give you the full intro to JS. Synchronicity is a defining property of the JS language, so most tutorials assume you know about it. You should read up on the event loop, asynchronous / synchronous functions, callbacks and future/promise-constructions. The "You don't know JS" series has some great chapters on this.
>>
>>54566470
Anything which has line numbering. All the debugging will be done in your browser, so the most basic editor will do. Mac Textedit is fine, and so is Webstorm or anything in between. Just don't use Visual Studio.
>>
>>54568520
VS has been actually pretty nice for writing javascript.
>>
>>54567699
WP is shit for anything beyond the most basic blog/website.
>>
>>54568299
Stack is a lifesaver. I spend more time there than actually writing code. fml.
>>
How could I make a weboage scroll automatically?

I want to scroll from top to bottom slowly. Like a movie credits roll.
>>
>>54569722
window.scrollTo(0, yPos);
>>
best MVC framework? also is MVC pretty much the standard nowadays for web dev?
>>
>>54569924
FRP is popular right now with React and the like
>>
>>54561388
looks like a pretty standard ajax call...what are you even asking here?
>>
>>54569924
asp.net if you're a professional, laravel if you're pajeet
>>
>>54561388
>jquery
it's trash.
>>
>>54561388
No.
async function getJSON(url) {
const res = await fetch(url)
return await res.json()
}

And no libraries needed.
>>
How to stop requirejs from unloading modules? Or is that defeating the point of require...?
>>
>>54570551
Use ES6 modules instead.
>>
>>54570634
>ES6 modules
Yeah I'm trying to keep my project as non-hipster as possible thank you very much!
>>
>>54570664
>official ECMAScript module spec
>hipster
What?
>>
>>54570664
Look at this massive faggot
>>
>>54570664
How is that being hipster?
>>
>>54570701
>>54570798
Don't play stupid faggots I don't want imports and exports in my javascript what the fuck
>>
>>54570827
And yet you want the mangled Hell that is AMD modules.
>>
>>54570827
It's just syntactic sugar for stuff you can already do with the language. if you dont like it, dont use it holy shit goddamn
>>
>>54570947
>>54571360
Shills on suicide watch LOL
>>
newfag to backend dev. with so much hate on php, is there a good alternative? Ruby seems to have a good rep for being user-friendly
>>
any ableCommerce devs here?
>>
>>54571400
Nice memeing, faggot. You sure showed us.
>>
>>54570827
Pajeet, importing and exporting modules is something very basic and not very hard to understand.
>>
File: skeleton.jpg (212 KB, 2000x1288) Image search: [Google]
skeleton.jpg
212 KB, 2000x1288
What's a good MIT-licensed lightbox guise? I tried using SimpleLightbox but it looks more like a modal. It doesnt autofit
>>
>>54571525
couldn't you just layer a half-transparent div over the whole viewport and then put a fixed-position video player over that?
>>
>>54571712
Hmmm... i'll give that a try. Thanks broski
>>
>>54571525
lightGallery
>>
>>54571525
yo pal...
whats the diff between using function() and function(element, index) ?
>>
Anyone got any good challenges for scrubs like me who know html, css, and some JS&jquery(DOM manipulation, using JSON) but no PHP/SQL nor backend stuff?
>>
>>54573993
maek a websight
>>
Hi. I'm working on building up a magazine site's content management system. Have a random question about images.

Do you guys have any preferences / standards for what sizes you upload images to a CMS? I can get them in raw and size them myself, or request that they be edited to different formats, but I don't know what numbers to ask for. I see a lot of sites use a 1:1.5 ratio which looks fairly nice, using 200 x 133px thumbs, but I don't know if this is really ideal. Any advice?
>>
>>54574165
I think this is more of >>>/gd/
>>
>>54573993
Online todo list with accounts and IndexedDB offline storage.
>>
Anyone use postfix for sending emails with Django?

Say if I only want to send emails, and never receive them, would I still need an MX record in my DNS records?
>>
>>54576220
I would add it regardless.
I've setup my mail server to only allow receiving mails if the MX record matches the IP it came from.
>>
>>54559081
Hey all

How do I limit a picture in the confines of what's available on screen? I think i've worded that poorly, but what I want is to display all of the image by shrinking it.

Also a couple of weeks ago you guys warned me about using a table to display things, I didn't listen and caused a huge shitfight. I'm sorry this shit is fucking awful.
>>
File: no problem.png (896 KB, 1366x768) Image search: [Google]
no problem.png
896 KB, 1366x768
>>54576563
forgot my image, I'm a dope
>>
>>54576563
background-size: contain;
>>
>>54568205
Look at all these .net framework faggots, dumbest faces I've ever seen.
http://www.omnisharp.net/#team
>>
>>54576576
Thanks guy, I'll work with this. I can't get it to go with any one liners so we'll see.
>>
>>54567699
Wordpress has nothing to do with SEO.

It has everything to do with clients with a $300 budget and the fact you can buy a $50 theme and spend one hour meeting their bullshit and being somewhat profitable.

Then when someone says "Why Wordpress?" you say "because SEO man".
>>
What kind of questions would you expect as a frontend developer? And in a place like some agency where (I guess) they don't really ask much about algorithms and data structures, if not at all. As far as I've heard it's more about knowing many frameworks and the questions are basics of JS, HTML and CSS.

I'd like to know because I might get an internship and don't know what/if there will be a "real" interview. I know jack shit about algos and structures though. I mean, I didn't learn them in college, but ofc, I'm aware of them and read up on them, but not much, since I didn't really have to use anything special.

So, honestly I don't think I'd know how to solve some default algorithm questions e.g. linked lists and binary trees (if that's necessary at all, I've never used it) but I don't really expect them either.
>>
>>54577017
I guess I was correct. There are no CS questions.

https://github.com/h5bp/Front-end-Developer-Interview-Questions

https://www.nczonline.net/blog/2010/01/05/interviewing-the-front-end-engineer/

http://www.clock.co.uk/blog/how-to-interview-for-a-front-end-developer-and-what-any-decent-applicant-should-know
>>
>>54571404
Ruby is a more comfy language but performs worse.
>>
>>54570664
t. spaghetti lover
>>
File: ebin.jpg (31 KB, 720x438) Image search: [Google]
ebin.jpg
31 KB, 720x438
>look at ember after failling with vue
>install the cli just fine
"you know what, this looks promising"
>ember init project
>it works
>ember route users
>it works
"this is totally awesome"
>ember route index
>does nothing but return to shell
"uhh"
>ember init newproject
>ember init
>ember
>ember help
>ember version
>npm uninstall -g ember && ember install -g ember
>ember help
>nothing works

what the fuck is this shit /g/ why does it have to be so difficult ;_;
>>
yo, I am working on a project using gulp starter, and I was wondering, I want to install a module like https://github.com/chartjs/Chart.js, can I just type npm install etc and it will install it in my node_modules, modify my gulpfile and package json etc? or do I still have to do some changes manually?
>>
I'm trying to deliver a few images on specific pages on my website but I'm not sure if I'm doing it the right way. What I wanted to do was to have every path lead to a single php file which then just takes the url in the browser and checks sql for what should be on the page. Am I missing out on something or is this the easiest way?
>>
Can I use this regardless if I use node? Is it worth it? Or is there something similar?

https://github.com/pugjs/pug

Fucking cringe, that new name, that new logo. Web is a disgusting field.
>>
>>54577961
Jesus, stop crying and get back to Vue
https://coligo.io/

And after that
https://github.com/vuejs/awesome-vue

And I really really hope you are using some kind of unix to develop this shit
>>
I want to host a personal page, but I'm a tremendous jew.

Is there any place I can host it for free? Is buying a little server box and running it at home very expensive?
>>
>>54578159
pls respond
>>
>>54578527
What kind of page? If it's a simple static page (like a blog or shit like that) you can use Github pages
>>
>>54578559

Yeah, just a little vanity page for when I start shilling myself as a freelancer.
>>
>>54577961
did you forget generate?
ember generate route index
>>
>>54578300
>needing a transpiler to write html

Jesus fuck webdev is such shit these days
>>
>>54578708
You don't actually need it, but it's helpful for quick prototyping. In fact, most people don't even use jade/pug, they just install the appropiate Emmet plugin on their favorite text-editor-in-a-browser
>>
>>54577961
installing ember globally does nothing, the ember command comes from the ember-cli package.
>>
File: kinda cute.png (113 KB, 656x660) Image search: [Google]
kinda cute.png
113 KB, 656x660
i made a userscript to turn plain links into favicons and titles

don't know why it doesn't ignore <wbr> tags though when scanning for links whose text is same as the href

var query = document.createExpression("//a[@href=text()][boolean(@data-has-title)=false]", null);
>>
>>54571404
Golang.
>>
>>54571404

Don't fall for the meme and just use PHP.
>>
>>54571404
Ruby, Python, C#, fuck, even Javascript. Pick one and get going. Don't mind the performance's issue for any of those. If you hit a bottleneck, and if that bottleneck is caused by your stack choice, you'd probably be on a better position and more knowledgeable to pick up something else.
>>
File: 1453716187346.png (59 KB, 500x402) Image search: [Google]
1453716187346.png
59 KB, 500x402
>>54571404
Just use PHP anon.
It just works.
>>
>>54579455
How do I send an XHR in Java? Can I just copy off the browser's request fields and form data and post that to the same URL?
>>
>>54578772
Will google that, thx.

Yea, ofc I don't need that shit for html ffs, I already said everything is shit. But it's not bad because I could write faster with it and it looks cleaner.
>>
>>54579997
Once you go Emmett, you never go gourmet
>>
>>54580049
Damn is it nice. It's like jade too. Oh, excuse me, it's called """""Pug"""""" now.
>>
>>54559385
this pic makes me sad
>>
File: nuu9oWu.jpg (8 KB, 341x321) Image search: [Google]
nuu9oWu.jpg
8 KB, 341x321
>>54560026
>What framework for node? Rails? Django?
>>
>>54580261
First sentence is not connected to the other two, even if it unfortunately looked liked it.
>>
i do not understand how to use callbacks in asynchron js functions
>>
>>54580316
your stupid
>>
>>54580316
why not?
>>
>>54580332
dont really get the concept and "overthinking" it
>>
>>54580410
somethingThatTakesSomeTime(() => {
console.log('it finished');
});
>>
>>54580219
Ok, thanks to anon for mentioning Emmet, I want to have a passionate sex with it now.
>>
>>54580443
keksimus maximus, I fell for this shit in the comments

div*9>div*9>div*9>div*9>div*9>div*9>{AWESOME!}
>>
>>54580433
REDUNDANT
somethingThatTakesSomeTime(() =>
console.log('it finished'))
>>
File: autism.jpg (20 KB, 448x336) Image search: [Google]
autism.jpg
20 KB, 448x336
>>54580494
>>
>>54580504
but it saves some memory, right?
>>
>>54580539
maybe in ie6
>>
>>54580539
>muh 5 bytes
>>
>>54580433
>>54580494
yea and further ?
>>
>>54580712
that's it, what else do you expect?
>>
So I'm trying to learn socket.io's p2p shit and I'm not using browserify:

https://github.com/socketio/socket.io-p2p/
http://socket.io/blog/socket-io-p2p/

So it says I'm supposed to just include the 'socketiop2p.min.js' file and use window.p2p(socket), but when I do this I get an error saying 'bind' is not a function.

What am I supposed to do?
>>
>>54581370
are you running teh client through node or the browser?
if browser, did you browserify it?
>>
>>54581425
Client through the browser.

I'm trying to avoid browserify if possible, largely because I don't know what I'm doing with it, but If necessary I guess I'll have to learn it.

Would prefer to at least try w/o browserify though.
>>
Guys, question. I've recently started working at a company, mainly web development. We produce websites for small and big business using a variety of frameworks and CMSs (from Wordpress to Magento and from Zend to Laravel; quite diverse).

Now, since my previous experience allows me to train and teach application/web developers a thing or two, I've been put in charge of hiring 3-4 interns for the next period (August-September).

These interns are around 17-18 years old and for most it'll be their first web development job/internship.

Usually the company receives loads of applications, so we've got enough to pick from. My only issue is, how to filter them?

I was thinking about a test, letting them code something. However, what level should they be at, at this age? I started coding/programming reasonably late and I can't compare myself with them when I was their age. But what would be a reasonable test to filter the good ones from the useless ones we have now?
>>
>>54582508
Fizzbuzz.

If they can't even modulus division, they're beyond salvageable.

Just make sure it's explain clearly what they need to do.
>>
Hey /g/uys, I'm pretty inexperienced at web design but a friend of mine has asked me to make him a website for his driving school. What's my best option? I need something to show by the end of the week.
>>
>>54582696
Adobe Dreamweaver.
>>
>>54582696
Wordpress and a free theme.
If you can't design but can do everything else (hosting, backend, etc etc), pickup an HTML template and work from there.
>>
>>54582939
Thanks, I have a wordpress site already but its more a blog type. I thought this is what WP was for desu, not static websites
>>
>>54581797
you can't. it's made for node, so you need to run it through browserify first.
>>
>>54582696

Get a chinamen to do it for pennies. Pay him 10% of the profits.

Now you see why companies are filled with chinks and pajeet.
>>
File: ajaxfail.png (138 KB, 2646x1024) Image search: [Google]
ajaxfail.png
138 KB, 2646x1024
building wiki search app for practice
can you explain me the error that is caused by the lower ajax request.. the upper ajax code which is disabled in the picture works fine
>>
>>54583047
Yeah and then we get hired to clean up their shit.
>>
>>54583099
Something to do with CORS
but im not too sure
>>
>>54583099
Stop using JSONP and it will go away.
>>
>>54559081
What's a good tool that lets me run a light web server that renders markdown and mathjax so I can write my notes and host them on my server?

Similar to https://github.com/joeyespo/grip but with MathJax for formulas
>>
File: 1458133315257.jpg (30 KB, 359x251) Image search: [Google]
1458133315257.jpg
30 KB, 359x251
Hey, I'm currently taking a Database Management class, and have only taken a Intro to Programming class before this, so I apologize if this is a redundant question:

Why is PHP generally considered cancer in these threads? Is there a legitimate reason why it's hated?

My professor proposed that I should take a stab at making a website for a medical terminology book that you can log into, asks questions from the chapter review sections, and records all that info; but, I can't wrap my head around the PHP from the example website he gave me.
>>
>>54583212
what do you mean ?
>>
File: postman.png (5 KB, 128x128) Image search: [Google]
postman.png
5 KB, 128x128
What do you fags use to test REST APIs?

>pice related
Wondering if there is anything better out there
>>
>>54583479
Use Python

PHP is for Pajeets
>>
File: php.png (335 KB, 1280x720) Image search: [Google]
php.png
335 KB, 1280x720
>>54583479
It was never intended to be a programming language and it shows. But worst of all, despite being horribly broken, the language is very easy to get into. This make codebases in a dysfunctional language even more so. Also, it's very slow. There is absolutely no reason not to pick a better alternative, if building anything more than a blog nobody will visit.
>>54583581
The callback shit.
>>
>>54583610
Both are fine for different reasons.
>>
File: it's shit.jpg (45 KB, 385x216) Image search: [Google]
it's shit.jpg
45 KB, 385x216
>>54583479
just use what works for you desu
>>
>>54583617
>Also, it's very slow
PHP7 is faster than all others out there.
>>
>>54559081
>Death to PHP edition
must be 12
>>
>>54583479
Embedding inline PHP into html is ancient/deprecated/obsolete and should have gone out with cgi scripts. The PHP language itself is clunky and is just features of Perl, C and Java bolted on to each other so that its impossible to use it as an ORM DSL for backend frameworks. Hint: DHH tried to use PHP to design Rails and was not able to until he switched to Ruby.
>>
>>54583641
Yes. PHP is fine, if you're Pajeet.
>>54583657
Define all others, because last time I checked, they were so asshurt about even fucking Node beating them in performance, they did not include it in the comparison graph :^)
And of course there are much saner solutions like Go, C#, C++ or even Java, that all perform magnitudes better.
>>
>>54583737
>using Go, C#, C++ or even Java for web development
>>
>>54583770
nice argument, dude
>>
>>54583770
Pajeet plz
>>
> tfw making a portfolio as a back-end dev and trying to color scheme bootstrap shit.
>>
PHP7 is faster than GO and NodeJS. Source: https://github.com/mreschke/node-vs-php-vs-go
>>
>>54583980
Ok
>>
>>54583669
>>Death to PHP edition
>must be 12
ok, why should we still use PHP when we have Rails, node, Django, etc etc?

your answer:
>b-b-but muh Laravel
same thing, every single /wdg/ thread
>>
>>54584025
for performance for example (>>54583980)
>>
>>54578892
>no one noticed this
nice, anon
>>
>>54583980
Nice bait, Pajeet.
https://www.techempower.com/benchmarks/#section=data-r12&hw=peak&test=db
>>
>>54584039
even if that were true, which its not, PHP will never be a systems level language like Go, Go has its own web server built into the language, it has a high performance http API built into the language. The PHP API is deprecated FAIL
>>
>>54583980
> Node.js is short here because it will not utilize all cores in this test.
> PHP7, with nginx at 4 workers will utilize all cores Node.js as I started it, is NOT multi-core, yet...
This is the most worthless benchmark I have ever seen.
>>
File: 4038770.jpg (41 KB, 400x400) Image search: [Google]
4038770.jpg
41 KB, 400x400
>>54583980
>>
>>54584122
>>54584128
>>54584134
I can't believe how mad people can get for being proven wrong about their own favourite hipster language.
>>
>>54584162
>I can't believe how mad people can get for being proven wrong about their shitty benchmark that isn't testing all the languages at the same level
>>
>>54584162
>makes stupid claims
>gets proven wrong
>start name calling
ok, youre sure trying hard to hold on to that PHP job
>>
>>54584228
I can code in whatever I want, I just choose PHP.
>>
>>54583479
try using it then try a different language and you'll figure it out
>>
>>54584254
That's even... sadder.
>>
>>54584275
I use Python too, just for automation. PHP is best for web development.
>>
>>54584254
>I just choose PHP
Why would you ever?
>>
>>54584328
Because I enjoy eloquent code.
>>
can we just stop replying to pajeets trolling with their stupid little language
>>
>>54584328
I'm still waiting for someone to tell me WHY it's shit.
It has good performance, good documentation, widely used and popular, it simply works. There are bad php coders but that doesn't make php a bad language (otherwise, frankly, JS is pure shit).
>>
>>54584391
>implying JS isn't aswell
>>
The popularity of PHP based content management systems alone is enough reason to justify knowing and using PHP.

That's the reason why I use it.
>>
File: 9123819283.png (69 KB, 182x198) Image search: [Google]
9123819283.png
69 KB, 182x198
>>54584350
nice bait
>>
>>54584391
>good performance, good documentation
No, not really. Also, google a fractal of bad design.
>>
>>54584422
This. PHP is brilliant. It's like the C of web development languages.
>>
I get why we need a robust framework like node.js but why do we need to use javascript?

it has some funny conventions like defining a function inside a function call
>>
>>54584914
Sometimes you want a function that's only within the scope of another function

For example, if you had a factorial function that called an iterator to calculate your factorial, with an initial value/accumulator, you'd only want it to be inside your factorial function
>>
>>54578700
no, i just forgot to type it in the post.
>>54578855
forgot to properly type this too

>>54578311
>coligo.io/
>babel-runtime@5/
>@5/

I bet that's going to be the key that breaks me free from the shakles of misery.
>>
File: plshireme.png (13 KB, 760x291) Image search: [Google]
plshireme.png
13 KB, 760x291
>>54582575
would you hire me, anon?
>>
File: fizzbuzz of the christ.png (402 KB, 1024x768) Image search: [Google]
fizzbuzz of the christ.png
402 KB, 1024x768
>>54585426
Too verbose
>>
>>54585426
>omitting the braces
>checking i % 3 twice
>>
>>54585489
>>54585510
it's my first fizzbuzz pls be gentle
i like that dpt one, tho a bit too python
>>
File: ss.png (4 KB, 212x191) Image search: [Google]
ss.png
4 KB, 212x191
>>54585510
how about this?
>>
dont make a fizzbuzz thread out of /wdg/
>>
File: Screenshot_2016-05-16-23-28-28.png (143 KB, 1080x1920) Image search: [Google]
Screenshot_2016-05-16-23-28-28.png
143 KB, 1080x1920
what does wdg think of the design of https://pls.press (both desktop version and mobile)
>>
>>54585692
very gradienty
>>
>CEO thinks the development is slow and disregards that he's a mismanaged god damn idiot
>Finds some shady Indian outsourcing company
>Sends them 3 sites and says this will be the key to launching several sites a week
>It takes them a month and they end up invoicing him over $3500 for the work they did
>He never bothered to ask them how much they charged and never had anyone managing them through the projects
>Flips shit and comes to me asking to fix the garbage work the Pajeets did
>Double my hourly rate because I'm tired of trying to help this clusterfuck of a company
>Somehow this comes back to me fucking him over on these projects
>His new brilliant plan is now to hire them again but limit how many hours they can invoice him

How do stupid people get into these positions at these kinds of agencies?
>>
>>54585729
trying to make it feel sort of "natural". Obviously I should probably lower the color differential in the bottom menu on the mobile version since theres less screen space to travel.
>>
>>54585769
>Design team gives PSDs
>Get PSDs done
>Management wants changes clients aren't asking for
>Sites sit on dev for weeks because of this dumbass process
>Company owner is a total sperg and freaks out every tiny little issue
>Owner will sit there all day calling people instead of just sending out a quick email with "emergencies"

Almost everyone has been in one of those companies where the owner had a reach that was far beyond their grasp and they had no business running a company. There's no point in trying to help them. They'll just pull the I know better than you card.

This owner was a PHD of Branding and was one of the most incompetent people I've ever met in my life. Completely unorganized and chaotic. He would constantly forget to go pick up his kids, clients were always blowing up his phone wanting to know where the work they paid for was, etc. He wasn't a scumbag, just utterly mismanaged.
>>
>>54585833
I mean its their reputation at risk. My father ran a company for over 40 years that built and fixed houses. Whenever I asked him why he never takes on more than two projects at a time (despite at one point having 8 employees) he always answered with him not trusting anyone else with making quality housing. To this day he has not been responsible for leakage or damages caused by improperly built constructions.
>>
>>54585692
>https://pls.pres
i dont like the bar above the box
and I hate mailto: links
>>
>>54585938
Well, that's also called setting client expectations that are manageable. Saying "hey, we'll deliver 3 sites a week" and then not leaving the fucking sites alone because of your "artistic vision for the site" is stupid.

People like the CEO don't understand companies exist to make money. They're not a charity, especially in web dev.

If I think something is going to take me a week, I'll set the expectation that it will take up to two weeks. I've never missed a deadline or had a pissed off client from freelancing.
>>
>>54585952
what do you think would be a good alternative to the bar at the top then? If I remove it I feel it looks way too much like a pomf clone and I feel like ut complements the bottom menu pretty well. As for the mailto link, thats just laziness on my part.
>>
>>54576653
>http://www.omnisharp.net/#team
They look like regular guys. And their website looks pretty decent.
>>
>>54576653
>dumbest faces I've ever seen.
I would bet all the money I currently had in possession that they look far more regular than most of the people on this board.

I guarantee you most of the people on /g/ are underage and think the real world works like hacking movies so they pretend to be intuitive with technology.

They have nothing of value to add so they just shitpost all day with the typical /g/ memes and shitpost anyone who disagrees.
Thread replies: 255
Thread images: 36

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.