[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: 86
Thread images: 14

File: 1496845010511.png (731KB, 824x553px) Image search: [Google]
1496845010511.png
731KB, 824x553px
>Getting started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good intro (independent of your browser choice)
https://developer.mozilla.org/en-US/docs/Learn

>Free online courses
https://www.codecademy.com/
https://www.freecodecamp.com/
https://www.bento.io/

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

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

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

>in-depth comparison of VPS hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
http://jekor.com/article/is-haskell-a-good-choice-for-web-applications
http://www.stephendiehl.com/posts/haskell_web.html
https://wiki.haskell.org/Web/Frameworks
https://www.yesodweb.com/
https://wiki.haskell.org/Functional_Reactive_Programming
https://en.wikibooks.org/wiki/Haskell

Learn Haskell for Web Development today!
>>
>>61674098
i like haskell and i think haskell is too slow for production
>>
>>61674157
... compared to JavaScript?
>>
>>61674168
yes. node.js outperforms haskell web frameworks actually.
>>
>>61674205
There are a lot of them, are you sure it isn't one or two?
>>
>>61674212
pure haskell loses to node.js with express.js.
>>
WASM will kill JS
>>
Noob here, why won't the buttons work?
https://jsfiddle.net/8bjr4thv/1/
>>
>>61674281
looks like you aren't updating the text as it changes, you only update it once when you set the listeners, then never again
>>
>>61674281
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
>>
>>61674379

https://leaverou.github.io/prefixfree/

you're welcome
>>
File: shitcoins2.jpg (193KB, 1208x972px) Image search: [Google]
shitcoins2.jpg
193KB, 1208x972px
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
>>
>>61674751
hyperlink to facebook
>>
>>61674394
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
>>
>>61674513
How?

Is there a market with an API that allows trading?
>>
>>61674805
Yes

https://bittrex.com/home/api
>>
>>61674239
wasm is for loading js doofus
>>
>>61674751
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:
https://www.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
>>
>>61674323
>>61674340
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?
>>
>>61675501
You only run the health-text code once.
You want it to run whenever the variable changes.
>>
>>61675571
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...
>>
>>61674081
When should I use a form based search vs a Json backed javascript search?

I am not targeting noscript users.
>>
>>61675729
changeHealth= function(change) {
.. update health ..
.. update text ..
}
>>
>>61674861
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.
>>
>>61675729
https://jsfiddle.net/8bjr4thv/7/

does that clear things up?
>>
>>61674751
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
>>
File: BritishKeks.jpg (6KB, 294x200px) Image search: [Google]
BritishKeks.jpg
6KB, 294x200px
>>61674772
>>
File: maj_mask.gif (472KB, 508x270px) Image search: [Google]
maj_mask.gif
472KB, 508x270px
>>61675786
>>61675983
Thank you both. Yes it does clear things up. I'm off now to go jump off a cliff, goodbye
>>
>>61675956
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 :)
>>
>>61676040
don't be so hard on yourself.
Making progress every day anon.
>>
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?
>>
>>61676559
>Worlds most expensive forward slash?

Depends how much you were getting paid..
>>
>>61676284
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.
>>
File: 1500829020107.gif (796KB, 500x281px) Image search: [Google]
1500829020107.gif
796KB, 500x281px
>>61676559
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
>>
File: 5e2.jpg (106KB, 554x439px) Image search: [Google]
5e2.jpg
106KB, 554x439px
>>61675107
>$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.
>>
>>61677282
>1 year included in that
yikes the third world is some scurry shit
>>
>>61676674
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.
>>
>>61677282
>$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.
>>
>>61677534
i still don't understand why you insisted on implementing this shit yourself
is this for educational purposes ?
>>
File: rIjOYsU.png (46KB, 379x366px) Image search: [Google]
rIjOYsU.png
46KB, 379x366px
anyone got some input regarding "uWebSockets" or "sockjs"?

I am using socket.io currently but want to switch to another library.
>>
>>61677721
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.
>>
>>61678846
>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
>>
>>61678458
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: http://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 <font> and <center> 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/...?
>>
File: internet_explorer_logo_windows.jpg (3MB, 1920x1200px) Image search: [Google]
internet_explorer_logo_windows.jpg
3MB, 1920x1200px
>>61680074
Tables. Tables everywhere.
>>
File: 1501155329937sv.jpg (2KB, 124x122px) Image search: [Google]
1501155329937sv.jpg
2KB, 124x122px
>>61674098
>>
>>61674081

