Better HN
topnewbestaskshowjobs
Log inSign up

Merad

2,800 karma · joined Mar 14, 2015 (11y ago) · 772 submissions

Submissions

comment 5y ago · link · parent

> everyone is looking into trendy redux replacements now

A lot of people are probably soured on redux forever (that's how these things tend to work) but they've done a really great job with their hooks based API and especially the redux toolkit/RTK Query. Getting started today using the toolkit is so much more straightforward and easier to understand that it feels like a totally new library. If you're still living in the old school redux world of trying to explain containers vs components, mapStateToProps, how to build reducers from scratch, how to organize ducks, etc., you really should take a look at the newer tooling.

comment 5y ago · link · parent

What are some of the libraries you're thinking of?

comment 5y ago · link · parent

> Only upgrade when absolutely necessary.

Gotta disagree with this part. If you're making a web app package updates really need to be done on a regular cadence, ideally every quarter, but twice a year at minimum IMO. In the .Net world at least it feels like most responsible open source maintainers make it relatively painless to upgrade between incremental major versions (e.g. v4 -> v5). If you put off upgrades until someone holds a gun to your head so that your dependencies are years out of date, you're much more likely to experience painful upgrades that require a lot of work.

comment 5y ago · link · parent

+1. I have a Brother HL-5250 that's 15 years old. I think I paid $250 for it, but it has to be one of the best pieces of technology I've ever bought. It's been a while since I looked at its internal counters but it probably has printed close to 50k pages. The printer itself is still 100%. About 5 years ago something gave out in the paper tray and it stopped feeding correctly, but these days I don't print more than a couple times a year so I just load paper manually in the front tray.

comment 5y ago · link · parent

Alternative headline: Home Depot discovers a way to introduce power tools that can fail due to software bugs.

comment 5y ago · link · parent

Can you elaborate? The Postgres documentation leads me to believe this would work fine with the default (READ COMMITTED) isolation level. If multiple transactions attempt to modify the same row (incrementing the counter) they're forced to line up until previous updates to that row have been committed or rolled back, hence the risk of lock contention, but each transaction should consistent view of the counter.

comment 5y ago · link · parent

I'm sure someone will correct me if I'm wrong, but isn't it simpler to manage this sort of functionality by putting a counter in a table and using a CTE to increment it along with the insert? Something like

  with u as (
    update organizations
    set last_external_id = last_external_id + 1
    where id = 123
    returning last_external_id
  )
  insert into incidents (organization_id, external_id, title)
  select 123, last_external_id, 'Blah blah blah'
  from u;
The risk here of course is running into lock contention around the organization table there's a high volume of incident creation for the same organization, but considering the context (incident management) that seems pretty low risk.

comment 5y ago · link · parent

I don't know about use of the store in general, but if you use the MS store to buy a Windows license they automatically convert your account and link the license to that account.

Source: built a new PC a few weeks ago and naively assumed they'd just give me a product key or ask how I wanted to receive it.

comment 5y ago · link · parent

With respect either you left out some major details or you have a skewed perspective of what it means to be "doing ok." My position matches what you stated almost exactly (low 6 figures, single, childless, 17 year old Toyota) and I'm doing _very_ well. I bought a house last year, max out my 401k and Roth IRA contributions with additional savings on top, have a decent emergency fund, paid off my student loans five years early...

I'm not trying to brag, but a single person making six figures should be doing quite well anywhere in the US. I really suggest sitting down and carefully tracking how you spend money for a month or two to find out where it's going.

comment 5y ago · link · parent

It sounds like (based on this comment and several of your other replies) that you get joy out of running a business and using them to play games to minimize your taxes. That's great, you do you, but to me it all sounds exhausting. If I wanted to learn painting, or play with 3d printing, or whatever, then _that's_ what I want to put my time and effort into. I really don't care if I'm leaving a thousand dollars on the table in potential tax write-offs. That's a perfectly acceptable price to pay to just enjoy my hobby without having to spend any time thinking about managing a business or trying to optimize every single aspect of my life.

comment 5y ago · link · parent

The USAF is acutely aware of the risk, and there are already policies in place, according to articles I read a few years ago, limiting usage of the anti-ballistic missile defenses for this reason. For example if North Korea launches a missile at the US, they will only attempt to intercept it using anti ballistic missile interceptors based in Alaska. Launching from ABM sites in the lower 48 at a target coming from the DPRK would result in interceptor trajectories crossing China, and no one wants to take that risk (the launch of an ABM interceptor looks a hell of a lot like the launch of an ICBM).

comment 5y ago · link · parent

What they mean is that, with a normal React SPA, the html content sent to the client will be little more than something like `<div id="react-app"></div>`. After the JavaScript loads, react hooks into this div and starts filling it with the html it generates for your app. With SSR, that div will be populated with html when it’s downloaded - this is the html that was rendered by the server. When the page is first rendered it will look like your app, but it’s totally static html. The JavaScript has to load and react has to take over managing the html within that div before any of the interactive content (think: button click handlers on so on) will be functional.

comment 5y ago · link · parent

Good grief, that pattern looks like it's effectively building a stack trace by hand. Does node not provide stack traces with errors?

comment 5y ago · link · parent

This is part of the prosperity gospel that some evangelical Christians believe.

It may feel like you don’t have enough money to give more to the church on top of the demands of your life. It might feel like it’s irresponsible. But that’s just god testing your faith. By opening your wallet to the church you’re demonstrating your faith and showing that you’re worthy to receive the financial gifts and success that god _wants_ to give you.

comment 5y ago · link · parent

I think GP is pointing out that most people who own an ICE vehicle aren't used to having any limits on refueling their vehicle. If they need to take a long trip they just go. In the vast majority of the country there's a gas station at basically every interstate exit and refilling the tank takes 5 minutes.

All of a sudden with an EV you most likely need to plan your route around charging stations and allow for charging time. This isn't to say that EV's are bad or that they should be avoided - simply that most people don't think about these things in advance and may be surprised the first time they take a long trip with an EV.

comment 5y ago · link · parent

I don't do much Python, but logging is a problem that's been thoroughly solved in just about every other language I've used. Why on earth would you reach for a half baked homemade solution?

comment 5y ago · link · parent

If you're really interested in the topic look up the YouTube channel Greg's Planes and Automobiles. In addition to a deep dive series on the P-47 just a few weeks ago he made a video about late WW2 "super prop" fighters. They were the pinnacle of piston engine fighter performance, but they were all canceled because they weren't needed to win the war and everyone could see that jets were the future. We'd probably struggle to beat them even with modern technology TBH.

comment 5y ago · link · parent

> Proper value types (Even .NET is only catching up since C# 7.0)

In C# structs are value types, and they've been with .Net since the beginning IIRC. I assume maybe you're referring to System.ValueTuple? It was added in C# 7 and allowed tuples to be value types along with significantly better syntax for working with them.

comment 5y ago · link · parent

Was able to find it through Tokien Gateway (a really great reference, BTW), Letter 213: http://tolkiengateway.net/wiki/Letter_213

> From [Tolkien's] works one could deduce the Christianity but not perhaps the Roman Catholicism, except that one critic related invocations the Elbereth and Galadriel's character to Catholic devotion to Mary. Another saw lembas, which fed the will and became more potent when fasting, as derived from the Eucharist.

comment 5y ago · link · parent

Pretty sure that the GP is referring to the effectiveness of lembas. It's described as being extremely nutritious so that one bite can fill a man's stomach and keep him on the march all day.

I'm fairly certain that Tolkien actually stated that lembas is a reference to the Eucharist. No doubt he had experience with hardtack, but IRL hardtack isn't really known for being nutritious or pleasant to eat.

comment 5y ago · link · parent

I'd expect that a company the size of Samsung is able to negotiate data plans at least an order of magnitude cheaper than anything available to the average consumer.

comment 5y ago · link · parent

They probably used to play flight simulators (I did). The vertical ticker on the left is airspeed in knots. Ticker on the right is altitude in feet. Then underneath the left ticker find the word SIM, directly beneath it is the plane's current mach number, and diagonally below and to the left of that is a counter that tracks the highest G load the plane has sustained (it goes to 8.4 right as the pilot passes out then peaks at 9.1 during the pull out).

comment 5y ago · link · parent

> After all, if all these cards weren't used for mining but for gaming, wouldn't the environmental outcome be the same?

I would assume miners keep these cards pegged at 100% 24/7. By comparison very few games actually push graphics cards to 100% utilization, especially when you're talking about top of the line cards like the nVidia 3000 series, and on top of that very few people play games for more than a couple hours per day. A card in the hands of a gamer probably consumes only a small fraction of the power that same card would in the hands of miners.

comment 5y ago · link · parent

I could have sworn I got an update that they had started shipping them but their site says the ETA is the end of this month.

comment 5y ago · link · parent

The Ultimate Hacking Keyboard supports a trackball or trackpad attached to the right half. The expansion modules just recently became available though so it may be hard to find reviews or people with hands on experience.

comment 5y ago · link · parent

> I love how immediately obvious it is that the Harrier cockpit lets you see downwards.

That's mostly the camera angle. The F/A-18 and F-35 cockpit shows have the camera positioned about where the pilot's head would be (looking straight ahead through the HUD) whereas the Harrier photo has the camera positioned higher looking down into the cockpit.

comment 5y ago · link · parent

> There are very few that I could actually recommend, like Malwarebytes

This used to be the case, but the commercial/enterprise cloud version of MBAM (required by my company) is godawful. It seems to call out to its cloud back end every time an executable launches, and it murders performance. It's most obvious in terminals when it causes a simple command that should run in < 1 second to take 4-5 seconds.

comment 5y ago · link · parent

Yep, I'm unable to load some channels and DM's are failing to send.

comment 5y ago · link · parent

Indeed. It's very mild contamination, but enough to affect radiation sensitive scientific and medical equipment. https://en.m.wikipedia.org/wiki/Low-background_steel

comment 5y ago · link · parent

I've seen people cause all kinds of problems with hooks, but I don't believe I've ever seen deadlock. Can you elaborate?
1
131415
26