[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: 320
Thread images: 32

File: wdg.png (731KB, 824x553px) Image search: [Google]
wdg.png
731KB, 824x553px
>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://coderbyte.com/
https://www.freecodecamp.com/
https://www.bento.io/

>Further reading/viewing
https://www.youtube.com/watch?v=sBzRwzY7G-k
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/
>>
>>61317219
>>61318231
here's one way you can do multiple requests and combine their results:
https://jsfiddle.net/uo9pjued/
>>
How do you structure folders in your php app?
Do you use mvc pattern when you build everything from the ground?
>>
File: new.png (435KB, 1068x1238px) Image search: [Google]
new.png
435KB, 1068x1238px
>>61318817


..and that's why you start with learning a decent MVC framework (not necessarily in PHP) until you know where to put things.
>>
REMINDER
A large amount of us welcome and encourage new devs to ask quesions. This includes emploment questions.
>>
Anyone can help with this?
>>https://stackoverflow.com/questions/45007859/creating-table-from-array-with-different-length-and-value-php
>>
Doing a bunch of php webdriver scripting lately to test updates on e-commerce site I work on.

Really enjoying it. Is there a career path I could go down with this?
>>
>>61319990

sure - i wouldnt limit yourself to one language though. And I hope youre using php7+ because old php is shit
>>
What if I did one big php script to handle all of the buttons in my html form instead of having separate html files for each thing I want to do?

Example:
<?php if($_POST["recordquery"]) { ?>
<html>
display records
</html>
<?php } ?>

<?php if($_POST["clientquery"]) { ?>
<html>
display clients
</html>
<?php } ?>

Can anyone see anything going horribly wrong with this idea? It would really clean up my wwwroot directory.
>>
>>61320544
sure, you could dump everything into one file. you'll see why this is a bad idea when you go over like 300 lines or so
>>
File: np++.jpg (147KB, 831x899px) Image search: [Google]
np++.jpg
147KB, 831x899px
>>61321007
Actually in notepad ++ it lets me minimize every start of php. It cleans up nicely. I just want to know if this is just a really bad idea otherwise.
>>
>>61321110

yes thats fine but you dont need all the seperate opening and closing php tags

just put everything in one <?php ?> tag
>>
>>61321157
Well, I need to close the tag for the HTML script to run don't I? It's all <html> after each tag.
>>
>>61321296

>all <html> after each tag

wat
>>
>>61321391
Yeah it displays a new page depending on what the form button is named.
>>
>>61321391
<form action="insert.php" method="post>

<input type="submit" name"page1" value="page1">
<input type="submit" name"page2" value="page2">

etc etc
>>
How do you handle not being able to achieve as much at the beginning as you wish, /wdg/? I've been designing and developing web pages for a month now and have been looking into Github to dive into as a means to build applications and get them out into the world as portfolio material. But PHP and various Javascript frameworks are way above my level of skill at the moment. Yet I want to build a sweet portfolio and grab a nice job ASAP.
>>
>>61321594
What platform do you use to develop your web pages?
>>
>>61322027
HTML and CSS, ezpz level.
>>
>>61320544
Please don't actually use PHP to display HTML.

Use something to manipulate the DOM depending on an ajax return like jquery at the most basic. What you are doing has been "old school" for like 5 years.
>>
>>61321594
Learn JS. It's pretty easy.

No one really hires an HTML/CSS only designer these days.
>>
>>61322395
>What you are doing has been "old school" for like 5 years.
no it has not. "it's not hip" is a pretty dumb reason not to do something. you need to try better
>>
>>61322395

yeah this

have your php scripts spit out JSON, then use AJAX to bind it to your html pages. This is what most frameworks do, but its more fun if you do it raw
>>
>>61322410
It's not, that's what I am getting at. I've been learning JS as well but it is going to take some time to get to a competent level. So all I can do at the moment is HTML and CSS while all the big boys are playing in Github. I want to make big projects but it just has to take some time to get to the level of being able to do so, which is very frustrating.
>>
>>61322538

it actually is a pretty old school way of doing things, plus back end mixed with front end code can be a hassle to even look at and manage
>>
File: portal.jpg (288KB, 1183x1092px) Image search: [Google]
portal.jpg
288KB, 1183x1092px
>>61322547
I don't know how to do that though. I'm not actually a developer, I just picked up some html, css, php and sql and run a ticketing and CRM system because the online solutions sucked and cost too much.

I was wondering about displaying those pages in php because I don't know if it's going to impact anything long term, but the system is pretty much done at this point.

I don't even know Java. The system works pretty well though, even has email notifications using phpmailer
>>
File: 1493407252042.jpg (1MB, 3888x2592px) Image search: [Google]
1493407252042.jpg
1MB, 3888x2592px
>>61322595

this is the problem with web dev - people get boners for HTML and CSS and think thats what builds apps nowadays. It's not. Its just front end crap to make things look pretty. Start with back end then go to front end. Learn how to program first and foremost. People latch onto "koding" HTML/CSS tutorials because well, its not real programming therefor its much easier. Literally anyone can do HTML. Though it can be a bitch at times, especially CSS.

Become full stack or die trying.
>>
>>61322606
>it actually is a pretty old school way of doing things
by what standards? the fact that it's less featured on hipster-ish webdev blogs than it was before? it is still used today, especially in internal enterprise webapps that have shitload of complex forms and other controls but don't neccesarily have high appeal to hip users as main requirement

>plus back end mixed with front end code can be a hassle to even look at and manage
rendering html documents server-side doesn't equate forgoing separation of concerns
>>
>>61322673

if your app works then it works, cool, dont forget about security. Your next project i'd recommend doing things more "modernly" though , but do whatever the fuck you wanna do
>>
>>61322733
Yeah I know it's pretty old school looking but really easy to use and navigate.

I needed to get the techs focused on the work and not the process.
>>
>>61322730

the standard of technology rapidly changing and pushing the envelope. What developers dont want to happen if to use one way of doing something, and years and years later when better ways of doing things comes out, they are still using their old ways. It's not necessarily "bad" nor does it make anyone a shitty developer, you're just not up to par with the latest technologies. AJAX has been around for years though, so I personally think it's kind of silly not to use it.
>>
I've a website using bootstrap 3.3.4, to update to latest 3.3.7 I just need to change the css/js?
>>
>>61322730
>rendering html documents server-side doesn't equate forgoing separation of concerns
Can you elaborate on this?
>>
>>61322767

again - this isnt about how it looks. I dont know if you really know the difference between front end and back end. Look at this site. Or craigslist. Shitty simple front ends but its fine because the back end is the magic behind the sites. Your app can look identical to how it is now and do everything its currently doing without ever refreshing the page (and im sure you could get the number of lines of code way down).
>>
>>61322787
you're incorrectly assumin that using xhr everywhere instead of sending server-side rendered html is better for every usecase

>AJAX has been around for years though, so I personally think it's kind of silly not to use it.
what a silly blanket statement. it's silly not to use it when you would benefit form using it, and it's silly to use it when you would not only because "it has been around for years"

>>61322821
in MVC pattern your views are completely separated from both your controller logic and your business logic
>>
>>61322831
Thanks, I'll keep that in mind for upgrading the back end. w3schools a good start?
>>
>>61322841

if the OP is the same person who posted his php code with <html> tags in every POST request, then yes I think thats an old depreciated way of doing things. You dont want to use something just because its been around for years, thats not what im saying. I'm saying it makes you even more behind on current technologies because ajax has been around for a long time.
>>
>>61322908

cont.

a car mechanic could still be building Model T's, but how employable would he be? How would his career go compared to if he was working on Tesla's or other modern cars?
>>
>>61322270
No I mean which platform? Visual studio?
>>
>>61322861

yea sure thats actually how i learned, once you understand this then you should be good to go

https://www.w3schools.com/js/tryit.asp?filename=tryjs_ajax_suggest_php
>>
>>61322908
Not necessarily. Notice how buggy operating systems and new software is when they're first released? Time tested methods do have their place as well as new methods.

The military for example still uses PCMCIA in new fighter jets.
>>
>>61321594

Learn Bootstrap to help with laying out your front end quickly and easily. Don't worry about frameworks in regards to PHP etc just yet. You can build with vanilla PHP.

just do tutorials on whatever you're trying to achieve and bend them to your will.
>>
>>61323001

i dont understand how software testing as anything to do with this, it has to be tested anyway. The greatest and latest piece of code can still be buggy

also military technology is outdated as fuck - Trump was actually right on that shit
>>
>>61322908
>if the OP is the same person who posted his php code with <html> tags in every POST request, then yes I think thats an old depreciated way of doing things.
it is and I never denied that. but if he were to still render everything on the server but also apply the MVC pattern then it would be neither deprecated nor oldschool

>I'm saying it makes you even more behind on current technologies because ajax has been around for a long time.
of course not knowing AJAX is a serious lack in webdev knowledge, but that doesn't mean you have to apply AJAX to everything because anything else is "oldschool" which the first post I replied to stated

>>61322861
>w3schools a good start?
not really, see: http://www.w3fools.com/
>>
>>61323069
Depending on your goals I guess. I'm totally on board with new developers getting into the new technology if that's the career path or hobby they want to pursue.

My goal was that I needed a smoother running office, so I wrote an ordering and ticketing system which also happened to save the company over 6,000 a year in subscription fees. I dove in from scratch with no programming background and in a few months on my spare time I cobbled this together and went with it.

What I was hoping to achieve by asking if generating the HTML off of the post requests in a big PHP script was going to cause any back end problems in the future because I simply don't know.
>>
>>61322673
Remember to use prepared statements and avoid mysql_ functions, to avoid SQL injection.

Read about applying a csrf token to your forms.
>>
>>61322678

You never see learning paths that start back end with a focus on being a full stack, any recommends?
>>
File: 1475065477303.png (335KB, 628x550px) Image search: [Google]
1475065477303.png
335KB, 628x550px
I've got a message on LinkedIn from a recruiter about a senior frontend role. I only have 2 years experience and have shaky foundations in a lot of places. What do?
>>
>>61320544
I'd stick with individual files. Best would be static. Built some toy things like a blog and such with cgi and shell scripts like that, it's actually quite clean and you spend less time serving your requests, since it's only static, easily cachaeble files.
>>
File: 1420099814802.jpg (13KB, 250x239px) Image search: [Google]
1420099814802.jpg
13KB, 250x239px
whats a good learning resource for jsp full stack? I want to transition from asp.net, but don't really know where to start since visual studio did a lot of the setup work.
>>
File: Untitled.png (87KB, 1366x768px) Image search: [Google]
Untitled.png
87KB, 1366x768px
>>61318695
I am in middle of JavaScript,is W3Schools good for beginner? I am in half way modules and strings and it feels quite boring,should I just past through those?
>>
>>61322678
My favorite are those people who after hearing I'm a wev developer say "Oh I made a website in college" like bitch no you didn't. Dragging a textbox in dreamweaver isn't web dev.
>>
hey /g/. So I've been teaching myself how to program by using resources such as FreeCodeCamp and Team Treehouse online for the past month, but wanted to know if I should work on my theory of computer science or mathematics as I don't have a strong background in either of them. I'm looking to become a front or back end web developer. Are there any resources or books you could recommend for me?
>>
>>61322730
Stop calling things "hipster" when your main method of web dev is using PHP for its intended purpose.

I've built huge website your way back when it was still acceptable and it was an absolute pain in the ass to update. Once I switched to PHP backend returning json to parse with jquery my websites have been EZPZ single-page apps ever since and I never have to refresh the page to put out new elements. I didn't tell you your method was bad to be a dick. I told you your method was bad because it is bad and I gave you a more modern alternative
>>
>>61323849
Take it, obviously.

Even if hey fire you, you still have senior dev on your resume.
>>
File: Untitled.jpg (3KB, 100x121px) Image search: [Google]
Untitled.jpg
3KB, 100x121px
>>61325526
<style type="text/css">
.tagcloud {
font-weight: bolder;
line-height: 1.4em;
}
.tagcloud li {
display: table;
white-space: nowrap;
padding: 0;
margin: 0;
}
.tagcloud li a {
padding: 0 0.2em 0 0.2em;
text-decoration: none;
}
</style>
<div style="width: 300px; text-align: left">
<ul class="tagcloud" style="background-color: #FFFFFF; padding: 20px;">
<li><a href="test1"
style="font-family: Arial; font-size: 11px; color: #000000;"
title="test1">test1</a></li>
<li><a href="test2"
style="font-family: Arial; font-size: 11px; color: #000000;"
title="test2">test2</a></li>
<li><a href="test3"
style="font-family: Arial; font-size: 11px; color: #000000;"
title="test3">test3</a></li>
<li><a href="test4"
style="font-family: Arial; font-size: 11px; color: #000000;"
title="test4">test4</a></li>
</ul>
</div>


How can I avoid it being displayed as a bulletpoint list rather than just a regular cloud of links next to each other?
>>
Doesnt all this AJAX stuff mean that you're fucked if a user decides to block JavaScript?
>>
>>61325868
ul.tagcloud {
list-style: none;
padding: 0; /* or whatever you want; just reset the default 40px on left */
}

will remove the dots

Why is each list item its own table? Did you mean to display ul as a table, and make each li a row or something?
>>
>>61325916
Yes.
>>
>>61325916
>Doesn't all this app shit mean that you're fucked if a user decides not to install your app?
Yeah, and?
>>
>>61326017
There's a difference between installing an app and visiting a website. Websites should be fully functional without js, shouldnt they?
>>
File: Untitled.jpg (3KB, 176x49px) Image search: [Google]
Untitled.jpg
3KB, 176x49px
>>61325994
This is how I wanted to make it look like, originally had display as inline and thought that was the issue.
>>
>>61325510
>Stop calling things "hipster" when your main method of web dev is using PHP for its intended purpose.
You must be confusing me with someone else. I haven't really touched php since like 2004 or so

>>61326039
ideally, but in some cases assuring that it does requires so much time and effort that it's not worth it
>>
>>61320544
Your word of the day is "TWIG".

>>61326039
>Websites should be fully functional without js, shouldnt they?
Okay, better analogy:
>Doesn't all this app shit mean that you're fucked if a user decides not to grant your app Internet access?
Not everything a browser can reach via http(s) is a website. For better or worse, the executable web has been a thing for 15-20 years now and I doubt people on either end of that http(s) link are going to give up the performance and bandwidth improvements realizable.
>>
File: oh shit, I'm sorry.jpg (90KB, 884x645px) Image search: [Google]
oh shit, I'm sorry.jpg
90KB, 884x645px
>>61326039
if retard tinfoilers want to block javascript they can get fucked and have no right to bitch about broken functionality
>>
Okay, any tips on what to do if slapping
 list-style: none;
everywhere does nothing and I still get a list with bullet points?
>>
>>61326356
Check list-style-image and display attributes.
Or open up your element inspector, look at the computed style, and counteract it as needed.
>>
>>61326356
Do you have nested lists?

Also note that it should be on the <ul>, not the <li>
>>
>>61322951
I don't understand, unless you mean general text editor. I use Brackets
>>
Can I prevent splitting words/links between lines in css?
>>
>>61327354
You want the
white-space
property.

nowrap makes it so that everything stays on one line.

pre makes it so that everything stays on one line unless you have line breaks or <br>s in the source.
>>
>>61327593
I need to have white space as pre-line because otherwise all the text turns into a single line that disappears at the edge of the screen.
>>
>>61327593
Speaking of CSS, is it OK for me to think its a finicky piece of shit that was invented by libfags to make the internet look "nice"
>>
>>61327662
no, but it would be ok for you to kindly keep /pol/ out of this thread
>>
>>61327637
So you do want things to wrap at some point? But just not within individual words or within links?

Default behavior is not to break individual words up. The properties that control individual words being broken between lines are "overflow-wrap" and "word-break".

As far as not breaking links, will just giving the <a> elements
white-space: pre;
work?

>>61327662
I guess it's a bit finicky at times. But I personally don't mind it, and having it as an option is a good thing, rather than having to use table layouts for everything.
>>
File: Screenshot_1499816086.png (106KB, 1080x1920px) Image search: [Google]
Screenshot_1499816086.png
106KB, 1080x1920px
>>61318695

Something I am working on... Thoughts?
>>
>>61327662
It is a finicky piece of shit. But it's gotten a little better lately with flexible layout, new display: values like inline-block, and some of the alignment options.
>>
Are asp.net and java-ee still the top techno for acceptable ($500+/month) webdev jobs today?
>>
>>61328280
>still the top techno for acceptable

what are you trying to say here, pajeet... java/asp net were recognized as shit a decade+ ago.
>>
>>61328280
Oh kek. PHP webshits are making $30k/yr these days in most places. If you're a serious backend engineer you can probably do better than that.
>>
File: IMG_20170423_202243.jpg (85KB, 702x702px) Image search: [Google]
IMG_20170423_202243.jpg
85KB, 702x702px
>>61322678
I was thinking about picking up a subscription to pluralsight, I was going to aim for C# as my first language and JS as well.

Is C# a good choice? Marketwise as well a powerful language? I'm wanting to secure my future so I want a language that would transfer to another industry just in case the web dev bubble bursts.

I'm not him btw.
>>
>>61328280
yes

>>61328320
>java/asp net were recognized as shit a decade+ ago
by who? certainly not by medium-/large-sized companies which are still betting on them hard. and it's still where the jobs are (if you exclude the pajeet-tier low paying php&co. ones)
>>
>>61325916
That user can fuck himself and his tinfoil hat ass isn't in my target market anyways.
>>
>>61326039
Nope.

Every major browser supports JS so if someone disables it then they are knowingly making half the web unuseable.
>>
>>61319730
And you should all be banned.
>>
>>61321594
By not being a pussy. You "deal" with things by being just a tiny bit mentally resilient, and not a shivering bitch.
>>
>>61327662
It was great in the 90s. It's way way outdated for the dhit we do nowadays. To get things where you want them, on mobile and desktop, it's a chaotic circus of translates, media queries, and display types. Of course you could always use bootstrap and limit your creative freedom because any custom alignment and positioning breaks the piece of shit.

It needs a rewrite that scraps display types and has a proper vertical align.
>>
>>61322395
so I just php json_encode the output, fetch it via ajax, and manipulate/display it from there? is it a recommended practice?

i'm more of a js person so i guess that would make it easy for me once the data has been "jsonified"
>>
>>61318817
>How do you structure folders in your php app?
Assuming your folder is named 'myProject':
$rmdir -r myproject
$mkdir myproject && cd myproject
$npm init
>>
>>61329163
Have you heard of CSS Rhythmic Sizing? It fixes at least part of your problem.

>>61329259
Bretty much. If you really do need something no-scriptable, you should probably use a template engine instead of embedded PHP. Bonus: you can often reuse the templates on the client side with a template engine there, should you need to.
>>
>>61324396
No, it's not good. It's vastly outdated, and a lot of its info is just plain wrong.
- They don't mention function expressions
- They don't mention ES6 at all
- They don't really explain asynchronous programming at all (except in the context of AJAX)
- Their order is completely fucking arbitrary.

Trust me, you're better off going somewhere else.
>>
>>61328280
Does anybody really make this little money in web?
>>
>>61328064
Actually not terrible, but your right aligned column on the bottom has no alignment with the corresponding left side. This indicates that you have no formal training in design, and your design will consequently fall apart as soon as you have enough elements for the layout to be realistically complex.
>>
>>61326039
In this day and age, no. Expecting your site to work perfectly without JS is idiotic with a modern browser.
>>
>>61325467
CS yes, but don't go to school, obviously. Mathematics, no.
>>
>>61327905
>>61327593
#pol{
white-space:all;
}
>>
>>61318800
>Promises
Yep, if you're still here, dude that asked that question. Basically, you're running into the issue of Asynchronous programming: With just two, simple requests (get resource A, get resource B), you can chain them. But with multiple requests, you basically need to structure it so that you get the 'response' once all requests are back. You can do this one of two ways:
1. Callback nesting and recursive function calling:
let foods = ['Apple','Banana','Cherry','Durian','Eggplant'],
results = [];
const getAFood = function(){
someAsyncRequest(foods.shift(),function(r){
results.push(r.data);
if(foods.length){
getAFood();
}else{
//do something with all the data
}
})
}


