/wdg/ - Web Dev. General

Las thread: 'Don't Let Me Die So Fast' Edition

>IRC Channel
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

> Discord
discord.gg/0qLTzz5potDFXfdT

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/
youtube.com/watch?v=JxAXlJEmNMg&feature=youtu.be&list=PL7664379246A246CB - "Crockford on JavaScript" lecture series.

>Frontend development
github.com/dypsilon/frontend-dev-bookmarks

>Backend development
en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

>Useful tools
pastebin.com/q5nB1Npt/ (embed) (embed)
libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
pastebin.com/4YeJAUbT/
>How to get started
youtube.com/watch?v=pB0WvcxTbCA - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
youtube.com/watch?v=zf_cb_Nw5zY - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.


>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com
>NEW!
openshift.com/

Other urls found in this thread:

engineering.meteor.com/mongodb-queries-dont-always-return-all-matching-documents-654b6594a827#.sh5tig08c
developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map
docs.angularjs.org/misc/faq
angular.io/docs/ts/latest/quickstart.html
codepen.io/faires123/pen/Nrxgjr
codingbootcamp.rutgers.edu/)
u.pls.press/RutgersCodingBootcamp/
4tran.bid
github.com/4tran/VIB
colors.findthedata.com/saved_search/Pastel-Colors
twitter.com/SFWRedditGifs

first for javascript is the best

node.js everytime, everywhere

finished writing a php frontend shell. works pretty flawlessly except for parsing tabs in a json embeded object, perhaps i overlooked something

Opinions, recommendations?

Remember our webscale'd 2.0 and loved database, MongoDB? And how it, in some cases, didn't persist all the records? Welp, now it doesn't even RETURN all the records for a query! YAY!
>engineering.meteor.com/mongodb-queries-dont-always-return-all-matching-documents-654b6594a827#.sh5tig08c

>Specifically, if a document is updated while the query is running, MongoDB may not return it from the query—even if it matches both before and after the update! If you use MongoDB, you should be aware of this subtle edge case and make sure your queries don’t fall victim to it.

>Reading while updating data? That's an edge case!
WEBSCALE
E
B
S
C
A
L
E

So Javascript objects are pretty much the same as Ruby and Python dictionaries?

Except in Javascript the key "string" will be the same as the key string.

Am I learning this right?

Yeah, JavaScript objects are basically maps of strings to values. They're slightly different to, say, Ruby Hashes because they don't allow any type of object to be a key, just strings (and recently, Symbols.) If you use something that isn't a string as an index, it's coerced to a string, so myObject[7] is the same as myObject['7'].

Also you shouldn't actually use JavaScript objects like real dictionaries unless you're aware of all the edge cases, it's just convenient to think of them like that. For example, if you use an object to map usernames to user objects, someone could make a user with the name '__proto__' and just ruin your day.

There's also this if you want a proper key/value map:
developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map

>MongDB
Not even once.

Also, for actual dictionaries in JS, use ES6 Map(). developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map

What's wrong with the name '__proto__'?

It's an internal property used by JavaScript to keep track of the object's prototype chain. I can't remember if it's just not writable or if assigning to it changes the prototype because you're not supposed to use it directly. It might depend on the browser/runtime.

I'm working on my first Node.js project ever (a MAL clone).
Should I look into Meteor.js or Express.js?
Which technologies / environments would be the best for such a project?

Hey, I'm new to Web Dev too. How did you learn Javascript? I'm still figuring out how CSS works

Does anyone here work in a web-dev related job?

What does your day look like?

And I thought I knew alot about JS...turns out I know fuck all.

>One month project
>figure out the project was really overestimated in time
>Do it in one week, make some little fix on other project in production
Well this day, i mostly chill and watch movie
Sometime i help my boss for his "big" personnal project

>Sometime i help my boss for his "big" personnal project

This sounds like the start of a chink porn film...

>get in at 9
>read emails, grab coffee
>open project im currently assigned
>pull latest commits from bitbucket
>browse around in the code until I find where I left of yesterday
>start reading reddit, hackernews, 4chin, twitter
>banter with colleagues about stuff we read
>eventually finish some work, write a few simple functions, fix some bugs
>get lunch
>check youtube
>a few new bug reports come in, fix them
>do my Hearthstone dailies
>get together with dev sprint team, talk about project, set goals for the next days
>make sure everything is commited, documented and pushed
>go home

