/wdg/ - Web Development General

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good intro (independent of your browser choice)
developer.mozilla.org/en-US/docs/Learn

>Free online courses
codecademy.com/
freecodecamp.com/
bento.io/

>Next
youtube.com/watch?v=sBzRwzY7G-k
github.com/kamranahmedse/developer-roadmap

>Useful resources
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
stackoverflow.com/ - Developers asking questions and helping each other
caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
youtube.com/user/TechGuyWeb - Traversy Media
youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
youtube.com/learncodeacademy - codecademy
youtube.com/derekbanas

>in-depth comparison of VPS hosts
webstack.de/blog/e/cloud-hosting-provider-comparison-2017/

Other urls found in this thread:

jekor.com/article/is-haskell-a-good-choice-for-web-applications
stephendiehl.com/posts/haskell_web.html
wiki.haskell.org/Web/Frameworks
yesodweb.com/
wiki.haskell.org/Functional_Reactive_Programming
en.wikibooks.org/wiki/Haskell
jsfiddle.net/8bjr4thv/1/
leaverou.github.io/prefixfree/
bittrex.com/home/api
reddit.com/r/webdev/comments/60ou2w/is_it_possible_to_earn_a_decent_amount_of_money/df885mz/
jsfiddle.net/8bjr4thv/7/
caniuse.com/#search=websockets
math.toronto.edu/~drorbn/People/Eldar/thesis/index.html
twitter.com/AnonBabble

jekor.com/article/is-haskell-a-good-choice-for-web-applications
stephendiehl.com/posts/haskell_web.html
wiki.haskell.org/Web/Frameworks
yesodweb.com/
wiki.haskell.org/Functional_Reactive_Programming
en.wikibooks.org/wiki/Haskell

Learn Haskell for Web Development today!

i like haskell and i think haskell is too slow for production

... compared to JavaScript?

yes. node.js outperforms haskell web frameworks actually.

There are a lot of them, are you sure it isn't one or two?

pure haskell loses to node.js with express.js.

WASM will kill JS

Noob here, why won't the buttons work?
jsfiddle.net/8bjr4thv/1/

looks like you aren't updating the text as it changes, you only update it once when you set the listeners, then never again

the buttons are responding to clicks but you aren't updating the DOM that says you have health x

What is your go-to method for css prefixes?
I'm using sass btw

leaverou.github.io/prefixfree/

you're welcome

just started work on an altcoin trading bot. rate and hate

>want to get some freelance work
>"please write a facebook for $100"
how do you guys do it

hyperlink to facebook

Failed to compile
./src/prefixfree.min.js
Line 9: 'StyleFix' is not defined no-undef
Line 9: 'StyleFix' is not defined no-undef
Line 9: 'StyleFix' is not defined no-undef
Line 10: 'StyleFix' is not defined no-undef
Line 10: 'StyleFix' is not defined no-undef
Line 13: 'StyleFix' is not defined no-undef
Line 14: 'StyleFix' is not defined no-undef
Line 14: 'StyleFix' is not defined no-undef
Line 14: 'StyleFix' is not defined no-undef
Line 14: 'StyleFix' is not defined no-undef
Line 19: 'StyleFix' is not defined no-undef

How?

Is there a market with an API that allows trading?

Yes

bittrex.com/home/api

wasm is for loading js doofus

Upwork is bad, never use that site. Full of Indians racing to the bottom on prices.

Here is a good comment somebody left on Reddit about freelance web design:
reddit.com/r/webdev/comments/60ou2w/is_it_possible_to_earn_a_decent_amount_of_money/df885mz/

If design isn't your thing and you would much rather do development (I know I def would) then just keep on building projects and try to make money off of some of them

I don't usually like asking to be spoonfed but this has legitimately stumped me

I'm reading up on DOM mutations now and it's way over my head

Can one of you guys please fix up the code so I can dissect it and understand how you made it work?

You only run the health-text code once.
You want it to run whenever the variable changes.

So what, for loop inside click event listener? Place setTimeout() somewhere? Maybe my brain is just frozen over too much Javascript study and the solution is super easy and staring in my face...

When should I use a form based search vs a Json backed javascript search?

I am not targeting noscript users.

changeHealth= function(change) {
.. update health ..
.. update text ..
}

Hell yeah, post challenges you came across.

Im going to set one up to buy dips of 80% or more over an hour period.

Then record the coin and value and make a homepage with percent differences and a sell buttton with captcha verify so I don't accidentally the whole thing.

jsfiddle.net/8bjr4thv/7/

does that clear things up?

idk why this is so funny

