[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: 317
Thread images: 25

File: 1496845010511.png (731KB, 824x553px) Image search: [Google]
1496845010511.png
731KB, 824x553px
>Previous Thread
>>62286190

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


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

>Roadmap
https://github.com/kamranahmedse/developer-roadmap

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

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

>in-depth comparison of VPS hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
First for forced partisanship.
>>
>>62323316
>>co opted into dogmatic trash (see TDD).
>could you expand on that point?
Periodically you see kinds of cultural movements among people who program, groups of people who think doing some thing will make programming easier/faster/more rewarding. The most obvious example is programming languages, but it doesn't have to be that, development methodologies (agile, XP), test strategies (TDD, BDD), paradigms (structured, OOP, FP), whatever. People do these things and it works well for them so they go out and try and convince other people to do them to.

Sometimes, at some point in the evangelization process, non-technical arguments get created for why a thing is good, or technical arguments get reduced into something that's supposed to be understandable to non-technical audiences. Sometimes those second order arguments are really compelling, managers, recruiters, CEOs hear them and think "if my programmers do this, I'll save money/get promoted/get laid" and so the set out to make their subordinates do that thing.

Being non-technical they don't know how though, so they hire other people to their their people how to do this supposedly great thing. But they need to be sure they don't get ripped off so metrics need to be drawn up to figure out if programmers are actually doing whatever it is that's supposed to be great. There then becomes an intense focus on managing that metic and showing value to management. In this process of boomeranging an idea from a technical community to management and back into the community as an edict from the top often whatever was good in the original idea is totally lost.

TDD is a great example of this: even though the community from which TDD emerged strongly denies that code coverage is a meaningful metric it's what get policed in corporate TDD environments. The people generally responsible for making TDD happen just have a dogmatic idea of "high coverage = good code" without understanding why.
>>
File: b.jpg (69KB, 500x500px) Image search: [Google]
b.jpg
69KB, 500x500px
Official server of the /wdg/ community:

https://discord.gg/wdg

Join for good times.
>>
File: kill yourself.jpg (296KB, 1280x881px) Image search: [Google]
kill yourself.jpg
296KB, 1280x881px
>>62323773
>>
>>62323773
IRC or fuck off
>>
>>62323773
>bloated
>badly designed
>limited
sounds like majority of web dev
>>
>>62323809
>>62323830
the medium doesn't matter, it's the community.

Bring 1400 members and 340 daily online users and I switch to IRC.

The medium doesn't matter, the community does.
>>
>>62323773
>>62323809
irc.freenode.net #javascript
>>
File: Wooden-fence-post.jpg (722KB, 2125x2987px) Image search: [Google]
Wooden-fence-post.jpg
722KB, 2125x2987px
>>62323707
high quality post
>>
is it hard to get a job in webdev without a degree or certificates? I'm mostly interested in the backend part though I'm well aware I must know the basics of html/css/js. I want to start learning backend with ruby/rails (through odin project, maybe?) then, for real shit, I have in mind use python/flask/web2py to develop webapps and golang as server-side language, also I want to avoid node.js and php as much as possible but I know they're kinda prerequisites to every backend job.
>>
>>62326082
Yes it is. If you have a network, it's not as bad. If you have no network and are socially a disaster, well good luck.
>>
>>62326098
thx for replying. how do you explain people that does online courses like freecodecamp getting jobs then? is full stack webdev easier to find an entrylevel job? they build their network in fcc forums? I have no network but I'm not a social disaster. it's not my intention to oversimplify this but I thought all I had to do was to develop my CRUD webapp -- which takes a decent amount of knowledge --, throw it in my github account and start applying; I could get my skills tested in interviews
>>
>>62323269
I have been doing some WordPress stuff for web designers, but I want to learn Javascript

Is freecodecamp the best method to learn coding? Or is it just a meme?
>>
>>62326505
Read Javascript the good parts.

>new senior developer on team is asked to commit/merge his code and make a pull request
>he's been on the team for three weeks now
>his branch that I had to make for him is 163 commits behind
>after two hours of nothing we finally get a pull request, we look at it..
>its literally nothing, commented out lines of code rewritten the exact same. Comments rewritten, renamed a variable and went on a rant about TDD when we asked about it
>he doesn't know how to sync with the main branch
>we have to sync and merge for him
>errors everywhere with code not even remotely associated with what he was working on
>he didn't get how observables worked so his only line of code he committed in the past three weeks was a setInterval that waited for a value to arrive and tried every 250ms
>his other code completely broke our redux store because he did an ajax call, included j query to do it and froze the app until his call back arrived
>he's paid more than 120k a year
>>
>>62326460
I'm currently a senior developer making stupid money for my age/location. No education.

Your portfolio is everything, you have to network and play LinkedIn much better till you get your first job then you're fine.

Node.js is a startup language currently, most larger companies use Java or C#. Some more flexible companies may have python or like go, rust etc.

Know your version control, postman and jira.

Hardest part is finding your first gig, better you are at interviews & portfolio pieces easier it will be. Try freelance work if you need.
>>
>>62326505
FreeCodeCamp is great, and probably the best resource out there. The little algorithmic challenges are great for job interviews, and teaching you 'how to think' like a programmer, and hell, you can even integrate some of those challenges as projects.

So go for it, and also check out You Don't Know JavaScript, it's a free book series.
>>
>>62326793
Wow, wtf. How the hell did he get hired?
>>
>>62326934
What am i supposed to be doing on linkedin?
>>
>>62326934

LinkedIn is a forced meme.
Just have a decent github/bitbucket/whatever and you're fine.
>>
>>62327053
Impossible to find people with typescript & Ionic experience in Ontario so they take people with 15 years of experience of God knows what and fire them if they don't pick it up

>>62327065
All star profile, lots of HR buzzwords for what you do, easy to understand for stupid recruiters


>>62327074
LinkedIn gets you jobs
>>
>>62327065
Not that anon, but you have to make that shit sparkle. Add as many connects as you can. Add all of your skills. Add any languages you speak. Try getting as many endorsements as you can for said skills. Throw up any certificates you have(even from moocs). Throw up your projects/github account.

Etc.

You'll start getting spied on from companies, and a lot of them will reach out to you.

IMO, Indeed is better. You just create a resume, basically. I've had way more people reach out to me from Indeed than linkedin. I'm assuming it's because I don't have a professional, high quality picture on my account.
>>
>>62327106
>LinkedIn gets you jobs
It's great if you have a job history already, but going in cold I don't think it would be worth anything. I got my LinkedIn up before I graduated and it got zero attention until after I was hired at my first job a month or so later.
>>
>>62323773
>Official server
>/wdg/ community
begone and stay on your shit server
>>
>>62327074
Linkedin works, I get a lot of response when posting technical blog posts there
>>
Best way to start learning django?
>>
I'm trying to set myself up as a freelancer and market my services but am absolutely junk at writing marketing content. Does anybody have any good phrases to use to advertise 'website repair' - e.g. fixing a person's slow or cluttered Wordpress blog or a small business' slow website?
>>
>>62331375
Django has great docs: https://www.djangoproject.com/start/

Follow it through "writing your first Django app", after that you can use the refrence docs and SO to figure it out from there.

If you're looking for a book "two scoops of django" is popular in the community as being a more in depth coverage of the whole framework. But having read it after about a year of working with django and going off the ref docs, I found the stuff I learned is really pretty corner-case while the rest was simple enough to pick up in the context of working on a project.
>>
>>62331766
Thanks a lot my man
>>
File: man.gif (2MB, 350x233px) Image search: [Google]
man.gif
2MB, 350x233px
>git push -u origin master
and the grid just got a little more greener
>>
>>62326934
thx for replying, for all the information and for the motivation. I kinda knew portfolio and networking are everything, thx for confirming.

then the technologies I'll need to know are html/css/js (basics), jira, postman, git/svn/cvs, mysql or postgresql and mongoDB or cassandra, ruby/rails (I know jobs will ask for node.js and/or php knowledge but I'll use ruby/rails just to learn and after that I'll start studying node.js), is that it? I'm actually trying to create an ordered list to follow, something like github.com/P1xt/p1xt-guides/blob/master/job-ready.md but I guess it's smarter just to follow Odin Project and Udemy courses, what you think?
>>
I want to use express to host multiple apps made with create-react-app in my website.


Is this possible? What is the way to do this? Just host the .html files w/ sendFile?
>>
File: worry.jpg (10KB, 192x245px) Image search: [Google]
worry.jpg
10KB, 192x245px
Corporate masters put me on a project that will develop .NET Core single page application with MS Dynamics 365 as it's database. It will be cloud based and users will use it on their browsers.

HOW TO DO VIEWS IN THIS CRAP????
CRM > C# > SOME SHIT HERE > HTML+CSS

You see, I want to use React, Vue, Angular, jQuery or some other popular framework. Other developers will push for that shitty Razor thingy, SingulR and other MS bullshit. I NEED to do this in JS as I NEED to gather experience, as I NEED to be in the position to change jobs to a more paid one with popular js frameworks like React or others (well, jQuery is not "well paid")
>>
>>62332115
Just edit the readme everyday :^)
>>
>>62332816
Like examples in a portfolio or what exactly?
If so you can just put them in their own subfolders and let express serve all static resources.
Or are they apps with an actual backend you also need to host?

