« first day (907 days earlier)      last day (4035 days later) » 

6:00 PM
@rlemon You could just build-in image expiration
 
thats no fun
 
Don't do it, link rot sucks
 
Based on no requests in the last month
And little views in general
 
nahh. if anything I can batch offload some images to imgur and just redirect to them
but s3 isn't expensive from what I see. and if i'm hosting over 170K memes I have to imagine that means i'm getting some ad revenues
 
0
Q: Wondering why my JavaScript is not working.. What can I do better?

user16277Made a Cost calculator In javascript to calculate counseling rate for a non profit. I had a script that worked on old website, and I'm wondering why its not working in the new one. Can anyone review it? ` function feecalculator() { this.family = 0; this.income = 0; this.familylimits = Array()...

 
Im leaving the office, later guise
 
@Shmiddty on my generator? :P
@SOChatBot I really hope that is their morphed forms.... I'd totally get in that.
 
6:05 PM
@AmaanCheval What is more commonly used to denote rupees, ₨ or ₹? Searching gives mixed results.
 
@Shmiddty fml the green and pink one.
 
1 message moved to Trash can
why
 
@rlemon does drag-drop not work yet?
 
it's above
drag and drop from desktop only
 
ah, got it.
 
6:07 PM
er. not another webpage
 
Pretty much everything is wrong. Your code is not DRY, unreadable, not respecting any coding standards (not even your own), overly verbose, and pretty much unmaintanable. Please mind that this is a code review website; it is there to have your code reviewed, not fixed. I gave you a small review :-) — Florian Margaine 58 secs ago
is it too mean?
 
beta has been up for 9 months. I have a LONG list of features and improvements to make
 
@FlorianMargaine it is excellent.
 
@FlorianMargaine Yes.
 
Damn.
the last sentence doesn't make it better?
 
6:08 PM
I read India not Indiana... totally made me like "wait wut?"
 
@FlorianMargaine If it were an answer, where you explain the problems with the code instead of stating them, that would be great. It looks like you're telling him his code sucks but not how to fix it
 
doh
same
@BenjaminGruenbaum oh, right.
hmmm
I should remove it then
 
nono
 
You can evolve it into an answer
 
it's valid
 
6:09 PM
Oh, no doubt it's valid
It's perfectly valid, just mean
 
@BenjaminGruenbaum You've got to be cruel to be kind.
 
It's not mean, just not very helpful
 
^ that
the truth is not mean
 
@SomeKittens "Pretty much everything is wrong"
 
if he said "All of your code sucks and you should feel like a moron for writing it" then it's mean
"All of your code is wrong" is just the truth
 
6:11 PM
I don't consider that mean. He shouldn't take it personally. If he takes it personally, it's his own fault.
 
Wow, that code is really horrible
 
^ that
@BenjaminGruenbaum ssee! no point in sugar coating it
 
I wouldn't say it in a comment, I'm saying it here :P
 
sugar coating it would be mean because then he wouldn't realize how far off good code he is
if you can't take crit, don't post on code review.
 
LOL @
while( value % 100 != 0 )
                {
                    value--;
                }
 
6:12 PM
Honey-crust ham. Yummy!
 
var feecalc = null;$(document).ready(function(e) { feecalc = new feecalculator(); feecalc.init();});
o_O?
 
I'll calculate his feels.
 
The constructive criticism would be: "You would probably be well-suited for teaching, since you have no idea what you are doing."
 
does anyone else cringe when they see new Array();
albeit he just calls Array()
 
we all cringe when we see Array() or Object()
 
6:14 PM
What about new Array(100)?
 
@rlemon Sometimes it's handy when golfing, but not usually (handy).
 
golfing is a different story all together.
the hackier the better
 
@BenjaminGruenbaum don't talk about Object()!
 
@JanDvorak That's useful for doing dirty stuff :P
 
6:15 PM
Rule #1 of JSClub is we do not talk about Object() or Array()!
 
!!>Array(11).join(1)
 
@Shmiddty "1111111111"
 
Rule #2 is to follow Rule #2
 
@FlorianMargaine The restaurant's name is a bit bland.
 
@Zirak tbh I'm more confused about the roman legionary.
 
6:15 PM
!!> Array(8).join(parseInt('')) + ' batman'
 
@rlemon "NaNNaNNaNNaNNaNNaNNaN batman"
 
lerl
 
batman jokes never get old
2
 
true dat^
 
6:16 PM
!!> Array(8).join((parseInt('')+'').substr(0,2)) + ' batman'
 
@Shmiddty "TypeError: Object NaN has no method 'substr'"
@Shmiddty "NaNaNaNaNaNaNa batman"
 
You can also see some Mile-High members
 
