« first day (1420 days earlier)      last day (3580 days later) » 
00:00 - 19:0019:00 - 00:00

user41796
7:00 PM
I'm wondering if their hash is reversible though
 
user55340
I think it might be... to a degree.
 
user41796
Seems like it might be faster to reverse the hash than to find the string
 
user55340
That's probably the challenge.
 
user41796
We're always dealing with integers, so the "correct" dividing by 37 should result in an integer
 
user55340
First question would be 'what is the maximal unbounded hash for a 9 letter string - does that fit in Int64?
 
user41796
7:08 PM
@MichaelT yes, quite easily
 
I'd imagine you could work backwards pretty easily from the result, with something like "is X / (37 +i) an integer?" as your logic, with 37+(0,15) you aren't going to get many integers
 
user55340
That then means you don't have to worry about sign and % 2^64 vs % 2^63 -1 and such
 
user55340
Next, 910897038977002 - N % 37 == 0
 
user55340
The value of N is the last character in the string... Then do (910897038977002 - N)/37 and you've got a new number and repeat.
 
user55340
680131659347 ==> leepadg
indexOf(g) = 4.
680131659347 - 4 % 37 == 0
680131659343 / 37 = 18381936739
 
7:21 PM
@GlenH7 me too. Just put down my work to look at this haha
I don't even want the job but I want to do it
 
Heh, this is clever
Part of me wants to send them an email just for the hell of it, and basically say "hey thanks for the challenge, was fun!"
 
Did you get it?
 
yes
 
haha ok
I'm giving it a shot now
 
user41796
@enderland I'm doing something wrong. :-(
 
user41796
7:30 PM
The solution I came up with has 10 letters
 
user41796
nope, strike that - I missed the initialization of h
 
I bet you need to change ==0 to ==7
ha
 
i'm going to try to brute force it, just to see how long it runs :D
 
user41796
Just forgot....
 
user41796
Did yours come back with a vegetable?
 
7:34 PM
yeah
 
user41796
or put yours out there & delete and I'll compare
 
user41796
Yeah, I tested mine by running it forward through the hash again
 
user41796
@JimmyHoffa - if brute force takes more than 15 mins then it was faster to reverse by hand. :-)
 
it'd be funny to email them a scanned copy of doing that
also that's not @JimmyHoffa brute forcing it, but @MattGiltaji...
 
user41796
Honestly, I'd go for overkill and compare the performance of automated reversing vs. brute force forward
 
user41796
7:37 PM
As it becomes a stupidly parallel problem on the brute force approach
 
another idea which would be funny would be to get a list of all words using those letters that are 9 characters and check for "correctbatteryhorsestaple" results first
 
user55340
@enderland %37 isn't exactly easy to do by hand.
 
actually now that I think about it, showing the long division for each part WOULD be the finishing touch the ridiculousness of doing it by hand that was missing in my head, especially if it was written out on paper
 
user55340
Technology is a great thing. kickstarter.com/projects/bunchoballoons/…
 
I think we lost @Ampt
 
user41796
8:00 PM
@MichaelT my kids would love that
 
@enderland I wouldn't say I feel like I lost anything...
 
user41796
As a chill fills the air....
 
user41796
can C# recursively call a parallel for each?
 
user41796
(back to brute forcing the Trello hash)
 
hello hello hello!
 
8:08 PM
back
 
user41796
@ampt - yes
 
ok. let me go back and read what you guys did haha
 
user41796
Personally, I just used excel & reversed it
 
Heh
 
oh god damnit. if I would have read @MichaelT's though process I could have saved some time
lmao I should have kept this up
 
user41796
8:11 PM
@Ampt That wasn't the obvious first approach to you?! Tsk!
 
No, I figured that reversing the hash was the fastest way since their "hash" sucked
but I had it backwards with the modulus operation
I did 37 + N
as my modulo
 
Hey I posted before him about using the mod operator
 
I just had to do a straight divide by 37 at the beginning
 
user41796
Thou shalt obey the laws of operator precedence
 
because really, the first characters position is only multiplied the second time through
you start with 7, which gets mulitplied by 37, then you add the place of the character
ah well. It was fun to do on my own :)
the character's value only starts getting multiplied through after the first "round"
 
8:15 PM
I haven't read it yet, but there's an ACM article co-written the current chair of the program I graduated from and the two founders. University News Article ACM Queue Article
Oh hey. My company even gets a mention. Not bad, considering at one time, we had something like a dozen graduates from the program in my office alone. We're down to like 4 or 5 here and 3 in remote sites.
 