>>62333506
MS stack doesn't sound fun.
Not that the individual parts are bad, but rather, that you are locked in to the MS way.
All the best anon.
>>
File: O8huQzP.png (602KB, 963x720px) Image search: [Google]
O8huQzP.png
602KB, 963x720px
>>62332115
>>62334273
is it better to have fewer and larger commits or lots of tiny ones?

also merge or rebase?
>>
>>62334274
It's the former - no backend; they are not apps with backend.

As I host the index.html files I get a blank page. It reads the .html, but the React stuff doesn't run.
>>
>>62334339
are you also serving all the other parts? JS, CSS, images and so on?
What does the dev console say? If it stays blank there is sure to be an error.

Should work as long as your server is configured to serve static resources, whether its nginx or express.

Copied this from one of my shitty projects to serve as a helpful hint maybe
https://pastebin.com/raw/A6srMU9X
Replace "/build" path obviously
>>
>>62334446
sry, meant if the page stays blank or doesn't change there is an error.
Not the dev console being blank.
>>
>>62334446

You helped me with that link! The issue was the middle-ware setup (app.use). Thanks a lot
>>
what are the best freehosts you guys know of? hostinger.co.uk just dropped their's
>>
>>62336148
are there really any good free-tier shared hosts?

cheapest VPS are like 3$/month.
And that's only if you need more than static hosting, you could get from Netlify or Github/Gitlab pages.
>>
Guys, I need help >>62336486

I'll check OP, but apparently it doesn't have PHP and JS stuff.
>>
What are some better alternatives to Bootstrap?
>>
>>62336708
You are going to hate this: write your own media queries or even grid system. Not that hard.
However bootstrap is useful if you are working on a commercial project with team of developers as it saves time on bullshit (re-inventing the wheel to create responsive hamburger navbar) and has documentation.

Other than that there are things like Skeleton (next to useless IMHO)
>>
>>62336813
>even grid system
but flexbox really helps with this, right?
>>
>>62336708
not saying they are better, but you can check out Foundation for something equally full-featured, Bulma for some lighter CSS-only or other various "css micro frameworks".
Just google for some CSS awesome list.

>>62336613
JS
>>62313281
PHP
>>62319898
>>
>>62336852
What about IE?
>>
>>62336813
>>62336867
I was looking at Pure CSS which seems like a good lightweight option that I can build on top of.
>>
>>62336867
>JS
>>>62313281(Cross-thread)
>PHP
>>>62319898(Cross-thread)
Excellent. Thanks, my man.
>>
File: statcounter.jpg (101KB, 1228x726px) Image search: [Google]
statcounter.jpg
101KB, 1228x726px
>>62336879
forgot about it, ye
>>
>>62336852
Flexbox is ... not that special
However, take one afternoon and dabble with it, you might like it and find it useful
I seem to gravitate to media queries, just make a container, declare things inside it 100% width when on mobile and maybe display:block and say fuck it it's good enough, change things when over like 500-700px width of course
>>
File: 1503328412953.png (18KB, 280x280px) Image search: [Google]
1503328412953.png
18KB, 280x280px
>.pizza TLD exists
>.soy TLD exists
>.js and .json TLD doesn't
>>
>>62337339
>.exe doesn't exist
>>
File: bernerslee.png (72KB, 193x189px) Image search: [Google]
bernerslee.png
72KB, 193x189px
Make web 1.0 sites.
>>
File: First assignment.png (388KB, 2554x1412px) Image search: [Google]
First assignment.png
388KB, 2554x1412px
It took me like 20 minutes to get this right. Starting from the VERY beginning with webdev using a Udemy course. I know nothing about programming in the slightest. I showed an earlier version to a friend of mine, and he told me I need to work on indenting and styling it.

How does it look now?
>>
>>62337534
You've mastered the website. Everything you learn from now on is bloat.
>>
>>62336148
depends on what you want to do. do you just wan to host a couple pages or make a web application?
>>
>>62337534
webdev has nothing to do with programming until you get to javascript
>>
>>62337639
Oh I know HTML and CSS aren't programming. I brought that up because I assumed that with programming, you need to format your code to be legible, which I didn't know how to do.

Is formatting HTML like formatting code?

>>62337562
Excited to get started desu
>>
>>62337677
not that anon
>Is formatting HTML like formatting code?
with (JS) code the formatting is left up to you to a degree.
With HTML there is really only one logical way to display everything. Just set your editor to indent your html on each save and you are pretty much good on that part.
>>
>>62337534
Very nice! Happy to see someone new getting started with HTML. It all looks very good. Keep practicing and you'll progress easily and it will feel really good as well. General rule: stay away from both W3Schools and thenewboston. They are not good learning resources in many aspects.
>>
>>62337797
Cool cool, thank you. Is Sublime 3 good to learn on?

>>62337813
Thanks man! I'm really having fun here. I've struggled for a bit, but it was actually a really enjoyable struggle, if that makes sense.

>stay away from both W3Schools and thenewboston. They are not good learning resources in many aspects.
Are these specific website or resources? I'm using
https://www.udemy.com/the-web-developer-bootcamp/learn/v4/overview

So far it's been excellent
>>
>>62333506
Stop thinking you'll gain experience in JavaScript if you use a framework. Frameworks are for hacks, pajeets, and morons and they will corner you into obsoleteness.

Read actual JavaScript documentation. Read programming books that existed before the Node cancer boom. Then read about V8 and why it made JavaScript usable. By then you'll know more about Javascript than any Angular faggot. You'll understand that its success is heavily reliant on the support of tech boxes like Amazon and Google. You'll then understand that the Web is horrific monstrosity that has traveled far and away from home. You'll then get depressed. And hopefully, graduate from Web Development.
>>
>>62338017
>Then read about V8 and why it made JavaScript usable.
Any particular recommendations for that senpai?
>>
>>62337883
man, editor is pretty much up to you, as long as you choose something with nice syntax highlighting and possibly good extensions if you want any.
VSCode, Atom, Sublime
Up to you.

