« first day (1468 days earlier)      last day (3699 days later) » 

00:00
I was double majoring in Business and CS
@mia That may be a big aggressive for you.
@SomeKittens I went to one of the top business schools in country - I think it was #2 in country last year. So all of our CS classes focused on making money, etc etc (business)
Ewwww
also, "Computers and Information Systems"
glorious
"computer information systems"
close enough
CIS .... more about writing documentation than writing code
@Whathaveyoutried That's not what your LinkedIn says
00:03
@SomeKittens Give me some typical js questions without giving anything away? Is that possible?
hahaha really?
mia
mia
@TravisJ i know it has nothing to do with youtube but im trying to c how can the content can be display from users end like if you were to watch a video from youtube. it creates specific link for that user only so what im trying to learn is how to display content from javascript to html with specific page ID. Lets say the user has goes on Page1 what java script will do is it will create a download link for that user only which will expire within some time use external server
@Whathaveyoutried Yep.
@mia - so you would need a way to route based on the page identifier, a querystring to contain information from the link, and some dom building in javascript. If you use node serverside you could use all javascript. A majority of js is front end though
@Whathaveyoutried Ummm... given an array of numbers, sum them?
Also, bold move having your email on your LinkedIn
too easy
it's not my "main" email, but why?
00:06
@Whathaveyoutried ah, ok if it's not your main one.
i would do a arr.reduce
Recruiters are ruthless
@Whathaveyoutried 10/10, would hire.
they always msg me on LI, never on my email
mia
mia
is there way to get like the direct link for a video from youtube except for having youtube generate for each user?
arr.reduce(function(x,y){return x+y;});
00:07
@mia No.
@erikroyall NaN
the start ;)
, 0
bingo
@erikroyall You need to set an initial value to reduce against.
Come on..
!!> arr = [1,2,3,4,5];arr.reduce(function(x,y){return x+y;});
@SomeKittens 15
00:08
@SomeKittens No
well, I sit corrected.
Only if you need to handle empty arrays
It defaults to 0
@TravisJ No
It throws
00:09
!! help
@Whathaveyoutried Information on interacting with me can be found at this page
mia
mia
umm thinking
@copy - No
It returns 15
> If no initialValue was provided, then previousValue will be equal to the first value in the array and currentValue will be equal to the second.
00:10
Ah so that is the default
!!> [].reduce(function(){})
@copy "TypeError: reduce of empty array with no initial value"
the array is empty
Exactly
Well, that's smart of w3.
I thought it'd be undefined
00:11
So there is a fundamental difference there. I would rather check up front for an array with data then let it error out from a bad call.
Allowing errors to control the flow of execution is an anti pattern in my opinion.
It's actually a pattern
It is bad practice.
mia
mia
@TravisJ have u ever used downloads helper plugin on firefox?
It is good practice
The only errors that should dictate the flow are ones which cannot be recovered from and need to gracefully fail.
@mia - Nah, firefox isn't secure enough to use.
mia
mia
anyways here is what im trying to do in simple term 1) get the url for a video in this example we will use youtube 2) what javascript will do is it will get the download link from the video 3) it will play using video tag except for using youtube player
One corner case on how bad programmers in python allow race conditions is not a very strong argument against testing for pre conditions
@mia - why not just embed it?
mia
mia
reason is im trying to use video tag
Exception handling is awful in JavaScript anyway, so that's your point
!!get me out
00:18
In JS it has its issues, but I am talking about language agnostic approaches
mia
mia
so is that possible?
In that case there is no reason to call it bad practice
Just because it is easier to let an exception mash through the call stack until caught doesn't mean it should be done if avoidable.
It is slower, hurts scalability, and if not designed can be unpredictable.
You need to give some proofs for slower, hurts scalability
"While the use of exception handlers to catch errors and other events that disrupt program execution is a good practice, the use of exception handler as part of the regular program execution logic can be expensive and should be avoided. In most cases, exceptions should be used only for circumstances that occur infrequently and are not expected."
" Exceptions should not be used to return values as part of the typical program flow. In many cases, you can avoid raising exceptions by validating values and using conditional logic to halt the execution of statements that cause the problem."
00:24
Also, in some cases EAFP is the only way to handle something safely
It should be used as a worst case scenario in situations where exceptions can occur such as with making database connections, but that does not control the flow of execution.
Yes, definitely in that case it is a necessity
Or when handling ports for example
Anyway, I'm off to sleep
If someone randomly unplugs a usb device there is no choice but to allow the exception to control the flow, but that is still by design and should have a specific type of exception.
good night
I should probably go too
00:35
@TravisJ It's 5:35
Hello Folks. I was wondering if anyone has experience managing the development workflow for Socket.IO servers. Specifically, what's the best way to separate a development and production server? Right now, we have 2 or 3 files that we're running for dev, testing, production, etc, and this seems.... complicated and confusing.....
Basically, I'm wondering if someone has a better, less insane way of doing this.
heh
I'm literally writing tests for a product that'll solve that problem
interesting...
anything to do with Google App Engine's Managed VM's? That's where we're eventually heading.
But at the moment we're just running on a Google Compute Instance via Cent OS.
Nope, Docker
Docker is cool... in fact that's what Google is using to bridge the gap between their PaaS and GCE, essentially bringing Node.js and other languages to their platform.
00:41
You'll have a docker instance where you can run all the code you'd like. Want two? Take 'em.
I heard Microsoft is using it too.
Though our sights are specifically on the staging arena.
That'd free up your Compute Instance to do all the prod work.
@SomeKittens Seriously, besides js what other things does everyone there use? Node and angular i'm assuming too
@Whathaveyoutried Node and Angular are JS
but they are products
00:42
But Angular/Browserify is our main frontend stack, tests are Karma/Mocha
That's what I've been trying to explain, I'm not familiar with them - for VU I really only ever needed jQuery and BS
Backend is NodeJS/express/TJ Magic/MongoDB/Redis/Docker
We stay clear of AngularJS. We've gone completely framework-less and just created a very clearly defined architecture which defines where code belongs.
@jmort253 If you're interested, I can bring you into the private Alpha - all we ask in return is your complaints.
So far it's working well.
00:43
Also, maybe cash. I'm not sure how our pricing scheme works.
@SomeKittens Is there more information on this that I could read? I'd hate to have you add me to something that might not be what we're looking for.
Last I heard, we were freemium?
We like freemium.
@jmort253 This is not public info except for the fact that I'm a blabbermouth.
But we've also been known to pay for support if it means we get to stay focused on our product development.
00:45
Oregon?
@SomeKittens ok... I personally have not worked on anything Docker-related. But one of my colleagues is working on getting us setup on Managed VM's via Docker.
Would it be easy to add others from our organization to the Alpha?
It might not be me specifically evaluating it.
Yeah - GitHub login
Yeh, I'm in Oregon.
We'll just give everyone a unique password
Anyone from your org in SF?
Nope, we're split between Oregon, Texas, Idaho, and Chennai, India.
00:47
Darn - we'd be willing to send one of our engineers over to help you set everything up
but OR is a bit far
Yeh, for sure.
How specifically does this help with dev vs production?
Sounds like it self-contains each environment, but on the same server?
You're running both on the same box?
@jmort253 Thanks to Docker, they're discrete servers (ish).
There's a semantic difference, but not a technical one.
Yeh... both on the same box....
I think that's part of the confusion.
We should be just simply using different servers.
someone is going to accidentally break something by doing a killall node or something like that.......
both prod and dev lol... same server....
Node.js just seems so lightweight that it almost feels like you could get away with running 2 node apps on the same server....
but the risk doesn't seem to justify the savings.....
@jmort253 Yeah, that's just asking for trouble.
"Don't walk over dollars to save pennies" is a big saying in our organization....
00:52
Which one is that?
ok.... thanks for the sanity check... I think I just needed one person to tell me that's crazy. :)
Oh, I don't know who said it, and there's several variations of it... our boss says that whenever we talk about saving a few bucks by using less hardware, or something similar that actually makes everyone's life harder.
I mean, what organization?
We're called FULL Creative.
But we do a bunch of different stuff.
AnswerConnect.com is perhaps what we're most known for.
You work in SF?
00:55
Yep
How is that? You probably get exposed to a lot of conferences?
We were just looking today for some stuff in Portland....
there's some stuff here... we just keep missing it...
@jmort253 It's pretty awesome. Haven't gone to a conference yet
My claim to fame is going to Google IO in 2011.... and that's the only one I've ever gone to.... it was pretty cool.
Nice
My cousin goes every year and I get some of the swag
What questions do you have about Runnable (our staging product)?
@SomeKittens What is the advantage over me simply booting up another server, creating a branch called "development" and then using push to deploy or something similar to simply move dev changes to production?
01:07
@jmort253 Runnable does exactly that, but simpler, cheaper, and with less overhead
You'll create a box via docker, we connect that to your repo on GitHub
You get a URL and a terminal direct into the box
We also have a file editor
You can also spin up ten of 'em if you'd like
Also, updating is one click away
This is all within one system - no need to switch between three different tabs and a terminal
The biggest problem I think we have is debugging stuff @SomeKittens
I picture something where, when I'm pulled away from development to go debug something, I can quickly and easily see what is dev, what is production, what is staging, etc....
In short, I recognize that I am a fallible human being who is capable of making mistakes, and I try to set up my dev environment to minimize the chance of making mistakes.
@jmort253 It's very easy to spin up a server at any commit/branch
without interrupting anything else.
I taught our engineers, for instance, to never type "halt" on the terminal of their virtual machines, as it's easy to accidentally do that on the production server.
Instead, we use the menus in the VM software to quit/power down.
With all these files on our compute instance, it's confusing.... that's the problem I hope to solve.
So how do I boot up a server?
and how do I determine which one I'm on? I assume I still SSH into the instance?
Nope, terminal is built into the web interface
It's built off the same tech we used to build runnable.com
oh interesting.
01:16
@SomeKittens like DO ?
@Whathaveyoutried Er, sorta. We're not a hosting company and have no intention of being one.
nah i meant the terminal
@SomeKittens What's the difference between Runnable and the Alpha product?
@jmort253 Alpha is built around devs easily setting up staging servers and Runnable.com is built around shareable code demos.
@Whathaveyoutried Never tried it.
ok gotcha.
Sounds kinda like this: bitnami.com/cloud
01:20
Yeah, sorta.
But that's another hosting company.
I thought they were an abstraction on top of EC2? Kinda like Heroku (which I suspect is also built on Amazon's infrastructure.)
@SomeKittens I may be interested in checking out what you have.....
@jmort253 BitNami, Heroku and Runnable are all on AWS
Email me at randall [at] runnable [dot com]
but I have to clean up some stuff first.... the way we've engineered our Socket.IO server is a bit confusing.... even with a development/staging management tool, we'd first need to "get organized™"
@SomeKittens Thanks... last question, do you see this as working with Google's Managed VM platform?
In the long run, that's definitely where we're heading.
@jmort253 If Google supports Docker, yes
we are believers that cloud services allow us to focus on the product and the user, and leave the infrastructure details to PaaS providers.
01:24
Then you'll love us.
Not that we don't enjoy running and tinkering with servers... just... we've learned we move faster when we let the experts handle those things for us.
Awesome.... thanks for your help!
@jmort253 Oh, yeah, totally. I played around with the (really) full stack in college, assembling the server myself, etc, etc.
Fun, but inefficient.
02:03
@SomeKittens get the right yet?
*Rift
 
1 hour later…
03:14
@Loktar Wife has it, haven't gotten home yet
nice
man Ebay is going to give me a dang hear attack
trying to bid on something that has < 1 min left
and it freezes
im like wttffffff
bleh just won one cost $84
game is rare as hell though
WHAT
$84 Rift?
no haha
I wish
$84 cd32 game
Ebay is being so messed up tonight
it keeps freezing
shitty platform
LOL I am being such a dick
so like 20 cd32 games are going on right now
all ending within 5 mins of eachother sequentially
this one dude keeps winning
so I am just bidding them up like crazy
ones I dont even care about just to cost this bastard money
03:28
hah
lol damnit just bid $29 thinking he was at 30 and accidently won
oh well
nicely done.
user2620028
03:43
lolol
user2620028
maybe he was just bidding you up and accidentally won like 20 times in a row :P
03:55
@HatterisMad haha
nah now there is him and some other guy going at it
one game just hit $103
I got the ones I really wanted
but still watching a few
game collecting right now is such a pita
its so fucking trendy lol
like 8 years ago I could get atari games, ect for so much cheaper
 
2 hours later…
05:58
morning
Anyone knows why this edit would be rejected? stackoverflow.com/review/suggested-edits/6052788
OP didn't know how to indent code due to which his code was hidden. I corrected that, what's wrong in it?
Well, I can never play normal games again
 
1 hour later…
07:11
@Mosho hey are you coming today?
07:22
> In other words, in node, there is no $_GET
damn
@AwalGarg Eh? You can easily get the query data in Node
@SecondRikudo how? and post?
@AwalGarg It was rejected become someone else edited it before yours was accepted.
199
Q: How to get GET (query string) variables in Node.js?

XMenCan we get the variables in query string in Node.js just like we get in $_GET in PHP? I know that in Node.js we can get the URL in request. Is there any method to get query string parameters?

Morning!
@SecondRikudo i have seen that but it is tagged express
07:27
What's the name of this route concept: /users/:user?
@AwalGarg So?
url is not express
@SecondRikudo oh, didn't know that...
@SecondRikudo I saw that it's used in Express, but also in GitHub API examples etc. How is this called?
@IonicăBizău route parameters
route parameters, routing notation, etc
07:32
Thanks! Is there a simple js parser function for that?
(without using express or so)
@IonicăBizău yes, there are plenty of packages that do that or you can write a simple regex.
@BenjaminGruenbaum I need that simple regex. :-)
muhahahahaha! first node.js dynamic page!!!! wohoo!!!
(as in, working for the first time) :D
Where can I find all analogies from php to node.js? Like using session variables, cookies, etc?
07:41
Forget PHP
@SecondRikudo :D all credits to you
Learn the connection between the HTTP layer and the Node.js API
@JanDvorak you mean..... learn it all again?
Forget PHP. Remember HTTP.
HTTP is the same. How Node presents it to you isn't.
API based on global variables is, to put it mildly, an abomination
@JanDvorak I understood http recently from http sections in devdocs and eloquentjs... so I just need to learn the node api
kk
07:44
Hey guys, can anyone tell me what kind of data this is? Apparently it's not clean JSON?
... and that's documented
@JanDvorak ok, off to google tour
@BenjaminLindqvist looks like a JSONP response
I can't get it to process using the python json module
@Benjamin for some reason, it looks familiar to me
07:46
@AwalGarg I have a question on that, although it's old and I asked for a lock so I could edit the answer and didn't yet.
@BenjaminLindqvist the (stupid) idea is that you create a global variable globals with a jsonpCallback function inside, that handles the response, and then insert this as a script into your page
If anyone feels like editing it that'd be awesome
@BenjaminLindqvist I'd strip until the first comma and since the last closing parenthesis. The rest looks like JSON.
lol within 10 minutes of meddling, I find node easier and better than its equivalent php code :D
@JanDvorak Ahaaaa, thanks a bunch!
07:49
@BenjaminGruenbaum its a bit rough, still helpful
thanks :)
...hmm, maybe not easier but not even that difficult has I had previously anticipated.
php is easier than node.
No doubt there, the mental model is simpler, the framework does a lot more for you and the ecosystem is easier to work with.
Resources get disposed by the OS when the process ends, the request/response cycle is immutable and all the libraries are baked in so code is more uniform. Deployment is trivial and cheap.
Node is better for some use cases, but there are plenty of cases I'd choose an alternative.
Would be a neat idea to make a donation button that, if no user clicks on within a certain amount of time (for any user), begins to show cobwebs
And clicking on it removes the cobwebs (to provide positive reinforcement for clicking)
08:32
@Neil People would just think it's spooky halloween decorations.
@Kippie maybe around this period
The rest of the year they wouldn't realize why it's there and what it does. It's not very intuitive
Heyheyhey
@Neil I think people would probably deem that to be facetious in nature, rather than positive reinforcement.
If I donated and saw that some of the cobwebs disappeared, I'd think wow that's rude
08:48
@Sippy Well I would agree if it were say, charity to starving children in africa
If it is freeware, meh
You at least have the satisfaction of knowing that you were the one that kept it going
If you're gonna do that, just ask people to donate if they can.
Make it honorware or something
Gotta be upfront and honest when it comes to money :D
or you could try to scam people for money.
That also works
Pretend to be a nigerian prince distributing freeware yea?
"If you just provide your bank account details, I can transfer the moneys that you are owed as part of participating in our trials!"

« first day (1468 days earlier)      last day (3699 days later) »