also the best way to actually get freelance work is to hit up local places, it'll also teach you how to upsell
alllllllllso have something to show clients, yeah I know it's kind of backwards but clients trust you more if you have site examples you can point to - it literally doesn't matter if they're fake companies you made up or just demo sites, as long as they're fully functional clients hop on board easier

...

Thank you both. Yes it does clear things up. I'm off now to go jump off a cliff, goodbye

Nice.

No trading happening yet, but I enjoyed watching the BTC/BCC fork in real-time. I'm working on rendering the candles at the moment.

My aim is to implement autonomous high frequency trading so I can just plug in conditions and let it rip.

Of course I don't really expect to make money. If I can achieve parity I will be happy :)

don't be so hard on yourself.
Making progress every day user.

API guy here with OAuth issues.

After days of searching and rewriting my curl requests, a single trailing / on the url has been discovered causing the signature mismatch.

I was adding it right after the signature generation instead of before it.

Worlds most expensive forward slash?

>Worlds most expensive forward slash?

Depends how much you were getting paid..

I get you. The coolest part is knowing that a bot is trading your money with a potentially award winning algorithm that you generated by pulling numbers out of your ass.

good job on getting it to work
now write tests for this so that you don't accidentaly fuck it up when further developping your application

>$2000 dollaroos for a 5 page website

Holy fuck. Here at spic land, i can't even charge $300 for a website without the clients flipping their shit. And thats including 1 year hosting.

>1 year included in that
yikes the third world is some scurry shit

Yep, stripping slashes incase someone passes a slashed url to the constructor.

To pass the conformance test I have to hit like 90 endpoints.

Several of them are PUT or require url params and different signing.

Pain in my ass.

>$2000

Yeah nah.

What he's leaving out is that you can only expect this kind of cash if you have a good portfolio and reputation. You won't wrangle this kind of contract from cold calling without connections or luck.

I know some guys who charge 2 - 4K for websites, but they've worked hard for many years to gain experience and connections.

I'm at the point of charging 500 - 1500 per project, but in my experience a 15/20 hour project will usually be stretched out over weeks or months as I wait for the client to answer emails, approve drafts.

The key is to have many projects going simultaneously. I think I have about 8 overlapping at the moment.

i still don't understand why you insisted on implementing this shit yourself
is this for educational purposes ?

anyone got some input regarding "uWebSockets" or "sockjs"?

I am using socket.io currently but want to switch to another library.

Partly.

The job is specializing in API integration. It's important I know the ins and outs of OAuth 1 and 2.

That said, the CEO just asked my boss if I was slacking because he expected me to be done already.

It's like...I've been there for a week and half, read through all that documentation, and wrote an API helper class that gets info from countless services following that same standard.

That's not bad for a week and a half imo.

>he expected me to be done already
that's unfair, custom oauth1 client is tedious work

pls report here when you get around your oauth2 implementation, if you make one
i've been trying to understand it for some time to set my own resource and auth servers but always get confused with the different flows and whatnot

At a glance:

SockJS includes a clientside library that has fallbacks if the regular WebSockets implementation isn't available, just like Socket.io does. It also has server implementations that support default WebSockets, as well as the fallback methods, written in Ruby, Erlang, and JavaScript (Node).

uWebSockets is purely a server implementation written in C++, but available as a Node module. Since there's no clientside library, I believe it only supports default WebSockets, so it won't work for some users with older browsers (IE 9 and below, old builtin Android browser, etc.) But consider whether you actually need a fallback, since WebSocket support is pretty good these days: caniuse.com/#search=websockets

What was webdev like back in the 2000s? I experimented with it for a time as a 12 year old back in 2005 or so. There was XML, and and tags in common use. The doctype tag would always be copy-and-pasted since it was complex as fuck. Ahhhh, memories. What do you remember, /wdg/...?

Tables. Tables everywhere.

...

What do you guys consider a slow response time for a stateless REST API? I'm throwing warnings if my response time exceeds 150ms.

>internet_explorer_logo_windows.jpg
this is art

Grrr why is it when I search for how to do something in Javascript on Stack Overflow most of the answers are for fricking jQuery

Gb2reddit, newfag

If you are doing any kind of DOM manipulation you should be using jquery.

Javascript

var items = document.getElementsByClassName('nav__item');