if you want to look up anything webdev related, in the majority of cases you will find the info you need on MDN.
Just type "mdn background-size" in google for example.
If you are able to read docs and generally know how to find answers on google you will learn at lightning speed. A surprising amount of people don't know how to do that.
>>
is it possible to do this in php
i have array with classes names
it get one random class from array and need to call function show
so final should be something like Class::show();
When i hard code in page like i showed above, it works, class is found and function too
when i try to do this $class::show(); (that $class is value from array)
i get error RandomedClassName not found
>>
>have a job interview this week
>its for a salesforce dev job
>required to build a trivial crud app to upload files using their visualforce code
>Spend 30 minutes finding the correct account creation page
>Spend several hours just trying to figure out how to create files on the platform
> Seems i have to keep the tab of the view page and the tab of the controller page open simultaneously because there is no way that I can see for organizing or maintaing a project on the web editor other than just opening a bunch of files in separate tabs.
> Copy paste some guys code in and it basically works

Im not really sure what they wanted me to do here. If they gave me a regular coding challenge, I'd be happy with that.

But they just made me spend so much time fucking with salesforce's shitty docs, shitty ui/ux, whatever, just to make a retarded shitty crud app.

Im tempted to just go in with this code I didnt even write and just talk about it, because I dont know how else someone is supposed to parse all this crap and domain specific knowledge over a weekend.

I feel like maybe they are just trying to test resourcefulness--there's no way they think this is a good way to measure someone's programming abilities, right?
>>
File: php.jpg (28KB, 728x395px) Image search: [Google]
php.jpg
28KB, 728x395px
What can YOU tell me about isset() vs. filter_has_var(), /wdg/???
>>
>>62338156
Thanks man! And yeah, I'm a fucking wizard with Google.

My job title is literally Market Researcher. All I do is Google shit, put it into Excel, put THAT into PowerPoint, and then present it to suits.

I'm fucking ready to dive in
>>
File: help.png (12KB, 731x445px) Image search: [Google]
help.png
12KB, 731x445px
can anyone help? i cant edit the html of the page to add an extra class name cuz its cms so i gotta use css to do this...

is there way to do this?
>>
>>62338926
Its not possible to do that with just css.
You can only do the reverse and select an element that is preceded by another element (either with + for directly, or ~)

https://www.w3schools.com/cssref/css_selectors.asp
>>
>>62338926
you can't select previous siblings unfortunately.
JS might be the easiest option here.
>>
>>62339075
damn so thats why i coulnt find an answer online. is there a way to add a class name to like an h2 element in wordpress then? i only see shit like visual editor and bein able to change the header and css but like no way to edit individual wordpress page html?
>>
>>62338017
Will I get paid more if I learn 2 or 3 frameworks? Or should I keep producing miles of spaguetti code that no one else can understand?
>>
>>62339127
nvm i found a solution. each worpress has a page id that i can use to target!
>>
File: kode_view.png (10KB, 792x456px) Image search: [Google]
kode_view.png
10KB, 792x456px
>>62339127
If you mean content you are posting from the post/page editor, you can change to the "Text" tab and litterally edit it in html.
>>
>>62339259
is .one always guaranteed to be the first element and is it always present?
>>
>>62339208
You'll get paid more if you continually work on learning. It's not about the number of buzzwords you throw on your resume, it's about not being a lazy shit who quits trying to be better once you limp your way into a salaried job.
>>
>>62339743
Learning something new every day is good, but are you suggesting there are Important-Documented-And-Popular-Web-related-Stuff I should not learn?
>>
>>62339872
You generally aren't hurt by learning a given web-thing but learning 5 new UI frameworks is less useful than learning two new languages, or another programming paradigm, or a new algorithm. More exposure is the point and react/angular/vue are conceptually overlapping.
>>
>>62339972
Frontend development is very fragmented, and that's one of the reasons I don't want to bother with Vue.js after learning React and Angular.
But these frameworks are well designed for their purpose, and they are backed by experts and a lot of research money.
A complex SPA without them will probably give me a PTSD variant, again.
>>
>>62338285
Post code.
>>
>>62323773
Dont join this server. Its full of want to be niggers.
>>
>>62338299
Usually when applying for tech job you are expected to have experience in that tech. Or at minimum be a quick learner.
>>
>>62339322
yes. its basically the header and i want to align it center.left.right depending on what kind of content is right below it.
>>
Recommend me a single page app routing package that isn't shit. I went with path.js because it was lightweight but calling path.run? (If I recall correctly) straight up does not work. Had to call html5 history api instead.
>>
>>62323773
this shit is full of cancer
>>
File: 1267.jpg (33KB, 640x594px) Image search: [Google]
1267.jpg
33KB, 640x594px
Do you guys use wordpress? where can I find a free facebook-like theme?
>>
Is Firebase a meme or what's the catch?
>>
Where should I be saving all my media files? In the server or database? I'm using Heroku + MongoDB Atlas.
>>
>>62341234
Don't store media files in database
https://devcenter.heroku.com/articles/s3
>>
I'm trying to implement babbys first rate limiter. I'm using node and my plan is to route every request through a function which creates a temporal redis key which autodeletes after n seconds, then do a count of the keys for the requesting IP and if the number of keys is greater than some threshold reject the connection, otherwise continue to the requested resource.

1. Is this a good idea?
2. Is this something that should be handled in nginx rather than node/redis?
3. Should I just let the CIA fuck my ass and hand it to cloudflare to handle?
>>
>>62341620
I'll answer my own question, I'm going to leave this to nginx.
https://www.nginx.com/blog/rate-limiting-nginx/
>>
File: carmack_uses_react.png (52KB, 782x251px) Image search: [Google]
carmack_uses_react.png
52KB, 782x251px
When would one prefer fuse-box to webpack?
>>
>>62341620
Well you figured it out in >>62341964 , a reverse proxy like nginx is a better layer to handle this at but the idea is reasonable.

>3. Should I just let the CIA fuck my ass and hand it to cloudflare to handle?
plz no

>>62342130
>When would one prefer fuse-box to webpack?
When one doesn't want to use webpack because it's a monolithic pile of shit. I've yet to be sold on monolithic "bundlers" over simpler task runner designs.
>>
>>62342499
>When one doesn't want to use webpack because it's a monolithic pile of shit. I've yet to be sold on monolithic "bundlers" over simpler task runner designs.
this
yarn > npm
fuse-box > webpack
although at most corporations your boss is going to be demanding magic black box shit on the regular so might as well use webpack
>>
>>62339972
>>62339743
>>62338017
You sound like you have no idea what you're talking about. Web dev is about learning new shit daily, including those frameworks you bash on, as mostly every company is going to be using them. Now, one should definitely be comfortable enough to create applications in vanillaJS, and yes they should have a deep knowledge of it. But honestly, using frameworks will also deepen that knowledge.
>>
>>62342614
Fuck off, wannabe developer.
>>
>>62342705
u mad retard
>>
>>62342716
Say that to me face you zit ridden fucker
>>
>>62342716
nig nog
>>
what does /wdg/ think of Ionic?
I want to delve deeper into it.
>>
>>62342568
Thanks for telling us what you think web development is "about". Really good, well supported argument you've got there. Totally changed the way I think.
>>
>>62342815
Haven't looked into it, but looks to me like electron at a glance if that helps.
>>
>>62342979
>>62342755
>>62342726
>>62342716
>>62342705
>>62342614
>>62342568
spend less time shitposting more time getting better :)
>>
>>62343030
I'm already at the top of my field, semi-retired in my 20s, why would I want to get better?
>>
>>62343055
So this is how you spend your time? How sad.
>>
>>62342815
built on angular so it basically does all the front-end for you. it also pretty much forces you into using material design
>>
>>62343213
Angular doesn't force you into using material design, why would Ionic do if it's built on angular?
>>
>>62343089
>So this is how you spend your time? How sad.
You're here too, aren't you?
>>
So I'm working on a webpage, and I need to execute a perl script through a web browser to actually build the HTML.
Problem is that I cannot get apache to execute it for the life of me.
I've made sure that perl-mod and cgi-mod are loaded, I've set "options +execcgi" and "addhandler cgi-handler .cgi .pl" for the sites directory in apache2.conf, and I set chmod 755 for the script.
Every time I try to launch it apache just serves the perl script as a regular file, and Firefox downloads it.

