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

/wdg/ - Web development general

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

Thread replies: 212
Thread images: 30

>Discord
https://discord.gg/wdg
OR
https://discord.gg/0qLTzz5potDFXfdT
(they're the same)

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

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

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

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

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

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

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

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
any other source for the socket.io docs? sites been down all day for me
>>
are there any good solutions to resource syncing game objects over websockets, with fine controlled access rules and subscription patterns, over websockets? FeatherJS kind of almost does it, but it seems a pain anyway. I fear I might have to come up with custom shit for it.
>>
>>59108195
Game objects? You can send over JavaScript objects and have the client render whatever the properties are
>>
>2017
>still using bootstrap and jcurry
>>
>>59108357

why not? Just because you don't want to use it (since you can already go without those), doesn't mean we cannot use it ?
>>
>>59108861
yes you cannot use it
>>
https://jsfiddle.net/egae2wnr/10/

Does anyone know how I get the clear button to just clear the highlighted cells on the selected tab?
>>
>>59111634
I think a much cleaner approach to this would be having the state in multiple classes instead of the DOM.
Keep a reference of the tabs, cells and their status somewhere.
Now you just throw them away and have no knowledge of them afterwards.
>>
Any web devs care to offer generic advice to a self-teaching beginner?

Currently working through early stages of Odin Project. I know basics of HTML/CSS and just starting out with JS. I've got the basic add/commit/push routine down for Github. I do also have some graphic design knowledge and have been using Illustrator/Photoshop for some years.

I'm in my 30s and basically a NEET. I have given myself 3 months to study full-time to try and get a solid foundation in mainly Front End. Then I intend to get a wagecuck job and continue to study part-time until I have enough projects in my portfolio/Github to start applying for Junior Positions.

This is really my last chance to make anything of my life. It is probably a long shot but I have committed to it nonetheless. My biggest worry is lack of any experience. I don't want to freelance, my dream is to eventually get employed.

Your thoughts/advice?
>>
>>59111747

Also, Britfag
>>
>>59111747
https://en.wikipedia.org/wiki/Suicide_methods

pick any

Just by your wording I can tell you are barely holding onto life, just relax and let go.
>>
>>59111760

Thanks man
>>
>>59111820
No problems, if you hit 30 as a NEET without knowing something so simple as webdev/full stack you should just kill yourself and do the world a favor.

Could've at least fucked some iq 80 whore and have a kid. But you are too traumatized because daddy hit mommy so you wasted your life watching 24 fps chinese cartoons
>>
>>59111843

Spoken like a true bitter 4chan Autist. No problem, its people like you that fuel my desire to succeed.

Your projection speaks volumes m8. Go and jerk off over your old Fortran manuals you fucking virgin
>>
>>59111947
Cant wait when you fail at that job interview for which you worked so hard and realize how much of a failure you really are.
>>
>>59112144
loser
>>
>>59111676
>Keep a reference of the tabs, cells and their status somewhere.

Do you mean like make an array for all the highlighted cells or something?
>>
>>59112350
an array for tabs, each tab has a child array with it's rows or cells.
clearing would call the clear method of the tab class of the current selected tab.
the clear method would iterate over it's children and clear the selection.
>>
>>59111747
Don't mind the jerkoffs. Keep doing what you are doing and don't let anyone stop you. Protect your dream because there are plenty of losers that will feel better about themselves seeing you give up.

Like anything else webdev can be a bit hard sometimes but eventually you get though the training.

Get used to not knowing or understanding things and teaching yourself how to understand them.

You are embarking on a career or lifelong learning..

Oh.. and don't avoid freelance. it's all experience and extra projects that can enrich your portfolio and set you apart from the hordes of normies trying to get a job as a web dev.
>>
File: Problem.png (78KB, 1266x656px) Image search: [Google]
Problem.png
78KB, 1266x656px
Hey /wdg/.

I am having problem, I really like to use Nightly browser, but for some reason, this is the only browser
that I have this problem with special Latin characters like the problem in the pic.

Any ideas on how to fix? I don't really wanna change browser(if the problem is with it).

Thanks for reading anons.
>>
>>59112144

what a pathetic fucker
>>
>>59112517
look at your meta charset tag, it's fucked.
you can see it in element inspector closing, which it isn't supposed to do.
>>
>>59112398

Thanks anon. Don't worry, I take no notice of "LOL KILL URSELF" nonsense. I've been on 4chan enough years to expect that kind of thing.

I am definitely in it for the long haul. I am not deluding myself with the "Learn to code in 3 months" meme. I fully expect it will be some time before I am ready. I'm just starting out.

I would do freelance projects to help my portfolio for sure. In fact, I think that might be essential. I just don't want to do it long-term.
>>
File: im_a_dumbass.png (718B, 140x20px) Image search: [Google]
im_a_dumbass.png
718B, 140x20px
>>59112536
Crap anon, I just realised I didn't used the meta before charset tag.
Thanks for helping anon.
>>
Are there any other framework or language that is as convenient as aspnet core?
>>
Student here, any Java developer can tell me how is their everyday work and what software do you use? I'd like to be more prepared for it, for now we're learning with Eclipse and doing algorithms, drawing shapes with arrays and object programming. Thanks.
>>
>>59111747
Beginner here, but I work with a lot of programmers (that's why i want to learn webdev).
From what I could grasp you have to get a good foundation in programming for your code not to be a big mess so learning another lenguage besides JS is recommended (Checkout CS50 you can learn C basics and some python).
Try to always look for the best practices when writing code, comment the right things, etc.
Also always do practical exercises.
After learning vainilla JS try to learn a "hot" framework like React to get a better CV.
Sorry for the bad english, i'm usually a lurker here and don't write too much. Best of luck!
>>
File: wp.png (19KB, 200x200px) Image search: [Google]
wp.png
19KB, 200x200px
Is it possible to use webpack to remove unused CSS during the build?
>>
>>59113282
Such a feature wouldn't be very reliable. It would have to comb over js as well for potential class manipulations.

no
>>
When should I be using a template engine?
>>
New to web dev. Riddle me this: Why should I make an API server that has routes and delivers html documents when I can just let the user access the documents directly?
>>
>>59113602
because the documents aren't dynamic.
>>
>>59113602
API gives a universal interface +
It's not very safe to have users interact directly with a server in that manner
>>
>>59111747

I'm in the same situation as you, relatively.

I am fortunate enough not to live with my family, but that makes me pretty dependent on my partner which feels awful. I am going to turn 27 this year and have nothing to show for it but an associates degree in general studies and 10 years of random jobs.

I don't own a car, but have a shitty part time job at least and some small savings.

I would like to start a small business in development and do freelance with the goal of gainful employment. This is a field of young folk though. I feel my life slipping away, every day.

The apathy and dread consumes me. I am intelligent and capable, but have no motivation. I content myself on geopolitical circle jerking, weed, my girlfriend, and playing games with my friends(who are all gainfully employed as high level programmers, scientists, and IT people... Masters degrees, etc.)

I can't seem to get over the fact that the shit I am still unable to motivate myself to power through, such as learning web dev, is shit I could have literally learned when I was 16 fucking years old. I knew HTML/css and how to launch a page when I was like 13 years old.
>>
File: 3Gt2MUh.png (1014KB, 1152x864px) Image search: [Google]
3Gt2MUh.png
1014KB, 1152x864px
>>59107802
Any good online guides to build a responsive webpage without too much bootstrap?

Like, I want to build a clean site with pure html/css but I don't want to use bootstrap as a crutch.
>>
>>59113942
https://developers.google.com/web/fundamentals/design-and-ui/responsive/
>>
>>59113978
Nice, thanks!
>>
>>59113632
I can just have some script in the scipt tag that loads a bunch of stuff no?

>>59113639
Can you give an example of some security problem that could happen?
>>
>>59114235
but those scripts aren't dynamic as well.
how would you load data from a database without compromising it?
>>
>>59113846

I can relate. I've gone past the bawwing stage now, I did it for so long. No choice other than to just get on with it and make something happen.
>>
Working on a WordPress template and I want to acres a hamburger menu on the landing page, but clicking it won't open it. Only using my phone and tapping with my finger does.

How do I make it so that I can click while on a computer and tap when I use mobile. This is my very first time doing this BTW.
>>
>>59114257
OK I think I get it. Because the program runs on the user's computer it will also have access to everything it does. I learnt something new today, thanks anon.
>>
Why is it required that projects inside htdocs have 777 permission so they could be open in browser? Doesnt feel right.
>>
I'm a tremendous Jew when it comes to developing my commercial projects.

Can I use a public domain icon as my website logo if I spruce it up with a background I made myself?

What is the best way to circulate Jewgle API keys? Getting a new phone number in my country is a matter of paying 1 euro for a sim card, so that's my idea of scalability.

Can I use CC-licensed images and icons if I make the attribution inside an HTML comment?
>>
>>59115014
they aren't. seems like your server configuration is fucked.
check what user your server runs under and give that group/user read rights.
>>
Anybody tried Udacity's nanodegree thing for web dev?
I know you can learn the same stuff for free but the other stuff like the code reviews and hiring network seem useful.
>>
>>59111747
Beginner here , i just finish my portofolio las week and i use git to host my portfolio online , is quick easy,Good luky pajet
>>
File: 1486410255585.png (758KB, 800x611px) Image search: [Google]
1486410255585.png
758KB, 800x611px
Would you recommend using react native to build the mobile app of my website? What else is there?
>>
>>59107802
i have basic knowledge in javascript, but i start read this book "Jon Duckett-javascript and JQuery Interactive Front-End Web Development-Wiley (2014)"
>>
I need to make a page with a spinning, twinkling disco ball that shoots out flashing rainbow lights.

Any idea how I would even begin to do that?

Is there a webapp yet that lets me draw frames and animate between them that converts to css?
>>
In JS/Jquery I have a variable that is a table I append to the page. Later I add classes once its on the page, and sometimes I add another table. The issue is, the classes I have added to the last table carry over? How do I get around this?
>>
>>59118711
create a new table instead of reusing the existing one.
>>
>>59118711
maybe give each table an id so you can select the specific table you want to add the classes to and then select the next table for whatever else. idk would need to see code
>>
File: RPS1.png (5KB, 319x185px) Image search: [Google]
RPS1.png
5KB, 319x185px
connection.on('data', function(chunk) { //collect data from user

let USERhand = chunk.toString();


So I'm making a Rock Paper Scissors game with node.js on a telnet server. Pretty simple. but my .on('data') event takes each character as the chunk. How do i use it so that I can fully type "Rock", etc. as the chunk and enter it rather than it auto entering whenever I enter a character
>>
>>59118779
buffer the input until you find a newline, then process the buffer.
>>
>>59118824
Thanks, I'm a bit new to node.js, how exactly do I put that into code?
>>
>>59118850
http://stackoverflow.com/a/23118480
>>
File: 1462724269548.jpg (57KB, 420x420px) Image search: [Google]
1462724269548.jpg
57KB, 420x420px
/wdg/ are node.js microservers (i.e. servers with just a single purpose) interconnected via rabbitMQ messages a good way to handle various layers of authentication and authorization?
>>
>>59116002

Please reply, goyim.
>>
var handsTable = (function () {

rangeGrid = $("<table oncontextmenu='return false;' class='handsTable' />");
var rows = [];
var row;
var i;
var j;

for (i = 0; i < allHands.length; i = i + 1) {
row = $("<tr />");
for (j = 0; j < allHands[i].length; j = j + 1) {
row.append($("<td />").html(allHands[i][j]));
}
rows.push(row);
}
for (i = 0; i < rows.length; i = i + 1) {
rangeGrid.append(rows[i]);
}
return rangeGrid;
}());


That is the function, it gets the data from an array that never changes so I have not included that.
>>
Anyone have the book JavaScript and jQuery by John Duckett? If so is it worth the money?
>>
File: 1466800367189.gif (94KB, 500x275px) Image search: [Google]
1466800367189.gif
94KB, 500x275px
>>59119500
Why would you need a book about JavaScript?

Why in the WORLD would you need a book about JQuery?

https://www.w3schools.com/js/
https://www.w3schools.com/jquery/
>>
File: handstable.png (9KB, 577x69px) Image search: [Google]
handstable.png
9KB, 577x69px
>>59119046
are you >>59118711 ?

the classes don't carry over, you are doing something severely wrong somewhere else.

also, why are you pushing into an array when you iterate over it anyway, why not append your row right away?
>>
>>59119544
I don't need one, I just prefer having a physical book.
>>
Can I use JS to read IRC? Vanilla preferably.

I dont want it to touch my server resources. All on the client.

I'm trying to read Twitch chat.
>>
>>59119699
No, check if they have an API
>>
>>59119724
Yeah but not for chat.

I found TMI.js but that uses node. Isnt there a way to read IRC without node? Node didnt always exist and I remember IRC websites.
>>
>>59119608

Yes, that was me, this is my fiddle

http://jsfiddle.net/egae2wnr/13/

I did it this way from the array because later on the app will need to use it for something else, so it made sense to just write it once.
>>
>>59119844
You can't make TCP sockets from the client, would need to be tunneled using websockets and your own server.
>>
>>59119850
I don't even think you know what you're doing there.

>gridContainer.append(handsTable);
you're appending a function to a table.

scrap everything, grab a book for modern JS. this shit is spaghetti all over the place.

I'm out.
>>
>>59119844
If you just want to be able to read the chat, you basically want to make an IRC bot. Twitch has documentation on how to do that:
dev.twitch.tv {slash} docs {slash} v5 {slash} guides {slash} irc
>>
>>59119884
Bummer. I'm reading on how to run node alongside LAMP.
>>
>>59120031
You can write an IRC bot in php or basically anything else, you don't need to use node.
>>
>>59119999
Doesnt seem to be able to read messages though. Looks like I'm using node.

Also you can link a twitch by adding a linebreak like
dev.twitch
.tv/docs/v5/guides/irc
>>
>>59120087
>Doesnt seem to be able to read messages though.
That is literally exactly what it does.
>>
Hey /wdg/
I want a captcha solution for some of my projects that doesn't phone home to third parties, and is still difficult for bots to solve. Does the pre-google recaptcha fit the bill? Or some php captcha generator library?
>>
>>59121039
This is a good question and I want to know the answer
>>
>>59119544
>>59119500
Jon Duckett-javascript and JQuery Interactive Front-End Web
http://javascriptbook.com/code/
>>
I want to install cmus in the new winfows unbuntu bash. Has anyone here done it with pulse
>>
File: messages.png (14KB, 425x324px) Image search: [Google]
messages.png
14KB, 425x324px
What's wrong here?

window.alert(parsedMessage.message); properly alerts, but none of the lower conditionals do anything.

Even when I send 'a'

It will say a but then the conditional doesn't recognize it as 'a' so it doesn't do anything.
>>
When I convert to unicode, I get the following
\u0061\u000D\u000A


This *SHOULD* just be the letter a.

Is there a way to get rid of the extra stuff?
>>
>>59121748
>>59121573
Got it.

I just substring off the last 2 characters in the string.
>>
Just put together a small functional website with bootstrap + jquery but it looks like absolute shit. How do i git gud at styling. I really want this to look hip and stylish, help me out lads.
>>
>>59122177
>bootstrap + jquery
You could start by not using bootstrap + jquery
>>
>>59121573
>using the evil == operator
>>
Is there a guide somehow on how to set up my own server for someone who is a complete retard and only knows html/css/some javascript?

I want to start learning javascript better and i feel like if i could start testing code and trying to make some kind of program it would help me learn.

The problem is, i am a complete retard. I am trying to read you dont know javascript and i am just not fulling understanding everything. Maybe this shit is too much for me.
>>
>>59123243
What's wrong with '==' in js? I've always used it instead of the '===' operator because I've never got to a point where I need to type check.
>>
>>59123261
Just fuck off and use === you moron. There's a reason why it's drilled into anyone who learns JS to always prefer the use of === over ==.

It's fine for you when you want to be a retard and make your stupid shit no one cares about but don't do that shit if you actually start working for someone else.
>>
File: chrome.png (32KB, 512x512px) Image search: [Google]
chrome.png
32KB, 512x512px
How do I test my CSS changes on Chrome on the current page I'm on?

On Firefox all I do is just hold Shift + F7 or Ctrl+Shift+I to open the Style Editor, scroll to the bottom of the stylesheet page and paste all my CSS. Does Chrome have anything equivalent to Firefox's Style Editor?
>>
If I were to make a game that involves interaction with the canvas (for example drawing) how would one prevent people making scripts to insert their own images to the canvas and uploading to the server?
>>
>>59123325
I still don't understand since people also seem to use typeof variable === "string" in their checks. Is there any reason for this? I just explicitly type check.
>>
>>59123331
Nevermind, I figured out a workaround albeit a bit more cumbersome than Firefox's style editor. I just change the page source, and at the bottom of the <head> block I just type in <style> and </style> and paste the CSS between those tags.
>>
>>59123243
I've been using it since the 90s.
>>
>>59123231
any suggestions?
>>
I'm making a trivia thing for twitch streamers.

Read from file sucks.
>>
>>59123600
Put the questions in a database - it was made for that.
>>
>>59123628
I'm allowing them to do everything locally since I don't want to host it.

Basically 1st line is the question
additional lines are potential answers. The correct answer starts with an asterisk.
A blank line separates questions.

simple.
>>
>>59123600
Have you tried in memory sqlite?

I haven't tried it myself though.
>>
>>59123641
Put everything in an sqlite database?
>>
Tell me about web development. Why do you like it? How did you get into it? What's your secret about your web development?
>>
>>59123699
It brings food to the table, where I just need to google solutions most of the time and debug based on experience.
>>
Ok, reading textfile not working. Letting them run on my db with twitch auth. I wanted to avoid this :(

I swear back in the day I was able to read dat files with js. That was almost 20 years ago though.
>>
I don't get redirect uris...I don't want it to redirect...I just want it to connect and get what I want it to get.

What's the point of redirect?
>>
>>59123558
learn sass and make your own reusable conponents
>>
Dude I don't fucking get APIs

I can get authenticated and get a token, but there is no directions for making a request with the token. It doesn't say what to send in my data object or anything. WTF
>>
Having web development as my day job, I weep at these questions in this thread.

You are asking incomprehensible questions already. Provide some context so that the real question can be somewhat deduced, and we might be able to come up with some answer that will help.

>>59124276
API just means interface. Not all of them are the same, nor do they implement authentication the same way. Usually they do use http authorization header, but provide context.

>>59124077
? What's the not point of redirect ?

>>59123489
You can't. Some heuristics perhaps.

>>59124011
Are you trying to read a file from server or client computer? XMLhttprequest will work for server resource.
>>
>>59124392
3 of those questions were mine and I'm web dev too.
>>
>>59121573
Are you going to write the whole alphabet like that?
>>
>>59124524
No. Prototyping.

That's way down the list of shit I need to do right now.

I just realized I've had 200 calories today.
>>
File: 1440071256822.png (413KB, 474x960px) Image search: [Google]
1440071256822.png
413KB, 474x960px
>>59124491
I guess you must be working at stack overflow.
>>
>>59124625
Nope. Real company.

I'm just a pro at rubber ducking.
>>
File: 1486774446367.jpg (13KB, 414x415px) Image search: [Google]
1486774446367.jpg
13KB, 414x415px
>get job at start up as server engineer
>all the front end guys are from some coding bootcamp
>server guys are all cool and from unis and have real experience

I start in 2 weeks, how shit is it gonna be? I've previously worked as an embedded systems developer and have no idea what to expect
>>
>>59113846
>This is a field of young folk
Jeez, dude, we're 26, not 56.

Don't dread so much, we're all gonna get there, bro.
>>
Who here uses Go? Just started Hello World tonight. I come from PHP. Interested in chatting?
>>
>>59122177
Maybe try drawing out the page ahead of time to get a good feel of how you'd like it to end up.
>>
>>59125452
It's really nice, just learning on how to make APIs with it, really confused about AUTH with it.
>>
>>59116002
There are some services where you can "design" your own logo from stack assets they have. Just apply text and receive shekels.
>>
lol, web development

how do you guys feel that your area is constantly being flooding with new bootcamp graduates and math / business / accounting graduates?
>>
>>59111747
how do you even make it to 30 without learning a useful skill? what the fuck did you spend your life doing?
>>
>>59125507

it doesnt matter where they come from, a toppest tier programmer also emerges out of the bunch, wherever you work

pro tip: if its not you you suck
>>
>>59125507
garbage input garbage ouput, we'll survive.
>>
>>59125507
I worry more that blue hairs seem to be, in some sense, a majority of the industry. I don't want to lose a job because some unhinged shemale didn't like me not wanting to use their 'proper pronouns,' or being unconsidered because I'm not black, brown, or female.
>>
>>59125652

those people definitely get pushed into the industry for political reasons, but again, the real programmers still make it bigger. who cares if you have less twitter followers?
>>
>>59125488
link?
>>
>>59125652
Sometimes I'm grateful that I live in a third world country that doesn't have designated shitting streets or sjw whales in our job market.
>>
>>59125665
>tfw almost 700 twitter followers
:3
>>59125522
>what the fuck did you spend your life doing?
Also curious. I'm guessing retail and anime.
>>
>>59125720
I'm guessing 35% are bots, 60% are followbacks, and 5% are people who were actually interested in you.
>>
>>59125763
Nonsense. I'm a streamer. 0% are interested in me.
>>
File: Saikawa01.png (785KB, 1060x1080px) Image search: [Google]
Saikawa01.png
785KB, 1060x1080px
Are Angular2 routes the same as something like Express routes? I'm doing the Tour of Heros tutorial but this shit is so confusing.
>>
>>59125796
>Streamer
I do not envy you. Good luck.
>>
>>59125803

>js
>>
New-ish to webdev. Know HTML/CSS & messing around with PHP/Mysql.

I want to make a trello clone as a project, to learn a little. What languages or framework should I use?
>>
>>59126011

depends on if its the app version or not, right? if on ios then obj-C, if on android then Java. For the web app version you could use python, php, or node (if you wanna try js out for your back end though i wouldn't recommend it)

honestly for a project that big you should use Go or Hack. It's not a very beginners project. Make a 4chan clone or simple blog with PHP or Python. But fuck it you could also try to write your own c++ compiler.
>>
>>59126058
You sound like you're just namedropping everything you've heard of.
>>
>>59126076

programming is programming you can use whatever you want
>>
what's a good project idea for beginning asp mvc? familiar with mvc and know basic js/html/css. besides the usual crud functionality, what are some basic things to learn leaning on backend? like authentications, etc. im reading things like knowledge of REST api needed or something like that on some jr jobs. i need some kind of checklist to learn while building some sample project
>>
File: 1287082515916.png (14KB, 438x499px) Image search: [Google]
1287082515916.png
14KB, 438x499px
>trying to find out why my Webpack builds are slow as tits
>find out the extract-text-webpack is making them 3 times slower
wat

>check project on github
>there's an open issue where people are reporting up to 13x worse performances and devs have no idea why
literally wat
>>
File: kame senin watcher.jpg (34KB, 640x480px) Image search: [Google]
kame senin watcher.jpg
34KB, 640x480px
Stupid question here !

What's the standard way of maintaining github repository?

Should you include package.json, wo modules installed?

Let the user run npm install?

What is the github standard practices?
>>
>>59127327
You do not want to commit 50 000 files and 1000 binaries in your repository.

package.json is the way to do it.
>>
>>59127371
If it's three, four, five files in the node_modules you want to upload them right?
>>
>>59127327
Have a gitignore file that is set to ignore your node_modules folder and install every package you intend to do with --save flag
>>
>>59127327
Include package.json (and yarn.lock if you use yarn) and ignore the node_modules directory
Do the same for Bower (bower.json / bower_components) if you're still using it for whatever reason
Let the user install the dependencies
Also try to avoid global dependencies, no one likes them (eg don't require users to install webpack globally, make them use the webpack executable in node_modules/.bin during the build process
>>
>>59127391
No
>>
How big are your webpack bundles? Mine is generating 6MB bundles because it's loading bootstrap, react, axios and some fonts.

What do I do when my bundle.js is loading?
>>
>>59127456
That is entirely dependent on the size of your project and on what you include in the bundle (I generally separate JS files from styles and resources like fonts), but yeah, 6mb is too much
Are you getting a 6mb after doing a normal build or a production build?
Webpack 2 supports split bundles by using asynchronous require's, you could look into that
>>
>>59127456
975KB unminified with comments, pretty much only React + router + redux at the moment.
>>
>>59127456
are you using extractcss plugin for bootstrap? commonsplugin? did you code-split? exclude babel node- modules inside babelrc? If yes then file should be smaller. tweak your config moar!
>>
Out of the learning material what is the best?

I've been currently using a combination of codecademy and freecodecamp but I feel as there must be something better.
>>
>>59127762
I've come to fucking hate freecodecamp now that I've started on JavaScript.
>>
I feel like I am finally making progress on my first JS/Jquery project, /wdg/ has been helpful so thanks for input, one issue I am running into and I have no idea why is that if you add a few tables on my fiddle and highlight some cells in each, the first 2 tabs (Alpha, Bravo) always have the same highlighted cells for some reason. All the tabs after that are as they should be, its just the first 2.

http://jsfiddle.net/egae2wnr/14/
>>
>>59127762
Seconding a request to this answer.

What is the greatest learning resource?

I've found slowly hashing out apps I want to make, the best way, but it's based on my whim and wish; i would like a ORGANIZED and STRUCTURED study with the goal of landing a job. So good resources are needed.
>>
>>59111747
Just programming in general, avoid using else{}.

Use a CSS preprocessor like LESS or SASS. It'll definitely make you less suicidal. Especially with an autocompiler.
>>
File: 2017-02-26 14-02-09.png (53KB, 789x857px) Image search: [Google]
2017-02-26 14-02-09.png
53KB, 789x857px
>>59123505
Not him. Here's a picture that shows how '==' evaluates. The problem with '==' is that it might give unexpected results. It's also a bit slower since it converts both the values you are evaluating.

http://dorey.github.io/JavaScript-Equality-Table/
>>
>>59128000

The Odin Project
>>
>>59124276
Is it an Oauth 2 server? Try sending this header before the request:
Authorization : Bearer $token


Or just go url.com/api?token=token
>>
Just tried using Atom for a simple Webpack/ES6 project expecting it to be complete horseshit and it's surprisingly good
If I can figure out how to get it to do multiple project builds as the same time I might even start using it for some non-toy projects
>>
How do I create a secure website? I want to build a website that can store sensitive data and have different access levels.
>>
Hey /wdg/!

Can someone tell me what the pictures are not being displayed inline horizontally?
If someone knows a better way that would help too.

Thanks for reading.
>>
File: hawlp.png (34KB, 1075x640px) Image search: [Google]
hawlp.png
34KB, 1075x640px
>>59129703
WHOOPS!
Sorry,Forgot the pic.
>>
>>59129723
Those are relative URLs, based on your current directory.

If the address of your page is http://domain.com/directory/subdirectory , or the <base> tag is not properly configured, the browser will try to load the images from a wrong location, giving you 404s.
>>
>>59123253

Halp, should i use node? Or is that dumb?
>>
>>59129798
Not that anon, the images are showing, it just I used anything on that site.

THe problem is that the images are not showing in a horizontal pattern, but instead it's one under the other.
>>
File: CombatServerGrandDesignNoEmbed.png (32KB, 801x301px) Image search: [Google]
CombatServerGrandDesignNoEmbed.png
32KB, 801x301px
/wdg/, I plan on separating my back-end for a turn based browser game I'm making into several lightweight node.js microservices interconnected with RabbitMQ.

Is this a good plan?
>>
>>59129723
Found the problem.
I had to switch the div container max width to something higher than the image size.
>>
>>59125670
designmantic(DOT)com
>>
REACT QUESTIONS

What do you think about it? Should it be learned?

What is the greatest resource to learn it?
>>
>>59130234
scheduler creates servers?
>>
>>59121039
Why not phone home to a first party?
>>
>>59131149
Yes, it is a scheduler in its most literal form: it schedules combat to take place at a certain time, and at that time it will create all the microservices which form a combat server and link them all together (potentially instantiating an entirely new server in the progress)
>>
>>59130198
use display:inline
>>
>>59131280
>>59130198
You're using paragraphs which cause a breakline. use display:inline on the p tag and the image
>>
Looking for inspirations on sites with a nice looking functional header.

Specifically how to show the current user along with ~5 links, small logo and a searchbar.
>>
>>59131313
>>59131280

Even having my problem fixed, I appreciate your help anons! Thanks.
>>
File: 1486675522001.png (105KB, 362x492px) Image search: [Google]
1486675522001.png
105KB, 362x492px
>>59130810
Bump. How the fugg do I learn React?
>>
>>59132296
Make Twitbook 2.0 electric boogaloo
>>
>>59132296
Try the official tutorials and don't forget to breathe.
>>
>>59132296
use vue instead
>>
>>59121039
captchas are pretty pointless when you can pay some nigerian $0.001 to solve one
>>
>>59132980
They stop most of the dumb automated bots that just post on all forms they find.
>>
>>59133000
ya but then all you need is basic question or hidden field to stop bots
>>
File: cyka.jpg (23KB, 415x568px) Image search: [Google]
cyka.jpg
23KB, 415x568px
Hey guys, I'm using angular2-materialize and this strange error is really cucking my shit up.

The select dropdown works fine with the materializecss.com example, but when I try to add my own dynamic data, the text jumps to the right.

I did not customize the CSS in any way

<div class="row">
<div class="input-field col s12">
<select materialize="material_select">
<option value="" disabled selected>Choose your option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
<label>Materialize Select</label>
</div>
<div class="input-field col s12">
<select (change)="drawSlider($event.target.value)" materialize="material_select"
formControlName="packageType">
<option value="" disabled selected>Bыбepитe цeнoвoй пaкeт</option>
<option *ngFor="let pricePlan of pricePlans"
[value]="pricePlan.packageType">
{{pricePlan.name}}
</option>
</select>
</div>
</div>


What am I doing wrong?
>>
File: kys2.jpg (67KB, 400x533px) Image search: [Google]
kys2.jpg
67KB, 400x533px
>>59133105

Just found the solution, it was this:

<option *ngFor="let pricePlan of pricePlans"
[value]="pricePlan.packageType">{{pricePlan.name}}</option>


The option text must be between the opening and closing tag on the same line.

Boy do I feel stupid.
>>
File: Otto_von_Braunschweig.jpg (23KB, 359x360px) Image search: [Google]
Otto_von_Braunschweig.jpg
23KB, 359x360px
>>59133348
Don't worry. The path to greatness is to fail and to fail boldly and many times.

The fact that you decided to comment upon your mistake confirms this; your mistake now has greater cognitive weight, so you are unlikely to repeat it again!

One of my greatest idols, Ray Dalio, mentions about this often.

You have inspired me to work harder still...

But enough talk, back to programming and failing.
>>
>>59133105

Stop using all these damn frameworks wtf is going on guys? Just 5 years ago shit wasn't this bloated

Web dev is cancer unless you're using a "low" level language like Python, PHP, Hack, or Go. All these .js frameworks for front and back end is really bad programming. Even Lua is shit for web dev.
>>
>>59133650
it separates logic from markup. You make an API and then talk to it with whatever, be it a phone app, website or anything else.

When you use server side generated html, it's just that, html. You can't use that anywhere but in a browser.

And don't even get me started having to postback for every single change to update the html back then.
No thank you.
>>
>>59119500
Yeah and its pretty good for what its worth. Helped me learn it
>>
>>59135350
freecodecamp:
>curriculum is stuck behind a signup and is littered with signing up for more of their shit throughout their curriculum
>worthless 'certificates' for completing a section
>forced to use codepen.io

The Odin Project
>You don't have to sign up for shit, not even their page for full access to their curriculum
>No promises of pointless certificates
>Encourages actually using the fucking developer tools in your browser instead of just using codepen or jsfiddle

Odin Project >>>>>>>>>>>> freecodecamp

I just wish they taught more than Ruby on Rails for the backend since Angular/React seems to be the newest sex these days.
>>
>>59136275
Shit, that wasn't meant to be a reply
>>
>>59136275
but angular and react are meme front end libraries
>>
>>59136275
Odin Project seems to emphasize RoR. Isn't Rails dying, or have I been misinformed?
>>
>>59113282
Yes by using CSS modules

>>59113421
Importing class references from CSS modules that turn into unique class names on build fixes this problem, if you have unpredictable changes to your classes then there are bigger problems than trying to remove unused CSS.
>>
>>59127303
What do you need ExtractText for in development?(build time for production doesn't matter)
>>
>>59137192
I haven't seen as many people talk about Rails lately, so it might be dying in popularity. If nothing else, you can at least take away back-end concepts from their RoR lessons and hopefully be able to apply them to other back-end tools like Django.
>>
>>59137192
When Rails first came out, it basically had a monopoly on the "batteries included" crud framework / web app generator thing. Since then, hundreds of other frameworks have copied and innovated on the idea. Rails is kind of slow and otherwise fairly mediocre, so there aren't that many compelling reasons to use it for a new commercial product. It's perfectly fine for learning and hobby projects though.
>>
Just made a tool that downloads albums on Spotify via youtube-dl. Happy with this one.

import requests
import spotipy
import os
import urllib
from subprocess import call
from mutagen.easyid3 import EasyID3
import argparse


def main():
parser = argparse.ArgumentParser()
parser.add_argument("album_id", help='The Spotify ID for the album.')
args = parser.parse_args()

urn = 'spotify:album:' + args.album_id
sp = spotipy.Spotify()
album = sp.album(urn)
album_name = album['name']
image_url = album['images'][0]['url']
print('Downloading ' + album_name)

try:
os.mkdir(album_name)
except OSError:
print('Directory already exists. Continuing..')

os.chdir(album_name)
file_name = album_name + '.jpg'
urllib.urlretrieve(image_url, file_name)

for tracks in album['tracks']['items']:
artist = tracks['artists'][0]['name']
track = tracks['name']
query = artist + ' - ' + track
params = {
'key': os.environ['YOUTUBE_API_KEY'],
'part': 'snippet',
'maxResults': 1,
'q': query
}
req = requests.get('https://www.googleapis.com/youtube/v3/search', params=params)
data = req.json()
video_id = data['items'][0]['id']['videoId']
url = 'https://www.youtube.com/watch?v=' + video_id
cmd = 'youtube-dl -o "' + query + '.%(ext)s" --extract-audio --audio-format mp3 ' + url
call(cmd, shell=True)
audio = EasyID3(query + '.mp3')
audio['title'] = track
audio['artist'] = artist
audio['album'] = album_name
audio.save()

print('Done!')


if __name__ == '__main__':
main()


What you think?
>>
>>59138773
nice work. Throw it up in a repo, it could use some refactoring.
>>
>>59138798
Thanks! You think I should break it up into functions? I was thinking that myself desu.

It's up on git and you can install via pip as well.

https://github.com/AnthonyBloomer/spotify-dl
>>
File: file.png (290KB, 1907x934px) Image search: [Google]
file.png
290KB, 1907x934px
post you're webpack bundles

npm install webpack-bundle-analyzer

// webpack.config.js
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static'
})
]
>>
Is there a guide to using Webpack with a asp.net 2.0 web project?
>>
>>59139173
Do web developers just get off on unnecessarily (and it is 100% unnecessary) bundling a labyrinth of files into their project folder? Does it make your dick hard to think "what I'm doing is so important that it takes this much stuff"?

"I mean, yeah, we could just install all this in a centralized place or better yet package it in an IDE which can efficiently handle everything for you and package only the bare minimum that you use on the off-chance that you actually use any of this stuff. But... nah, going to install 200 MB of js files into your project folder just so you can run a script that parses your workspace."

The damn lie that this is done "for ease of development" is beyond laughable and even the excuse that "this is all necessary for compatibility" falls flat to the fact that 99.99% of things that aren't jquery add more compatibility issues than they fix.
>>
>>59139714
Not him but it's hard to understand your exact grievances. Why reinvent the wheel when NPM has modules for pretty much everything? It seems to me that you're an amateur programmer, I was like you once, thinking that using third party libraries was cheating and that I should make everything myself from the ground up.
>>
Anyone have links to non-pajet youtube links on angular 2 and asp.net core? These indian fucks make me want to go deaf.
>>
Which JavaScript guide is better?

Airbnb or Google
>>
>>59140442
airbnb has a javashit guide? lol
>>
I'm making a rock paper scissors game with a node.js client and server and I'm trying to have an option where they can choose to replay the game after. is there something I can use to just reset the connection ? need help quick
>>
File: 8BHYhje[1].jpg (93KB, 630x832px) Image search: [Google]
8BHYhje[1].jpg
93KB, 630x832px
recommend me a boilerplate wordpress theme for bloated bells and whistles desktop version but slimmed down mobile version?
>>
>>59141668
sauce on spider sub species?

could they be captivated?

would they not require as big of a terrerium as a web weaver?
>>
>>59141519
build it into the game

make a if loop statement based on parameters

after a certain amount of points the game ends and if both players dont leave after so many seconds it resets

add a button to find another user

you could build a centralized router kind of like a old telephone operator to connect lines

you could have it randomized based on local zones to increase speed for matches or do global for more users

you could even have a win/loss ratio and to make lower ratio people match easier
>>
>>59130234
I would love to see how this project will turn up. Bumping for the progress of this.
>>
>>59141697
they're golden silk orbweavers
>>
>>59140385
>These indian fucks make me want to go deaf
Then you better try to touch your brain with that Q-tip now, because they're littered all throughout the tech space. Not just webdev.
Thread posts: 212
Thread images: 30


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