/wdg/ - Web Development General

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap
youtube.com/watch?v=UnTQVlqmDQ0

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
javascript.info - curriculum providing a strong basis in JavaScript

>Further learning resources and documentation
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
hackr.io - crowdsourced collection of tutorials from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)
pastebin.com/gfBPg24A - Everything PHP

>Asking questions
jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

Attached: 1549016569604.jpg (1200x1200, 310K)

Other urls found in this thread:

shopify.github.io/draggable/
commercialtype.com/catalog/graphik/graphik
w3schools.com/nodejs/nodejs_mongodb_create_db.asp
twitter.com/SFWRedditImages

My front end sucks. How do I make it not suck?

This is the coolest fucking tech demo website:

shopify.github.io/draggable/

Attached: Screen Shot 2019-03-01 at 3.12.09 PM.png (1782x1180, 191K)

wow it's fucking nothing

the demo is entirely underwhelming.

Does anyone have any good tutorials for babies first website? I am trying to host my own webserver/DNS as I dont like the idea of letting my domain registrar do that for me however I am struggling to figure out how to link my domain to my own DNS, I understand it has somthing to do with me establishing my own name server but every video I watch on the topic is either uninformative or not related to what I am trying to achieve, Thanks in advance.

Attached: a4b805242995ab34ac02ec29b2c3712931d8e89b_00.gif (320x258, 328K)

Traditional method is to use BIND on your own server. Personally, I find it cumbersome and time-consuming to set up and maintain so I use dnsmadeeasy.com to host my DNS. There are numerous, convenient services like this.

If all you want to do is link your domain name to your hosting then at your registrar change the nameservers to those of your web host.

I had a look at bind and it looked good but I have some other stuff running on the system i want to run the webserver and I dont want to format it off of so I opted to use micrsoftDNS/IIS, the problem I am having is that I think I have fucked up setting my nameserver somehow, I have portforwarded 53 for the server and created a NS record that points to my public IP however when I nslookup my public IP it forwards me to my ISPs nameservers, do I have to contact them or somthing or am I just being stupid?

page 9

Does it matter what your public IP is coming up as? Multiple domains on different nameservers can point to the same IP, right?

Also you should give records some time to propagate, you may need to wait a bit for the TLD and other places to refresh their caches.

And can't you send a test DNS lookup to your nameserver to test whether it's properly set up?

>want to use sf as web font
>see this:
>IT IS AGAINST APPLE'S POLICY TO USE SF PRO FOR ANYTHING OTHER THAN iOS/tvOS/macOS/watchOS DESIGN & DEVELOPMENT
is this true?

use bootstrap?

yep, I think you can't even use Siri to narrate youtube videos...

Basically everything they "give" to you, they actually don't "give" to you... It's just for personal use.

I guess that's why open source matters..

I think there are copycat or similar fonts but I could be wrong
Be sure to have multiple system fallbacks, in any case

Graphik is the closest font I've found but it costs a fortune
>commercialtype.com/catalog/graphik/graphik

What's the best way to learn Typescript?

...

I'm broke and now my bank is charging me for being broke. what's the quickest way to start making money with webdev?

I know html, css, and some javascript and php. how long would it take to start making money as wordpress developer?

>bank is charging me for being broke
what

>why don't you put more money in the bank goy

how do i stop a variable from being accessed by other methods during a setInterval in nodejs?

You could set a flag variable like "variableABC_isLocked" and check it before you use it elsewhere

This

>Thinking web dev is a quick $$$ scheme
And this is why the field is oversaturated with shit devs

How fucked would I be if I skipped the Record Collection lesson on FCC?
I barely understand what they're asking for and feel as though I have a decent understanding of objects and how they work.

>decent understanding
as frustrating as this might be for you,it is better to keep attacking this problem regardless,don't skip,dominate.

it's only a quick money scheme if you're an autist,for anyone else venturing into this just for the money it becomes a fast road to burnout,alcoholism,hookers,and cocaine.

>And this is why the field is oversaturated with shit devs
no that's because of women and poos

If I want to become a frontend dev is understanding every in and out of JS really going to benefit me?
I'm looking to learn node and react once I get JS down. Already understand HTML and CSS for the most part.

thinking of making a rest api in java, I see there is jax-rs and something called jersey that goes ontop of it, is jersey worth using or is it an extra layer of bloatware that I should leave out

