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

07-08-2016 , 12:02 AM
Quote:
Originally Posted by muttiah
postgres. I've never heard anyone at my company say it differently
It's a bit of a joke.

We had a huge "giff" vs "jiff" argument in OOT.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 12:03 AM
Quote:
Originally Posted by muttiah
I've heard the rule is to take your current hourly and go 1.5x or 2x because you'll end up doing more work than the hours you can bill them.
I told them I could give them 10-20 hours/week. I get the feeling these guys have a lot of funding and they're looking to build up as fast as possible.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 12:54 AM
Quote:
Originally Posted by RustyBrooks
Which level am I on in the programmer matrix if I can pronounce PostgreSQL correctly?

Don't worry, I probably can't.
I would think you supersede the matrix, thus all O(1).

Post-gres-Q-L. It's okay, I probably used it for 2 or 3 years before I decided to look it up.

Quote:
Originally Posted by Noodle Wazlib

@dave,

sorry to hear it
eh, I probably screwed it up. The test was interesting, but had some ambiguity. Without getting into too much detail, the question called for a "normal distribution" with every output being unique (this is contradictory, right?), unless you run out of values, then recycle.

So, my strategy was to use a matrix. It is possible that I could have used a tree or a map of matrices. The matrix was easiest to create, so went with that.

I started by going full-on deterministic and deleting fields I used as I went along, vying to work that end out, as that would guarantee unique values. For the recycle, recur the function and rebuild the matrix. I then wanted to work out where the probabilistic parts were.

The first [i] would be deterministic until each unique i was used, then possibly probabilistic, but I'm not sure. It was possible they wanted either (N, N+1, ...., N+n) or they were looking for a random permutation of that.

The second [i] was possibly randomized until each unique i was used, then recycle back, depending on what relations were left of the (first [i]) <-> (second[i]). Once again, I'm not sure if it was supposed to be totally randomized or deterministic.

With first[i] and second[i] chosen, choose third[i], and so and and so forth.

This was for real. It was more involved than that, requiring I/O and possibly joining data together (ambiguous as well). Definitely the hardest take home test I've had yet. If you were to search the company name this was from, Google auto-completes "{company} take home test answer."

Overall, I enjoyed it. I wish I had someone to ask for clarification in real time. I'm sure I would have nailed it.

Last edited by daveT; 07-08-2016 at 01:02 AM. Reason: removing ambiguity, I hope...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 02:46 AM
I've heard "Post-Seequel" more than once...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 08:49 AM
We just say postgres
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 11:50 AM
The only reason I know how to pronounce it is because we've had this exact same conversation before itt
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 05:17 PM
weirdest thing about this job is how you can just randomly stumble on something thats just great that you've somehow managed to never hear of. This week's contestant is http://www.mailgun.com
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 05:46 PM
The more I think about that test, the more I think I should have used a tree. Not only would the memory be lower, searching and deleting nodes would be faster. Actually, a red black tree may have been best.

Reminder for next time: don't be lazy.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 06:00 PM
what kind of job was this for? just wondering why they'd be testing you over something like that

took a short hiatus from ruby, starting to get back into it. seems like every scary-sounding, ambiguous term in programming (in general) ends up being a lot easier than you'd expect. Examples so far: lambdas, meta programming, polymorphism, binary search trees, recursion.

I'm sure there's more, but some of these are the ones that, as I've been learning, seemed like they'd surely be incredibly complicated or complex before I read up on them, but really aren't that bad.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2016 , 07:42 PM
It was for a back end web engineer. To be fair, the question was real world.

I think algorithms are fairly simple; the challenge is getting raw data into proper data structures. With that said, there are algorithms I find difficult.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2016 , 02:36 AM
Quote:
Originally Posted by Noodle Wazlib
what kind of job was this for? just wondering why they'd be testing you over something like that

took a short hiatus from ruby, starting to get back into it. seems like every scary-sounding, ambiguous term in programming (in general) ends up being a lot easier than you'd expect. Examples so far: lambdas, meta programming, polymorphism, binary search trees, recursion.

I'm sure there's more, but some of these are the ones that, as I've been learning, seemed like they'd surely be incredibly complicated or complex before I read up on them, but really aren't that bad.
I don't think i've ever seen something referred to as a lambda when I was browsing Ruby resources. I have seen it (and implemented it) in Python. It's very not-scary. It's basically the equivalent of an anonymous callback in Javascript (except with 'Pythonic' rules in Python ldo).

Recursion is one of those things that so many people seem to find scary but it really isn't. I've always explained recursion like the following... Recursion has only 2 things you need to do :

1) exit condition so that the recursive call can exit and return some value
2) updated parameters for the next recursive call

Thats it. Sound simple right? Here is a bit of pseudo code to illustrate that :

Code:
function recursion(initialList, finalList) {
	var finalList = finalList || [];
	if (_.isEmpty(initialList)) {
		return finalList
	} else {
		// perform some logic && compute a new list of arguments to pass into the recursive call
		return recursion.apply(null, new_array_of_args)
	}
}
Super simple imo.

Actual example might be...

Code:
function recursion(initialList, finalList) {
	var finalList = finalList || [];
	if (_.isEmpty(initialList)) {
		return finalList
	} else {
		var updatedFinalList = [].concat.call([], finalList, initialList.shift())
		return recursion.apply(null, [initialList, updatedFinalList])
	}
}
Assuming no errors, this is basically the recursive version of...

