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

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

Thread replies: 317
Thread images: 16

File: 1432484632463.png (747KB, 824x553px) Image search: [Google]
1432484632463.png
747KB, 824x553px
Last thread >>54990991

'Fuck you faggots for not making a new thread quickly enough' Edition

>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://www.youtube.com/watch?v=JxAXlJEmNMg&feature=youtu.be&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
backendDevelopmentBookmarks.md

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

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/
>How to get started
https://www.youtube.com/watch?v=pB0WvcxTbCA [Embed] - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
https://www.youtube.com/watch?v=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
>NEW!
https://www.openshift.com/
>>
>>55018885
web developing is for people who suck their own dicks. kill yourself faggot.
>>
>>55018885
First for POO
>>
How do I create a proposal for a potential client? I have no idea how to properly do it.

I'm assuming I'll do it in work then export it to a PDF. But I'm not 100% sure on how to lay it out or the contents. I mean I have a vague idea, but I don't know if there are any standards. I would love some direction if anyone could help
>>
how do I assert dominance in an interview

I'm thinking about taking my penis out
>>
>>55019461
thats a decent start
>>
6th for Go.
>>
Hey guys, I'm looking for some decent tutorials/reading material about ASP.NET Core, could you point me in the right direction?
>>
What's the best WebRTC data channel resource?
>>
Has anyone worked with WebVR?
>>
>>55018885
What's a good free web hosting?

Just for learning how to serve a website online.
>>
Anybody worked with Hadoop? I took a class in it and thought it was interesting and would like to learn more and get more involved with it.

Hadoop is very Java based, so obviously I need to know Java. But to what extent? Can I continue to learn Hadoop and know the java that will apply to hadoop? OR, do I need to know Java really will if I want to learn hadoop more?

Appreciate any input.
>>
Reminder that if your project doesn't serve a static version and/or works without ANY javascript on the client, it's shit by definition.
>>
What is the best way to implement a sub menu in nav? Javascript (jquery) or should I use just plain css?
>>
File: nav+main+footer.png (9KB, 1000x600px)
nav+main+footer.png
9KB, 1000x600px
Very dumb question incoming...

While every page has a properly coded main, the nav and the footer are includes that I load with jQuery .load(). On user's side this works great, but what about Googlebot? Can it execute javascript and load/crawl/understand what it's going on?
>>
>>55021157
Reminder that if your project can be done without JS, it's trivial shit and not programming.
>>
>>55021189
Just plain CSS should be fine. Javascript only if you really want to be fancy, but make sure to keep a CSS fallback regardless.


>>55021190
>Googlebot
>Can it execute javascript and load/crawl/understand what it's going on?

Not sure why you would "include" content like that, but yes, Googlebot knows there are people doing silly things like this with JS.
>>
>>55021259
>Not sure why you would "include" content like that
When I came up with this solution I was a noob and didn't know much about includes.
Maybe I'll switch to the php approach if jQuery confuses Googlebot too much. Thank you.
>>
>>55021215
>on the client

If you need JS on the client no matter what, then your project ranges from incompetent to downright malware.
>>
>>55021409
What is interactive web applications? Keep writing your CRUD sites and glorified text documents.
>>
>>55021428
>What is interactive web applications?
Optional shit, always optional.
>>
>>55018996
Trips are for people who suck their own dicks. kill yourself faggot.
>>
>>55021154
Definitely don't need to know Java very well to use Hadoop
>>
>tfw just got back from bombarding an interview
>tfw you've been programming in a framework for so long you know nothing about the underlying language
>>
>>55021444
Then how does our Pajeet a implement complex interactive experience in the browser?
>>
>>55021966
>complex interactive experience
More buzzwords for unnecessary frontend shit.

You can do all of that and more

AFTER

you have made sure it works without javascript and a static delivery first

If your first concern on any project is MUH LOOKNFEEL then you are a shit developer and you need to educate yourself.
>>
>>55022377
We don't seem to be on the same page. As a simple example, can you implement a snake game or a realtime chat without JS? I'm not talking about pretty transitions and animations, but actual interactivity and functionality on par with desktop applications.
>>
>>55022439
Weeeell now that's a different story. But surely atleast you properly inform the user that the project requires javascript in the applicable places on the (you guessed it) static site delivery.

What I never want to see is the page just not loading without javascript, ála "look mom, I can use the angular xD" beacuse the entire page layout depends on JS without a fallback in place.
>>
>>55022503
I never implied not informing the user and agree that stupid shit like full Angular, React or some other bloat of the month web SITES are in fact a very dumb thing to do. We are slowly approaching this amazing platform, where native-level functionality can be delivered to nearly any device anywhere, but all we keep doing with it is ricing our glorified input forms and Word documents.
>>
>>55022569
What grinds me even more is when some website layout breaks down because COOKIES are disabled
>>
>>55022658
How can that even happen? Can't you just use some sane default, if the cookie is not found?
>>
>>55022687
you'd be surprised
>>
>>55023093
>>55022687
To expand on that, I think this is when programmers don't think and have shit like

// do cookie shit here
echo x; // some layout


so the code nongracefully crashes on the cookie read/assignment part and never even puts out half the layout
>>
File: eh.png (95KB, 244x242px) Image search: [Google]
eh.png
95KB, 244x242px
>>55023106
>http://www.bureaucollective.ch/overview
Faggots, I need help figuring out how this hover effects works. When moving the cursor over a thumbnail from left to right it goes through the entire slideshow. How does this work?
>>
>>55019237
Have you checked out Adobe XD? It's in beta for Mac only right now but I found it really useful for creating quick prototypes and clickdummies
>>
>>55023693
there's a request that checks what images should be loaded/displayed
http://www.bureaucollective.ch/api/overviewPreviews
then it preloads all images and based on the cursors position above each image it shows a specific one in the center.
>>
>>55018996
buttmad Russian detected.
>>
>>55023106
Do a try catch with it then
>>
>>55023829
reading comprehension: 0
>>
>>55023847
Sorry my mental state is not at a 100% right now, I read that over and over and still can't see.
>>
>>55023807
>js as backend
sounds terrible. whats intriguing me the most however is how the width of the container is used as a way of advancing the slideshow. here's another example:
http://sanfranciscointernationalbookclub.com/tm-archive/
>>
>>55024425
>>js as backend
you don't know what backend they use.
also look at the source, they are using mousemove events and add a class to the image to show.
$("#slideshow").mousemove(function(t) {
var o = $(this).parent().offset()
, n = t.pageX - o.left;
s = 0,
$(".slide-item").each(function() {
i - 1 > s && e[s] < n && n < e[s + 1] && ($(".slide-item").removeClass("active"),
$(".slide-" + (s + 1)).addClass("active")),
s === i - 1 && e[s] < n && ($(".slide-item").removeClass("active"),
$(".slide-" + (s + 1)).addClass("active")),
s++
})
})


