Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

03-23-2012 , 09:25 PM
neko,

i'd like to thank you. your version:

1. taught me that True and False cast to 1 and 0 which is shockingly reasonable for python.

2. with 1., i figured out what's going on in xhad's version.


xhad,

eat a dick your version suxxxxxx

Last edited by tyler_cracker; 03-23-2012 at 09:25 PM. Reason: == was too hard for me :cry:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2012 , 10:44 PM
Quote:
Originally Posted by Neko
argggg. Totally spaced on this today and now it looks like they're sold out already

I guess I'll stick with Linode for now, or maybe give prgrmr a try. Anyone used them?
nah i dont think so.. i was awake and their site was getting DDOSd. the site finally got back online but the payment system was down. i dont know if theyre sold out or still filtering hax. i was trolling them in IRC
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2012 , 11:02 PM
Quote:
Originally Posted by Neko

Code:
total_comp = salary + bonus*(result > 10000)
booyah.
Definitely the best solution.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 07:39 AM
Quote:
- if you really do want to test that the pixels are getting drawn correctly, here are a few
Yeah that's not what I want to test eventhough it kind of sounds like that in my post. Agreed that that would basically be "testing the framework". What I want to test is that certain stuff gets drawn (existance) not that it's drawn correctly.
I.e. I have a level and want to test that player, enemy etc. are drawn/exist...I think I'll just write a test for draw that simply does player.draw and whatnot

Thx for being my rubber ducky

Also it's moot since it seems Rubygame is better for what I want to do than Gosu anyways (especially since I've worked with PyGame before). Gosu seems fairly limited feature wise

Quote:
Definitely the best solution.
Variable names need to be better. I'd rename salary to base_salary or something and total_comp would become slalary (compensation etc. are also fine but total_comp...what's that total_computation...total_computers_in_stock). I think salary = base_salary+bonus makes the most sense semantically.

Quote:
Your logic means you believe people should only ever declare immutable variables. It's not practical or reasonable.
If it's not practical or reasonable, can it at least be *cough* functional?

Also all this salary code reminds me of a funny quote from a programmer I interviewed who wasn't supergood at ze English (we hired him)...interview went something like this
"I see you worked on a couple of OS projects, that's nice"
"So uh why do you want to work here?"
Answer
Spoiler:
salary is not None

Spoiler:
Which resulted in a nice discussion about true, false, none, [], is, == etc

Last edited by clowntable; 03-24-2012 at 07:55 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 08:57 AM
Just to be clear I was kidding with the best solution comment above (it was just the coolest to me). I think its pretty clear that the best solution is:

Code:
total_comp = salary
if result>10000:
  total_comp +=bonus
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 10:15 AM
I agree with candybar. Adding the salary to the bonus is not reflective of the true salary. The salary has not changed, thus using "total_comp" I'd better.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 10:21 AM
Quote:
Originally Posted by clowntable
Also all this salary code reminds me of a funny quote from a programmer I interviewed who wasn't supergood at ze English (we hired him)...interview went something like this
"I see you worked on a couple of OS projects, that's nice"
"So uh why do you want to work here?"
Answer
Spoiler:
salary is not None
haha that's pretty good.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 12:46 PM
Quote:
Originally Posted by clowntable
Thx for being my rubber ducky
the guys on my soon-to-be-former team are buying a rubber ducky for the express purpose of facilitating rubber duck debugging. they're naming it "tyler" so that when people come in with questions they can say, "go ask tyler!" even though this.tyler will be living 800 miles away.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 01:26 PM
maybe 20 or 30% of the time i start typing up a question to post on SO, the process of having to type it up coherently for others to read leads me to the answer.

nevertheless, reading that article makes me wonder: what is it about programming/math/engineering, in particular, that attracts people who enjoy instructing others by being smug know-it-alls? You see it in pedagogical methods of the literature, in forums, in classrooms, and in chat rooms. I think the time saving aspect quoted by Bob is a red herring. The real reason, I think, is that math/science are still dismissed or derided by the mainstream, and so great talent and hard-won knowledge go unseen and unappreciated by everyone but fellow nerds. so when people suddenly have the little sliver of power that comes with the position of teacher, they get a rush like a vegan child tasting pixie stix for the first time, and it brings out the worst in them. or am i being too generous?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 01:34 PM
Quote:
Originally Posted by gaming_mouse
maybe 20 or 30% of the time i start typing up a question to post on SO, the process of having to type it up coherently for others to read leads me to the answer.
Omg this! Although my brain works slower than most peoples so the epiphany hits me about 30 seconds after it's posted
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 01:38 PM
i will be the first to tell you that i'm a smug know-it-all, but the reason i encourage people to do stuff like talk to ducks or read documentation is that these methods are more instructive for the recipient than when i just tell them the answer.

to use our good friend the poker analogy, i can say that you should raise pf or fold that river, but that won't make you a better poker player. if i get you to explain why you didn't raise pf or to do some math on your river decision to determine the answer for yourself, that *will* make you a better poker player.