That's fine, but if you have a large number of items, that's gonna get pretty nasty. What's worse is that if ONE of the requests fails, you're likely gonna miss ALL of them.

2. The second option is Promises, which are like little tickets with three statuses: Pending, Resolved, and Rejected. Most promise libraries - Q, Bluebird, the ES6 promise library - basically offer a .all() function of some sort that, each time a promisified AJAX request comes back, checks to see how many promises are still pending, compares it to some total, and only returns the result once they're 'all' done.
>>
>>61329492
#pol {
white-space: nojap;
}
>>
>>61329881
#pol{
white-space:inherit;
align-self:right;
background:#fff;
filter:brightness(0%);
right:100%;
left:0;
}
>>
>>61329946
#fit {
min-height: 72in;
}
>>
>>61328533
not webdev specific, but if you learn to use one programming language well you can learn to use them all. The most important part is that you understand fundamental structures and algorithms and can learn to implement them in whatever language you choose.

c# looks pretty and has visual studio to help everything along. If you can use c# well, you pretty much already know how to use java since c# is basically java 2.0.
>>
>>61329946
vertical-align: top;
border: 100m solid none;
>>
>>61330093
Thanks for the response. It looks like everywhere I look though there are webdev jobs wanting C# and/or NET.

Do you know if it's any good for webdev?
>>
File: 1499355271091.png (111KB, 500x516px) Image search: [Google]
1499355271091.png
111KB, 500x516px
26 year old hikkineet here
i finished IT back in 2014 but already forgot web dev
any suggestion to make any shekels online? webdev not necessary, i just want to survive
>>
>>61330588
Camwhore
>>
>>61330292
c# is the back-end language that an asp.net server uses, so yeah it's a decent place to start with. Luckily, java is another language popular with the back-end. There are a lot of different languages used for back-end though, so use really varies by location and other variables. If your area uses mainly c#, then go ahead and learn that first. Just don't constrain yourself to the syntax of one language.
>>
What kind of website should I make that can showcase my HTML5 skills?
>>
>>61326068
Just make an ul and then float everything left(float: left;) boom done.
>>
>>61322395
Fuck off. Some people need to pull their heads out of their ass and understand that SPA is not the only way to go. Like there is reason serverside rendering is gaining popularity.
>>
Noob here. How is codeigniter?
>>
How does /wdg/ tests on a mac/safari?
>>
File: hibicci.jpg (167KB, 495x700px) Image search: [Google]
hibicci.jpg
167KB, 495x700px
>>61318695
I am trying to do a very simple CGI script in sh:

echo "$QUERY_STRING"
works when my method is GET, but how do I list my arguments for the POST method? According to Stackoverflow
echo "$POST_STRING"
should be it, but nothing shows up for that?

I'm using OpenBSD's built in server (with fastCGI) if that makes a difference.

tl;dr how do I get all the arguments from a POST method
>>
Who else using the MAN stack? (Mongo,Angular,Node without Express)
>>
how do i make webpage in C#????
>>
If I see one more person using promises like fucking callbacks I'm gonna start stabbing people
>>
>>61335355
can you show an example of what you mean?
>>
>>61335405
doSomething().then(x => {
doSomethingElse(x).then(y => {
doAnotherThing(y).then(z => {
justKillMePlease(z);
});
});
});
>>
>>61335465
Are you talking about not writing it like this?
doSomething().then(doSomethingElse).then(doAnotherThing).then(justKillMePlease)

Because promises replace callbacks going forward
>>
>>61335545
Yes, was looking at some code that had 5 (five) levels of indentation because the person wrote it couldn't into promises and insisted in nesting everything
>>
File: image.jpg (62KB, 654x525px) Image search: [Google]
image.jpg
62KB, 654x525px
>>61318695
>https://www.youtube.com/watch?v=sBzRwzY7G-k
>https://github.com/kamranahmedse/developer-roadmap
i've got a good working understanding of html, css, js and quite a bit of experience with python.
i want to get my feet wet making something like youarelistening.to, where it pulls content from different APIs and combines them on one page.
started by reading about python frameworks, and then got bogged down by the length of these roadmaps. do i even need back end for something like that? where to start?
>>
what contact-form/email service do you recommend?
>>
>>61335545
Promise is a retarded solution, how about making the code synchronous unless told otherwise?
>>
File: 1492561748190.jpg (91KB, 700x466px) Image search: [Google]
1492561748190.jpg
91KB, 700x466px
How big is the difference between jQuery 3.2 and 1.3?
I want to study jQuery with Oreilly Cookbook, which is published in 2009.
>>
>>61336169
just like write "await" before the function call
>>
>>61336315
but the code is still by default asynchronous, I mean why not implementing Node to execute js normaly like Python or any other interpreted language
>>
>>61336355
Because you can dispatch more clients if the thread is not busy waiting for a function to yield.
>>
>>61336355
it's executed synchronously when you use await. I don't see how the code "is asynchronous". it's just wrapped in a Promise object which signifies that you CAN run it asynchronously if you so desire
>>
>>61333774
I've used just Angular and Node for one project I did a while back. I think I had started with TotalJS too before I realized it wasn't buying me anything, and Node is actually pretty good on its own.

