/wdg/ - Web Development General

>Previous Thread
>Free resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
freecodecamp.com/
codecademy.com/
bento.io/

>Further resources
github.com/iRaul/awesome-portfolios - Portfolio examples
github.com/kamranahmedse/developer-roadmap - Roadmap
stackoverflow.com/ - Developers asking questions and helping each other

>Tools
jsfiddle.net/ - Use this and post a link, if you need help with your code
caniuse.com/ - Check browser support for front-end web technologies

Other urls found in this thread:

stackoverflow.com/questions/762011/whats-the-difference-between-using-let-and-var-to-declare-a-variable
discord.gg/e3VzeWj
github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits.
scrapy.org/
kev.inburke.com/kevin/dont-use-sails-or-waterline/.
npmjs.com/package/history
hasura.io/
discord.gg/wdg
jsfiddle.net/6aayo60n/
jsfiddle.net/6aayo60n/1/
twitter.com/NSFWRedditGif

should I start using typescript if I work on my own?

also, doesnt typescript make code less readable and you end up writing tons of useless meta information?

// js
var num = 5;
// ts
var num: number = 5;

your png is now optimized

>var

You should learn ES6+ syntax first.

>tfw you try to care so much about writing good commit messages in the 'correct' style ["if implemented, this commit will..." ]
>but then it turns into more of a headache to try and phrase what you have done to the repo in a way that fits that mode of phrasing and also describes what you have done without going over the character limit on GitHub
>tfw you stop caring and just leave vague shit like 'fix', 'this fixes the thing', 'changed some stuff'

TypeScript adds static typing to JavaScript. If you don't know what that means or don't think you need it, you don't need it.

Also, this

>You should learn ES6+ syntax first.
Lol

Duncepil me on Rust.

currently making an Amazon affiliate website. i don't belong in /g

>/dpt/
>dunce pill thread
coincidentally also experts on Rust

I just started learning coding. What's the problem with using var?

stackoverflow.com/questions/762011/whats-the-difference-between-using-let-and-var-to-declare-a-variable

Create tickets of what you need to do, give tickets IDs, write ticketID in commit message.
In Github you have Issues, in JIRA you have tickets.

i.e.
git commit -m "feature/1099 - Added 'Fuck everything' button to UI"

Thank you very much.

>tfw my team leader doesn't permit using es6 syntax

Even though Babel exists? Sounds like one of those people who think that every project must use jQuery.

yep, he and the other senior are old farts who religiously defend backbone (our main technology), underscore and of course jquery.

Join the new Sup Forums discord.
discord.gg/e3VzeWj

Don't worry about it.

>should I start using typescript if I work on my own?
Yes. You from the future will thank present-day you for it.

Hoisting.

Are they any good as devs?
>more of a headache to try and phrase what you have done to the repo
Sounds like your commits are too large. Split them up.
>this fixes the thing
Don't do this. It's a red flag for open source and will not pass code review at most serious companies. Follow github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits.
What kind?

I have a Django web-app that just shows the information I stored in SQL database.
I also have a Pyhon script that fills the database once a day with information it scrapes from other website(s).
The thing is this script works really slow. I'm planning to rewrite it in GoLang. Here's the quiestion. Can I fill the SQL database that my Django app uses with GoLang?
It was easy with Python, since Django is python and I can add any Python to it.
But how do I actually make two applications written in different languages work together?

>The thing is this script works really slow. I'm planning to rewrite it in GoLang.
Sounds like you're solving the wrong problem. Do you actually know it is slow because of Python? Scraping scripts aren't usually CPU-bound.

I think so.
With Python it's one long queue the script has to follow.
With GoLang I can feed the task to a bunch of goroutines to make it run much faster

What scraping framework/library do you use?

>The Odin Project
>Free code camp
>Bento
I'm confused on which one to take. Aren't they mostly the same while odin project is primarly ruby?

>But how do I actually make two applications written in different languages work together?
You make an API, most likely REST.

Beautiful soup for Python, GoQueery for GoLang

Beautiful soup is not quite what I meant by a scraping framework. Try scrapy.org/ and report back before you go full gopher.

Are there any good free alternatives to Firebase? Currently learning front-end webdev and I'm looking for something free to store data as well as a database service.

>People with outdated browsers complaining, that your site is not working.
I don't know whether to give in and transpile/polyfill everything or leave it like that and ignore old browsers..

>You should learn ES6+ syntax first.
I know ES6+ lol, I understand also what ts does and read about its features... I can see the benefits of ts, its just, it looks ugly as fuck with all those extra keywords ... static, private, public... interface... then add :type to every fucking variable.

I like less code, so I can quickly understand everything. Looking at typscript makes me feel like puking

Sails or Spring as backend?

what problem are you having?

for me it's fucking safari that can't download files and opens them in a new tab, because it doesn't have the "download" attribute implemented in older versions.

pollyfills fuck up the browsing experience of users with updated browsers

pollyfills can easilly add up to 300kb +

I mean if you really have that much in polyfills you could check the user agent string for recent browsers and not include the polyfills in those cases.

How can I redirect the user to another URL without reloading the whole CSS and JS?

My co-workers use Ajax calls to populate the main div in the index page, but that makes the browser back button useless. Surely there must be a smarter way of doing this.

Firebase has a free tier for that.

Feel free to rewrite it in go for fun but the language isn't the pain point here.

Meme tier right now give it another 2 years

