Flagg, while I must complement you on your tactical trolling in the Snowden thread, I've really got to question your choice of weapons. So much high megatonnage trolling has been thrown around in that thread that people's detectors are off.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 7:27 pm
by Flagg
Questor wrote:Flagg, while I must complement you on your tactical trolling in the Snowden thread, I've really got to question your choice of weapons. So much high megatonnage trolling has been thrown around in that thread that people's detectors are off.
No comment.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 7:39 pm
by adr
you want to know who are super brave people?
terrorists
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 7:49 pm
by Flagg
adr wrote:you want to know who are super brave people?
terrorists
I don't disagree with this statement.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 7:51 pm
by adr
anyway i just got asked an interview question on the internet for the lols
and i fucking failed it. miserably
they axed me to implement the C function strstr. i tried to do it efficiently and ended up doing it TOTALLY WRONG
it passed the first trivial test
then failed the second slightly more complex test
fixed that and it failed the third slightly more complex test
fixed that and it was STILL failing the fourth, this time trivial again, test
and then the interviewer said it is 2x longer than it has to be and had zero speed advantage
so i said fuck it and rewrote it the most stupid simple way i could think of
took 2 minutes and passed all the tests the first draft's descendants failed, while hitting the length guideline too
i guess if i'm ever asked that in a real interview i'll have to remember to keep it simple. try to get fancy and and i'll get it wrong and that's like the anti-impressive
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 7:57 pm
by Oxymoron
adr wrote:i guess if i'm ever asked that in a real interview i'll have to remember to keep it simple. try to get fancy and and i'll get it wrong and that's like the anti-impressive
This. I don't think I have much experience in programming, but so far, all I've seen point to "the simplest the method, the shortest the code, the better" being a good rule of thumb when thinking about how to go about things.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 7:58 pm
by Questor
Flagg wrote:
Questor wrote:Flagg, while I must complement you on your tactical trolling in the Snowden thread, I've really got to question your choice of weapons. So much high megatonnage trolling has been thrown around in that thread that people's detectors are off.
No comment.
I do have to admit, my analysis of Snowden is roughly the same as yours (at least the one you post in that thread), I just would never say it on SDN... well, sort of.
I think he's an impulsive dipshit who's in so deep he can't figure out how to crawl back out. Snowden saw something, copied it off and talked to newsies impulsively, then didn't want to pay the consequences of that action, so he ran. Then he realized that running to a country like China was about as good an idea as if the Rosenberg's had bought tickets on the Aeroflot Flight 101. It doesn't matter if he gives info to the chinese intelligence agency (and my guess is that they are staying as far away from him as they can, he looks like he might have been trying to, which ups the stakes from Pentagon Papers to The Rosenbergs in terms of how the government has to treat it.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:02 pm
by Questor
adr wrote:i guess if i'm ever asked that in a real interview i'll have to remember to keep it simple. try to get fancy and and i'll get it wrong and that's like the anti-impressive
I find this to be a relatively good idea in programming in general. Doing shit like side-effecting assigments and other fancy shit just causes problems. Make you code exactly as complicated as it needs to be to solve a problem.
Unless of course your a "code as art" developer, but then again, most of them work in languages that are more conducive to that.
what i was trying to do here was implement it in better than O(m*n) time. the boyer-moore algorithm can do that, but i only vaguely recalled how it worked and tried to do my own thing based on that and totally fucked it up, and ended up at the brute force solution by roundabout by the time it worked...
now on simple code itself one time i got criticised by the same guy asking this question for writing this:
and he said " i would have just written "return i&1;" and that you didn't raises red flags to me
i&1 did come to mind but i rejected it thinking of shit like ones-complement machines and worrying maybe there's another edge case i didn't consider
but granted i could have still said "return i%2 != 0;" but i don't like that either because != 0, unless you specifically want "is not equal to zero" strikes me as a double negative
and i'd rather spend a brain cycle on reading longer code than double-thinking to ensure that double negative is indeed what i meant
i guess it is valid, if my brain needs an extra few seconds to think that through maybe that is a legitimate liability
but meh
BTW my code and return i&1 compile to exactly the same thing
if you can think of a simple optimization like that, odds are good that the compiler already knows it.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:19 pm
by Oxymoron
Yeah, when your code is optimized so much in its written form that it become hard to read for a human, maybe you should take a step back and think about the poor guys who will have to maintain it and weigh it with the advantages you expect from that optimization.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:28 pm
by Questor
adr wrote:and he said " i would have just written "return i&1;" and that you didn't raises red flags to me
Fucking C nuts... I mean he's right that it will work, but still.
Optimizations that don't compile differently are stylistic.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:29 pm
by adr
At best the guy is ADR, at worst he's a spy.
BTW of course he's a spy, he worked for the NSA!
"i meant a CHINESE spy!!!!!1111!!11!!111"
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:31 pm
by Questor
Hey, ADR,
Have you ever played with functional programming? I'm thinking of taking a flyer into it for some of my more data driven tasks.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:34 pm
by Oxymoron
Isn't C all about the functions ?
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:38 pm
by adr
questor:
a little bit. i haven't done haskell or f# or whatever (though i have done some common lisp) but the principles are somewhat known to me and i have used them in D and javascript
i have a love/hate relationship with what i know. when my mind conceives of the program in functional terms, i love it
otherwise i think it is incomprehensible code golf (Python has this thing called 'list comprehensions'. more like list incomprehensions amirite? though i find if i read them with the part of my brain that speaks SQL it isn't so bad. but more often than not i program with the C speaking part of my brain, and thus tend to prefer stupid simple procedural code)
the other key parts, immutabilty, no side effects, stuff like that i think are generally parts of good code anyway, though sometimes functional drives it too far
what the fuck is a monad anyway
beats the hell out of me
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:39 pm
by adr
Oxymoron wrote:Isn't C all about the functions ?
functional programming is different though, it is about functions that return functions that otherwise don't change things
adr wrote:though i find if i read them with the part of my brain that speaks SQL
This is the part that is really drawing me to it - And I'd be doing F#, I think, to provide interoperability with C# and VB.NET - functional programming just seems to make so much sense when dealing with datasets.
Admittedly, LinQ goes a long way towards bringing the same stuff to C#.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 8:57 pm
by adr
yeah, i think it is pretty elegant there
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 9:13 pm
by Questor
What's sad is that my favorite series on MS products (X Unleashed by SAMS) doesn't cover F#.
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 9:57 pm
by RogueIce
Oxymoron wrote:you should take a step back and think about the poor guys who will have to maintain it
Isn't deliberately averting that known as "programmer job security"?
Re: Testing Chat IV: A New Hope
Posted: Sat Jun 22, 2013 10:02 pm
by Oxymoron
That guy may be you in a year or two, after you have completely forgotten what you had in mind, so...
I don't read it as such. I read it as more fatigue with what SDN represents, rather the mindset that worships dogman and placating preconceptions rather than exploring or discussing ideas. I've ranted about this on various ways here enough that people should know I feel the same way about shit like SDN, SB, or vs debating in general, so Chuck's frustrations can really stand out for me as well.
You could just as easily say its frustration at the whole ST vs SW/ASVS type stuff as it is about SDN, but you really can apply it across the board to alot of mindsets. I've found similar problems in hard scifi (or many specualtive technology groups) and lots of other franchises besides ST vs SW. Heck, I have enough issues dealing with people who 'worship' the 40K shit I do, even when I'm arguing with them over what I myself posted because I didn't want it becoming tribal.
Heck part of me wonders if this might not also be aimed at his own popularity, as Chuck has clearly moved form the realm of being simply an 'opinionated fan' and elevated to 'celebrity' where people clearly take his opinion as gospel (like alot of other internet 'commentators/critics/what have you') While I've never been on chuck's level (or Mike or Curtis' for that matter) I've had to deal with it in my own small way, and it can be incredibly frustrating, especially when people form their opinions about you on the basis of what other people (those who like your stuff) say, rather than as you are.