Open Side Menu Go to the Top

07-22-2017 , 05:03 PM
Quote:
Originally Posted by OmgGlutten!
hackerrank interview crap:

your friend is in prison with a window made up of vertical bars and horizontal bars. he can remove bars before the prison guard shows up. given numberofbars, let him know how big of a hole he can make?

first test case
numberofbars = 6, expected output from algorithm = 49

if you draw 6 lines like bars horizontally and vertically there are 49 cells but what in the name of hell?

if the bars are 6 feet for example, you still cant get more than a 36 feet squared hole.

STRAIGHT AIDS.
I think they are trying to ask for "how many holes they can have." This sounds like a variation of a pizza slicing problem, but very poorly worded.

I wouldn't kick myself too hard for this one. The pizza slicing problem is the opening of Knuth's Concrete Math, and not something the average college student would ever be exposed to, much less a self-taught. It's a recursion, really, but still quite tricky to wrap your head around.

As written, the question is really stupid. Remove all the friggin' bars and run, lol.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
07-22-2017 , 10:06 PM
130 players playing my game at 10pm on a saturday holy crap. If only I could make $ off it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-22-2017 , 11:55 PM
Quote:
Originally Posted by Grue
130 players playing my game at 10pm on a saturday holy crap. If only I could make $ off it.
What game? Find out what they like about it best and improve on that. Slack was a gaming company but they realized that their customers liked the chat feature more than the game itself.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2017 , 02:30 AM
Its an adaptation of a creative commons board game that plays 5-10 players per table, so this runs 3-7 games at a time. Cool to see it being used but not sure where to go from here.

At the least it seems to be doing just fine on my $10/month DO box so thats good.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2017 , 12:14 PM
Last month, my site had more than 26k page views. Made $10.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-24-2017 , 03:16 AM
Going through Essential Scala ebook got me reading about Algebraic Data Types. 1 hour later I find myself reading stuff online about Category Theory and then Haskell.

Don't do functional programming guys, it's a gateway drug to learning Haskell.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-24-2017 , 07:56 AM
Quote:
Originally Posted by Barrin6
Going through Essential Scala ebook got me reading about Algebraic Data Types. 1 hour later I find myself reading stuff online about Category Theory and then Haskell.

Don't do functional programming guys, it's a gateway drug to learning Haskell.
Haha! I thought Haskell was the defacto gateway to learning functional programming?

Sent from my SM-G900R4 using Tapatalk
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-25-2017 , 11:45 AM


LOL
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-25-2017 , 02:00 PM
Amazing
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-25-2017 , 11:18 PM
Well, they're kind of right. There are *more* vectors for a print job on USB than one from attachments, which of course doesn't mean they're safe.

I'm supposed to be at defcon/blackhat this week but I'd already made plans for a vacation and my boss had told me 6 months ago when I planned it that they'd be in early August. Whoops. So meanwhile we launched a few new features to coincide with those conferences and I'm not around for that and neither is the FE guy. Good news is, seems to be going fine.

I was literally doing the prod deploy with my keys in the ignition preparing to leave on vacation.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-25-2017 , 11:42 PM
Got a stupid Ruby question.

I'm looking at two example codes that basically do the same thing...

Code:
class MyApp < Sinatra::Base
# do stuff
&

Code:
module Sinatra
  module ExternalAPI
    module Methods
# do stuff
So, as far as I understand, example #2 would work despite the fact that Sinatra is not defined beforehand, and example #1 will crash if Sinatra is not initialized beforehand.

I'm not sure why anyone would ever use example #2, and I think, of hand, that the justification I found on SO is utterly batty.

I know I said this is a question: what is going on in these examples (assume that ExternalAPI is being used somewhere in the class in MyApp)?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2017 , 09:32 AM
Quote:
Originally Posted by daveT
stupid Ruby
fixed that for ya
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2017 , 01:33 PM
Quote:
Originally Posted by daveT

I know I said this is a question: what is going on in these examples (assume that ExternalAPI is being used somewhere in the class in MyApp)?
If I understand your question, this example might clarify: https://repl.it/JjjM/0

It boils down to the fact that you can re-open classes/modules dynamically in ruby. Which you can do lots of clever things with, but you probably shouldn't.

Code:
# some library class you haven't included yet
class Test
  def monkey_patched_method
    puts "Hi, I'm monkey patching before we've even done a require"
  end
end

# now let's include the library (similar to require 'sinatra')
class Test
  def library_defined_method
    puts "Hi, sinatra defined this"
  end
end

t = Test.new
t.monkey_patched_method
t.library_defined_method
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2017 , 05:05 PM
Lol finally had my first blowup. Dude gets banned by a mod for calling someone a bundle of sticks, appeals to me on discord, I back up the mod.

