Readit News logoReadit News
ScottWhigham commented on Medium-hard SQL interview questions   quip.com/2gwZArKuWk7W... · Posted by u/thomzi12
deepsun · 6 years ago
Checked just the first two answers:

1. MoM Percent Change

It's better to use windowing functions, I believe it should be faster than self-join.

2. It seems that the first solution is wrong -- it returns whether "a"-s parent is Root/Inner/Leaf, not "a" itself.

I'd instead add a "has_children" column to the table, and then it would be clear.

Second solution works, but without optimization it's 1 query per row due to nested query -- slow, but not mentioned.

ScottWhigham · 6 years ago
Yep. Same here. I stopped reading after the second solution. I liked the questions though - just maybe the answers were too myopic.
ScottWhigham commented on Duolingo launches a craft beer brewery 'based on science'   brewolingo.duolingo.com/... · Posted by u/shacker
ScottWhigham · 8 years ago
April Fools or real? Hard to tell this time of year...
ScottWhigham commented on How to Work Out What to Charge Clients   smashingmagazine.com/2017... · Posted by u/charlysl
ryanwaggoner · 8 years ago
I already pointed out that you pay the other half of SE tax, but that’s at most 7.65%, and since SS is capped, for many high-income self-employed workers it’ll be less.

And yes, you pay income tax, but no more than you pay as an employee, so it’s not relevant here.

In fact, you now almost certainly have a huge advantage if you’re self-employed: in addition to being able to write off more and save more for retirement pre-tax ($55k), you now get a 20% deduction of your net profit if your taxable income is below $157k single / $315k married, which most self-employed folks will be.

Healthcare is still by far the biggest cost difference most people will face but even if you add all these things up, they don’t represent anything even remotely close to 50%.

ScottWhigham · 8 years ago
50% of your revenue goes towards taxes, office space, and buying products and services to support your business.

Healthcare is still by far the biggest cost difference most people will face but even if you add all these things up, they don’t represent anything even remotely close to 50%.

I beg to differ. For a family of four in Texas, we paid nearly $15,000 per year for insurance and that's deemed a "good policy" (not great) meaning that it has a good PPO, most docs are in network, and most medications are $10-$50. Insurance premiums don't scale with income and that's not accounted for if I read your arguments correctly. If we compare two families of four led by "a freelancer" (as we're talking about here) in Dallas and one freelancer makes $100k but another makes $200k, both have to pay the same $15,000 per year in health insurance premiums. For the $100k freelancer, his health insurance takes up 15% of his gross revenue - that's absolutely going to get him close to or above @ollerac's 50% figure. Maybe not so for the $200k freelancer who only has health insurance account for 7.5% of gross revenue.

ScottWhigham commented on Amazon changes its review policy   madgeniusclub.com/2017/12... · Posted by u/fern12
randomerr · 8 years ago
Great idea. At least they get some cash with a real name attached to the review. I hope they don't allow those pre-paid Visa cards.
ScottWhigham · 8 years ago
I don't know that the banks "tell" vendors "This purchase was made with a pre-paid credit/bank card" - I've not seen a flag that shows that before.
ScottWhigham commented on A Case of Stolen Source Code   panic.com/blog/stolen-sou... · Posted by u/uptown
HurrdurrHodor · 9 years ago
"There’s no indication any customer information was obtained by the attacker. Furthermore, there’s no indication Panic Sync data was accessed."

Read: The attacker could have accessed all that data but didn't send me an e-mail telling me that he did.

ScottWhigham · 9 years ago
It wasn't their production environment that was compromised; it was their source code repository.
ScottWhigham commented on Cold Does Not Increase Odds of Catching Cold (2016)   nytimes.com/2016/07/19/up... · Posted by u/georgecmu
koonsolo · 9 years ago
Do you know against what you had the allergic reaction? Because most season based allergies are during summer with grass pollen and the like.

I'm asking because my daughter also has allergy in winter, but they didn't discover against what (no dust-mites or anything like that)

ScottWhigham · 9 years ago
I have the same "cold" allergy. I can walk into a room that is 10 degrees F cooler than, say, "normal indoor temperature" and if my quads/thighs are uncovered (shorts, for ex.), I will immediately start sneezing.
ScottWhigham commented on Musical Chord Progression Arpeggiator   codepen.io/jakealbaugh/fu... · Posted by u/sergiotapia
ScottWhigham · 9 years ago
This is so great - my 12yo son, a gaming fan, loved it. It inspired him to say, "That's so cool! Can we play Obduction now?" Kids today...
ScottWhigham commented on Microsoft SQL Server 2016 Express   hub.docker.com/r/microsof... · Posted by u/itaysk
kennethh · 9 years ago
You have to have the Enterprise Edition to setup a cluster and then it starts to get expensive.
ScottWhigham · 9 years ago
Not quite - you can cluster essentially every edition of SQL 2016 except Express Edition.
ScottWhigham commented on Ask HN: Do you still read RSS feeds?    · Posted by u/nodivbyzero
ScottWhigham · 10 years ago
Yes, daily. I was and still am a big user of FeedDemon.

u/ScottWhigham

KarmaCake day1881June 4, 2008
About
http://www.learnitfirst.com/, founder http://twitter.com/ScottWhigham http://www.scottwhigham.com/ - music

Email me at first.lastname@liamg.com

Dallas, Texas

View Original