>Sails or Spring
Truly a terrible choice to face. Spring is complexity central and Sails, well, just read kev.inburke.com/kevin/dont-use-sails-or-waterline/.

Do you know how to manage a VPS?

too much work lol

There's some way to do it, because I've used Angular, and their library does something to enable it.

But if you just want the easy solution, just use anchor ('#') links and react to the hashchange event.

react router uses this npmjs.com/package/history

Turbolinks.

hasura.io/

How important is learning about data structures in terms of employment?

I've gotten to the point where I'm starting to fill out my portfolio with projects and was wondering if I should learn about things like linked lists and trees before tackling more complex sites.

Obviously the more you know the better but realistically if I can get a job by slapping shit together till it's functional then that shit can wait.

whats the fastest way to learn react

>How important is learning about data structures in terms of employment?
Kind of important. Understanding the performance characteristic of the most basic ones (linked list vs. array vs. tree vs. hash table) is very important. Once you get past only doing CRUD and, as you said, slapping shit together, data structures will matter. Beyond structuring your own code in a sane way, they matter for things like using Redis correctly. There is also a separate, but related, topic of database design.

Make a todo app. :^)

Actual programmer here who got hired after 1.5 years of looking and will get fired soon because I suck,

You should know the basics/gist of the standard data structures and their related algorithms. You should also know the basics of time complexity. Questions about this shit usually only come up in interviews though, so it's important for the interview, but not really important for the actual work.

Trees (graphs) and linked lists are standard data structures that you should know about. I have yet to use a tree or linked list for my work though.

Study React code every day (fork open source projects on GitHub), then write React code every day. For React, I think you just have to learn the design pattern - the Reactian mindset - which is just containers and dumb components. So, whereas with Java you'd be like "Okay, how can I break this problem down into classes?", in React you'll ask yourself, "How do I break this down into containers and components?".

Also include redux and react-router in your studies.

eh, it's not just with JS polyfills for promises in IE and old Android browsers.
Also weird CSS behaviour with Safari or things like not-working or different referrer-policy in Edge.

Not using a mac, so I can't even test Safari locally if I wanted to.

yeah, not keen on gimping everything just to make it work for a small portion of people.

Alright thanks guys.

Anyone here learning/know angular 5?

Ive been forced into learning it and i am new to programming in general, and i am having trouble figuring it out. I am reading the angular docs and trying to do the examples along with the docs, but i feel like i;m not really learning anything and just copying code.

Anyone here have any recommendations?

Absolutely irrelevant for web monkeys like you guys.
That toy language you call JS only has a type of data structure: the map of key/value pairs. Objects are implemented as maps. Arrays are maps. Obviously the performance is shit.

>Absolutely irrelevant for web monkeys like you guys.
And you are... ?

Yeah, this is pretty much in line with what I said here. I don't know where JavaScripts performance ranks though.

Someone programming in real languages.

Name three.

Don't make me work, user

Chicken.

I did it.
Hopefully pushState and popstate will work on all browsers.

Actual programmer here who got hired after 1.5 years of searching and will be fired soon because I suck,

I don't think you're taking the right approach. I did the same thing, and everything that I was proud of - that I thought I had done a good job teaching myself - turned out to be completely worthless once I got hired.

You should be on GitHub looking at open source projects written by real engineers to see how they handle the URL/browser history. Then copy that.

Join for webdev bants.

discord.gg/wdg

And lots of free learning materials.

>buy my mixtape

>discord
Why must you shame lord Stallman?

Hey, I do this for you too. Why don't you join, the more the merrier.

We aren't joking about webdev discussions and resources. Who would say no to free stuff? :O

Oh, I wish I was fired, at least I would receive an insurance.

The team leader is a literal brainlet that only have his job because his brother is the administrator, as dumb as I may be, they are clearly trying stop me from leaving.

>Join for webdev bants.
I rather not join a meme infested banter-hell, thank you.
>free resources :^)
what is google

Why don't you participate in the thread instead you mong
The more the merrier, right?

Work on your marketing skillz.

Thread is not persistent. Everything that was said here will be lost in a few days. Unless you search thru some obscure archive sites.

Anyway, what's your problem, nobody asked you personally to join. Let everyone decide for himself (yes, I'm assuming gender).

>Thread is not persistent. Everything that was said here will be lost in a few days.
good

>jsfiddle.net/6aayo60n/

Please help, I'm not sure what sort of spaghetti I made that somehow my boxes turn out on top of each other, and the text is overflowing.

How do I make the text simply move to the next line when it reaches the end?

>jsfiddle.net/6aayo60n/
First, you forgot the closing div on your first "new" block.

Look into the CSS properties "white-space", "word-break", "overflow", "text-overflow", "word-wrap", and other related...

Also, it doesn't seems like you know what you're doing when you have a wrapper with 85vw, but are making one of its children 700px wide. Perhaps you mean the max-width should be 700px and not the width?

not good to use fixed width there user.
Then you have a .news element inside another .news element. Doubt that is what you wanted.

jsfiddle.net/6aayo60n/1/

Thanks! And I'll definitely check it out.

The idea was basically to have a container "news" of smaller width to display the news. Sort of like a mini-section of a section.

My biggest problem is the text breaking the box.

But I'll look at some of those references and see what I come up with.

window.history.push

Not accessible. Good luck with a real job.

Mad that you'll be irrelevant before you retire. It will only be web languages and operating systems soon.