What do I need to do? I'm at a loss.
>>
>>62343354
>perl
go ask /dpt/
>>
>>62343437
They told me to fuck off to this thread.

Besides, I'm 99% certain that this is an apache configuration error.
>>
>>62343456
idk man, I've only ever used nginx
>>
>>62343529
I'm cool with using nginx, as long as I can get it working with MySQL, PHP, and Perl.

Got any guides?

Although I would like to get apache working since I've got a few other things running on it.
>>
>>62343354
Honest opinion, apache is a piece of shit, learn node+express.
>>
>>62343798
The website is already written. I'm trying to run the Wakaba imageboard.
I just need a web server to run it on.

I'm not going to rewrite Wakaba in node.js
>>
>>62343798
>Implying that node isn't shit

topkek
>>
>>62343834
https://www.youtube.com/watch?v=5OfwhGQONbg

https://github.com/lalcmellkmal/doushio
>>
>>62343879
An appeal to popularity but:

https://insights.stackoverflow.com/survey/2017#technology-most-loved-dreaded-and-wanted-loved2

>just under React

Your move
>>
Please help: I am trying to remove excess whitespace like so
string = sub('([\s]){3,}', r'\1', string)


And it works great if somebody enters the same type of space, but if somebody enters something like '\n\n\n[space]' then the new lines are removed all together. Any ideas?
>>
>>62343882
No.
>>
>>62344049
Keep struggling then anon :) maybe by next week you will have this figured out
>>
>>62344063
No help from you faggots.

All I want to know is how to execute a perl script on an apache server.
>>
>>62343989
In a real language
myString.replaceAll(" ", "")
>>
Any of you friends know how to get 2 individual bookmark toolbars on Firefox? Every "multibar" addon I see just extends the existing toolbar, not really multibar.
>>
what do you people use to combine your javascript files?
using typescript and everything was going great while I had one file but I tried splitting into multiple files and everything broke. Not sure what compiler flags to use or if I need browserfy or webpack or jspm or what.
>>
>>62343354
How and why do you know Perl?
>>
>>62344488

A large part of the memes about Javascript burnout relate to this question.

So the cycle went grunt, gulp, webpack, rollup in a fairly short period.

I'm currently still recommending webpack, but haven't done much with rollup.
>>
>>62344162

That's not actually equal. His script allow single and double spaces, but removes larger groups. Also you never even touched newlines, which is his issue.
>>
How do you make a website if you're an expert programmer but have no experience working with web?
>>
>>62345604
Then you learn about the parts that make up web development and apply your new knowledge.
As an "expert programmer" I would have expected more from you.

>>62345126
first time I ever heard that rollup is supposed to be the next step from webpack.
Where are you getting that impression from?
>>
>>62323269
>https://www.bento.io/
is this worth it ?
>>
What is the quick and dirty way to get a web dev job ready for next summer? A junior role or even an internship would be fine.

