« first day (838 days earlier)      last day (4125 days later) » 

7:00 PM
^ ask your new guy this just to troll him
 
thats your lag script right?
 
yea
I got a better one
 
lol hed be like wtf/!
his head would assplode
hes an illustrator.... a good one.. but wtf?
I didnt get a chance to interview him at all.
 
At my last job we got a developer that was a 'javascript expert', he wasn't aware of 'overrated javascript stuff' like closures or callbacks or query selectors other than document.getElementById
 
lol wat?
 
7:01 PM
var a = 'abcdefghijklmnopqrstuvwxyz1234567890.',
    i = 18, j = 0,
    b = [a[i++],a[++i],a[++j],a[--i-1],a[i],a[--i-1],a[++j*(j+j)],a[--i-(j+j)],a[j*j+j]].join(''),
    f = function(x,y) { switch(x){case(1):o=y;break;case(0):l=y;break;} return y; }, o,l,
    c = [a[b](i+j)[0], a[b](i++,i), f(1,a[b](--i-(++j),i-(--j))), f(0,a[b](--i-((j++)+j), (i++)-(--j+j))) ].join(''),
    e = o + l,
    d = c+Array(++j+j).join(e);


alert(d); // what do I alert?
2
this one I wrote by hand
it's not that bad to walk through it
 
that would be fun, but in an interview id be nervous
 
@rlemon If I get that at an interview, I walk
 
so id prob mess up
lol --i-1
 
(i++)-(--j+j)
one of my favs
 
id probably laugh and say "umm this isn't the kind of production code you guys write.. right?"
 
7:03 PM
tl;dr it alerts "trolololololol"
 
lol nice
 
the entire line for b= just write "substring" so I can use it to parse the top string again without the use of [] literal indexes
in c you will see a lot of a[b]
 
Why can't we just pipe that into eval() in a browser, and see what happens?
 
you can
you can also just run it
 
if I knew how to do either, I would...
 
7:05 PM
 
I hate being asked questions that just check if you know the little quirks of the language, but love the questions themselves.
 
CTRL + SHIFT + I
copy and paste it to the console
ENTER
ok so if you ever get that as a interview question: @Loktar respond by writing out by hand.. this.
 
I got asked what this prints like 10 times:
var a = 3;
function(){
   console.log(a);
   var a = 2;
   console.log(a);
}
 
nice.
 
haha
 
7:07 PM
the answer is 'syntax error' btw
 
shit I would of said 2
due to hoisting
 
are variables hoisted?
I thought only fns
 
then I would be wrong :P
 
yeah, variables are hoisted, that is a quirk
(function(){
   console.log(a);
   var a = 2;
   console.log(a);
})();
 
:(
function has no name
 
7:07 PM
this prints "undefined" and then "2"
 
f u trick fucking question
var a = 3;
function foo(){
   console.log(a);
   var a = 2;
   console.log(a);
}
// foo is never called  - I would rage on the troll interviewer
 
good ok I remembered correctly
6
Q: Trying to fully understand JavaScript hoisting

LoktarEdit Looks like it was an issue on my part and my usage of jsfiddle :? Ive been reading a couple of articles on hoisting lately, one is by Nicholas Zakas, and the other is by Ben Cherry. Im trying to follow the examples and just test on my own to make sure I fully grasp it but Im having an issu...

heh I even asked a question on it now that I remember
 
but this is a tricky question, since because the anonymous function doesn't start with ( it is not evaluated as an expression which causes a syntax error
 
and the question was due to jsfiddle :?
 
this is illegal
function(){
}
this is legal
(function(){
})
 
7:09 PM
YaY! I answered it!
@Loktar and our love was born...
 
haha
 
IIFE kicks ass
we all love them
 
damn 2011?
 
I'm pretty sure we all use them in excess
 
we've known eachother that long?
 
7:09 PM
:)
 
Hi everyone, I want to add 1 to each input field id when the button is clicked. how do I this?
 
Hey, I'm looking for a JavaScript tutorial that hopefully you personally wrote. Anyone have a tutorial to share?
 
both test nothing that a developer wouldn't pick up after being given the mandatory coding guidelines first day lecture
 
