HNHacker News
TopNewBestAskShowJobs

dcherman

178 karma · joined October 4, 2013

submissionscomments
dcherman··on Google engineer finds USB Type-C cable that’s so bad it fried his Chromebook
Honestly, I don't think he'd need a case against Amazon for this. If the original company refuses to pony up and Amazon was made aware, I feel like they'd just do it since it would be good PR to help make it right since what he's doing is a huge service for Amazon's customers.
dcherman··on Enable Node.js to Run with Microsoft's ChakraCore Engine
Some of that is possible, but some of that is not. Consider the use case of WeakMaps or Proxies that cannot truly be polyfilled, they need to be implemented at the language level.

Suppose you could transpile what is possible, then throw errors otherwise, however that would involve parsing each file in an NPM module which is probably an unreasonable task performance wise.

dcherman··on Freeze-dried poop pills being tested for obesity treatment
Given the option between eating less and swallowing frozen poop, I think eating less will prove to me the more attractive offering.
dcherman··on For the Wealthiest, a Private Tax System That Saves Them Billions
I don't make nearly that much (I wish!) but as a middle-class taxpayer in CT, here are my feelings on the matter.

I am most certainly not opposed to the idea of taxes since society cannot function without the government providing some essential services. That said, I am opposed to paying a dime more than entirely necessary as it stands today because I see so much of my tax contributions being wasted.

* Medicare ineligibility to negotiate rates

* Military projects that are vastly over budget

* Government budgeting practices that promote blowing your entire budget at the end of the year so that it's not cut the next

* Excessive and abusive pension amounts for public employees

* Refusal to appropriately discipline public employees (police) for wrongful conduct

I can keep listing more, however before I am asked or required to send in another penny to be spent, I personally would expect at least some of these issues to be addressed, at least where spending is concerned. Until progress is made in these areas, then I will continue to be staunchly opposed to any tax increases and will do whatever I can to lower my own tax bill. If I feel my money is being wasted, then I may as well be the one wasting it rather than the government.

dcherman··on 3D Printed Revolver
Newer powders are hard to make, but black powder is actually relatively easy to make from what I understand. You certainly won't be shooting modern quality ammunition, but guns are still possible. The .38 special was originally a black powder cartridge if I'm not mistaken. That's why the case is so large compared to the actual quantity of modern gunpowder that you use.
dcherman··on Another Dell root certificate discovered
Wait what? It doesn't even at least parse the URI to ensure that it's a dell subdomain? Damnit Dell.
dcherman··on Words matter in ‘ISIS’ war, so use ‘Daesh’
Are you really going to pull out the PC card for ISIS/Daesh?

I'm sure I'll be downvoted for this, but I really couldn't care less about their feelings. At all.

dcherman··on What does it feel like to be fired from Google?
It also depends on what you mean by commit. Are we talking 5 commits in 1 merge request (Git style), or 5 individual pieces of code to be reviewed separately?

In any case, I think 5 per week is extremely reasonable; I actually do less these days. I used to commit a dozen or more times per week, but these days I tend to work on the larger and harder components that people require. That means more thought and more design. It's not doing less work, it's just doing harder work.

This person may also have had review reponsibilities. Doing a truly thorough code review takes time to complete, and that time is time that you're not coding. It's important though; I may not be coding while I'm reviewing, but I'm sharing knowledge with a dozen other developers who hopefully learn from it (as I learn from others reviewing my own code). In aggregate, I hope that my lack of frequent commits actually helps the company rather than hurts it since hopefully I'm enabling many others to do better work.

dcherman··on How Bad Will It Get for American Express?
For some card holders, it may be worth it to transition to another no annual fee card rather than closing the account itself. Age of credit is one important component of your credit score, and my AMEX is my second oldest account.
dcherman··on Drool: automated memory leak detection in JavaScript
Very cool! I was going to be sitting down soon to reason about the $compile step in Angular 1 to see if there were any leaks. It'll be interesting to run this against my test case and see what pops out.

Thanks!

dcherman··on Microsoft Edge gets native ECMAScript 7 async/await support in latest build
I'd be curious about one potential downside to this (v8 specific, maybe others too)

Functions that contain a try/catch cannot currently be optimized by V8. If we migrate to using try/catch rather than `.then/.catch`, I wonder if there's going to be any perf implications since previously optimizable functions may no longer be optimized.

dcherman··on The Debate Around “Do We Even Need CSS Anymore?”
It's not actually that terrible, but then again it depends on what you're building I suppose.