I'm sort of glad the only person on the team who knows JavaScript is leaving, it means I can write stuff like this and nobody can complain because they don't know the language at all
    controllerDeps.controllerDeps = controllerDeps
    (() ->
      directiveFunc = (dependencies...) ->
        restrict: 'E'
        transclude: true
        templateUrl: view.templateUri
        controller: ($scope) ->
          view.controller.call controllerDeps $scope
    ).call controllerDeps
granted that's coffeescript which they know even less because it doesn't have curly braces
 
user41796
@JimmyHoffa I CAN HAZ CURL BRAZES?
 
@GlenH7 can....
(I actually rather like coffeescript, it's quite simple)
 
from __future__ import braces
 
@Ampt from __past__ import braces
FTFY
 
8:21 PM
@JimmyHoffa whoosh
 
curly brace languages will be relegated to the likes of cobol in 15 years
 
File "<stdin>", line 1
SyntaxError: not a chance
@MattGiltaji you get used to it
if it's not haskell, and apparently coffeescript, Jimmy don't care
 
@Ampt but, but ... xkcd.com/353
 
I like python just fine
but hey @MattGiltaji, have you accepted Haskell into your home and into your heart yet? If not, I've an article for you to read.
 
user41796
@JimmyHoffa Pretty sure that if I were a mod I'd kick you from the room for that one.... :-P
 
8:37 PM
cant room owners kick??
 
What is this IRC and 1999
 
user41796
@Ampt nope, only mods
 
@GlenH7 you mean I've been biting my tongue this entire time for nothing?!
 
user41796
and it's been fairly rare for this room to need to kick someone and a mod not be around
 
user41796
@Ampt nah, think of how often there's a mod or SE employee in this room
 
8:38 PM
theres 3 sitting in now haha
watching you three
Hey @GlenH7
 
user55340
@JimmyHoffa Non curly brace languages will be relegated to the likes of pascal in 15 years.
 
user41796
@Ampt Apparently not since we reversed the trello hash much more quickly than you did. :-)
 
@GlenH7 I'll admit I wasn't watching then at all
On the other hand, I didn't need @MichaelT and @enderland to hold my hand ;P
 
Jul 10 '13 at 17:11, by GlenH7
and GET OFF MY LAWN ALREADY!!!
 
user41796
@enderland Pretty sure he already knows. Hence the petty comments in retaliation. :-)
 
9:07 PM
@GlenH7 already knows? what are you two raving on about?
 
user41796
Feigning ignorance won't save you on this one... :-)
 
Err am I on your lawn?
or is enderland implying you're old?
 
user41796
yes?
 
user41796
ultimately, he's the whipper-snapper in this case. But he knows that too, so what's the point in feeding his ego by pointing it out?
 
Apparently I need more coffee because this is all out of my grasp at the moment haha
 
user41796
9:12 PM
food coma hasn't worn off yet?
 
yesterday, by GlenH7
I'd agree with enderland's take on the matter
 
@GlenH7 ah crap, I missed lunch
too busy with that hash thing
 
user41796
@MattGiltaji not done yet? :-)
 
@MattGiltaji Hash thing?
you know Hashes are just isomorphisms, right?
 
user41796
2 hours ago, by enderland
https://trello.com/jobs/developer
 
9:14 PM
The other thing that mine does that I'm not sure yours does is account for multiple possibilities. theres a chance that you could get a character that causes a false positive
 
A friend of mine did it in R, pretty beautiful solution with using FP
 
that is HASH - N % 37 == 0 for two different N
 
user41796
@Ampt erm, no
 
user41796
37 is a prime number
 
@GlenH7 I was working on brute forcing, but got lazy and just went the recursive inverting route
 
user41796
9:15 PM
And the available set is much smaller than the number itself
 
@MattGiltaji I totally read this as "reversive incursive route" and was wondering wtf you meant
 
@enderland that sort of stuff is always nice in FP, FP is awesome at data manipulation
 
@enderland well I leveraged the synergy of the web 2.0 parallelism to paradigm shift the answer out
 
@JimmyHoffa I think his solution was about 6 lines of code, maybe 7
 
user41796
@JimmyHoffa Did you notice I dropped a recommendation for FP (Scala) in my answer last night?
 
9:19 PM
@GlenH7 hrmmm
 
user41796
Walk the hash algorithm forward for a few steps; note that you're always dealing with an integer value
 