He flips out and says "this is who I am", I say "well try being better" and ban him from discord. Duh.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 12:54 AM
anyone going to defcon? thinking about doing a last minute thing...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 10:50 AM
I'm looking at a SQL server table and all the non-date fields are defined as nvarchar 500. This seems dirty and wrong but I don't have a real reason why other than the amount of time wasted converting numeric unnecessarily. Anyone got a better reason not to do this?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 11:08 AM
Need some advice. Yesterday interviewed a (giant) company for a contract to hire role. For whatever reason (and I usually don't) I told the 3rd party recruiters what they wanted to hear which was the minimum I would work for, for both the contract hourly part and the full time pay I'd need to stay on, $foo. Interview went fine, at the end I'm chatting with the hiring manager and he was trying to sell me on $foo * 0.9 salary with a 10% bonus he "always gets". I was non commital.

I hear back late yesterday from the recruiter that they want to bring me on. Here's the verbatim text (yes, text..):

Recruiter: Hey Grue, this is Bar with Baz. We're all set with the contract pay. The perm salary options are as goes: $foo * 0.9 with bonus or $foo with potential bonus (depends on performance of you and what happens with the other contractors on the team). He can't guarantee the bonus at $foo but can guarantee 10% bonus with a $foo * 0.9 salary.

Me: Yikes. Not really what I'm looking for. Will have to think about it.

Recruiter: Its more than possible you will get the $foo with the salary but can't promise it right now. Bonuses are paid out in Feb, so it wouldn't be until 2019 thatyou'd be elgible for it and by that point you could easily negotiate the bonus or have a different/higher role.

Thoughts? I'm kinda thinking to tell him to go **** himself tbh. Job would be fine, same stuff, I'm reallllly in demand though. $foo expensive but not unreasonable for this market that I know well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 11:09 AM
2x post
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 11:46 AM
Seems dumb that they can't pro rate the bonus but I guess that's standard. Sounds like you don't need the raise and aren't excited by the job so why change?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 11:51 AM
Obviously, don't give an amount of money that you don't actually want to work for. You're not obligated to work for that amount of money, but its not surprising that's what they're coming to you with.

Best play at this point (depending on your actual interest) might be to reply that after thinking about the job / learning about the company / etc. you actually want foo * 1.3 (or whatever) to work there and see where it goes. You might annoy them because you make it seem like you don't really like the job and just need the money, but it probably doesn't matter since the alternative is that you turn them down.

Edit: Also, if its a guaranteed bonus it should be in your salary. Otherwise its not guaranteed and will get cut first as soon as the company has money problems / needs to cut costs / etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 12:25 PM
Quote:
Originally Posted by kerowo
I'm looking at a SQL server table and all the non-date fields are defined as nvarchar 500. This seems dirty and wrong but I don't have a real reason why other than the amount of time wasted converting numeric unnecessarily. Anyone got a better reason not to do this?
The whole point of DB datatypes is to make it impossible to have corrupt or inconsistent data. That is the most important reason not to do this. Also, those datatypes (like all datatypes) provide hints about semantic intent to developers -- that is, it makes the meaning of columns easier to understand -- a point of paramount importance if the names are ambiguous, and at least some usually are. CPUs wasted in conversion ranks far below both of those.



Quote:
Originally Posted by Grue
Thoughts? I'm kinda thinking to tell him to go **** himself tbh. Job would be fine, same stuff, I'm reallllly in demand though. $foo expensive but not unreasonable for this market that I know well.
If you're really in demand, why wouldn't you hold out for a great offer? Why would a borderline or bad one even be a consideration?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 02:42 PM
Recruiters suck.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 03:34 PM
Yeah I more or less straightened them out so off to my next challenge in a couple weeks etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 05:14 PM
Contract + "too hire" / "for further work in the future" / "bonus in 2019" is a human promise, not a JavaScript promise.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-27-2017 , 05:18 PM
Quote:
Originally Posted by Wolfram
fixed that for ya
I'm reserving my judgment...

Quote:
Originally Posted by gaming_mouse
If I understand your question, this example might clarify: https://repl.it/JjjM/0

It boils down to the fact that you can re-open classes/modules dynamically in ruby. Which you can do lots of clever things with, but you probably shouldn't.

Code:
# some library class you haven't included yet
class Test
  def monkey_patched_method
    puts "Hi, I'm monkey patching before we've even done a require"
  end
end

# now let's include the library (similar to require 'sinatra')
class Test
  def library_defined_method
    puts "Hi, sinatra defined this"
  end
end

t = Test.new
t.monkey_patched_method
t.library_defined_method
Thanks. I think you're showing me function-overloading, but what I've been finding is more like undefined method throws no errors, the ability to write .Net in Ruby, and other odd-ball things. I'm guessing that the reasons are all really off-the-wall "I can do this because I can" stupid, so I won't do example #2.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m