« first day (1815 days earlier)      last day (3133 days later) » 

6:06 PM
florida is calling me
is it this Florida Man I've been hearing about?
 
6:16 PM
@copy :(
 
crl
How long did it take you for the slide one?
 
On a rainy day, much faster.
@SterlingArcher ^
 
http://www.commitstrip.com/en/2015/10/05/internet-of-things-sysadminhome-the-job-of-the-future/
CommitStrip - Blog relating the daily life of web agencies developers
Internet of Things: Sysadmin@Home, the job of the future!
CommitStrip
1444069151
 
10/10 was expecting fish tank shatter
!!xkcd sysadmin
 
6:21 PM
my fav sysadmin comic
 
Sysadmins dont kill.... they pkill
 
Internet of Things is going to make holidays worse for tech people too. No longer will it just be "hey can you look at why my computer is slow"; but also "hey, can you see why my light bulbs aren't syncing with twitter properly"?
 
If that's the least headache it'll cause I'll be pretty relieved
I don't want to have to see my fucking fridge on facebook
 
Remember the fridge botnet?
wasn't that great?
 
There'll be more of that, how do you even update router firmware in a fridge?
Or a lightbulb
And seeing hackers take over cars is just awesome
 
6:29 PM
Hello, I decided to stop being lazy a write my first unit tests for my rest API in nodejs I have successfully setup moca+supertest+should and done some very simple tests. But I struggle with how I should go about testing creation of new entities in db e.g. users, comments etc. am I supposed to clean up after me after every test? If so, how? I have access only to api so should I call route which deletes user? What if that isnt working properly?? Help Im clearly lost :(
 
@Hnus Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Hnus To do true unit tests, your database calls should all be mocked out.
 
@Zirak Is that so she shouldn't see the food..?
 
6:33 PM
@Hnus If you want to do testing with a real DB (which has merit but aren't really "unit tests"); you can create a test database separate from your real database, initialize it with some data, and roll it back to its clean state after every test
 
@Retsam That would solve lots of problems Im having. Is there any recommended library for that?
@Retsam Is that considered bad practice for some reason?
 
There's pros and cons. The advantage of unit tests is that they're focused, isolated, easy to debug, etc.
Setting up a test database lets you write tests quite a bit easier, saves you a lot of occasionally tedious mocking, and can actually test more, in the case that a lot of your logic is in the database itself (e.g. triggers, views, etc)
But it can get messy, too; there's dependencies between tests, and since tests are less specific when a test fails you've got to do some debugging to figure out what part actually failed.
 
@Zirak might you be a subscriber of Sargon ?
 
imgur.com/gallery/g0pEua1 dammit that's adorable
!!s/go/au/
 
@SterlingArcher @Zirak might you be a subscriber of Saraun ? (source)
 
6:39 PM
@tereško tries to think of ways it relates to the Akkadian emperor, fails
 
Oh son of a bitch I spelled it wrong
 
@FlorianMargaine he did for like 8 years
 
@Hnus You'll probably want SinonJS for mocking. (There's also Jasmine, but I think that's sort of mutually exclusive with mocha)
 
he just moved out because we are moving to MI
 
@Retsam I have no logic in database but I been thinking about running test on every save of file and then checking if I didnt broke something so I guess mocking my db would be better in that case because it would be significantly faster right?
 
6:40 PM
@Zirak it just was on of the topics in this
 
he got an appartment there because he is... not so clean
so we had to get him out in order to list the house
 
@Retsam Ill check it out, thanks you are being very helpful
 
@tereško ooohhhh, let's see if that's interesting
 
@Hnus Yeah, if you're going to run tests all the time, I'd do true unit tests and actually mock all dependencies out. (Though I wouldn't run my unit tests any more often than every commit; not on each save)
 
6:47 PM
lol
 
mistakenly pasted something in the terminal causing it to execute a command called enable which printed a ton of stuff. got shit scared. read ss64.com/bash/enable.html this. sigh
 
@copy @Zirak hey I got a project idea, tell me if that sounds alright. A mix between puppet and Debian packages: define facts for a machine, a LA puppet/ansible, e.g. "ensure package exists", " ensure file exists with such content", etc, and generate a Debian package for each machine that will apply these facts when installed. It has the advantage of declarative approach, while not having the downsides of puppet like versioning and not being able to delete outdated stuff. Thoughts?
The drawback being that you can't run apt-get in any script run during install
 
@FlorianMargaine I'm not familiar with setup automation tools like puppet/ansible/whatnot; don't they boil down to that idea? "Make sure there's X Y Z installed, run script X and script Y"?
 
@Zirak yeah, they do, but they have some drawbacks (that I listed above)
 
6:55 PM
Sorry, I just don't know enough about it, but it seems so basic and rudimentary to setup automation that it sounds like it exists in some form
 
@SterlingArcher I don't work out my abs. #fuckit
 
Hey guys, I am displaying a view(HTML+Javascript) from a webservice endpoint into a div in the main page.

jQuery('#SubscriptionsV2').html(data);

When I directly hit the endpoint in the browser the view is displayed however when I try to display it in my main page's div it throws a javascript error(One of the anonymous functions is not defined). This anonymous function is present in the webservice response. However, the main page considers it as undefined. Any idea why?
 
@Zirak actually, puppet and the likes don't have "run script X and Y", they only have "facts"
 
@GdnMaximus well I assume 'data' is coming from an ajax request, and contains a <script> tag??
 
Like "package foo is installed", etc
Or "file X has this content"
 
6:58 PM
1 message moved to Trash can
@GdnMaximus Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
I didn't ask to see the code :P
 
Or "iptables has such and such rules"
 
@FlorianMargaine Sounds interesting, but I'm honestly not terribly interested in devops
 
@rl
 
@copy ah, fair enough
 
6:58 PM
@rlemon, Sorry.. Yes you are correct. The data is coming from ajax request and it contains script tag.
 
9
Q: jQuery .load() / .ajax() not executing javascript in returned HTML after appended

JohnI've tried using .load() and $.ajax to get some HTML that needs to be appended to a container, but the Javascript within the returned HTML is not being executed when I append it to an element. Using .load(): $('#new_content').load(url+' #content > *',function() { alert('returned'); }); I'...

 
@Zirak the point being that you don't have to run scripts and the likes, you just declare what your server should look like, and the tool makes sure it looks like it
 
So you're saying that puppet/whichever are good, just not good enough
 
We do have issues with puppet from time to time
 
7:01 PM
@rlemon, often times I press enter key instead of backspace, which is why @rl. Yikes! Thanks for the link, looking at it now.
 
For example, you can't delete a file. Or you'd have to declare the file as not existing... Which is a pain
 
5
Q: Why does ES6 define map.length==0?

jimm101According to MDN: Map.length The value of the length property is 0. What is the use case for this? I understand why Map.size is semantically correct. But surely a Map.length that almost always returns the "wrong" answer is a bad idea, especially if there's an oversight migrating code from ES5....

 
And having "ensure package is not installed" in the code "because legacy" sucks
There's also no versioning. All the servers using a puppet server have to be the same and there's no going back.
 
my pond heater is here!
wooooo!
it is lighter than I expected
 
7:05 PM
That's the most first world sentence I have ever read
 
Oh, oh you poor ignorant soul
That's like.. 3rd world shit for us 'mericans
come bask in the glory of real problems
 
crl
@Cereal well maybe he plans to do a fish farming, which is not just 1st world
 
> average millionaires
 
@SomeKittens Rich people have problem too!
 
7:09 PM
> I cut my thumb and now my phone doesn't recognise my finger print...
 
@SterlingArcher psh, any average pleb can get a phone with a fingerprint scanner these days
 
Anyone here good with Angular... I've been pondering routes in my app and it's giving me ulcers.
 
@DanielAllenLangdon yup.
 
@tereško It was amusing and interesting, but is that the tone his other episodes take? Mostly focused on gender and whatnot, or was there just a fuckery this specific week?
 
I'm a bit green with Angular, and I'm working on an application that uses a REST API to get/post data.
And what I've been wondering is, "Should my ng-route URLs be similar to the REST API urls?"
I did a Google search, but I didn't find anything on this particular subject.
 
7:12 PM
@Zirak it differs from week to week, but the "stupid shit SJWs do" is a regular topic
 
@DanielAllenLangdon in my experience, no. APIs and angular routes are quite separate, so there's no need for an API url to match an outward facing route URL
 
@DanielAllenLangdon No, not really.
 
@SomeKittens LOL
 
not really that big of an advantage, and can cause bugs
 
However, you CAN set up your routing in tune with your API urls so simplify shit, but it's never really that bad or so clever
 
7:15 PM
@SterlingArcher Hangouts tonight? @Zirak will put on a dance for us
 
The reason this question came up is that my co-worker created a new API endpoint that expects information in the URL that isn't readily available in my Angular controller, so I was wondering if maybe I should put that same information in my Angular route URLs to match.
 
crl
@DanielAllenLangdon angular's route are routes for your views, a view can use none or multiple API calls
 
Possibly, I don't see myself going out, but I'm in so much pain I might just pass out
 
@DanielAllenLangdon um, how so?
 
If I'm concious after din din I'll come see @Zirak dance
 
7:16 PM
@SterlingArcher grab a handle and fucking self medicate :D
 
lol I do have a handle of Grey Goose my buddy gave me for my birthday.. havent even cracked it yet
 
@rlemon You're saying that now after I had all last week off, and have to get back to work early tomorrow?
 
Well, suppose that I am working on a job application web site. There is an API that follows the hierarchy JobApplicant/Position/ReferenceDocument
 
Been trucking through fireball
 
@Zirak yes
I've been drinking mead
lots of mead
 
7:17 PM
I would have thought that simply knowing the Position should be enough for the API, but the endpoint is written so that JobApplicant ID AND Position ID are both required.
It seems unnecessary to me, but my co-worker thinks it will be good to do that because it follows the REST convention.
 
@DanielAllenLangdon use dynamic parameters
 
@DanielAllenLangdon When convention gets in the way of smart code, it should go.
 
That is my concern, exactly, @SomeKittens
 
but you can set up something that mimics the API endpoint
/applicants/:applicantId/positions/:positionId/:referenceDocId ?
 
When you say dynamic parameters, are you referring to the parameters that appear in the URL after the #hash?
 
7:19 PM
@DanielAllenLangdon It does not
Requiring two UIDs to access a single item is against REST.
(i.e. needing a CategoryID and an ItemID to access an Item, even though ItemID is globally unique)
 
so "/applicants/:applicantId/positions/:positionId/:referenceDocId " is not RESTful?
 
That's strictly against REST
@DanielAllenLangdon Correct
You have 3 unique IDs here
 
ugh. a handful of system boards decided to revert their data/time :/ they now read dec 1999... they should sync with ntpdate on boot :/
 
Unless you tell me that referenceDocId is not unique across your application.
 
Yeah, I'm afraid that we might make a mess out of this as the app grows; it's in early development
 
7:21 PM
fun times..
 
referenceDocId should be absolutely unique, @Mada
 
@DanielAllenLangdon Can you calculate positionId and applicantId from it?
 
Yes...
I would have to rewrite some of my endpoints to make them available in the Angular code, so that is my concern. Otherwise, I would have just written my code to hit the endpoint as my co-worker suggested.
 
Then they MUST NOT be as part of a resource ID.
If you want to uphold REST.
 
7:23 PM
lol omg
 
Pika-CHUUU!
 
@SterlingArcher TPP ELI5
 
That's on par with the Lion King gif where the monkey throws simba off the cliff xD
 
My co-worker outranks me, so I may have to do some digging to find where the REST specification prohibits this.
 
That asshole Aladin.
 
7:24 PM
There's not a "REST specification", they're more what you call guidelines than actual rules.
 
LOL DAT MONKEY
 
@Retsam Of course
But one of the key principles of REST is that you divide your stuff into resources, and each has a single, never-changing, global identifier
 
My last message was re:
2 mins ago, by Daniel Allen Langdon
My co-worker outranks me, so I may have to do some digging to find where the REST specification prohibits this.
 
I said something like this to my co-worker earlier (from my own speculation, of course), and he said that he believes that we should think of the Reference Doc as being a sub-resource of the Position resource, or something like that.
 
7:27 PM
> The TPP will offer a method by which companies can attack laws that affect them, suing governments through a tribunal for such offenses as trying to protect youth from cigarette marketing images, trying to protect the environment from dangerous industrial contaminants, or even refusing to pass laws removing or suppressing regulations where beneficial to corporate activity. These are all issues that already happen under various trade deals.
 
@DanielAllenLangdon That's fine, if the reference doc has no global ID of its own
 
Are you fucking serious
 
If it has an ID that's relative to the Position source, he would be correct.
 
The reference doc, the position, and the application are all resources with global IDs
 
@DanielAllenLangdon Think about it like I said
If you have a physical item with a unique ID number
 
7:28 PM
@SterlingArcher no, but I AM FUCKING SORRY!
 
I would prefer to do it the way you suggest; my concern is how to convince my co-worker to go along with this.
 
If a customer comes to you and asks you for item with ID 12345, would you tell them that they need the category ID for that item as well?
 
@SterlingArcher how did you find out about me and Serious?
 
@DanielAllenLangdon Compare the problem to primary keys in a table
 
@MadaraUchiha, I think that the answer to your question should be "No", but I have to convince someone else.
 
7:29 PM
does he or she have any family members you could kidnap?
 
If you have a single primary key column, and you have the primary key for the item you want, you don't query by anything else, it's just not worth it.
 
Hey guys -- I have a Git SVN question. What does it mean if a branch says it's "X commits ahead, Y commits behind" master?
X ahead I understand, but how can it be ahead and behind?
 
@Prefix Probably ahead of origin/master, behind master
 
@Prefix, it means that you have made X commits to your repo that are not in the upstream repo, but the upstream repo has Y commits that you do not have.
 
i.e. ahead of the remote's master branch, but behind your local one
 
7:30 PM
@Prefix It was branched in the past
 
Or that ^
 
@Prefix, that's how you can be simutaneously "ahead" and "behind".
 
@DanielAllenLangdon One sec, i'll draw a diagram
 
You probably need to do either a merge or a rebase, @Prefix
 
hm. Well this is a branch that was branched off of master very recently, and I've only pushed updates to this one and not master
so I had figured it'd just be "X commits ahead of master"
 
7:31 PM
You branch and make 2 changes to the branch. Now you are 2 commits ahead. Then you (or someone else) commits to master so you are also 1 commit behind.
 
@Prefix Perhaps someone pushed commits to master during the time you didn't update
 
@Luggage is right.
 
Master   A -- B -- C ---- F -- G -- H
                    \
Patch                D -- E
 
/starred.
 
oh interesting, I dont think anyone pushed to master.. They better not have ;)
 
7:32 PM
If you're on the Patch branch, then you have two commits not on master (2 ahead), and three commits not on your branch (3 behind)
 
gitk --all to see
 
And the unambiguous correct solution here being rebase -i Patch master . (#teamrebase #mergeisforchumps)
 
@Retsam It's easier to undo a merge
 
I think I need to rebase but I have NO idea what I'm doing there, never rebased before
always have just merged
 
what you should really do is git reset --hard FETCH_HEAD
 
But...that's not a necessarily bad state to be in
It's perfectly legit to have a branch both behind and ahead
 
I prefer jquerySVN
 
not only legit, but normal. You are using git correctly :)
 
@MadaraUchiha With reflog it's easy to undo a rebase.
 
@Retsam call me evil, but I merge, not rebase.
I mean I occasionally rebase for various reasons, but I usually just merge my feature branch to master.
 
7:39 PM
I think the issue occurred after I had to merge my pre_prod branch into master. My prod & master branches are equal, pre_prod is 12 ahead/8 behind. but when I look at the git log of the two branches the only difference I see are the 12 newer commits in pre_prod, I don't see anything on master/prod that isn't on pre_prod :\
 
git log --graph --oneline --decorate --all
 
@MadaraUchiha I use both merge and rebase regularly
They both have their own use case
 
@FlorianMargaine I use rebase to rearrange work locally
But merge when I do stuff with remotes
 
Do you merge when you pull?
 
Mostly because other people, not me.
@FlorianMargaine Yeah
 
7:42 PM
That sucks
You should rebase
 
Probably
 
git pull --rebase
 
Yeah, that sounds like something I should do
 
Is there a way to get git pull --rebase to do an interactive rebase?
 
7:43 PM
@Retsam dunno, never tried it
 
@Retsam git fetch && git rebase -i ....
 
Never needed it tbh
 
@MadaraUchiha Well, yeah, that's what I end up doing; I guess I should alias it.
 
@SomeKittens omg lol
 
I do pretty much every rebase as interactive; it's just a nice sanity check.
 
7:44 PM
i think there is a pull w/ rebase or an option you can set to do that..
without fetch then rebase, i mean
 
For pulls it's just "update cleanly your local environment"
 
LOL purpose
 
let particles = Array(count).fill(Particle).map(Object.create);
is this 'clean' ??
 
define clean
 
readable, and the es6-y way of things
 
I'd use .fill(() => Object.create(Particle))
 
Array(count) won't do you much good
 
Was looking to see if Chris Volpi was gonna make a new band, stumbled on this
 
use Array.from({length: count})
 
@Mosho you sure?
 
7:50 PM
@rlemon eh, the filling of Particle and then mapping over object.create is funky
 
@rlemon did you try it?
 
@Mosho won't that overwrite the native length?
 
@SomeKittens otherwise they all ref the same object
@Mosho yes
 
user2620028
whats up guys
 
!!> Array.from({length: 4}).map(function(x, i){return 1})
 
7:50 PM
@Mosho ["undefined","undefined","undefined","undefined"]
@Mosho [1,1,1,1]
 
!!> Array(4).fill('llama').map(function(x, i){return 1})
 
@SomeKittens [1,1,1,1]
 
!!> Array(10).fill({}).map(o=>123)
 
@rlemon [123,123,123,123,123,123,123,123,123,123]
 
hmm, haven't tried fill
 
7:51 PM
noob
 
user1596138
What is in this message chat.stackoverflow.com/transcript/message/26108448#26108448 I had a @mention but it's deleted lol
 
@LanaKane @rlemon wants to have sex with you
 
@rlemon meh
 
Working on the hulu-based theme for my video player now
 
user1596138
@SterlingArcher what kinda car are you getting
 
7:55 PM
Audi S4
 
user1596138
And where doeth thou liveth
 
Northern VA
 
@rlemon Array.from({length: count}, () => Object.create(Particle))
 
Fairfax County even more specific
 
you can do that :X
 
7:56 PM
hackier
 
user1596138
@SterlingArcher AmericanAutoShipping say like $400-800
 
Yeah my average quote is for $750
 
user1596138
Buy one in Omaha I will drive it to VA and you fly me back
 
My only crutch is I don't want to pay full shipping on a car that they refuse to budge on price wise
If they pay half the shipping, they have a deal
 
@rlemon it may look nicer, but I'm not a huge fan of putting the class into the array than mapping to Object.create
that feels off, assuming we're full nitpicking
 
user1596138
7:58 PM
Yeah dude get the dealer to do it for you
 
Like the price itself is good, but if I pay sticker AND shipping, I don't feel like I've won
 
user1596138
If they want sticker you get free shipping lol.
 
user1596138
That's crazy
 
They claim to be a "no negotiation dealership" because they don't make commission on sales
I call bull, but he refused to budge on price
 
Array.from(Array(count), () => Object.create(Particle))
@Mosho seems nicer imo
 

« first day (1815 days earlier)      last day (3133 days later) »