[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: 314
Thread images: 28

File: wdg_sakuya.jpg (168KB, 824x553px) Image search: [Google]
wdg_sakuya.jpg
168KB, 824x553px
I program in pure css Edition

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

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
Everything you learn will have these as their base.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

>Online courses
https://www.codecademy.com/
https://www.coderbyte.com/
https://www.freecodecamp.com/
https://www.bento.io/

>Further reading/viewing
https://www.youtube.com/watch?v=sBzRwzY7G-k [Embed]
https://github.com/kamranahmedse/developer-roadmap
https://github.com/getify/You-Dont-Know-JS
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

>Code challenges
https://www.codewars.com/
https://www.hackerrank.com/
https://codefights.com/

>Useful resources
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://libraries.io/ - Discover and keep track of open source libraries, modules and frameworks
https://stackoverflow.com/ - Developers asking questions and helping each other
http://www.programmableweb.com/ - List of public APIs
https://caniuse.com/ - Check browser support for front-end web technologies

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

>cheap VPS hosting in most western locations
https://www.digitalocean.com/
https://www.vultr.com/
https://www.linode.com/
https://www.scaleway.com/
https://www.heroku.com/

>an in-depth comparison of hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
>dead threads


I'm making a site that can store videos. up to three videos can be featured though, and that goes in its own section as well as the normal videos section.
How would I represent this in a relational database without wasting a bunch of space (ex: boolean values in a "featured" field)?
>>
>>61429473
actually nevermind I just remembered supertypes exist.
>>
>tfw shit at css
>>
I'm building a web application where users can post images n shit. Here's what's got me fucked up right now.

When a user is uploading an image, I want to check if that image has been uploaded on various other sites with public APIs, and if so, grab some metadata through those APIs and show it to the user. I wanted this to happen before the image is sent to the server, so I figured I could do the whole process through clientside javascript. That was before I knew about CORS. This is my first web development project, fuckin' sue me dude.

Should I:
A) Keep trying to do it clientside using JSONP or something,
B) Query all the APIs serverside with the image's md5 and relay that back to the client, or
C) Not do this at all because it's a bad idea for reasons I don't understand
>>
Is ASP.NET worth getting good at?
>>
>>61430757
If you want to get a job and make money, then yes.
>>
>>61430321
what is the actual function of this feature?
>>
I haven't done any server admin shit outside of local network hosting.
Now I've got a debian server setup with apache, and my website up with a domain pointed to it.

I've done the normal advice shit given out by the providers, but I figure there's something I'm missing.

Does anyone have resources for learning about what I should do to keep this functional and secure?
Honestly just any good info about linux or apache server administration would be good too.
>>
>>61431618

Integration with danbooru-style imageboards. It's for porn.

When the user is uploading an image, I want to search for that image through a specific set of booru imageboards, collect the artist, source, characters, copyright, tags, and whatever else, and summarize all of that to the user. I would like the user to see that before they post it so that they can select whether or not they want to include that data in their post.
>>
Can someone help me understand returns?

var processed = 0;
function processArg(num) { return (num + 3) /5; }
processed = processArg(7);

this was a challenge in fcc and can't understand how the argument got to 7
>>
Is MEAN stack worth learning?
What are the best free resources for learning development in node.js?
>>
>>61430757
yes. I find it pretty enjoyable. As another anon said, it's great for finding a job, and with .Net Core it's only gonna get stronger.
>>
>>61432470
What do you mean, how the argument got to 7? That is just an arbitrary number that they are calling the Fu ction with.
>>
>>61431725
https://www.google.at/search?q=hardening+apache&oq=hardening+apache&aqs=chrome..69i57j0l5.3047j0j7&sourceid=chrome&ie=UTF-8#safe=off&q=hardening+apache&stick=H4sIAAAAAAAAAONgecToyi3w8sc9YSmbSWtOXmM04-IKzsgvd80rySypFNLgYoOy5Lj4pLj0c_UNkk0Mk4uzNBikeLiQ-DwAHYkj3EoAAAA
>>
>>61431194
>>61432503

I've been told that ASP.NET jobs are mostly corp jobs and the degree is necessary to get your foot at the door there, plus it defines your salary forever.
>>
>Decide to check treehouse
>it's actually good

I was expecting that everyone was memeing me desu.
>>
Alright, I got the 3 months Pluralsight offer and gonna milk the shit out of it. Hopefully their introductory front-end stuff are good.
>>
File: vue.png (4KB, 400x400px) Image search: [Google]
vue.png
4KB, 400x400px
Vue
>Vue
>>
The import tab of phpmyadmin truly is useless.

If you import using any other method it's done within seconds. If you use phpmyadmin your lucky if it works at all.
>>
>>61432498

Of course it's worth learning.

As for ressources USE GOOGLE GODDAMNIT !!1!

