« first day (1745 days earlier)      last day (3218 days later) » 

@ziGi I like to follow a convention where I only pass variables to my asserts
i.e.
 
Man, downcasting in java streaming isn't easy :|
 
var expected = new Money(5, "EUR");
var actual = (new Money(3.50, "EUR")).add(new Money(1.50, "EUR"));
assert.deepEqual(expected, actual);
 
@MadaraUchiha so you like to see the things seperately
so?
 
@ziGi No, more like make it easy to see which is the expected and which is the actual.
 
10:04 AM
yeah, that is for people that can't code better I agree
if you have a method equal(A, B) what would you expect to compare?
 
@ziGi lol
 
or is it more like what should be the result in the eyes of expected
 
That's like saying "tests are for people who can't code better"
 
and what should be the actual tested method
 
@MadaraUchiha I mean...
 
10:05 AM
@MadaraUchiha well in a way they are
they are also automation of the manual testing that we used to do here before
but you could do manual testing if you are good enough
 
it's not too far from the truth. heh
 
tests are for people not to re-do manual testing
also for other people that can break stuff and don't know how to test it
 
but like, anytime we do console.log, or an alert (I still do this lol), we're basically testing that the output makes sense...by our standards
of course we shouldn't trust our own brains to perform those checks
 
@Purag good man
spoken like a true test-driven developer
 
hi all
 
10:07 AM
@greenhorn 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.
 
@CapricaSix how many times you will say this @CapricaSix
 
we should all code hoping to not create errors but planning for them just the same
3
 
TDD is a great idea that is just tedious to implement consistently. the payoffs in the long run are wonderful though
 
i have included external JS in my JSP so how can i verify that the included JS is loaded or not
 
@Purag I still haven't cracked how to do TDD properly except for very small very isolated pieces of functionality, I just end up writing shitty tests when I try
 
10:10 AM
@Purag right, I'm not going to pretend that there aren't drawbacks from tdd, but still
 
still, TTD would not be efficient enough if the tests are of poor quality :p
don't forget that human still make these tests
 
@ivarni oh, neither have I. the extent to which I use that model is for school assignments. the spec for every function we need to write is given, and we are required to write unit tests, and so given the specs we can do this easily prior to writing the function.
 
i got sometimes incorrect unit test codes.
so unit testing unit tests to have proper tests
<.<
 
@Purag Yeah, when you have the design already it's easy to TDD
 
then we should develop a TTDD, test testing driven development where you write tests for tests ;)
 
10:13 AM
;)
 
So I try to isolate what is pure side-effect free business logic and then TDD that. Everything else I write tests after the fact
 
and honestly, it was such a breeze writing those functions with all the prior knowledge. plus, i dunno, writing the tests gets you in a mindset to write the function right in the first few tries.
 
i try to do tdd if I have the time, which is rare
 
this goes mostly for C. javascript is a different beast.
 
more often than not, my boss is leaning over my shoulder asking me if I've finished yet before he's told me what to do
javascript is trickier, because of the client-side aspect
 
10:17 AM
@Neil Oh, I write tests for my test code
 
@MadaraUchiha You test your tests?
 
People tend to think that "test code" is just "tests"
No, "test code" is "test code", it involves coding a framework unique to your application.
Similar to Page Objects in Selenium
 
i guess if you're writing a framework, test code might be a few function calls to that framework
 
hard to imagine how one would do that
 
I test the testing framework I write, yeah.
 
10:18 AM
then you need a test function to check the correctness of the test code's output when using your framework's functions
 
For example, I have a test function that simulates a click event at given coordinates
 
ah, well I can see that.. the product being tested just happens to be a testing framework
 
I test to make sure that function performs as expected.
 
well think of it like this
 
Then I can rely on it throughout my tests.
 
10:19 AM
when developing jquery, to test it they need two layers of "test code." one layer to make calls to jquery functions, and another layer to ensure the results of those function calls are correct
otherwise, they again fall into the human testing trap
 
@Purag unless it's async, it's the same layer isn't it?
 
if we were technical, that'd be some sort of layer violation wouldn't it?
 
hi to all
i have some doubt with jquery, i want changes jquery slider between two ranges of min and max values, then i want check particular checkboxs
i search some what in google . and find some solutions but all checkbox checked now
 
@Purag it would be a classic unit test wouldn't it? you call jquery function and check results
 
but i need to check particular checkbox only based slider values
anyone give some ideas
 
10:24 AM
@Neil yeah i suppose you could. I was just thinking, since frameworks are collections of functions...eh
I kinda lost that train of thought, it was going somewhere 5 minutes ago, but whatever haha
i'm off though. if any of you end up writing the testing framework testing framework, let me know! heh
 