I probably could/should have used Mongo, but it was easier to just keep things in memory.

>>61335644
At a glance, that looks like mostly frontend. Accessing other people's APIs is something you do in JavaScript, in the user's browser.

Although it might be loading a new page anytime you click something, so I guess some stuff could be getting done on the server, e.g. HTML with new soundcloud embed, new broadcastify embed, etc. So if you wanted to do that stuff with Python on the backend, you could. But I think this site would be possible with just a static server and JavaScript.

Anyway, the APIs do a lot of the work themselves, pretty much just putting an iframe in your site. You generally just have to tie your other site features into those ones, like how that site has a play/pause button.
>>
how to get over my dislike of using third-party code/dependencies in a (not that big) project even when it would be useful?

i'm thinking of vue.js (or something like it, haven't tried any alternatives)
>>
so after the newest VSCode update, it automatically indents my fucking brackets over when i dont want it to . Fucking gay. How do i stop this? For exmaple when i make a for loop and press enter to type the brackets, it indents the brackets. Fucking STUPID. I want them to line up with the beginning of the word "for" like before.

Fuck this gay shit
>>
>>61338171
"editor.autoIndent" = false
?

https://code.visualstudio.com/updates/v1_14#_auto-indent-on-type-move-lines-and-paste
looks like it should be false by default so maybe it's a bug
>>
>>61338414

its already set to false
>>
File: FUCKVisual Studio Code.jpg (12KB, 810x137px) Image search: [Google]
FUCKVisual Studio Code.jpg
12KB, 810x137px
seriously fuck you VSCode for doing this shit
im 2 seconds away from going back to notepad++

fucking mother fuckers
>>
>>61338463
yeah then it might be a bug. I can't investigate it myself because I don't update for the first couple of days after a new release precisely for that reason. if it is a bug then it will be fixed soon.
so my advice is don't immediately update software that's doing scheduled releases

>>61338638
yep, it's been reported already https://github.com/Microsoft/vscode/issues/30497
>>
>>61338657

FUCK

GET THIS SHIT FIXED

NOWWWWWWWWWWW

FUCKKKKKKKKKKKKKKKKKKKKKKKKKKKKK MOTHER FUCKER GODADMNDIT FUCK THIS GAY SHIT FCKING NIGGES
>>
File: 1479941619600.png (1MB, 1334x750px) Image search: [Google]
1479941619600.png
1MB, 1334x750px
>>61338638
unless you are doing C#
>vscode
>>
>>61338638
>>61338684

Calm down you asspie.
>>
how do I stop being constantly OVERWHELMED

there is sooooo much stuff to learn
>>
>>61338884
you will never know everything so why even live? i think you should kill yourself
>>
>>61338638
Well, yesterday updated vscode, hung during the update, canceled the update, vscode no longer started, had to download the full instaler and reinstall.

Just now installed an atom extension, no longer starts (same electron error vscode gave), tired of shitty electron editors I go to uninstall, throws the same error when uninstalling, must also use electron for the uninstaller.

I'm fucking tired of non binary and queers touching javascript tools and libraries. I'm back to emacs, and also probably will get the fuck away from web development. JS evangelists are delusional: https://twitter.com/_ericelliott/status/668517541862477824
>>
>>61338911
>Well, yesterday updated vscode, hung during the update, canceled the update, vscode no longer started, had to download the full instaler and reinstall.
works on my machine. try using a package manager for managing your software. it's truly wonderful
>>
>>61338950
electron editors have integrated package managers, you never used one don't you shitposter?
>>
>>61339017
what does an internal package manager for managing extensions have to do with installing/uninstalling the program? I install and update vscode using pacman and nothing ever breaks
>>
Is this really a standard rate for senior Angular devs?
>>
>>61339109

that might be a lot in NL, though
>>
I guess this is probably the best place to ask, I am set on learning web dev, but I don't really want to waste my time learning the hello world's. I want to learn how to, while doing something that can be presentable as an end product.

I'm not exactly new to programming, Ive taken c#, built an Android app from scratch(fuck Android environment) and this and that over time.

I have no experience with full stack webdev though.

I guess what is a decently presentable site that I can make while learning?

Not a resume site because, of course, I don't really have all that much to present as far as a portfolio haha.
>>
>>61339243
youre on one
4chan clone, anon
>>
>>61339243
pastebin clone
>>
Rails, C#, or PHP/Laravel for a first language after getting the basics out of the way /wdg/?
>>
>>61339243
Todo list using Flux/Redux/Vuex/whatever
I hear it's all the rage these days
>>
>>61339292
java or elixir
>>
>>61339316
no that's passe. medium clones and hn readers are where it's at today
>>
When do you know that you have to use backend for a project? Aside from things that are user bases It's not that obvious to me....
>>
>>61339650