Where I work, I made a fairly robust image diffing utility that runs using Selenium/WebDriver on all browsers that we support. Combined with a robust test suite of many different scenarios, we can make changes to our stylesheets with a pretty high amount of confidence that if anything changed, it'll fail the build.

dcherman··on Angular 2 Survey Results
That barely qualifies imo. The plugin mechanism is just prototypical inheritance - you're just adding methods to a prototype, nothing more.
dcherman··on Google OnHub Review
Has nothing at all to do with either NAT or the Firewall rules; it has to do with routing. Assuming your modem/router has this capability, all you should need to do is set up a static route pointing to the network/subnet that the devices behind the other router. You should not need a corresponding route on the other router because since it's on both networks, it already has a route to the other network. Even if it didn't, the default gateway on the router is the modem which can take care of routing the packets correctly. This is all assuming that the modem/router combo is assigning an IP on a private network/subnet to the additional router.
dcherman··on Remembering When Driverless Elevators Drew Skepticism
The corner cases are extremely important and are only "rare" relative to the overall number of people driving. When you have 100MM cars (not a researched number) on the road, that one in a million chance happens 100 times every day!

I've had this same argument at work a few times and although I fully admit the idea of a self driving car may be safer in the future, you will not be seeing me in the first few generations of these cars. I generally don't consider myself a luddite, but this is one area where I will prefer manual control for quite a while.

dcherman··on ES6 in Depth: Classes
This is not a hard and fast rule and I have no idea if there is any pattern, but I reserve getters for trivial properties like `firstName + " " + lastName;`

If it does any non-trivial amount of work, then I always use a function. The reason for that is in codebases that I've worked on in the past, getters were heavily overused and people ended up writing code that while at a glance seemed entirely reasonable, it was actually doing an absurd amount of redundant work and was causing performance issues. I feel that requiring the `()` to invoke it as a function at least hints that "this does stuff" rather than hiding the implementation in a getter.

Does that make sense?

dcherman··on These Polymer Drop-Downs Used by Google Are TERRIBLE UX
Doesn't look like you can actually scroll with a mouse either. I mean the scrolling itself works, but the dropdown closes on mouseup.
dcherman··on We have a problem with promises
Be careful with that assertion. jQuery's `.then` method has returned new Promises since 1.8.

In jQuery 3.0, their Promises will be fully Promises/A+ compliant as long as you're using `.then` ( `.done` and `.fail` are remaining non-compliant to remain non-breaking with sync XHR I believe )

dcherman··on We have a problem with promises
Bluebird has this built in. For a quick userscript where I needed something similar, I created this which works ( warning: no unit tests, but it works for me )

https://gist.github.com/dcherman/4dfba0d72c008ee5b59d

It's a reduce function, but it could work as a forEach as well.

dcherman··on Replacing jQuery with D3
Javascript is perfectly fine. I think you mean the DOM is historically an unusable mess, but even that is getting better these days.
dcherman··on Rogue antimatter found in thunderclouds
"people in his lab refused to peek through his microscope eyeviewer because what he said they will see there should not have been possible."

Ah yes, the ever popular "Nyah Nyah Nyah I can't hear you" scientific method. I wonder how much progress has been held back due to scientists like that.

dcherman··on IBM's Watson will be used to make decisions about cancer care in 14 hospitals
I don't understand this mindset of not using technology due to a lack of trust. I can easily understand not blindly following an AI's findings, however they should probably be item #1 for the attending doctor to investigate.

The worst case scenario is that the doctor disagrees with the findings and continues investigation. The best case scenario is that you hit the nail on the head much more quickly than if it was an entirely manual process.

dcherman··on Exercise is good, but it won't help you lose weight, say doctors
I used to be obese when I was younger. It's true that I had a pretty horrendous diet, however I blame say 80-90% of the problem on my overconsumption of soda.

After learning about nutrition, it was horrific just how easy it is to down 1000 ( or more! ) calories of soda every single day without breaking a sweat. At 3500 calories per pound of fat, that's 3.5 lbs/week or 182 lbs worth of fat each year.

I still assert to this day that even if I completely let my diet go and ate like garbage, I doubt that I could eat enough junk to get back to the point where I was.

dcherman··on AngularJS Antipatterns and Pitfalls
That shouldn't even be a Promise imo. That should be an expression on your directive that is called with the selection.

`on-select=handleSelection( selectedItem )` or something.

dcherman··on AngularJS Antipatterns and Pitfalls
I completely disagree with the assertion that controllers should be as lean as possible, but I agree that the specific example that he gives is atrocious.

