« first day (819 days earlier)      last day (2969 days later) » 

1:00 PM
@Sippy weird, and let me check that with the mobile team...
 
Cool, thanks man
 
btw you guys can also use real devices now
 
orly
 
yap, have almost 12 droid and 4 ios real devices
no more emulators
 
@rlemon I thought it was amusing anyway
 
1:01 PM
@Mr.Alien as opposed to the extremely verbose echo $alienSucks ? 'yes, like a massive blackhole' : '';
 
ternary is gross
 
!!redbull or black tea or green tea or coffee or iced tea or toilet water
 
@RonaldUlyssesSwanson coffee
 
Hey she doesn't hate you today
Sweet
 
@Sippy tell @rlemon that :P
 
1:03 PM
<3 u too Cap
 
@mikedidthis I will
 
I rather have version control :X
 
@Sippy that is because you are not a good programmer.
 
!!pee or no pee
 
simple things confuse you
 
1:05 PM
@Rvervuurt pee
 
THANK GOD
 
@RonaldUlyssesSwanson we have that as well... also we have something to check fancy like return boolean... isthisset? and it returns a boolean compared to shitty isset()
 
@RonaldUlyssesSwanson heh we had that all the time, just that it was not official as it seems now
 
@Sippy pleb
ternary all day long
 
1:08 PM
the daily wtf is hardly a reference
 
nesting it is bad
 
Half their shit is made up and the other half is written by your peers :P
 
@RonaldUlyssesSwanson I didn't flush, ask her again!
 
@Sippy so? I can make shitty code without a ternary
 
and who the fuck compares with ==
 
1:09 PM
@Kitler People who use real programming languages that aren't JavaScript
 
lol
 
in java, c# == equals to ===
 
@rlemon yup.
 
and .equals() equals to js' ==
 
1:11 PM
134
A: To ternary or not to ternary?

marcospereiraUse it for simple expressions only: int a = (b > 10) ? c : d; Don't chain or nest ternary operators as it hard to read and confusing: int a = b > 10 ? c < 20 ? 50 : 80 : e == 2 ? 4 : 8; Moreover, when using ternary operator, consider formatting the code in a way that improve readability: i...

 
toptal.com/voip/choosing-the-best-headphones-for-developers << someone tell these idiots that developers !== tech support
 
That's how I feel about ternary
But I see so many people use it for complex true/false it makes me cry
 
@Sippy Eich admitted == was a mistake from a younger self.
however because of the nature of JS and not a single implementation we're stuck with it :/
 
I know exactly why lol
 
such is life.
 
1:12 PM
Not bashing JS
Just saying not everyone codes JS all day long :P
 
and ternary is a well thought out operator that exists in most c-like languages
if not all
 
Not well understood or used.
 
no, it is well understood and used.
 
@RonaldUlyssesSwanson .equals() depends on who implements it so no
 
you don't comprehend how many bad programmers are out there. They abuse and misunderstand more than just a ternary
 
1:13 PM
@Neil well, kinda
 