@rlemon It's just portraying that poor people are less important.
 
6:19 PM
alright interview done.
 
???
 
How was it?
 
AND AND AND
 
I need to come up with 2 ambiguous issues for him to solve
he has like no web dev exp
but plenty of programming exp
so idk.
 
oh oh oh may I may I may I?
 
6:20 PM
with the candidates we get, just him liking development is a huge plus
 
@Loktar you have two lists, give the user an interface to allow moving items from one list to another.
 
user2157210
JQUERY
 
@Loktar Is he for front-end or backend ?
 
6:21 PM
both
 
user2157210
make him do some ubercool stuff you steal and sell behind his back
 
Ask him to solve an NP-Hard problem in linear time!
Win/win
 
@Loktar I wouldn't hire someone who has no web-dev experience, but I'm guessing my candidate base and yours are different.
 
@Zirak not for stack overflow. The interviewee will come here for a solution
 
@Loktar fizzbuzz in C#
 
6:22 PM
@Loktar It would take you at least 4-5 months to get him productive, JavaScript isn't something you can really learn under a week.
 
@JanDvorak I don't see the lose part
 
what does "ambiguous issues" mean for you btw?
 
@Loktar Ask him to do server-client fizzbuzz where the server sends the numbers, the client checks them, and then sends the result to the server, that displays them, and back to the client for displaying in the correct order. That's something that could be implemented well or poorly
 
@Zirak he will insist that the solution is possible
 
0
Q: Function that modifies an argument, should I return the modified object?

Juan MendesWe have a function that modifies a JS object, by adding some custom properties to it. The function doesn't return antyhing addTransaction: function (obj) { obj.transactionId = this.getTransactionId; obj.id = this.recordId; }, Somebody said they preferred that addTransaction return th...

 
6:24 PM
I know! Isn't it great!?
 
user2157210
@Loktar make him use java
 
You could ask him the difference between Java and Javascript
 
lol damn
so many pings I was talking to our client about the interview
 
Florian Margaine I humbly take you "review" and get better at my craft. A gift for helping me: A sarcastic person has a superiority complex that can be cured only by the honesty of humility. Thank you again. Lawrence G. Lovasik — user16277 4 mins ago
I like him
 
user2157210
but he has no name
 