why bitbucket?

free private repo's

github is full of fucked up sjw's

nice

Express is fine. Meteor uses MongoDB, so avoid like the plague.

which type of database would you recommend then?
All I've ever tried is MySQL, but I bet it's not the preferable option nowadays.

mariadb, postgre

Use postgresql.

MySQL is still the industry standard. MariaDB is a modern fork that most people (and big companies use. It has the reliability of MySQL but with modern features and it's hella fast.

Would node.JS be suitable for a website selling digital products? I've already learned quite a bit of Python because I was going to learn Django but I'm not sure if I should anymore.

Depends on how your data is structure. If you make a document per user and query statistics with map-reduce-*, NoSQL is fine. I recommend RethinkDB, Riak or CouchDB. Otherwise PostgreSQL/MariaDB.

Python would do the job fine, you don't have to use django

You know what I always found ironic?

PHP is a shit langauge, but the guy who made it is pretty cool.
Rails is an cool piece of software, but the guy who made it is an asshole.

Makes you think..

Either is fine. Pick whichever you are more comfortable with.

github has pronounced themselves against the evil, dangerous white women

this really made me think

I want to make a website that I can put on my portfolio that actually does something cool. It's so hard to come up witb ideas that are not lame and/or too easy.

Linux is also pretty good and we all know Torvalds is an asshole. Asses make the best software.

Eventually you get to a place where you have a backlog of ideas that you would love to work on but don't have any time for.

That's pretty neat, not sure when I'd use it but it's pretty cool.

It's mostly just sitting at a desk doing bullshit websites and html5 ads, you eat lunch at some point, maybe go for a cigarette. It's nothing to write home about. People are usually quite nice though.

Things like that are nice for having if you are tired of alt-tabbing. Just pop the module onto your application and go from there.

can't you just leave work when you get your work done?

>willingly making ads
fuck you

Work is work, I get paid for it and most of the time it's kinda fun, I even made my own html5 animation editor complete with timeline and a 10k runtime. We use it for all our ads now and even sell it on the app store.

It varies as I'm a designer/developer for a startup. Today has been mainly sat in Visual Studio hoping it doesn't crash, other days I'll be designing frontend all day.

>complete with timeline
What's that?

what might trigger an error here regarding the mysql?

// mysql-connection.js:
var mysql = require('mysql');

var mysql_connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'rootpassfornow',
database: 'mmldb'
});

module.exports = mysql_connection;

// api.js:

var mysql = require("./../require/mysql_connection");

// ...

router
.get('/user/:user_id', function(req, res, next) {
if (isNaN(req.param('user_id')))
res.json({
error: "yes",
error_type: "illegal_id"
});

mysql.connect(function (err) {
if (err) {
res.send(err);
return;
}

res.json({ "success?" : "yess!"});
});

res.json({
id: req.param('user_id')
});
})
// ...

Is there a good crash course to Ruby on Rails and Angular.js for a backend developer, to be able to do stuff in 1 to 2 months?

I'm going to read the tools and use their official documentation/handbooks I wanted to ask the Sup Forumsentoomen present because I trust the opinion random strangers with above average IQ.

is there something like learn Angular/RoR in the same fashion as Laracasts or Learn C/Python the hardway?

I do NOT know node.js, and I assume that if I know javascript I can take up angular fairly easy or in parallel while learning Angular. I come from a Groovy (Java), Django, Laravel (etc like Worpdress, Joomla) background so using MVC or DevOps stuff like vagrant, docker, aws, PaaSes, isn't something new to me.

I want a better job since where I currently am, only do small php backends or Wordpress themes, and I think while it is fairly easy it will stagnate my development in the long run.

>TL;DR what's Sup Forums 2-months max crash course for Angular.js or Ruby on Rails?