@Casper lol
didn't you look at my example
 
:P
 
7:10 PM
@Casper wut? Look for each input field in the document, and add 1 to the id property.
But why would you want to do that?
 
@dmanexe only javascript tutorials I wrote are from 2004 and are pretty bad :P I strongly suggest you read 'Javascript the good parts' by douglas crockford, don't agree with everything but it is fairly solid
 
yes of course! but I was forget to ask how I can add 1 to each input id.. @rlemon
 
The id property for most things that Javascript can affect is a string...
 
var buttons = $('.foo');
var new_index = buttons.length;
var new_button = $('<button>');
new_button.prop('id', 'prefix-' + new_index);
someParent.appendChild(new_button); // look a new ID!
 
@Benjamin THank you!
 
7:12 PM
@rlemon How can I add 1 to each id?
 
So, if I understand you right, you want:
<input id="bla"><!-- ... --></input>
to become
<input id="bla1"><!-- ... --></input>
 
@Casper I'd argue that ids should not be used serially, for example giving your divs the id's (div1,div2,div3 ...) is a bad idea
 
Like input-1, input-2
 
If I may ask, why are you doing this?
 
[].forEach.call(document.forms[formName].elements, function(input, i) {
  input.id = 'input-' + i;
});
 
7:13 PM
@BenjaminGruenbaum Ok, but what the reason is is that I want to use unique text inputs for my plguin
 
I've just showed two plausible ways.
 
@rlemon Does the foreach automatically increment the value passed into the inner function's second argument?
 
the user can add an new row by a button and the field would be cloned with javascript.
 
redefine your question or try to show us code.
 
Can I run jQuery selector as $(variable)?
 
7:14 PM
@dnbrv yes
 
@Casper So why not increment the name?
 
forEach(collection, function(item, index))
 
@Casper right, but why would you need the serial ID
 
@rlemon Figured as much. That's nice.
 
@BenjaminGruenbaum In that case, I'm screwing something up. Back to the console I go.
 
7:15 PM
@BenjaminGruenbaum I have already answered him on this a day or two ago
I am guessing he couldn't implement my answer so is back
 
@ShotgunNinja Oke thats also an solution? When i save the post in wordpress they will show only one row, the ones i made are override...
 
@Casper Did you say... Wordpress?
 
@shotgun yes I have create a plugin and use javascript to clone fields.
 
f u js fiddle.
y u no never wanna be up
 
7:16 PM
'cause I think I just heard someone say Wordpress.
fetches the wooden paddle
 
All I can think of
 
It started from the Perry Bible Fellowship comic I linked above.
Then it was adopted by 4chan's Anime board from "a really bad thing, deserving of punishment" to "really bad anime fanboys, deserving of punishment".
It also sounds like a badly-cross-translated Engrish form of "wannabe".
 
@rlemon What is the [] meaning at the begin of the snippet of code
 
Array
[].forEach == Array.prototype.forEach
just shorthand
 
7:20 PM
Which mirrors all attempts of Japanese and Western individuals to regard "weeaboos" in a negative fashion being turned on their head and used as a compliment.
 
[] is identical to new Array() in meaning
 
a la "gaijin" (外人).
 
I think this was the example I gave him
fn is shitty - didn't know if it were to be onpress or in a loo p
this was super fun
"how to clone events with their elements that were created via js"
document.getElementsByTagName('button')[0].setAttribute('onClick', 'foo(event)');
function foo(e) {
    var node = e.target.cloneNode(true);
    document.body.appendChild(node);
}
 
@rlemon I don't like 'onClick' or evaling
 
yea well then you can rebuild your events
I'm hacking the system here boss
 
7:22 PM
lol
 
document.getElementsByTagName('button')[0].setAttribute('onClick', 'function(e){ document.body.appendChild(e.target.cloneNode(true)); }.call(event)');
this might even work.
 
not working on chrome
 
yea same
ohh well
it's not code I would ever use
just was interesting to write
 
I think my code is actually worse :P but
(function nodeClone(){
  buttons = document.getElementsByTagName('button');
  buttons[buttons.length-1].addEventListener('click',function(){
    document.body.appendChild(this.cloneNode(true));
    nodeClone();
  },true);
})();
 
