[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 - I Don't Know What I'm

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: 320
Thread images: 26

File: dpt a shit.jpg (9KB, 196x250px) Image search: [Google]
dpt a shit.jpg
9KB, 196x250px
/wdg/ - Web Development General

Previous Thread: >>56629758

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

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

>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/sBzRwzY7G-k [Embed] - "2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developer "
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
>>
so what resources can I use to help me go from a beginner programmer to an intermediate one, in C#?

I did some books and I know all about control flow, class + object, method and function, etc. But I can't use this to code anything other than stupid string manipulation shit. Any help to actually get to code something useful?
>>
I'm going to be taking album arts from songs and saving them inside a folder, what's the best naming scheme here?

~/albumarts/albumartist+albumname/albumart.jpg is what I'm thinking now. Should I encode them maybe to avoid things like / in the filename?
>>
>>56665594
is your problem c# or that you don't have any interesting tasks?
>>
Is PHP still useful?
If yes, are there any good learning materials on it?
>>
>>56665749
interesting tasks that are approachable for someone of my level. I'd like some sort of guidance but not spoonfeeding.
>>
>>56665407
I made a streaming app for desktop, that basically just scrapes Putlocker for mp4 streams. It was originally going to be a website, but I ran into shit with same origin policy, so now it's an Electron app.
>>
Coming from Java I made a simple 1-page app with ReactJS but I'm not very convinced. Would Angular2 a better choice?
>>
>Udemy C# Intermediate: Classes, Interfaces and OOP

does anybody know where I can get a free copy of this?
>>
>>56665594
take some random windows/linux CLI program, make a (web) UI for it
>>
How do I go about making an app, that's gonna work with GitHub API?
I am reading my way through their API guide, and it requires me to use some third party libraries (for JS) and a ton of other stuff. I just wanna make simple application returning posts with some certain tags.
How do I start?
>>
>>56666939
probably IRC
check undernet and irchighway
#bookz, #ebooks and #books
>>
>>56667512
could you be more specific? it seems like the built-in XMLHttpRequest and JSON.parse are enough to get anything
>>
>>56667583
yeah, it's not a book, it's a video series
>>
>>56667609
I wanted to make a JS application scraping few GitHub Repositories, gathering only the posts with certain tag, and return them to my website.
Thank you tho, I'll take a look.
>>
>>56665832
PHP is useful in that it's a scripting language and so you can describe the behavior you want and the steps will be executed as requested. It's exactly as useful as any other scripting language, e.g.: Perl, Python, Ruby, whatever.

Because PHP was developed for outputting HTML (It's a HYPERTEXT pre-processor) there are some convenience functions that at one point were considered nice for making websites, such as htmlentities or header. As the language has evolved to be more standardized and abstracted, using these is now considered poor practice and you're suggested to use a framework like Laravel or Phalcon. At this point using PHP is no different from literally any other language. If you're familiar with the syntax, go ahead and use it. If you aren't, use what you know.
>>
I just created a cold observable websocket subscriber thingie behind refcount so i can just subscribe to my service resource and it'll just start doing automatic updates and shit while there's atleast one subsriber. It's beautiful. Why haven't you started rxjs yet?
>>
is larval any good im using django right now but id like to jump in and use larval.
>>
File: 1460879213533.jpg (420KB, 2207x2496px) Image search: [Google]
1460879213533.jpg
420KB, 2207x2496px
/G/uys, give me some old non-commercial sites ( for example scientific, educational, municipal) to redesign them for my portfolio.
>>
>>56667915
If you're referring to Laravel, I'd say depending on your use case it's either very good or very bad.

It's definitely one of the more popular PHP frameworks right now. It's super easy to use and handles almost every part of building your application for you. A lot of that popularity comes from its power: the sheer amount of tools it comes with and the things it does for you are astounding.

Unfortunately doing that much for you means making a lot of assumptions about how your app will work. If performance is important to you, Laravel is not the way to go. It's one of the slowest PHP frameworks with the most files loaded and lines of code processed during bootstrapping. It's also highly opinionated making it hard to build some wacky relationships.

I would say that if your models are well-defined, Laravel makes admin panels and REST APIs extremely easy to build. On the other hand, if you want to build a webSITE (not a web APP), it's not the tool for the job. It does a great job of setting up event queues and handling scheduled tasks for you, but it works best when your views are extremely simple and your application logic is majorly back-end.
>>
POST PORTFOLIOS OR YOUR MOTHER WILL DIE IN HER SLEEP TONIGHT
>>
Ok fuck it, i'm tired of racking my brain on this
Newbie here in need of help
I can't get the damn scrollbar to work on my site

I'm building my first page, consisting of 3 div containers.
Container 1 is a 375px sidebar positioned along the left containing links
Container 2 is another 325px sidebar positioned along the right containing more links
Container 3 is the main part positioned between the two side bars containing article posts

Container 3 has it's height and width set to 100% but has a min-width of 600px, so basically if the browser window is resized, Container 3 stays at 600px while Container 2 gets cropped out of the window.

Now, I set the body tag to overflow:scroll; in my CSS, but for some reason no scrollbar appears to allow me to scroll over and see Container 2 if it gets cropped out.

Anyone know what i'm doing wrong?
>>
You know, promises don't fix callback hell, they just make it look different.

var functionThatReturnsAPromise = function(){
...
}

var anotherFunctionThatReturnsAPromise = function(){
...
}

var justOneMoreFunctionThatReturnsAPromise = function(){
...
}


var masterFunctionThatReturnsAPromise = function(){
return new Promise(function(resolve, reject){
functionThatReturnsAPromise()
.then(function(data){
if(data == false){
anotherFunctionThatReturnsAPromise()
.then(function(moreData){
if(moreData == false){
justOneMoreFunctionThatReturnsAPromise()
.then(function(aaaa){
if(aaaa == false)
........
else
resolve(aaaa);
});
} else {
resolve(moreData);
}
});
} else {
resolve(data)
}
});
});
}
>>
>>56668660
maybe post code?
>>
>>56668664
This is how my promise code looked until I started to get a better understanding of the pattern. If you find yourself in a new form of callback hell, it means you're mis-using promises.

I find that it helps to pretend your functions are synchronous, write the synchronous code, then translate. In your case the synchronous code would look something like:

// "masterFunctionThatReturnsAPromise" is unnecessary,
// as its ONLY goal in life was to call functionThatReturnsAPromise

var data = functionThatReturnsAPromise();
if( data == false ) {
var data = anotherFunctionThatReturnsAPromise();
}
if( data == false ) {
var data = justOneMoreFunctionThatReturnsAPromise();
}
return data;


Now we can write this as:

var data = functionThatReturnsAPromise();
data = data.then(function(value) {
if( value == false ) {
return anotherFunctionThatReturnsAPromise();
} else {
return value;
}
});
data = data.then(function(value) {
if( value == false ) {
return justOneMoreFunctionThatReturnsAPromise();
} else {
return value;
}
});
>>
File: 12316132123412.jpg (2MB, 2592x1936px) Image search: [Google]
12316132123412.jpg
2MB, 2592x1936px
>>56668342
>>
How do I check if a div element is completely visible in the viewport?
Partial doesn't count.

I copied this code from stackoverflow, but it works too well, reporting true if even a single pixel is visible.
function is_visible(el)
{
/* check if element is visible in viewport */
var rect = el.getBoundingClientRect();
return (rect.bottom > 0 && rect.right > 0 &&
rect.left < (window.innerWidth || document.documentElement.clientWidth) &&
rect.top < (window.innerHeight || document.documentElement.clientHeight));
}
>>
>>56668908
>// "masterFunctionThatReturnsAPromise" is unnecessary,
>// as its ONLY goal in life was to call functionThatReturnsAPromise[/code]
No, it's purpose was to return a promise.

here's my scenario
there is a file that i need to get.

this file can exist in 3 possible places

i want all those places checked with one function (master function) that returns the path to that file

if i write it that way then lets say i find the path in the first place, i fill have to go through all possible places afterwards,

getInFirstPlace(place)
.then(function(found){
//lets say found is either false if file is not found or a string that is a path to the file if it is found
if(!found)
return getInSecondPlace();
else
// i can stop looking here but this will just keep going
return found;
})
.then(function(found){
if(found)
//so i either found it after this search or from the previous one but i still have to keep going
return found;
else
return getInThirdPlace();
})
.then(function(found){
if(found)
//finally we can actually return the path even if we found it with the first search
return found;
else
return false;
})
>>
>>56668660
Is container 2 positioned relative to the right side of the window, or the right side of container 3?

Maybe when you switch to 600px width for container 3, you could switch container 2 to float: left, assuming the way the html is arranged will allow this.

If that won't work, I guess post code or codepen or something
>>
>>56669217
I think just switch left for right and top for bottom.

I'm assuming that (0, 0) is the top left corner.
>>
>>56668888
>>
>>56669648
thanks
>>
>>56669402
>No, it's purpose was to return a promise
Since all three of yours functions return promises, however you compose them you will still have a promise. Looking at my second example (where I converted the synchronous functions to a promise equivalent) the value of data is a promise at the end of everything.

>if I write it that way then lets say i find the path in the first place, i fill have to go through all possible places afterwards
I think you're grossly overstating the computational cost of a function call and a single if statement. We avoided calling "getInSecondPlace()" and we avoided calling "getInThirdPlace()". The fact that we ran a function which performs a single if-statement has a negligible effect on performance.

Remember that anything written with promises has a synchronous corollary. In my case I translated the following:

var data = functionThatReturnsAPromise();
if( data == false ) {
var data = anotherFunctionThatReturnsAPromise();
}
if( data == false ) {
var data = justOneMoreFunctionThatReturnsAPromise();
}
return data;


Which performs two if-statements even though we already had data. What you're effectively asking for is the following:

var data = functionThatReturnsAPromise();
if( data == false ) {
var data = anotherFunctionThatReturnsAPromise();
if( data == false ) {
var data = justOneMoreFunctionThatReturnsAPromise();
}
}
return data;


Now we don't run the second if-statement if we don't have to. Although note that even in a synchronous world with no callbacks (and therefore no callback hell) we've still created a code pyramid with our if statements. This is why it looks like callback hell to you.

Although not the ideal solution, if you truly want to skip the promise chain while not having a pyramid of code, you could utilize the "reject()" function to bypass all future "then" blocks and end with a final "catch" block to get the promise back on track
>>
>>56670638
To put some code to that final suggestion, it would look something like this:

var data = checkInFirstPlace()
.then(function(data) {
if( data ) {
throw data;
} else {
return checkInSecondPlace();
}
})
.then(function(data) {
if( data ) {
throw data;
} else {
return checkInThirdPlace();
}
})
.then(function(data) {
if( data ) {
throw data;
} else {
return checkInFourthPlace();
}
})
.then(function(data) {
throw data; // For simplicity, assuming checkInFourthPlace always has data
})
.catch(function(data) {
return data; // Puts us back on a "success" path
});
>>
Could someone clue me in on a simple way to, using Javascript, track which elements in the page my script has affected?

I am working on a small userscript allowing to toggle the size of an image between maximum and original. I need my script to keep track of which images it has resized, so it can know to reset them to their original size when the function is called. So basically, I just need a way to record which elements have been affected, and then query if an object has been affected by my script using one of the elements's properties as a parameter/reference.

Any help is appreciated.
>>
>>56671091
If your function is going to always reset ALL elements that you've touched, I would recommend an array. Something like:

var allEditedImages = [];
function editImage(imageToEdit) {
allEditedImages.push(imageToEdit);
// Do your editing
}
function resetAll() {
allEditedImages.forEach(function(image) {
reset(image);
});
// Don't forget to clear out the array afterwards:
allEditedImages = [];
}


Depending on the level of browser compatibility you need, "forEach" may not be available to you. In that case stick to a standard for loop:

for( var i = 0; i < allEditedImages.length; i++ ) {
reset( allEditedImages[i] );
}
>>
>>56671213
Oh no, it will only affect elements individually. I would rather avoid iterating through elements if possible, since the only element that the function ever affects is the event target. It just needs to know if it resized the event target before, so it knows whether to reset it or resize it.

Thanks for the solution though.
>>
>>56671291
I think I may be misunderstanding you use case, then. You said that you need to keep track of which images (plural) where resized, but now you're saying the function only ever affects the event target (singular)?

In general if you're able to do something at the time an image is resized, putting a reference to that image into an array is the most efficient way of resetting them. By doing it this way you have a list of ONLY those elements affected and no others, and you can find them directly without having to scan the page since a reference is stored (if you don't understand this, read up on pointers and pass-by-reference)

If for some reason you aren't able to store any data before, after, or during resizing then you'll have to look at every image on the page to figure out which ones changed.
>>
>>56671291
can you set some custom property on the image object and then check that?
i haven't done serious dom work in years so i won't express any confidence in this
>>
>>56671370
it looks like x.dataset.expanded = 'true' is kosher
>>
>>56668061
The cleverbot site
>>
>>56670638
>I think you're grossly overstating the computational cost of a function call and a single if statement.
It's not about speed but necessity, why would I call more functions than necessary (with the only exception being that it is literally the only thing that I can do).

>>56670717
I've seen the throw error method to get out of a promise but that's a hackjob, I guess I'll just stick with passing the string through all functions.
>>
>>56665407
What are some CSS things I can do to make the website look like it didn't come from 1980?
>>
>>56672326
>It's not about speed but necessity
If this is your concern, then I demonstrated the reason for your callback hell. It's not a callback hell but an if-statement hell. The following is NOT callback hell:

if( a > 1 ) {
if( a > 2 ) {
if( a > 3 ) {
if( a > 4 ) {
...
}
}
}
}


Despite that, it's an ugly pyramid. That's exactly what you created with your promises in your first post: it wasn't a "callback hell" -- it was an if-statement hell. It's not necessary to call all of the functions and all of the if-statements in order to accomplish your goal, but it is necessary if you don't want a pyramid:

if( a > 1 ) {}
if( a > 2 ) {}
if( a > 3 ) {}
if( a > 4 ) {}
// If a < 1 then we didn't even need to check if a > 2, but we checked anyway


>I've seen the throw error method to get out of a promise but that's a hackjob
It's a hack job because it's enabling a control flow that wouldn't normally be possible without a hack job. You're effectively asking for something like:

var data = checkFirstPlace();
if( data ) { goto END; }
data = checkSecondPlace();
if( data ) { goto END; }
data = checkThirdPlace();
END:
// use data here


If you can find a way to do this without code pyramids then you should be able to convert it to promises.
>>
>>56672331
Just use bootstrap
>>
>>56672331
For starters, no website came from 1980. The world wide web was invented in 1994 if I recall correctly

That said, images are FAR more valuable to making a website look good than CSS. Download Chrome dev tools, go to any pretty website, and disable images. It'll look like shit.

Some CSS things you can do to try and help:

>Center stuff so it's not all bunched up against the left by default
>Put a container around that shit so a large paragraph doesn't turn into a massive line of text that requires turning your head to read
>Use media queries so the container changes size on mobile
>Give buttons, inputs, and links a large padding so they're easy to see and click
>Use cursor:pointer on anything you can interact with
>Put borders around distinct elements so you can visually see where one concept ends and another begins
>Look into color theory. Use colors to draw the eye to important elements
>>
File: 6594db95c0d490915aac737e6526ffba.png (331KB, 1918x969px) Image search: [Google]
6594db95c0d490915aac737e6526ffba.png
331KB, 1918x969px
>>56672452
this

Bootstrap is the reason my pic related isn't looking like something made 10 years ago. Instead it looks like it was made by a fucking idiot and thus a correct statement.
>>
Is it possible to ping .onion addresses in PHP? I'm pretty sure you can't because the Tor network doesn't support ICMP.

Is there another way to check availability within PHP?
>>
>>56672642
Check out

design.google.com/icons/

Those are super helpful for a ton of stuff, like small buttons in pic related
>>
File: look-at-all-dem-images.jpg (280KB, 1905x948px) Image search: [Google]
look-at-all-dem-images.jpg
280KB, 1905x948px
>>56672724
Even with a good icon set (I usually use Font Awesome) your website still won't look professional without actual LARGE images.

Pic related is Amazon with multiple images circled. Next I'll disable loading of images and show the same page
>>
File: no-images-nao-boi.jpg (117KB, 1897x931px) Image search: [Google]
no-images-nao-boi.jpg
117KB, 1897x931px
>>56672792
A solid dark-blue header, a solid white background, and solid grey boxes with black text. The use of font weight and positioning make it look a little bit better than absolute crap, but it's a WAY different site.
>>
>>56672792
>>56672801
Yeah, large images are important too. But a lot of that is just a generic need for content/something to look at
>>
>>56672792
those are things they are selling. those have to be there
>>
>>56666489
Source?
>>
>>56673279
https://www.dropbox.com/sh/mba9v5cise41cko/AABOXazb56F9Mof4A_wj3L7fa?dl=0
>>
File: HUGE-image.jpg (483KB, 1904x944px) Image search: [Google]
HUGE-image.jpg
483KB, 1904x944px
>>56673040
They don't necessarily have to be there. They could just describe what they're selling.

I could try something that's not e-commerce, though

There's big images on every professional looking website. Humans love them some images.
>>
Anyone here knows Angular 2?

Also, aren't promises the same as callbacks?
>>
File: images-images.jpg (137KB, 1913x944px) Image search: [Google]
images-images.jpg
137KB, 1913x944px
>>56674456
>>
>>56674456
How do I do the navbar on that site in vanilla JS?

I know to look for window offset or whatever with jquery, but who the fuck wants to use jquery anymore?
>>
>>56674559
People who don't use jQuery use Angular or React or whatever framework that interacts with the DOM for you. And that navbar can be styled with simple CSS
>>
Is there a good book for learning Angular 2 yet? Recently took on some new responsibilities at work and will have to start doing some frontend development.
>>
>>56674670
No, I was in the process of learning Angular 2 with some 4 month old Udemy videos when it finally got released last week, some of the stuff is outdated already, though still very similar to what I was learning, you're better off using their official documentation.
>>
>>56674559
Basically give it CSS
position: fixed;
height: 100px;
width: 90%;
top: 100px;
left: 5%;
transition: width 0.5s, top 0.5s, left 0.5s;

and then have an onscroll() event on the body in the html that calls a function which checks to see whether document.body.scrollTop is greater than a certain value, and if it is, to set the values of the navbar's width, top, and left to 100%, 0px, and 0px, respectively. (also check for less than that scroll value to reset it to the original properties.)
>>
>npm
>50+ MB apps
>callback hell
>Promises
why is there so much BULLSHIT in JS?
>>
>>56675168
What's wrong about promises? They get rid of the callback hell problem
>>
>>56675189
I dunno, what's wrong with adding garbage on top of garbage? what's wrong with adding retarded (and name, idea, implementation, etc) concepts? what's wrong with me having to learn new useless bullshit every couple months, because some fucking RETARDS couldn't do their job well and THINK before even touching the keyboard?
>>
>>56675369
Why are you sperging out?
>>
>>56674587
I'm talking about how it stickies at the top on scroll.
>>
>>56675398
answered this here: >>56674871
>>
>>56675398
They have a container for both nav bars with fixed positioning. After you scroll (scrollTop > container.height) it changes style so the first line moves out of view (negative top property) and second loses its margins. They animate css properties with javascript, which is not what you should do btw. You should animate the transform property instead because it's faster and store animation in css, especially such a simple one. So instead of doing top: -whateverpx; you do transform: translateY(-whatever) and transition transform property with css. Then you just create selector that will play that animation (e.g. .animateOut) and apply/remove it with javascript by following same logic.
>>
Are
Angular.js
Node.js
React.js
All memes? If i can build the same shit with just javascript and jquery+php, whats the deal with these hipster tools?
>>
>>56675611
I think that Angular and React are probably good if you need to build a relatively big single page application; they help to organize your code and make it more maintainable.

Node.js is just another web server that people use if their language of choice is javascript. I haven't used it much, but I've heard one of the draws is asynchronous stuff; I'm not sure what else.

On the other hand, why give JQuery a free pass? Why not just use CSS and Javascript?
>>
I'm learning jquery for a shitty job.
<script>
$(document).ready(function(){
$.get("file.html", function(data){
$("#header").html(data);
});
});
</script>

Say data contains a full html document. How do I get rid of everything but the contents of the body tags?
>>
>>56675449
I saw. Thanks.
>>
>>56675751
Create wrapper for file.html. Or do some string manipulation before actually using fetched data.
>>
>>56675751
Have you considered using something else instead of jQuery DOM manipulation? Try an iframe dude.

>>56675611
Angular iirc is about views and data binding, I don't like it because reasons. Don't quote me on this, but I doubt angular does SEO particularly well, Google might not index your page right. Furthermore, it might break navigation (again, no quoting) meaning the user can't use the back and forward buttons.

React.js is interesting and has a lot of features, but I've found the most use for it in server side rendering. You're used to jQuery and php I see, but imagine if all your dynamic backend data was built into the webpage from the server side with no need for taxing php calls or Ajax calls. The user connects, client variables are checked and it returns with the entire page all built. This has some amazing SEO potential.

As >>56675663, node is just a server, use whatever server side. You're probably used to using completely php that's fine, personally I prefer C#. It's generally quicker in many things.

>>56674587
Never understood that when jQuery is so mindlessly simple. JQuery is literally whatever you want changeable with a few functions, you literally can't beat the 2 lines of code necessary.

>>56674456
My issue is no one even wants to donate for using my software let alone buy shit from my website. I could imagine setting up an online store with Google drive, a Google script and PayPal account would be easy. No JavaScript or backend needed unless you wanted to log everything.
>>
>>56675611
Yes and no.

Node is just a PHP competitor. It has "muh async" but actually gaining from that is usually a meme.

Angular and React sit on the front end personally I see a lot of value in it. Plain JS is fine when you just want to change one element but building something properly dynamic like... 4chan.. really feels better in React.

I'm starting to see jquery as a meme though. I use a small Ajax module and no other jquery feature means a lot in the modern world imo.
>>
Elixir or Go?
Learning a new hobby language, only reason I'm not choosing Go is because I hear people grow to hate it, is this true?
>>
File: 1473110860979.gif (2MB, 250x308px) Image search: [Google]
1473110860979.gif
2MB, 250x308px
Ah, the job posting memes on linkedin.

>Experience - Entry level
>You have a relevant work experience (minimum 4 years) as a web developer
>>
>>56677152
4chan built in react might have Google indexing the pages, which is actually not something you want for a high speed image board. I'd prefer my 4chan to be jQuery.

Something like a social media site or some sort of content creator oriented site would be perfect for react.js, everything is dynamic but everything is indexed on Google.
>>
>>56672676
Looks shitty and generic.
>>
>>56677281
Nothing wrong with Go, it's just boring and limiting, adequate for server backend stuff that Google does, not much else.
I've done some Go work, it was fun compared to other languages with decades of historical baggage.
>>
>>56677883
I don't need it to look better given it's an app and not a site. Not to mention I won't be hosting this cos of Steam's restrictions on getting info from their shitty servers.

If the user isn't content with how it looks he can change stuff on his own. Then again I don't think an average Steam trader will give a shit.

That said, how would you improve it?
>>
Front-end question:

Should I use one image for a div that responsively gets smaller on small devices (tablets, phones), just letting it resize, or should I give the div a dedicated smaller image for when it becomes smaller?

I'm unsure as to when/how images are loaded with regards to responsive design. Is the user downloading all images specified in the stylesheet at page load, regardless of whether or not they're currently active on the page? Or are they downloading the images that specifically apply to their device, e.g. the user is downloading the page's mobile wallpaper, and not the 1920x1080 image used for desktops.
>>
>>56665407
will there be any performance issue if I import 2 different css files one for standard and one for mobile using @media query
>>
Does anyone have a recommendation for someone with a thick skull on learning about basic divs/positioning/containers in HTML/CSS? It seems to be the only thing that gives me a lot of trouble, and I've gone through books and tutorials left and right and still feel like I have no idea what I'm doing.
>>
thoughts on freecodecamp? I just wanna land a web-dev job asap, and from there move to backend stuff.
>>
So i started solving some on those tests on codewars, its pretty fun and awarding to solve them
the problem is that I always solve problems with most basic commands as possible so usually my solution is bigger then the other ones
i don't know should i stick with my way of solving or lurk at other solutions(sometimes i don't even understand them or too long to bother understanding them)
>>
>>56679947
>freecodecamp?