ok, then it's a feature for larger character sets lmao
 
user41796
As a consequence of always dealing with an integer value, we know that the "correct" answer after dividing by 37 must have a remainder of 0
 
Good afternoon @all
 
I'm saying for possibilities where the number of values to try for N is larger than 37
 
user41796
9:20 PM
since the allowed character set is << 37, there's only one "right" answer at each stage
 
It's a feature!
IT HAS TREES!
 
user41796
@Ampt That wasn't one of the original constraints, but if it were then the problem would be harder to reverse, yes
 
user41796
The brute-force forward approach will get you more trees
 
well then I've already solved the non-existent harder problem on accident
 
I hang mostly over @ Code Review SE but I was wondering if I could ask a few quick questions here
 
user41796
9:21 PM
hence my wondering if C#'s parallel-for-each allows recursive calls
 
@Phrancis go for it!
 
user41796
@Phrancis fire away
 
no guarantee we can help
unless it's about beer. Then we probably can
 
user41796
@Ampt or that we won't start talking about booze
 
Just general questions. :)
 
9:22 PM
(But only if the question is whether we'll help you drink some)
 
@Phrancis Have you accepted Haskell into your home and your heart?
 
"What's the best algorithm to determine the optimal drink order?"
 
@enderland "all of the above"
 
@Phrancis If you answer his questions in the nude, he tends to go away. Always works for us
 
user41796
@JimmyHoffa oh quit scaring new folk already
 
9:23 PM
@GlenH7 I entertain me.
 
@JimmyHoffa I thought that was why we kept @MichaelT around
 
lol
 
@Phrancis we're on the edge of our seats. fire away
 
I should hang out here a little more. Then again we got our share of weirdness over at The 2nd Monitor
 
As long as your shenanigan tolerance is high
;)
 
user41796
9:25 PM
3 hours ago, by GlenH7
See, we start chatting about science and scotch, and the crowds start rolling in. The Whiteboard has the coolest conversation on SE.
 
So: I'm designing a business tool for my media production company. I am building a database using PL/pgSQL
 
user41796
Sorry, we've already claimed the title
 
And the user will interact via an application I will write in Java
My original thought was to design the whole database and stored functions in SQL first, then build the Java afterwards, but I'm having second thoughts
 
have you tried jQuery?
 
^^ negative
 
9:28 PM
good, it doesn't have anything to do with the problem you are trying to solve
 
So you want to know how much time to spend on fleshing out the DB first
 
What I'm thinking now is to design functions and the application side-by-side, one feature at a time
@Ampt yeah basically.
 
how well are the requirements defined?
 
First approach would make the DB fully functional quicker, but I would be the only user able to interact with it, which is not good
 
user41796
Separate out the two problems
 
user41796
9:30 PM
Design your DB & stored procs. Model the DB according to whatever problem you're solving
 
user41796
Better yet, build a unit test suite to validate that the DB works the way you expect it to
 
user41796
Then write some services to expose CRUD access to your DB
 
OK.
 
user41796
The objects the services use will become the business objects that the Java app or whatever other app will consume
 
user41796
Then when your DB or App or business needs change, you can change each piece in isolation of the others
 
user41796
9:32 PM
It's more work up front, but buys you a lot more flexibility and ease of maintenance later
 
user41796
Directly calling into the DB from your app is a recipe for a brittle disaster
 
That's good advice right there, thanks for your input
 
Have you tried storing everything in text files? That always takes care of my DB Problems
 
@Ampt at least use a csv file, jeesh
 
@GlenH7 yeah I've learned that very fast reviewing [php-mysqli] scripts lol.
 
9:33 PM
@enderland use HTML, then parse it with regex
 
user41796
@MattGiltaji So he'll now have 2, 3, or 4 more problems?!
 
@MattGiltaji that was pretty much what regex was invented for
 
nah, was fishing for this
4428
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
I always say that if your regex can't parse your HTML, your html is wrong
 
user41796
106
Q: What is meant by "Now you have two problems"?

IQAndreasThere is a popular quote by Jamie Zawinski: Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. How is this quote supposed to be understood?

 
9:43 PM
Thanks Santa!
 
@Phrancis yes.
one feature at a time
but don't make any of them perfect before moving on, get them working, then get them right
changing something after it's been polished is way more a pain in the ass than while it's still got the construction support framing in place
 
Getting conflicting information @JimmyHoffa @GlenH7 - Pros vs cons?
 
