Better HN
topnewbestaskshowjobs
Log inSign up

Merad

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

Submissions

comment 4y ago · link · parent

The article contradicts its own title. This isn't a new route, the same polar route was used 35 years ago up until the cold war ended and they were allowed to overfly Russian airspace.

comment 4y ago · link · parent

> But if an attacker steals a token, they can make that same API call and charge a card to pay themselves.

I can't speak for every payments product but in the one I work with tokenized cards are tied to one merchant. A compromised token can only be used to process payments to that merchant.

comment 4y ago · link · parent

In the US contracts aren't very common for average employees. I assume that executives and maybe upper management have contracts, but not the peons. Most of the US also has at-will employment so they don't _need_ a reason to fire you.

comment 4y ago · link · parent

We use a tool called AutoFixture to automatically generate objects being tested. It will automatically mock constructor dependencies, so a change like you described doesn't require any test changes unless the new mock requires some setup for the test to pass.

comment 4y ago · link · parent

Lazy loading has been disabled by default since EF Core came out.

comment 4y ago · link · parent

Whoever wrote that code either doesn't know the framework or perhaps is doing a custom implementation for some performance optimization. All you need to do to return a plain text response from an action method is `return Content("text goes here")`

comment 4y ago · link · parent

Kestrel is the web server that Asp.Net Core runs on by default. It's part of the application.

Building an app that has the runtime bundled with it (no need to install .Net) or a single file executable is just a matter of setting a few build flags.

comment 4y ago · link · parent

No doubt it can vary wildly depending on your life circumstances. Personally most of my hobbies are sedentary (reading, gaming, plastic models) and I don't have kids or pets that require me to be active in some way. A normal day for me if I don't go anywhere and make no effort to exercise is usually less than 2500 steps.

comment 4y ago · link · parent

> walking just ~8k steps per day

You kind of gloss over this, but 8k steps is around 3 miles of walking for the average person. You might be able to get that "naturally" if you live in an urban area and go out on foot every day to get coffee, groceries, etc., but if you're a typical WFH software engineer living in the suburbs, you're probably going to have to spend 45 min to an hour every day walking for exercise to achieve that number. I'm certainly not claiming that this is excessive or impossible or anything, but spending more than an hour a day (when combined with the weight lifting) on exercise and fitness is a MAJOR lifestyle change for most people. I think it's extremely important to be honest about the effort and commitment required. Getting healthy and staying healthy is _hard_, especially if you're starting out seriously overweight or obese.

comment 4y ago · link · parent

I can't remember details but I'm positive I've read about such a capability being developed in the 70s or 80s. I think it was an airborne radar system similar to AWACS except looking at the ground, combined with computer systems that would analyze the data to identify troop movements. With the military resources available today (drones, satellites, ...) and the massive increases in computing power it wouldn't surprise me if they track troop movements in near real-time.

comment 4y ago · link · parent

You're missing my point because you're focused on the database query. I'm talking about the web application framework. If this was written in Asp.Net, for example, the password field would be declared as a string and the data binding code within Asp.Net would validate that the field was in fact a string as part of instantiating a model for the strongly typed request body. If someone passed in an object for that field your code for the endpoint, including all of the database interaction, would never be called because the framework would automatically return a 400 response when data binding failed.

comment 4y ago · link · parent

If you use any strongly typed language with a halfway decent framework you _don't_ have to think about this because the request will automatically be validated and rejected for invalid input before your code is ever hit.

comment 4y ago · link · parent

Both are true. When the request input is blatantly the wrong type like this, you shouldn't even be attempting to execute the sql query. But of course JavaScript encourages developers to be lazy and not even think about such things.

comment 4y ago · link · parent

> I did not know about that aspect of nuclear plants and in my non-expert view it would be a major point against nuclear plants in the discussion how to solve climate change

It's a reasonable criticism to make, but I think it tends to be a bit overblown. Modern reactors have redundant layers of systems to prevent such a disaster from occurring. In the ~60 year history of nuclear reactors Fukashima is the only time this type of failure has happened (Three Mile Island and Chernobyl were very different), and even then it was due to a cascading series of problems:

* In hindsight it was a really poor idea to locate a nuclear plant by the ocean in a region known for strong earthquakes and tsunamis.

* The backup generators flooded because they were located in the basements, another poor decision for an area at risk of tsunamis.

