« first day (1633 days earlier)      last day (3329 days later) » 

6:00 PM
if not html4
 
@rlemon i want ants :D
 
just leave food out.
 
@Luggage by "can't use them" I mean validators bitch. they probably still worked
 
ah
 
6:01 PM
IE6 is irrelevant. I just mean the practice of using custom tags is bad practice because there are other things to denote semantics besides a tag name that should be considered first.
 
Meh, I think they are fine.
 
Hmm, having trouble using tail and forever. Basically, here is what I am running

tail -f -c 256 -n 1 ../qconsole53333.log | forever mod.js
 
streaming text into stdin of mod.js?
 
@Luggage Indeed, from ../qconsole53333.log
 
i think that'll go to forever
 
6:03 PM
exec('forever mod.js && tail .....")
 
I'm not sure you can use forever like that. 1. Forever probably doesn't let the stream through to the script.
 
which is why I used &&
 
2. If it did, it's pick up at some random point when it restarted
 
nothing is streaming via forever
forever also runs as a background thread by default iirc.
@Zirak is back!
@Zirak everyone!
YAY @Zirak!
 
I think he needs the stream to go into mod.js, which that wont' accomplish
 
6:06 PM
hmm
 
Keep your panties dry. Indeed, it is I, Zirak.
 
Too late.
 
@Luggage no I think he just wants to tail the log file.
 
@JordanRichards You can use child_process to spawn the tail, read from its output stream.
 
@Zirak Ooh
 
6:06 PM
@rlemon You probably want forever start mod.js, right?
 
@OliverSalzburg probably.
 
@Zirak meesed uuuuu
 
hey.. are these alright interview questions you guys think? Like done at the interview
I did a css one but I think its a bit much so I think I'm just going to borrow some stuff from css diner.
bonus points for es6 on the first one for sure, included a template string to hopefully give that hint since we use babel for all new projects now its a legit question/answer
kind of wanted to have a question that showed their understanding of bind/this context as well, but can't think of any
 
Did you guys know the ice trade prevented the sales of refrigerators for a while?
 
6:11 PM
@taco wtf no?
 
yeah, two rich dudes in Boston started the ice trade
they would cut up blocks of ice from their lake
 
@SomeKittens That video drove me crazy. He explains something about the DevTools and all you see in the recording is him, not the DevTools. I wonder if there even was screen cap at all
 
Alot of people were involved in refrigeration, but John Gorrie is considered the father of it. They slandered the guy so nobody would support his refrigerator
they got newspapers in the north to write shit about him
I don't know what I would do without a cold drink
those two guys basically convinced people they needed ice, and shipped it to places like the caribbean
 
I only use virgin glacier ice or re-frozen polar bear tears.
 
@Loktar jsfiddle.net/rlemon/ppkjagoy/5 jsfiddle.net/rlemon/Lc04xh57/3 -- together took around 6 minutes- how'd I do?
 
6:16 PM
I make my own craft ice
 
Artisanal re-frozen polar bear tears.
 
@rlemon good, although you only logged out the data on the 2nd one :P
but yeah the second one is exactly what I will be looking for
 
I would tell you how to make craft ice, but I'd rather not have amateurs ruin something good
 
@Loktar first one logs on click
> when the user clicks on the list element it should log the number of the item clicked.
 
The first is good too
@rlemon yeah that one is correct
 
6:17 PM
ahhh shit
formatting fucked the first one
 
but if you used let on the first you could have saved yourself a ton of time :p
 
can use .bind on the first one: jsfiddle.net/q54w33h3
 
@Loktar I'm not fully es6 mindset yet
:(
 
ohh, let, yea, not using that, yet
 
@Luggage IIFE is faster IIRC
 
6:18 PM
@Luggage yup that too
Those are the 3 answers I have for it
bind/iife/let
nice, so those are alright questions to ask you think?
 
and if they make 10 separate function handlers? :)
 
SO I GOT THE JOB?!
 
not unfair or anything
@rlemon HIRED BRO
 
@rlemon why would it be faster?
 
@Loktar too easy if you ask me
 
6:19 PM
@rlemon bleh yeah I was worried about that
 
the second one involves more code, I like it.
 
@ssube .bind is hella slow (compared to anon functions or additional globals)
 
I can't really think of any harder ones though that border unfair.
 
the initial .bind() or every time you call?
 
> My company uses CodePen when hiring people. We generally start with:
"Make a blue square that when clicked or hovered slides across the screen and the color fades to red."
This surprisingly has given a lot of people trouble.
 
6:20 PM
@Luggage not sure, I just noticed how slow it is doing canvas demos
 
hah that one sounds awesome
I need at least one good css one.. maybe Ill do that
 
Can you use libraries?
 
@Luggage yea
 
@Loktar Just like FizzBuzz
 
import jQuery, import jQuery-ui, import Velocity, import GSAP, import Bootstrap....
OKAY
 
6:21 PM
lol
 
time to make this box move!
 
import Bower
 
@SomeKittens you guys do fizzbuzz?
 
$.slide()
 
I thought about doing that, but assume its out there everywhere now
also I found out the salary expectations, 90-100k
 
6:22 PM
I ran into FizzBuzz on codewars.com
 
just a heads up
last candidate expected that and we are interviewing them so it can't be too far out there for the company I guess.
 
@Loktar I don't myself, but I don't do the early screening
 
crl
@Loktar is it ok to do console.log(``clicked ${this.textContent.substring(11)}``);
 
TIL that quertz keyboards are used somewhere in the world
 
@Luggage is codewars worth using?
 
6:26 PM
haha if it works sure
 
@Stallion 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.
 
@Loktar sorta kinda, why?
 
@Stallion Meh. I've only done one. It's just a bunch of 'challenges', and then after you complete it you can see other peoples solutions and discuss
 
@Stallion What's your goal?
 
@BenjaminGruenbaum we are interviewing for a more experienced front end dev
 
6:26 PM
@Loktar it's super easy to get similar-to-fizzbuzz questions.
 
j/w if thats even a valid question at an interview anymore (it seems pretty well known now).. I suppose it would be a good weed out
 
CodeWars seems to be lots of basic challenges (at the FizzBuzz level)
 
@SomeKittens to become a better programmer
 
@Loktar If you're face-to-face, it's too late.
 
It's too basic IMO, give harder 30 minutes of HW
 
6:27 PM
^
 
@Luggage ok thanks
 
@SomeKittens yeah :/
 
that is what I feel. too easy
 
Before the on-site interview
 
@Stallion You'll have to decide if doing the challenges helps you learn new things or not, doesn't hurt to try.
 
6:27 PM
@Stallion Silly challenges won't help with that. Build something (say, a blog engine)
2
 
Challenges get harder as you level up
 
yeah we didn't for this candidate.. not sure why honestly
a pre interview I mean
crap.. well Ill think of something harder I suppose. Ill check out codewars I guess, I did some of those problems they were pretty damn fun
 
@rlemon When I use sublime, I tend to go with asphalt
 
thanks btw
 
crl
@Loktar I'd use hu (svg) for that
 
6:28 PM
@Loktar Like, "using any framework/library you want, make a program that reads the latest tweets from a given usernames separated with a comma (in a search box) and prints all the tweets that contain the word "bling". Should take 30 minutes maybe less, tests they get shit done, can work with a backend, can do basic frontend, and end to end.
 
@Zirak not bad
 
@SomeKittens Good point
 
@rlemon Don't wanna.
 
@Zirak got a nice github theme?
I use this: <wait for it..>
 
@BenjaminGruenbaum ugh, just messing with twitter takes forever
 
6:29 PM
@BenjaminGruenbaum I like that.
 
@rlemon Unfortunately no. All themes I saw messed up the UI too badly.
 
@Zirak even scraping?
 
@Zirak that's part of what you'll be testing, "messing with things" - it's a great way to filter out people, people who give up when they have to "mess with things" are usually terrible developers.
 
yeah twitter would be the only downside, learning the api or whatever, but in the past when I used it it wasn't too bad
 
6:30 PM
this one only has issues on gists.
@Neal you make no sense
 
@BenjaminGruenbaum yeah I really like that. I'll add that.
 
@rlemon o rly?
 
> Neal, the cubes from Dr. Who are here!
Neal: don't wanna
 
@Loktar it's not the downside, it's the upside - test them with a shitty API not with a good one, make things break, make descriptions that aren't 100% perfect, have them probe themselves and ask you when they're stuck.
 
yea, you make no sense
 
yeah excellent points
 
@rlemon haha. I clicked on the link, and I couldn't buy it :-( hence the dont wanna
 
:sigh:
 
We do stuff like FizzBuzz for warmup questions, "like" FizzBuzz not fizbuzz itself, as in "A recent study fonud out that poeple can read English even when words have all their middle letters shuffled - let's test that. given a sentence shuffle all the words in it randomly. Example input 'roses are red', possible example output 'rsoes are red' - remember not to shuffle the first and last letter."
 
crl
@rlemon why that map in the second? instead of directly var res = data.movies.filter(function(movie) {return movie.runtime > 100 && ...})
 
6:33 PM
BTW, room exercise - everyone do that now. A recent study fonud out that poeple can read English even when words have all their middle letters shuffled - let's test that. given a sentence shuffle all the words in it randomly. Example input 'roses are red', possible example output 'rsoes are red' - remember not to shuffle the first and last letter.
2
 
user3949359
var o = { a:0 };

Object.defineProperty(o, "b", { set: function (x) { this.a = x / 2; } });

o.b = 10; // Runs the setter, which assigns 10 / 2 (5) to the 'a' property
console.log(o.a) // 5
 
@crl cuz I leik map okA ??
 
crl
@rlemon ok :)
 