Learn Javascript first. Just making sure that's very, very clear, if you don't know Javascript, typescript won't do you any good. Then take a js project, and try to convert it to typescript. Try and convert every .js file to .ts. If you can't figure it out, use stackoverflow and the docs (though they aren't as good as i'd like). Once you grasp the basics, configure tslint, that's the real magic of the typescript development environment.

Congratulations, you made the right choice choosing to learn typescript!

No, learn Javascript better. If you aren't already a professional developer, there's a 99.9% chance you're not good enough at Javascript yet to learn a framework. Node isn't a framework, it's just a different way to run Javascript, so if you're into server side shit or CLI, feel free to have fun with it, but please don't add to the list of react developers with mediocre js skills.

If you're looking for a job and the engineers care that you don't know react, but know js inside and out, run, those engineers can't teach you shit.

Anybody know some good resources for blog design in particular? I've been putting something together in Hugo but I'm always wondering if someone else has better ideas.

So the more thorough the understanding of JS, the better in general?
I'll get to cracking down I guess.

Anyone uses/used Elixir (w/ Phoenix) and cares to share his experience?

>homepage is already 50kb minified
whats the size limit that one should aim for? keep in mind i hate how alot of sites take forever to load because of all of the bloat.

If you want to beat out the bootcamp "developers" for frontend jobs, get to know Javascript inside and out. Understand the core functional methods (map, reduce, and filter), and learn how prototypal inheritance / objects work until you feel like you could teach it with 100% confidence. If you really want your resume to shine, learn how to use typescript, then maybe pick up webpack.

If you get to the point where you feel like you could put advanced Javascript on your resume, you can try React. Don't jump straight to create react app (a way to skip the setup), react is just a library, learn how to set up an app from scratch, you'll waste a lot of time, sure, but in the end you'll come to a better understanding of what react actually is. A lot of newer devs think react is a bunch of black magic and just accept that, don't be that guy.

If frontend is your thing, don't neglect CSS either, but Javascript should be your main focus. You do need to know css, but Javascript proficiency will provide a lot more market value.

That should be fine, ensure that your server uses http2, and a fast web server like nginx

i lost my job today.
what is the last web shit meme i need to learn.
give me memes.

Attached: 1545888100933.jpg (125x96, 2K)

create a brainfuck to WASM compiler

is this a good idea? instead of using media-queries, to use different stylesheets for responsive design?

Attached: Screenshot 2019-03-02 at 08.20.48.png (871x197, 183K)

This. Took me 5 years to get my first *good* job.

Attached: 1522023081854.gif (240x200, 354K)

You're probably better off just putting them both in one file. The browser still has to load both sheets anyway.

>3 separate queries to an external resource
No.
There's a reason bundlers try to pack as many things into a single file as much as possible.

I do it, because it makes editing easier.

Have a junior software engineering interview coming up .. what should I expect?
If they seriously give me an algorithmic problem, it's going to piss me off. It's for a startup, the pay isn't great, and I've already filled out like 3 forms full of information, built something for them, and video streamed for about an hour with one of their hiring members. Like, this isn't fucking Google. I pray it's just a meet and greet, and not "increase fibonacci's recursion solution runtime with memoization xD!"

What should I expect?

>what should I expect?
just realized I asked that twice... Oops. See, I'm retarded -- I'll never pass a 1v1 algorithm challenge.

I love Elixir

Which domain registrar respects your freedom the most? Namecheap?

Attached: 1549500597975.jpg (1157x861, 206K)

>Namecheap?
nope, they deleted daily stormer domain from their server.. They don't respect freedom of speech.

Namecheap lied to its customers telling them letsencrypt certificates are not real certificates to sell them themselves.
Avoid them at all costs.

Which registrar will you trust then?
I want to host a site just for shits and giggles

lol, this section makes no sense, once letsencrypt became a thing.

Also, my client had to pay 500euroes because he forgot to renew the domain on time. Be careful with them..

Attached: Screenshot 2019-03-02 at 09.43.46.png (1047x792, 402K)

>font-awesome
>icons

It's weird seeing real ads on Jow Forums.

Attached: Screenshot_20190302-035200.png (720x1280, 188K)

13 months on Elixir here

Pros
-Easy to learn.
-Fault tolerance. One thing dies, it doesn't bring the whole system down. Also the thing that died immediately revives and keeps chugging along as if nothing happened.
-Elements of functional programming like Pipes, Recursion, and Pattern Matching makes writing code fun and easier to grok. (e.g. composing a bunch of independent functions rather than creating a massive nested conditional pyramid)
-Parallel processing is a breeze.

