Time |
S |
Nick |
Message |
14:59 |
|
pulsar |
so... we will be attending to a career-trade show this month and there will be a contest: find 3 bugs, win an ipad. |
14:59 |
|
pulsar |
attendees can choose between swift, javascirpt and java. |
14:59 |
|
pulsar |
here is what i came up with so far: https://gist.github.com/pulsar256/9d0ea31a26a98791eca5e68ef4994877 |
15:00 |
|
pulsar |
too easy? too hard? |
17:12 |
|
|
nanoz joined ##friendlyjava |
21:22 |
|
aditsu |
pulsar: are you organizing it? |
21:26 |
|
pulsar |
nope |
21:26 |
|
pulsar |
@aditsu |
21:26 |
|
pulsar |
its organized by an university |
21:26 |
|
pulsar |
i am just there representing "our" company. |
21:27 |
|
aditsu |
it seems that you are writing the program in which others need to find bugs; I thought the organizers are supposed to do that |
21:28 |
|
pulsar |
its a career trade show with many booths |
21:28 |
|
pulsar |
where students can talk to the devs / company representatives |
21:29 |
|
pulsar |
my intention is to show on a big screen how ppl do *really* work over at our place |
21:29 |
|
pulsar |
so no stock photos of ppl on the phone taking notes |
21:29 |
|
pulsar |
instead of this i show photos of workspaces with lots of junk on the desk |
21:30 |
|
pulsar |
and screenshots of ppls dev environments |
21:30 |
|
pulsar |
+ that contest in our booth, find bugs, win some expensive crap. |
21:30 |
|
aditsu |
ok, so you *are* organizing the contest |
21:31 |
|
aditsu |
which is local to your booth |
21:31 |
|
pulsar |
thats what i was trying to say, yes :) |
21:32 |
|
aditsu |
and you're looking for candidates to hire? |
21:32 |
|
pulsar |
kinda, yeah. |
21:32 |
|
aditsu |
ah, "expensive crap" - very well said |
21:33 |
|
pulsar |
looking for good ppl and trying to get their attention. |
21:33 |
|
pulsar |
ipad, yeah ;) |
21:33 |
|
aditsu |
why not give actually good stuff? |
21:34 |
|
pulsar |
like what? |
21:34 |
|
aditsu |
I don't know.. a Nexus device, a blackberry priv, something like that |
21:35 |
|
aditsu |
anyway, I looked at your gist and easily saw 4 bugs |
21:35 |
|
pulsar |
there are just 4 |
21:36 |
|
pulsar |
too easy, eh? |
21:36 |
|
aditsu |
I can show you a couple of puzzling things, just a minute |
21:36 |
|
pulsar |
well.. keep in mind that the visitors will be junior level. |
21:37 |
|
|
sfisque joined ##friendlyjava |
21:38 |
|
aditsu |
(things I previously posted) |
21:38 |
|
aditsu |
http://codegolf.stackexchange.com/questions/21741/strange-ways-to-keep-an-endless-high-cpu-usage/21772#21772 |
21:38 |
|
* pulsar |
reads |
21:38 |
|
aditsu |
http://codegolf.stackexchange.com/questions/28627/program-that-adds-all-natural-numbers-and-yields-1-12/29924#29924 |
21:39 |
|
aditsu |
this is probably the toughest: http://codegolf.stackexchange.com/questions/27089/throw-a-null-pointer-exception/27100#27100 |
21:48 |
|
pulsar |
cpu2 is easy |
21:48 |
|
pulsar |
one... still puzzled. not spoling myself. |
21:50 |
|
pulsar |
oh, w8... the comment, right? |
21:51 |
|
pulsar |
yeah :) |
21:51 |
|
pulsar |
thats a classic, "dont look at the mistake" puzzle. |
21:53 |
|
pulsar |
a nice one though. too tough for juniors. infinite byte loop is more adequate |
21:53 |
|
aditsu |
check out the other ones too |
21:54 |
|
pulsar |
looking at the natural numbers |
21:54 |
|
pulsar |
on the first glance (few secs) it looks like a signed/unsigned issue |
21:54 |
|
pulsar |
but that would be too easy |
21:55 |
|
pulsar |
.... and it is... |
21:55 |
|
pulsar |
that easy. |
21:55 |
|
pulsar |
npe |
21:56 |
|
pulsar |
i can think of few issues, but that one is not obvious |
21:57 |
|
pulsar |
so, what i guess is an autoboxing problem |
21:58 |
|
aditsu |
when I look at the one adding all natural numbers, after a long time of not seeing it, I tend to think it's a 31-bit vs 32-bit issue (i.e. not reaching the max), when in fact it doesn't run at all |
22:01 |
|
pulsar |
heh.. i was right about autoboxing, but the explaination is new to me. |
22:01 |
|
aditsu |
yeah, it's a very weird and unintuitive behavior |
22:01 |
|
pulsar |
if it was not stated there is a bug in that code, i would never notice it. not in a life time. |
22:14 |
|
|
crumbee joined ##friendlyjava |