@BenjaminGruenbaum I already did my jumping jacks today
 
user3949359
In the above example from MDN, why doesn't o.b=10 create the b key?
 
6:35 PM
@rlemon you did? I was lazy all day :D
 
@BenjaminGruenbaum Boring
 
@Zirak then do it, shouldn't take you over a minute now should it
 
@BenjaminGruenbaum typing is exercise
 
@nosille because you defined a setter.
 
user3949359
@BenjaminGruenbaum Why isn;t the property created on top of triggering the setter?
 
6:36 PM
@nosille because it's already defined
you're just setting it
 
@nosille because that's what .defineProperty does - it defines a property - it's already defined.
 
@nosille the property already is defined. It's an accessor property, rather than a data property, though
 
@nosille A property is either a value, or a getter/setter pair
 
user3949359
@BenjaminGruenbaum when i try o.b it;s undefined
 
You didn't define a getter
 
6:37 PM
because it doesn't have a getter
you have a write-only property
 
@nosille ES5 4.3.26: Depending upon the form of the property the value may be represented either directly as a data value (a primitive value, an object, or a function object) or indirectly by a pair of accessor functions.
You have defined the second kind of property, but you expect it to be the first kind when you access it
 
accessor functions are critical to writing useful things that aren't Java
 
String.prototype.fuckit = function() {
    function shuffle(letters) {
        return letters.split('').sort(function() { return Math.random()>.5}).join('');
    }
    return this.split(' ').map(function(word) {
        return word.substr(0,1) + shuffle(word.substr(1,word.length-2)) + word.substr(-1);
    }).join(' ');
}
 