@rlemon I really do :(
 
then why blame the operator?
is || (OR) confusing?
don't cater to the lowest common denominator. no advancement happens there
 
return params.join(hash && hash.separator || ' '); << confused?
 
not at all
 
hello guys
 
1:17 PM
@Kitler I know what it means, but I don't like it used in that context
 
I would add more () for later reading
but both are fine to me. I tend to over ()
 
see now I am confused
 
I said it's gross because I find it hard to read, not because I don't get it.
I also didn't say it doesn't work :P
 
@Sippy I think PHP is hard to read. That doesn't make it bad.
 
if it takes you longer than a couple seconds to know what it does, it needs to be rewritten into multiple lines imho
 
1:19 PM
I mean, it is bad, but for other reasons.
 
I'm glad you clarified
And imo that does make it bad.
Totally depends what you define as bad.
 
if you can't understand a Ternary operator, that is not because it is too difficult. you are not trying hard enough. There are people who don't understand if/elseif/else, but we don't concede they are 'difficult' or 'confusing' -- we learned them.
same should be said about ternary
 
would you ever do something like if (res = getResult()) { ... ?
 
Like I said, it isn't that I don't understand them, it's not that I don't use them. I find them hard to read.
 
var a = options.foo ? options.foo() : defaults.foo();
 
1:21 PM
I wouldn't, for instance
 
how is this hard to read?
 
The "=" is easily read as "=="
 
@Neil depends on the situation.
probably not tho
 
@rlemon I think that's fine
 
@rlemon "Gratuitous parentheses"
 
1:22 PM
but I know I have in the past.
 
I wouldn't make it any more complex than that though
 
well if we're being real.
var a = 'foo' in options ? options.foo() : defaults.foo();
now I'm not accessing the property, just checking for it.
 
because accessing the property is an expensive operation now?
 
depends on the property
key in obj is not only readable, but it is safer
 
you mean if foo were a string several kilometers long
 
1:25 PM
or a very very large object
 
that could be optimized by the interpreter
 
it is an edge case, but when you think about it, you do not want to access the property. you actually only want to check if it exists.
 
i wouldn't count on it though
 
so in is the more correct method
 
unless options is undefined
 
1:27 PM
well that would throw an error in either case
 
urm, semi related, reading material for es6?
 
danke
 
@Kitler -1, no slides.
YOU KNOW HOW MUCH I LIKE SLIDES!
 
1:30 PM
@Kitler +1, no slides.
 
Screw slides :P
All you do is poop on them
 
#shotsfired
 
@Kitler, how's my JS review of my crappy JS :P?
 
let separator = hash && 'separator' in hash && hash.separator || ' '; <<< /puke
return params.join(hash && hash.separator || ' '); thank you come again
@Matthcw did you check the gist I linked you to?
 
No, did you send me a link?
 
1:32 PM
 
yesterday
 
I was waiting all day for that review lol
Do you still have the link
 
Basically, cache your selectors and wrap your code, atm everything is defined on the global scope, globals are bad mmkay?
 
@Kitler well there are better solutions for this
 
Gist is no longer alive, I clean them each morning
@rlemon can't use es6 param defaults :(
 
1:34 PM
Sorry, what is a Gist?
 
@Kitler there are libraries
 
ember thing, passes an empty object x.x
 
or simple utility scripts you can write
 
what is the usage?
 
1:36 PM
Ohhhhhhhhh, thank you, that makes sense
I need to hang out with more smart programmers man...
When you choose to learn code straight off the web and have no code reviews or code partners or mentors, things can get quite messy - evidence in my Javascript.
I thought good javascript just needed to be easy to comprehend.
 
@rlemon it's an htmlbars helper that takes in any amount of words and prints them out separated by whatever you want, defaults to empty space
 
stackoverflow.com/questions/31677364/… close vote? Can't find the option where you can flag for "we are here to help. not to create" or something
 
@Matthcw dom interaction is expensive, any selector that you use more than once should be stored in a variable and use the variable instead
 
@Kitler well I don't know what you are actually doing.
let parser = (pattern, object) => {
  var obj = object;
  var parts = pattern.split('.');
  while(parts.length) {
    obj = obj[parts.shift()];
  }
  //return obj === undefined; // if you only want to check.
  return obj;
};

let foo = { bar: { baz:  1  } };
console.log( parser( 'bar.baz', foo) ); // 1
console.log( parser( 'bar.fail', foo) ); // undefined
 
Thanks, that makes a lot of sense.
 
1:40 PM
no more && chaining
 
Just signed up to github
This question may anger you guys haha; but what is a Private repository? On github, apparently they cost something.
 
@Matthcw education.github.com/pack << check the education pack out
It's a repository that's private? :P
 
github is primarily for open source projects. all code is freely available to all.
you CAN however buy a subscription and get private repos
so you don't have to share your code with all
bitbucket does private repos for free
-3
Q: Using node.js for website

Chris ThaliyathI was trying to learn node.js for handling a database for a website. I am working on a website for a resort so what I want are This is the website I am working on http://chrissunny94.github.io queries from customers to be emailed to the clients (resort owner)email id create a sign in and sign...

\o/ mike!
 
reopen vote cast
 
Leaving my work of today here (added the "Wave" animation) and with that, I bid you farewell: codepen.io/rvervuurt/pen/VLEjEz
 
1:44 PM
Ah, thank you for informing me.
 
lol nice
 
I understand now.
So, does this student package work for UK students?
I notice the .com domain
 
@Rvervuurt cache your selectors fool
 
@Kitler ? :X
 
@rlemon Think the commentor meant Node rather than MySQL
Hope he did, anyway ..
 
1:45 PM
@Rvervuurt $hiThere = $('.hithere'); and so on
 
@Kitler you should use brotype
 
@Rvervuurt That wave effect ☞  ͜ʖ  ☞
 
@rlemon sauce?
 
@Kitler Ah, exactly like what @Matthcw has to do? :P
 
yup
 
1:46 PM
if( Bro(obj).doYouEven('foo.bar.theOtherthing') ) {
  obj.foo.bar.theOtherthing();
}
 
@RedBreast Thanks! Took some figuring out how to do it in SVG though! But it works now :D
 
@rlemon broscript
 
wat
 
wrong robert
 
@Rveruurt I like that wave effect, It would look good as the splash screen of full width website
With the website name or logo in the middle
 
1:48 PM
Also read this @Rvervuurt
 
Bro(obj).iDontAlways('foo.bar').butWhenIDo(function(bar) {
  bar(1); // obj.foo.bar
});
 
Guys what do you think of this code snippet:
var sex {
var girl {}
}
 
I think the person who wrote it is a retard
 
:(
 
lol
it is invalid
 
1:49 PM
Do you know what it means in english
 
Nothing because it is a parse? error
 
^
 
Syntax Error
 
OOh yeah oops
 
syntax fine
 
1:50 PM
@PeeHaa which is a parse error
you just used the blanket term
 
What gets actually thrown?
syntax?
 
yup
 
k
 
var sex {
"object":"girl"
}
 
unexpected }
 
1:50 PM
How about now?
 
@Matthcw still wrong :P
 
@Matthcw still invalid
let sex = Object.create({ object: 'girl' });
 
no cookie @Matthcw
 
Can someone give me the correct syntax for "Girls are sex objects" (As a joke)
 
no because it isn't a funny joke
 
1:51 PM
^
 
My sister wants a tshirt
 
good for her
 
with it on
 
keep your sexism out of here
 
@Matthcw I want you sister without a shirt
wait
how old is she?
 
1:52 PM
lol
nearly 50
 
@Rvervuurt 96
 
u can have her
How about this snippet
for each(var girl in girlfriends){
girl.send("Hey good morning babe");
}
 
delete users['Matthcw'];
 
rip
@Matthcw What language are you 'using'?
 
javascript
 
1:55 PM
var count = 0;
while(girlfriends.length) girlfriends.shift(), count++;
console.log(count); // 0
 
ooh ooh, lets do some haskell~! Matthcw = Nothing :: Maybe Person :p
 
@cimmanon What teh fuck does that even mean
@Matthcw Go play in traffic jsfiddle
 
THAT IS MY LINE
 
@Sippy a Maybe is a type where the possible values are Nothing or Just a
 
@rlemon soz :P
 
1:56 PM
How long have you guys been coding in javascript
 
its basically a "safe" way of dealing with expressions that can fail
 
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);

console.log(d);
@Matthcw figure this out
 
@Matthcw define length, define coding, define coding in javascript
@rlemon rofl
 
@Matthcw February 18th, 1998
 
How long ago did you write your first line of javascript that was interpreted without errors
 
1:57 PM
That is so retarded I love it
 
@Sippy hand obfuscated
 
@rlemon vile!
 
took like a half hour
 
XD
@Matthcw Like 10 years?
That is a bad definition yo
 
So in terms of javascript coding, where am I going wrong?
 
1:58 PM
not learning the syntax
 
You don't know anything about programming?
 
Oh
I do
 
!!resources
 
get going
 

« first day (819 days earlier)      last day (2969 days later) »