phtrivier

Toulouse, France

phings.wordpress.com

Age: 32

Software Engineer in Sierra Wireless, Toulouse, France

Mostly doing Web development :

  • Java (Spring MVC, Hibernate)
  • JS (JQuery)
  • bits of Python, Ruby, Clojure, etc... on the side

Avid tester (JUnit, EasyMock, Selenium et al make my day)

Lame hobbyist HTML 5 game programmer

Jun
12
comment Can you define custom plugins for karma-runner
Actually, my issue was simply that I was not using the right version of karma (custom plugins are only supported after version 0.9.0). Thanks anyway !
Jun
12
accepted Can you define custom plugins for karma-runner
Jun
4
comment Why people use prototype in javascript when it is easy to inherit using apply () and call () methods?
I would not recommend doing this, but here is how it works : in javascript, Functions are Object. So, at first, the Rectangle object has a "draw" property, that happens to be a Function. By writing var X = this.draw, you create a variable, X, and make it point to this Function. Later, you redefine the X property, and make it point to a new Function, that calls the Function is stored in X. The first argument to the "call" method, is the "context" in which this Function will be called. More info here : developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… .
Jun
3
asked Can you define custom plugins for karma-runner
May
9
answered Why people use prototype in javascript when it is easy to inherit using apply () and call () methods?
May
9
revised Why people use prototype in javascript when it is easy to inherit using apply () and call () methods?
added 54 characters in body
May
9
comment Javascript For loop in multidimensional javascript array
Do you know how to loop over a single array ?
May
2
answered How to get the id of an input type using attribute
Apr
25
revised Getting rid of 'new' operators for subcomponents objects
added 420 characters in body
Apr
25
comment Getting rid of 'new' operators for subcomponents objects
This is a testing issue. Typically, I'm having a hard time testing behavior like : "when I click on the button, if the field is empty, there should be an error message". I can put the error handler in a separate method, and check what happens when I called the method, but how can and outsider test that my code is actually calling the method when the button is clicked ? In practice, that it is actually setting up the listeners right ?
Apr
18
answered RequireJs shim: how to prevent duplicate module names inside define() {...}?
Mar
26
comment Strange behavior of uglifyed javascript code with string comparison
@Bergi I would definitely not write this kind of code, it is buried inside a library (select2). I'm more interested into the different behavior (but the bug is so hard to reproduce that the patch might be completely unrelated, in the end...)
Mar
21
revised Strange behavior of uglifyed javascript code with string comparison
added 277 characters in body
Mar
21
comment Strange behavior of uglifyed javascript code with string comparison
I meant "a bug", I don't know if the specifics of the bugs are relevant - and to be honest, I can't easily reproduce it. All I know is that the patches changes the behavior, but I really have no clue how :)
Mar
20
answered JavaScript! window.onload = someFunction and window.onload = someFunction()
Mar
19
asked Strange behavior of uglifyed javascript code with string comparison
Mar
14
comment why my variable "j" is undefined?
Why do you have to define j globally here ? Is there another piece of code that could modify it ?
Mar
13
awarded Yearling
Mar
8
comment Localhost running jquery twice?
That looks not like jquery executing twice, but more like the jquery datatable plugin being run twice. Again, hard to say anything without some code...
Mar
8
comment calling function inside a function in requirejs module javascript
@koko yes, that's on purpose, that's why it's called private ...
1 2 3 4 5