7:37 PM
18
A: How to find event listeners on a DOM node?

Ivan CastellanosIt is possible to list all event listeners in JavaScript: It's not that hard; you just have to hack the prototype's method of the HTML elements (before adding the listeners). function reportIn(e){ var a = this.lastListenerInfo[this.lastListenerInfo.length-1]; console.log(a) } HTMLAncho...

I don' t know how I feel about this
 
I think it's creative, it's classic decorator pattern. I would hardly call it 'hacking' the prototype. Javascript allows this kind of behavior. I'm always scared to death when changing methods of an object that already exists
 
JavaScript allows this kind of behaviour as not a good argument :P
 
lol
 
posted on January 31, 2013

Ross McKegney, CTO of Verold, a Toronto based startup working on brining 3D experiences to the web submitted their browser-based collaborative 3D editor and it looks pretty awesome.  It allows 3D artists to import 3D object files (specifically OBJ, Collada, or FBX files) into their web interface and then collaboratively edit scenes and finally share or embed them. The editor works in real time

 
Javascript allows for some of the most horrific code I have ever seen in my life.
but I love JS so much
 
7:40 PM
oh man I know that feel
 
I once did something really horrible that javascript let me, apparently you can change the way 'call' works
 
seriously.. is there not a sane way to list all of the event listeners for an Element?
 
wow
so crazy thing at work happened...
shot a foam rocket (we always do)
this guy gets hit.. and threatens to punch me in the face
 
new guy was a Neal
 
7:41 PM
I am seething with rage.
who even does that.. at work no less.. and at almost 50 years old?
guy was dead serious too.. my response was "laugh as you lose your job"
"oh you think i will? Really?"
fu guy.
 
He threatened to punch you in the face?
 
@Loktar lean in real close and low so you're looking up his nose, turn you voice real high and squeek - whisper "waddya gonna doooo?" the skip back to your desk and flap your arms a bit while you do it
 
@Zirak yeah..
 
@rlemon Ever had to deal with Perl?
 
the new rule is, no rockets
but.. the threatening is ok I guess
 
7:43 PM
Who the hell threatens to punch someone in the face?
 
his exact words "How would you like it if I come over there and punch you in the fucking face?"
 
Function.prototype.apply = function () { alert("FUCK YOU I WILL NOT APPLY YOUR SHIT FOR YOU"); }
No language should allow that to happen
But I LOVE that JS does
 
@Loktar "well... at first I might be confused - but if you catch me in the right mood I might just get aroused and ask for more"
3
 
@rlemon lol
 
7:44 PM
Awkward begets awkward
 
I wanted to say
"DO YOU EVEN LIFT?!"
 
"I don't think we're quite there yet"
 
0
Q: How to find total amount for all the products for each invoice?

VenkatHi this is example of my page http://jsbin.com/umumuf/1/edit In this i write code for these below two operations. When there is any change is quantity of a product instantly amount will change based on quantity. Like this if there is any change in amount for one product there is a correspondin...

 
but alas. Im in a "professional" environment
 
Quit the government yet?
 
7:44 PM
no :?, this might make it happen sooner
the guy is a former drill instructor so i imagine thats why he thinks he can talk to people like that.
 
@Loktar You hit him with a foam rocket? Jesus, I'd shit myself.
 
@Loktar tomorrow before he gets in set up the foam rockets around his desk like there was an epic battle of the ages - then take your rocket launcher and position it pointing right at his chair.... don't fire any ofc.. but just be a dick about it while still abiding by their rules.
 
@rlemon I wish lol they took them all
 
OK
 
funny thing is I rarely ever shoot them..
 
7:45 PM
 
get these and drive behind him for a few miles.
 
I happeneed to get shot and fired back lol
 
@Loktar Do you have any kind of professional self-defense experience?
 
@OctavianDamiean he was in the Military
 
The customer support team at work moved to the landing above my teams space, so now we can't have extreme nerf battles. We just thrown the little bullets at each other :(
 
7:46 PM
Oh, I see.
 