College has started back up again and I already have basic knowledge in HTML/CSS/Vanilla JS. Would backend be a better route since I already have some programming knowledge or should I stick with front end (even though I'm pretty bad at design)?

So what would be the quickest or easiest things to learn to provide me with a job. I only really plan on doing it until I graduate so I'm not too concerned about learning everything.
>>
>>62345871
A frontend developer shouldn't be touching design.
>>
Hey /wdg/
I've got a stupid question. keep in mind I don't know javascript at all.
I realized html checkbox doesn't let me choose a default value to send if it's unchecked and only sends a value if it's actually checked.
How can I achieve sending a default "unchecked" value to the server?

quick stackoverflow search led me to the conclusion that I have to use js to update a hidden field if the checkbox is unchecked during submit. but how do I do this? as in, how do I put a js code that updates the hidden value when the user clicks submit?
>>
Should I use GraphQL with Knex to connect to an existing MySQL server for a react/react native app, or should I add API REST routes to an existing Laravel server?
>>
>>62346017
can't you just check on the server to see if the checked value is present and if not, apply a default value server-side instead?
>>
>>62346108
No, the server is an embedded application with very restricted resources. the POST handler function is taking 1.5kb of code as it is and I very much want to not increase the code size for something stupid as this. I'll use radio buttons as a last resort if I have to.
bigger .html file is okay because the server doesn't need to hold it in the memory all the time.
>>
>>62346131
Don't even quite understand how a default value is supposed to make sense in a binary on/off checkbox.
What is the backend running on, that a few extra bytes are going to break the budget?
>>
>>62346227
It's simple. is the checkbox checked? send 1. is it unchecked? send 0. but fucking retarded html can't even do that.
The whole thing is running on a mcu, which is not primarily no supposed to be an html server. It's just there for user configuration, sort of like router config page. I am on my last few kbytes of space left and there are a few more error checking and exception handling things to implement, so every byte counts.

Anyway I found the answer so Implementing it now to see how it goes.
>>
Pardon the noob question, but is there a way to get a full trace of the JS calls being executed upon loading a page?
I want to load from a script a page that has an AES encoded payload in its static content, which is decrypted and parsed into HTML by a large amount of scripts. I can't wrap my head around them, but at least finding out the entry point would help.
(of course I can load everything with a headless browser just fine, but both me and my RAM would appreciate if we didn't use a cannon to swat this particular fly)
>>
Any reason I shouldn't learn and use typescript?
>>
>>62346608
Do what you want, I don't care.
>>
>>62343354

You've come the wrong place.

/dpt/ is 50% noobs that ask "hey guys, tell me da sekrit shortcut to get a job in 5 month!", while it's everything in the OP already.
The other 50% are jonior/beginner level programmers who think Node, React and Vue are the hottest shit ever, because it's all they every programmed in..
It's all one big circle jerk these days, with a lot of teenage angst ("oh noes, I will never land a job if do not use what everyone else uses! Please gib me da latest stats! How can I suck the industry's dick the best??").


Now for your question..

Do you have "ExecCGI" in your [blablabla].conf file?
Options Indexes FollowSymLinks MultiViews ExecCGI


Or look here:
http://httpd.apache.org/docs/2.4/howto/cgi.html
>>
>>62347448


>/dpt/ is 50% noobs..

Sorry, I mean /wdg/, of course.

/dpt/ is the C/C++ circlejerk club.
>>
>>62347448
Perhaps generalizing everything you don't like is what is getting you flame posts
>>
>>62347465
>Rust & programming sock waifus
>>62347448
>think Node, React and Vue are the hottest shit ever, because it's all they every programmed in..
literally me
I see the problem though, but it's hard to motivate myself to dive into the more established parts of development.
php, mysql, wordpress seem so boring from the outside.
>>
File: 1494653703292.jpg (55KB, 269x378px) Image search: [Google]
1494653703292.jpg
55KB, 269x378px
>>62347448
vue IS the hottest shit
>>
Trying something I've never done before and going to use an API to pull data from coinmarketcap and display it in a div. Should I use javascript for this or is jquery an alternative? Also is there anytbing special I'll need to do since it's an https url? I think I've got somewhat of a basic understanding of how it works. I'm half asleep but it pulls data from json right?
>>
>>62347523

Maybe, but only a little bit.

Please take your time and count the numbers of Node/Vue/React and "how do I sart with [..]?" posts in the last few threads..


>>62347560

There is nothing wrong with Node, Vue or React. They are mature technologies with success stories, some areas where they shine and some areas where they are not so good.

The problem is that they are only tools, and as the old saying goes: "if all you have is a hammer, every problem starts looking like a nail."

I get that if your company is a pure Node shop, you'll have a hard time to establish some thing different. But most web shops have different technologies, so maybe lead them to try something new.

But what really makes me angry are free lancers, that can literally choose from every beautiful stack in the world and decide to do what everyone does. Yes, do your two projects in something like node, so you have a nice soft landing, if you ever need to have it on your c.v., but why not trying something different afterwards?

If you tried Rails/Django, why not moving to higher ground and trying Elixir+Phoenix? If you did a Java Spring site, why not doing a Clojure microservice site afterwards? Why not doing a site in something like Perl + Elm for the lulz?

People are so security-focused today, that is really sad.
>>
>>62347698
Most of the time, the technologies are chosen by the employer, who might have enough experience in the field, or may not have any idea what is he doing. You can tell the difference after years of working with several clients.

Only startups and hobbists can choose their environment, and that's it.
>>
Can any front end guys with good jobs post any shit you've done or any projects you're working on? What frameworks and languages do you know?
>>
>>62347782
What are you trying to ask?
>>
>>62347560
Don't learn php and that shit, go learn closure, rust, and elm.
>>
Is it wise now to avoid setting cookies altogether?
>>
>>62347886
Clojure. I'm not sure how long would it take for somebody who is starting to master functional and system languages.
>>
>>62347961
Avoid, yes, refuse, no.
>>
>>62347996
Dunno if this is a question or a statement or what.
>>
>>62347886
>Don't learn php and that shit
Holy shit.

"Don't learn a fundamental language and that shit" - idiot
>>
>>62348053
Can you express your feelings after reading the sentence? The misplaced verb is annoying, yes, but I want to know if calling out a newbie makes you happy or sad.
>>
>>62348103
How is php "fundamental?"
>>
>>62348119
I honestly couldn't divine any sort of meaning in that post.
>>
>>62348172
Well it is not That Godly.
>>
>>62348158
...Surely your first language must not be English and you just aren't aware of what 'fundamental' means.

PHP is the base for a wide range of accessory frameworks such as Laravel, Symfony and others. It has been around for decades and has been used in messageboard systems, blog systems (Wordpress etc), content management systems and anything else which required communication from front-end to back-end.

It is a fundamental language. 'Fundamental' means that it is a base of something, the groundwork of something. Javascript is a fundamental language too, as is CSS. There are a million accessory libraries for these languages that come out once every week it seems.
>>
If I do a window.open() for a new tab and then attempt to use jQuery to write html elements and such to that tab, why does using document.write() overwrite all the data put there by the jQuery functions? Like can I not use both to write the same page?
>>
>>62347871
>what are you trying to ask?
>Can any front end guys with good jobs post any shit you've done or any projects you're working on? What frameworks and languages do you know?

seriously?
>>
>>62348239
By that definition all languages are fundamental in that they all have sprawling ecosystems of libraries, frameworks, and toolkits arrayed from the hub language. That's just how languages work. When discussing programming languages, the only useful reason to call a language fundamental is if it cemented fundamental paradigms. C was fundamental, lisp was fundamental, smalltalk was fundamental. php has market share, that doesn't make it fundamental in any useful way.

The only reason anybody should ever consider learning php is to improve hireability when applying to php shops. There's nothing else to gain. Learning closure, rust, or elm will make you a better engineer in many ways. Learning php will not.
>>
>>62348448
>Can any front end guys with good jobs post any shit you've done or any projects you're working on?
It sounds like you're asking people on 4chan to post what they work on at their job, and in doing so identify their employer. No, nobody's going to do that.

>What frameworks and languages do you know?
The frontend ones.
>>
>>62348467
In a modern context, PHP is a fundamental language to the modern-day frameworks which are based on PHP.
>>
>>62348496
In a modern context, haskell is a fundamental language to the modern-day frameworks which are based on haskell.
>>
Hey /wdg/, what are some neat tools to get a dead simple cms up and going? Like 10 simple pages, user needs the ability to edit them once in a while, that's all. I don't want to set up a whole wordpress
>>
>>62348489
this is why you have no friends
>>
>>62348448
"Dear random employer, I just want you to know what some guy who may or may not work for you made a post in a web development thread".

Just admit you're retarded.
>>
File: ss-2017-09-10-16-10-59.png (45KB, 784x593px) Image search: [Google]
ss-2017-09-10-16-10-59.png
45KB, 784x593px
>>62346336
I would just place a dozen of breakpoints in browser dev tools debugger and go from there

>>62346608
no

>>62347686
jquery is just a javascript library. you can use raw js XMLHttpRequest or jquery's $.ajax/$.getJSON (which are just convenience functions that use XMLHttpRequest) or javascript's Fetch API or other library like axios.
just pick one. they will all work fine
>Also is there anytbing special I'll need to do since it's an https url
I'm not entirely sure, but I think that making requests to https:// on a http:// page might cause browsers to complain about mixed content or whatever, but there are ways to make this work. just google that shit
https://www.google.com/search?q=https+on+http+ajax

>I'm half asleep but it pulls data from json right?
what do you mean? https://coinmarketcap.com/api/ returns json data if that's what you're asking

>>62348239
javascript and css are "fundamental" because they have monopoly in web browsers. php's "wide range of accessory frameworks" and "being around for decades" is nothing. for example, Java has more of those and has been around slightly longer

>>62348496
python, c#, ruby, java and another 50 other languages have their web frameworks too. what's your point?
>>
>>62348711
Yes I meant returns json data, thanks for the reply. I can't wait to get started tomorrow.
>>
Anyone has experience setting up clang-format on VS Code?
I installed it globaly with npm and added xaverh's extension in VS Code but it didn't work when I tried to format a js file.
Already check PATH, the location for clang is in there and VS Code isn't giving any errors on finding the file.
>>
>>62348859
isn't that for formatting C/C++ only?
>>
>>62348914
k just saw the extension on the marketplace, nevermind.
Any reason to use that and not the normal Beautify extension for JS?
>>
>>62348932
I'm trying to follow Google's style guide for JS and they recommended that.
>>
Explain to me simply how I can find work in 'agencies' /wdg/. I hear about agencies which hire web developers who work from home and would like to learn more. What are these companies, how do I find them and what does it take to get hired?
>>
>>62347686
>>62348711
>>62348801
here's an example: https://codepen.io/anon/pen/yomxrP
you can use Fetch API unless you need to support IE 11

>>62348932
>not Prettier
>>
>>62349003
The search term you're looking for is "digital agency." A digital agency isn't really more likely to hire work from home people than any other contemporary web company.
>>
Anyone here proficient in angularjs? If so, do you know if it's possible to have a main application/module that uses ngRoute, and sub-modules that use ui-router?

I would re-factor the code in the main application but that thing is massive, it would take forever to find all the links to pages and turn them into ui-sref links.
>>
>>62349073
>The search term you're looking for is "digital agency." A digital agency isn't really more likely to hire work from home people than any other contemporary web company.
Aww. I thought there was some sort of web dev farm where we work on different tasks and an agency handles all the client relationship shit.
>>
Is there a way using css only to filter image black-white only (no gray)?
>>
>>62347698
Opportunity cost of picking up something else if you don't need to is pretty high desu.

> Buld n apps using a particular stack
> decide to arbitrarily use a different stack for a project
> Spend 1000 years reading docs when you could just get better at the skills you already have, and learn a new tech on the side if you really want.

I'm not trying to strawman you so let me know if that's what it looks like.

I just think that if an older more familiar stack fits your needs then why do something different just for the sake of doing something different?

I'm learning React right now via a side project because I really wanted to learn it, but also because jQuery was 100% not meeting my needs in making or maintaining apps.

I would love to learn Django and/or Flask because I like python, or maybe even Spring because I have spent some time with it already, but if I were freelancing I wouldn't see the reason for doing that for a client project.
>>
>>62349421
https://codepen.io/anon/pen/yomRbq
>>
>>62337609
I just want someting that has some sort of PHP/JS support, so the latter.
>>
>>62323269
Hey /g/ not a regular browser but I'd love insight from regulars here.

If I have a teenager that seems to like the idea of coding what resources are there to get him on the right track? Are there some languages that are "better" than others? In terms of ROI on learning them and so forth.

Thanks for any insight.
>>
>>62349533
I`m retarded. Thanks.
>>
>>62349623
If he is genuinely interested in software or web development, then he will probably figure out what specific things he wants to look into.
Without prior coding knowledge, one of the paid courses from teamtreehouse or udemy (only if on sale) might be a good first step.
>languages that are "better" than others?
>ROI
Hope you didn't mean to ask for future career advice with your post.
Anyone can go for the tech that has the highest return and job opportunities, but that would be a pretty soul draining activity.
Can't talk for others but creativity and the fun of building things plays a big role for me for example.
>>
>>62349623
codecademy and freecodecamp are phenomenal in that regard
also getting them something like a raspberry pi to tinker around with will add a nice balance of hardware and software learning
don't bother paying for any online courses or bootcamps (actual accredited colleges/unis excluded), huge waste of money
go with the flow, not with strict language choice, and they'll have a much better time learning.
>>
Is there a way to apply a css filter only to the element content,not background? I can`t modify the html, so i cant add an additional parent element for background.
>>
TypeScript is shit and whoever created that abomination should be executed in public.
>>
>>62349849
yeah true, probably better to go with the free resources and fcc often comes recommended
>>
>>62350007
If you can't into typescript you should just quit now tbqh
>>
>>62349849
>>62349789
Alright so I'll mention code academy and freecodecamp.

The ROI comment is me not wanting to waste money on him learning a language that is about to be obsolete or is generally useless or too niche for value. (If they can become useless, I know nothing about the topic as you can see)

From skimming around I'm thinking of telling them to look at HTML and go from there. Yay? Nay?
>>
>>62349623
OP, I definitely second this guy:

>>62349849
Raspberry Pi and/or something like freecodecamp.

Someone will probably dislike this opinion but something like Javascript would be cool to use as a first language because it's the language of the web, so you can make stuff and look at it happening in your browser which you can't do as easily with other things.

python is a SUPER easy language to start learning and it is very English-like. I might recommend this above Javascript. However, finding ways for it to be engaging after you know the basics could be a little more difficult just because it isn't out of the box working in a web browser.

My university uses this for their intro class, I believe:

http://pythonturtle.org/

It's a graphics library for python that allows you to make simple animations.
>>
>>62349431
I agree. Having now got a job I'm pretty content with learning about system architecture rather than picking up new languages, though I wouldn't rule it out in the future if needed.
>>
>>62350030
really depends if you are talking about general software development or "web" development, but since you are here I guess its the latter.
HTML, CSS and JavaScript are the basics of all web development and won't be obsolete for the forseeable future.
Especially with webdev you ca learn everything for free online. There are so many resources, so money is not even part of the equation. You can learn everything and not spend a single $

overview for starters:
https://developer.mozilla.org/en-US/docs/Learn
>>
>>62350030
They won't become obsolete, even incredibly niche languages you probably haven't heard of are still being used.
All of the mainstream languages are heavily supported although depending on your region certain languages might be preferred. Learning a new language isn't a problem at all.
So basically, you don't have to worry about it being obsolete.
HTML CSS and JS are the holy trinity. Listed in order of how they should learn them. FCC/CC have great resources as I stated for this. After they're comfortable with those 3, CC and FCC have larger projects available in which they'll be learning more, for example Ruby, Java, Python, JS libraries, etc.
>>
>>62350121
Ive asked in a few places just trying to get a feel for the range of responses.

Thanks for the replies and answers. Really appreciated folks. Cheers.
>>
>some kids mom is posting here while their teenage kid is probably jerking to trannies on b
>>
Does anyone have any resources for Google Web Toolkit?

I have to reverse engineer a complicated beast.

I have a hang of basic usage of the JSNI but I would like to find more current info.

Struggling more with the UI than anything else.
>>
>>62350007
nah, it's pretty great unless you dislike modern javascript
>>
I am working on this project and I have to display a fuck ton of unix timestamps to the users proper timezones and format. This is taking about a second, but it feels like an eternity because it locks up the UI.

Is there some way to get multitasking done on ES5?
I thought using a promise library would let me multithread, but I misunderstood promises because it's still locking up the UI.
>>
>>62350396
https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
>>
>>62348279
document.write() overwrites everything, no matter how it got there

use something else if your want to append and not overwrite
>>
Im trying to teach myself webdev and Im just wondering, whats a good way to make use of my work lunches without my computer?

I typically spend an hour doing nothing but browsing social media and such; is there anything good to do with that time that isn't necessarily building a website? Is it worth learning front-end languages by heart during this time, or should I just read a general guide?
>>
>>62350232
its 2017
kids who grew up with 4chan have kids now and they're jerking to trannies on /soc/ together
>>
>>62350434
Noice looks promising
Has anyone used this before?
Is there any significant overhead or cross browser issues to worry about?
>>
>>62350506
>my work lunches without my computer?
using social media for productive reasons
listening to a podcast
reading
talking to someone you want to learn more from
variety of ways

I don't see a reason to do any heavy learning during this time, it's a break for a reason, so take it. The above mentioned tasks are 'secondary' tasks, you're still intaking information but you aren't as devoted to it as you should be while learning.
>>
>>62350557
A podcast would be fucking excellent; are there any really good ones for web development?

I might pick up a book as well

>tfw tablet kicked the bucket so now i cant read all the ebooks i have saved
>>
>>62349431

>Opportunity cost of picking up something else if you don't need to is pretty high desu.

But it will pay off in the long run. Not only will it make a better programmer by learning more philosophies about how to do things. It will also give you a different tool and maybe you'll need it someday. It also might enables your company to serve more customers needs (i.e. some legacy projects) and keep their programmers happy by letting them grow. It's also great for yourself, since it offers you more job opportunities because you can choose from a bigger pool of companies.

If you do the same stack for more than 5 years you should consider suicide, to clean the programmer's gene pool from your code monkey genes.
>>
>>62326793
Thanks. This makes me feel better that at least I'm not THAT bad.
>>
Would you use Bootstrap or some other CSS pre-made template shit for your portfolio site, /wdg/?
>>
>>62353537
Yes. No one wants to hire a retard who likes re-inventing the wheel.
>>
File: doing OHP In the squat rack.jpg (12KB, 467x359px) Image search: [Google]
doing OHP In the squat rack.jpg
12KB, 467x359px
>doing angular's Tour of Heroes shit tutorial

>in
angular-tour-of-heroes/src/app/hero-detail.component.ts 

>tells me
/fuck/shit/angular-tour-of-heroes/src/app/hero-detail.component.ts (17,17): Cannot find name 'Hero'.

export class HeroDetailComponent {
@Input() hero: Hero;
}


I already imported it
 import { Hero } from '.hero';


but literally in the directory there's my
hero.ts

export class Hero {
id: number;
name: string;
}
>>
>>62353566
>'.hero';
I think it should be ./hero

Use VS Code or any non shit editor with Intellisense
>>
>>62353556
Tbh I've already decided and am going to stick to the absolute basics as explained here: http://motherfuckingwebsite.com/
>>
>>62353691
http://bettermotherfuckingwebsite.com/
>>
>>62353597
Whoops, yeah it's already './hero';
>>
Why is Jquery .wrap() function breaking the CSS on the wrapped element?
>>
>>62353691
Obviously if you're just going to make a page that's just one simple text article, you shouldn't be slapping on a framework for that. Common sense babe, use it.
>>
>>62355196
Yeah obvs I won't use a framework for a simple site thanks for the tip mate
>>
>>62345126
cheers m8, got it working via webpack after some headbanging. I have a script to copy the html and css files which is fine, but I'm assuming there's a "better" way.

build.sh
webpack && cp src/index.html dist/index.html && cp src/sty
le.css dist/style.css

anyway, this works, thanks!
>>
>>62356725
you can specify the output path directly in the webpack config.
It takes some time to set everything up, but it's worth it imo.
>>
>>62356847
sry was somehow thinking about JS, but you are copying html and css.
You can do that as well with 'html-webpack-plugin' to copy over your html and automatically insert the bundled JS file.
For CSS you can use 'copy-webpack-plugin' to copy the file directly, but even better would be to require your styles somewhere in your JS as well, so they also get included in the final bundle.
>>
>>62356847
javascript output is specified but how do I specify the html and css path? here's my webpack config:
module.exports = {

entry: './src/js/app.ts',
output: {
filename: 'bundle.js',
path: __dirname + "/dist"
},

resolve: {
extensions: [".ts"]
},

module: {
rules: [
{ test: /\.tsx?$/, loader: "awesome-typescript-loader" },
]
},
}
>>
>>62356935
>>62356973
gotcha I'll take a look, thanks!
>>
>>62356935
https://webpack.js.org/plugins/html-webpack-plugin/
https://github.com/jantimon/html-webpack-plugin#configuration

then your config would look something like this, depending on your path

new HtmlWebpackPlugin({
template: 'src/index.html'
})


CSS you can require in your JavaScript as long as you set up a loader for that filetype in your config
https://webpack.js.org/guides/asset-management/#loading-css
>>
>>62356973
>>62357102
>>
Hi /wdg/,

How do I set up a personal website? I learned some basic html and css and have some templates together. What are some good options for hosting?
>>
>>62357828
Netlify, GitHub pages, surge.sh, Zeit.co
>>
>>62337534
>Using Sublime

I liek u
>>
>>62358215
>I relate to people based on which piece of software they're utilizing
>>
hi
>>
>>62337677
>Is formatting HTML like formatting code?
Yes and no. Firstly, your HTML *is* code. It may not be programming, but it's still code. So don't think it's not 'real'.

Secondly, JS, CSS, and HTML all basically ignore linebreaks and whitespace (to varying degrees). So 'formatting HTML' is similar to 'formatting JS' in that you're basically just doing it to make your code more human readable. Once you're ready for production, as far as CSS and JS, you'll usually run a process called a 'minifier', which makes a production copy of your code minus all the stuff that's useless to the browser (like linebreaks). Consider:
var myFunc=(inp)=>{
//for an array of applicants
//loop thru and remove all pajeets
return inp.map((f)=>{
return !f.isPajeet();
})
}


to

var myFunc=a=>{return a.map(b=>{return !b.isPajeet()})};
>>
>>62337883
I've actually not heard negative things about thenewboston, but I'll trust that other anon that it's bad. As far as w3schools, it's basically a tutorial website that due to some fancy Search Engine Optimization wrangling, has consistently stayed at the top of the search results for most beginning web dev related stuff. Unfortunately, they kinda suck at the whole teaching thing:
- They're scammy, offering a meaningless web dev 'certificate' for $95. Certificates in web dev mean NOTHING.
- Their tutorials often leave out, misrepresent, or otherwise are are just wrong about particular subjects.

I won't go into my usual diatribe here about them, but just... don't use em.
>>
>>62358299
const myFunc = inp => inp.map(f => !f.isPajeet());
>>
>>62349106
I don't do much with ngRoute - I've been mostly using ui-router - but I expect part of the issue might be having the thing try to load angular more than once depending on how you config your app.
Your other option might be to have a bunch of ngRoute .when()s for non ui-route components, an then one that just says "full (ui-route) template" for those that are?
>>
>>62358254
>he doesn't shun people based on their Sublime color settings
This fucking casual
>>
>>62358485
Yeh, my point was more tho that it removed whitespace/linebreaks. Yes, normally functions should be consts.
>>
>start getting into web dev 6 months ago
>find this thread
>learn web dev
>throw random application just because
>get call
>ace interview (they asked easy shit like what a closure is and what double/triple '=' is in js)
>get call this morning
>got job

Guys my salary just doubled because of you fuckers. I literally love every single one of you.

Just wanted to share that
>>
>>62358888
Also my first quads holy shit
>>
File: 1864bathingsuits.jpg (34KB, 282x330px) Image search: [Google]
1864bathingsuits.jpg
34KB, 282x330px
/wdg/ What do I do if I want to setup a small locally hosted QA website like StackOverflow? ie whats the best free/open source thing I can use?

>>62358888
Congrats anon!
>>
>>62358346
Do you have a recommended alternative to w3schools?

t. not a web dev
>>
>>62343055
where you work
>>
>>62358888
congrats anon what does your new company do?
>>
>>62327106

I am in Ontario looking for a new gig. I am not retarded. I have a degree and work for a start up. Hook me up?
>>
>tfw trying to reverse engineer how a site works and get this shit
>>
>>62359545
???
>>
>>62358888

Good job
Now suck my dick.
>>
>>62359608
literally thousands of ajax requests
>>
>>62359347
I work for a company that essentially created a platform for crowdsoucing research grants.

It's actually pretty interesting
>>
>>62359926
Eh, is it an SPA? Or something similar? If so, that's not really enormously surprising.
>>
Anything that isn't w3schools.
Just kidding.
As another anon said earlier, freecodecamp is good for learning. W3Schools is actually okay for stuff like "what's the difference between .splice() and .slice()", but that's about it.
>>
Odin Project + You Don't Know JS is a good way to learn full stack? I wanna learn back-end with Ruby/Rails then later I'll switch to Node.js.

Because my main interest is the back-end I plan to study databases and SQL heavily. Am I doing this right, /wdg/?
>>
>>62361014
it's shitty video streaming site; I'm essentially trying to expose their API

basically it's just ads or whatever making all those requests
>>
>>62361590

Post site, I'm bored and don't want to go to bed yet.
>>
I'm using the new HttpClient in Angular 4, trying to pass my array of things that my service gets into my component so I can use it in my view. Does anyone have any idea how to do it? The old Http module used promises so I could use .then(things => this.things = things) in my component, but this new Http uses observables.

// Thing service
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable()
export class ThingService {

things: any[];

constructor(private http: HttpClient) { }

getThings() {
return this.http.get<any[]>('/api/things', {observe: 'response'}).subscribe(response => {
this.things = response.body;
})
}


// Thing component
import { Component, OnInit } from '@angular/core';

import { ThingService } from './../../services/thing.service';

@Component({
selector: 'app-things',
templateUrl: './things.component.html',
styleUrls: ['./things.component.scss']
})
export class ThingsComponent implements OnInit {

things: any[];

constructor(private thingService: ThingService) { }

ngOnInit() {
this.getThings();
}

getThings() {
this.thingService.getThings();
}
}
>>
>>62361281
>study databases heavily
yes. but why start with ruby on rails when you want to do node eventually? why not start with node?
>>
>>62361630

Why not just use Axios or native fetch()?

Also:

>Memegular

shiggydiggy
>>
>>62361643
Because.
>>
>>62361630
Nevermind, solved it, I should subscribe in the component not in the service.
>>
>>62361597
The site I'm trying to reverse engineer is fmovies . is

Reversing the search was simple; the url is a straightforward template and I can scrape the HTML. Now I'm trying to figure out how to get the streams for a given episode/movie.

I think I found all of the url templates that I need, but I'm still figuring out how to get a few parameters in one of the urls.

ajax/episode/info?ts=<timeStamp>&_=<otherId>&id=<episodeId>&server=<serverNum>&update=0

I have the episodeId, and I think the serverNum, but I still need the "otherId" part.

Oh, also, if you do end up trying this yourself, they seem to be responding with a 503 error for certain endpoints if the referrer isn't fmovies.
>>
>>62361633
I read somewhere it teaches beginners like me good habits concerning the folder structure and "where to put stuff" correctly
>>
File: 1420099814802.jpg (13KB, 250x239px) Image search: [Google]
1420099814802.jpg
13KB, 250x239px
is there a difference between let and var in the context of javascript's garbage collection/memory management
>>
>>62361941
https://stackoverflow.com/questions/762011/whats-the-difference-between-using-let-and-var-to-declare-a-variable
>>
>>62359214
MDN
>>
>tfw you want to read through Eloquent Javascript and You Don't Know JS like a good lil web developer, but it's just impossible to read for long stretches from a web page without getting distracted
>>
Redpill me on what '=' means and what '==' and '===' mean in JS
>>
>>62362940
It's a lost cause if you can't figure that out in 10 seconds on google
>>
Help a JS noob out.
const currentYearEl = document.getElementById('current-year');
let currentYear = new Date().getFullYear();
currentYearEl.textContent = currentYear;

>I want to output the variable on the page as text twice
>it outputs the first time but not the second time even if I duplicate the last line
Cheers for any help /wdg/.
>>
How do you source testimonials for your webdev services if you are just getting started and have not had any clients yet?
>>
>>62361897

In think it's a good idea to learn RoR and Node. It was pretty much my game plan and worked out well for me..

I would always recommend learning one solid MVC framework like Rails, Django or Laravel before diving into the world of single page apps. Rails is especially useful, because it does so much for you. You don't even need JavaScript, because things like "simple form" exist. Just wrap some gems together, get the standard bootstrap/jquery-ui package and off you go. It also has a great tooling, i.e. Rspec and Capybara will teach you TDD, factory girl will teach you about mocking/stubbing.. a lot to learn here that will help you later in your developer life.

Also you learn Ruby - you really should learn some decent Ruby, not only for rails. it great for scripting and other stuff.

But one word of advice:
Rails makes you lazy. It's a great start, but you kinda live in a bubble. After you got the basics tutorials down, you should start to explore the different topics, for example start switching from your "just werks!" sqlite to postgresql and configure that shit (with password, users and so on).

Then it's a good time for a fresh start. Don't fall for the coffescript meme which Rails uses. It's nice but you don't need it since the newer ECMA versions are good enough. Just do a JS tutorial like "Eloquent JS". And then work yourself through the new syntax and elements, you understand the reason for something like Promises much better, if you tried to implement some funky callback mess yourself. Don't rush it here, take your time. Solid JS fundamentals are a huge asset. Also take the deep dive into SCSS and try to make a clone of your 3 favorite sites (no functionality, only design).

If you are good with JS, you can learn Node in no time. Add Vue (you can learn it in a weekend, basically) and the common JS libraries (just google and ask), and you're a highly qualified guy. Put some shit on Github and LinkedIn and recruiters will start sucking your dick.
>>
>>62363165
If you duplicate the last line you are overwriting the year do:

currentYearEl.textContent += " " + currentYear;


instead
>>
>>62363223
Thanks for help but I am using the current-year id twice in two separate places, to output 2017 in those separate places
>>
>>62363242
Id's are unique, there should only be on per page.
>>
>>62363268
Even just for text? It's just an empty span element, like <span id="current-year"></span> placed into the page twice
>>
>>62363277
Yes,

const currentYearEl = document.getElementById('current-year');


Ask yourself, which element is in currentYearEl? The first occurrence of the current-year or the second occurrence?
>>
>>62363318
Ah. Ahhhhhh.
>>
>>62323707

Good post!
MGMT surely loves their metrics...

To me TDD boils down to three simple things:


1) You have to writes tests at some point, because if you don't, it will bite you in the ass eventually. If you add some feature and break your whole system you want to find out immediately, not while running in production..
And let's be honest: nobody likes writing tests. It's much easier to have the discipline to write a test for every new feature before implementation. Otherwise you'll end up with: "Oh sure, I'll write this test. Tomorrow. Or the day after tomorrow. Or in three weeks, when everything is broken I have already forgotten how this shit works and what I wanted to test.."

2) TDD is the most logical approach to testing. If you write test before the implementation, you are forced to do solid requirement engineering. You might find out that you don't have enough information i.e. about some edge cases. It's a good idea to find out after 10 minutes of writing a test, and not after wasting 1 day implementing the wrong thing.

3) Separating the "what" from the "how". If you write tests after you implemented something, you are always biased. You will rather test your own functions and test if they work, but if you have logical flaws, you will make the same logical flaws in your test. If you write your test first and program against that tests, you have more orthogonality. No testing is ever truly perfect, but it's a way better approach.
>>
Has anyone looked in to BuckleScript/Reason?
>>
You have 10 seconds to name the best PHP framework -- GO
>>
>>62363758
Zend
>>
>>62363758
Laravel
>>
I don't really know web dev terms. I want to have a button that sends data back to the server when clicked without refreshing or anything. Is that Ajax?
>>
>>62363933
That is basic PHP my friend. Look up GET, POST and REQUEST superglobals in PHP and your form will be sending data in no time.
>>
>>62363933
yes, a basic ajax post or get request usually.
Axios or the new native browser fetch() are good options.
Though it also depends a bit whether it should take info from a form or if it's a standalone button with nothing else to it.
Don't know why the other anon talks about PHP without knowing anything about your backend.
>>
>>62364065
>GET, POST and REQUEST superglobals
Just reading this disgusts me.
>>
>>62364243
I'm trying to help the person :(
>>
I don't even know what kind of error is this, has anyone else had a similar problem using MEAN? I get this with the morgan logger when refreshing straight out of this route:

GET /something/idstring 200
GET /api/somethingidstring 200


The front end gets the ID just fine but the back end isn't putting that slash, going directly to api/something/idstring works fine as well.
>>
File: hjj.jpg (80KB, 673x466px) Image search: [Google]
hjj.jpg
80KB, 673x466px
>>62364453
Never mind solved it, it was a fucking typo. I still can't get rid of this error though, even though it prints the name
>>
>>62364629
Looks like it can't read the property "name" of undefined.
>>
CSS Boys how do i get my <i> and <p> to sit in the vertical center of my divs?

Thank you very much.
>>
Redux or MobX?
>>
>>62364809
A picture might help.
>>
>>62364809
display: flex;
align-items: center;
justify-content: center;
>>
>>62364809
>>62364818
div{
display: flex;
justify-content: center;
align-items: center;
}
>>
>>62364825
谢谢
>>
learn flexbox
http://flexboxfroggy.com/
>>
>>62364831
>>62364825

Thanks a lot.
>>
>>62364816
mobx
>>
>>62345887
In larger corporations yes, but many smaller shops often look for people that can fill designer+front end
>>
>>62363207
Wow, thank you for all the information and tips! I really appreciate the time you spent to write this post and I'll try to follow exactly what you said. Thank you!
>>
I want to do a project. I'm too stingy to spend the money it would cost to do it. What do I do?
>>
Is it standard PHP practice ALL THE TIME to leave out the closing ?> tag in .php files?
>>
i haven't done any webdev since i graduated. worked in c# until I got laid off and now I got a gig as a front end/back end developer
wat do
>>
>>62366146
yes. that's one of many php's dumb idiosyncrasies
>>
>>62366146
closing it at the end of the file is optional and i think it's better to leave it out if the file is all just php code
>>
>>62365688
what about it would cost money?
>>
>>62366738
domain and some cheap hosting
>>
>>62366763
Literally mere bennies unless you're a trendshitter wanting a .io name
>>
>>62366763
heh, the time you spend writing code is worth much more than those 5$ for a VPS. And even that is only required if you actually need a proper backend and not just static hosting.
You really are stingy anon.

>>62366775
>>62366775
Thread posts: 317
Thread images: 25


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