Code:
function twoPlusTwo(originalArray) {
	var array = []
	for (var i = 0; i < originalArray.length; i++) {
		array.push(originalArray[i])
	}
	return array
}
or if you prefer the non-noobish equivalent of the for loop (imo)

Code:
function twoPlusTwo(originalArray) {
	return _.map(originalArray, function(element) {
		return element
	})
}

Last edited by Craggoo; 07-09-2016 at 02:51 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2016 , 08:42 AM
https://rubymonk.com/learning/books/...ambdas-in-ruby

Oddly, I thought they didn't exist in Ruby either, but I'd actually learned about them on Ruby monk before.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-10-2016 , 02:48 AM
Recursion isn't simply a matter of a function calling itself over and over again. There is a fairly precise definition of recursion, which says, according to wikipedia: a method where the solution to a problem depends on solutions to smaller instances of the same problem.

Recursion calls for a "base case" that returns the final value.

Prototypical examples include factorial, which I'm kind of surprised Cragoo didn't use, since it is very good for ternary operations. where the base case is 0! = 1:

Code:
function factorial (x)
return x == 0 ? 1  : x * factorial (x - 1)
Another recursive problem is a palindrome.

Is "hannah" a palindrome?
is "anna" a palindrome?
is "nn" a palindrome?
is the final result "": return true.

A binary tree:
If you go left, you still have a binary tree
Go right, you still have a binary tree.
Base case: you've reached a node.

Recursion can be difficult because it is not always obvious what the base case should be, and it is not always obvious that a problem can be broken down into successively smaller pieces of the same problem. For example, I don't find it intuitively obvious that the Tower of Hanoi can be broken down into a simple and repeating algorithm of moving pegs. The base case, no more moves possible, is obvious.

There are variations on what the base-case is. In successive approximation and fixed point algorithms, the base case is actually epsilon (a margin of error).

It isn't always obvious that certain algorithms don't need an epsilon and will complete if given any input and enough time. A classic example is the Ackermann Function.

Recursion is based off of recurrences (hence the similar name), and it isn't always intuitively obvious how to even get started and even how to end. Heck, some aren't even intuitively obvious they can be recursive in the first place. See Concrete Mathematics for a slew of examples.

Some recursion requires memoization, hence dynamic programming.

Recursion and iteration are very different at the stack level.

Did I forget to mention TCO?

Recursion is not easy. It is pretty deep stuff.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 12:45 PM
Oh FFS I finally figured out why for the last week a bunch of cars have stopped outside my house for a few minutes or slowly driven by. Any guesses?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 12:50 PM
pokemon?

wife found one in the house the other day, it was all I could do to keep from fumigating the place!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 01:29 PM
yeah gym right outside my house whatever that means. Should put up signs obv.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 04:31 PM
I think gyms are places where you fight pokemon. I'm also pretty sure gyms are supposed to be at public places like parks. If it is a nuisance, maybe write to whoever created the game and ask if they can move the gym.

My roommates have been talking non-stop about the game, but I'm not catching too many details. There are already 1,000 30 minute long tutorial and info videos on YouTube.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 04:59 PM
So apparently my work VPN now won't connect from Starbucks. This is a disaster. I work remote 100%. My plan was to hit the road for a few months and log in from Starbucks when I need to for meetings and such.

I might have to look into some kind of cel solution. I have had my iphone long enough I can unlock it. Worth it so I can tether? And can I still tether only by unlocking?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 05:05 PM
Quote:
Originally Posted by daveT
I think gyms are places where you fight pokemon. I'm also pretty sure gyms are supposed to be at public places like parks. If it is a nuisance, maybe write to whoever created the game and ask if they can move the gym.

My roommates have been talking non-stop about the game, but I'm not catching too many details. There are already 1,000 30 minute long tutorial and info videos on YouTube.
I don't play but it's basically cheap Pokémon virtual reality. They overlay Pokémon over live feed from your camera. You randomly catch/fight the ones you encounter then go to gyms to battle other players.

They can literally appear anywhere. Guy even caught one while sitting with his wife during labor.

Sent from my SM-G900R4 using Tapatalk
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 05:26 PM
So it looks like my work VPN is blocked from Coffee Bean and Pete's too. I guess there's some easy way to tell if you're on a public wifi network?

As an added bonus Coffee Bean also blocks 2p2. You get a big red X - GAMBLING.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 05:39 PM
You mean connect via wifi over your phone and tether your laptop?

I know you can use your iPhone as a wifi hotspot but that uses your data plan
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 05:40 PM
Yeah they used to charge you like $30/month for that back in the day. Looks like it's free now. I will try it when I get home and have a cable. Hopefully my work VPN doesn't block that as well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 05:45 PM
I would guess the issue is Starbucks network, not the device doing the connecting. But I'm no great shakes at network security anymore
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 05:53 PM
He is saying use phone's data as the network.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-11-2016 , 06:23 PM
Quote:
Originally Posted by suzzer99
Yeah they used to charge you like $30/month for that back in the day. Looks like it's free now. I will try it when I get home and have a cable. Hopefully my work VPN doesn't block that as well.
Just make sure pokemon go still works while you're tethering. :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m