missing semicolon - but nice job :)
 
6:42 PM
@BenjaminGruenbaum But why? There're maybe two ways to do it, none of which are very interesting.
 
@rlemon breaks on single letter words
console.log('have a nice day'.fuckit());
 
@Zirak Yeah, mine isn't very interesting either
let s = "The quick brown fox jumped over the lazy Zirak".replace(/\w(\w{2,})\w/gu, s =>
 s[0] +s.substring(1, s.length - 1).split('').sort(x => Math.random() > 0.5).join('')+ s[s.length-1];
);
 
function (word) { return word.length < 3 ? word : shuffle }
 
good call
to be honest I only tested it on one test
"hello mother fucking world" works like a charm
 
The lack of spacing around the + is just to drive zirak crazy btw
 
6:44 PM
function crap (sentence) {
    return sentence.replace(/\w{3,}/g, function (match) {
        return match[0] + match.slice(1,-1).split('').sort(function () {
            return Math.random() > 0.5;
        }).join('') + match.slice(-1);
    });
}
 
I really need to share this, I find it too hilarious
 
rays are the shit
 
I can't find a jquery plugin to mangle this sentence. Cna I still hav a job?
 
@Luggage can you find an angular directive for it?
 
6:46 PM
@rlemon I can't get my code mod.js to "update." Forever just seems to keep running an "old" version of it. I've done forever restart all, forever stopall, Etc and re-executed it, but, the code will not update.
 
@JordanRichards that is a damn shame
 
Everyone, moment of silence for @JordanRichards's tragedy
 
angrily muffled laughter
 
WELL then!
 
crl
Did you try to reboot?
 
6:48 PM
@crl Not yet, I don't really want to if I don't have to. Is there some sort of "background" forever process that I can restart? I tried forever list, but there's nothing there.
 
@JordanRichards Three obvious pieces of advice: Make sure it's really not running (pgrep or the likes), make sure you edited the correct file, does the correct behaviour happen if you just run it with node?
 
function shuffleDatWord(word) {
    var first = word[0];
    var last = word[word.length-1];
    console.log(first, last);
    for (var i=1; i<word.length-1; i++) {
        //oh crap I don't know how to shuffle shit!
    }
    return shuffledWord;
}