they are doing something similar on the mainpage.
>>
>>55024548
yeah I saw that. I'm trying to wrap my head around a way of using the total width of a container to advance a slideshow. the simplest way of making slideshows is adding or subtracting 1 to an index number, where the index is parallel to the number of images. using mouseover to advance the slideshow would need to take the percentage width of a container (100) then divide that into the amount of images (say 6), then equal that division (100/6) to the index of that specific image.
>>
I asked /sqt/, but I'm going to ask here:

If I have a custom homepage saved on my computer that a lot of other anons like to make, can a malicious website secretly edit it to do something malicious to my computer?
>>
>>55025757
As long as it doesnt have any external dependencies, nothing can really affect your local files.
>>
>>55025804
The website or the browser?
>>
anyone here have any experience creating APIs? I'm new to this and wondering what resources are available for learning how to properly secure an API as best as you can.
>>
So curious; has anyone done any work involving the WebRTC API? Seems neato. What have you done with it?
>>
Is it possible to learn Angular 1 in two weeks? (Yes, it has to be Ang1).
>>
>>55025804
what does "external dependencies" mean?
>>
Don't expect any replies but...

How do I get myself to finally finish and publish the theme I am working on?

I am filthy poor and still, can't properly concentrate on finishing the thing. I am somehow scared of doing it (yeah, I know)
>>
>>55025973
There's nothing hard about securing an API. Right after parsing the JSON, make sure all the required fields are there, there are no extra fields, the types are correct (bools, ints, floats, etc.) and the strings are an acceptable length. Done.
>>
>>55026224
>>55025837
if your website is a single html page with external links to 4chan and pornhub then you're fine. if it's a website you downloaded with scripts some other anon is maintaining then you could be in risk of phishing, but i really really doubt someone would take the time to do something as such.

>>55024937
figured it out, if anyone was wondering.
>http://codepen.io/anon/pen/GqoaEG?editors=0011
here, for the sake of testing, the width used is the body width and the max value is 5. in a real case the width would equal the width of the thumbnail/container and the max value equal to the amount of slides.
>>
Talking CSS resets..

Normalize is for normies, as we all know but just using isn't the right thing to do.. right? Shouldn't the star selector not be avoided at all times?

* {
margin: 0;
padding: 0;
border: 0;
}

input, textarea, select {
-webkit-appearance:none;
outline:0;
background-color: transparent;
border-radius: 0;
}


Does anyone have a good reset that they use on projects?
>>
>>55026442
what's wrong with normalize?
>>
>>55026376
OK good. All it currently is a countdown timer and I'm planning to spice it up with some links and CSS. Would adding JavaScript be a risky thing?
>>
>>55026442
i use my own take on normalize. but regarding star selectors, this is what i use:

*, *:before, *:after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
>>
>>55026465
I guess mainly it setting up header styles and all kinds of stuff that you are going to overwrite anyways. Maybe I'll just strip out the Sass version of Normalize
>>
>>55026468
99.9% of websites use JS so no, it wouldnt. why isnt the countdown timer already written in JS?
>>
>>55026562
It's an iframe linking to a countdown from timeanddate.com
>>
File: 1451080352324.jpg (57KB, 576x436px) Image search: [Google]
1451080352324.jpg
57KB, 576x436px
>>55026640
>mfw

I assume you are quite new to web development. I would highly recommend you try to implement it in JavaScript yourself. Iframes are about the worst thing on the web after Flash. It is very dangerous to implement them as people can inject malicious JavaScript in your website that way.
>>
>>55026729
Even if the link is HTTPS encrypted?
>>
>>55026729
>people can inject malicious JavaScript in your website that way.
How?
>>
>>55026562
>>55026729
I just read your previous posts. By external dependencies anon means iframes and javascript files that are being fetched from the internet.

Local JavaScript looks like this in your html file

<script src="scripts/main.js"></script>


Fetched JavaScript looks like this

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>


is a JavaScript file on the server of Google. You can download the file and just put it in your folder so you don't have to call the external dependency.
>>
>>55026213
bump
>>
>>55026806
Here is my custom homepage, It's pretty simplistic right now
<DOCTYPE! html>
<head>
<title>Countdown</title>
</head>

<body>
<iframe src="https://freesecure.timeanddate.com/rest of URL removed" allowTransparency="true" frameborder="0" width="454" height="195"></iframe>
</body>

</html>


Is there anything at all wrong with this?
>>
>>55026768
Well then you still have the issue of people being able to hack into shitty websites and adding malicious code to the existing code that you are then fetching and hosting on your own.
>>
>>55026889
OK, so what I should do is remove the iframe and host the countdown on my own HDD, yes?
>>
What should I look into if I don't want to use php?
>>
>>55026856

Use this:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Countdown</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>

<script src="js/main.js"></script>
</body>
</html>


Have a look at https://www.sitepoint.com/build-javascript-countdown-timer-no-dependencies/
>>
>>55026916
http://codepen.io/SitePoint/pen/MwNPVq

This is the code
>>
>>55026916
Awesome, now I won't have to worry about a MITM attack. How much local editing is a web browser allowed? Can my homepage still be edited by a malicious site?
>>
What do you guys think about phoenix framework?
>>
>>55026964
>>55026889
holy shit stop being autistic
iframes cannot access the parent page if they're not on the same domain/protocol
anything fetched via https is immune to MITM attacks
nobody's gonna ""hack"" your fucking static html homepage, just use whatever you want
>>
What is this Genesis framework?

http://www.studiopress.com/
>>
finished the codeacademy python tutorial if the others are just as boring I'm never touching this shit again
>>
>>55026964
Local websites are not possible to MITM as the website is not being served over the network. Add-ons in the browser and viruses on your computer can still inject JavaScript though but I wouldn't worry too much about that.