I'm this guy
>php backend developer, primarily custom wordpress themes with site specific plugins
>business owner keeps accepting projects and not hiring programmers
>business owner gives me a project
>asks my deadline
>I give a realistic deadline
>he lowers the deadline by about 38%, I know this is from a linear model I did with my deadline statistics
>from the interview day I keep saying I can implement scrum and optimise deadlines with pert/cpm so that he can give realistic delivers to his customers
>business owner ignores me anyway since it says it is too complex and he has something that works
>we don't even use git, we use insecure ftp, because it's cheaper and simpler
> tried to use a paas (OpenShift) one time to show how quickly it was to setup shit and lets team work on the same shit while not fucking the others work (using branches)
> business owner says he needs something that people understand and not command line stuff
>we delayed 2 weeks ago with a project since a junior couldn't handle it, literally the other senior didn't sleep 2 days to meet deadline
>I was hired 2 months ago as a senior programmer
>I'm going to quit at 3 months and start my own up

Thanks, I was looking for a nice php shell for pentesting but i couldn't find anything that used ajax, you'd have to make a POST per command and wait for a full refresh, then it kinda just started expanding from there into a shell-clone.

docs.angularjs.org/misc/faq
angular.io/docs/ts/latest/quickstart.html

Learn Angular 2 it's going to be in high demand next year.

You should watch in the Crockford on JavaScript lectures in the op if you want a more in depth explanation of how the language works for someone who can already program.

Thanks for confirming all of my preconceptions about php dev shops

So you had prior experience to get hired as the senior dev?

Seems strange to me that people hire senior devs outside of their company.

Are people inside the company really that useless? It's now more painful that I still cannot find a web developer job.

If only we had some sort of sticky that answered this? Read a fucking book.

>Angular 2 it's going to be in high demand next year.

Legitimately? Or are we talking "Cali start up" high demand.

Why didn't any of you niggers tell me about Elm before? It's fantastic.

it's too new to tell if it's actually gonna be popular. if it was just angular but better it would be for sure, but it's completely changed.

Because TypeScript exists. Admittedly the Java parts of it are cancer, but the ES6/7 parts are solid.

elm is pretty good
if elm doesn't do enough for you (e.g. server side rendering), try purescript + pux

literally read the OP.

building the tic tac toe game for the freecodecamp challange

currently building the UI and I think I'm doing it the hard way
I want to make 9 X and 9 O with canvas that will be toggled during the game (havent coded it yet)
so I have to build 18 canvas elements and calculate the positions for each of them.. this is not difficult but I think there is a better way
can you give me some tips

codepen.io/faires123/pen/Nrxgjr

What books are you reading /wdg/?

Test-Driven Development with Django - 10/10 very solid guide teaching you how to create clean, safe code with TDD. Even gets into depth with basic DevOps and JS tests

Javascript: The Good Parts - 7/10 informative, but it doesn't tell you a variety of things to avoid. It's mostly just patterns

angularjsbook.com - Just starting it. I probably won't use angular at any point considering it's a very heavy framework and Django is already a heavy framework, but I am loving the idea of it. I'll probably read up on knockout.js, react.js, backbone.js, etc just to see which one would fill my need most

>above average IQ.

lol

A book on Spring MVC. Bit of a learning curve but the modularity is impressive.

pls hire me when you start it

In case anyone is interested (as a educational resource), here's the content of the private repository for Rutgers Coding Bootcamp (codingbootcamp.rutgers.edu/)

u.pls.press/RutgersCodingBootcamp/

Protip: Don't use github if you care about security.

>Don't use github if you care about security.
Nobody does for professional private projects. A private repo costs money, whereas you can get it pro bono on bitbucket

you'd be surprised how many semi-reputable companies do it, and then add a bunch of members that keep reusing their passwords everywhere. from the 000webhost dump alone, I managed to find a few hundred active accounts with major private repositories.

Thinking of creating a programming meetup for my area since we dont have any. Does anyone have experience with them? What are some essentials for meetups like this?

We use bitbucket, too, but many use github, pecause bitbucket charges per user.

top kek
Yes, i can actually work at home most of the time

>Nobody does for professional private projects.

a-user, you're not suggesting..

My work does.

I don't know why since we're such a small company it'd probably be way cheaper with bitbucket.

>his company doesn't use Beanstalk
m8s...

Pretty sure you could manage with one canvas- just redraw it when something changes. And keep data in array. And you could probably get relative coordinates from lick event. Fuck i think i will try to create my version tomorrow if i will still remember it.

We just self-host with GitLab, straightforward