* TEPCO had additional generators and batteries on site within 6 hours of the earthquake, which was in time to prevent a meltdown, but they were unable to connect them to the plant's electrical system (I don't recall the details of why).

It's also worth mentioning that this is only a problem with large reactors. Smaller designs like those used in ships and submarines still have decay heat, but the reactor core is physically smaller so that it doesn't contain enough isotopes to cause a meltdown. Many nuclear advocates believe that we should be building more nuclear plants with smaller reactors for this reason as well as smaller reactors being easier to operate without getting into a dangerous state.

As far as reading, I highly recommend Atomic Accidents by James Mahaffey [0]. It's very well written, aimed at a total layman, and covers basically everything that has gone wrong since we as a species started seriously messing with nuclear materials in the 19th century.

[0]: https://www.amazon.com/gp/product/1605986801

comment 4y ago · link · parent

They're easy to shut down, but when the reactor is first turned off the core is full of unstable isotopes that are byproducts of the fission reaction. Those isotopes continue decaying even with the reactor "off" until the become stable, and they put out enough heat to cause a meltdown on their own. This means the reactor needs active cooling for a couple of weeks until it reaches a safe state. That's what happened at Fukashima; the reactors were shut down when the earthquake hit, but then the tsunami disabled the backup generators that were powering the cooling pumps, and they weren't able to restore cooling before the core melted.

comment 4y ago · link · parent

The very short version is that by synchronously blocking on the async method your thread may end up holding a resource (thread context info or the calling thread itself) that the async method needs in order to run its continuations. Here are a couple of more detailed explanations:

https://blog.stephencleary.com/2012/07/dont-block-on-async-c...

https://devblogs.microsoft.com/pfxteam/await-and-ui-and-dead...

comment 4y ago · link · parent

Note that it's recommend that you avoid using these because they carry a risk of deadlock. Unless something has changed recently .Net doesn't have a 100% safe way to synchronously call an async method from a non-async method.

comment 4y ago · link · parent

A lot of the changes are aimed at making it easier for people to get started with Asp.Net, and most of those aren't breaking changes. Traditionally Asp.Net has had a lot of boilerplate around project setup and configuration, and things like minimal APIs aim to change that. The unfortunate side effect is that it adds more complexity (more ways to do the same thing) to the ecosystem, and the newer minimal approaches probably aren't what you're see used in the typical production project.

comment 4y ago · link · parent

The landscape has been changing rapidly since .Net Core (now just .Net) matured 3-4 years ago. As you say there are a LOT of big enterprise shops out there using .Net, but more and it's catching the attention of small companies and startups. I work at a small-ish (~300 employees) B2B SaaS that has a wide variety of legacy code bases: .Net Framework, Node, Ruby, Php, and a few others. We made the decision last year to make .Net our default choice for new projects.

comment 4y ago · link · parent

Volcanic eruptions are rated on a logarithmic scale from 1 to 8. It looks like there hasn't been a formal rating assigned to Tonga yet, but it's believed to be the largest of the 21st century so far, and there was already a VEI 5 in 2011. A VEI 8 is the eruption of a super volcano like the Yellowstone caldera, so obviously it would make Tonga look like a firecracker in comparison. If you consider asteroid impacts as geological events then they can be substantially larger.

comment 4y ago · link · parent

It probably depends on the company. Most gas pumps in the US only support swipe payments (as opposed to chip based EMV or contactless). The gas station gets charged lower credit card network fees if they submit address info with the swiped payment. Whether the address is correct or not doesn't affect the fees, and it's usually up to the company to decide if they want payments to be declined when there's an address mismatch.

comment 4y ago · link · parent

> So I reach out to the manager and ask what is going on. This is a simple task, I said. Why does it take an entire quarter for your team to deliver? He doesn't have an answer.

Have you never worked on a team that had work planned out months in advance? Usually IME the team will only plan out the next quarter in any detail since things always change. But the product team and managers often have a roadmap (high level plan) extending out a year or more.

Most likely this team has already planned their Q1 and has given commitments to stakeholders, etc. For your work to jump to the head of the queue it would need to be more important than what they've already planned. Yes, maybe your request only takes a few days, but odds are that the team has dozens of requests on their backlog that are just a few days worth of work. If you want to try to get them to prioritize this work then someone from your team (typically PO, PM, or manager) needs to reach out to the other team and communicate what the impact to the company will be if your team is blocked for the entire quarter.