>>55026970
Meme (I actually don't know what it is but I assume it is a meme)
>>
>>55027046
>Local websites are not possible to MITM as the website is not being served over the network

Even if there is an iframe fetching information from another website?
>>
>>55027015
Nigga, I don't know much about web development. spare me.
>>
https://angel.co/salaries
>compared python to php
KEK
>>
>>55027015
I'm just trying to teach the kid that iframes are a bad idea in general and I would like to see him implement/write JavaScript on his own.

I'm referring to the timeandate website getting hacked, not his.
>>
>>55027105
What's the worst that could happen if timeanddate did get compromised? How much local editing rights does Firefox or Chrome have?
>>
>>55026908
Do some research.
Python, Ruby, Javascript (NodeJS), C#. Those are the most popular alternatives, figure out which one you want to use.
>>
>>55027105
then you should have just said "you should try making your own"
iframes are not a security risk as long as you're using a real browser, if the timeanddate website was hacked, the worst that could happen would be the iframe contents looking different.
>>
>>55027141
Probably nothing but if he is ever planning to put the website online or make something else I think it is good for him to know.

Local editing rights? Probably not much though you write some really nasty JavaScript if you want. Localhost is even trusted by default in NoScript.

https://security.stackexchange.com/questions/96985/similarities-among-all-most-malicious-javascript
>>
>>55026257
just do it? there is no reason to be scared
>>
>>55027178
oh what is this you say? An iframe inside of an iframe?

https://aw-snap.info/articles/js-examples.php
>>
I still can't believe that there are no (good) automatic tools for web design. how come programmers haven't replaced web designers, ffs?


>>55027036
>codeacademy
codeacademy is shit
>>
I'm getting increasingly frustrated by Rails, what can I switch to that makes coding web as fun as C++ ? No PHP pls
>>
>>55027272
start here and keep digging
http://yeoman.io/
https://github.com/yeoman/generator-webapp
>>
>>55027289
WebGL if you like writing shaders and otherwise Node.js
>>
>>55026908
golang

>>55021045
openshift
>>
File: 1465597109362.png (17KB, 347x102px) Image search: [Google]
1465597109362.png
17KB, 347x102px
>>55027289
Golang
>>
>>55027272
iktf, when you are doing fullstack for some projects it either gets kinda hard to come up with a decent design in the first place, or you end up using default ux/css templates and work on top of that to meet the needs.
>>
>>55027289
Go.
>>
If I'm building a portfolio, is it sufficient to have code in a Github repo, or would employers want to see hosted sites?
>>
>>55026213
Yes. I just did exactly that with basically no previous web development experience.
>>
>>55027937
Cool, any course you would recommend? I tried shitton of them, I'm currently bouncing around Egghead.io and Thinkster.

The thing is, I'm not sure how much should I know before getting thrown into a project with no previous experience. I don't know where all the fundamentals and and where advanced stuff begins.
>>
Anyone else getting a ton of recruiter emails now?

Is this just a summer thing? I went 2 months without 1. Now I'm getting 2 to 3 a day.
>>
>>55027969
This is what I used to get started: https://www.codeschool.com/courses/shaping-up-with-angular-js

It's very introductory though, and you're going to have to actually try writing some stuff before you actually understand anything.

After that, just googling topics as they came up and reading various tutorials online helped.

I should mention that I had the added benefit of only modifying an already completed website from rendering server side -> rendering client side via angular. Because of this, I didn't have to bother with css at all.
>>
>>55021598
>being this new
Neck yourself
>>
>>55028014
I haven't shit senpai. Good luck tho, maybe one of us will actually make it. :S
>>
Anybody here cares about web design, UI, UX?

I'd really appreciate some feedback on my site. Since there's more pictures attached, I guess it's easier to give you the link to my thread in /gd/.

>>>/gd/272965

Thanks.
>>
>>55028436
Well its a picture. So I can't really comment on the UX because UX has more to do with the technical details of the site and how everything works, rather than just the layout. Plus the UX of the desktop site could differ greatly from the mobile site. Will you use a service worker? Will your media queries be on point? Will you expect the mobile user to download 20mb of bullshit meme frameworks and uncompressed images before hitting first render? etc etc.

So make an actual page so I can tear it apart
>>
>>55028436
Add some padding to the image's title. The part that says "Mirror's Edge...." and the white box below it so the text doesn't touch the edge.
>>
>>55028895
Fair enough.

Actually, what you've seen is not made in photoshop but is actually coded, so the portal is up, but I'll link it to you guys later, there is still a lot of stuff to do. I'll also probably make a poll about UI/UX so I may link that too.

>>55029045
Oh yeah, I wanted to ask you guys about that before. Good that you mentioned it. (Well, it's possible I'll remove it anyway, but I want to learn something from it):

That title wraps in two rows so when I add padding-left and right, the problem is that it just affects the left part of the first row and the right part of the second row. How could I fix that?
>>
is Go a meme
>>
Can someone take a quick look at the following:

http://codepen.io/Pixelbark/pen/YWyPXp?editors=1111

I seem to be having a bit of trouble with scope. I can't call includedStreams[i] within the function.

Look at line 7 for what I mean, It comes back with "undefined".

Any ideas?
>>
>>55029348
Try wrapping the text in a <span> then adding a margin to the span.
>>
>>55029453
getjson is async, by the time you check includedStreams[i] i will be 5 and your last index is 4.

use "let" instead of var, it was made exactly for that.
if you can't then bind either i or the value of includedStreams[i] to the function you call after getjson.
>>
>>55029531

You absolute star, I would have never figured that out by myself. (Without hours upon hours of reading)
>>
>>55029594
you would have realized that i is 5 if you'd have placed a breakpoint on line 7 and checked.
make sure you know how to use the developer tools before doing anything.
>>
>>55027289
rails is fun though
>>
Where can I learn Django? Polls tutorial is boring and pretty ineffective.
>>
>>55030058
On the internet.
>>
>>55030058
https://www.fullstackpython.com/django.html
>>
>>55030058
not him, but I have just posted >>55030149 while reading about python webd
I learned the basic python stuff a year ago and whavent touched it, should I relearn it before touching django ?
>>
>>55029405

nope, more and more big companies are using it. The biggest advantages are that it's a very easy to read, learn and standardized, which makes it perfect for bigger teams.

That said it does not introduce much new things and is slightly slower than Java
>>
>>55030491
>very easy to read
fuck no it's not
>>
What are some decent videoplayers? Preferably with streaming options
>>
>>55030830
videojs. I'm using it for RTMP, DASH and HLS streams.
Though it has problems with webms on DASH, I am using shaka player for that.
>>
>>55030580
Why do you feel that way?
>>
>>55030491
>That said it does not introduce much new things and is slightly slower than Java
and more memory efficient afaiu

>>55030580
how is it not? learning it and reading it is easy.
https://tour.golang.org
>>
So I ditched easyphp for wampserver and now my dev environment is finally faster than my live system. I also love the changed PHP error output, it's really awesome. Also, being able to setup virtual hosts.
Fuck, it's just so much better.

Anyways, if you had your own "central" page on the internet, what would you add to it besides smarthome control? I'm searching for something else to create while I'm waiting for some hardware.
>>
>>55030892
those imports look retarded and take up half the space
>>
>>55030858
Sweet, thanks lad
>>
>>55030934
>those imports look retarded
I think the same but I don't think you have read or written a program that is more than 4 lines of code
>>
>>55030980
https://golang.org/pkg/net/http/

All I really had to look at was this. It's messy and overcomplicated. With python I can do requests.get(url)
>>
I just finished working on one project now I want something else to do. I have a bunch of fun ideas, but those are all personal projects. What can I work on that is something that employers will look favorably upon?
>>
>>55031013
If it matters, I want to get a position as a JS guy, full stack even.
>>
>>55031009
>With python I can do requests.get(url)

And with Golang all you need to do is http.Get(URL)
What's your point?
>>
>>55031009
you do know that python requests is an external library, and that you could make a "requests" library in Go, right? in fact, I bet there are a few out there already.
languages are not only made of their libraries, m8
>>
File: cover.png (159KB, 426x552px) Image search: [Google]
cover.png
159KB, 426x552px
How is Eloquent Javascript? I'm going to read through it, but are all the practices still relevant? I know its only been a couple years since it came out, but I'd just like to make sure anyways
>>
How can I make my image break the boundaries of its container?

like >pic related
>>
How many folks still do front-end web work without a smattering of CSS + JS frameworks/libraries/etc? I haven't done web stuff for ages (5+ years) and want to do a little website with all the critical functionality in the back end and I'm curious of how many people take this approach these days.
>>
>>55031669
Really depends on what I'm doing.

For something simple, I usually only use a small build tool like Gulp to compile all my frontend JS into a big file so its a bit easier for me. I also end up using Jade/Sass along the way, but that's as far as I go for most of the smaller projects
>>
How do streaming websites work?

Let's use chaturbate as an example. How does their webcam get streamed to others? Constantly storing and displaying frames?
>>
File: day27.jpg (361KB, 800x600px)
day27.jpg
361KB, 800x600px
How can I make a small line under the text in CSS?

>pic related

I was thinking about making some empty element, making it of a short width and adding a border-bottom to it but I feel there has to be a better solution.
>>
>>55031798
Look into WebRTC, its what a lot of streaming sites use.
>>
Whenever I create a .htaccess file in my /srv/http on my Arch server, the file vanishes. Does anyone know something about this problem? It works fine for the other files in that directory.
>>
>>55031856
<div> - Set the height, width, and background color.
>>
>>55031856
>>55032035
><div>

This is literally what <hr /> exists for.
>>
>>55032247
hr is weak
>>
>>55032247
He's talking about the orange line (I assume).
You wouldn't use <hr/> for that.
https://jsfiddle.net/j7u5uvs6/
>>
File: 14.png (495KB, 1600x798px) Image search: [Google]
14.png
495KB, 1600x798px
Can I possibly make a separate canvas below the main one for displaying the tiles? Would that even help with optimization? It's very slow zoomed out like this.
>>
>>55032454
yes, i've done multiple canvases before. not sure about optimizing things though.
>>
>>55032035
Thanks.

>>55032247
>>55032280
>>55032295
Yeah, was talking about orange line, and div works perfectly fine. Does it even matter if it is not hr?
>>
What is /g/'s opinion on Rx?

The functional approach does seem nice.
>>
>>55032620
Apparently hr will act subtly different than a usual div element. For some reason when I tries changing the border color, there was still a thin, 1 pixel outline around the hr line.
Using a Div might just be easier.
>>
>>55021336
>php
Going the wrong way with that anon
>>
>>55032454
Would optimization be possible using some other method? It seems dumb that I'm drawing and calculating the position for every visible tile every single frame

Sorry if this isn't the right thread.
>>
>>55022503
While I agree in that you shouldn't use JavaScript (or server side rendering) where possible, I don't think you quite understand the complexity of producing a website usable by the average dumb fuck. Also don't see the big deal about requiring js on a Web page. Building in a fall back for nojs is a waste of effort. If you think otherwise, you obviously haven't worked in the industry long enough
>>
>>55027289
Golang
>>
>>55032675
>>55032620

<hr> comes with its own pre-defined style. With a <div> you'll be able to set it exactly how you want.
>>
>>55030491
>slower than Java
Kek
>>
>>55032863
Java is sometimes faster than C, and Go is sometimes as fast if not faster than Java
dumbass
>>
>>55032987
>Java is sometimes faster than C
Holy shit my sides anon
>>
>>55031605
Probably with overflow. You will also have to make it block level element and make it have size.
>>
>>55033017
the debian "benchmarks game" used to show that some java programs were faster than some C programs, but not anymore.

in any case, you can compare C and Go here:
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=gcc
C/Java here:
https://benchmarksgame.alioth.debian.org/u64q/c.html
and Go/Java here:
https://benchmarksgame.alioth.debian.org/u64q/go.html
have in mind that Go is still in development, and some performance improvements are coming for the next release, version 1.7
>>
>>55033129
>C/Java here:
>https://benchmarksgame.alioth.debian.org/u64q/c.html
wrong link...
here: https://benchmarksgame.alioth.debian.org/u64q/java.html
>>
>>55032030
You sure it disappears and is not simply hidden? Because . at the beginning of file means hidden file.
>>
>>55033129
Hey I'm not knocking Golang. It blows Java out of the water now and they're aiming for C like perf.

But the overhead of the JVM will mean that, assuming both applications are written to be as efficient as possible, the C program will always win hands down. I'm not a C fanboy either, it's a dying language, with few applicable use cases right now
>>
>>55033202
Yeah, I was pretty sure, but alas, I was wrong.
I found out that ls doesn't show hidden files per default, and I also don't get a warning in FileZilla when I try to create a file already existing.

Welp, learned something new.
>>
>>55033228
JIT sometimes can make better use of the processor's cache than ahead-of-time compilation.

Sure, in practice, C usually wins anyway, but it's not always.

Though for me, the JVM startup time and memory consumption is enough to dismiss it desu.
>>
>>55018885
i've learning angular for a project i've been working on for like 3 months, now that the project is almost done im wondering if i should keep learning angular or maybe start learning something new like angular2 or react, does angularjs still have a future? or should i just drop it and learn something new? i've learned enough to make simple apps but nothing too advanced
>>
>>55034253
Angular 1 will have full support for 18 months after the first official release of angular 2. Take what you want out of that.

I think react is the way to go forward but it's a bit hard to tell at this stage. Learning programming patterns and applying them to a framework is much more important than learning a framework itself. Don't commit yourself to a framework
>>
>>55022377
guessing by 'static delivery' you mean html generated serverside. you can generate your views serverside or clientside. google indexes html generated clientside since late last year, so SEO is not an argument for delivering html anymore. pratically everyone has javascript enabled. SPAs consuming json use far less bandwidth because they avoid the redundancy of delivering markup. the only good reason to deliver html these days is if you've got a completely undynamic site (like a blog), in which case you should use a static site generator and deliver actual static files.
>>
>>55029405
nope it's very solid. boringly so
>>
>>55031605
give it a higher z-index and absolute positioning
>>
>>55031669
i never use css frameworks, but rely heavily on js virtual dom libraries. anything else js I write myself (ajax, utilities etc). using webpack to build.
>>
>>55032620
no it doesn't matter
>>
Do any of you do web dev. on the side to supplement your normal income? I'm a college student new to all this, heavily considering trying it out just to make a little bit of money while I'm still studying. Thoughts? What are your experiences?
>>
>>55035987
>2010
>made a website for my aunt
>her small business friends also asked me to make a website for them, which got the ball rolling
>didn't know a lot of webdev back then
>didn't feel like doing it so asked 20 euros for every 20 minutes
>they all accepted
>asked them what the sites would look like and build it
>made some shitty sites

>2016
>people still ask me to update their site for money
>still get random cash from it
>because the websites were build to meet shitty designs of clients the .css and code is a mess and I'd prefer to replace the entire things
>>
>>55018885

Heyo, trying to get my feet wet in fullstack web dev and was wondering how you website warlocks think LAMP stacks (which have been tested super thoroughly) compare to newer stacks like LYME and MEAN, which use one language (Erlang and Javascript respectively) for everything.

>and yes, I totally had to restrain myself from asking how you think they "stack" up to each other huehuehuehuehuehue
>>
>>55036377
>2016
>using 'stacks'
>not picking the right tool for the job
But a great combo is
Nginx (for ssl termination/static files) -> Golang/universal js (Golang for apis/universal js for those that must render on the server) -> postgres or dynamo because fuck managing databases
>>
>>55036319
Interesting, ty for sharing. Back then, how much did you know when you designed your aunt's site? I'm wondering how much I ought to know before I take on a client. Undoubtedly I'll have to learn Javascript and such (still working on the HTML & CSS part), but going beyond that, what other tools ought I know before taking on a request? Or can you 'get by' for the time being just knowing those three things?
>>
>type random shit into github
>check out various repositories
>get btfo by all the crazy code
All these things that I didn't even know that were possible. I feel enlightened.
>>
>>55036716
>>55036716
some examples?
>>
>>55036877
const script = document.createElement('script');

script.textContent = `'use strict';try{(${func})('${action}');}catch(e){console.log('Fisher injected error',e);};`;

I never thought of using strict mode or try/catch in a variable.
>>
>>55036952
ah, JS...
>>
what is better for webdev, arch or win10 ?
>>
>>55037881
it doesn't matter.
though windows has its problems with npms trillion nested dependency directories.
>>
File: ImIn!.jpg (42KB, 500x496px) Image search: [Google]
ImIn!.jpg
42KB, 500x496px
Newb here.
Im looking for a vps but dont know what os to get. I know i wanna remote desktop so im guessing i narrows it down to windows. If i go for the (http://cheapwindowsvps.com/vps.php) lowest package should i go with windows 2008 os? Is there any downside or lack of support for an os that old? Should i go with windows 7 server os? Please help me.
>>
>>55038290
what do you want to run on it?
and 2008 is really old, there's 3 newer versions available already.
IIS7 lacks SNI support, websockets and other modern features.
>>
>>55038290
>windows
lol
>>
File: 1459743885323.jpg (34KB, 460x410px) Image search: [Google]
1459743885323.jpg
34KB, 460x410px
>>55038314
I just want to launch a resume site, webapp projects and sql databases. I just need something to learn on.
>>
>>55038356
unless you plan to get a job in a windows server environment or plan to run windows only software don't.
I've switched from windows server to debian half a year ago. Mono is reliable enough to run ASP.NET now and ASP.NET Core runs natively on it anyway.

You definitely should not base your decision on having remote desktop.
>>
>>55030491
The new 1.7 amd64 SSA compiler backend produces 5-35% faster machine code, so it should be able to beat Java now in most cases. Now we wait for all other architectures to get new backends.
>>
File: loserelrato.jpg (91KB, 648x751px) Image search: [Google]
loserelrato.jpg
91KB, 648x751px
>>55038380
So like Ubuntu?
>>
>>55038290
>windows VPS
Unless you are a C# dev, learn some basic Linux administration.
>>
>>55018885
Is there any reason at all not to use JQuery?
>>
>>55038611
If you're just doing a simple website with only a few JS lines stick with vanilla, otherwise JQuery.
>>
Anyone ever use the Google firebase? Is the free package per project or per user?
>>
>>55038611
If you are performing tight loops, jQ will slow you down several hundred thousand times.
>>
>>55038611
to be honest, back in the days where I needed to support IE6 it was very handy.
But today with promises, queryselectors, foreach etc I rarely need it anymore.
>>
File: a.jpg (63KB, 1280x720px) Image search: [Google]
a.jpg
63KB, 1280x720px
Any opinions on Cycle.js/RxJS/FRP in general?

How do you guys manage state in your application?
>>
>>55039027
Never used any of those, but I generally just pass state around in objects. If I need to do something eventful, use Proxy. And if I need something more complex, have a little state machine class for that.
>>
What are you guys working on?

I just finished the routing stuff on my framework and now work on fixing my deployment system.
>>
>>55039408
Trying to make my own personal streaming platform so I can watch stuff with friends together
>>
>>55039446
I did that. What are you streaming with? I've yet to find a way to make DASH/HLS have less delay.
>>
When to use querySelector over getElementsByWhatever?
>>
>>55039625
it doesn't matter.
whatever your preference is that yields the desired result.
>>
>>55039647
There is no impact to speed?
>>
>>55039663
don't get lost in micro optimization, it won't matter if you aren't calling it thousands of times in a row.
>>
>>55039663
There is, but the gap is not as big as querySelector -> jQuery, so it won't matter as much.
>>
>>55039459
This is my first serious attempt on trying to code something, I have a friend that can do C#, so were both gnnna learn something. Been studying some books / links from the OP, I tried some stuff in the past but never something serious so as of now im trying to discover things
>>
A backend question.

Is an IP check good enough to verify that connecting client is actually the server I have given a static IP for on LAN or should I do something else?
>>
>>55039625
getElementById is much faster, relatively. But using id's to reference elements is a bit trashy.

Prefer querySelector or use a framework that abstract the dumb shit you have to do to manipulate the DOM
>>
The best Dutch vps provider is the same as the best Dutch registrar. But I want to separate my domain and VPS. And I don't trust foreign companies with my assets.

What a pain.
>>
>>55039836
>verify that connecting client is actually the server
what? I don't understand what you are writing.
>>
>>55039836
Context?
>>
>>55039849
>>55039855

Two apache servers on different computers on LAN. One for public, other for backend stuff that should only be accessed by the first.
>>
>>55039884
IP is for routing. Use a client certificate or an Api key
>>
>>55039884
oh, so you mean check that requests come from the reverse proxy
yes we do that at work, because the backend server has to trust the x-real-ip http header, which a client can easily fake.
though we do have a firewall between too.
>>
What to use for UI rendering with Clojurescript? React after all?
>>
Is it better to attach an event listener to a button in the script or should I just bind "onclick" functions on the HTML?
>>
>>55021409
How the fuck am I supposed to do webRTC without javascript?

How is p2p suppose to work w/o javascript?
>>
>>55026061
I've made an omegle clone with it.

it's in no way, shape, or form production ready. Especially with it's lack of browser support/early browser support. But it's fun I suppose.
>>
>>55041192
Om
>>
>>55021409
>t. pajeet kumar patel

im sure you can explain why perosnal home pages is the only elite programming language ill ever need. oh yeah and python. ha.
>>
>>55041300
What?
>>
>>55041886
Is it better to use
<button onclick="myFunction()">Click me</button>


or
<button>Clickme</button>
btn = document.querySelector("button");
btn.addEventListener("click", function(event) {
//TODO
});
>>
>>55041961
never ever ever ever do the first.
separate code and markup.
>>
>>55041961
Never use the former.
>>
>>55041974
>>55041988
not him, but what could go wrong ?
>>
>>55042022
Bad practise. Can lead to bugs and mangled codebases.
>>
What is the best hosting service if my site is to deliver lots of user uploaded content (videos, images etc)?

Going with AWS for storage, but im talking about the actual site and database. Or does amazon provide hosting for that aswell?
>>
How do I mix TinyMCE and Emojione? If I add TinyMCE, then emojione lookup stops working altogether.
>>
>>55041974
>>55041988

I dont fully understand this. If i have the onclick in html i can easily send parameters with it. How do i retrieve these parameters in an eventlistener? Where are the parameters supposed to be retrieved from in the first place even? Mind is full of fuck
>>
>>55042469
Yes, it does.
>>
>>55042469
You can use an ec2 instance for hosting your site. And possibly put the database software on the same ec2 instance, or give RDS a try.
>>
>>55042739
you can use datasets to associate data with elements

<a id="button" href="#" data-action="do something">link</a>


document.querySelector("#button").addEventListener("click", function (event) {
event.preventDefault();
console.log(event.target.dataset.action); // will print "do something"
});
>>
>>55042044
>mangled codebases

Can confirm. My company inherited a pajeet tier codebase full of this shit, and it's a pain in the ass to hunt down where anything is defined or happening in the code.

The important part is consistency, so if you choose one way, keep doing it that way. But definining it in the JS is more flexible, so if you do what everyone else is suggesting, you won't be as likely to code yourself into a corner.
>>
>>55018996
>tripfag calling other people faggots
>>
>>55041315
I'd be interested in seeing that.
>>
>>55043411
https://om-saiyanlogo.rhcloud.com

The source code is also available
https://github.com/saiyanlogo/om

Needs a lot of cleaning up and work though.
>>
File: 123.png (5KB, 600x167px)
123.png
5KB, 600x167px
Getting into React and Redux and i can't find any information about what's the best practice to get data from the back end into your app. How do i do it, when do i do it, do i get all the required data for all components once at app load, or should i get data in required chunks for a single component at component load (mount?), how do i use ajax to make requests?

PS. what app should i create to practise the framework skils (Fuck those lame ass todos)
>>
>>55044074
http://redux.js.org/docs/advanced/AsyncActions.html
>>
One question regarding communication with Wordpress and Angular.

I'm querying one API with Angular and rendering it on my article page. The problem is that I have to pass the string parameter to the API from the WP admin panel because the query is unique for every page. I could make a custom field and put the string there but I don't know how to pass that data to Angular.

I actually can get it but it returns metadata type and I don't know how/if I can turn it to String (because the query doesn't work with metadata ofc).

I'm using get_post_meta() for that btw
https://developer.wordpress.org/reference/functions/get_post_meta/
>>
>>55042469
I don't use Amazon because the pricing model confuses me.
>>
File: 1425096812724.jpg (294KB, 760x901px) Image search: [Google]
1425096812724.jpg
294KB, 760x901px
I know HTML, CSS, and Bootstrap JS. What else should I learn?
>>
>>55044147

Also, I thought of one ultimate Pajeet tier solution kek, but I really don't want to use that.

Basically, create a hidden tag where I put the data from my custom field and then parse the DOM with JS to pull it and pass to the function.
>>
>>55044191
have you done small projects ?
I am on the same level. for practice I code small apps like a weather screen, twitch api app, tic-tac-toe game
>>
>>55044191
What do you mean Bootstrap JS? Bootstrap is a CSS framework and JS is something else.

Anyway, probably some backend language like Node and some SQL for databases. Then you could learn React, Angular or something similar.
>>
>>55044191
a backend language. Also you only think you know js.
>>
Hey /g/. I'm interested in working on a small project to test my PHP skills. Anyone wanna write an imageboard?
>>
>>55044663
Ouh, if you wanna test your skills, why don't you write the imageboard on your own?
>>
>>55044681
I just think it'd be a fun project to do with other people.
>>
>>55044074
Use redux-thunk or redux-saga to create asynchronous actions
I'll give you an example using redux-thunk and an action creator
// actionCreator.js
export function fetchData(body = {}) {
return dispatch => {
// set current state to 'fetching', useful to display a loading icon for example
dispatch({ type: 'DATA_FETCHING' })
// just use the fetch api (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), it's way easier to use than standard ajax
fetch('http://foobar.com', { method: 'POST', body })
.then(data => data.json())
// set current state to 'received' once we get and parse the data correctly
.then(json => dispatch({ type: 'DATA_RECEIVED', json })
}
}


// MainComponent.js

import React from 'react'
import connect from 'react-redux'
import { fetchData } from './your/path/actionCreator.js'

// here, we just collect the small bits we want from the global state (redux store the entire app state in one object)
// to make them available in our component as props
@connect(({ isFetching, json }) => ({ isFetching, json }))
export default class MainComponent extends React.Component {

// fetch data once the component is rendered
componentDidMount() {
dispatch(fetchData())
}

// .. and redux automagically set props according to current state, all across the components tree
render() {
const { isFetching, json } = this.props
if (isFetching) return <span>fetching!</span>
return Object.keys(json).map(k => <div>json[k]</div>)
}
}


That's assuming you have reducers and store already correctly configured
>do i get all the required data for all components once at app load, or should i get data in required chunks for a single component at component load (mount?)
I'd personally fetch all data in a root component and extract parts needed in sub-components, it prevents costly round-trips to the server, but it would depend on the use case I guess
>>
>>55044253
I've done a couple school based websites that I've given to my younger friends. Like summarizations of courses and shit.
>>55044271
I meant JS itself, I learned that at a basic level.
>>55044474
Oh yeah there is so much shit I don't know yet.

Thanks for all the replies.
>>
Is it possible to initiate a phone call on the device from a web browser?

In other words, can if the user clicks on a phone number in the browser, it tells the device to call that number?
>>
>>55044938
Like VOIP?
>>
>>55044938
<a href="tel://number">click to dial</a>
>>
>>55044663
And thus another shitty PHP imageboard is born. https://flash.moe/overscript/
>>
>>55032682
What do you suggest?
>>
>>55044147
Any help with this?
>>
Best IDE? Tired of emacs...
>>
>>55046070
WebStorm.

VS Code is also an interesting case. It sits somewhere between an editor and an IDE.
>>
Is there and editor on windows, or a plugin for notepad++ or something that automatically applies correct indentation on a html document?

I wanna study the structure of a page from 4chan for example, but when I view the source in my browser its all stuffed into one single line, and if I download the page the formatting is even worse.
>>
>>55045782
Go, Elixir, Node or C#.
>>
>>55046209
Chrome does that automatically.
>>
>>55046209
>I wanna study the structure of a page from 4chan for example
Why can't you just use chrome's debug tools?
Also keep in mind that 4chan's layout is a mess so you shouldn't take it as an example of good HTML.
>>
>>55046268
Not the guy you're responding to but I'm giving Elixir+Phoenix a spin soon because it's an approachable form of functional programming which makes it interesting. After that I want to try a couple of projects in Go and Swift.
>>
>>55046333
Well, the inspect element tool on firefox does the trick too.

What I was wondering was how would I make a regex to extract all the text from all the posts in a thread. That's why I wanted to see in what kind of elements is the text placed.
>>
>>55046552
>using regex to parse HTML
Don't.
Use the JSON API, it exists for a reason.
>>
>>55044663

>PHP

My man.....why?
>>
>>55046573
Well, I never dabbled in any kind of web related programming, except when I had to in some classes. I think I don't even know what's JSON.
>>
>>55046552
>regex on HTML
No, just no.
>>
>>55046573
I know that if I've never done stuff like this I am probably not gonna understand any explanation on the net, but I can't even find anything on using JSON to extract data from a html page.
>>
>>55046732
JSON is a data format, not a way to parse HTML pages.
You can get JSON versions of most pages on 4chan at a.4cdn.org.
https://github.com/4chan/4chan-API
>>
react or angular?
>>
>>55046753

both
>>
>>55046552
Don't listen to
>>55046573
>>55046638
In your use case, using the 4chan json api is indeed what you want to use for obvious performance reason, but it's totally fine to extract part of html using regex. That SO post they're implicitly referring to (http://stackoverflow.com/a/1732454) is very funny, but it was just a rant about _parsing_ html using regex, not picking a part of what could be considered as a big string

>>55046753
>Angular
>2016
React
But anything but angular, really
>>
>>55046732
You don't use Json to extract data.

json IS the extracted data. https://github.com/4chan/4chan-API
>>
>>55046607
PHP isn't inherently shit, it's just really easy to write shit code.
>>
>>55046801

It's quickly becoming an obsolete language.
>>
I fucking hate go as a language
But it's the fastest while having good dev time and maturity
Can't wait until nim/crystal/whatever languages that support generics and macro become more robust and mature
>>
>>55046903
What do you hate about it? Aside from no generics that is. They take too long to compile and that is what's keeping them out of the language.
>>
File: 1-GS-t3eNz9Jy7YWKIxxmJPg.png (25KB, 400x400px) Image search: [Google]
1-GS-t3eNz9Jy7YWKIxxmJPg.png
25KB, 400x400px
>>55018885
Anybody ever write a chat application, or have any experience with one?

I'm thinking of copying the omegle format for UI. Backend would be some kind of sql database with python to handle requests/routing.

Also thinking of using Electron rather than Java for crossplatform. Any experience with this also?


I took a look at some examples but shit is confusing af. Everything 100% javascript with little to no css/html
https://github.com/moose-team/friends
https://github.com/geeeeeeeeek/electronic-wechat
>>
>>55047017
I have.

How do you plan to handle update propagation?

None, but why aren't you using a web browser?
>>
>>55046992
It requires too much boilerplate
I like having macros and syntax sugars that make the language expressive, allowing one to read what the code is about in one go, without having half total lines of error handling.
Nim have generics and is equally fast to compile
Uppercase for public variable definition wasn't a great idea either, and makes working with json particularly annoying
And those are the only annoyances that I can think of right now, but there are a lot more

>>55047017
>chat application
This is one of the rare case where you'd better off using a (good) nosql database like rethinkdb, or even an in-memory database like redis which are way more suitable for realtime than classic relational database
>Everything 100% javascript with little to no css/html
This is normal if you use a js framework, which you should be using if your application starts to grow bigger for obvious maintainability reasons
>>
File: SOCKETIOICON.gif (5KB, 407x409px) Image search: [Google]
SOCKETIOICON.gif
5KB, 407x409px
>>55047121
I was thinking about using socket.io for real time updates between client/server.

Also there's no reason in particular that I'm not doing it web based other than wanting to experiment with Electron.

One thing is that the application won't have that much traffic. Less than 50 people using it total. And the majority of the traffic would be within one chat group.

>>55047226
Redis would be nice to use, but I'm thinking about keeping the chat logs for a while. So I may end up using some combination of the two.

Why do you say nosql would be better for realtime data?
>>
>>55047226
Yes, macros is something I would like to see myself in the language proper and not a preprocessor. I can understand it making code slightly less readable in large teams, but not that much.

I've worked on a chat-like-thing with both Redis and RethinkDB and honestly don't recommend using the former for it. Its lack of more complicated data structures is a major pain and forces you to either store JSON strings or split data structures over multiple keys. All values being strings is no boon either. And of course being entirely in RAM means your chat is hard capped to free memory amount. RethinkDB has a really nice query language, helpful WebUI, good performance and you can do so much with their change feeds.

>>55047333
A chat message is atomic and hardly relational, so there is little reason to go through the overhead of SQL queries and little to gain from ACID.
>>
>>55047454
I think you would loose information using nosql in some cases.

Ex: Find all the messages between two users(including private chat and in a chat room)

Additionally if you wanted to manage your users independent of chat information you'd have a hard time doing that easily.
>>
>>55047556
>Ex: Find all the messages between two users(including private chat and in a chat room)
I don't see how that can happen, unless you use MongoDB.
>>
>>55047556
nosql doesn't mean no data integrity
nosql dbs usually have some sort of consistency guarantee which, while much less sure than ACID principle, still does the job very well for most use cases. Not everything needs banking level of integrity after all.
>>
>>55047633
>>55047631
Ok I'll probably have to go readup on nosql again. I've just been hearing everybody shit on Mongo for it's lack of integrity for both read/writes.
>>
https://www.youtube.com/watch?v=JWaDa8taiIQ
>>
>>55047646
Mongo is just a shit DB. A few threads ago somebody posted an article about a newly-discovered bug. It seems that documents disappear from the DB, while they are being written to. Meaning that this will cause a wall of problems with more than one thread accessing the DB at any time (which ironically does not happen with Node.JS). Knowing their track record, this issue will be fixed in a few years.
>>
>>55047633
>>55047772
its interesting that the nosql databases that people like are written in erlang like couchdb and riat
>>
>>55047801
You can add to that RethinkDB implementing their own mini Erlang runtime in C++ and a LISPy query language.
>>
>>55047333
>Why do you say nosql would be better for realtime data?
I dont consider myself expert or even knowledgable, but nosql basically means its not a relational database. Relational databases are contrained to using tables and sql query languages to query the tables. Nosql databases can use any format, but most often use JSON or any kind of key/value pair to query the database. A nosql database is basically just a text file and the programmer is free to design many kinds of search and storage patterns. I think the reason that people dont like Mongodb is because there is so many different ways to design data storage to it
>>
>>55047772
>Meaning that this will cause a wall of problems with more than one thread accessing the DB at any time (which ironically does not happen with Node.JS)

Nobody runs just one instance of a Node application. The point of it being single-threaded is that you can easily scale it up across CPUs and/or across server by just running a bunch of instances of the same application behind a load balancer. So yeah you will have multiple things trying to access the database at the same time in any kind of node production setup.
>>
>>55048003
No offence, but that's retarded. Didn't people conclude that threads are more efficient than processes back in the 60/70s?

And I was more playing on the fact that someone writes a Node backend talking to Mongo. It works well in developments tests and then fails mysteriously in production. This seems to be general pattern.
>>
>>55048145
>Didn't people conclude that threads are more efficient than processes back in the 60/70s

Node's benchmarks are only marginally slower than Golang's. The point of Node and its event loop is that it spends what processor time it does have doing useful things rather than just sitting around waiting for something to be read from a disk or a database.

Also unlike the 60s and 70s, we don't program computers using punch cards and we don't build CPUs out of vacuum tubes. We have Digital Ocean and Rackspace, so the cost of adding more processors is basically nothing.

>And I was more playing on the fact that someone writes a Node backend talking to Mongo. It works well in developments tests and then fails mysteriously in production. This seems to be general pattern.

Yes, it does help to know what you're doing, regardless of what kind of technology you're using.
>>
Okay, so I built a website and figured out how to host it on 000webhost. I only have one page that's currently being hosted. How do I get more pages to host? Do I need an index.html for each new page?
>>
>>55048658
If you want just another page with a .html extension on it. you just make a file with filename.html as the name.
>>
>>55048929
How do I set it under the same domain and access it?
I uploaded the second filename.html, but what do I type into the url to get to it?
>>
>>55049246
You just type yoursite.yourdomain/filename.html and it's there. Good luck with web development, anon. It's a whole lot of fun once you get a hang of the basics.
>>
Can someone reccomend me a book on CSS that goes into more detail about floats, specificty, responsiveness and general good practice?

I've read multiple books that taught me the basics, but I still suck at it. I want to understand these concepts better. Yes I know there are frameworks and all but I just don't really like any of them, they are too bloated for what I need them for.
>>
>>55049545
>floats
Just use flexbox already.
>>
>>55048658
>>55049246
How the fuck did you get as far as hosting without even knowing how pages work and how to access them?
>>
>>55049614
I taught myself everything I know (which isn't much as you can tell) in like 2 days
>>
>>55049665
What's your site name?

also checkem
>>
>>55049677
http://facebookmm.net23.net/

I know it's stupid, but the point was to put together some content and see how it all works.
>>
>>55049834
You should learn regular CSS before you start using bootstrap.


>using a framework for CSS
>>
>JavaScript Frameworks
Well, I guess if you don't know how to code, and want things spoon-fed to you.

>CSS Frameworks
Why?
>>
>>55049892
I learned a little bit of CSS/html like a year ago, but this was a template that I found.
>>
How would I create a real hotel booking system with an actual payment gateway?

I'm willing to use some pre-existing system obviously as long as I can change some of the css
>>
>>55050116
Use weebly
>>
I have been getting a LOT of trouble these html files I'm scraping

see when you take a ton of elements and invoke element.text in beautifulsoup it is giving me the href as a separate result

so like
<first element>
<second element>
"I am"
</second element>
" smart"
</first element>

invoke element.text on this and it gives you , however the way I am doing it it is also invoking .text on the nested elements and thus retrieving: "I am smart" and "I am" one after another

Can you think of any solutions for this?
Because when there's nothing in the first element position I still need the text in the second element position
>>
>>55049892
what's wrong with using a framework? i'm still learning.
>>
>>55050988
I don't remember beautifulsoup very well, but if you want to get the href... I think you could simply do element["href"]. and to check, you could compare the inner text or something
or try using python requests instead (not sure if that solves the problem, t-b-h, but IIRC, it's way better than beautifulsoup)
>>
>>55018885
>Web client: https://www.rizon.net/chat
your web chat is worthless garbage -- no answers to my inquiry
shoot thyself
>>
>>55052300
these fags should move to freenode instead
>>
>>55052089
You won't learn CSS, but how to use a framework that might be deprecated in a year.
>>
>>55052096
no, I know how to checking href but I can't disallow it because some elements are only href and I still need the text.

I think I'll invoke .parent on each element, and if the .parent has a certain set of conditions I'll go back and use it.
Thread posts: 317
Thread images: 16


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