What the HTML attribute that already has text contained inside say an input box. A placeholder is greyed out, but some ones do have text that can be posted?

Sorry for explaining like a retard

...

Are you sure the box actually lets you post it unfilled purely through html? It's possible that in the backend, it changes an unfilled box's text into the default placeholder

What I am looking to do is input a URL to the front end, back end processes the HTML, parses it and scrapes of stuff it needs. From the scrapings, that populates the form. In the meantime while regexes get nurtured, the user can check the input and amend if necessary before it gets posted to the web server.

what's the deal with web devs who live and die by meteor?
It's such shit

I've been working on an imageboard software that I wrote. A kind user in a previous thread "hacked" it (put some js into a text-box I'd forgotten to escape or filter.) This is useful to me, as it helps me find bugs I may not have otherwise discovered so soon, so please continue to do this if you feel so inclined.
I'm also looking for someone to help me with the front-end; I don't have an eye for design. I'd also like any opinions or suggestions you have to improve the software.

A live site is running here: 4tran.bid
The software is free and open-source, and can be found here: github.com/4tran/VIB

Why is it called tran? Are you a tranny?

Also, I'm not sure about the black, a softer colour may be more appropriate, a really light pastel colour.

You also need to harmonise the font colour, perhaps make divs a different colour from the background too

I'm not very creative. Whenever I name something, I kind of just pick whatever pops into my head. Fortran is what first came to me, and then I thought "if I replaced the for with a 4, then it'd look sorta like Sup Forums."
Could you give me some examples of colors to use? I'll try them, then take a screenshot, and you can tell me what you think about them when it's applied to the site.

Probably because of FORTRAN

Working on an expense tracker web thingy. Most of the UI is built with google closure library controls, but I want to style them.

What's a good CSS framework that does not impose their own JS functionality, i.e. style-only? Preferrably themeable.

Can be LESS or SASS, too.

Bourbon looks good, or would you go with something simpler like purecss or skeleton and modify it?

>I'd also like any opinions or suggestions you have to improve the software.

Try to keep your view and actual code separate. The file thread.php alone is a clusterfuck for me to understand since it mixes both the view and the logic to retrieve a thread and its posts. You usually try to keep these 2 apart.

Second, your commit log is all but helpful since with nearly all commits I can't make out what you've actually changed.

203

I'm new to php (which I'm sure is obvious to you.) I'm also new to project management in general. Could you go into further depth what you mean by "separate view and logic," as well as provide an example of what that would look like/how I would manage to do such a thing?
Also, you're right, my update log isn't really helpful. I'm terrible at commenting and such, but I'm going to work on it.

What's the easiest way to implement a signup with paypal while you're still developing from your own computer? (i.e. localhost)

afaik, paypal needs to send a message back to you when its done, and you can do that with localhost.

colors.findthedata.com/saved_search/Pastel-Colors

Basically, this link should help. The background colour of your imageboard should be the lighter colour and your divs should be darker.

In your case, black could work, but you need to make your divs charcoal, or gun metal gray. Text should maybe me black again or a softer grey with more white.

I would personally go with a nice pastel blue on the background and dark pastel blue as the div, try it out see what it looks like. It's quite similar to this board.

One thing I should mention, don't worry about copying other site's styles. Just think, Facebook and Twitter both have a blue theme, just imagine if they both were red or green, wouldn't look right would it? So safe bet is always blue, some people I'm sure have done research on why blue is better which you can read up on, connotations of calm or whatever bullshit, but your own eyes won't lie.

Look at orange + green, if you think its horrible then you have an eye for what goes. If it doesn't bother you then yeah, you need someone else to help

>4tran.bid
i tried to make a post and got pic related

*you can't

Did you try to upload an image larger than 5mb? my php post max size is 5mb

I don't remember the details, but it is possible. Does it not work if you just use a route at localhost as callback? You do need to have a server, of course.

55M get

no i tried to upload pic related(1 MB)

...

ah, forgot to change it in my server block. should work now.

is there an easy way to practice truncating strings in python?

you know, like what [:3][-2:] does or whatnot
preferably a website similar to regexr.com

Thank you user, this tool will be useful to me. I appreciate your help.

Is anyone making a website that needs some help? Would love to work on a website but have no ideas.