when youre working with data you want to store, usually
>>
If I use a JS library for work how do I do it legally? The one in question is D3.js

https://github.com/d3/d3/blob/master/LICENSE

Can someone translate this shit for me? I had to make some chat generation for a company, I did not modify the D3.js file, am I in the clear?

I'm new to these legal licenses and shit
>>
have a technical interview with a coding bootcamp in an hour. Anyone with experience about this? what kind of questions do they ask/how difficult?
>>
>>61340201
fizzbuzz
>>
>>61340220
Yea I know a lot of people like asking that question but they actually had me do a different one.

finding the largest sum of numbers out of a few different credit cards. I imagine they're going to have me modify that etc
>>
>>61340125
Yes, you just need to include the original copyright and license files
You are not required to disclose your own source code like in the case of strong copyleft licenses like GPLv3 and AGPL (but it's javascript, so everyone kind of has access to it anyway)
>>
>>61340125
That's the BSD license, which is considered a "permissive license".

Basically, I think you just have to retain that license when you distribute the software, and I think credit them somewhere?

The main thing you want to watch out for is licenses like the GPL. The GPL (Gnu General Public License) says that if you use GPL software anywhere in your product, then you have to release your whole product as open-source under the GPL. So you probably don't want this for a commercial product, where you don't want others to see the source.

The LGPL (the L is for Lesser) basically says that you can include the software as a library. You can use this one in commercial products, but I would do some research to make sure you configure everything correctly.

The AGPL (A for Affero) is basically more restrictive than the normal GPL. It adds that if you include AGPL software on your webserver, you have to open source it. I think that's how it works anyway. I would avoid any AGPL licensed stuff at all costs.
>>
File: whichangular.png (6KB, 236x324px) Image search: [Google]
whichangular.png
6KB, 236x324px
what type of angular is used by tech companies? there are 74 jobs in my area that need angular (pic related), and almost none of them specify what version of angular they want.
it is pretty obvious the requirements are being written by HR so they are most likely to call angular 2 just "angular".

i can already program a fully functioning message board forum (with html+css+javascript+nodejs/php), but i never used angular. i don't mind working fullstack or frontend only i just need a job.
>>
>>61340478
Technically Angular version 2 or 4 and whatever they come out with in the future is just called "Angular", whereas Angular version 1 is called "AngularJS".

But even if they say one or the other, that doesn't necessarily mean they know what version they're using.

But working knowledge of html+css+javascript+node+php is pretty good, I'd say you're pretty well equipped to apply. If you want, do a quick angular tutorial and maybe put that on your resume, just so the HR people can match up their requirements to your qualifications. Once you actually have an interview, you can say that you're weaker on the Angular side of things, but you're a faster learner, and willing to learn on the job, etc. You're more likely to be judged holistically by a developer, so there's no reason to disqualify yourself at the HR resume screen stage because you don't know one simple thing.
>>
in my .js file i have a function that returns a boolean. How can i use that value on my index page? it says "not defined" when i try to useit in a condition statement
>>
>>61332776
This. SPA and Jscript "libraries" are cancer.
>>
>>61341269

pls respond
>>
>>61341510
no. the fact that a tool is not always the best one to use doesn't mean it's cancer
>>
>>61341269
Ok, so that function returns a boolean. Where are you calling that function from? Are you storing it in a variable? Is the variable in a scope that's shared with the place you're calling it from?

What do you mean by "index page"? An HTML page that loads that script and has inline scripts? Or an "index.js" file?
>>
>>61341763
Which would apply if devs didn't always jump straight to incuding 40 trendy new js libraries every single time.
>>
Is it possible to check if $_GET exists like if(isset)
but i want to check if it exist and what is its name
like if im on index.php?test
i want to $_GET what is after ?
>>
>>61342379
echo $_SERVER['QUERY_STRING'];
>>
File: eaZrosc.png (363KB, 5000x5000px) Image search: [Google]
eaZrosc.png
363KB, 5000x5000px
Ok, so listen to this...

I like web development as a hobby and find all the neat things you can do with it really interesting.
More so the technical/functionality parts of it and only moderately the design aspect, though I very much enjoy a minimal clean UI.

If I actually try and make this my job, I am afraid, that my main activity is to correct 1px margins in someones wordpress template and the like, which ultimately would suck all the joy out of the activity.
Sure there is backend work, but I even there I feel, that I will end up implementing the same database or authentication feature for the millionth time.
Basically, that it becomes a room where neither creativity nor innovation and the ability to come up with clever solutions to problems is desired. Exactly the things I enjoy about it currently, while it's a "hobby".

I might look at this a bit too pessimistic of course.
It would be nice if anyone could share their experience, regarding initial expectations and reality of the job and how you handle it.
(there is at least someone here who earns money with this, right?)

Thanks for reading
>>
>>61342477
work is never fun you fucking faggot, have you even had a job in your life
>>
>>61342530
this, even the most fun work becomes boring after a time.. specially if it starts to become repetative.

I'm fucking having to read Bhagavad Gita and do meditations to make myself do the work (which I enjoyed doing some time ago)
>>
>>61342530
>>61342621
What is it about 4chan that attracts the most toxic and pessimistic people

You guys could have stated your points better without crying out in woe and agony over your personal misfortunes
>>
>>61342477

Worked for a startup where I had the responsibility of doing both back and frontend work. It's quite different from personal projects where you have complete freedom to do what you want. I had people making demands consistently, and everything had to be done to their specifications even when it wasn't the most efficient or aesthetic way of doing things.
I lost so much love for development during that period. I reported directly to a 'consultant' who would come in once a week with 2 or 3 hours left in the workday and recommend shitty adjustments that made things a little bit worse than it could have been. That was my first full-time job in dev though, I'm sure others will have much better experiences to share.

>>61342646
4chan (specifically /b/) is the butthole of the internet. Don't be surprised to encounter hostility on a regular basis.
>>
>>61342477
Same here. It gets more difficult as you get more skilled because you're always cleaning up some idiot's messes. I never ever get to make the decision to do it right. It's always "work within the framework" no matter how broken the framework is. And then they get uppity when you can't make a hammer work like a warp drive.
>>
Anyone want a dev job in north central texas?
>>
what's a good web dev language to learn for a beginner? I know that they are links in the OP but I want to get peoples opinions here. I've heard that I should start with go+js/nod+Elixir/Erlang .
>>
File: sizes.png (60KB, 1200x703px) Image search: [Google]
sizes.png
60KB, 1200x703px
For shits and giggles, I created a bunch of barebone Hello World projects using popular libraries/frameworks to see how heavy each of them really is
I was expecting Angular 2 (or 4, whatever) to take the lead, but jesus christ
>>
>>61342969
If I can work remotely, then fuck yes.
>>
>>61343138
holy cow
>>
>>61343001
JS is the latest rage. It actually makes practical sense. Learn JS, pick a frontend framework (angular, vue, react, etc) and get good at it, then learn node.js.
>>
>>61343257
>JS is the latest rage
>node.js
>latest rage

You missed the boat by about 4 years, skip
>>
>>61343257
is it though? how about go or Elixir/Erlang?
>>
>>61343316
By latest rage I mean widespread acceptance. More people are embracing it now than ever before.
>>
>go to angular.io to read docs
>unable to retrieve this page
>the same for other people
so this is the power of angular...woah
>>
>>61343341
>Elixir/Erlang

Not as popular from what I've seen, but they seem very useful.
>>
Is there anything bad about relying on Local Storage now to store data or are cookies now a thing of the past, at last?
>>
>>61343341
Elixir is by my favourite one of those three but Node is much more popular right now, and that means more entry-level job opportunities and more resources for beginners
>>
>>61343375
plenty of major apps are built on Elixir. first that comes to mind is Discord
>>
>>61343001
I've heard that Go is good for creating APIs, but not the best for actually serving pages. But I don't know a ton about it.

I've used Node some, and I like it. Most people use the Expressframework along with it. Having one language for your whole stack is nice, and Node is pretty good.

Elixir is a relatively new language that's based on Erlang, and runs in the Erlang VM. I think most people use the Phoenix framework with it.

I'd say as far as getting a job goes, learn C#/.NET or Java/Spring for bigger, enterprise type companies. For smaller companies and startups, probably go Ruby/Rails, Python/Django, or JS/Node(/Express). Also, PHP could probably apply to either, and there's a bunch of different options for frameworks.

For beginner learning, I personally think you should use Node, sans Express, to learn the basics of HTTP requests and responses. Alternatively, PHP lets you construct HTML responses for a given URL in a really simple way.
>>
>>61343555
Express is cancer desu, it nearly halves request handling ability
>>
>>61343555
>I've heard that Go is good for creating APIs, but not the best for actually serving pages. But I don't know a ton about it.
https://medium.com/code-zen/why-i-don-t-use-go-web-frameworks-1087e1facfa4
>>
>>61343202
That's not an option.
>>
>>61343672
i myself live there but dont wanna meet people IRL
>>
>>61343672

Why not?

Everything can be done through the internet.
>>
>>61343707
It's not my company. I'm trying to replace myself because I got another job. They don't do remote.

>>61343696
The place is super chill and there is no drama. Very friendly. I get it though.
>>
>>61343762
its not about the people, its just I prefer to not form social connections, if you can handle that I can work for you
>>
>>61343788

Why are you using 4chan then?
>>
>>61343555
I've already started building a site with php so I'm gonna finish that then look into those other languages. probably either JS/node or go/Elixir/Erlang
>>
>>61343762
Are you willing to sponsor me a work visa to come to the US? ;_;
>>
>>61343897
stay out, pajeet
>>
>>61343812
it allows me to maintain distance from people.
>>
>>61343907
Close, but no cigar. Actually from the Caribbean.
>>
connection.query('SELECT * FROM users', function (err, rows, fields) {
if (err) throw err


for(var i = 0; len = rows.length; i++ ){
console.log('Name: ' + rows[i].email);
}
})


This gives me property undefined 'email'. How do I output specific data from the table fields (name, email, address, etc)?
>>
>>61343788
I imagine that would be fine as long as you weren't an asshole to people. You would be replacing me by the way.
>>
>>61343788
>>61343925
man you have to work on improving you extraversion and taming your neuroticism a bit if you want your work life to not be miserable. it might be hard but it's a must unless you win a lottery either literally or figuratively
>>
>>61343965
>You would be replacing me

The fuck did you do bro?
>>
>>61343965
I am polite but I won't let em try to buddy buddy me or do normie shit like dumping emotional problems I won't stand for that, i'll reply politely
>>61343967
i am pretty content like this
>>
>>61343997
>i am pretty content like this
apparently you're not content because you have a job need to satisfy
>>
>>61344049
But I already have a succesful freelance gig, I'm just looking for something more stable now

It feels good to not need people to be happy, i wish others could have the same
>>
>>61343961
Is "email" on fields?
>>
tfw built websites when i was in highschool ~15 years ago. ftp uploads etc.

pushed into construction around 16 because lack of opportunity and bad decisions being young.

fast forward 15 years. legs and hips ache like fuck after work everyday.

dabble with node in the past time and hate it, find elixir and phoenix fall in love and learn it the past 2~ years

get laid off construction job, desperately seeking work,

tfw no-one hires elixir/phoenix developers in my area. all php
>>
>>61344217
It's one of the fields in the database. I don't know how to access it.
>>
>>61344249
sounds like you'll have to touch the poo if you want to get out of your construction job, you can look for elixir opportunities while earning with php node
>>
>>61318695
hey guys people called me and they need a front end dev. i need to know wordpress. where do i learn that?
>>
>>61344074
>It feels good to not need people to be happy
yes, that's pretty nice, but what's even better is both liking (or tolerating) working with people and at the same time being able to not rely on them for happiness

>>61343961
take a peek at what exactly "rows" contains in a debugger
>>
>>61344262
Check what is inside each row
console.log(JSON.stringify(rows[0])
>>
>>61344322
thats nowhere near as good as being free and independent from society though, hope one day you'll be able to accomplish that
>>
>>61344288
imagine going back to cpanel and php though

its like living in the stoneage
>>
>>61344405
we're all living in the stone age because normies are too scared of learning new things and project managers dont wanna admit to their ignorance so they'll keep using whats familiar
>>
>>61344355
>>61344322
Thanks, I got it to work like this
rows[i].email

My bad, should have tried this before even asking.
>>
File: 5.jpg (2MB, 2560x1600px) Image search: [Google]
5.jpg
2MB, 2560x1600px
hello /wdg/, anyone have a good resource for learning php? if possible if there are any tutorials that teach how to use it with wordpress that would be even better. thank you /wdg/.
>>
>>61344774
I mainly just used
https://learnxinyminutes.com/docs/php/
because I didn't want to deal with a whole tutorial.

But if you're not that experienced with programming, then I guess find a full tutorial. A few in the OP teach PHP.

I don't know of any that teach WordPress at the same time, though I'm sure some exist.
>>
Is pyramid any good?
>>
Who can help me here?
https://www.freecodecamp.org/challenges/diff-two-arrays

>inb4 brainlet

I know this shit is easy, but I haven't coded for a few months.

What I have so far:
function diffArray(arr1, arr2) {
var newArr = arr1.concat(arr2);
// Same, same; but different.
var filteredNums = newArr.filter(function(num) {
for(var i = 0; i < newArr.length; i++) {
if(num !== newArr[i]) {
return wtf do I return, and why?
}
}
});
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
>>
>>61346268
I believe you'll need another loop nested inside the for loop
>>
>>61346302
nevermind I barely read your code and wanted to reply before i go get food. I didn't see how you went about it
>>
>github in 2017
dont do this nerds
>>
>>61346328
Yeah, I was going to say. That was my first approach, though. Enjoy your food, Anon.
>>
File: swagtasticpepe.jpg (34KB, 607x341px) Image search: [Google]
swagtasticpepe.jpg
34KB, 607x341px
>>61318695
>Go on indeed
>A lot of people hiring react/angular/javascript devs
>Spend the last year learning the MERN stack (mySQL instead of mongo)
>Go on indeed again
>Nothing but Java or C# and .Net jobs

Wtf happened?
>>
what if a website like both netflix and twitch
streamers, internet personalities streaming shows/movies for viewers, interacting with them and commenting on things happening

i feel like it's a goldmine but it's definitely a really difficult shit to make
>>
>>61346481
Sounds fucking terrible.

Sorry. I can tell you're a n00bi3 based on what you just said. Just keep learning.
>>
>>61346386
Got fucking meme'd
>>
>>61346481
>503rd "guise ima make a FB clone!" of the week.
Just stop.
>>
>>61346268
The filter function adds a given value to the new array if the callback returns true. So you want to return a boolean.

But, your code isn't structured exactly right for that. You need to check for existence in both arrays. They seem to want you to use array.indexOf(num), since they provide a link to it. And indexOf would actually replace your for loop.

It would be more efficient to convert the arrays to sets, and use Set.has(num) instead of indexOf, but I don't think you're really supposed to care about efficiency in this problem.
>>
>>61346268

function diffArray(arr1, arr2) {
var newArr = [];
// Same, same; but different.
newArr = arr1.filter(function(x){
return arr2.indexOf(x)==-1;
});
console.log('before arr2',newArr);
newArr = newArr.concat(arr2.filter(function(y){
console.log(y,arr1,arr2,arr1.indexOf(y));
return arr1.indexOf(y)==-1;
}));
console.log(arr1,arr2,newArr);
return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);

Whenever possible, NEVER increase time complexity by adding more loops. In this case I first assign newArr to a filtered arr1 by looking for any item in arr1 that's NOT in arr2 (arr2.indexOf(itemInArr1)==-1, which means it's not found).
I then do the same for arr2.
If you're really creative, you could probably do this in 1 line.
>>
>>61346776
And get rid of the console.log()s. Sorry, that was just me making sure shit worked.
>>
>>61346776
>>61346806
function diffArray(arr1, arr2) {
return arr1.filter(function(x){return arr2.indexOf(x) == -1;}).concat(arr2.filter(function(y) {return arr1.indexOf(y) == -1;}))
}

Eh. function chaining is cool guise.
>>
>>61346776
pls
use arrow functions
tnx
>>
>>61346644
Thanks, man. I just got a blinking light bulb above my head after reading this! Much appreciated.

>>61346776
Sorry, but I can't look. Don't want to be mediocre forever. lel.
>>
>>61346852
freecodecamp threw an error when i used em. Otherwise, yeh, I would. (and you should).
>>
>>61346386
the good news is if you can log in to a SQL server youre a fucking data scientist in 2017.
>>
I want to practice making an application that uses a database. Anyone have any good experience with this area? I don't know what to make
>>
>>61346776
>Whenever possible, NEVER increase time complexity by adding more loops.

indexOf() is still a linear time operation though. Simulating it with an inner for loop wouldn't be that much less efficient.
>>
>>61346917
Fair enough. Basically, remember that arr.filter() returns only those items that 'pass' a test. So if you do Arr.filter((item)=>{return item.isNEET}), it'd presumably return only NEETs.
Second, keep in mind that arr.indexOf(item) looks or an item, and returns -1 if that item is not found (otherwise, if the item IS found, it returns the index of the item in the array).
Finally, keep in mind that filtering an array does NOT necessarily change the original array:
var myArr = [1,2,3,5,8,10,13,20];
console.log(myArr.filter((n)=>{
n%5==0//Is the number evenly divisible by 5?
}))//prints '[5,10,20]'
console.log(myArr);//prints '[1,2,3,5,8,10,13,20]', i.e., the full array.

In general, applying more nested loops is a bad idea, since for every outer loop that runs a times, and inner loop that runs b times, the stuff inside the inner loop must run a*b times. That number's quickly gonna add up.
>>
>>61346973
make a blog like everybody else. if not a blog, then something similar that can easily use CRUD. Blogs are boring as fuck, but it'll teach you quick, then you can get your own ideas and move on to something more interesting.
>>
>>61346930
>freecodecamp threw an error when i used em
that's disgusting. I bet they don't have vim keybindings in their embedded editor either

>>61346386
the java and .net ones were there since forever, and the react/angular ones are nothing but growing in numbers
you literally can't use a simple search engine properly which is not really surprising when you're a dumb frogposter

>>61346973
pastebin clone
>>
>>61346973
>>61347025
I made a dungeon RPG thing. You could probably pretty easily make a text-based adventure, if you feel like doing something goofy..
>>
>>61347032
>that's disgusting. I bet they don't have vim keybindings in their embedded editor either
Sickening, isn't it.
In all seriousness, it probably WOULD work without them (they were whining about missing semicolons), but I wanted to make sure the code ran without 'errors'.
>>
>>61346930
If I recall correctly, freecodecamp uses jslint.
Try adding this as the first line:
/* jslint esversion:6 */
>>
>>61344249
Can you move?
>>
>>61345216
thank you
>>
File: 2r2lveo.jpg (39KB, 758x530px) Image search: [Google]
2r2lveo.jpg
39KB, 758x530px
>>61329414
Thanks for the input.

I already switched to Derek Banas,I guess this guy gets it straight,in video of half n hour he covered what w3 did in fucking paragraphs and shieet.
>>
>java servlets and jsp
Why is this allowed to exist
>>
>>61349225
Nice (I'm >>61329414). I'll have to take a look at his tutorials
>>
File: 1454896050554.jpg (70KB, 500x500px) Image search: [Google]
1454896050554.jpg
70KB, 500x500px
>>61346776
>caring about Big-O complexity for client side code

I guarantee you aren't working with enough data for that to matter.

const and = (a, b) => x => a(x) && b(x);
const or = (a, b) => x => a(x) || b(x);

const includes = a => b => a.includes(b);
const not = a => b => !a(b);

const diff = (a, b) => {
const inBoth = and(includes(a), includes(b));
const inOne = or(includes(a), includes(b));
const unique = not(and(inBoth, inOne));

return [...a, ...b].filter(unique);
};

console.log(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]));
>>
So I would really like to learn Redis in the shortest amount of time possible. Why? There's a job add that asks for it and I seem to have every other requirement, so I'm just gonna put Redis on my CV as well, and by the time they call me(!!) I'll have sorta mastered it.

So, best resource to learn Redis? E-courses, youtube vids, books, hypnosis tapes, whatever.
>>
>>61346970
lol now a bit more seriously, how hard is it to go from beginner webdev to data scientist? What's the basic skills I should nail to make the jump? I got basic SQL/MySQL down, and I also took 2 advanced stats courses in grad school.
>>
>>61346973
Build an imageboard from scratch.
>>
>>61346930

M8 how long did it take to get to your level of ability? I'm a few months into JavaScript, at about the same place on FCC (been using different learning sources), just curious about how long it might take
>>
>>61330292
C# is a good language, but using MS stack for web-dev is hyper autistic IMO. The whole history of the Internet (and networking as whole) is closely intertwined with history of UNIX. I would use MS crap only if really have to, but in web-dev world there are so many alternatives. Use Java if you want a C# like language. Or better use JS6/Typescript with Node.js. Using the same language on front end and back end is nice.
>>
>>61336314
They have deprecated a lot of things in 1.8 and removed them in 1.9. So I think it's a bad idea.
>>
>>61346481
justin.tv was like that
>>
>>61347941
yeh, been wanting to get out the city desu
>>
>>61351865
How many hours of travel would it take to your city? Miles?
>>
>>61352812
I say in the city just now (Glasgow, UK), but its all php / .net. From searching Indeed I can see that mostly Elixir jobs are in London (6 Hours away by car) But I'm hoping to move back to Wales for the quiet life as I'm fed up of the city.
>>
>>61351792
>justin.tv
Man, talk about blast from the (not so distant) past.
>>
>>61351672
You're absolutely right, but don't use "autistic" as a universal synonym for "dumb". What's autistic, for example, is using C for webdev.
>>
Fuck freelancing. I have decided never to go into freelance work /wdg/. It sounds painful as fuck dealing with pajeets and achmeds working for $15 per hour. I'm gonna hop onto the startup ladder mates
>>
>>61343987
Got another job.
>>
>>61349903
The actual complexity of the code might not matter, but I think the intent is still to teach problem-solving, and it's good to learn to take efficiency into account at the same time.

>>61351672
>I would use MS crap only if really have to
>use JS6/Typescript

You do know that Microsoft created Typescript, right?
>>
>>61353706
>$15
I've seen then work for 3 an hour.


15 an hour is usually a westerner trying to build a portfolio for employment. That's what I charged back in the day.
>>
Last chance. I'm about to quit.

Anyone in North Central Texas that wants a web dev job? It's PHP but they hire anyone who knows what an array is.
>>
>>61354008
Seriously, ask them about remote work. I'm great with PHP, and I'll do it for $15 if I can work from home.
>>
>>>/soc/25452788
>>
>>61354093
oh fuck off to reddit
>>
>>61354093
>Let's see who the geeky-geek-geeks in hurrr rofl

Damn, I fucking cringed.
>>
>>61354093
Disgusting

>>61354041
They won't do that.
>>
>>61354301
>They won't do that.
Awww mayne.
>>
>>61354008
>they hire anyone who knows what an array is.

are standards really that low? Fuck, I'm spending my time here trying to learn how to balance all sorts of trees, and you tell me all I need is array bullshit?
>>
I just want to make a simple fourm but i also want security. Is PHP and Mysql secure? I am really new at back end stuff.
>>
File: sp.png (157KB, 498x497px) Image search: [Google]
sp.png
157KB, 498x497px
>We are the thing makers
>We make things

>Coded with in San Francisco
>>
>>61355057

that all depends if you the programmer know what youre doing. Also look up PDO
>>
>>61355489
what did the dumb frogposter mean by this?

>>61355057
>Is PHP and Mysql secure?
they can be if you make your code secure
>>
File: meeveryfuckingday.jpg (42KB, 780x780px) Image search: [Google]
meeveryfuckingday.jpg
42KB, 780x780px
>>61318695
>No luck with job apps
>Finally a job I applied for asks me to call
>"Before we switch you over to *hiring team*, I just have to ask a few questions. Do you have a bachelors degree?"
>"No, but I have an associates."
>"Oh sorry, you need a bachelors to qualify."

Welp, looks like I'm going to give into the scam that is more college education. Despite spending the LAST 2-3 FUCKING YEARS TEACHING MYSELF PROGRAMMING AND WEBDEV AND BUILDING A PORTFOLIO


>Also, gonna just switch from web to software if I'm forced to go back to school
>>
>>61356332
so... is your portfolio shit? because you don't need a qualification for a webdev role, I know fuck loads of decent devs without one
>>
Dude
>>
>>61356393
Eh, it's meh. Mainly API stuff I did with FCC. I'm definitely going to keep working on it but the area I live in is pretty scarce for webdev jobs so I might as well go into software dev as well to expand my options.
>>
>>61356502
so you're going for more of a junior back-end role? what do you mean by API stuff exactly?

do you have one small thing that's pretty polished that you can show off or is it all "here's an api I did the minimum amount of work to connect to" repeated loads?
>>
>>61356536
FCC has you use twitch, wikipedia, and a weather api's to build projects.
>>
>>61356592
what did you make?
>>
Bootstrap or Semantic UI for beginnner?
>>
>>61356769
Well, Bootstrap is the go-to one, that you can make a good impression with everywhere

I also like Bulma a lot
>>
File: 1499823892869.jpg (13KB, 250x236px) Image search: [Google]
1499823892869.jpg
13KB, 250x236px
I fell for the Webpack meme
>>
>>61356961
webpack is fine, dumb frogposter
>>
Is bem any good? What are some other ways to keep css simple?
>>
>>61357162
it's nice. I use bem and scss. if you're doing react there are some more complex solutions available like css modules and styled components, but every one of them has some stuff that irks me so I just use bem with a simple helper like https://www.npmjs.com/package/bem-cn-fast and wait for something more viable to emerge which it will eventually
>>
>>61356769
javascript/css
>>
>>61357162
just give objects names that make sense?
>>
>>61357162
just go tachyons.css

google it
>>
Well I quit.

>>61354609
Yeah, the answer to my dev question was "explode by space, array reverse, implode with space" to reverse a regular sentence.
>>
File: file.png (89KB, 1475x761px) Image search: [Google]
file.png
89KB, 1475x761px
>>61357517
>tachyons.css
isn't the point of css to seperate markup from visual styles?
>>
>>61356502
Im on to my second web dev job without a degree.

The code sample I sent is API shit. I send a sample of procedural PHP API that takes parsed Twitch chat messages containing game names. It uses Amazon Item Search API to find the most relevant result and returns an affiliate link.

It also stores it in a db and relates the user to that game and the streamer chat where they posted it, but that's it.

Keep trying. If I can do it with this than you can do it with that.
>>
>>61357921
just try it.

designing in the browser.

makes things 2000x quicker. I though the same but once you try it you won't go back.

all you have to do then is just open developer tools in chrome, then change the class so things look how you want then you have a better idea instead of changing style sheets going back saving rolling back etc...
>>
>>61357963
>>61357921
also I must recommend you get Pesticide chrome extension for highlighting elements on the page there is no other better way of doing front end
>>
>>61357963
>then change the class so things look how you want then you have a better idea instead of changing style sheets going back saving rolling back etc...
you can do that with css with autosave and autoreload
>>
>>61358365
by css I mean CSS no without external style library
>>
>>61357865
was that the only actual coding question you had to do? fuck, I gotta get out there and start throwing my CV around.
>>
>>61358385
ofcourse you can with gulp and whatever number of other builders.

but hang on whilst i build this selector and think about what I need to put in it.

vs

change classes already built for you
>>
>>61358455
yes, or you can always just use a premade theme and don't change any classes at all. or even pay someone to make the website for you
you can't compare this shit because which approach is better depends on what you're trying to do
>>
>>61358407
Yes, you do.

If you don't have a degree the don't even bother with recruiters. If the job posting says "we have a client" then move along.
>>
>>61328533

pluralsight is free through microsoft account senpai
>>
A simple somewhat stupid question.

I'm making a small React app that loads from a rather LARGE static JSON file.

What's the ideal way to implement this? Host the JSON file differently? Use some database?
>>
I feel like a retard here struggling with such an easy problem but I simply cannot see what the issue is.
Below is some ruby code that generates a fibonacci sequence in an array then iterates through that array to remove the odd numbers.
Everything works but for some reason there are still odd numbers in the array afterwards.
The issue seems to specifically be the sequence.delete(seq) line because if I were to do puts "#{seq}" there instead it iterates just fine.
I can't even discern a pattern to which ones aren't deleted.

sequence = [1,2]
entry = 0
counter = 1
while sequence.max < 4000000 do
entry = sequence[counter] + (sequence[counter-1])
sequence.push(entry)
counter += 1
end

sequence.pop
puts sequence

sequence.each{ |seq|
if seq.to_i.odd?
sequence.delete(seq)
end
}

puts sequence
>>
>>61358886
Isn't it free for just 3 months?
>>
>'developer advocate'
What does this mean exactly?
>>
>>61359267
how large is large? do you use all the data at once? is it too slow when you just load the whole file via XHR? is every single use of the app is going to require using the data from the file?

>>61359522
sequence.delete_if &:odd?


you need to be careful when modifying sequences while iterating on them. when you use 'delete' like you did then all the elements after the deleted one get shifted to the left so when the iterator proceeds to take the next element it actually skips one
>>
>>61359522
Never mind, got it now.
I used .delete_if instead of an actual statement.
>>
>>61359755
Ah I see now thanks, that explains the semi random odd numbers that snuck through.
Thread posts: 320
Thread images: 32


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