var string = [];
string.push("derp is love derp is life.");
var output = "";
for(var i=0; i<string.length; i++) {
    var newString = string[i].split(" ");
    for (var j=0; j<newString.length; j++) {
        output += shuffleDatWord(newString[j]);
I think Im overthinking this...
 
^ what people who never learned RE do :D
Does it work?
 
ugly and took too long :/ jsfiddle.net/loktar/8gq4mauc/1
 
@SterlingArcher Your code makes no sense
You have an array of one element, over which you iterate
 
user1596138
6:50 PM
function s(w)
{
    w = w.split('');
    var a = w.shift(),
        z = w.pop();
    return z?a + (w.sort(function() { return Math.random() - .5}).join('')) + z:a;
}
 
uuugghh sort
 
I'm just testing with one index, was gonna add more sentence indices for output accuracy
 
duh
lol nice.
 
user1596138
4
A: How to randomize letters in a word

Ryan KinalJavaScript - 118 122 chars Shorter JavaScript - 118 characters with no white space. Uses approximately the same algorithm as the OP, but with less chaining. I tried a lot of recursion, and I tried some iteration, but they all tend to get bogged down in some way or another. function s(w) { w...

 
user1596138
From @RyanKinal
 
6:51 PM
sort T_T
 
@Jhawins Cheater.
 
user1596138
In the developer world I think googling for the answer in seconds is often almost as good if not better than making it yourself ;P
 
user1596138
See: Every help vamp evar lol
 
In "will code html for food", s/code html/search google/
 
Yeah I was trying not to google, and then I realized I have no idea how to shuffle
 
user1596138
6:52 PM
Ohhh shit were you guys doing a challenge..
 
the "keep first and last letter" threw me off
 
@Zirak much nicer:
 
@Jhawins Depends who you're working for and if they care about licensing :|
 
let crap = s => s.replace(/\w{3,}/g, w =>
        w[0] +
        w.slice(1,-1).split('').sort(_ => Math.random() > 0.5).join('') +
        w.slice(-1));
 
@Zirak yep, works fine with just node. Tried pgrep -f mod.js and it returned nothing.
 
user1596138
6:53 PM
I didn't read the transcript I'm sorry
 
@BenjaminGruenbaum Isn't she a beauty.
 
no harm done @Jhawins
 
@Zirak no you were right it's a bad exercise for creativity :D
People did cool stuff with fizzbuzz though
 
user1596138
@GrantWatters Uhh... Not in this context
 
@BenjaminGruenbaum jesus, I'm so lacking in ES6
 
6:54 PM
All I did here was => no other features really
 
user1596138
@BenjaminGruenbaum let
 
@Jhawins Maybe not.. I probably shouldnt come in into the middle of a conversation :)
 
let isn't es6?
 
user1596138
But he could've just used var lmao
 
oh, yeah, let, the let part isn't even important it's a force of habit in ES6 code
 
6:54 PM
What is that underscore doing there?
 
@SterlingArcher it's a throwaway param, doesn't do anything really.
 
user1596138
^ worst answer evar
 
user1596138
I'm curious too
 
throwaway like an undefined parameter just for parameters sake?
 
I could have named it iDontCareAboutYou but _ is a common trick, and _ is shorter than writing ()
 
user1596138
6:55 PM
So you defined it earlier?
 
It's one char less than doing () =>
It's a function argument, _ is a valid identifier in JS
!!> var _ = 5; _
 
@BenjaminGruenbaum "SyntaxError: unterminated string literal"
 
Me gusta
 
@BenjaminGruenbaum 5
 
f# uses _ for throw away params, too
 
6:56 PM
Instead of () => he used _ =>
Since we don't care about the argument, he didn't give it an indicative name.
 
Yeah, if I knew it'd confuse people I'd just do () =>, lesson learned
 
@BenjaminGruenbaum this is why we can't have nice things how we ended up with scala
 
user1596138
So you'd rather define _ earlier on than use 1 more character?
 
he doesn't have to define it, it's an argument
 
There's no "earlier on"
 
6:56 PM
@ssube --- iirc strikethrough, _ is meaningful in Scala and is special though
 
user1596138
There is no future
 
_ means unused
 
function(_) { return "didn't use that param."; }
 
@Zirak it most certainly does not
 
It's commonly seen in languages which don't let you just ignore arguments
 
6:57 PM
How have I not used let before!!!
Omg that's amazing!
 
user1596138
You don't ES6
 
@SterlingArcher Because it's fucking useless!!!
 
Black scoping could have saved me so much
4
err.. block
._.
Not gonna edit because unintended lol
 
Languages with function scoping are always hated for the poor design, like Python
 
user1596138
@BenjaminGruenbaum so wait you have _ defined as an argument is what you were saying
 
6:58 PM
Because you really care about blocks
@Jhawins yes
 
@SterlingArcher obligatory White scoping is much better
 
user1596138
Oh lol ok. Nvm
 
substitute _ => ... to function(_){ return ... }
 
@BenjaminGruenbaum what is => called? Google doesn't like symbols
 
<cough>
 
user1596138
6:59 PM
Got it now
 
@SterlingArcher arrow function
 
fat arrow function?
 
@SterlingArcher (fat) arrow functions
or "lambdas"
 
thank you :)
 
user1596138
@SterlingArcher ever heard of symbol hound?
 
6:59 PM
Damn you ninjas
 
Symbol hound? No
 

« first day (1633 days earlier)      last day (3329 days later) »