What do you guys consider a slow response time for a stateless REST API? I'm throwing warnings if my response time exceeds 150ms.
>>
>>61680142
>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
>>
>>61680257
Gb2reddit, newfag>>61680315
>>
>>61680315
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<items.length; i+=1) {
items[i].addEventListener('click', function(){
var siblings = document.getElementsByClassName('nav__item');

for (var j=0; j<siblings.length; j+=1) {
siblings[j].classList.remove('active');
}

this.classList.add('active');
}, false)
}


jQuery

$('.nav__item').on('click', function(){
$('.nav__item').removeClass('active');
$(this).addClass('active');
});
>>
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?
>>
>>61678969
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
>>
>>61680074
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.
>>
>>61680315
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
>>
>>61681997
I worked in retail for 10 dollars an hour.
>>
>>61681997
newspaper delivery
>>
>>61680315
>not using the latest meme framework/library
you won't make it kiddo. Just stay with C programming it's entry level.
>>
>>61682302
unironically that should be in the OP
>>
>>61680315
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.

>>61680681
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);
});
>>
>>61681997
I delivered pizza.
Do you like dude weed lmao?
>>
>>61674081
Is bento.io worth using Jewgle/Jewbook?
>>
>>61682385
>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.
>>
>>61680681
>>61682385
The nav__item elements wont change, why do you pick them twice?
>>
>>61683194
By picking or querying them twice, I mean:
document.getElementsByClassName('nav__item')
$('.nav__item')
>>
>>61683011
>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.

>>61683194
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?
>>
File: Madoka_Expert.jpg (161KB, 400x450px) Image search: [Google]
Madoka_Expert.jpg
161KB, 400x450px
>>61683487
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.
>>
File: 1501589326881.png (188KB, 327x328px) Image search: [Google]
1501589326881.png
188KB, 327x328px
>>61683739
>click surprise me button
>get this http://www.math.toronto.edu/~drorbn/People/Eldar/thesis/index.html
th.. thanks
>>
p5JS Anon 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]))
<p>Nothing searched.</p>
@elseif (empty($userSearch[0]) && empty($userSearch[1]) && !empty($userSearch[2]))
<p>Searched for "{{ $userSearch[2] }}".</p>
@elseif (empty($userSearch[0]) && !empty($userSearch[1]) && empty($userSearch[2]))
<p>Searched for "{{ $userSearch[1] }}".</p>
@elseif (!empty($userSearch[0]) && empty($userSearch[1]) && empty($userSearch[2]))
<p>Searched for "{{ $userSearch[0] }}".</p>
@elseif (!empty($userSearch[0]) && !empty($userSearch[1]) && empty($userSearch[2]))
<p>Searched for "{{ $userSearch[0] }}" and "{{ $userSearch[1] }}".</p>
@elseif (empty($userSearch[0]) && !empty($userSearch[1]) && !empty($userSearch[2]))
<p>Searched for "{{ $userSearch[1] }}" and "{{ $userSearch[2] }}".</p>
@elseif (!empty($userSearch[0]) && empty($userSearch[1]) && !empty($userSearch[2]))
<p>Searched for "{{ $userSearch[0] }}" and "{{ $userSearch[2] }}".</p>
@elseif (!empty($userSearch[0]) && !empty($userSearch[1]) && !empty($userSearch[2]))
<p>Searched for "{{ $userSearch[0] }}", "{{ $userSearch[1] }}" and "{{ $userSearch[2] }}".</p>
@endif
>>
>>61683826
>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
>>
File: 1497357707756.jpg (21KB, 402x480px) Image search: [Google]
1497357707756.jpg
21KB, 402x480px
>>61683826
>>61683907
>key/value array
>=>

lel sry,
forgot that PHP exists
>>
>>61683907
associative arrays do
>>
>>61683487
Yes.
>>
>>61684035
Awesome. How did you come up with your idea?
>>
>>61684077
I get annoyed easily.

In my annoyance I think of solutions.

Sometimes those solutions are websites.
>>
>>61683826
<?php

foreach($myshittydata as $key=>$value){
$key is the key
$value is the value
do whatever the fuck you want with them here.
}
Thread posts: 86
Thread images: 14


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