@GlenH7's approach is more ammenable to folks who don't need to come in here and ask for help on their approach - those more likely to get it right in less tries are better off driving towards completion from the start, those who are struggling a bit are generally better served aiming for small milestones and not trying to fit a whole design concept in their head at the beginning
 
user55340
In person interview on the 29th.
 
@MichaelT which person will you be in?
 
9:48 PM
@MichaelT grats
@JimmyHoffa 0.o
 
You know... I wonder where all Jon Skeet's extra rep goes. I mean he repcaps every day be noon
 
user55340
@Ampt he has a meta post about that somewhere...
 
I bet Joel has a giant pool scroodge mcduck style filled with all that extra rep
2
 
@JimmyHoffa I may go that route. I'm pretty solid with SQL but know nothing about Java so this will be a learning experience for me
 
let @MichaelT = CaptainAmerica in suit <*> @MichaelT >>= interview
 
9:53 PM
What's everyone's top-pick beer?
Personally I dig most IPAs, especially the very hoppy ones
 
user55340
Send email back double checking the reimbursement on milage... if I did my math right, they'd be reimbursing me about $200, when it would only cost me about $25 for gas (do people really have that sucky of mpg?)
 
psr
@enderland I had a MUMPS REPL open so I just did it there in one line. It did print it backwards. Do I get the job?
 
DELETE FROM Work WHERE User = 'Phrancis'; GO
See you all next time, thanks for the advice!
 
@MichaelT how far did you drive? $200 in gas would drive my car most of the way across the US
 
user55340
@MattGiltaji I would drive about 180 miles down and another 180 back. At $0.55/mile this is $99/leg which is... well, high.
 
10:02 PM
@MichaelT thats a pretty intense daily commute
 
user55340
My car gets upwards of 45mpg... and I can do that trip on 8 gallons. Assuming that gas is $4/g thats $32
 
user55340
@MattGiltaji thats for an interview - not commute.
 
@MichaelT ah, key difference
 
psr
@MichaelT No. But your car wears out faster. The number is based on some portion of the overhead being amortized into the mileage as well.
 
user55340
@psr I know... still, $0.55/m just seems a bit high.
 
psr
10:04 PM
@MichaelT I think the IRS comes up with that number and everyone just uses that.
 
user55340
I can check (I keep tabs on car costs for all parts), but I doubt that my car is > $0.10/mile.
 
@MichaelT did you take resale depreciation into account as well?
 
user55340
For the last 6 months (gas, tuneups, etc..) I have $0.038/mile
 
psr
@MichaelT or at least the sticker price/years you think it will last.
 
user55340
Over the entire lifetime of the car, its been $0.043/mile
 
psr
10:06 PM
@MichaelT counting purchase price?
 
user55340
Including the purchase price of the car, its $3.02/mile
 
psr
@MichaelT So depending on how long the car lasts .55/m could be reasonable
 
@MichaelT the fact that you keep track of this data is really cool
 
user55340
Possibly. Wish I still had my old car data... my '96 geo metro ($8k new) is still in good shape (my brother has it).
 
user55340
 
user55340
10:16 PM
You can see quite clearly the seasonal variation there.
 
@MichaelT what is the name of that app?!
 
very cool
 
user55340
That old geo metro though... I sometimes got 50 mpg with it.
 
user55340
And then there were the absurd times when I was going to Tahoe in the winter... I'd fill up in the valley, get up there, fill up at a gas station just before heading down... that heading down gas mileage was abusrd.
 
user55340
10:20 PM
(the gas station I'd fill up at - looks like its not so much there anymore google maps)
 
user55340
Nope, street view shows its still there.
 
user55340
16
A: Has anyone ever hit the rep cap in a day with no posted questions or answers?

Jon SkeetI've definitely reached the rep cap for the day before posting anything. It's very rare that I don't post anything on Stack Overflow. But there have been a few times that's happened (when I've been on holiday) yet I've still hit the rep cap. As an example, according to my user profile it looks l...

 
user55340
Side bit on that $0.55/mile type thing... shortly after I moved to CA I got called for jury duty in Madison. I called them and pointed out that I'd be happy to serve, but the distance is about 2000 miles. The wording on the summons suggests that they pay for that round trip each day which I thought might be a bit expensive.
 
11:36 PM
Guys help
Google is down
No seriously, I can access every website except Google
 
00:00 - 19:0019:00 - 00:00

« first day (1420 days earlier)      last day (3580 days later) »