[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: 324
Thread images: 36

File: wdg_432968.jpg (161KB, 824x553px) Image search: [Google]
wdg_432968.jpg
161KB, 824x553px
Shorter OP Edition

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
The Mozilla Developer Network offers a good intro (no matter 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/

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

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

>Useful Youtube channels
https://www.youtube.com/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

>an in-depth comparison of VPS hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
First for MangoDB and its web scalability
>>
Just wanted to share (since you guys are my only friends), I have finally managed to write out an automatically updating clock in Javascript from memory without having to refer to any documentation. Very happy right now, great start to the day. :)
>>
>>61519250
good for you, this was feature was really popular in ~1997
>>
>>61519286
So was the web itself before the dot-com bubble burst and now we're riding a second resurgence. Javascript clocks are coming back baby
>>
I tried freeCodeCamp out of OP's and some other anon's suggestions and I dig it.

The HTML/CSS tutorials were a bit more simple than their codecademy counterparts but the project section is good, even if it's just "do this".

Building something from scracth made me realize how little I knew and also learned some new stuff.

I feel like I'm going slowly due to little free time but I'll keep working on this.

>>61519250
I hope to be there soon, but hey, I woke up at 12:00pm well rested, which is not something usual for me.
>>
I've spent my weekend thusfar learning the basics of websites and HTTP. I'm learning all the stuff I should have learned years ago and it's really empowering. Makes me want to make my own message board site to fully engrain everything in my head.

I wish I could quit my job and just spend my time getting good. I really lack motivation and energy after spending all day working. Time helps when trying to sink into something too.
>>
>>61520431
>I really lack motivation and energy after spending all day working
i know that feel
try joining projects with other likeminded autists, it could help
>>
What are some prerequisites to dive into vue/react/angular/etc? Just be good with JS?
>>
>>61520490
I'm not autist though, that's part of the problem. I struggle to focus on this stuff for long and need to take regular breaks to play vidya and shit.
>>
>>61520564
Angular makes use of TypeScript, but for React and Vue some general JS knowledge and the ability to read docs is what you need
>>
How do I create and sell a wordpress theme faam? I'm lost
>>
>>61520577
Lol I'm an autist and get distracted all the time too. It's not autistic to have laser focus on one thing, just that some autists do. Whole condition is a spectrum
>>
File: rough-idea-1.png (32KB, 1920x1080px) Image search: [Google]
rough-idea-1.png
32KB, 1920x1080px
Threw together this idea in Photoshop for my portfolio-projects page
What do you think of the general design?
(Didn't bother to really add a colour scheme or put too much effort into the draft)
>>
>>61521700
do you have that many finished projects to show off?
Even then it might be smart to reduce that number a bit and focus only on a bunch of them, that really highlight some of your skills.

What do you plan title and header to be in that example?
>>
>>61521792
Honestly, finished ones I don't - or at least that I would be willing to show off but I plan to finish the site and then use it also as a platform to blog my progress with certain technologies or concepts which will be taking up my time for the next 6mo/a year
The title I'm not sure on maybe like "Projects" but the Header will be in relation to like "Finished Projects" or "Ongoing projects" and MAYBE a scrapped projects section, although if I've scrapped it its probably really shitty and would reflect poorly
>>
I'm storing around 20k records in a sqlite db and it's taking more than 30 mins. There's no way it should take this long right? Is there some special procedure I should do when I'm storing this much data?

I'm using nodejs + sequelite + sqlite and this is what the code looks like:

for(let i = 0; i < messages.length; i++){
Message.create({
text: messages[i]
})
}
>>
>>61521879
do database operations in batch so you don't have to do 20k db transactions
>>
>>61519156
https://www.youtube.com/watch?v=b2F-DItXtZs
>>
>>61521792
>>61521851
to add to this:
I am asking because I made a portfolio page and reserved space for 8 or 9 projects, when in reality I didn't have a single thing to put on there yet.
I spent many hours of trying to make that section look nice, that I should have spent on building some content for it instead.

Now I am just using a short greeting text introducing myself, an "about me" section with some info and a list of my technical skills, followed by a contact form and links to github/email and so on.
That was just recently though, so as soon as I have something nice to show off, I plan on putting it up there, but most likely not more than 3 or so at a time.
>>
>>61521879
Maybe I should say that the 30k messages I'm storing is just a line of text each, nothing big.
>>
>>61521879
One, sqlite is slow as fuc, and two you should be generating a bulk insert statement like, <code>INSERT INTO messages (title, text) VALUES ('fuck','shit'), ('piss','hell');</code> But like 20k times.
>>
>>61521879
http://docs.sequelizejs.com/class/lib/model.js~Model.html#static-method-bulkCreate
>>
>>61521933
Yeah, I can see that being an issue.
I already have a fair few projects finished and ready to just be put up and others that will soon follow and considering this part of the site won't be going up for some time it's not that which I'm worried about, I'm just trying to get some feedback on the general layout so I can move on.
My site currently just has an about section and a contact section with some links to LinkedIn, Github etc.
>>
File: holyfuk.png (40KB, 1086x802px) Image search: [Google]
holyfuk.png
40KB, 1086x802px
Saw this when paying my power bill. Jesus christ
>>
File: 1491383629925.jpg (313KB, 612x716px) Image search: [Google]
1491383629925.jpg
313KB, 612x716px
Where does Front-End end and Back-End start?

I'm reading about Server-side frameworks and it's talking about templating, which I do as an FE dev in .phtml files..
>>
>>61522811
Generally front-end concerns the design of the website as well as functionality provided by the clientside JS.

Backend is the code that runs on the server, and may interface with the database, generate HTML, or other things. But I guess templating could be considered front-end work, as long as you're abstracted from the business logic of the back-end.
>>
>>61523403
So what I'm doing right now is actually part backend?

I'm even more confused now.
>>
who wants me to stream me muddling through reactjs / websocket development? i have both reactjs and websockets working already.
>>
>>61523691
Yeah, pretty much.

Back-end basically means server. And that phtml is getting processed on the server, so it's partly backend.

I'm not sure how your templating setup works, but to learn more about backend development, dive deeper into what you already do. Look into the implementations of any functions you call.
>>
>>61522811
the template is processed by the backend, so, by the time the page is sent to the user, all of your template variables, etc. have been expanded out by the server.
>>
>>61522811
the markup and styling is front-end. the logic for generating markup (i.e. loops inside the templates) can be though of as backend
the distinction is not that useful here desu
>>
>>61523730
no-one asked for it, but i'm gonna start streaming web dev at twitch/fmdud now, exclusively for /wdg/
>>
What framework do you guys think would be a better long-term option for my team, Vue.js or React.js? Or angular 2? Our backend is .NET.
Any advice?
>>
>>61525231
the one the most of your team likes more
>>
Whats the simplest way to display a sent text-form 1:1 with the line breaks and formatting?
>>
>>61525231
>Our backend is .NET.
find a new company
>>
>>61525231
vanilla javascript + jquery at most
>>
Just a simple question, what's the bare minimum you need to land a job?

HTML, CSS and JS?

Do people get hired just to edit HTML?
>>
>>61526689
Don't see why they would considering it is piss easy (HTML).
Not working as a webdev but I've looked at it a little:
https://coggle.it/diagram/Vz9LvW8byvN0I38x
This seems to give a general idea as to what to learn, you don't have to learn all of it and when it branches out from say "Scipting Languages" it's advising you to learn one of them, not all of them.
>>
>>61526761
Thanks, that's really helpful.

Also, it is recommended to now a bit of back end even if you focus on front end?

I'm just learning, already familiar with HTML and CSS, a bit of JS. A friend works as web developer and told me that knowing Php or Python would make me a great favour to find a job.
>>
>>61526845
I don't think so, unless your goal is to become a fullstack dev.
Generally for Front End I'd say look into strengthening your general skills and look into frameworks like Bootstrap, which even if you don't use you can look at how they've done things and learn to do it yourself and maybe even improve on it, I've actually learned quite a bit from just reading through others code every now and again.
Get familiar with GitHub and technologies that frequently come up - Node.js, Angular, TypeScript or CoffeeScript etc.
That's my take on it anyway, my career isn't web development so it's just sort of a hobby/plan B that I sometimes use to personalize my own site or one offs.
>>
>>61526689
Front end dev here.
HTML, CSS, and JS are the bread and butter for web dev, so yes, knowing those 3 are essential. Well, knowing HTML fully is essential... CSS and JS you can know to varying levels (ex. back-end dev should know HTML along with a backend language, but basic CSS and JS knowlege for a backend dev would be fine).

Also, yes. Some people do get hired just to edit HTML (and a little CSS sometimes). I know a couple, and their job titles are usually along the lines of "Content Editor" or Web Content something-or-other". Not too terribly common though, and I imagine it would feel more like data entry than web dev. I actually wouldn't really call an HTML only job a developer job, but whatever. Also pay is not developer level.

Learn HTML and CSS and get good at basic JS, and you'll be on your way to finding a decent junior dev role.
>>
>>61526689
>>61526761
>>61526845
>>61526931

imo learn ruby/rails. It's gonna be by far the easiest backend work to get into as a previously frontend only dev. I used to work as a rails developer and it was pretty good work. Rails contracts go for upwards of $500/day in major cities. Frontend devs get abused far more than backend devs, but if you want to focus on frontend, focus on strong, well-programmed javascript. Forget jQuery, learn yarn/npm, gulp/webpack, es6 w/ babel, React, etc.
>>
>>61527084
Also, to add on to this, If you're focusing of front end, it's not necessary to know any back-end languages. These days, your time would be better spend mastering CSS and especially JS, and learning a framework.

That being said, learning the basics of a backend language would always be helpful, and even if you don't end up using it in a job, it'll give you a better idea of how everything in web dev works as a whole.
>>
>>61527112
I'm an FE dev of 2 years, looking for a new job. Should I look at JS framework jobs (which I'd need to learn) or should I see if I can hop to back-end? I thought the pay was quite comparable.
>>
Hey boyos, what are we working on?

>just "finished" twitter dashboard with Rails, Sidekiq, Redis, that lets someone get keywords, filter them on front-end, and save them to a sortable table

>trying to decide if I should make it better, start learning react, or start learning node.
>>
Should I learn React or Angluar assuming I want to get a front end job ASAP?

Do I even need to learn a front end framework/library other than jQuery?
>>
>>61527084
>>61527148
Nice infos anon.
I'm pretty comfy with HTML/CSS and can quite easily bring myself back to speed to be thorough with JS.
Say I do learn npm, gulp, babel, React/Angular
what do you think my odds would be of finding a job in a major city relatively quickly?
I also have experience with jQuery, CoffeeScript and general languages such as Python w/ Django
(Not original help needing anon)
>>
>>61527162
GOOD frontend devs earn about as much as backend devs. But good frontend devs nowadays have strong software engineering backgrounds and understand how to write good, modern javascript.

In the end, a lot of firms just see frontend as the people who turn photoshop psds into html, and pay them accordingly. I've found the further towards the backend I've gone, the more I get paid for the amount of work I do. This might be because I've never been a good frontend dev, though. I know that the company I used to work for sold me doing Rails/React/Consulting for about $1000/day. I don't see that much now that I'm contracting alone, but now that I've moved into DevOps i'm slowly approaching that.

Backend isn't quite something you "hop into". It's always best to come from a purely software engineering background if you're going into backend web dev. How's your linux command line? How're your software engineering fundamentals? If these are bad, learning good JS frameworks are going to be just as tough as going into backend.

also, learning Angular or Ember or whatever is fine, but in 2 or 3 years when those frameworks are dead, you're either going to have to entrench as a legacy knowledge base or abandon what you've learned so far. IMO react is here to stay (because it's actually well-engineered), but my advice is pick what you learn very carefully in Javascript because what constitutes good javascript changes on an almost weekly basis.

Sorry not sure if I answered your question but that's hopefully a helpful braindump
>>
>>61527290
I think the part about JS frameworks becoming obsolete is what scares me most.

I enjoy front-end, but I have so much to learn on the JS side of things and I've told my boss that I'm leaving, so I should get to stepping ASAP.

I dunno if I could jump into a BE role as I am. Either way, I'm a noob so I'm looking for junior roles.

I guess maybe go into a JS Framework role for now, learn that business, and perhaps go into BE after that? Would that be possible, or would I be starting pretty much from square one yet again?
>>
>>61527275
well it's up to you.
I decided early on to never learn jQuery properly, because I always knew that generic html/css/jQuery frontend is incredibly bad programming. I've found success by using my intuition and making opinionated decisions as to what I consider bad and avoiding it as much as possible.

The general idea is to just say you can do it, whatever it is. But take time to learn the things that you think are good, because if you do a good job you will make contacts during your work who recognise you are good, and will willingly vouch for you on jobs/contracts that they might find in the future. Also do this for other people.

My advice is focus less on what people want and focus more on being a good programmer.

I've gotten interviews and thirsty headhunters finding me based on the fact that i'm in the contributors list for open source software projects that I thought were good while they were young and then became popular. Example: I contributed to Docker back when it was pretty in (in 2013), and I've had countless companies and recruiters contact me based on this and other contributions I've made. Show the world you're good and job offers will come to you. Don't just say "Oh i went to uni and i had an internship and now I want a job". I've had people come and work with me with masters degrees in comp sci from top Unis and then it turns out they're fucking useless and can't program at all. If a company is already running your code based on your open source contributions, you're much more likely to get your foot in the door.

pic related
>>
>>61527276
I'd say fairly quick, especially if you get to a comfortable level with a framework AND have a decent portfolio that employers can look at, so that they can actually see that you can do what you say you can do on your resume. It's pretty hard to find a job posting nowadays that doesn't mention React/Angular/etc.

But most importantly, don't just learn "how" to use all those tools and frameworks, but also get to really understand the fundamentals behind them. I'd spend alot of time getting good with plain vanilla javascript and ES6.
>>
>>61527444
Alright, noted - thanks anon.
>>
>>61527365
dont look at any of this like "starting from square 1". If you like Javascript and want to learn it properly, then learn it, properly. Apply for junior roles at companies that do good work. There's nothing worse than being at a company that teaches you to do things shittily. Take a pay cut and ask questions every day, for years, as if every day was your first day on the job. Even when you're a senior dev, ask questions. Don't be afraid to look like an idiot. Gather as much knowledge as possible and then hop jobs every 1.5-2 years and look for 1.5x to 2x your current salary.
>>
>>61527423
Thanks
>>
>>61527542
You say 'companies that do good work' but I don't think it's likely I'd be able to land a job without using a job-search site, which don't tell you the company (unless the vague descriptions are useful enough, but I don't suppose they would be).

I think your advice is great, but this part might be difficult. (On a side-note, fuck recruiters. I ask for Front-End jobs, and they throw full-stack shit at me, without job-specs ((I will stop accepting interviews without job-specs, it's beyond embarassing now)), way beyond what I'm capable of. I'm also very honest so there's zero chance of me getting these roles even if I wanted them)
>>
>>61528011
> I'm also very honest
cut that shit out for a start.

>I don't think it's likely I'd be able to land a job without using a job-search site
more open source contributions. Join local meetup groups for your language. I gave a talk at the London Ruby User Group and I got a bunch of extra interest off just that. Network IRL, it's way better. Go to hackathons at conferences and give lightning talks, they let anyone do that shit. I gave a lightning talk at one of the EU DockerConfs. I didn't even apply, they just ask you. A competent programmer looking for work is a very rare thing. Show good CTOs that you are a competent programmer looking for work and you won't be out of work for long.
>>
>>61521879
Also this is shit code, don't use loops:

messages.forEach(text=> Message.create({ text });


but yeah, you should obviously be using bulk inserts and another other than sqlite.
>>
Is Django deprecated now?
And does it exist any good books for other frameworks like this one?
https://www.twoscoopspress.com/products/two-scoops-of-django-1-11
>>
>>61529107
https://github.com/django/django/commits/master
>last commit 2 days ago
I think not
>>
>>61529210
I meant deprecated for top developers jobs and new projects.
Everybody uses graphql, server less architecture, hybrid rendering and so on and django was not written for this kind of stuffs.
>>
>>61529210
Zappa is much better and future proof than Django.
We shouldn't use Django anymore now and please don't fall for the JS meme.
https://github.com/Miserlou/Zappa
>>
>>61529439
Looks interesting desu, I'll check it out tomorrow.
>>
>>61527237
getting more into DBs

>>61529439
>webdev and thinking that JS is a meme choice for anything
I will never understand this. Especially with ES6+ features and how nice Node is.
>>
>>61529688
There are obviously lots of things that JS is a meme choice for, but web is obviously not one of them.
>>
File: backend.png (108KB, 1280x776px) Image search: [Google]
backend.png
108KB, 1280x776px
>>61529107
seems to keep a pretty stable popularity over the years and not even dipping like some of the others
>>
dumb question, but I am following this video
https://youtu.be/2wCpkOk2uCg?t=46m25s

When checking my console I keep getting the error: Uncaught TypeError: Cannot read property 'value' of null
at HTMLButtonElement.<anonymous>

From my understanding this is because the script is acting before the rest of the document has loaded? I have script tags at the end of the body tag. Any pointers on why I have this error?
>>
>>61529966
Yes devs use it just because it works and are not paid enough to evolve anything.
>>
File: ssimhtkdns.png (338KB, 1892x2339px) Image search: [Google]
ssimhtkdns.png
338KB, 1892x2339px
I made a lookup tool with ssl/link checking, pagespeed benchmarking, and email dns checkers.

I need to put in a form validator for the domain lookup before I upload the git and make it available. Any other suggestions I could improve this lookup tool with?
>>
Should I already learn golang or wait for golang2?
>>
Hello, friends. What is the best MySQL or MariaDB gui program for Linux. I'm coming from MS SSMS as a reference point and Emma, which I'm currently using, seems very primitive in comparison. Also, is there anything better for Postgres if I ever started using that?
>>
>>61532272
I don't think it will change too much
>>
>>61532632
DBeaver
>>
Tomorrow I start my mid-level role.

I was entry-level for the last 4 months.

Just 5 months ago I was making 10 dollars an hour doing security for 2 and a half years.

/wdg/ molded me. Thanks.
>>
>>61530124
Could you post your code?
Programming is relatively exacting; without seeing what you've done (or...not done?) we can't really help. The error you're giving is also unfortunately rather vague: it just tells us that you're most likely trying to find an element, via something like document.querySelector(). This means that the browser can't find whatever you're trying to get the 'value' property of.

The querySelector method (as well as related methods) actually rarely returns an error. If it can't find the element you're indicating with the selector argument, it'll just return 'null'. Null, being null, has no methods or properties.

You're right that order of execution DOES matter with JavaScript. If the script doesn't run after the object in question is created, it won't be able to 'find' it.
>>
>>61533254
Thanks!
>>
>>61521700
Some hard core grid illusion going on there.
>>
File: 1420099814802.jpg (13KB, 250x239px) Image search: [Google]
1420099814802.jpg
13KB, 250x239px
I'm looking to buy a windows host. How much should I be looking to spend on it?

Azure is charging $14/month, godaddy $8.00/month. Is this about right?
>>
File: 1493660345555.png (62KB, 443x448px) Image search: [Google]
1493660345555.png
62KB, 443x448px
What are some projects that could help me get hired?
>>
>>61534489
myinstafacechantubeddit.ru
>>
File: 1442826667256.jpg (190KB, 500x598px) Image search: [Google]
1442826667256.jpg
190KB, 500x598px
Am I the only one who goes on to stackoverflow for something programming related, then wander off to hot rpg stackexchanges questions, even though I don't even roleplay?
>>
>>61535478
I do that every day at work.
>>
>>61530742
Isp if any, geolocation?
>>
File: phone.png (17KB, 347x102px) Image search: [Google]
phone.png
17KB, 347x102px
>>61522253

That's up there with some of these phone number memes desu.
>>
File: Capture.png (14KB, 618x346px) Image search: [Google]
Capture.png
14KB, 618x346px
>>61521959
SQLite's limitations don't come into play at this type of scale.

Pic related, it's 50,000 inserts in 0.063 seconds. Whatever's going on here, I'm blaming the fact this looks like JavaScript.
>>
>>61534283
where do you see 8$?
in any case godaddy should be avoided.

>Is this about right?
windows license is always about a 14-16$ per month premium on top I think
>>
Is server less web development the future?
I currently host a 300k visitors/day website for $11/year on AWS.
>>
>>61528954
No.

That foreach is way way slower than a for loop btw.
>>
>>61519029
What is the best way to align blocks in a line, for example in a navbar.
Float: left, display: inline-block, flex or something else i don't know of?
>>
File: frogg.jpg (170KB, 800x800px) Image search: [Google]
frogg.jpg
170KB, 800x800px
>tfw professional wordpress and angular 4 developer earning 6 figures yearly
>>
>>61536782
How? AWS is more expensive than that.

There was a 4chan blog on how much it would take to run 4chan on AWS and it was like hundreds of thousands a year.
>>
>>61536782
"serverless" is a trademark of one framework unfortunately, who've completely taken over what should be a generic word.

>>61537150

Serverless has a history of obvious shilling on Reddit and HN.
>>
>>61527112

>imo learn ruby/rails. It's gonna be by far the easiest backend work to get into as a previously frontend only dev.

I agree. Rails saves you a lot of headache and you can get into details later on.

>>61527290

>Backend isn't quite something you "hop into".

I wouldn't agree here. I have yet to see the Rails dev that needs to code a turing machine, scheduler, hashing algorithm, or A* algorithm.

Especially in our modern framework world where there's an library for everything. You have to do really really crazy stuff to make something with rails (or any other big mature framework, that is) where you can't just import a library and are done.

The actual modern "backend working process" is about 80% doing research which library to use, googling how to configure stuff and using a little glue code to make the differnt peices interact. Only for the additional 20% you need to actually "hard code" things out. But even here you will probalbly read tutorials to similar topics and try your best to make it work.


>also, learning Angular or Ember or whatever is fine, but in 2 or 3 years when those frameworks are dead

Right now I think Vue might be worth investing time, since it's going up and super simple. If you add some Node (which is only JS) you're almost there.


>>61527365

>I think the part about JS frameworks becoming obsolete is what scares me most.

It never will. Never.

BTW you think way too much. Most companies are glad to find someone doing full-stack, so if you are great at Frontend/Design and JS..

Just learn Node.JS, it was basically made as entry for frontend guys like you.

The one big technology which is a must in Backend is databases. Just take a few days to weeks to really dig deep into SQL. It's always important, and if you know how to index properly, avoid the common SQL pitfalls and can explain the second normal form you will already outperform 80% of all web devs out there.

And learn some basics of MongoDB, it's easy and fun.
>>
>laravel vs django
>react vs vuejs
>react native vs xamarin
>neovim vs atom vs vscode
>macos vs win10 vs ubuntu vs archlinux vs fedora
>digital ocean vs ovh
>mariadb vs postgresql vs mongodb
>>
>>61530124
>>61533392

I should have provided the code, that was my bad. Hope pastebin is ok!
>html
https://pastebin.com/bn8ALeme
>css
https://pastebin.com/XFPQfh6i
>js
https://pastebin.com/6zT5Rqeg
>>
>>61538161
You could use jsfiddle to share them all in one link instead of pastebin
>>
>>61538102
>>laravel vs django
Node.js
>>react vs vuejs
Vue.js
>>react native vs xamarin
weex soon maybe? never did native mobile
>>neovim vs atom vs vscode
vscode
>>macos vs win10 vs ubuntu vs archlinux vs fedora
any linux distro or win10+bash. Personally makes no difference except that on ubuntu I am less inclined to procrastinate
>>digital ocean vs ovh
Vultr / Scaleway. (DO is fine too, ovh is not)
>>mariadb vs postgresql vs mongodb
fuck do I know?
>>
>>61538161
>document.getElementById('item').value;
there is no element with id "item" in your html
>>
bought a vps but dont know what to do with it
>>
>>61538467
set up a server.
>>
>>61538467
if you dont know any language you can make a proper one in 4 weeks of study. if you know a language in 2 weeks you will set it up. with frameworks that drops to 1 week.
>>
>>61538102
>laravel vs django
django
>react vs vuejs
react
>react native vs xamarin
react native
>neovim vs atom vs vscode
vscode for code, neovim for quick text editing
>macos vs win10 vs ubuntu vs archlinux vs fedora
macos, arch and fedora are all fine. depends on your preference
>digital ocean vs ovh
ovh
>mariadb vs postgresql vs mongodb
postgres
>>
Getting a bit annoyed lads
Weighed up my margins nicely:
http://i.imgur.com/le8jh7o.png
but now that I want to make it so that it'll follow the user as they scroll it does:
position: fixed; in the grey-box div:
http://i.imgur.com/5M4MSxA.png
and position: fixed; if I put it in a container
http://i.imgur.com/fVRtHdC.png
>>
Why is Angular so great?
>>
>>61519029

How do I access document.documentElement.innerHTML safely?

I need to basically take that string, run some regexes, and put it back
>>
File: 3444.png (149KB, 1636x588px) Image search: [Google]
3444.png
149KB, 1636x588px
I'm building a survey app with CRUD operations. When the user edits a survey the route is surveys/:id

What route should I use when the survey is being responded?

I'm also using MySQL as database. Currently making the ER model, how does this look?
>>
>>61539782

-each question type should have n questions (1:n relationship)
-are you sure about URLs being only 32 chars long?
-if one survey has multiple question, you should add a int for the relative position within the survey (you could do it with the id, but that's a really bad idea). or even better: add an int "next_question_id", like a linked list.
-do you really need to know which "respondent" answered which question after a while? because you are accumulating a lot of data here. Maybe just put an int "count_answer_chosen" in "questions_answer". Then you can later check how often this answer was given. For the current survey you could keep the answers as variables, if you want to give a summary at the end.

As for the routes, I'd say:

>surveys/:survey_id/edit
>surveys/:survey_id/questions/:question_id
>>
>>61540086
The url limit was a mistake

I don't really need to know or change the position of the questions, do I still need a linked list?

Yes, I need to know what surveys the respondent has answered, and the answers to each question. I later want to make a survey analysis section to my app

I'm still new to relational databases, I don't understand why each question type should have a n questions, what I want to store in the question type table are things like multiple choice, binary, rating, etc.

I don't really want a different route for each question, the survey itself will present all questions, kind of like with Google Forms
>>
>>61520431
I'm unemployed. Meanwhile I learned HTML CSS JavaScript Java and php.
>>
>>61537125
Irrelevant in 95% of cases. You should be optimizing for readability and maintainability and simplicity before optimizing for performance. If your loop has less than a hundred items then performance isn't a factor.
>>
>>61537130
Depends on the particular case, but definitely not float: left.
>>
>>61539693
Angular ain't.
>>
>>61539745
>How do I access document.documentElement.innerHTML safely?
Define "safely."

>I need to basically take that string
const currentHTML = document.documentElement.innerHTML


>run some regexes
const matches = document.documentElement.innerHTML.match(/regex/);


>and put it back
This seems like you're approaching the problem all wrong, but:
document.documentElement.innerHTML = document.documentElement.innerHTML.replace(/regex/, 'replacement');


What's the problem you're trying to solve? Because you're almost certainly doing it wrong.
>>
File: 1488299354065.jpg (79KB, 1024x576px) Image search: [Google]
1488299354065.jpg
79KB, 1024x576px
var to_insert = '<div style="opacity: 0.5; font-size: small; z-index:-1; position: fixed; right: 1%; top: 4%;" id="abc123_main_div"><input id="abc123_reveal_button" value="Click to reveal hidden elements"type="button"></input><br><input id="abc123_rm_buttons" value="remove buttons" type="button"></input></div>';
document.body.insertAdjacentHTML('afterbegin', to_insert);


If you run this code on 4chan, you'll find that the buttons go UNDER long post elements. How do I get them infront of everything no matter what?

It is supposed to run in an add-on, so it will be run in the context of arbitrary HTML but it always needs to show up on top.
>>
>>61520564
Vue is awesome, React is for retards
>>
>>61539782
>>61540086
>>61540279
Shouldn't a question have one type, rather than a question type having one question?

>What route should I use when the survey is being responded?
Editing should be surveys/edit/:id and taking is surveys/:id. Failing that, you could do something like surveys/take/:id.

>linked list
?

>how does this look?
Ridiculous because you designed your schema in UML.
>>
>>61540817
higher z-index
why set it to -1 ?
>>
>>61540841
Angular is better than both
>>
Why does everyone hate jQuery?
>>
>>61541065
Which Angular?
>>
>>61541059

cuz thats what stackoverflow said
>>
>>61541059

So whats the highest in in CSS?
>>
>>61541087
4+
>>
>>61541099
Then don't mindlessly copy&paste.
Higher z-index will fix it for you.
>>61541114
whatever the range of an integer in the browser is
>>
>>61541068
jQuery has enabled a gigantic mass of poorly trained "frontend developers." They copy and paste tutorials they find on google, clog up all the support lines, and write generally shitty non-code.

jQuery has little place left in the world of web. Every individual thing it does is obviated by better technologies. $.ajax by fetch, $() by qsa, the UI stuff by react, etc. Generally if you're using jQuery for anything more than some flashy on your blog, then you don't know what you're doing.
>>
>>61541331
React is shit, Angular is better
>>
>>61537141
Is a go daddy front end "professional" developer the same category as That, I saw some job postings for that for about 60-70k starting salaries
>>
File: 1460685784423.gif (3MB, 386x232px) Image search: [Google]
1460685784423.gif
3MB, 386x232px
>>61541371
>>61541065
>>61539693
>>
>>61541442
Enjoy your dying library while Angular keeps growing.
>>
File: 1468829751000.gif (855KB, 500x281px) Image search: [Google]
1468829751000.gif
855KB, 500x281px
>>61541507
>>
>>61537491
Regarding why you shouldn't just hop into backend development, what a good backend dev doesn't do is far more important than what they do.

Things they don't do include
- drop the production database then delete every backup while trying to restore it
- write absolutely no tests and cause irrecoverable data over a period of several months due to a very obvious bug
- use plaintext FTP to deploy from free wifi covering every single client site in ads for penis enlargements
- point the MX records at the wrong place with a TTL of a week
- use freebsd in staging and ubuntu in production causing deployments to fail randomly
- stick a space after the leading slash in rm -rf in an ansible playbook then run the playbook directly against production
- implement a system where a web and worker process communicate out of band by writing to the filesystem then "fix" the bug by constantly retrying a message until the right worker picks it up
- forget to push for a week then reformat the laptop they're working on
>>
>>61541507
>relying on Google not to abandon one of their projects on a whim
>>
Wish I could get paid a six figure salary just for HTML and CSS
>>
>>61536635
it's under the economy windows hosting plan. on "sale" right now for half that but I'm considering it $8 because that's what it jumps to on the renewal. What's wrong with godaddy?
I also haven't seen anything about a premium on any of the sites I've been going through
>>
Could someone link me to an example of where Revealing Module pattern is used in a simple application?

At work, we something similar, but it uses object literal for the Module, then each property of the Module is a collection of functions pertaining to a particular part of the site. I'm not sure how Revealing Module Pattern would work with this kind of nesting and grouping, or how people execute functions when the document is ready without using jQuery.
>>
>>61527084
>>61527112
Thanks both of you for the input.

Also currently on my second freeCodeCamp project, building a portfolio.

I was considering using a Bootstrap template, but instead I made my own, and it's turning out pretty good, real happy by today's work.

I will probably rewrite it without Bootstrap as well.

Also, how important is getting familiar with frameworks against going full "vanilla"?

Also for the people mentioing payment. I live in Spain and I have a shit job, if I land a job where I can code for 1500 bucks/month I would have a smile brighter than the Sun.
>>
Thoughts on w3schools?
>>
>>61542342
Would this achieve the result (using jQuery)?

var Module = (function () {

var privateMethod = function () {
//private
};

var publicMethod = function () {
//public Module.publicMethod()
};

var publicObject = {
init: function () {
//Module.publicObject.init();
}

something: function () {
//Module.publicObject.something();
}
};

return {
publicMethod: publicMethod;
publicMethodTwo: publicMethodTwo;
publicObject: publicObject;
};

})();

$(function(){
Module.publicMethod();
});


Would I need to pass $ into the Module or would it just werk with jQuery off the bat? I've never been too clear on that kind of stuff (like how in very basic jQuery usage, you just include jQuery in a separate file to your JS file. Do they both occupy the global namespace? Would I be able to access my Module in another JS file?)
>>
>>61542220
oh, I assumed you were talking about a VPS instead of shared hosting.
With VPS you have the cost for the monthly windows license on top of the normal price.

regarding godaddy, I assumed they were against net neutrality, but seems like i mixed that up with their support for SOPA (that they changed only after PR backlash with people moving their domains away)
I guess ultimately they are ok-ish, but still don't have the best reputation, just like hostgator.

>>61542681
MDN is better in all aspects
>>
>>61542707
ES6 has classes or you could just straight up make it an object if you don't need a constructor or possibly make it into a factory function.
Or you use "import" or "require" to expose certain objects/functions to another.
>>
>>61543115
I get confused by constructor functions and objects created with Object.create(). Does the object being passed as an argument into Object.create need a constructor part to it?
>>
Is there any benefit when it comes to getting shit done and landing a job on being good with linux?

I have a friend that works as web dev and he said me that pretty much everyone at work uses either linux or OSX.

I mean, I could spend time learning linux but I'm working full time so I'm already tight for learning web dev.
>>
>>61543140
afaik you can do
function foo(x = 2, y = 4) {
this.width = x
this.height = y
this.getArea = function() {
return x * y
}
}

let bar = new foo(3, 4)
console.log(bar.getArea())


>>61543334
You don't need to be a linux expert, but knowing the very basic CLI commands will go a long way.
navigating directories
listing directory content
copying/moving/deleting files
running a program
quickly text-editing a file

you don't need sys-admin level knowledge for it to be useful
>>
>>61543447
But that's literally just a Constructor function, is it not?

Also why are recruitment agencies getting me phone interviews for roles that aren't really web development, or are mobile or full-stack? I can't play to my limited strengths.
>>
>>61543583
In a way, I think.
Not sure about the exact internal JS workings.

If it's supposed to be a module I would still really move it to another file though and then import or require.
>>
>>61533262
Good shit anon.
>>
>>61538246
Do you really use node.js alone without any framework?
I saw some golang users doing it but most of node.js devs I met use express or hapi for backend.

>>61538246
I have some doubts about weex, it's extremely unstable and has very poor plugins compared to react native.
>>
i'm going to be a senior cs major come the fall

currently i'm spending some time learning javascript (started the summer reading some python books and would not consider myself intermediate) mostly because we don't learn any webdev in school and i'm probably going to end up doing it

what do you guys think about just focusing on fullstack javascript instead of getting good at rails/django? i originally started learning it because i kept running into it when making django apps.
>>
>>61543942
express and socket.io mostly, but planning to look at Koa and possibly Sails.js

like I said, I don't really know anything about mobile development.
Just hoping that Vue also gets some good options for native development, since I really like using it in general.

>>61544004
shouldn't be a bad choice if you look at the developing popularity of Node >>61529966
>>
>>61536154
I use iplocation.com for that but they use POST so I cant build links. I do understand the value of the information but Im not sure how to determine the actual location aside from whats in whois.
>>
hey guys, any of you use tools like Packer and Immutable infrastructure concept in deploy or is it a meme?
>>
Took a break from working through FreeCodeCamp to do CS50. Best decision ever.
>>
>>61519029
/g/ I need your help, In a few days this company I applied to work at will
send me an exercise that I have to solve, they're a ruby on rails and nodejs company
What could the exercise be about?
I'm a compsci student and the position would be junior dev (fullstack) (my work experience is 0 and my js and ruby knowledge is almost 0 too)
>>
>>61545457
What's the position? What are the job requirements?
>>
Apparently they demoted someone and gave me his job. I didn't know until afterwards, but it makes sense now why he was asking me so many questions about what I did before.
>>
>>61545457
You're fucked then. Most of the times those tests were made to weed out people like you.

Study up on arrays and hope you get lucky.
>>
>>61545553
> Whats the position?
Junior dev
> What are the job requirements?
I don't really know, they called me after I did a bootcamp in our college with them where we built a little instagram clone
>>
>>61545606
What kind of company is it? A small startup? A product firm? An agency? If they're smart they'll have you build a feature and call it a day.
>>
>>61545575
Man i know my arrays and shit, I just haven't worked in college with web technologies apart from jsp and some css and js.
They were the ones who initially contacted me so idk if it's to weed me out
>>
>>61521924
oh what a meme
>>
>>61545650
small-ish startup, I hope it's something like that desu, if not I'm fucked
>>
>>61545657
They might.

Just learn as much as you can. College isn't necessary.
>>
File: 1497438172200.jpg (61KB, 463x438px) Image search: [Google]
1497438172200.jpg
61KB, 463x438px
Post your stack and why you like it.
>>
File: GB.gif (1MB, 500x376px) Image search: [Google]
GB.gif
1MB, 500x376px
Recommended resources for learning JS as someone who can already program?

At most I'll need a quick intro to the syntax (which I might skip and just pick up as I go along anyway) along with an introduction to the DOM/actually manipulating web pages. I find too many of the popular guides/resources focus on the language more than its main use.

Bonus GunBuster for your time.
>>
>>61546267
I enjoyed blazing through Eloquent JS. The Mozilla website is good for documentation.
>>
File: 1470039974697.gif (531KB, 800x450px) Image search: [Google]
1470039974697.gif
531KB, 800x450px
>>61546134
>phone interview
>'What stack do you use'
>(I'm an FE pleb why is this man asking me this please kill me)
>>
>>61546298
I always get stumped on the Data Structures section of Eloquent JS. I don't understand his probability example and the entire chapter is built around it, so I couldn't get through it.
>>
the AWS website is a clusterfuck. all I want is standard web hosting prices. Not having to pick through 50 "named" services. who thought this was a good idea
>>
File: 1493796015612.jpg (78KB, 562x1000px) Image search: [Google]
1493796015612.jpg
78KB, 562x1000px
>>61546267
for a quick syntax crashcourse
https://learnxinyminutes.com/docs/javascript/

ES6/ES2015 (same thing) is a newer JS specification, which already works in modern browsers, but needs extra steps for IE
http://es6-features.org
or
https://babeljs.io/learn-es2015/

code challenge sites like codewars/codefights could be useful

>introduction to the DOM
check the MDN link from the OP and whenever you don't know something google "MDN <whatever you want to know about HTML/CSS/JS>"
>>
Hey guys, I'm making a page with a collapsible tree, using d3js. I need to create onclick particle effects for each node, but I need them to fire only on the first click. The problem arises when I try to set the particles to fire based off of id or class, it only works for the first node since the other nodes are dynamically created. I was hoping you guys would be able to help out with some ideas. Thanks guys.
>>
>>61546522
on fire set a class on the element and ignore them on future clicks if they have it?
>>
>>61546392
nice post thanks familia
>>
How do I make my code friendly enough so that others can contribute to it? Just have good comments, descriptive functions/variables, and documentation?
>>
>>61547258
look at other projects with lots of contributors that are made using the technologies you use and just like imitate what they're doing
>>
>>61547335
This, when designing a library or API try to work backwards from the ideal situation of something that wouldn't piss you off to interact with
>>
>>61547258
Additionally, write functional, immutable code, avoid over-abstraction as in most OO paradigms.
>>
>>61546134
MEAN, optionally replacing the DB with either Cassandra or SQL of some sort.
Because it's the first stack I ever learned.
Because it's monolingual.
Because it's a fresh dank new meme.
>>
I've never done anything with HTML/Javascript before. Does anything look terribly wrong with this:
https://jsfiddle.net/g1zzbtpL/
(use 'password' as input)

I'm want to hide my porn bookmarks from other people that use my computer. Maybe I'm over-engineering a solution. I don't know.
>>
>>61546134

Azure App Services (IIS)
Azure SQL
WebAPI
ASP.Net MVC
Angular (1.X) with the new UI-Router
Bootstrap because lazy
>>
>>61549753

Oh, and I don't really like it. I do front end, so using AngularJS with the new UI Router is pretty cool, I like that we can implement it with our legacy Angular apps. DGAF about most of the stack, hybridizing MVC and angular is stupid imo. We gain literally nothing from it as we're implementing more of a MVVM model with Angular and all the models go from EF directly into WebAPI calls that ultimately our angular view models are populated from. We use MVC tech just for bundling shit because nobody wants to learn Gulp or Grunt. We're a mess right now.
>>
>>61546134
PERN.

React is absolutely the best JS view library. Postgres is bretty great too
>>
>>61549819
>dont want to use react cuz facebook
>everyone hopping on the react train anyway
reeeee
>>
does anyone actually use javascript's try/catch/throw in production code?
>>
>>61550291
Yeah, there are lots of situations where you definitely need to.
>>
>>61550106
I can't wait for Facebook to fuck some company over with their fucked licensing.
>>
>>61549472
>want to hide my porn bookmarks from other people that use my computer
just use a different profile...
>>
>>61550307
what kinds of situations?
>>
>>61550405
situations where you need error handling?
>>
File: 1432669193779s.jpg (10KB, 223x225px) Image search: [Google]
1432669193779s.jpg
10KB, 223x225px
what is mvc and why should I care enough to use it vs traditional. Looks like it just makes everything more complicated than helping.
>>
>>61550405
An example from code I recently wrote is when using JSON.parse.
>>
>>61550426
MVC really seems like a horrible mismatch for HTML input elements.
Consider model-view-presenter instead?

>>61550291
Sometimes, but usually I use Promises instead.
>>
Why upwork has $1/hr job offers?
>>
>>61550608
>Why upwork has $1/hr job offers?
because supply > demand
>>
File: india-street.jpg (37KB, 425x284px) Image search: [Google]
india-street.jpg
37KB, 425x284px
>>61550608
>pic related
Both as people asking for work done, and as people willing to work for that amount.
>>
I'm not sure if I need to ask here or in the programming thread, anyway.

I am hosting a website that hosts videos (.mp4)

Its really basic, all static, its pretty much a <li> list on the home page and that links to a page with the title of the video and some other things.

All the pages are the same apart from the title/file etc.


What would be the best way to make something, so that I just need to give a list of the pages I need, and have it spit out .html files ready to go and be uploaded?


(I really don't want to use wordpress for something like this, I would rather it be static)
>>
>>61550786
It shouldn't be too hard, if you just want a quick and dirty way of doing it.

Here's a Python script I wrote a while back to generate HTML from the list of image files in a directory to display them on a page.

import os
f = open("/home/your/output/out.txt", "w")
f.write(
list = os.listdir("/home/your/directory")
for filename in list:
f.write("<div class=\"imagebox\"><img src=\"images/" + filename + "\" height=192px></div>\n")
>>
>>61550608
Definitely not because poos
>>
File: owl2.jpg (8KB, 37x37px) Image search: [Google]
owl2.jpg
8KB, 37x37px
Im using stock chrome and on this one website I get this as the favicon, what does it mean?

I only get it on my desktop, it does not do this on any other install.
>>
Do you regularly contribute to Github?
>>
>>61550291
I really ought to but for some reason it seems way less intuitive than python's try/except/else/finally.
>>61549819
PERN all the way if we're talking Postgres, Express, React & Node. Mongo is decent as well.
>>
>tfw I prefer JSBin to JSFiddle but it is always down or breaking in some way
>>
>>61550291
axios with await
try {
let response = await axios.get(`http://example.com`)
if (response.status == 200) {
// do stuff
}
} catch (e) {
log.toFile(`ERROR: ${e.message}`)
}
>>
File: 0470b22e.gif (54KB, 250x250px) Image search: [Google]
0470b22e.gif
54KB, 250x250px
>"yavascript"
>"we will be writing a for loop, e = 0..."
>"uhhhh"
>>
I'm having a hard time getting this SOAP client to work in php.
Every tutorial uses different parameters for its soapclient/soapcall.

Suppose I want to use a RegisterService.svc containing a Register method, shouldnt the following be enough?
$location = "https://mynamespace.azurewebsites.net/RegisterService.svc";
$url = $location . "?wsdl";

$client = new SoapClient($url, array("location" => $location));

$client->Register();
>>
Anyone familiar with Docker? Playing around with it on a Raspi but there's no arm image for node/postgres. Would I need to run a distro image e.g. Ubuntu and then define a load of shell commands for setting up the environment?

Looks like there's a arm32v6 image for postgres so I could use that though I'm not sure of the compatibility.
>>
>>61519029
In express-validator, how can I sanitize ALL html forms present? It sucks having to do req.sanitizeBody('formname').escape() again and again
>>
I am thinking of building something similar to 4chan but will be served through RSS, I have a decent handle on front end but which back end language shall I use, I know php is more generally used and I can read over similar scripts, but python has extra uses besides back end.
>>
can i set in vue
1. press right arrow, refresh page
2. press F html5 video go in full screen
?
>>
>>61553936
Doesn't really seem specific to Vue
@keydown maybe, but that only works for input elements.

Otherwise create a listener in the mounted() hook.
>>
I'm setting up my first Linode server. I've configured apache and now need to upload my files via FTP

I created my website folder in var/www/html/my_site.com/public_html like the linode documentation said, but when I try to upload them via FTP I get permissons errors. Should i change the folders permissions via SSH

Seems like it might be some sort of a security hazard to me, but how else will I get the files there. Is there a way to issue a "sudo" command via FTP to just upload the files via FTP but keep the folders secure?
>>
if you are using filezilla or an ftp client just use port 22, it goes over ssh
>>
>>61555262
for
>>61554953
>>
I need to program in asp.net. I use arch Linux and don't plan on switching to windows. Can I create asp.net applications in Linux and host on windows server?
>>
Console logs rightAnswer only, why?
var rightAnswer;
var wrongAnswer;
var score = 0;

function quiz(answer) {

if (answer === rightAnswer) {
console.log('You win one point!');
score = score++;
} else if (answer === wrongAnswer) {
console.log('You lose one point!');
score = score--;
}
}

quiz(wrongAnswer);
>>
>>61555315
Is that all your code? Because you don't assign rightAnswer and wrongAnswer any values, so they're both undefined. So in this case wrongAnswer === rightAnswer, so it's hitting the first condition.
>>
>>61555352
Hmm. I thought that passing an empty variable as a parameter could work. Today is a slow day.
>>
I want to learn JavaScript beyond just the syntax. I'm not at a point where I can just "build something" because I haven't been taught how to use the fucking think in an actual web page.

Where do I go from here?
>>
>>61555510
What do you know? Depending on how much you know, you can put it to practice by making a clock or a to-do list which are common examples for beginners.

Anything can be written up in Javascript. Just think of something really basic and then take a moment to break down each level of functionality which you will need to implement to make the whole project work. And then go do it.
>>
>>61555510
>"build something"
build something simple then or just play around with different things.
do some calculations and log them to the console, reverse a string, do a loop, get&set the content of a html element, use setInterval to do a clock and display the time in a div

if you absolutely can't teach yourself then do teamtreehouse 7 day trial
>>
>>61555544
I'm competent in C, Python and a few other languages to varying extents, but with JS I only know syntax and using it in the browser console, not how to actually make it manipulate web pages. I would be doing what you say, but I don't even know how to use JS in a practical way.
>>
>>61555510
So basically the DOM api?

https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction
>>
>>61555609
I was looking at the MDN stuff for DOM, thanks. Any recommendations for where to look after that? Seems to only give a basic overview.
>>
>>61555262
I am using port 22. I'm still getting "[directory] open for write: permission denied
Error: File transfer failed"
>>
>>61555601
>but with JS I only know syntax and using it in the browser console, not how to actually make it manipulate web pages
Oh, ok.

Lessons use the console because it's there man, but it is the exact same outside of the console. Just write up some dank code and instead of console.log(), use document.getElementById('idofelement').innerHTML = <call variables, objects etc here>.

All Javascript does basically is client-side stuff. So anything to make an HTML page be more exciting and dynamic. If you want to store data for a later session then look up localStorage, while in-session is sessionStorage. It's all there man, just think of something to make and then break down the parts and work on each part until the whole thing comes together.
>>
>>61555641
>le "If one does not know to which port one is sailing, no wind is favorable."

pick a project first senpai
>>
>>61555641
I'm not really sure, probably look through the functions in the "core interfaces" section.

Definitely get to know events, like click events, scroll events, keyboard events, etc. That's a lot of the user interaction.

Also, learn how to do basic Ajax: either learn XMLHttpRequest, or don't, and just use Fetch instead. Fetch is newer and fancier, but you need a polyfill in some browsers.
>>
As free resources tend to be a bit lacking, I'm looking at the following books:

> Head First HTML5 Programming
Has a strong focus on JS and how its applied in the browser.

> Professional JavaScript for Web Developers
Same as above but goes a lot more in-depth.

Would anyone here recommend these as a good way to get a solid grasp on the language and how to apply it? I have quite a lot of free time so should be able to get through them fairly swiftly

Which is better recommended, if at all?
>>
YOUTUBE WEB DEV TUTORIAL POWER RANKINGS

1. CLEVER TECHIE
2. DEREK BANAS
3. ADAM KHOURY
4. THENEWBOSTON
5. TRAVERSY MEDIA
6. MMTUTS
7. CODINGTHESMARTWAY
8. CODING TECH (nice lectures)
......
999. Indian tutorials using notepad.exe
>>
Is it still best to use PHP and MySQL for messageboard systems /wdg/?
>>
>>61556153
stack choice is fairly irrelevant, when it comes to the quality of the final result imo
>>
Is indeed/linkedin just the job board of choice for modern js memes?

looking for react/angular/node.js jobs
>>
freeCodeCamp projects are fun.
>>
I'm looking for a good bootstrap 4 dashboard template. I really like this one, but no way I'm going to pay 99 american euros for it
https://bootstrap-themes.github.io/dashboard/index.html

any suggestions?
>>
File: 1496423545318.jpg (141KB, 1000x647px) Image search: [Google]
1496423545318.jpg
141KB, 1000x647px
>>61532632
I just straight up use the command line senpai, but before i would just use the MySQL workbench, its not bad.
>>
>>61557090
Creative Tim has good shit
>>
>>61557090
If this is a commercial project, pay for it. It's worth paying for something decent instead of half-assing it. I guarantee you'll spend more than $£€99 of your time hacking something free together.

If it's a personal project, just use any basic one and worry about improving it later. It shouldn't be difficult as long as you follow good practices re. separating view from model.
>>
I haven't found my ideal backend language yet.

Node
+ Better than it used to be, async/await makes it tolerable
+ Huge ecosystem
- It's javascript
- It's dynamically typed

TypeScript
+ Same ecosystem as Node
+ Some form of static typing
- It still inherits a lot of JS's nastiness
- I don't want a frontend-style gulp+transpilation setup for my backend

Python, Ruby (lumping these together)
+ Big ecosystem
+ Better than JS
- Dynamically typed
- Slow

Golang
+ OK ecosystem
+ Very easy to deploy, just copy a binary and done
- Horrendously verbose error handling
- Lack of basic amenities (statically typed languages need real generics)

Rust
+ Fast
+ Quite a modern design
- Even more verbose than Go
- Bad ecosystem, and not meant for the web at all

Java
+ Static types
+ Great ecosystem
- Nightmare to deploy
- Slow

C#
+ Static types
+ Good tooling
- Deployment outside Windows still questionable
- Mostly huge frameworks, although there are things like Nancy

My hypothetical ideal ecosystem
+ Static types
+ Good tooling
+ Easy deployment
+ Great ecosystem (either native or zero-friction use of other languages' libs)
+ Fast
+ Exceptions for error handling

What do you use?
>>
>>61557572
use typescript, 'its javascript' isn't a valid point you meme loving faggot

it automatically transpiles into js in like seconds, faster than compiling a horrific jsp/c# bullshit
>>
>>61557686
>'its javascript' isn't a valid point you meme loving faggot
It 100% is
>>
How to get gud with d3 (or?) and data visualization in general (prettiness included)?
>>
>>61557572
>My hypothetical ideal ecosystem
>+ Static types
>+ Good tooling
>+ Easy deployment
>+ Great ecosystem (either native or zero-friction use of other languages' libs)
>+ Fast
>+ Exceptions for error handling
Looks like C++ lol
>>
Too many C# jobs out there for my liking
>>
So I want to save statistics on words used on a certain 4chan board and then plot it on a graph. Two questions:

1. Has this been done before or is there some general site for this where you can check stats like this on any site?

2. What's a good front end library I could use for the graph? I would want it to look something like this with a smoothing function https://projects.fivethirtyeight.com/reddit-ngram/?keyword=iphone.android&start=20071015&end=20161231&smoothing=10
>>
File: used3son.png (87KB, 1720x933px) Image search: [Google]
used3son.png
87KB, 1720x933px
>>61558009
1. do it yourself nerd
2. they used d3.js, pic related
>>
How this makes you feel?
>>
>>61558501
I don't use PHP and don't really care about it, but nice for those that do.
>>
>>61558195
How do you find out what library is used? I see that you put it in the console but that requires that you already know what the name is.
>>
>>61558501
I love graphs without labels

>>61558727
Dig through source code.
>>
File: wappalyzer.png (11KB, 231x429px) Image search: [Google]
wappalyzer.png
11KB, 231x429px
>>61558727
he probably took a guess since d3 is fairly popular

You can also get wappalyzer to detect technologies used on websites. Works in most cases.
>>
>>61553094
Try it. I bet it would work but less performantly on floating point math.

>>61556153
mySQL should be b&. Consider redis.

>>61557707
>muh cooties
It 99% is not.
>>
>>61553094
Yeah I was interested in the possibility of docker on pi, but people have not really used it there. You'll have to build most things yourself.
>>
>>61558983
thank you, this is great.
>>
Here's one for you fags here since I've been looking up on it.

Is there ANY way to communicate with an anonymous function from the outside if the anonymous function has no methods or hooks to the outside world?
Note for this, the anonymous function is 100% out of your control. It is already defined beforehand.

I can't figure out if there is a way to traverse the whole scope-chain to interact with anonymous functions like you normally could with objects defined at any level.
Where do these fucks even exist?
>>
File: etycap.webm (3MB, 561x345px) Image search: [Google]
etycap.webm
3MB, 561x345px
My app again. Anyone see any improvements to make to this? What would you do instead of the animated gradient text?
>>
>>61559977

>"Easy Etymology"
Maybe use a classy/scholarly font.
I would personally stick to grays with book-like contrast values and make sure it fits in one line on a desktop view.

Then below have a description:
>"An app that, bla bla bla"
Use your analyzer on that text to give it the solid backgrounds with mouse-overs, so visitors can immediately see how it works, while reading about what it does.

Input element should become a much larger textarea element imo, so you can see your entered text at once and maybe scroll vertically if you have to instead of horizontally.

thats just my immediate rough impression though
>>
>>61559487
>Here's one for you fags here

If you can't communicate like an adult, no one will read your reply you fucking cia nigger.
>>
>>61560333
The ironing is delicious.
I thought I was on /g/, not github.
>>
>>61559487
Objects are not scopes. Look up "reference counting" and be enlightened.
>>
>>61560414
Given what I looked at, it's impossible then.
Thanks Javashit.

Seems there is absolutely no way to interact with an already defined anonymous functions [anything] unless it allows it.
>>
>>61560369
This is why /g/ is a shit board, especially /wdg/. /g/'s immune system is weak. Look at all these unmolested shitposters and ESLs.
>>
>>61560516
The funny thing is people on here mock places for overly emotional nonsense and shitposting, yet do the exact same thing every day.

Why are webdevs so whiny in particular?
Is /wdg/ filled with blue-haired hipsters now?
I feel blinded by their ultraviolet goatees and neckbears.
Given the high use of libraries, seems so.
Real manly men force JavaScript to their will or kill its family.
I'm already sending a snuke to the working group for ruining my plans.
>>
>>61559487
You could try to monkeypatch native prototypes to get some degree of control.
>>
>>61560590
Can that be applied to an already defined anonymous function with no communication outside of it?

Something like this:
  (function(){
david="lol anonimus legion";
}())

How to access david without modifying that code at all?
I can't figure out where this function actually lives. He has no address or phone number, the hermit prick.

I'm not sure if you could modify the Function constructor to create a "backdoor" to it of sorts.
More to the point, I am not sure if it would even matter since it is an already existing instance.
I'm not sure you'd be able to leak its internals out to the rest of the world.
>>
>>61559977
>What would you do instead of the animated gradient text?
I vote stick with it.
>>
>>61559977
Right now it looks like you have a text box, swap it out for a text area with at least a few lines and scrolling enabled.

>>61560817
Yeah, I actually kind of agree.
>>
>>61560807
what the fuck are you trying to achieve, just don't use an anonymous function then
>>
>>61561223
for >>61560488
>>
Someone redpill me on generators
>>
>>61560807
If you declare the variable like that, it's implicitly in the global scope and can be accessed outside the function.
>>
>>61560807
Functions are objects. The function thus instantiated lives in the references held to it. When you lose the reference you lose the function and everything it references.
If I were more sadistic I'd tell you to read the ES6 spec.
>>
Anyone used react-transition-group? I can never get it to work properly and have to resort to declaring keyframes in css. Would be nice to have those animations for components leaving the DOM too.
>>
Redpill me on (((Javascript))), a.k.a. Shekelscript
>>
Switched to flow from Dart because the code it was generating was garbage and their source maps suck ass, yet they're still deprecating Dartium.
>>
>>61561223
As >>61561262 (and I) pointed out, there is absolutely zero control over the original function in question.

While this was purely for fun and interest, turns out this might actually become a hindrance in the future as more admins wrap their entire sites code in anonymous functions.
Editing them is, seemingly, impossible.
If you wanted to extend a site or add features to it, it becomes impossible to override the sites native operations.

Say 4chan for example. Say this entire sites extension was forced on you and wrapped up all nice and cosy in some anonymous blankets, it would be hell for extension writers.
You'd be unable to override various features. (like the refresh timer, or the thread watcher, etc.)

I already tried doing this by taking the anonymous code and writing it in global scope, but you cannot override the code that already exists and is currently running.
So say you had a drawing canvas and took it out and rewrote it to the page using the JavaScript console with no anonymous function and changed the color of strokes from black to red, doesn't work.
You now have 2 separate versions of code, one that is native (with all its event handlers) and this new one. Both running at the same time.
Drawing a stroke draws black and red at the same time. Glitchy and cool as fuck to watch, but hardly useful and would be downright broken if it was anything of significance. (like posting a reply on a site twice, or uploading 2 files, etc.)

>>61561302
Woops, I forgot a var before it. My mistake.

>>61561351
I thought as much as I read more of it.
It seems this function and david is only accessible to the actual JavaScript engine and nothing inside of it.
>>
>>61560488
Do you seriously want static analysis for JavaScript to be even more impossible than it already is? That's a nearly useless feature whose sole purpose is to break the definitions of programs that already exist, who don't expose their internals as part of that definition.
>>
>>61561468
In that specific instance, I would resort to blocking the request for the site's js bundle and referencing my own copy with modifications
>>
>>61561729
Yep. That seems to be about the only way around it realistically.
Either via some proxy or resource blocker like adblockers.
>>
>>61561132
>text area

just tried it out, honestly it would be a bitch to reprogram the interface to suite it ("collapse text area if etyWord divs take too much height", etc) so I'm gonna leave it as the expanding single line text input. textarea would take up too much space in mobile view also, I would have to keep flipping between a multiple line area to a single line area to maintain enough screen real estate for the actual content
>>
>>61562455
>textarea would take up too much space in mobile view also
if anything, an input extending vertically would make more sense on mobile. Scrolling left and right in that inputline won't be fun on a phone.
>>
>>61562791
definitely not fun but better than losing screen space to the input. If I assume the user would typing in quick sentences or pasting in copied text then editing the middle of the text shouldn't be a huge concern. I guess I could have a textarea that expands and collapses when focus is on/off it but in doing that I'd likely have to re-css my whole app so fuck it
>>
File: ss-2017-07-26-02-39-31.png (188KB, 943x500px) Image search: [Google]
ss-2017-07-26-02-39-31.png
188KB, 943x500px
>>61557572
>Java
>- Slow
Java is not slow by any means
>- Nightmare to deploy
it's actually piss easy if you're using something modern like spring:
1. run maven build
2. upload resulting .jar file onto your server
3. run: java -jar your.jar

>My hypothetical ideal ecosystem
>+ Static types
>+ Good tooling
>+ Easy deployment
>+ Great ecosystem (either native or zero-friction use of other languages' libs)
>+ Fast
>+ Exceptions for error handling
java has all of this desu (except maybe for very easy interop with non-jvm languages, but I'd wager there's an advanced jvm library for everything you could possibly need for backend)
>>
>>61564132
Oh, forgot

>+ Not ridiculously verbose
>>
>>61564782
that's a very small price to pay. but kotlin fixes that anyway
>>
So I'm creating a bunch of divs in a loop using javscript. And I want to call a function when they're clicked. However I want to pass some parameters to it.

$createddiv.onclick = () => myfunc(i) 


This works except i is incremented in my loop. so when myfunc gets called it uses 'i's max value. Not the value of i I want it to use.

Any workarounds?
>>
>>61565138
Try an IIFE:
$x.onclick = ((i) => { return () => myfunc(i)})(i)
>>
>>61564132
You should try Symfony (PHP). Great handling of OOP. Lots of bundles. You can use a modern web pipeline and deployment. Good copycat of the Spring/Struts/Hibernate enterpriese ecosystem but not shit. And you can always fall back to dynamic typing when you need to quickly prototype and you want to write less verbose code.

Super quick to develop, and PHP7 is pretty damn fast.
>>
>>61565306
very interesting. is that the actual syntax? I don't need to return anything.
thanks
>>
>>61565138
works on my machine
https://codepen.io/anon/pen/mMyQWo

>>61565318
>Good copycat of the Spring/Struts/Hibernate enterpriese ecosystem but not shit
"no"
>>
>>61565306
>>61565360
>>61565386

actually that works perfectly. just helped me out a lot. thx.
>>
>>61565138
You need each div to listen to the click event by itself.
If those parameters are available to you when you are creating the divs, just add them as data attributes (<div data-something="myParameter">)

should look like this:

// Will pass the loop value to each div
for(let i=0; i<4; i++) {
$('body').append($('<div>').data('something', i));
}

// Each div shows an alert with the loop value it was created

$('div').click(function(event) { alert($(this).data('something'))
}
>>
>>61519029
epik
>>
>>61565386
You're right, Doctrine is actually better than Hibernate. It generates GREAT and verty comprehensible database code unlike crappy hibernate.
>>
>>61565398
I smell a refactor in the future with the latest meme framework, depending on how large the project is
>>
>>61565360
>>61565392
Yep. This is that closure stuff the boffins keep on about. With the inner i as ii and traditional non-bound function syntax, for illustration:
$x.onclick = (function(ii) {
return function() {
myfunc(ii)
}
})(i)
>>
>>61565422
"no"
>>
How do php programmers live with themselves? I have worked with php for last couple of days and I am on the edge of killing myself
>>
>>61565434
I actually started rewriting the snippet in React but got distracted by a tweet that said that now Vue.js is the new hot minimalist framework because React is a little too big so here we go with another rewrite.
>>
We're using react/redux/thunk and we have a rare situation where reducers should modify state objects.

The other devs refuse to recognize this, so we end up maintaining large state structures with spaghetti state control and components that end up with a ton of duplicated logic.

I can't make them see the light.

Does anyone know this feel?
>>
>>61565478
Wordpress? Prestashop? Magento? Another tool not suited for the current task?
>>61565486
Are they aware of MobX?
>>
>>61565496
Fuck magento

>Are they aware of MobX?
This seems like it might have been a better fit. I was fine with redux, I just want them to use shit like areStatePropsEqual for complex objects that are modified external to react
>>
best ecommerce platform in terms of security?
>>
Learning d3 out of personal interest, and pretty slowly since I'm a wagie. It seems real useful for data projected onto geographic maps, but for now I'm doing very entry-level stuff.

The e-book on d3 is freely accessible ( http://chimera.labs.oreilly.com/books/1230000000345/index.html ), plus mike bostock's algorithm post ( https://bost.ocks.org/mike/algorithms/ ) really had me interested in producing neat visualizations for the web.
>>
I mainly just make shit games in C++ using allegro and I want to pick up my first web language so I can make a website for my shit game. I'm looking to be indoctrinated into a cult surrounding whatever language is good and popular right now. Please post suggestions.
>>
>>61565928
Only makes sense to learn js then. If you learn anything else, you need to learn that AND js.
>>
>>61566013
he probably doesn't even need js for a simple game website
>>
>>61565928
What kind of functionality are you looking for? You absolutely need HTML and CSS for basic looks, but you can use prebuilt CSS themes if you don't care too much about customization.

You need JS for basic functionality, like popping things up when you click.

If you need anything to do with a database on the server side (e.g. accounts or anything like that), then there are a lot of options for a backend language/framework.
>>
>>61566129
It's going to need to let users sign up for an account from the website and then store that information into a database. That's pretty much it for functional requirements. Anything else can just be what the fuck ever to play around with what the language can do.

>>61566013
Is js the absolute best for this stuff? My friend once said that the only option you have for client side in web is js because that's the only thing that runs in a browser, but I never bothered to look into that until now. I don't think I can choose js unless I have memier reasons to although the "if you learn anything else..." is a good start. Like, I want to be able to talk about how great this language is that I use and how cool it makes me because I'm using it. I also want to be able to parrot slogans to try and convert others and generally be a huge fag. Can js do this for me?
>>
2008
>>
>>61566255
Oh, certainly. Javascript is the fastest evolving language in the industry right now. Everybody can have their own meme microframework.
>>
>>61566255
>My friend once said that the only option you have for client side in web is js because that's the only thing that runs in a browser, but I never bothered to look into that until now.
This is basically true. There's also stuff like TypeScript and CoffeeScript which are huge memes in their own right. They compile out to js. Generally if it's your first language you should just learn js.
>>
>>61566255
JavaScript is necessary for in-browser stuff. If you're using it on the server, you use Node, which is actually decent. But really you can do everything that Node can do in any language/framework.

If you want to do it yourself on a low level, you can set up a basic POST request response that checks if an email/username has already been registered, and if not, pushes it to the database.

If you want to use a framework, then there are addons for different frameworks that give you an abstraction on top of that.
>>
>>61566436
Oh shit. Meme languages that compile to an actually useful language sounds fucking great. I'll probably pick CoffeeScript because that name is more interesting to me than TypeScript.

>>61566390
>>61566474
If nobody else has a better meme web language I'll probably go with Node js. That one sounds pretty solid since it's apparently actually useful and a js meme.
>>
>>61566527
Yeah man, you can write CoffeeScript that compiles to js and runs in nodejs.
>>
>>61566548
>compiles coffeescript to run in node
require 'coffee-script/register'
>>
https://www.youtube.com/watch?v=rLGCpRPwtj0 What do you all think about the rantings of Eli Formerly Known As The Computer Guy? He says coding and web dev are doomed as a career.
>>
>>61525231
Go with Angular. Typescript is similar to .net so your devs should pick it up pretty quick
>>
>>61553730
>4Chan through RSS
why the fuck would anyone want this?
>>
>>61566548
>>61566635
coffeescript fucking sucks
>>
>>61567368
True. But the unary and binary ? operators are worth it.
>>
You guys know of a glypicon-type pack that has more "car" icons? Working on a simple automotive site and would like to have stuff like convertibles, hatchbacks, etc.

Thanks /wdg/
>>
>>61567368
no, you know what sucks? ES6 and the shitty syntax that it uses to be up to be able to do what Coffeescript does, but in a gimped weird way so it doesnt clash with older versions of JS. You know what is even more funny? Having to use Babel to transpile ES6 back to ES5 so it will run on older browsers, why not just use Coffeescript if youre going to use a transpiler?
>>
>>61567368
The man asked for a meme language, and I gave him one.
>>
>have a website with dozens of pages
>website divided into four areas, each focused on discussing one subject
>95% of the traffic comes to my website for the same subject
>it's the area with the least backlinks
>the other parts of my website are nearly unused
It's really odd to watch how pretty much all traffic comes to my website for the same things.
Thread posts: 324
Thread images: 36


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