Cons
-Individual processes are slow. Don't do anything cpu-intensive with them. Instead call external services (which are likely written in C/C++/Java)
-Small and immature ecosystem. Need a robust authentication/authorization system for your web app? Reinvent the wheel and write it yourself. Want an adapter for Ecto 3 and your [preferred database that isn't supported]? You've got some work to do.
-You need to learn Erlang and the Open Telecon Platform eventually.
-Official Phoenix docs/books teach you how to implement phoenix on your application Ruby-on-Rails style. eg. tightly coupled.
-Deployment sucks. You need a third party library called Distillery to convert your elixir app into and erlang release. It ain't cross-platform so you need to use Distillery on your app on an environment that is exactly the same as the production server.
-Insufferable hipster faggot community with CoC's up their ass

Things I wanted to build with Elixir
-Web applications

Things I ended up actually building with elixir
-API's
-Daemons
-Automation Scripts
-Web scrapers
-A distributed system (data processing system between remote servers)
-Personal doujinshi management app ala HappyPanda that uses a web GUI

Conclusion:
Elixir for webdev? Sure. But it's no .Net/Golang app sitting on Kubernetes.

Attached: 1550504791239.jpg (1440x1440, 474K)

I'd be surprised if they set up you with whiteboard stuff other than fizzbuzz.

I'd expect questions like
>what is DOM in HTML?
>what does closure mean in Javascript?
>what's a JOIN in SQL?

That seems like a shit company.
In my first job interview I was asked if I knew OOP, if I ever had built a website and why I wanted to learn the languages they were using.
After that we talked about pay, schedule and shook hands.

Attached: 1550197154489.png (691x844, 55K)

oc

Attached: space-balls.jpg (640x480, 64K)

I have a node.js module that I want to use in my front-end and in my back-end. It is a module containing message structures which get sent between the front-end and the back-end. In order to use this module in the front-end, I 'compile' it using browserify and aliasify, because browserify does not have support for require.main.require to require files relative from the root directory.

My question is: how do I use a node.js project which uses aliasify to require files, in a different node.js project? It is already installed, but I don't think it'll work if I run it like this.

Attached: 56e15f04dd0e4c75a2c3e577e942210c8c9a392d_hq.jpg (1024x576, 37K)

>shitty vetting is a sign of a good company
user, I...

I found the solution to my own problem! I now use both require-rewrite *and* aliasify, activating require-rewrite only when not in a browser environment.

package.json:
"dependencies": {
"require-rewrite": "^1.0.2"
},
"devDependencies": {
"aliasify": "^2.1.0"
},
"browserify": {
"transform": [
"aliasify"
]
},
"aliasify": {
"aliases": {
"_msg": "./"
}
},
"requireRewrite": {
"map": [
["_msg/", "./"]
]
}


index.js:
// Initialize require-rewrite, only if not in a browser environment.
if (typeof window === 'undefined') {
require('require-rewrite')(__dirname);
}


Just in case anyone else ever wants to use a node module in both the browser and the back-end, while still using absolute references.

Attached: 1499449150729.jpg (1080x1080, 799K)

I'm making a note taking sorta website/mobile app - need advice on how to proceed with my web stack.

I have nginx, mongodb and about to look into react native... what else am i missing? Is it worth using something other than javascript to handle reading/writing to the database?

Attached: download.png (211x239, 3K)

well, Mongodb + javascript go together... I would probably use mongoose as well, to have a consistent schema for the db.

> to handle reading/writing to the database?
well, you need to handle the requests for reading and writing as well. can't see how you can do it without a api server (I would do it with nodejs + express)

dynadot.com

what a shit show

im a junior frontend dev

should i start learning some typescript/nest.js or is it just another meme? i want more money

>i want more money
don't we all

>Also, my client had to pay 500euroes because he forgot to renew the domain on time.
Namecheap always sends you a million emails, when something is about to expire. Even twice, because they send separate reminders for the domain and whoisguard. Even then don't you have a 1 or 2 week grace period, where noone else but you can renew the domain?

It's true though, that they try to push for their own certificates and intentionally leave out letsencrypt. That's one of the few bad things I know about them.

>don't we all
how has /wdg/ not come to a consensus like Jow Forums about the best job/tech which is low effort and highly paid?

>current year
>not using ublock origin and ungoogled chrome

This picture in the OP makes me feel like I've achieved something at life and in deving in general. I haven't.

Attached: MIG0707-Maues-638.02.jpg (1977x972, 182K)

You've achieved more than you know, user. To quote Terence McKenna:
>You make the commitment, and nature will respond to that commitment by removing impossible obstacles.
>Dream the impossible dream, and the world will not grind you under, it will lift you up.
>This is the trick! This is what all these teachers and philosophers who really counted, who really touched the alchemical gold, this is what they understood
>This is the shamanic dance in the waterfall, this is how magic is done: it's done by hurling yourself into the abyss, and discovering that it's a feather bed.
>There's no other way to do it.

Attached: 1548984586332.jpg (540x540, 100K)

>api server
what do you mean? how does this work with nginx? should i keep nginx?

thanks for that user

in addition to what i said in i have been using Node.js as well as per this tutorial w3schools.com/nodejs/nodejs_mongodb_create_db.asp

how does express fit into all of this?

>how does express fit into all of this?
express makes it easier to use node.js as a server... you could do without it, but then you'd have to write the responses/headers yourself.

>api server
you need a server with which the mobile apps will communicate, you can't communicate directly with a db (you can if you use firebase, but then you give your customers data to google)

>also, I criticise google in this post, and the captcha got almost impossible to solve. Does google have access to the content of this textarea?

>Does google have access to the content of this textarea?
I remember back in the days when you'd have to solve text captchas, and depending on what you were talking about some related onse would pop, I have no proof to back this up, but I believe they have access to a lot, like a lot.

What does declaring an empty string as a variable in JS do? What is the point?

For example,
var output = "";

as opposed to
var output;

What is the difference between those two commands?

If you're doing concatenation and building up a string, output + two will read as either 'two' or 'undefinedtwo'. And other minor misc. cases like intellisense seeing the variable as a string.

>output + two will read as either 'two'
in the case that you use var output = "";

>or 'undefinedtwo'
in the latter case?

I assume you wouldn't do anything with output until you assigned it a value anyway though.

With the first one the output variable will be an empty string.
With the second one, the variable will be of type undefined.

Right but why would that matter if it's an empty variable anyway? What would you do with a variable that has just been declared and has nothing assigned to it yet?

not sure if that's how it works in some libraries, but a use case is where you want to assign a value conditionally I guess.
Maybe some kind of variable indicating an error, that will get passed to a callback.
let myData;
let error;
try{
myData = /* some code here */
/* some more code here that could throw */
}catch(e){
error = e
}finally{
callback(error, myData);
}

those are still media queries you dumbfuck

what hosting do you recommend for a website where people will sell their stuff?
what do i need to focus on? the users will upload images but in the beginnign the traffic will probably not be that great
i also dont have a lot of money so dedicated hosting and stuff is out of question
i am afraid of those hostings with limited storage like on digital ocean, dont know what to think
pls advise

DO also offers object storage like many other hosts

>website where people will sell their stuff?
shopify

>where people will sell their stuff?
Like a craigslist type thing?

i already built my website in Laravel
>Like a craigslist type thing?
i dont know whats that, but just a simple website for starters, it wont even have online payment option in the beginning, its for people to arrange their buying/selling
would shared hosting be bad choice for the slow beginning?
isee Dreamhost has some nice pricing and option to upgrade later to VPS

>reinventing the wheel for the nth time
nigger, an online marketplace has long been a solved product, and it's crowded with solutions. either use something like shopify, or go ahead and continue wasting your time developing your own pile of php shit will most likely have some vuln you'll never patch.

the topic is hosting

Hmm... My idea for this solution is getting into docker and using docker swarms on cheap vps.

I have no experience yet, but I guess it is possible.

look up premature optimization user, and realize that going with docker right away is doing that.

well, I always forget how I setup servers.. at least docker solves that by forcing me to write a config file.

And it makes it easier to switch hosts. Also, basic docker is not really hard to learn (2-3h)

i dont even know what docker is

I have never written a single test

>I have never written a single test

I thought like this as well and when projects get complicated I felt like killing my self.

Also, test driven development allows you to be lazy and retarded. You don't have to balance possible scenarios in your head, you write them into tests and edit the functions until it passes..

But to be fair, I only write tests for complex stuff. I think it's a waste of time to write them for everything.

how complex is complex?

t.

>how complex is complex?
if I can't visualise the flow easily, do math in it or regex...

TDD also makes it easier to refactor, since you'll know once you broke your code.