edit: oh, and the reason you see this more in STEM than in other fields is that those of us in STEM are all semi-autistic robots with no feelings to be hurt by feelings of inadequacy. wait that's just me again, innit...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 01:47 PM
I think that with science, maths, computing etc there is generally one correct answer to the problem wheras other subjects are more highly debatable. This makes being pedantic a lot more easier
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 01:54 PM
Quote:
Originally Posted by Gullanian
I think that with science, maths, computing etc there is generally one correct answer to the problem wheras other subjects are more highly debatable. This makes being pedantic a lot more easier
My thoughts are similar, though in a slightly more cynical direction; if there isn't a provably right answer, you can't succeed as a know-it-all. (this is also why people like scientists get less respect than they deserve in the mainstream; even if they're saying things that are provably right, it does no good because the average person doesn't understand the proof)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:21 PM
Quote:
Originally Posted by tyler_cracker
i will be the first to tell you that i'm a smug know-it-all, but the reason i encourage people to do stuff like talk to ducks or read documentation is that these methods are more instructive for the recipient than when i just tell them the answer.
tyler, i didnt meant my comments to be directed at you btw, i was thinking of the "Bob" in the article, and many real life counterparts of him i've known. i def agree that it can more instructive to let someone reason something out on his own, but there is a way to encourage that without being an insufferable pedant.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:23 PM
Quote:
Originally Posted by Gullanian
I think that with science, maths, computing etc there is generally one correct answer to the problem wheras other subjects are more highly debatable. This makes being pedantic a lot more easier
Quote:
Originally Posted by Xhad
My thoughts are similar, though in a slightly more cynical direction; if there isn't a provably right answer, you can't succeed as a know-it-all. (this is also why people like scientists get less respect than they deserve in the mainstream; even if they're saying things that are provably right, it does no good because the average person doesn't understand the proof)
all good points.

so the upshot is: the whole world would be insufferable pedants if they could, but it's usually only math/science disciplines that provide the proper soil for the impulse to grow.

i like that even better than my theory!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:26 PM
Quote:
Originally Posted by Gullanian
Omg this! Although my brain works slower than most peoples so the epiphany hits me about 30 seconds after it's posted
yeah i've noticed the "epiphany upon hitting submit" phenomenon many times too.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:27 PM
gm,

i didn't think you were talking about me. besides, how can i be first to tell you i'm a smug know-it-all if you say it before me!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:36 PM
another thing this conversation reminds me of:
http://en.wikipedia.org/wiki/Hacker_koan

one of my faves, courtesy esr:

Quote:
Originally Posted by http://catb.org/jargon/html/koans.html
A novice was trying to fix a broken Lisp machine by turning the power off and on.

Knight, seeing what the student was doing, spoke sternly: “You cannot fix a machine by just power-cycling it with no understanding of what is going wrong.”

Knight turned the machine off and on.

The machine worked.
zen and its intellectual siblings have long had an influence on computer culture. i'm not an expert on eastern religion but the notion that enlightenment cannot be given to you but must be gained through personal insight is extremely applicable to our field. we've all had colleagues who "don't get it". how would you go about teaching someone who "doesn't get it"? you can't. you can only lead them down the path and hope they see "it" for themselves.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:41 PM
this one speaks less to my point, but i enjoy it as well (subsequent cultural developments in scientology and battlestar galactica add further seasoning to this story for me):

Quote:
A disciple of another sect once came to Drescher as he was eating his morning meal.

“I would like to give you this personality test”, said the outsider, “because I want you to be happy.”

Drescher took the paper that was offered him and put it into the toaster, saying: “I wish the toaster to be happy, too.”
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 02:44 PM
oh and one last, pragmatic point: i seek to always be replaceable (if you can't be replaced, you can't be promoted! sometimes you can't even go on vacation!). this means that junior guys on my team must know how to find the answer or solve the problem without me. they won't develop those skills if i always spoon feed them.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 03:52 PM
Another ruby/testing question...I think I just have a mental block or something.

I have roughly this code structure
Code:
class LolClass
  def yay
    a_method
    b_method
  end
end
I want to test that a_method and b_method are called inside yay (possibly also want to test they are called in that order)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 03:56 PM
Quote:
Originally Posted by tyler_cracker
gm,

i didn't think you were talking about me. besides, how can i be first to tell you i'm a smug know-it-all if you say it before me!
omg, you smug know it all!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 04:45 PM
clown,

options are similar as before: mock LolClass or LolClass.yay; or check the output/result of a_method and b_method.

gm,

does this mean you are now Enlightened?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 04:45 PM
Quote:
Originally Posted by tyler_cracker
oh and one last, pragmatic point: i seek to always be replaceable (if you can't be replaced, you can't be promoted! sometimes you can't even go on vacation!).
I think this is super important. It's also a sign of confidence that you can continually do your job well and be valuable without having to rely on past successes to provide you with job security.

I haven't worked with a single person who was proud/happy of being a single point of knowledge (or failure) that I really liked working with.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2012 , 05:52 PM
Quote:
Originally Posted by tyler_cracker
gm,

does this mean you are now Enlightened?
nope, if i were enlightened, i would have written:

"tyler, what is the meaning of 'first'? how can one person say something 'before' another? there is an error here -- can you find it?"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m