P.S. - Sort of a tangent, but this scenario is one where a good scrum master is worth their weight in gold. Once you communicate to the team that your work is blocked the SM can take on figuring out who needs to talk to who to try to prioritize the work, and will stay on those people to follow through so that you know when you'll be unblocked and the team can adjust plans accordingly. It may sound like a small thing, but it's wonderful not having to deal with it yourself as an engineer.

comment 4y ago · link · parent

Pretty tame compared to some stories out there, but I recently worked for a company that had the most amazing process for importing customer data when customers migrated to our SaaS from a competitor.

First the data dump provided by the customer is run through a VB6 conversion program that imports the data to an Access97 database. Then the Access db gets opened using a legacy VB6 version of our product from roughly the year 2000 where they verify that everything was converted and imported correctly. Then they run the Access database through a second VB6 conversion program to migrate it into SQL Server so it could be used with the current SaaS product.

The source for the legacy product was at least in source control, but only one engineer still working for the company had ever touched that application at all. From what I was told the source for both of the conversion programs was lost years before I joined. The company's ability to import data for new customers was 100% dependent on this rickety pipeline.

comment 4y ago · link · parent

Sounds like they should probably be using a SQLite database instead of trying to make a custom hand rolled solution using raw files.

comment 4y ago · link · parent

It's definitely feasible, you basically just end up with something very similar to a military bunker. The structure ends up being mostly underground and the entrance or above ground areas are mostly made of reinforced concrete with heavy steel doors, no windows, etc.

It's also possible to make tornado proof residential homes, but they're expensive and not very appealing: https://www.huffpost.com/entry/tornado-proof-homes-oklahoma_...

comment 4y ago · link · parent

12 years of experience with .Net here - it’s been a long time since I used log4net and I was never intimately familiar with it, but I’m not aware of any built-in or common .Net functionality that will make a web request and remotely load code just by parsing a string. So unless the log4net library totally implemented that feature from scratch, it should be safe.

comment 4y ago · link · parent

Encoding that in the log message itself still seems a bit crazy. I’m not familiar with log4j, but the .Net logging libraries I do know (NLog and Serilog) completely separate writing log events from processing (writing, sending, whatever) the events.

comment 5y ago · link · parent

> I’m going to get skewered for saying this … but the story feels like it’s pandering to current social political trends - i.e. the obsession with diversity.

How do you think HZD pandered to diversity? The main point that I have heard brought up is the wide variety of ethnicities in secondary/background characters, but IMO that is completely consistent with the game's setting and story. The game takes place in a world where human society has literally been reset and rebuilt from scratch, so you'd need to have the full variety of human kind for genetic diversity while at the same time all of the racial and ethnic prejudices that exist today would cease to exist unless the AI was trained to preserve them (it wasn't). Naturally the new world would see new prejudices arise (people are still people after all), and the game does attempt to portray this.

comment 5y ago · link · parent

> Well here's another issue with .net I ran into... really unclear guidance from numerous sources who all really wanted you to use THEIR stack and thus end up paying THEM.

Meaning no offense, but it’s hard to see how you ended up so far off the mark. The .Net frameworks and runtimes (.Net Framework, .Net Core, and mono) have always been free. Likewise for the Asp.Net web framework you would have been using for web applications. I’ve been in the .Net ecosystem for over 10 years and I’m not aware of _any_ paid web stacks that would align with the quote above. Not to say that they don’t exist somewhere out there to extract money from foolish enterprise IT departments, but they aren’t even close to mainstream. If you did this experiment within the last 5 years it would have been extraordinarily hard for you to miss out on .Net Core, especially considering it was built to do exactly what you want - microservices with Linux as a first class citizen.

comment 5y ago · link · parent

It's interesting to think about the possibilities... On one hand, wagon travel to the west didn't totally die off until the late 1890s, so the woman could easily be part of the greatest generation (WW2 generation) and the encounter could've happened quite recently. OTOH the earliest the encounter could've happened would be the end of the 1950s, and if it did happen that early that makes it plausible that her father traveled west at the peak of the Oregon Trail in the late 1840s to 1850s. It's mind blowing how much we've advanced in such a short time.
1
121314
26