Hello. Can somebody give an example of a self-contained javascript application which is open source and can be loaded in the browser without having to minify and concatenate? Extra kudos if it is a lot of javascript.
 
@Purag you'll be the first to know ;)
 
@dsign jQuery
 
meh.. just listened to <awesome ambient album> vol. 1 on spotify only to realize I can't seem to find vol.2 :/
play.spotify.com/album/69qIPQGUZ1xz86YCm6EHqz was great background noise when programming never the less
 
Anyone here ever worked with JavaScript ?
 
10:37 AM
no
 
yes mostly all
 
@Abhishrek gtalk urgent
 
Sorry I meant Javascript and WCF together
 
no
 
@Mathematics that sounds painful
 
10:38 AM
when i post this to server,

JSON.stringify(memberships) = "[{"ID":"53","StartDateString":"23/07/2015","EndDateString":"28/07/2015"}]"
my server gets all values right except StartDateString and EndDate...
it gets them as nulls
 
Is the JSON deserialized?
if so, how
C# world might refer to it as unmarshalling, I'd guess the server doesn't know how to turn that datestring into a dateobject but that's pure guesswork from me
 
I am able to put it down nicely as a question
2
Q: Formated String and DateTime?

MathematicsI have a WCF class, [DataContract] public class Membership { [DataMember] public int ID; public DateTime? StartDate{ get; set; } [DataMember(EmitDefaultValue = false, Name = "StartDate")] public string StartDateString { get...

Please have a look and see if you could find any issue
Yes it seem to be a deserialization issue
 
@ivarni thanks for the recommendation!
 
@ivarni im sleepingghg...
 
10:59 AM
MDN : You should not slice on arguments because it prevents optimizations in JavaScript engines (V8 for example). Instead, try constructing a new array by iterating through the arguments object.

still true?
 
@Neoares No, your mind entered the garden of Zen where it can more easily grow its ideas and become one with the code
You think that's air you're breating now?
 
wow
it's water what I'm breathing
now my eyes are open
 
@cswl Yes
 
how can I store this number as an integer in JavaScript? 188198812920607963838697239461650439807163563379417382700763356422988859715234665485319
060606504743045317388011303396716199692321205734031879550656996221305168759307650257059
!!> var a = 18819881292060796383869723946165043980716356337941738270076335642298885971523466‌​548531906060650474304531738801130339671619969232120573403187955065699622130516875‌​9307650257059; a;
 
@Neoares "undefined"
@Neoares 1.8819881292060795e+173
 
11:14 AM
!!why u no accurate? D:
 
@Neoares because you touch yourself at night
 
rekt
 
As an integer? o_o
 
yep
or long integer
or very very very long
 
An integer goes up to 2,147,483,647
@Neoares You probably want to use a big-integer lib
 
11:17 AM
@RoelvanUden thanks sir
I'm just going to break RSA-2048
 
You what now?
 
Warning: The 5th edition of ECMAScript (ES5) forbids use of arguments.callee() in strict mode. Avoid using arguments.callee() by either giving function expressions a name or use a function declaration where a function must call itself.

i need to pass the name of the function to another function... how do i do this
 
@cswl someOtherFunction('myFunctionName')
 
windows users. halp me.
 
@AwalGarg Wid wat do u need halp?
 
11:20 AM
@RoelvanUden without typing the name,,
 
@RoelvanUden I have an old lumia 510. Can't connect it to PC. Installed some random internet shit, didn't do anything.
 
@cswl You don't do that. You can pass the reference to the function, toString it, and extract the function name, but that's pretty horrible.
@AwalGarg You don't need random internet shit. Get a different USB cable.
Some cables work. Some don't. No idea why.
 
@RoelvanUden Well the cable works... device manager shows the device as connected. But can't mount it as a Mass Storage.
 
Did you unlock the device screen? :P
 
yep
 
11:22 AM
Did you try factory reset?lel
 
@AwalGarg Did you look at the disk management tool?
 
umm, no.
checking, sec
 
@AwalGarg run diskmgmt.msc
Your phone may or may not be there
 
@cswl ES6 has func.name.
 
@AwalGarg Oh well nvm just try a different cable. Humor me :P
 
11:27 AM
 
@KingMob yeah., saw that when googling... but i think it was only proposal..
 
@RoelvanUden connected phone, disk management, it started showing my device in the file manager, also showed the total and empty space, but no files.
 
@AwalGarg now unlock the screen and you should see the files
 
unlocked the screen, no change
 
11:32 AM
I smell windows
 
That's weird.. screenshot?
 
just a sec
@RoelvanUden ^
 
show hidden files
 
it is on
 
unplug and plug
 
11:36 AM
@AwalGarg What are you trying to do?
 
Yeah that folder unlocks if you unlock your screen with the baked-in drivers. But they don't show a logo and a name like 'Nokia 510'. I'm guessing your random drivers fucked something up badly.
 
@uselesschien copying all stuff from this old mobile and burning the device in fire
 
@AwalGarg why you use windows?
 
@AwalGarg Your battery is dead.
YOU'RE WELCOME
 
I don't use windows.
 
11:38 AM
@uselesschien Windows master race.
 
Windows is awesome btw. You are all Linux fanboys hating on that awesome OS for no reason.
</s>
 
@RoelvanUden LOLLOLOLOLOLOL reddit.com/r/WindowsMasterRace
 
2 days to W10
unformatted code!!!!
 
1 message moved to Trash can
@cswl Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
11:41 AM
$ npm help install
Top hits for "install"
--------------------------------------------------------------------------------
npm help install                                                      install:83
wtf is this trying to tell me?
 
I read today that with W10 you won't have the option to not install updates any more? They'll install themself and reboot without asking?
 
well
I guess it will ask
 
"Oh you're roaming? TOO BAD"
 
@MadaraUchiha Recursion
@OliverSalzburg ^
 
@MadaraUchiha Yeah, seems like it
 
11:43 AM
@ivarni u ever heard of arch leeeeenucks? deeeeebyan sid?
 
I used 8 spaces but they got erased :|
 
@cswl paste, CTRL+K, enter
 
@uselesschien Not an option for my laptop unfortunately. HDD too small to dual boot and I need Windoze for company reasons
 
@ivarni I'm sorry bro :(
 
I suppose I'll figure out whatever port it uses and block it to kingdom come
 
11:45 AM
So much hate for Windows. I'm always amazed when people are hatin' it again.
 
Can you tell me the formatting, I dont have Ctrl key :|
 
@cswl 4 spaces before every line. Empty lines included
Or just use gist.github.com
 
I'm not hating on windows in general, but if what I'm reading about non-optional updates is true then I might stick to 8
 
@RoelvanUden it's nice for them beginners and them .net bois
 
hey, does any one know emulator for chrome book. I want to test my newly developed web app on chromebook.
 
11:46 AM
@ivarni It's not the non-optional updates that make me angry
It's the fact that you have to restart after 95% of them updates :P
 
1 message moved to Trash can
@cswl Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
@pirabdulwakeel VirtualBox?
 
EVERY line. @cswl
 
Oh, fucking great. Now npm broke itself
 
how come this doesn't work
document.querySelectorAll("input[type='text']")
 
11:48 AM
@RoelvanUden, should I go for download?
 
 How do i do this without foo? and only with function bar..

var foo = function bar() {
console.log(foo.name) ;
};
foo();
 
@SuperUberDuper works for me
 
@cswl Use function bar ...!
 
Question about bitwise operators
> Bitwise shifting any number x to the left by y bits yields x * 2^y.
 
Duh right.. i wanted to do like this.name... and my thoughts got mixed up
 
11:57 AM
!!> 128 << 24
 
@SomeGuy -2147483648
 
!!> 128 * Math.pow(2, 24)
 
@SomeGuy 2147483648
 
Anyone know why the left-shift results in the negative sign?
@copy Maybe you can help?
 
You're setting the 32nd bit which is used to indicate negative numbers. JS uses signed 32 bit integers.
 
12:00 PM
@SomeGuy Because bitwise operators work on 32 bit numbers, IIRC
 
@KingMob Ooh, thanks
I was wondering why 24 was the magic number
Makes sense, since 128 is 8 bits
 
Aye. No probs.
 
morning
 
   Any better solutions?

   function bar () {
   console.log(this.name);
    }
    bar.bind(bar)();
 
@MadaraUchiha AND IT IS CHARGING NOOBZORZ
 
12:05 PM
@cswl new?
 
Im trying to get the name of the function.. ES6 func.name :|
 
Does this : document.reservation.submit();
mean : submit the form named reservation (name="reservation")
 
@cswl Why don't you just do {functionName}.name ?
 
(function bar() { console.log( arguments.callee.name ) }());
 
!!> eval.name
 
12:07 PM
@catgocat "eval"
 
@cswl For what purpose?
 
!!> console.log.name
 
@Neoares ""
 
!!> function bar() {}; bar.name;
 
@catgocat "bar"
 
12:08 PM
guys pls ?
I need help on it :(
 
@Neoares console.log.name works here, it returns "log"
 
I imagine the bot redefines it.
 
!!> eval('console.log').name
?
 
@ivarni ""
 
no wait, I'm just dumb now
ignore me
 
12:10 PM
!!> console.table.name
 
@catgocat ""
 
@catgocat yes, but Caprica doesn't have console
 
@catgocat "TypeError: console.table is undefined"
 
@Neoares But she catches what is logged, see:
!!> console.log(123)
 
@catgocat "undefined" Logged: 123
 
!!> console.log("123")
 
@Neoares "undefined" Logged: "123"
 
:o
 
So no name.
 
no name, artificial func
 
12:12 PM
Artificial func?
I thought nature did it
 
!!s/artificial/anonymous/
 
@KingMob no name, anonymous func (source)
 
Yesterday I watched terminator genysis
it seemed like there was no sun because everything happened at night
previous movies are still better though
 
i making a logger.. i guess i will have to change my logic.. :|
 
@catgocat For Terminator movies I feel it is #2 > #1 > *
 
12:19 PM
maybe, but for sure the second one rules
 
@cswl write a function to extract function name on the following order: .name property, toString -> slice, 'anonymous'. Then use it.
@MadaraUchiha where is that image you posted about what windows is doing when it says "troubleshooting your problems"? quite relevant here :D
 
what's the difference between $(this) and $(e.target) in a jquery event?
 
e.target points to the target of the event
which may or may not coincide with this
 
connect phone -> install drivers -> need to install updates first -> reboot -> drivers not compatible with this device, please install zune -> zune requires .net 2.0 and 3.0 -> install .net 2.0 -> reboot -> install .net 3.0 -> reboot -> zune installs -> reboot -> zune couldn't detect device, please install drivers...
 
@AwalGarg lol
 
12:31 PM
Sounds like trying to get WiFi working on Fedora in mind 2000
 
windows. windows 8.1.
Pay $80 for this crap to sit on your hardware and never work.
 
hi guys
 
@Mathew 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.
 
i am new to javascript
i want to refresh a div on a click
 
@Mathew Hi new to javascript, I'm useless
 
12:33 PM
hi useless
am using an accordin
and there is a slider from where i use a filter option
 
@corvid
for a click in <body><button>Hi</button></body>

$("button").on('click', function (e) {
    console.log($(e.target)); // button
    console.log($(this)); // button
});

$("body").on('click', function (e) {
    console.log($(e.target)); // button
    console.log($(this)); // body
});
 
all the accordin contains two sliders
when i click on the nav links
there is a conflict
only the first used one is working
rest pairs are not working
 
@catgocat That key font is so ugly
Also K70 RGB master race.
 
12:40 PM
I don't have it though
but it's cheap as hell
 
Any goddamn keyboard that comes with your computer master race
 
I don't like the Razer switches
They feel cheap
 
I haven't used a razer keyboard since they switched to their own switches
 
@catgocat I had the ultimate version of that, and it was unbearably loud. You should at least get the stealth edition if anything, it uses the quieter switches.
 
Also no keypad, 0/10
 
12:42 PM
I have never given importance to the "switches" you guys are talking about, I just use all keyboards the same way and notice little difference.
 
@catgocat Different switches just change how far down you have to push the key before it fires
and they click
clickityclickityclickityclickityclickityclickityclickityclickityclickityclickity‌​clickityclickityclickityclickityclickityclickityclickityclickityclickityclickityc‌​lickityclickityclickityclickityclickityclickityclickityclickityclickity
Also how hard they push back, etc
 
mechanical keyboards feela bit different because the key triggers about half-way down instead of at the bottom. It's less likely it'll ever miss a keypress.
 
@JoshLeBlanc And what is best? Keys that need to be pushed far down?
 
but beyond that it's all what you are used to and like
 
@catgocat subjective
 
12:44 PM
fair enough
I have a membrane keyboard if that's what you call it
@JoshLeBlanc but what's with the razer switches?
 
Razer made their own switches with their own actuation point and own resistance, and own materials
#topremasterrace
 
I really like the kensington keyboard I type on. It feels nice without being over the top.
 
My only complaint about topre switches is that if I rest my hand on the keyboard, sometimes it actuates
So I'll not notice and then send 444444444444444444444444444444444444444444444444444444444444444444444<my message>
 
Who rests their hand on a keyboard?
 
12:46 PM
Why?
 
And where's the other hand?
 
On my mouse
 
smooth
 
Can you expand JSDoc to have another feature? On meteor, I want a @where for client and server
 
Your jokes are like fine whisky.
 
12:47 PM
I slept on my keyboard once
 
Should be locked in a barrel and never let out.
 
Woke up after 6 hours or so and saw 44 lines of gibberish
It looks like this:
 
ugg
 
@uselesschien So you wrote a JavaScript library in your sleep?
Impressive.
 
12:52 PM
claps
claps harder
 
How do i convert a directory to json
 
anyone from Brooklyn ??? eventbrite.com/e/…;
 
nope, thank god
Spent a weekend in new york and almost died several times
 
1 message moved to Orphan GIFs
 
@cswl the same way you take any data in JS and make json. Where are you stuck?
 
12:59 PM
Thanks Google!
 

« first day (1745 days earlier)      last day (3218 days later) »