>tell me your super sekrit ressources that máke me senior dev in one day!! xD
>>
Is it important to use schema.org thingy for markup?
>>
Why does about:blank show up in some places on websites? I changed the color using
@-moz-document url-prefix(about:blank) {*{background-color:#272B35;}}
in
.mozilla/ID/chrome/userContent.css
.

Also, how can I make a homepage in about:blank? Or there is no way around it? I just don't want the URL address to have anything in it so I can write directly in the address without pressing Alt+D to select all the text and start typing.
>>
>>61430321
sounds pretty hard unless you want to reimplement google image search. I wouldn't do it at all
>>
Is SASS a meme or should i learn it?
>>
I just got asked by a recruiter if I have a Github account to show to potetial employers.

Who has time and energy to do more web development outside of work? Am I in the wrong industry?
>>
>>61436195
>Am I in the wrong industry?

Yup.
>>
>>61436051
it's alright
>>
>>61436051
Get with the times' gramps. Sass is soooo 2014.
Learn PostCSS instead:
http://postcss.org/
>>
Is jQuery still relevant or can I skip it and stick to vanilla JavaScript until I'm ready for some framework?
>>
>>61436051
well look at http://sass-lang.com/guide and see if you find it useful.
also good if you have scss based frameworks, that you want to customize

>>61435627
>so I can write directly in the address without pressing Alt+D
pretty sure you can find a JS solution for that
>>
>>61436362
there is no need for it imo.
You can basically do the same thing with vanilla JS and compatibility is not really an issue anymore.
>>
so i just installed wordpress. despite the text editor that is shit. i cant understand all the hate.
>>
After going through barely the first 2 books of YDKJS I feel like calling out every other tutorial out there for their bullshit.

>let's just "use script" everywhere, it's a good practice
let's not.
>>
>>61436317
WHAT? dude stop this shit right now ! why cant you niggers stop memeing those gay ass frameworks? how can i even follow this shit up ?
>>
>>61436317
shit im terribly sorry for my other comment i just checked PostCss and its a dream come true.
>>
File: TiKI6J2.jpg (112KB, 750x690px) Image search: [Google]
TiKI6J2.jpg
112KB, 750x690px
>>61436051
>Is SASS a meme or should i learn it?
Just learn fucking CSS. Try to solve the problems it has in your own way. Then learn SASS or whatever once you can fully appreciate the reasons it exists. HTML, CSS, and JS will always be around. Learning how to deal with them normally will make you a god. There's nothing more embarrassing than a dev who gets assigned to a project that isn't using his/her flavor of the month framework and ends up being completely useless because he/she doesn't know the underlying technology.
>>
>>61436730
>>let's just "use script" everywhere, it's a good practice
Do you mean "use strict" or are you talking about something else?
>>
>>61436897
I know right? It's faster and better in every possible way over regular CSS or Sass. Godspeed anon and make awesome things.
>>
>>61437006

Yep, that.
>>
>>61437037
What's wrong with strict mode? Is it that you need to be careful that you don't accidentally let it bleed into other scripts?
>>
I am working on a fund raising site. I am not using a preprocesser for CSS
>>
File: 1494447211496.jpg (9KB, 248x233px) Image search: [Google]
1494447211496.jpg
9KB, 248x233px
>he's not an asynchronous developer
>>
>>61437037
>>61437071
isn't strict mode implicitly used with ES6 anyway?
>>
>>61428999
Where can I host a wordpress site for cheap?
>>
>>61438413
with a domain name or just a testing web server? there're many freehosts that make you create wordpress websites for free but they offer only subdomains, there're some free indian vps providers too that offer root access and all, even though their specs are very limited.
>>
>>61438452
I have a domains. I'm building a pbn so I can get my main website to rank.
>>
>>61438413
there is literally a list of VPS hosts in the OP.
Unless you want shared hosting, then I don't know. I used namecheap for a shared once and that was kinda ok.

Just avoid any host owned by EIG at all cost. google if you want to know why.
>>
is you don't know JS good to be an expert on js ?
>>
>>61438569
Realize that, even after assimilating everything that his books has to offer, you'd still be behind. There is a difference between a developer that *develops* frameworks (React, Angular, Vue, etc.) and a developer that *uses* said frameworks. The former has typically received a formal education and is thus well-educated in discrete structures and abstract mathematics, while the latter has not.
>>
anyone know decent asp.net hosts cheaper than azure?
>>
>have job
>do online job fair anyways
>all of the development roles are available for india only.
>>
>>61436051
If you already know CSS yeah. I pretty much only use nesting but it's worth it.
>>
What sort of job can I get for low pay and low expectations but which will still provide a good background in web development for future employment opportunities?
>>
>>61439489
level 1 IT support
>>
I finished a Pluralsight "quick start HTML CSS and JavaScript" crap and dunno what to do next. It honestly felt short and lacking. Anyone did http://learn.shayhowe.com/html-css/ ? My alternative is either freecodecamp or derek banas.
>>
>>61440810
I learned a lot (and still learning) from making freeCodeCamp projects.
I highly recommend it.
>>
>>61440810
Just do freeCodeCamp
>>
>>61440875
>>61440931

Yep. Thanks guys, will do.
>>
I just backed out of an FE Magento developer interview (my current job is the same) after realising how little I actually understand Magento. It feels really shitty to have worked for so long with this piece of shit and yet I still don't know some of the basics, due to the nature of the work and lack of training.

I want to move into a JS Framework role - should I start learning and make an app outside of work before applying to jobs, or should I just do both at the same time and give up because I lack motivation/ confidence?

I'm also planning on telling my boss I'm looking to move jobs because I can't handle the constant lies about being sick to go to interviews, nor can they possibly believe me.
>>
what about WebAssembly guys?
>>
I'm new to this cPanel shit. When I first set it up it asks me for a domain name but I don't have any domains in my hosting provider, do I provide the domain name that I will buy from another company to later point it there?
>>
>>61440810
>learning
>>
>>61442703
Please respond.
>>
>>61442703
yes
>>
>>61442071
what about it?
>>
I'm trying to make a little meme page that serves a random video from array as a full background/full page video. The only problem is that what I have working on jsfiddle doesn't work live and isn't throwing an error at all for me to debug.

Here's the setup:

https://ghostbin.com/paste/r78os
>>
File: 1497037152363.png (280KB, 641x530px) Image search: [Google]
1497037152363.png
280KB, 641x530px
>>61444650
src='" + videoList[0] + "'

>" ' " " ' "

anyway, nothing useful in the console or network tab of your devtools?
>>
>>61444781
>double quotes
Doing anything was a miss steak.

>nothing useful in console
Nothing at all. No errors logged in my webserver, nothing thrown in console, and it works just fine if I swap back to an HTML5 video tag for serving a static file in the same directory. Everything at root and below are owned by the correct user/group as well.
>>
>>61442703
no
>>
Is the javascript for client and server still a meme?
Are there any good Django or Rails alternatives?
>>
>>61444982
Probably. I've dabbled in nodeJS but have never used a production environment. You have to code way too many things from scratch or rely on 3rd party libraries that may or may not be supported by whoever that feels like supporting it.
>>
>>61444650
>>61444902
you write
>watching the network tab under the browser console doesn't show anything wrong;

so you get an ok status in the network tab when fetching the webms?
does the element with its attributes look ok, when you inspect it on the live page? sry, really a bit hard to read with the nested quotes
>>
>>61444982
No.

>>61445033
Lurk more.
>>
Why PHP is becoming a massive mess now? Why?
public function find(int $id = null): ?array {
$query = $this->pdo->prepare('SELECT * FROM id WHERE id = ?');
$query->execute([$id]); return $query->fetch() ?: null;
}
>>
>>61445033
huh, Node is fine
do you really have such special requirements, that you need to rely on some obscure 150 dl/month module?
>>
Is it too early to use CSS Grid?

Looks like the support on all browsers is almost there (edge and ie excluded naturally).
>>
>>61445076
That's fair, I wasn't precise in my statement of 'it's not working'. The webms are not being served on live but are working flawlessly on jsfiddle, but the index is properly calling everything on live.

It just werkz in jsfiddle, though, so I'm not quite sure as to why the JS would fail to serve on live with the exact same setup.
>>
>>61445143
Use this since day one on my sciences and mathematics websites.
Yes my users are mostly smart and don't use deprecated shits.
For porn, casino games and everything about retarded things, you shouldn't.
>>
>>61444914
>>61444148
Which is it?
>>
>>61445098
Can't see any relevant web services using node.js today.
Flask, laravel and asp.net core are 100000x more used than node now.
Even golang is more popular (mostly Asia) and relevant for current web applications.
>>
whats the proper way to test your app? i made one in javascript and so far ive just done a shit load of user test cases myself. I'll pretend im the one using it and try to "break" it or make it do something i dont want to.
>>
>>61445237
don't say that anon
Node is all I know

>>61445160
How do you even use relative urls on jsfiddle to load the webms.
There is something I am not getting here.
jsFiddle is just html/css/js right? So how does that work?
>>
>>61432470
7 is num
>>
>>61445168
Is it as good as it looks or are there some pitfalls to it?

Also like page pls. I'm a smart person.
>>
>>61445345
>relative URLs on jsfiddle
I'm not, I'm calling to internet facing files. As in:

["example.com/webm/whatever.webm", "...whatever2.webm", ..., ...];

Am I retarded in thinking that I don't need to serve the webms from 'js/webms/whatever.webm'?
>>
>>61444473
is js in danger?
>>
>>61445513

no, WA is no where near being ready. It will be amazing when it is though
>>
>>61445122
>now

>>61445513
no
>>
>>61445160
so you get a 404 on the webms or what exactly?
"webms are not being served" is not much to go on.
>>
Why is webextensions such a bunch of shit

guys they are gonna deprecate LibreJS
>>
File: browserconsole.jpg (65KB, 1599x169px) Image search: [Google]
browserconsole.jpg
65KB, 1599x169px
>>61445709
The JS is called, the stylesheet is applied, but the webms are not served. There is no content on the page.
>>
>>61445840
was the video tag created by JS?
if so, inspect it and check what the src attribute is.

also video#videoplayer does nothing afaik, since it's looking for a video tag, that has the videplayer ID (which is on the div)

link your site, it's fine
>>
Should I keep learning Node or is it just a meme?
I already know Java.
>>
>>61445299

anyone?
>>
>>61446032
guarantee you, that 5 different anons will tell you 5 different backends to learn
For me Node is fine. Does the job well and NPM is really useful.
>>
>>61445912
>link your site
N-no. Pls.

>video tag created by JS
It was being created before as a generic with no real source, but now it's not generated at all.
>>
>>61446165
well, then see why it's not inserted

I am wondering why you are creating the whole element via JS.
Write it in the HTML and then just use JS to set the src attribute. (unless you have a specific reason)
Also no need to use jQuery for something, that you can easily accomplish nowadays with vanilla.

https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
https://developer.mozilla.org/en/docs/Web/API/Element/setAttribute

gonna sleep now
hope you get it sorted out
>>
>>61441986

It sounds like they are just giving you the opportunity to interview anyway, so why not try? Could be a valuable learning experience.
>>
>>61446165
if you won't link the site link the fiddle you have working
>>
Ionic is web Dev still right?

Anyone else here having fun with it? I fucking love it, been at it for a few days and can't get enough.

Learning curve isn't too bad either if you're familiar with typescript
>>
>>61446875

>native

it sucks
>>
What's the simplest captcha alternative? I'm a faggot and need it for some shitty site.
>>
>>61446976

lol just make your own

>store a pw in your DB
>"faggot"
>before user submits form, tell them to type "faggot" in a text field
>upon submit, run a query that checks if it matches
>if match, submit through
>if no match, prevent form from submitting
>>
>>61447008
Well how do I prevent too much spam? Good idea though.
>>
>>61446351
I don't know why I'm doing it all in JS, just seemed easier at the time I guess. And jQuery is for something later on.

>>61446568
Here you go:

https://jsfiddle.net/dvp3knb1/

Re-hosted all of the webms via limf, but they work just fine on fiddle by serving from an internet facing directory from my site.
>>
Can anyone help me clarify some things?

I'm learning webdev and i know C#, I've been doing back end stuff as well as using Razor in MVC, but I'm starting to notice that Razor might not be the best idea for developing apps, so i want to know where do frameworks like Angular/React/Vue would fit in here?

I mostly want to use something for views and data binding but i've seen that Angular is more like a complete js framework and i would have to write a whole load of other stuff to get it working. I haven't check out React or Vue yet, but i want to know if anyone could tell me what should i use.
>>
Anons I fucked up and went to school for html and css. What can I do with this degree to pay off my student loans? I'm wage slaving atm so I don't have time to finish my udemy courses in JavaScript and python. I've done one freelance site. What direction should I go in that isn't necking myself?
>>
>>61447484
You're obviously too retarded to do freelance, get a job in frontend development at a chop shop agency.
>>
>>61447429
What's the question? Do you want something with a big out-of-the-box library of widgets? Do you want to be able to toss together a frontend application quickly to drive the backend? Or do you want complex and totally custom themed / built UI with unique design?
>>
>>61445299
>>61446081

All you have to do is test it yourself by using it

Not much can go wrong
>>
>>61447503
I went for g.d but fell in love with web design. The school then dissolved the web program and most of the teachers left so I only got html css and JavaScript along with drupal 7 and WordPress.
>>
>>61447503

>front end development

lel

just cant help but cringe
>>
>>61447484

>going to school for html and css

oh my god i just laughed for like 5 minutes straight
>>
>>61447571
I don't want to worry about the front end just something quick i could download but would work nicely & customizable if needed.

Like downloading material design ui for angular or react and just assemble the pieces with minimal effort.

What would work best in that case?
>>
>>61447589
subscribed

Tons of agencies need warm bodies to do mind-numbing "pixel-perfect" chop-jobs on marketing sites from designs, html, css, copy-pasted jquery tutorials. Starting at like 30k at the rock bottom. You're a perfect candidate, assuming you don't live in a shit city.
>>
>>61447697
That's more than I would make in 4 years! Any recommended sites to poke around? I live pretty close to d.c. and see the creative circle is around there. Guess I'll apply. Thanks anon
>>
>>61447832
https://washingtondc.craigslist.org/search/web

Gotta start at the bottom to work your way up.
>>
>>61447656
Any of the things you mentioned. What will be best depends on you. Spend a day or two trying different things, figure out what works for your.

Honestly, based on what you've mentioned, it sounds like you might be a good fit for something more old-school and very appy like ExtJS:

https://fiddle.sencha.com/#fiddle/1dma&view/editor

You can do basic themeing, but complex custom widgets and shit are a pain here, you'd have to learn all the ins and outs. You can mix shit together and build a complex UI quickly and easily, out of the box solution, especially for a guy who is more used to enterprisey shit.
>>
>>61447075
what does your array in the js look like on live?
>>
>>61444650
$(function() {
$("#videoplayer").html("<video id='rawvideo' playsinline autoplay id='bgvid' loop><source src='" + videoList[0] + "' type='video/webm'></video>");
});


or put the script below your div
>>
>>61448354
["dir/file.webm", "dir/file2.webm", "...3.webm", ...];

>>61448429
Inlining it does work.
>>
I've been trying to replicate this thing from scratch.
http://team.artrow.net/templates/estro/vcard.html
So far I have the absolute background to work with jumbotron but the transparent separation between sections isn't working for me at all. Every <div> that I make comes out as all white and no matter what I do it won't become transparent to show the absolute background behind it.
>>
>>61449223
its just padding
>>
File: k.jpg (19KB, 325x266px) Image search: [Google]
k.jpg
19KB, 325x266px
How do I know if my domain is pointing to the right hosting? I checked on whois and also another site that tells me the site IP and both the nameserver and IP are from the hosting I have but the site is still offline whenever I type it in my browser. Does it really need 48 hours for the changes to complete?
>>
>>61449409
It always turns out white or some shit. Even when I set the background to none, even when I set it to transparent etc. Even when I give all the sections margins the margins are white!
I've separated it into sections and the first section shows the background behind the jumbo tron so I know the background is there but the proceeding sections with "container" and "row" never shows the background no matter how transparent I make it.
>>
>>61445196
Just use 'localhost' as your domain.
>>
guys i want to deploy a basic blog in aws because i want to learn aws, the thing is idk what to use??? EC2 or Lightsail or Elastic Beanstalk, im really confused... whats the best option to learn??
>>
Why do so many people dislike JavaScript?
>>
>>61447075
>>61446165
>>61445840
..etc
Move the script tag out of the head and into the body, or use
$(document).ready()

jQuery's $(element).html() function fails silently. That is, if the element indicated by $(element) cannot be found, jQuery does NOT throw an error as you'd expect. As your page is, the script runs before the #videoplayer div is rendered.

If you have scripts that access elements ON the page, it can often be better to let them run AFTER those elements, just to be safe.

See the following for an example. I've stuck in a 'pick a new vid' button too, just to show you. Try clicking the JavaScript settings button and switching it to "No wrap - in <head>", and then running the Fiddle. It'll fail as before, without hope. Without witness. Without reward
https://jsfiddle.net/dvp3knb1/1/
>>
What is a route handler in node js?
>>
File: anime.jpg (53KB, 500x500px) Image search: [Google]
anime.jpg
53KB, 500x500px
>>61450598
because it doesn't work exactly like whatever their favorite language is, or because they saw a totally-not-biased hot meme on the internet saying it's bad (like the one about number coercion)

i wonder if there's a name for that primal-ish behavior thing where you (maybe subconsciously) agree with other people's opinions on things you don't really understand, in an attempt to appear "in" or something

it's very common on the internet

i think languages are tools and it says a lot about you if you refuse to work with one just because "it's shitty"
>>
>>61450925
Good post.
>>
>>61448429
>>61450911 (also me)
Yep, exactly. Remember HTML, JS, and to some extent CSS are rendered in order, sequentially, except in very rare circumstances. So if you have #myDiv, and have a script call #myDiv BEFORE that div on the page, the script's going to 'fail'.
>>
>>61450598

Because they're coming from a more static typed language background and find its behavior "not as expected therefore bad".
>>
>>61450925
>i wonder if there's a name for that primal-ish behavior thing where you (maybe subconsciously) agree with other people's opinions on things you don't really understand, in an attempt to appear "in" or something

We're social animals so no wonder. What I really hate are people who side at the one who's in the wrong because down the road they extract more social benefit by being "grouped" with them. It makes discussions less about who's right and more about who has the social power.

Morning rant off, I'm gonna start my FCC now.
>>
>>61450925
if you know little about a thing isn't it natural to go with those who appear to know about it

they probably have reasons for believing the things they do
>>
File: 1495783228035.jpg (57KB, 308x445px) Image search: [Google]
1495783228035.jpg
57KB, 308x445px
>>61450598
it's popular
>>
>>61450598

The early JavaScript had a lot of details that made it unnecessarily difficult and ugly.

-"==" vs. "==="
-implicit castings between strings and numbers can create weird results
-callbacks make it easy to create a mess, if you don't use them properly
-"this" works different than people expect and is error prone
-easy to overwrite/overshadow variables
-data structures are sometimes difficult and clumsy


The newer ECMA script versions brought a lot of good ideas and many of the original problems are now solved or at least easier to handle. But it took so long and the damage in the perception of JS is done..
Also you have to maintain backwards compatibility and every now and then you'll find terribly bad JS code.
>>
>>61451134
love this image
>>
how do I center an image using bootstrap
plz help
>>
>>61453443
Don't the usual CSS methods not work in Bootstrap?
>>
>>61446875
ionic 1 was terrible, for instance they extended a bunch of angular's UI router stuff and broke basic shit like subroutes not being destroyed or cleaned up when navigated away from. Their flexbox layout system was dogshit too
>>
>>61450925
This describes the JS community at large as well, giant fucking cargo cult
>>
>>61453443
<div class="text-center"><img src="..."/></div>
>>
Which one for my next website and why?
- adonis/vuejs (seems to be extremely popular now)
- laravel/vuejs (next laravel version will be a LTS)
- flask/vuejs (already had 3 websites with this stack)
>>
>>61453751
spring boot/react+mobx
>>
>>61445122
wtf does """": ? array"""" mean?
>>
>>61453844
return type annotation. the function returns either an array or null
>>
>>61453886
thx, figured that much on my own, so the questionmark is "null" return?

function getTotal(float $a, float $b) : float {


just asking for fun, not planning on using php lol
>>
>>61453791
I don't like react, looks retarded and documentation is terrible.
I didn't try mobx state manager yet because redux suits my needs.

I was a bit afraid about the java ecosystem when I was young and it is worse since Orcale bought Sun. I am sure they didn't if crowdfunding was as popular as today.
>>
>>61453912
>so the questionmark is "null" return?
yes

>>61453915
>and it is worse since Orcale bought Sun
it's better than ever actually
>>
Just use typescript if you don't like JavaScript, it's basically C#/Java.
>>
Is there a way to design/code webpages similarly to c#/java design tools? Writing pure html is ugh
>>
>>61454947
there are some wysiwyg solutions for html but in the end they're vastly inferior to doing it by hand. same goes for fxml and xaml. the only downside is the initial time investment needed to get comfortable with the markup language
>>
How exactly am I supposed to integrate css with React? Am I supposed to hard-implement in the prime HTML? Am I supposed to import -- somehow -- in one of the Components? What is the best and ideal way to do this?
>>
>>61455118
>What is the best and ideal way to do this?
there are lots of ways to do this and unfortunately no one is best or ideal yet

what I do currently is just
import "styles/main.scss";

in my "main" file (the one that renders root App component with ReactDOM.render). webpack's style-loader does the rest of the work.

but there's fuckton of other ways like styled components, css modules, etc.
>>
What's the standard CSS file to use for the quick app? There seems no point writing everything yourself.

What's the standard, the cookiecutter standard?
>>
>>61455814
bootstrap
>>
>>61455118
I just keep it separate and serve it as a static file. It'll pick up your component className once it's processed to ES5 js by webpack.
>>
HTML5 and CSS are simple languages for children and the mentally unequipped

Spin up Laravel, Falcon, or Codeignitor and build a real app, you plebs.
>>
File: takeshiwrech.png (578KB, 1280x1056px) Image search: [Google]
takeshiwrech.png
578KB, 1280x1056px
>>61456367
most "people" on here are kids that make websites for csgo skins t b h
>>
>>61456367
Spoken like someone who doesn't quite know what they're talking about.

HTML and CSS aren't programming languages. It's not like you can use them just on their own to build a reasonable interactive website.

Comparing them to PHP (or PHP frameworks for some reason) is a false equivalency.
>>
>>61456367
>newbie php dev calling others plebs
how cute
>>
File: you.png (299B, 30x25px) Image search: [Google]
you.png
299B, 30x25px
>>61456367
I give you the benefit of the doubt and am going to assume that you are just baiting, instead of moronically displaying your ignorance anon.
>>
>>61456572
If you don't know how to program in HTML5 canvas and in CSS3 and dont realize it is a language, then you my friend aren't just butt-hurt at your incompetence, you are also wrong... Html itself is a markup language, but the canvas and css3 extend some programmability especially with JS/JQuery and are recognized as languages. look it up.

I also mentioned the 3 simplest php frameworks to give you plebs a start in the game.
>>
>>61457109
>HTML5 canvas
is a small piece of HTML as a whole, or even HTML5 as a whole. And you specifically need JavaScript to draw to it. HTML5 canvas is an API, not a programming language.

>the canvas and css3 extend some programmability especially with JS/JQuery
Canvas is <only> programmable with JavaScript.

And I'm not even sure what you're talking about in regard to CSS3 being extensible with JavaScript.
>>
>>61457406

this

"programming in HTML5 canvas" doesnt really make sense. You're actually programming in JS. Just using the canvas
>>
File: 1499510282988.jpg (15KB, 454x417px) Image search: [Google]
1499510282988.jpg
15KB, 454x417px
>all good domains are squatted
fuck that shit

spending way too much time looking at obscure TLDs to find some good sounding name combinations
>>
>>61457827
>spending way too much time looking at obscure TLDs to find some good sounding name combinations

are you me?
>>
i have serious mental health problems and i neeed profesional help i cry myself to sleep every night
>>
File: jbp.jpg (102KB, 1024x683px) Image search: [Google]
jbp.jpg
102KB, 1024x683px
>>61457990
Sort yourself out.
Clean your room.
>>
What's the use of a framework for 90% of sites ?

I mean, if myself or a client wants a commercial site, everything has been implemented in Plugins (Woocommerce...) or e-Commerce platforms (Magento...) that work well. They feature full-fledged, tested rich text editors and are real CMS's that work out of the box and only need some front-end customization that even a 15yo could do.

With twig (Symfony...) or jinja (Flask), I have to make a custom admin panel to fill templates, no rich text editor, previews are a pain in the ass...

Ok Brackets and knowing HTML/CSS is even better than a RTE but what if I want to deliver an out-of-the-box website to a client ?

Don't mistake me ; I wouldn't make a webchat or a FB/Twitter in Drupalshit or even WP, but for 90% of use cases, why the fuck would I bother with Django or RoR or Laravel or Spring or Whatever ?
>>
File: Untitled.png (224KB, 956x654px) Image search: [Google]
Untitled.png
224KB, 956x654px
pls say something nice aobut my code
>>
>>61459351
This was supposed to convert an array of 1s and 0s into an int.
>>
>>61459351
no

Why wouldn't you at least do
sum = sum + Math.pow(2, arr.length - i - 1)

?
>>
File: 1497116546474.png (55KB, 217x190px) Image search: [Google]
1497116546474.png
55KB, 217x190px
>>61459351
you are now better with JS than you were before that.
Not like those people who post those clever oneline solutions were born with their knowledge.

Would also have done it in a loop like you
let binary = [1, 0, 0, 1]
let result = 0
binary.forEach((val, index) => {
if (val) {
result += Math.pow(2, index)
}
})
console.log(result)
>>
Interview coming up on Friday for a "tech support"/junior developer position at a small shop that uses the MS stack. It starts at $55k/year, with profit sharing and some bonuses to retirement after 6 months, health insurance, and opportunities to move up within the company after a couple years. The job description mostly focuses on SQL Server, and generating reports using SSRS/writing stored procedures. I have no experience with SQL (my work doesn't use it, and I haven't done any projects that really justify using it), and I sure as fuck don't have any experience using SSRS or writing stored procedures. I applied for a "software developer" position but the owner of the company emailed me and told me I'd be more suited for the "tech support" position.

Here's the dealio, I'm currently working as a "full-stack engineer" (in quotes because I don't even know what my official job title is, but I work on everything) for a small startup. The pay is $22/hr, I work remotely, and I essentially work my own hours whenever I want. There's no health insurance, no profit sharing, and no retirement, and no chance to move up in the company (because there's really no company structure) but I am getting development experience.

I'm worried that if I did get an offer from this new place, it might be a step backwards for me. I'd be forfeiting any direct development experience for at least a year just to be a database monkey again. Should I really pursue the new opportunity and forego any real career advancement for at least a year, or should I continue working where I'm at and earn less money but get more applicable experience for a SE job later?
>>
var readline = require('readline')

const generateEightBitBinaryArray = function () {
var arr = []

for (var i = 0; i < 8; i++) {
arr.push(Math.pow(2, i))
}

return arr
}

const convertBinaryToIntreger = function () {
var binaryArray = generateEightBitBinaryArray()
var input = process.argv.slice(2)[0]

if (input.length > 8) {
throw new Error(`can't process >8 bit numbers`)
}

var totalValue = 0
var position = 0
input = input.split('').reverse().join('')
for (var bit = 0; bit < input.length; bit++) {
if (input.split('')[bit] === '1') {
totalValue += binaryArray[position]
}
position++
}

return totalValue
}

var intreger = convertBinaryToIntreger()
console.log(intreger)
>>
>>61458607
no, he would tell him to go get the help immediately

>>61458833
>What's the use of a framework for 90% of sites ?
none, that's why 90% of sites use wordpress or magento or drupal or whatever

>>61459351
I haven't done any codewars since last summer or whatever. why are their servers suddenly shit? they worked flawlessly last time I used it
>>
>>61459612
Palindromes don't always make the best test cases :^)
>>
>>61450598
It's a pretty bad language, lots of broken shit, but that's true for most languages like C++. Honestly ES5 earned its bad reputation, but ES2017 is actually really solid.
>>
>>61459727
The totally standard track is to work your way up through positions by increasing your base salary by taking another job every year or so. You'll get experience wherever you are, even if it's not as strong technically it at least will be operationally. Diversity in experience is desirable in a "full stack engineer." The best thing you can do for your later career is to not stay at your current base salary for too long.

If you decide to go against tho totally standard advice, at least realize that getting as many offers as possible is ALWAYS beneficial. They are concrete leverage you can use to improve your position in tons of different ways, especially if asking for a raise.

https://www.kalzumeus.com/2012/01/23/salary-negotiation/
>>
>>61450598
The main problem with Javascript is that it still uses C-style for and while loops where you have to set variables by hand to go through arrays while most modern scripting languages like Python and Ruby have very powerful mapping and iterator methods that work on all container types. It just feels ridiculous that I have to increment a count variable like a++ in a for loop when every other scripting language abstracts that process
>>
File: 1500482293312.jpg (173KB, 1320x876px) Image search: [Google]
1500482293312.jpg
173KB, 1320x876px
>>61428999

Were is this nerd getting all these memes?

> pr0gramm DOT com SLASH new SLASH 2038177

scroll down to see them.
>>
>>61459920
>no, he would tell him to go get the help immediately

you are right,
how do I know though, that the other anon isn't just exaggerating for (you)s
There is a mental health thread on >>>/r9k/
no idea if those people are serious though or if it's memes
>>
>>61460055
Well if I'm looking to move on to a much larger company (like one of the big 5) later on in say, 2 more years, what would look better: 3 years of development experience as a full stack engineer at a single company, or 1 year of development experience at one company with 1 year of tech support + 1 year of development experience at another company?
>>
File: ss-2017-07-19-21-56-54.png (6KB, 383x115px) Image search: [Google]
ss-2017-07-19-21-56-54.png
6KB, 383x115px
>>61460146
the main problem with your opinion is that it's factually

>>61460382
>how do I know though, that the other anon isn't just exaggerating for (you)s
yes, you're right as well
>>
>>61460456
>oh but look, ES6 has that
except frontend programmers dont use ES6
>inb4 oh but look, there is such thing as Babel
except no frontend programmers use Babel
>>
>>61460950
>except frontend programmers dont use ES6
>except no frontend programmers use Babel
are you high?
>>
>>61460146
>C-style for and while loops
You can use foreach loops as >>61460456 pointed out.

>C-style while loops
are not a thing. Or are you upset about curly braces?
>>
>>61430321
If you want that feature do it on serverside.
It would not only be a pain in the butt. It would be bees in the butt. With hornets if people steal your api keys from your code and make api calls with your keys.
>>
>>61460436
Probably all of the above.
>>
>>61460950
>oh but look, ES6 has that
oh but look, it's fucking ES5

http://caniuse.com/#search=foreach
>>
>>61460146
What the fuck? I never use for / while loops in JS, write functional code ya mongoloid.
>>
Are you guys all here *NIX users? I'm thinking of taking the leap and switch to Ubuntu, I heard the toolkit that comes with Linux environments is pretty much mandatory to know for web development.
>>
Anybody here use CodeAbbey? I can't get through most of the Javascript problems. The input data is so massive and takes so much time to trawl through.
>>
Now that python is the best and most used language, why are we still using javascript in browsers?
>>
>>61461166
It's certainly not mandatory, but web dev in bash is by far the most comfy. Windows is trash for web dev, and OSX is decent but not as good as linux, plus you have to deal with shit like homebrew. Linux has that first-class citizen feeling.
>>
>>61461171
Because python is ugly as sin.
>>
>>61461249

My only problem now is that Linux doesn't have Photoshop and I may need to do some mockups/wireframing for potential clients.

Eh, I always have my shitty Macbook Pro for that kind of stuff, I guess.
>>
What has been the project you are most proud of in your portfolio, /wdg/?
>>
>>61461265
I use virtualbox for Adobe stack and that works well, but is obviously not ideal. It's okay if you've got plenty of RAM. Shared copy / paste, network sharing between host and client, etc. I even put together a snapshotting scheme that lets me easily start 30 day trials of Adobe software over whenever it expires. It might be annoying if you're running PS every day, though. In my experience it's pretty seamless.
>>
>>61461321

Sounds like a plan. Hopefully my 8GB RAM will be enough (ex-gaming rig).
>>
>>61461336
I have 16 in my laptop. If you have issues, just upgrade, RAM is cheap as dirt.
>>
>>61461171
Because it would take years to actually get a reasonable share of browser support for Python. Not enough people use modern, fully updated browsers. See ES6(+), WebAssembly, etc.

Also, you would have to define a set of DOM interaction methods, plus probably a bunch of stuff to make it not lack feature parity (for web-centric stuff) with JavaScript.

Also, Python would probably be harder to minify, since it's whitespace sensitive.

Also, do you like the Python 2/3 version fragmentation? Have fun with that times 10.
>>
>>61461380
this

Lua should be the new Lingua Franca of embedded scripting (also there's already a fast implementation)
>>
>>61461416
>Lua
No.
>>
>>61461345
>RAM is cheap as dirt.
Not at the moment mate, at least in the UK. 16GB of RAM = ~£125.
>>
>>61461427
literally flawless desu
>>
File: itsok.jpg (251KB, 1920x1011px) Image search: [Google]
itsok.jpg
251KB, 1920x1011px
>>61461166
I have both windows and ubuntu on my drive and mostly using windows with bash / subsystem for linux due to ease-of-use (or laziness).
Even defaulting the terminal inside windows' VSCode to bash and haven't encountered a limitation yet, except for one issue with the webpack-dev-server recently.

>>61461171
python is not more widely used than JS though...
JS is also faster + I can't think of a good alternative to NPM
What advantages do you see with python?

>>61461306
The only thing I actually finished and shilled last thread.
chanstats.info
Not like I can use it to get a job though I guess.

what about you then?
>>
>>61461432
luajit is so fast, even if it where full of flaws, it would be worth it.
>>
>>61461506
>I can't think of a good alternative to babby's first package manager
turbopajeet detected
>>
File: 192473-dogs-bored-looking-puppy.jpg (148KB, 1920x1200px) Image search: [Google]
192473-dogs-bored-looking-puppy.jpg
148KB, 1920x1200px
>Take a year to find a shitty 3 month contract job
>contract ends
>fucked up by not focusing on anything in particular
>feel like I'm not qualified for anything
>literally no jobs where I live
>applied to 200+ jobs before landing the 3 month contract job
>moving to a bigger market next week
>start applying
>the soul crushing application process begins again

I don't know if I can handle 200 more rejections boys. I'm not even recovered from the last time I had to start, it's just such a draining process...

I feel like there has to be a better way. Like maybe I should just focus on one skill and just become an expert in that one language instead of being spread so thin.

I've got a total of six months experience under my belt and feel like an absolute fucking noob. I just want to make it...I just don't want to fill out so many applications again.

I don't know if I have it in me anymore boys.
>>
>>61461620
Yeah I don't know all the details of any PHP, Python or Java package manager.
If you know of something else that offers the same or a better feature set as NPM, then I am happy to hear about it.
Otherwise shitpost away
>>
>>61461663
what did you work on during those 3 months and what are the things you can comfortably work on with your level of experience?
>>
File: ss-2017-07-19-23-35-03.png (64KB, 377x904px) Image search: [Google]
ss-2017-07-19-23-35-03.png
64KB, 377x904px
>>61461533
js is faster
>>
>>61461663
Pretty sure you're just retarded my man.
>>
Which one and why?
- C# 7+
- EcmaScript 6+
- Kotlin 1+
- Java 9+
>>
File: 1460506164082.png (180KB, 379x551px) Image search: [Google]
1460506164082.png
180KB, 379x551px
>>61461916
>Java 513.8MiB
>Scala 120.12MiB
>>
>>61461935
Which one, what? To use? Depends on the project. To learn? Kill yourself.
>>
>>61461952
>>61461923
>>61461620
bully pls go
>>
>>61461869
The worst thing possible: Adobe shit (photoshop, animate, illustrator) basically making assets, though the position is still listed as a "web dev" so it's basically just experience that I have to twist into an actual web dev job description.

I really don't know since my position before that was making WordPress sites. So WordPress and simple design stuff. I'm thinking about just focusing on php/laravel and just going balls deep into that or something else that has stand alone dev positions.
>>
>>61461935
web backends? easily kotlin
>>
>>61461952
We are on /wdg/ so...

>>61462011
Why?
>>
>>61462038
I've worked with all of them and Kotlin is the most pleasant to program with (C# close second). And then it targets the best and most widely used platform for backends (.NET and Node far below). Also it has first class support in Spring 5.
>>
>>61461916
>Mono anything & Haskell faster than LuaJIT
yeah sure
>>
Umm, that language is still far too young for me to invest my time on it.
I would like to do some c# again, but microsoft made shits with .net-core/.net-standard and xamarin is a pure mess.
>>
>tfw my favorite browser doesn't support source mapping
fuck, i love seamonkey but why
>>
>>61462159
Your post is a pure mess.
>>
>>61462280
Prove xamarin is not a mess!
>>
>>61461171
>Now that python is the best and most used language, why are we still using javascript in browsers?
Python is a shit language compared with Ruby.

Everyone who thinks that Javascript needs to be replaced are people who use languages like Java and C# and want Javascript to be more statically typed and have conventional class based OO. The fact is that prototype OO in Javascript is perfect for what Javascript is used for, it eliminates a lot of class type cock blocking that would happpen in conventional OO. Dart and Typescript failed for a reason, they are both trying to fix something that does not need to be fixed by replacing with something that is demonstrably worse.
>>
Anyone been to a local freeCodeCamp meetup? What was it like?
>>
How similar is angular 4 to 2?

I'm learning angular 4 now, can I reference angular 2 tutorials or will it just fuck me up?
>>
>>61429735
>tfw good at css
>tfw shit at design
>>
fuck bros, whats their to do in web dev besides enterprise shit? word press shit, etc.
>>
>>61434860
Just started learning/making stuff in Vue. Its alright
>>
Does anyone know of any decent, free alternatives to Sketch?
>>
>>61463734
are you me?
>>
>>61453443
fuck bootstraps

position:relative;
top:50%;
left:50%;

also minus half the height and width from margin left and top

:^)
>>
>>61463960
html, css, and javascript
>>
>>61461124
>oh but look, it's fucking ES5
c => console.log(c)

dumbass
>>
what meme nosql db/server should i use?

i need something i can pull/put json into for my javascript app
>>
>>61465984
What? I just want a mockup tool, I wouldn't use it to generate code.

>>61466051
The thing that was relevant was the forEach loop (as opposed to C-style loops). You can use regular inline function notation instead of arrow functions. Please take context into account.
>>
>>61453443
<center>
>>
>>61463157
I went to one of their nodeschool meetups once and it was pozzed
>>
I'm so fucking sick and tired of looking for my first job. I'm about to into C# because that's all that's out there, I don't care what you fuckos say about it anymore.
>>
Where do you guys look to for inspiration/ideas for webapps you want to build (for personal/hobby projects, or startup ideas)?
>>
>>61467199
C# is great. It's a lot like Java but in my opinion more consistent and nicer to work with, and Visual Studio is a fantastic companion. 80% of /g/ is unemployed or not employed in software development, don't listen to them. C# is comfy as fuck.
>>
>>61453443
The question you want to ask is "how do I center an image with CSS", it has nothing to do with bootstrap

>>61453513
bootstrap-induced retardation make the it difficult

>>61453673
https://jsfiddle.net/eg3f0thh/

>>61465939
this is a dogshit method that breaks when you sneeze
>>
>>61467343
>>61467199
c# is basically java 2.0 but with .net and less fuckery to deal with
>>
>>61467528
>.net and less fuckery to deal with
pick one
>>
>>61465859
>>61463734
News flash: you have to actually go to school for design, unlike programming.
>>
>>61467364
>div stlye
>stlye
>>
File: dancing nazis.gif (2MB, 184x191px) Image search: [Google]
dancing nazis.gif
2MB, 184x191px
>>61467528
>>61467343
Thanks for the encouragement anons, I'm going to do it!
>>
>>61467842
P.S. if you are already well-versed in Java, skip the basics of C# as it is almost identical to Java. Focus instead on learning ASP.NET, the .NET framework itself, LINQ, and letting .NET apps interact with SQL Server databases (calling stored procedures and whatnot) as most places that use .NET use a full Microsoft stack because it all works together really well. Also learn Visual Studio itself and its debugger, how solutions (sln files) work and the basic project structure. That is, assuming you're going for web stuff, which is where the majority of the C#/.NET jobs are.
>>
File: space2.jpg (937KB, 5275x1041px) Image search: [Google]
space2.jpg
937KB, 5275x1041px
>>61467842
don't forget to waterfall everything so you can embrace your new enterprise programming langauge
>>
>>61467904
Damn thanks for the write up man. Any other advice? I'm going to dive in tomorrow morning.
>>
>>61467907
Wut?
>>
>>61467960
As a basic exercise try to create a very simple web app with one page, where some piece of text on the page comes from the server-side code. E.g. perform some calculation in C# and write the result to the aspx page in front of it. You'll want to use ASP.NET tags like <%= %> in your aspx page (front end) and in the codebehind aspx.cs file (server side) you'll want to calculate/generate the value for whatever you're going to write into the <%= %> tags. After that try setting up a repeater or other more complex ASP.NET databound control. Here's a good simple example:
http://code.runnable.com/UjMj269qAWwQAAB3/asp-net-how-to-use-repeater
>>
Goddamn. I fucking hate web development and am trying hard to stay away from it, but every mother fucking job out there has shit like "Javascript", "ASP.NET", "AJAX", "Node.JS" as part of the job description. I just want to be like pajeet and program in Java or C#, write shitty enterprise code for 40 hours a week, and collect my paycheck.
I took one web development course, and helped in the backend for one website, I don't remember most of this bullshit. Fuck.
>>
draggabilly or interact.js?
>>
Just have a horrible phone interview with someone. I lack Javascript experience but I'm going for Javascript roles. He asked me technical questions and definitions and I fell apart.

Looks like I need to scale back and look for the most junior of javascript centric roles. My 2 years experience, rarely touching JS, doesn't seem to mean much.

I'm bummed out (please subscribe to my blog).
>>
>>61469494
>My 2 years experience, rarely touching JS, doesn't seem to mean much.
>>61468150
>I fucking hate web development
>program in Java or C#, write shitty enterprise code for 40 hours a week

It's not rocket science guys. Like yeah, you need to study up a bit but I think you're both severely overestimating the barrier to entry. Learning to program was the hard part. Learning the syntax, jargon, and lore of a new language is the easy part. Go write a multiplayer board game in JS or something (like a week or two of nights and weekends) and you'll have done more complicated work in font end than you'll see in senior positions where you get paid.
>>
>>61461166
>I heard the toolkit that comes with Linux environments is pretty much mandatory to know for web development.
you got meme'd. Everything you need for web development is easily available in Windows, including web servers like Apache, all scripting languages, code editors and IDEs, etc.
>>
How do I make it so that each array item appears in console 3 seconds after the previous item
function coolArray() {
var a = ['teeth', 'tongue', 'leeps'];
setTimeout(function() {
for (var i = 0; i < a.length; i++) {
console.log(a[i]);
}
}, 1000);
}

coolArray();

So 'teeth' appears first, then 3 seconds later 'tongue' appears etc
>>
>>61467199
C# jobs are like PHP ones, you will have to maintain legacy C#4/ASP.NET code. So don't be too happy and you shouldn't waste your time to learn fancy unused things like .NET Core and .NET Standard and focus on oldish things.
>>
>>61469881
Maybe in retarded countries but real companies with good and future proof projects need more than just a stupid fag who wrote a pity games board while he was at school. Yes some little companies still have silly boss with retarded mind that doesn't fucking care about nothing except young employees that accept everything without conditions even if it's bad or stupid but they were mostly government companies with retarded incest fags, hopefully it changed with internet and it's easy to detect ethical frauds now. We can't accept that a guy equals ten others guys without justice actions anymore.
>>
>>61469991
For some baffling reason it won't let me post the actual snippet, but just put await sleep(3000); right after the console.log
>>
>>61469975
Apache on windows is ass, node ecosystem on windows is ass, nginx on windows is shitty. While major tools get win32 support absolutely no one besides microsoft gives it priority of any kind.
>>
>>61470209
lol, what the hell are you even talking about?
>>
>>61432498
not if you are living in eastern europe
>>
>>61469991
for (var i=0; i<a.length; i++) {
;(function(k) {
setTimeout(function() {
console.log(a[k]);
}, k * 3000);
)(i);
}


Looks wierd but that's pretty standard. Look up closures if you don't understand.
>>
>>61469991
>>61470293
This will work. Pretty much any sane solution is going to leverage closures, so you'll want to research that. The term to google for what anon did there is IIFE (immediately invoked function expression). They are insanely useful.

Personally, I would use setTimeout and recursion because it's a useful trick for polling on an interval. If you feel ambitious and want to learn something, try doing it that way too instead of just copy pasting anons code.
>>
>>61469494
Or maybe try building up JS experience?
>>
>>61470293
Thanks mate. I will study closures and what >>61470392 mentions right away!

>>61470231
That only works in async functions though right?
>>
>>61469881

Weird post.

The beginnings of web dev are incredibly hard, there's liek a thousand buzzwords raining down on you and you have no idea if they are important or not.

I remember my first (real) project, every few days a completely new technology or topic. Each topic is not terribly hard in itself, but it's like fighting against the Zerg: the sheer number can bring you down.

Do you understand at least the basics of Client-Server architecture and the HTTP model? Routing? Authentification? Security? Status Codes? YAML, JSON, XML? Templating systems? MVC? Where to put your code in MVC? JS and the DOM-Modell? SASS and SCSS? Bootstrap? jQuery? Whatever custom library you need to make things work? Did you learn your backend langauge of choice as well as the nuts and bolts of the framework you are using?

And just when you think you figured it all out, deployment comes and you start with a million differnt topics again..
How much do I have to pay, how can I calculate how much latency/bandwith/throughput is OK? How do I install that shit and what's this fail2ban thing about? XSS? XSRF? And of course you monitor and log your stuff right so you how what is actually happening on your site?


A freaking nightmare.
There just isn't a entry level like in "normal coding" where you make a tiny gear of a big machine, you need to know a little bit of everything.
>>
what should I make? i mean some next level world changing thing
>>
>>61470760
A wacky farting soundboard
>>
When working on projects in Javascript for a portfolio, is it better to stick with base Javascript to show how far you can push it or would it be more effective to use whatever library will make the project easier?
>>
>>61470977

>why_not_both.js
>>
Recently working in this:

https://github.com/toniov/p-iteration

Some feedback?

If it's useful to you a star would be much appreciated.
>>
>>61470446 here, I've looked up on closures - so it's just "you can define variables outside of functions"? I thought it would be more game-changing and revolutionary than that...
>>
What's a good style guide for both handling errors and dealing with asynchronous stuff in JS?

There's so many ways to do things I have no idea wtf is best. Callbacks, promises, async libraries. Errbacks. Exceptions.

I want something clean and simple

What do big well maintained projects use
>>
>decent .NET developer
>7 years paid experience
>worked at all stages of SDLC because second hire at start-up
>move to new country, need a visa
>have to settle for job as angular dev
just FUCK my career up senpai
>>
>>61470760
var name = 'Woody Harrelson';
console.log('Hello, ' + name + '!');

Change name whenever other celebrities visit your website, i.e. "var name = 'Mel Gibson'" for Mel Gibson. Good luck with your million dollars :^)
>>
>>61471191
You just need people to make an appointment to visit your site and it'll work.
>>
they crammed a crud framework into codeigniter framework

indians are fucking retarded
>>
>>61470293
>>61469991
what about something like this?
async function delayedPrint(arr) {
for (let item of arr) {
await new Promise(resolve => setTimeout(resolve, 3000))
console.log(item)
}
}

delayedPrint(['teeth', 'tongue', 'leeps'])
>>
>>61467567
this

>>61467343
working on windows can't be comfy, sorry. intellij with kotlin all the way

>>61471156
just like read some code
https://github.com/trending/javascript?since=monthly
https://github.com/search?l=JavaScript&q=stars%3A%3E1&s=stars&type=Repositories

>>61471171
that sucks

>>61466329
>what meme nosql db/server should i use?
probably none. postgres can store json
>>
>>61471095
nice documentation.
Did you use something to generate it?
>>
>>61471370
await new Promise("I'll love you forever", resolve => getCheatedOn());
>>
File: 1498134495807.png (129KB, 314x278px) Image search: [Google]
1498134495807.png
129KB, 314x278px
Using a media query which works fine when I open up the html file normally, but when I use http-server it breaks on both phone and pc and does fuckall.

pls help
>>
>>61436658
try to customise something. look at the code. it's mental
>>
>>61462949
nonsense. people use static typing for correctness. it has nothing to do with OO flavours
>>
>>61461306
I made a webrtc based video counselling platform for people in war-torn countries. It's helping people out there.
>>
>>61461916
damn Nim and Crystal are looking nice
>>
>>61461663
6 months? it's nothing matey. harden up.
>>
>>61461935
I had a big discussion about this with very senior ex colleagues and they all have a boner for Kotlin right now. It has the best bits of scala and java without the craziness.
>>
>>61469494
school up on js, use eloquent javascript, it's free. dont be bummed, you just need to school up
>>
>>61469991
['teeth','tongue','leeps'].forEach((s, i) => setTimeout(() => console.log(s), i * 3000))

ya nigga
>>
>>61471171
brutal, I feel you pain, just moved to Estonia from the west as a dev with 10 years experience, incredibly low salaries and shit jobs (java/angular) here, gonna try work for myself instead.
>>
>>61436051
Use LESS instead. Variables looks more CSSy with the @ instad of $. And LESS is nodejs-based too, which you're most likely going to install for some reason anyway
>>
>>61436051
it's not that helpful in the long run. encourages bad habits (easy to write, hard to read).
>>
>>61472906
you also forgot to add that LESS doesnt sound like something a faggot would use, which is the main reason I switched to it
>>
>>61471134
It is that simple, but it's an incredibly powerful tool once you get it.

Here's a simple example that demonstrates some of what you can do with it.

function createCounter() {
var count = 0;
return function () {
count = count + 1;
return count;
}
}
var counter1 = createCounter();
var counter2 = createCounter();
console.log(counter1()); // -> 1
console.log(counter1()); // -> 2
console.log(counter2()); // -> 1

Each counter made with createCounter interacts witb its own version of the count variable.

You can do a lot of other cool things with them too. It's super versatile.
>>
how hard is it to go from javascript to c++?
>>
>>61472232
I used JSDoc.

http://usejsdoc.org

If you comment the code according to the rules it's generated automatically in a nice way.
>>
>>61470293
>pretty standard
Pretty standard according to whom? Got statistics to back that up?

>>61469991
Here:

(function() { 
var words = ["teeth", "tongue", "leeps"];
var i = 0;
var newInterval = setInterval((function() {

if (i === words.length) {
clearInterval(newInterval);
}

console.log(words[i]);
i++;

}), 3000);
})()
>>
Flat file CMS, y/N ?
>>
>>61473841
Seems like a neat way to write it but there is an additional undefined call at the end. Where is it coming from, the clearInterval part?
>>
>>61474462

thats a standard function part of JS. Just like alert(), etc
>>
>>61474479
Right, so is there no way to remove the fourth call?
>>
File: 7ef.jpg (29KB, 600x600px) Image search: [Google]
7ef.jpg
29KB, 600x600px
>>61474522
        console.log(words[i])
i++

if (i === words.length - 1) {
clearInterval(newInterval)
}



new thread
>new thread
>>61474571
>>61474571
new thread
>new thread
>>61474571
>>61474571
Thread posts: 314
Thread images: 28


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