for (var i=0; i

is ajax becoming replaced by websockets? why would you use one instead of the other? from what I've read, it looks like websockets keeps open a duplex connection between client and server while ajax is just like a mini http request. is this accurate?

Will do. Looks like they want me to make the thing work with OAuth 2 now.

Seems the same except you send credentials to get a token, then you just secret&token when generating your signature.

>he's afraid of jquery
ooga booga

It was a shitshow.

Tables made the layout of the sites. People used framesets, coloring your scrollbars was cool. Iframes or regular frames were used to do math in the background depending on user input. Java was hot shit and people legit thought it was the future. Javascript was pretty awful and limited.

Been deving since I was 10 in 1998.

I remember some kid I voice chatted with that would make fun of my websites and tell me I should be using divs. It didnt make sense to me.

He owns that popular website with ufo in the title or ugo something like that.

Learn jquery and you can convert it to vanilla js yourself.

It it right to say that jquery was a forerunner of modern frontend frameworks?

Where did you guys work before getting a job in development? Was supposed to have a phone interview an hour ago but the guy never called. I need a fucking job so I have money and can learn more on the side. Fuck

I worked in retail for 10 dollars an hour.

newspaper delivery

>not using the latest meme framework/library
you won't make it kiddo. Just stay with C programming it's entry level.

unironically that should be in the OP

Because a lot of people only know how to use jQuery. Don't listen to anyone else here; it's shit and you should avoid it if at all possible.

weak b8
document.getElementsByClassName('nav__item').map(function(e) {
e.addEventListener('click', function() {
document.getElementsByClassName('nav__item').map(function(s) {
s.classList.remove('active');
});
this.classList.add('active');
}, false);
});

I delivered pizza.
Do you like dude weed lmao?

Is bento.io worth using Jewgle/Jewbook?

>Because a lot of people only know how to use jQuery.
One doesn't simply only know how to use jquery you dumbass LMAO
Oh and your code is shit but that's to be expected from a stubborn sperg.

The nav__item elements wont change, why do you pick them twice?

By picking or querying them twice, I mean:
document.getElementsByClassName('nav__item')
$('.nav__item')

>Oh and your code is shit but that's to be expected from a stubborn sperg.
I converted the original line for line, just made a few things more concise.

Ideally they should be cached, but I wasn't sure whether the original guy was assuming elements might be added between clicks, so I figured I should leave the extra query in there.

Anyone got any good ideas for a website?

a website that gives people ideas for websites

Has anyone taken the Microsoft 480 60 exam? Is it hard?

anons you should all be using wiby.me as your search engine

is best in the world

I have an array with different keys/values for a business. Like so:
>name => John's Pizza
>bussiness_manager => John
>etc

However, these two pieces of info (and more) go into two different tables, how do I properly separate the information into different arrays?
I was thinking of having an already existing array with the column names of the tables and loop through them to see if they match the POST array. Is this good.

>click surprise me button
>get this math.toronto.edu/~drorbn/People/Eldar/thesis/index.html
th.. thanks

p5JS user hear from yesterday, the code worked locally, just not in online editors.

Anyways. I've got another question. This is messy and I would love some pointers or articles that relate to making this "clean" and more efficient. My guess is I could replicate it in some sort of for loop and I swear I've done it before, but I can't think of how I should go by this...
It's blade syntax, which is ugly but we have to use it at uni.
// this is on another page -> $userSearch = [$name, $year, $state];


// results page

@if (empty($userSearch[0]) && empty($userSearch[1]) && empty($userSearch[2]))
Nothing searched.
@elseif (empty($userSearch[0]) && empty($userSearch[1]) && !empty($userSearch[2]))
Searched for "{{ $userSearch[2] }}".
@elseif (empty($userSearch[0]) && !empty($userSearch[1]) && empty($userSearch[2]))
Searched for "{{ $userSearch[1] }}".
@elseif (!empty($userSearch[0]) && empty($userSearch[1]) && empty($userSearch[2]))
Searched for "{{ $userSearch[0] }}".
@elseif (!empty($userSearch[0]) && !empty($userSearch[1]) && empty($userSearch[2]))
Searched for "{{ $userSearch[0] }}" and "{{ $userSearch[1] }}".
@elseif (empty($userSearch[0]) && !empty($userSearch[1]) && !empty($userSearch[2]))
Searched for "{{ $userSearch[1] }}" and "{{ $userSearch[2] }}".
@elseif (!empty($userSearch[0]) && empty($userSearch[1]) && !empty($userSearch[2]))
Searched for "{{ $userSearch[0] }}" and "{{ $userSearch[2] }}".
@elseif (!empty($userSearch[0]) && !empty($userSearch[1]) && !empty($userSearch[2]))
Searched for "{{ $userSearch[0] }}", "{{ $userSearch[1] }}" and "{{ $userSearch[2] }}".
@endif

>array
>keys/values
arrays don't have key/value pairs though.

>loop through them
that's a situation, where you would want some key/value JS object or Map instead

>key/value array
>=>

lel sry,
forgot that PHP exists

associative arrays do

Yes.

Awesome. How did you come up with your idea?

I get annoyed easily.

In my annoyance I think of solutions.

Sometimes those solutions are websites.

...