>How to get started youtu.be/pB0WvcxTbCA - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice" youtu.be/zf_cb_Nw5zY - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.
Hi i am experience php coder. Anyone want to hire?
Tyler Carter
can you speak english good? and will you work for $2.35 per hour?
Dominic Jones
This is why you can get a job in development.
Justin Hill
Of course. I live in new jarsy, my name is Tom like American name. Your office in designated poo street?
Anthony Martinez
A moment of silence for that poor chair.
Jaxon Lopez
Imagine the smell of that chair after the hamplanet sat on it
Michael Watson
hmm.... anal juice.
Ayden Cruz
I've been stuck on a problem with node.js for fucking hours now and I need help. I have an array set up in express and I want to pass it along to jade, but I can't figure out how routing works. I have tried passing along basic strings and shit but it just doesn't work. Can someone give me some sample code for how to get this shit set up? I just can't figure it out.
From my understanding, .get is used when a get request is made. I've only really had stack overflow answers, their documentation and example code to go off though, so could be wrong. Anyway, switching it out to app.all('/send_data', function(req, res) { res.send({"books": ["A", "B", "C"]}); });
Didn't work either, and not sure how else I would adapt it
doesn't work at all. I'm pretty certain I've got to do something with routing, but the documentation on routing is so confusing that I haven't got a clue how to do it.
Evan Ortiz
the code you used in your first post worked for me, have you set your view engine to jade? app.set('view engine', 'jade');
Jack Wood
res.render('index.jade')
use the full file name
Leo Baker
Yeah that's set, but I'm working in another file than the default app.js, and now I have a feeling it has something to do with that. Is there something I have to do to get that to work? Didn't work.
Jeremiah Thomas
I'm going to be working on my startup all summer, coding the rest of a website we're (or, well, I'm) building.
I'm planning on streaming the process, starting tomorrow, and continuing every weekday. Each streaming session should last about 7-9 hours, hopefully, and I'm pretty excited for it.
The thing I'm worried about is that programming isn't always interesting. Can you guys think of anything that might make the stream more entertaining or useful? I was thinking of letting people come to me with programming-related problems to let me try and help them, but I don't know how well that will work. Plus, while I love helping people, I do need to spend most of my time working on my own shit, not tutoring people.
Any ideas?
Cooper Miller
I should mention that just running nodemon at root runs the file as a console.log prints out.
Colton Moore
let me work on your dank startup with you
Ayden Mitchell
Unless you are doing something very esoteric, why would anyone want to watch you program?
Easton Jackson
anyone got any experience with typescript?
im trying out phaser.js and following a simple tutorial to learn the basics of phaser and i might as well do some typescript with that.
the definitions work fine but when i try to compile i get this error
you have 2 separate app instances in app.js and wc3.js
wc3 should be something like:
module.exports = function (app) { // ... }
and index.js should do this: var app = express() var wc3 = require('./wc3')(app)
Noah Lee
i believe you can also export the router in wc3.js and app.use(require('./wc3')) in index.js
Brayden Wilson
let and var require an explicit type declaration. let logo: someType = foo. But you should be using const instead here, because you don't change the reference of the variable. Because the reference is constant with const, TS can infer the type of the variable automatically.
Ayden Brown
Working it around that way still doesn't seem to work, but with ../wc3 instead.
Here's my file structure for reference
Juan Green
note that all your code should be inside that exported function using the passed in app
James Cook
thanks.
Logan Ross
Yeah that's done.
Nathan Lewis
I've gotten viewers before. I keep a commentary of what I'm doing, which helps.
It's not actually very dank.
Hunter Brown
post channel
Joshua Gonzalez
here's one way you could have a route in a different file, where your wc3.js would be route.js
in your example, your wc3.js exports a new express instance, where it should be exporting a function that calls the buildSheet() function and renders the result from it
do js engines (mainly v8) optimize string comparison by checking if the strings' lengths match before comparing their contents?
Asher Taylor
>$2.35 damn, even in eastern europoor countries one cant compete with that
Grayson Lee
js will be slow regardless.
do shit on your server and use js just to animate dicks on screen.
Fuck the new age js libraries.
Owen Thompson
This. If you want speed, use C#, Go or C++.
Parker Bennett
it's for a browser extension
James Williams
I got that working, and now it only loads everything after I load the web page, but my variables still don't work. Is there any way you can edit my code and see what works for you, as that's straight up not working for me.
For reference, in that image the title should be bar
Logan Gomez
it does matter a lot. if you do application size logic optimizing loops and variable declarations can be a difference of a lot of seconds. if you wanna know more try looking at this: youtube.com/watch?v=v__8ihsdsm8&list=PL7XjSnbRqMYXAb0zF66uhiEdX0tsSwGge its very quick and you can get through it in an afternoon but it imprints some good practices onto you.
generally you optimize wherever you can. not just the backend.
Aaron Jones
>is my micro-optimization relevant? looks like it is. using latest chrome canary for test.
Looks like it doesn't matter at all, once the JIT compiler optimizes it.
Thomas Phillips
are you sure, still seems to matter? also, is the ES-6 syntax relevant???
Xavier Jones
I know that arrow functions and let/const are more easily inlined and optimized. In fact, after running them a few more times, some returned 0. So I assume it does some preemptive checks and compiles the result as a constant. V8 is amazing.
Ayden Reed
yoooooooo thanks. I see what I did wrong now, I was treating it too much like base Javascript. Now to work on the rest zzzzzz
Tyler Hall
hey wdg, Im finally back on track to star some real web dev, and i noticed theres a lot (more) of tools and frameworks, which ones should I stay away from?? and post why.
Connor Ward
How can I make some presentable projects in a day per project in JS and Angular? Please please help.
Lucas Thomas
holy fucking shit JSLint is a piece of shit, why wont it stop bullying me!! my productivity has been halved ever since ive started using. CAnt even focus on my project anymore.
Andrew Scott
If you have to ask, stay away from all of them.
Find or make a good make a template to start from so you don't have to do boilerplate stuff over and over.
Quit writing such shitty code then.
Xavier Cooper
>structuring HTML with JS stop
Anthony Parker
Just starting out web development and since im coming from a c background, I love optimizing stuff.
Is there some sort of tool out there which will optimize a JavaScript file before putting it onto the web?
Would any of these optimizations have any significant impact at all? Im beginning to make games in WebGL and want to squeeze every little bit of performance out of JavaScript that I can. I like to keep code neat for myself but when putting it onto the web I would like as much performance for my clients as possible.
Gavin Wilson
nobody does that, stop projecting.
Joshua Robinson
jslint.
Would any of these optimizations have any significant impact at all?
dont use js for speed.
Austin Thompson
You can't do much to optimize js for speed (except not do retarded stuff, of course. Keep big O in mind.)
You can get a pretty significant reduction in size with a minifier though, which reduces load time. If you're reasonably familiar with node, take a look at grunt, gulp, or webpack. (I personally prefer gulp.) They're task runners that you can set up to lint, test, minify, compile, and otherwise transform your code.
Kayden Lewis
>jslint alright thanks, will try it out.
>dont use js for speed.
What should I use then if I plan on working with webgl?
I know JS will never be as fast as C or other compiled languages, but you can still probably squeeze a little bit of performance out of it. Im new to all this so pardon my ignorance.
Wyatt Anderson
Usually js is jitted, so it might help with startup, but not on the long run in general.
And if you do this, please know that you should also provide the sources, for freedom reasons.
Blake Foster
>minifier This tool is great! Just reduced my JS file from 3.5KB to 2KB.
I havent tried node yet but will keep those tools in mind for when I learn it.
Thanks for the response
Liam Russell
>What should I use then if I plan on working with webgl?
WebAssembly in a few years or so. JS is fine though. Just don't do anything retarded, as said.
Christopher Green
Anyone here ever used CherryPy? Thoughts/opinions?
Jose Wright
>this is a bullshit free zone >Wordpress
Caleb Hall
this chair defies physical laws
>gravity free zone
Jeremiah Hughes
>finished the US-number challange >want to see a better solution because mine was too long >see this:
var re = /^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})$/;
wew lad
William Adams
anyone here use laravel thoughs/opinions?
Lincoln Richardson
fukcing disgusting, heres some moe to ease the pain.
Ayden Foster
I'm using PDO to create a view on an sqlite db, but I keep getting database locked even though the permissions for the file is properly set.
This only happens when I'm trying to create a view on sqlite. I can insert and query other stuff normally to the same sqlite file.
Anybody have any idea what's happening here?
Jaxon Moore
are you already logged in from another connection?
Jace Martin
>disgusting >posts a cartoon with no nose
William Fisher
S Q L I T E user, it's a file DB.
nice quads by the way.
Elijah Lewis
A few months ago I was playing around with it for a project but then turned to Django. It's neat and all but I think it's lacking features.
Lucas Moore
stop fapping to chinese cartoons user, youre going blind, she obviously has a nose
Isaiah Smith
I just went live with that streaming thing.
I'm SHTheSuper on Twitch. Check it out, I guess? Hopefully everything goes smoothly.
Jordan Garcia
What's the usual approach with regard to connection pools and prepared statements, given that prepared statements only live as long as the connection? Do you only prepare statements when it's going to be used several times in the same connection as opposed to several times across connections?
>inb4 nobody here uses either connection pools or prepared statements, let alone both
Jaxon Gomez
Are they in their underwear? Is that it? Being a female techie is about sitting together and "code" in your bloomers?
Owen Thompson
should i learn go and why
Matthew Richardson
no because it's shit
Robert Myers
Yes if you haven't learned any meme language
Elijah Hernandez
i know ruby on rails
Sebastian Brown
> i think it's lacking featurres
like what>
Lincoln Morris
Take a shot of whiskey every half hour and I guarantee people will watch
Jack Diaz
Yes because learning new languages is not difficult and any remotely popular language is worth learning
Jose Diaz
lads, how can I check if a is clicked with PHP? normally I would just do if (isset($_POST['thing_submit'])) { blablabla }
but that doesn't work here because it's not an in a form
here's my button:
Christian Hughes
The guy who runs cock.li did this a few days ago while writing the website for his new VPS service and said he was surprised at how interested people were and how well the stream went.
You'll be fine
Mason Jenkins
You can't
Hudson Phillips
that's not how it works user
Jonathan Anderson
if (isset($_POST['delete_pig'])) { //blablabla }
Jonathan Robinson
Except that still won't do anything because he has no form and is making no post request and has no idea what he's doing
Easton Reed
then he needs to use ajax
Leo Bell
damn, guess I'll just fuck it inside a form then
Nathaniel Richardson
use AJAX instead
Brayden Parker
Just did:
Robert Phillips
Me and my friend just got our first web-dev contract, this guy wants multiple websites to be made. (mostly info sites, nothing complicated) We want to use rails as our framework (I already have a little experience in it, he uses asp.net at work). What do you guys recommend as CMS?
Luis Gutierrez
forgot to add that we will be hosting the sites ourselves.
Evan Perez
> we will be hosting the sites ourselves thats stupid.
Dominic Green
why? He is paying for it, and we got a 9 euro vps.
Christopher Rogers
>9 euro vps get scaleway's 3 euro vps if you are just doing wordpress-tier websites