use it if it works for you. Personally, codecademy is more up my style, and they seem to have all the modules to get you started on frontend web dev
>>
>>56680467
hey buddy
I noticed the same thing, some answers on there are really elegant and minimalistic. But don't fret it, first thing is to get your code working correctly. You can replay the katas you've finished, so what I think happens is people train hard, and then they go back and re-work on their previous answers. I doubt they get those right off the bat, on their first attempt. Stick to your way until you're good enough to go back and re-do them in a nicer way.
>>
>>56677919
>it's just boring and limiting
>I've done some Go work, it was fun compared to other languages [...
wut
>>
>>56679947
Much better than Codecademy. No paywalls, better programs, less half-assed, etc.
>>
>>56675751
In the callback, append the data to a wrapper, then find the body:

Something like:
var body = $("<div>").html(data).find("body");
>>
File: 67.jpg (44KB, 600x450px) Image search: [Google]
67.jpg
44KB, 600x450px
Hello everyone, first time posting here
I just finished my Software Engineering bachelors and I'm trying to find a job as a webdev
What technologies should I focus on learning? (I know RoR, and I'm learning AngularJS / Bootstrap / Postgres right now)
>>
>>56681906
Also know SQL. Not a lot of companies use hipster shit.

Also know the standard javascript/jQuery stuff.
>>
>>56681934
I do know SQL (I had a lot of database subjects) and vanilla JS and jQuery
For example, is ASP.NET worth learning or will I end up in a job that I hate and killing myself at the age of 25?
>>
>>56681906
>I know RoR, and I'm learning AngularJS / Bootstrap

2013 called and said they need a web developer.
>>
>>56682049
That's why am asking for new stuff to learn ya doofus
All my books are from like 2012
>>
>>56682069

React + Node. ES6 knowledge, too.
>>
>>56682091
thank you
>>
>>56682049
leave rails alone...
>>
What is the best way to learn TypeScript to use with Angular 2?
>>
>>56667897
rxjs and even baconjs are bloated. you can get most of the functionality writing a couple of your own stream functions. shouldn't take more than 5kb of code (uncompressed).
>>
>>56675611
I wouldn't use node in serious production sites. Too shaky. But it's better than php.
I would use React for a large single page app. Otherwise vanilla.
I wouldn't use Angular at all, too bloated, strange abstractions.
Php is fine for very basic sites like blogs.
>>
>>56682498
Angular 2 removes a lot of the bloat.
>>
Hey /g/ how do I start working with Twitter API and JavaScript? Let's say I'd like to display one post a day on my website. Is it possible to make such app in JavaScript client-side? Because only tutorials that I can find are about PHP server side use?
Any good tutorials?
>>
>>56682030
.NET and java jobs will be pretty soul destroying generally
>>
>>56682610
so what are some fun jobs? What languages get to have the most fun?
>>
>>56682091
Mind showing good resources/tutorials on the stuff you listed?
>>
>>56682563
It's actually the opposite. angular 2 is 566k of source. angular 1.4.5 was 143k (also way too much).
>>
heres to more information, on other languages and information for being hired as a programmer for other parts than web development
>>56682538
>>
>>56682635
Try a shop using meme FP stuff like haskell and scala. Or even startups using python/ruby etc.
>>
>>56665407
thanks op for the information, do you have any recommendations for making a webpage for the sake of empolyment, for example i currently handle one of my clubs websites, i assume i should just make it more efficient, unique with multiple features etc?
>>
Finished the Angular 2 quickstart in javascript but the tutorials are only available in typescript. Should I just learn typescript?
>>
>>56682610
that was my impression, yeah
>>
bump'n
>>
what serious shit should you actually learn that isn't a fucking meme to put on a resume?

there is so much shit on the so called js ecosystem right now that I literally have no idea what to learn or how to distinguish what actually is a meme or not. Been learning vue for a few days and started a react+redux course, but I don't know man
>>
File: overview2.png (45KB, 838x426px) Image search: [Google]
overview2.png
45KB, 838x426px
>>56677059
>Never understood that when jQuery is so mindlessly simple. JQuery is literally whatever you want changeable with a few functions

Because jQuery tries to solve the DOM issue by simplifying how you interact with it. Angular and similar frameworks work differently, you don't even need to interact with the DOM at all, Angular does it for you. Actually now that I'm reading some posts in here it seems that most of you don't understand these frameworks and what they do. It's hard to explain it if you've never worked with it. Backbone, Angular, Ember, etc give structure to your code, but also remove the hassle of DOM interaction almost entirely, since I'm more familiar with Angular I can tell you that it works similar to how you'd build an actual desktop application. If you're used to old school website development, separating HTML, CSS and JS, it might seem a bit off at first, but to be honest separating concerns that way is kind of dumb.
>>
What is a decent "problem" to fix? Need something to do.
>>
>>56685303
Sticky table headers with table-layout: fixed that actually works.
>>
can all the web-dev-employed posters in here share with us whether they do front or backend, and what languages/technologies they use for that? Would really appreciate it.
>>
Anybody know some D3 Tutorials that are good,

Video would be preferred but books and websites are alright.

There is only one udemy course and it came out in 2014 not sure how relevant it is.

I am thinking about learning that after I am done with the FCC front end projects.
>>
>>56685453

Currently taking a fucking bastard of a website built in MVC + 3x Javaascript files @ 40k lines each and making a new version of it in Angular2 + WebAPI.
>>
Why is React so much fun?
>>
>>56685247
Early 2000s web dev here.

Going from vanilla JS to React wasn't a big jump. It has the whole "virtual DOM" thing too and it makes sense right off the bat. I would like to think any vanilla JS dev will know the DOM so well that picking up these frameworks would be easier than someone who doesn't know the DOM stuff at all.
>>
>>56685601
The problem with most web devs today is that they jump into a meme framework like Angular or React without any basic knowledge of javascript.
>>
>>56685709
If I were to teach then I would teach vanilla JS first because learning any JS framework after becoming an expert at vanilla takes like a weekend for each memework.
Since I'm not teaching and I am competing with these people then fuck it, I prefer they specialize in their 2 year lifespan framework.
>>
>>56685709
I highly doubt that. You need some knowledge of programing concepts to know why and how Angular works the way it does. And even if that was true, I can see them learning faster by simply using such frameworks to build their apps, that is if they read the documentation and not only copy/paste the code.
>>
File: 1473978646797.gif (89KB, 600x600px) Image search: [Google]
1473978646797.gif
89KB, 600x600px
I'm so fucking desperate for a job I'm considering using memeworks like jQuery and the like to get specific functions done then complete learning javascript after, is this even a good idea? Would I even be qualified?
>>
>>56686670
You don't need to be an expert in javascript to get a job. Just start using the hottest frameworks right now and build shit.
>>
>>56686708
Damn it I'm an overthinking retard. Thanks.
>>
>>56665407

Shit, son, you got a real honest to god Discord dev in that Discord
>>
>>56686670
You should know javascript and jQuery. The reason you should know jQuery is because without it, you'll end up building jQuery.
>>
>>56686790
What if you use Angular or React?

This is a serious question because i skipped jquery. I only know about selector shorthand.
>>
>>56686988
I guess it doesn't matter as long as you know one of them; but know it anyway, because a lot of companies use it.

And I'm pretty sure Angular and React have jQuery as a dependency.
>>
>>56685235
If you google the thing and:
(a) It has articles and tutorials and shit going back at least a couple years
(b) It's still alive and actively maintained

There's a decent chance it's legit. As you get more experience, it'll become easier to distinguish and you'll also be able to pick new things up quicker.
>>
>>56685235
Whatever seems fun.

Angular2, Angular, Ember, React whatever. Learn it all. Forget it. Put it on your resume anyways.
>>
What happens if your component relies on props but they don't get added until the user does something? You just use a ternary to put out something different or what?
>>
>>56688189
Disregard.
>>
>>56687476
>JS
>fun
>>
>>56688330
Use typescript if you want a more programmy programming language
>>
why is /dpt/ so much faster and meaner
>>
>>56689921
They're all neets
>>
>>56690122
, shitposters and trolls
>>
File: Untitled.png (9KB, 1139x97px) Image search: [Google]
Untitled.png
9KB, 1139x97px
Hello I'm trying to set up a SSH connection to a computer on my network but I have never done this on pfsense.

I set up a profile under the Fierwall > NAT tab that looks like pic related and had it set up a firewall rule for me using the drop down menu. after all of this my port still looks closed and i cant connect to it from the outside.
do you gents have any advice?
>>
>>56689921
because they are nodev.
>>
/Noideawhati'mdoingI'mgoingintoadifferentfeild/ here
I get this on my php file and I cannot find the error
Parse error: syntax error, unexpected T_WHILE, expecting ',' or ';' in /home/bcst/public_html/price.php on line 25

Here is line 25 and a few more, any ideas?


    while(ocifetch($stmt)) {

echo "<tr>";
echo"<td>";
echo ociresult($stmt, 1);
echo "</td>";
echo"<td>";
echo ociresult($stmt, 2);
echo "</td>";
echo"</tr>";

}
echo "</table>";


Help me with my homework mommy, ignore the table it is outside the loop so that it repeats itself to form one table.
>>
>>56690934
why aren't you putting a space between echo and " consistently
>>
>>56682743
I would appreciate an answer my dudes
>>
>>56691785
I am just a neet but from what I understand only companies that can be selective care about knowing the bare bones javascript.

Like Google and Amazon.

Everybody else just cares about what you can get done. Typescript is just insanely great at making long annoying javascipt into something readable.
>>
>>56691520
Because i'm trying to put as little effort as possible into this, solved it anyway thanks mydudes
>>
>>56690934
Hint: error is on line 24 actually.
>>
>>56691960
Yeah, it was.


That a common thing? why?
>>
>>56691830
Thanks neet anon. I don't care about companies I'm just learning it for myself. Still recommended?
>>
>>56692526
100%
>>
File: what the hell is unknown.png (3KB, 673x40px) Image search: [Google]
what the hell is unknown.png
3KB, 673x40px
I need to dig through some php code from some defunct project, so I tried using visual studio code.

problem is I keep getting pic related, it's not affecting anything but it's annoying me so much.
>>
>>56692216
What is common?
>>
How do people normally generate dynamic pages using php ? like if I was trying to build a forum, I would parse the $__GET parameters and query some database based on the parameers I got. but then ? Do i just echo the website like this :
echo "<div class =forumpost>Your post was : $result.</div>";
echo "<all the rest of the site></all the rest of the site>";
seems like a very tedious way to display the requested site, because I just echo html hardcoded.
>>
>>56692216
You didn't end with a semicolon on line 24 and thus it continued to line 25 expecting it there. On that line it got hit by your 'T_WHILE' and spew out the error.
>>
>>56692842
Separation of logic and presentation, best example of what is MVC design pattern. Basically use templating.
>>
>>56665407
>>Useful Youtube channels
>derekbanas
>thenewboston
>learncodeacademy
>funfunfunction
>computerphile
>codingrainbow
I didn't know about these but isn't a The New Boston the worst place to learn something?
>>
>>56693005
I thought it was okay, as far as youtube tutorials go. What's wrong with it?
>>
>>56692842
there should be some kind of "include" mechanism
>>
>>56692842
That's how SUPER-oldschool PHP developers used to do it

There were several ideological shifts where the "newest and best" way to do it prevailed for about a year before it was ousted. The current method is something like:

>Find a framework that handles routing, ORM, and templating
>Define models for users, posts, etc
>Create templates (raw HTML with some syntax for injecting dynamic content)
>Create controllers which return the dynamic content using the ORM
>Set up routes to call the controllers

Unfortunately it's more code than I could easily type on here, but to get the gist of it look up a Laravel tutorial. Laravel is the most popular PHP framework right now, and it has all of the common functions built-in, including a proprietary templating system based on Handlebars called "Blade"
>>
>>56692717
I remember a bug like this with Atom.

If I recall correctly that means one of your packages is throwing an error that's not getting handled properly. What packages do you have installed?
>>
Where can i find good modern backgrounds?
>>
>>56695508
Google.
>>
I am learning JS with React and Node, and I'd like to learn how to communicate my applications with other servers. For example to be able to fetch some data from price indexing website and display it in my app.
Generally speaking, I'd like to be able to get some content from other servers and use them in my applications.
What should I learn?
>>
>>56694526
I used his videos a long time ago for basics but a lot of his shit seems kind of outdated now
>>
>>56695508

This >>56695620
Also subtlepatterns has some pretty cool shit
>>
>>56696015
Use rest API calls with Request.

https://www.npmjs.com/package/request
>>
This shit gets so difficult to remember sometimes.

Quick fuck you to filezilla for only taking PPK still.

Have to git everything which I haven't done in forever.
>>
>>56696185
No more so than any other channel I would think. The web dev world moves fast. Shit gets outdated.
>>
>>56696364
You may be right. It was a while ago and I think I only used his stuff for non web-dev stuff like C++ or something. Maybe some basic html stuff
>>
Anyone else get ridiculous eye strain?

My eyes get so bad that even seeing light makes my eyes water sometimes.

They are sore 24/7 these days. Takes about 30 hours of no screens to make my eyes not hurt.
>>
>>56696473
Just make sure there is a lot of daylight in the room and you should be fine.
>>
Any recommended lightweight html code editors for a beginner?
>>
>>56696473
Try using f.lux (or alternatively redshift on linux) and also try to take a break every hour or so and focus on objects that aren't right in front of your face.

>>56696981
Literally any halfway decent text editor.

Sublime, Atom, Vim, Emacs, Notepad++ just to name a few.
>>
>>56696473
Yes, thought about getting meme gunnars, i ended up installing f.lux.
It helped A LOT. Try it.
>>
>>56696227
Thanks, I'm reading about it. Any good resources on that?
>>
>>56696473
reduce the brightness of your screen. if you get too much sunlight on it, cover it, move your curtains or something.
>>
>>56697151
I was also considering gunnars but I have a native american nose from somewhere in my lineage. I can't even wear sunglasses because of the bridge.

I'll try flux. thanks.
>>
>spent nearly two hours debugging even though framework source code trying to figure out why a script resource request isn't working, when an essentially identical style resource request is
>no closer to understanding it
Static path providers and overrides and shit are the fucking worst.
>>
Best Javascript book?

I learned Python with How to Think like a Computer Scientist, which was great.
>>
>>56698333
Eloquent Javascript,
JS: The Good Parts
>>
>>56698333
>>56698437
These plus You don't know JS
>>
How quickly can I/would I be able to learn html, css, js and wordpress for simple site editing and building? To get clients to at least make some extra bucks
>>
>>56699465
>html
>css
>js
>wordpress

you can do all of that in one week, if you put just a bit of effort. Go with codecademy or one of the Udemy video series, they have everything streamlined.
>>
>>56699526
>learning JS in one week

Funny.
>>
File: 55181940.jpg (5KB, 250x154px) Image search: [Google]
55181940.jpg
5KB, 250x154px
>post resume on job board
>people asking to fix their scripts
>no real jobs
>>
>>56700142
>learning JS in one week

No

>>56699465
>for simple site editing and building

Yes

5 days if you're not a retard.
>>
>>56699465
>http://nisanbahce.com/

this is a site somebody posted on the last thread. If you put some effort into it, in 5 days you can do something better than this, and that is more than enough to get at least one idiot out there to pay you for it.
>>
>>56700645
Bootstrap is webdev easy mode. Not saying anything against the dev. Bootstrap is super easy to use and deploy and looks clean. It's smart.
>>
>>56700786
>Bootstrap is webdev easy mode

Totally agree, and that's what this guy here >>56699465 is looking for. He's not trying to become a l33t haxxor haskell-assembly-coding motherfucker, he just wants to throw some shit together and be able to charge for it, and I'm just telling him how he needs to proceed to get there.
>>
I'm about to be going to a developer meet up to try to find out if I can do a little bit of networking so I can get a job.

Ive never done any networking before. What do I do? Just talk to people about whatever and then put it out there what my intentions are?

How do I get a job from this?

/ incoming spaghetti stories soon
>>
>>56667656

Phalcon is boss as fuck. It's so much more flexible and is not as opinionated as other frameworks in the space. Not to mention holy fuck is it fast.
>>
>>56700989
Oh yeah I agree. Just adding frameworks for him to learn to get there. That's what I'm getting at.
>>
>>56701026
Im doing the same.

These meetups are full of old people or black guys looking for girls.
>>
>>56701370
The blacks I understand but why are the old people there?

You in Knoxville anon?
>>
File: Image1.gif (8KB, 512x458px) Image search: [Google]
Image1.gif
8KB, 512x458px
im doing somethign groundbreaking here lads!
>pic related
>>
>>56701421
Ooh I misread. The old people are looking for women too???
>>
I need a PHP page that creates CSS and JS files.

What command am I looking for?
>>
>>56701421
>You in Knoxville anon?
Not for years.
No idea why they are there though.
>>
>>56701570
Found a girl. Alert the patriarchy grand wizards and hide the STEM degrees.
>>
>>56701693
Based patriarchy. Finally I will be home.
>>
File: 960.jpg (88KB, 960x540px) Image search: [Google]
960.jpg
88KB, 960x540px
Guys. I'm about to start a uni course on web design and development, but there's one problem, I am shit at art. Will this be a massive problem, would I do better in networking?
>>
>>56701861
Web design and development has nothing to do with art. Graphics artists make the art, you put the art on the screen.
>>
>>56701607
echo

In all seriousness, there's a few issues with answering this question:

>We don't know the use case
>We don't know what technology or frameworks you have at your disposal
>We don't know the desired extensibility or performance characteristics
>You can usually get by with static CSS and JS files and only make the HTML dynamic. Why do you need them generated?
>>
>>56702021
Because it's an install script.

I have no framework, just vanilla. If PHP can do it then I can do it.
I know PHP can create images with filestream or something.
>>
>>56702021
Nvm, got it. fopen ()
>>
>>56701741
It's ok, you don't need to waste 4 years of your life on a degree because gender quotas. Want to trade?
>>
>>56701861
>art
>web dev
pick 1
>>
>>56671091
Add a class to them when they get toggled. Then find each element with that class and revert to the original.
>>
>>56701101
RIGHT? Only reason I use Laravel at all is I don't always have permission to install modules on client web servers, so I'm stuck using something written in raw PHP

Personal projects and things where I own the server? Usually Phalcon back-end, ReactJS front-end.
>>
>>56702534
I didn't realize you wanted to write the files to the file system (I thought by "create CSS and JS files" you meant send CSS and JS to the browser using PHP instead of sending a static file)

fopen()/fwrite()/fclose() is one way

file_put_contents() is another (easier)

I can think of a few other hacky ways, but I wouldn't recommend any of them (things like opening sockets that write to the file system or spinning up separate processes for writing or dropping to shell)
>>
>>56703725
guess this question could be asked here, too
>>
>>56703414
Oh ok, yeah, just making an install script that gives customization options then generates them in the directory.
>>
>>56667656
real businesses use PHP and not this princess code. The reason being is that there are still 50 year olds in the industry who have now have dictation as managers and directors that think are only comfortable with C-looking languages.

Also...Python is a progamming language depending on how you use it. If you haven't discovered this yet then I recommend Beginning Python by Magnus Lie Hetland.
>>
File: o-POO-LOO-VIDEO-facebook.jpg (327KB, 2000x1000px) Image search: [Google]
o-POO-LOO-VIDEO-facebook.jpg
327KB, 2000x1000px
>>56673402
"than better"
AramaShiesh, your poo-in-loo is showing.
>>
>>56702550
I assume you are insinuating that tech companies will halt their hiring of white males to accommodate wymyn?

What do you have to trade?
>>
Express.js questions:

- Should I validate form field data on the front or back-end? Both?

- What's the recommended way of sanitizing input with Express.js?
>>
>>56705019
certainly you have to validate on the back-end. you can't trust anything the client does
on that side it depends on what kind of interface you want to offer
>>
>>56705019
Never trust user input. Validating on back end is absolutely essential. Front end is mostly nice to have, depending on how important user feedback is or how reliant you are on valid data in your front end code.
>>
>>56705019
html5 itself has some ways to validate data, so that's a plus... as >>56705067 and >>56705082 said, you NEED to validate data server-side
>>
>>56705067
>>56705082
Cool beans dudes. I didn't want to redirect the user to a new page upon invalid form submission, but this is my first truly fullstack project, so I'll just keep it simple for now. I can try some frontend validation in conjunction with backend validation for improved user experience later on down the road I suppose
>>
I'm having this issue where onmouseout events don't trigger when scrolling with the space or pgdown/pgup keys, leaving an ugly floating div in my document.

the mouseout event is supposed to delete the div.
>>
>>56665407
>>Learning material
>https://www.codecademy.com/
please suggest udacity ( https://www.udacity.com/ ) alongside codecademy.
IMO, codecademy is terrible, while udacity is much better, at least in terms of explaining stuff (although perhaps udacity lacks some materials for practicing)
>>
File: bestkorea.png (238KB, 1148x792px) Image search: [Google]
bestkorea.png
238KB, 1148x792px
Flawless website. Wish you could do better.
>>
any videos that show the usual line of work for a webdev?
>>
>>56705557
i've never really used it but https://www.livecoding.tv exists
>>
>>56705629
thanks
>>
>>56705666
no problem. let us know if you find anyone interesting
i think the owner has made some weird design decisions -- it seems like the obvious thing to do would have been to copy twitch and go from there but that's not what they did
taking a glance it looks pretty dead but so is twitch's section. maybe this just isn't a good idea
>>
damn this guy fell for the atom meme
>>
hey people, what are some interesting things you can do without needing too much processing power or a database in your server?
for example, games...
>>
How would I go about making a website like this?

A user uploads a photo and gets the photo that was uploaded before them.

There is also a gallery of recent uploads

https://www.pictureswap.org/
>>
>>56708015
>A user uploads a photo and gets the photo that was uploaded before them.
get the pic, assign it a serial id, get the pic with the previous ID

>There is also a gallery of recent uploads
select a number of pics with high ids (the lattest ones)
>>
>>56708015
Upload image to folder.
Add row to table with filename.
Select filename from table where id equals photoid-1

?????
>>
>>56705557
What do you mean?

https://www.twitch.
tv/directory/game/Creative/programming

You can usually find some people doing webdev there..like me and another guy that posts here.
>>
anyone remember when frames were the shit? like those frames full of links on the left side of the screen with the stylized scrollbars?
>>
>>56708557
i think i prefer that to some of the crap i see today
huge floating headers that cover up the first inch of text when i press spacebar
>>
>>56705221
I fought with that some days ago. Why on earth did they make this so restrictive? The only way to get the messages to appear is to submit the entire form. No way to make the validation run at will, or only on specific inputs.

The plugin I was writing happened to place its code in a giant form, but otherwise had no connection to it. I had some custom inputs that I needed to validate. You can't do it directly, but you can check an input for validity and receive it's error message. I ended up having to build my own error popups. That's okay, but could have been avoided completely if the native form validation wasn't so restrictive
>>
Who else really likes TypeScript?
>>
>>56665652
~/arts/artist/album/albumart.jpg
>>
>>56710066
Me
I use the Typewriter extension in visual studio to generate API service proxies for an angular app, it's delicious. Fully typed from back to front
>>
>>56701452
nice project xanadu
>>
>>56705280
Maybe try

On mousein, attach a mouseover event to the body. It's handler will do what your mouse leave handler does now, but removes itself as a handler after firing. At the same time, attach a mouseover handler to the div in question. All that handler should do is stop propagation of the event from reaching the body.
>>
where do you guys get your free flat abstract backgrounds
>>
>>56710066
>no jsx
>>
why the fuck is routing used for ?
>>
>>56665652
/art
>>
File: mylife.gif (2MB, 265x257px) Image search: [Google]
mylife.gif
2MB, 265x257px
>trying to understand javascript closures

I feel like such a retard
>>
good evening /g/entles,

can anyone help me with a great folder structure for my website? I don't know how I can handle the pathes in every html for the next html and for going back to the last one?
At the moment I create for every theme like "networking" a folder with all content (html-sites like: routing, switching, etc). If I want to go to the last html I use "../" that in the start of the path, but when I have more and more folders after folders, I have to do like "../../../". This is fukcing ugly, anyone knows a better and greater way to handle this?
>>
What does Mongoose offer over the vanilla Mongo API in node?

>inb4 >mongo shiggy, etc

How hard would it be to implement my own pre-save hooks using the vanilla API, instead of relying on Mongoose to do it?
>>
>>56712127
What is your retard problem with them, anon?
>>
>>56665407
Lads should i get some work experiance at a web design company. There is quite a few in my city and i'm quite confident with html and css. What do you think?
>>
Is it the future or a pure shit? Why?
http://ebook3000.com/Pro-ASP-NET-Core-MVC--6th-Edition_390278.html
>>
>>56713557
My understanding is that they are just nested functions which you can call outside of the scope of the outer function. Is that right?
>>
>>56713569
>quite confident with html and css.

nigga wut?
If that's all you can do, it's gonna be hard to get a job anywhere. Get a real language in there and then you'll have a chance.
>>
>>56713569
>>56713845
Yeah, even webd cunts gotta JS nowadays. Although it's usually jQuery and not pure JS.
>>
>>56713845
I know i am learning everyday, but is it worth it.
>>
>>56713873
Scratch that "nowadays". No clue why I put it there...
>>
>>56713889
>>56713873
>>56713845
Thanks. I have knowledge of bootstrap {although that's just html and css]. I am going to learn JS soon. Just got a busy life as well.
>>
>>56713722
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures
>Closures are functions that refer to independent (free) variables (variables that are used locally, but defined in an enclosing scope). In other words, these functions 'remember' the environment in which they were created.

They are more for the opposite of what you're saying. They preserve your scope from being messed with from outside.
>>
Does anybody know how can I make this?

https://infinum.co/client-work

When you click the thumbnail it loads it with ajax (angular, react or whatever), but I don't know how can I make it animate with zoom-in while it is loading (just like icons on iOS). Really interested.
>>
is it okay to use zoom in css for specific divs for mobile version only?
>>
>>56713930
Still don't get it I'm afraid.
I mean, I do in theory but I wouldn't be able to use them.

Is it necessary to have a handle on them before moving onto learning about OOP for example?
>>
>>56713106
bump
>>
Guys I need some advice.

> be me
> studying IT course to get into Uni
> only 2nd week into the course so i can still drop out
> also applying for webdev jobs
> get accepted for junior webdev interview
> only know html, css, ruby, sql basic php, learning js
> what do?

I know this company definitely uses JS but I'm only in the early stages of learning. Is it even worth going to the interview?
>>
>>56714678
Do you want the job? If yes, then go, if no then don't. They expect junior devs to be retarded.
>>
>>56714678
Go to every single interview. Least you'll get is some experience in being interviewed.
>>
>>56714678
yes. real world experience looks 10x better on a resume than your schooling.
>>
>>56714315
Depends on what you're doing.

If you're running JS on a site that could potentially be running all sorts of other untrusted JS, then it's a good idea to keep things in closures so that they can't be modified at run time.

If we're talking about Node.js, you usually don't have to worry about stuff like that.
>>
File: 1474456512940.jpg (4KB, 320x320px) Image search: [Google]
1474456512940.jpg
4KB, 320x320px
>>56714814
>>56714939
>>56714977
thanks /g/uys
>>
File: set1c.jpg (146KB, 680x983px) Image search: [Google]
set1c.jpg
146KB, 680x983px
Angular, Node, or Query?

Which is best for what?
>>
Can I still create database indexes in the mongo shell if my app is using Mongoose? Or do I have to specify indexes within the app itself?
>>
Why does the body need to be parsed before being read in Express apps? What is the body transmitted as if not plain-text?
>>
>>56715671
Angular - front end
Node - backend
Query - like a query to your database?
>>
Getting in to angular2 and reactive...
I have no idea how far I should go with reactive patterns.
Having no mutable variable states is a grand goal i'm sure, but formulating complex systems from these observables and streams and shit seems really bothersome.
>>
>>56716568
Probably meant jquery
>>
>>56703414
>I can think of a few other hacky ways, but I wouldn't recommend any of them (things like opening sockets that write to the file system or spinning up separate processes for writing or dropping to shell)

Why would anybody ever do any of these things? Why would you even suggest them?
>>
>>56717139
I did. What's jquery good for?
>>
>>56717826
Nothing. Like you.
>>
>>56717880
Wow. Incredibly rude.
>>
>>56718039
But you didn't disagree.
>>
Best language to write a chat site in?
>>
>>56718343
node
>>
>>56718343
why would you want to write a chat site? Don't tell me somebody's actually paying you to do that...
>>
>>56718387
Socket.io?
>>
>>56718415
yes
>>
>>56718411
Because I've never done it before and I think it might be a fun project. Why are you so miserable, Anon?
>>
>>56718411
sergey is bored of allo already
he's getting desperate
>>
>>56665407
So I learn by modifying, where can I find free website templates?
>>
>>56718925
>>56718925
Literally just use google you lazy fucker.
>>
File: file.png (88KB, 940x948px) Image search: [Google]
file.png
88KB, 940x948px
How do you guys set up a Java application server? Someone showed me kinda how to do it in Eclipse, but I wanna set it up in IntelliJ.

These are the options I chose, but when I click Finish I get a couple errors:

>Failed to download 'http://central.maven.org/maven2/org/freemarker/freemarker/2.3.19/freemarker-2.3.19.jar': connect timed out
>Failed to download 'http://download.jetbrains.com/idea/j2ee_libs/jaxws/2.2/javax.annotation.jar':
connect timed out

Also, the tomcat server when running only produces a blank white page. What am I doing wrong?

Note: Forgot screenshot in >>56718965, which is why I reposted it.
>>
>>56717826
I don't know. I only use it for JSON requests.
>>
So I'm hosting my website off a raspi I have it portforwarded and stuff, is there any free way to hide my IP, I was thinking getting a .tk domain should stop most people
>>
>>56705290
samefag here
btw, this is the webdev course I found:
https://classroom.udacity.com/courses/cs253/
seems very good, although I guess you need a bit of experience with python

>>56719934
>So I'm hosting my website off a raspi I have it portforwarded and stuff, is there any free way to hide my IP
wouldn't you need a VPS for that anyway?
I guess cloudflare could work for you.
>>
>>56713669
+1 for the future
>>
File: the_pajeet_lang.png (42KB, 565x201px) Image search: [Google]
the_pajeet_lang.png
42KB, 565x201px
>>56720050
Python is for pajeet that are paid less than $1/hour.
>>
What are the recommended books/resources for learning PHP and Wordpress?
>>
>>56720419
Street defecation 101.
>>
Does anyone have that site called something like goodmotherfuckingwebsite and it'll generate a nice basic html site for you?
>>
>>56720258
haha, lots of python jobs are very well paid, faggot. and indians only produce java code...
you are out of touch with reality...
>>
>>56720567
http://txti.es/
>>
Does anyone wanna start a collective?

I'm an anon from canada (long time friend of b, r9k and a bit of pol but pol is being overran by u/faggots).
>>
>>56720577
>indians only produce java code...

That's racist. But you forgot PHP, they also produce that.
>>
>>56720863
Start a what now?
>>
>>56721100
Freelancing collective where we together find leads and make money.
>>
>>56720577
>tfw half indian Python programmer
>>
>>56721151
x * the amount of jobs / x amount of devs = no change.

You need a web designer, a graphic designer, and a fullstack.
>>
>>56720863
>>56721151
I'll design the logo
>>
>>56721692
I know js, nodejs.
>>
If I curl a page, can I click buttons with JS cross-site?
>>
>>56721817
wtf does that even mean bruddah?

curl downloads the response from the server.
>>
>>56721853
I need to access elements on Steams page.

I can do it with VB but not sure if PHP can. Probably that cross-domain shit.

I can run it on a server as python too.
>>
>>56721918
>I can run it on a server as python too.

Use http://www.seleniumhq.org/
>>
>>56721918
cross domain shit is protection for the client. stick to VB, figure out how to send an origin header to get through any cross domain shit.
>>
>>56722098
Sweet.
>>
>>56721817
You seem a bit confused about what you want to accomplish.

cURL is a tool for sending HTTP requests and receiving HTTP responses. It will send you the HTML of the page (and the JS and CSS if you so request them) but it won't actually run any JavaScript

Now you said "can I click buttons", then said "with JS", then said "cross-site". I'll address each of these:

>click buttons
It depends on what the button does. Many buttons are just links. You could easily cURL the destination of the link. Some buttons trigger API calls. You could easily cURL the API endpoints. Some buttons trigger javascript functions. These wouldn't make any sense to unless you had a JavaScript interpreter running the JavaScript in order to track all variables and the application state. PhantomJS is a headless (no visible GUI) browser that you can run in NodeJS to do just this (if you need to)

>with JS
If your goal is to click the buttons, you don't need JS for this unless the buttons trigger a JS function. If that's the case, then after using a headless browser like PhantomJS or Selenium then you would need to inject some code into the page to trigger the click event. Many people use PhantomJS with jQuery so they can easily write code like: $("#button").click()

>cross-site
The concept of "cross-site" has no meaning outside of a browser. As far as a server is aware, it received a request for a file and responded. It has no idea what site or page you were on before that request was sent except that the browser might (might!) tell it. And since cURL can send arbitrary HTTP requests you can forge these headers to look like you're coming from anywhere.
Thread posts: 320
Thread images: 26


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