@Loktar
1) get this: http://www.thinkgeek.com/product/8a0f/
2) Install at work
3) Shoot him when logged through VPN
5) capture facial expression through webcam
6)?
7)Profit
 
I know Kung Fu
 
@OctavianDamiean not really :? I was in the af
... my messages keep timing out :?
 
What's a former drill seargent doing working for a software company?
 
7:47 PM
@Loktar As much as the guy might suck, don't go for the fight then.
 
I infact have the Annoy-a-tron.. doesn't really get too loud
 
@BenjaminGruenbaum I have one of those! But we cant bring in any electronic devices
 
so I got the sonic granade thinking it would be better
nope
 
@OctavianDamiean nah I wont, id rather provoke and have him lose his job than both of us.
 
scares the shit out of my cats though.
 
7:48 PM
@Loktar Yup, that's the best defense in that case.
 
@Loktar did anyone see this happening? like the actual threat?
 
@ShotgunNinja its not a software dev shop, its a training shop with 30 people and 2 devs.
 
@rlemon Really?
 
@rlemon yeah.. but they wrote it off because he said if
 
@Loktar oh I made this the other day
 
7:49 PM
@Loktar get your wife to punch you in the eye tonight - then tomorrow tell the office he met you in the parking lot and this is what happened.
 
they just said, ok guys no more rockets then
 
That sucks
 
You should BURN HIM
 
@SimonSarris LOL people say that in Chivalry :P
 
7:49 PM
@Zirak downvote
 
That's a bit much, holy shet
 
@Shane WE'LL BURN YOU TOO
 
this thing kinda bounced off his back I take?
oh, sorry...
 
NOT YOU, @Shane, I MEANT @ShotgunNinja
 
7:50 PM
talking to Loktar, just catching up... forgot to @
 
@Loktar seriously... ^^^^^^
 
Put a laser-tag hit-detector on this chair and then shoot him with the laser gun. :D
 