When it comes to controllers, I only have a few rules:

1. Never, EVER use $scope.$digest or $scope.$apply in any controller method. If you find yourself needing this, then you're missing a call in a spot higher up the stack ( event handler, websocket callback, etc.. ).

2. $timeout is acceptable if you legitimately need a delay - don't use it for control flow, ever. $evalAsync can be useful for coalescing multiple calls to a function into one during a digest cycle.

3. Minimal DOM manipulation. I will not say there's never a use case for DOM manip, but it should not be your first instinct most of the time. If it is, then take a step back and grab some coffee, go for a walk, and then look again. Often times, I'll use a variable instead and add a watcher on it in my directive to do the DOM manip. One can argue that it's needless overhead having the watcher, however I feel it's more in the spirit of Angular and does not contribute excessive overhead. If it does, then you can start making optimizations in the future after it's been proven that they're actually a problem.

dcherman··on Do engineers really make better spouses?
You do need credit though unless you never intend on financing a car or purchasing a house with a mortgage.

While it may be entirely feasible to get along your entire life without financing a car by either purchasing used cars or inexpensive new ones, for 99% of people ( including myself ), it's extraordinarily difficult to purchase a home in a reasonable amount of time ( 10-15+ years saving required for a barebones house most likely ).

You could argue that prices are like this due to the easy availability of credit ( see 2008 or the problems with student loans/college prices ), but that doesn't change the reality that some things are extremely expensive and for nearly all people will require some type of loan. At that point, not having a good credit score will cost you dearly in much higher interest rates.

As for my kitchen, the reason you gave it exactly the reason that I did it. Although I did net an additional 100$ or so in interest over the course of the year as well due to it being in my savings account ( yay!...kinda? ), the primary reason was in the event of an emergency. Any emergency that would require an additional $10,000 is likely to be medical, family, or loss of job related. Since I have insurance, that means that the most likely scenario is family or job related; in either instance, the availability of cash to help a member of my family out or pay my mortgage for 6 months would be more important to me than the costs associated with financing that card for a period of time. In addition, I would still be able to pay the card off by selling a bit of stock, however I wanted the additional liquidity by having cash on hand. I don't make decisions like that lightly; all of those scenarios were considered before I decided to go the 0% card route.

dcherman··on Do engineers really make better spouses?
If you treat a credit card the same as cash, then there is literally no difference in how much you should be spending, but you need the discipline to actually do that.

There are a number of benefits to using credit cards that cash doesn't have:

1. Build a credit score

2. Fraud protection

3. Related to 2, but if I lose my card it's not a huge deal, cancel it and get a new one. If I lose 300$ cash, it's just gone.

4. Rewards! ( 1-3% back on 20K spending per year is a few hundred bucks )

5. Extended Warranties. Often times, you can get an extra year or more on warranties through your credit cards. That's why I put my new kitchen appliances on my Amex.

6. Free loans! I re-did my kitchen last year at about a 10K cost. Although I had the cash to do so, I instead signed up for a new card with 18 month 0% interest. That gave me another year and a half of saving before paying that off, so it's less of a hit to my balance at once. IMPORTANT I would not have done this if I did not have the cash to pay this off at any point in time.

It's really, really simple too - just pay off your statement balance in full each month and you'll never pay interest. I can count on one hand both how many times I've paid interest, and how much I've paid in interest. All of them were due to my own screw ups with scheduling payments ( off by a day - oops! ), however I've benefited far more from the cards than I've ever paid out. In most of those cases, the banks waived the fees anyway since there was a track record of 3-5+ years of never missing a payment, always paying in full.

dcherman··on “Implement text editor DOM updates manually instead of via React”
Instead of using a timer or a one time selector, just add a new CSS rule via a style tag

(function() { var style = document.createElement( "style" );

   style.innerHTML = "[data-reactid] { background: rgba(255,0,0,0.1); }";
   document.head.appendChild( style );
}());
dcherman··on Federal Court Throws Out Six Weeks of Warrantless Video Surveillance
What do you mean the person himself is not unlawful? The presence of that person in this country is illegal which may be used as an adjective. That person is also an immigrant which is a noun. That person is "an illegal immigrant". Am I incorrect?
dcherman··on Why I’m Giving Up My Passport
I don't know how accurate this statement is, but I find this pretty ironic.

"The extraterritorial reach of the income tax dates from the Civil War, when the government wanted to prevent Americans from fleeing to Britain to avoid taxes."

← PreviousPage 3 of 4Next →