6:26 PM
yeah :(
 
function nameGoesHere
This needs to be changed.
 
@BenjaminGruenbaum yeah.. man.. finding someone in the Gov with any programming experience
 
@Loktar Then ask him staple ones, like checking whether a linked-list is cyclical or implementing a binary search tree.
There was this robot question...moving left or right...I forgot
 
@rlemon Starting to read, the 6th edition Definitive Guide. Pray for me.
 
6:28 PM
lol
have fun!
 
Did you do all the examples? Or skip anything?
 
I don't think I've ever read the definitive guide
 
I skipped most of the examples. I read them but didn't do them
 
@Zirak Yeah, I remember that one, you had tape with letters on it, and you had a graph with arrows and stuff, and each edge/arrow mapped a letter and a node in the graph to a direction R or L and what to write :P
 
How long did it take you to read?
 
6:29 PM
@Zirak it's a tedious exercise but yea. I did it.
@XCritics like 2 weeks
but I was not reading it all day every day
 
Alright, I'm gonna 1 up you and do it in 13 hours
 
@BenjaminGruenbaum No, another one
 
@XCritics yea, you should be able too :P skip the examples and save yourself 300 pages
 
jk this is gonna take me like 4 months, i a.d.d so hard when I read
 
You had 2 robots land in a 1-dimensional plane, ejecting their parachutes. Using the same algorithm and a limited amount of commands (go left, go right, wait, check whether you're on a parachute), you have to make them meet one another in finite time.
 
6:30 PM
@Zirak I'm pretty sure I loosely described a computer there :P
 
Who cares about computers, this is programming
 
@Zirak One robot waits, the other robot maps the plane, finite time
 
m59
Please ignore how fail this is. This is the kind of thing I'm going for, but surely it can be done much better. jsfiddle.net/D3UGh
@rlemon
 
@BenjaminGruenbaum "using the same algorithm"
 
m59
If you mess around with some selects and buttons, you'll see what I mean....
 
6:31 PM
As in, they both run the same algorithm. Oh, and the plane is infinite in both directions.
 
@m59 it looks so winformy
I like it
 
m59
but I have to add all of these insane click functions. Would there be a way to make a more natural connection to the form to update values, text, html, etc?
and it's a jQuery disaster.
 
Just curious, could this be written better? gist.github.com/Gacnt/7a372faa56cf5a849d96
 
@m59 MVC framework
I like Angular
 
@XCritics Yes, make it longer, don't put }else{ on same lines of code, and make it clearer, shorter != better
 
6:34 PM
@m59 I hate it
 
user2157210
ok stop this bullshit android avd cant open the app launcher so i cant see the installed apps
 
I don't like the HTML strings everywhere
it's hard to read and maintain
makes me feel sad inside
 
m59
@rlemon Well, as it is, I hate it too lol.
 
@BenjaminGruenbaum by make it longer you mean move my else down? I just like to have the error statements on one line, since they are so damn short :/
 
@Zirak Rs. because the symbol is relatively knew and most keyboards don't even have it (like mine)
 
m59
6:35 PM
That's why I am asking how I might be able to accomplish something like that without it being a disaster behind the scenes.
 
But recently, in markets and commercial places, the symbol is being used a lot more
So, for most people, Rs., but if it's a listing of some sort, the symbol
 
m59
@Shmiddty I'm checking that out. Will it be difficult to implement?
 
...I'll just support both
 
@Zirak Support them for what?
 
You'll see
YOU'LL ALL SEE
 
6:36 PM
@m59 Not for basic implementations. It gets more complex when you start getting into directives, etc.
 
@Zirak yeah those are good ideas
 
@Loktar How's the mini Cuban crisis going by the way?
 
@Zirak k, got it
 
@m59 what do you think this does $('.default', '.listInfo')
curious. because what it is doing isn't what I think you want it to do
 
@Zirak Nice.
 
6:42 PM
@OctavianDamiean meh
 
m59
Should be finding element .default that is inside of element .listInfo @rlemon
 
ok
fair enough. I thought you were using it as a multi select
 
m59
nope
That's all garbage code anyway
data binding is what I want
I think
 
you realize you can write '.listInfo .default' and get the same thing
 
m59
lol true
I was in a hurry and pretty sure I would throw all of this out anyway. I can't stand code and html like all that.
 
6:44 PM
@BenjaminGruenbaum The answer?
 
@BadgerGirl 42
 
@BenjaminGruenbaum Is Zirak your Venus?
 
He's more like Pluto.
 
A random stone orbitting our solar system?
 
No, the ruler of the underworld.
 
6:47 PM
It's not even a planet
 
Question: You know how on stack, if you get a notification, it appears without page load, is that done with sockets or is that just constantly refreshing its self or how does that work, just tell me so I Can google it :D
 
check it out yourself.
 
@XCritics I'd need to inspect
 
@XCritics Probably just polling
 
@AmaanCheval is that a tedious thing to accomplish?
 
6:49 PM
Not really
 
There is a websocket to ws://sockets.ny.stackexchange.com/ from the main page
I've found two frames there: 233608-inbox and 1-499214-reputation
 
@m59 how I would do it jsfiddle.net/rlemon/D3UGh/1
I mean, given no requirements and a no understanding :P
 
@XCritics use the network tab to find out what connections are made
 
@FlorianMargaine Okey doke
 
sorry keep getting interrupted
@OctavianDamiean no one seems to care about NKorea here
 
6:52 PM
@Loktar Oh no, I meant your foam rocket incident. :)
 
@Loktar you should stop working, no interruption anymore!
 
@XCritics it seems to use websockets for that. See my previous monologue
 
Hm, I'm not familiar in the slightest with WS, I might have to learn some new stuff
 
Soooo our technical leader will leave
Maybe I'll take his place
 
@FlorianMargaine I'll apply.
 
6:53 PM
@XCritics first point about WS: They don't work in IE<10
 
It's php
 
I can apply to make you look better by comparison
 
@FlorianMargaine I won't apply.
 
I know.
@dystroy not interested in moving to Grenoble?
 
$res = mysql_query('SELECT * FROM users WHERE username = ' . $_POST['uname']);
// to rlemons surprise the interviewer at this point just stood up and left.
 
6:55 PM
nah
 
the technical interview is an MCQ
 
@BenjaminGruenbaum I was in a bind and needed to write some obviously bad PHP (yes it's all bad, but bad as far as PHP goes)
 
@JanDvorak What approach might I use than to be more supportive of handis that can't get past IE < 10
 
@rlemon If I were interviewer, I'd leave :P
 
6:56 PM
AJAX long polling @XCritics
 
@XCritics polling, long polling
 
Thanks I'll google it
 
or just use socket.io
 
chunked response
 
yea or socket.io
socket.io even has a flash fallback iirc
 
6:57 PM
that^
 
@rlemon also falls back to AJAX if no flash
 
yea, it's pretty complete.
brb smoke
 
m59
@Shmiddty yeah that's cool
 
@rlemon
 

« first day (907 days earlier)      last day (4035 days later) »