@rlemon haha yeah but we have that stupid rule here :(, no electronic devices
 
ah, gotcha
 
so id be likely to lose my job
 
7:50 PM
Damn
 
not even thumb drives?!
your a programmer!
 
nope :(
 
WHICH KIND OF LESSENS MY THREATS OF INCINERATION
 
thats so BS
 
I know right?! its stupid
 
7:51 PM
why?
 
I work in a gov building :P
 
Data theft.
 
@BenjaminGruenbaum Government
 
@Loktar ...so you work on a computer made of butter?
 
so secret I can connect to the internet..... on a commercial line...
 
7:51 PM
k, get some of those rare earth magnets
 
can you get a kick ass PM to order you one and covertly put it at your desk?
 
and set them on the back of his monitor
 
Step 1: Get a box...
 
Step 2: Cut a hole in the box...
 
/me leans in
 
7:52 PM
heh I need to listen to some lonely island :P
 
er, k.. so /me doesn't work
 
only in the gov can you be threatened to be punched in the face in the workplace and nothing happens :P
 
You know, best thing you can do is to suck it up.
 
so seriously... no one there thinks that was out of proportion?
 
I worked for an elearning company and a co-op pissed me off so I hit him in the face with a ASP.NET book
 
7:52 PM
sounds like you should get a job where you're more respected :/
 
he fell over (nice shiner) and everyone laughed.
I so thought I was going to get in shit for that
but nope - everyone just laughed at his misfortunes
 
@Loktar what's his role?
 
@OctavianDamiean yeah im just mad about it the fact that this is a professional environment and no where else would that kind of behavior be tolerated.
@Shane hes called a Subject Matter Expert, for Nuclear weapons basically
 
ah, got it... That's hard to contend with then
 
DUDE YOU SHOULD PISS HIM OFF
 
7:54 PM
nah it sounds important, its not trust me.
 
lol
 
heh, trusted
 
it's a glorified HS chem teacher
 
you should install annoying smiley software on his computer
 
Tell me before he launches a nuke at you, I've always wanted to look at a nuclear cloud
 
7:54 PM
@Loktar I know but - I'm sure you already know - life is shit sometimes.
 
@OctavianDamiean I'm mainly just bitching because im stuck at work, and can't respond like I normally would :P in a non work environment
 
I don't believe in backing down, but sometimes you have to move sideways
I don't think that should slide, personally
but confrontation isn't going to work
 
@Loktar You hit a nuclear weaponry expert with a foam rocket? You ironic and disrespectful bastard.
 
@Loktar we got your back man! hook us up with his name, address, social security, telephone number and we'll have this all sorted by morning.
 
anybody here like their job lol
 
7:55 PM
it's going to take some psychological warfare
 
@rlemon haha
 
I love my job!
 
I like my job
 
@stewbydoo I do
 
I like my "job" just not my workplace :P
 
7:55 PM
@Loktar going out on a limb here... you're smarter than this guy, no?
 
@Shane Yup, however it is important to know which fights to pick and which ones to avoid.
 
Loktar lies - they're monitoring his communications - he hates his job.
 
yeah I'd imagine so
 
yeah, sidestepping is key here
 
@rlemon NUCLEAR WEAPONRY EXPERT. I'd stay far away from any sort of retaliations.
 
7:55 PM
@rlemon what do you doo
 
wishes those SOBs would just die already
 
@stewbydoo I wear high-heels, suspenders and a bra. How can I not like my job?
 
is he subject to you in any way?
not in terms of rank
 
nope
 
but is his job dependant on yours?
k
 
7:56 PM
yes, it can be :P
 
@Zirak sounds like good stuff
 
exactly
 
they give us training material, and we produce the product
 
you can easter egg him
 
@stewbydoo I tickle ant eaters until they shoot a precious goo from their 'trunks' which we use in a cosmetic which I cannot specify
 
7:56 PM
@Zirak sounds like my dream job
 
but with errors that make him look crazy
 
@Shane hahaha
 
like certain keystroke combinations
 
@rlemon you mean do don't do that for fun?
this is weird
 
meh nah I wont do anything, I made it known that you shouldn't threaten me, and the rocket wars are no terminated
 
7:57 PM
@rlemon's living the dream
 
To be fair, I'd give the guy an apology, and tell him to calm his ripped abs.
 
ohh it is fun - hence why I love my job
 
as a side note he used to shoot them all the time. also @ShotgunNinja I didn apologize I wasnt aiming at him
this was the first time he freaked out. hes hit me many times.
 
raphael cannot be the best way to do SVG man
 
Ah. He must be having a bad day
 
7:58 PM
I think apologies are good, but this guy man...
 
this shit is driving me crazy
 
Well, maybe he's on-edge for some reason.
 
he's going to think he "caused" the apology
 
everyone in the office thought he acted inappropriately .. but not to the point of any action against him
 
Maybe he's on crack
 
7:58 PM
@stewbydoo That was just a nice way to say that he jerks off mice.
2
 
@OctavianDamiean hahahaha
 
it's reinforcing the behavior to apologize after something out of proportion like that
 
Surprise-hug him
 
"Dude! You are in my fucking way! Everyone knows this is MY WATER COOLER TIME! I SWEAR TO GOD I WILL KICK YOU IN THE FUCKING NUTTS YOU BASTARD!!"
- next day: no more water coolers.. or shoes.. next up is mandatory castration.
3
 
^ yeah I agree. I wont apologize again
 
7:58 PM
@OctavianDamiean To be fair, there are people who do that for a living.
 
I did before he threatened me
 
Be sure not to have an erection while hugging
 
@rlemon hahaha
 
yeah, you're right on that Loktar, it's like negotiating with a terrorist
 
7:59 PM
what if I were to say "How would you feel if I murdered your family?"
 
It can be hard to adjust to life after the military...
 
@Zirak would be better if he has a huge chub going
 
oh because I said if.. that ok :P
 
he'd kill you
 
Especially for a drill seargeant.
 
7:59 PM
@Shane hes been out for years, hes like 45 years old
 
and go to jail, but you'd be dead
 
"no thats not a rocket in my pocket wink wink"
 
or however it's spelled.
 
I like my job but not the supervisor
 
hes not some young guy, hes an older dude
 

« first day (838 days earlier)      last day (4125 days later) »