Better HN
topnewbestaskshowjobs
Log inSign up

Merad

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

Submissions

comment 3y ago · link · parent

C# doesn't allow you to destructure a single property and as far as I can tell based on a quick test it doesn't allow you to combine a using declaration with destructuring. I agree that this is surprising syntax... as a C# dev my first interpretation of that code would be that connection is the thing being disposed since it's the variable being declared. I wonder if js/ts destructuring has always silently held a reference to the containing object or if they added that behavior to make this use case work?

comment 3y ago · link · parent

Even if Condé Nast has any influence over the situation, do you really think the "adults" there know anything about the situation beyond the status reports they're getting from Reddit leadership?

comment 3y ago · link · parent

IANAL but it seems like this potentially exposes MS to enormous liability. For example, doctors routinely use web based tools. When they look at images related to a patient's care and MS uploads them to the mothership, has MS violated HIPAA? What about someone browsing images of child sexual abuse? Is MS liable for storing that illegal content on their servers? When a user uploads illegal content to OneDrive it's easy to blame the user, but when MS is harvesting all the content the user views, I'm not sure they get off so easy.

comment 3y ago · link · parent

Eastern US here. I will get those errors a few times a week but I'd say 80% of the time it works on a refresh and most of the rest of the time it's back within 30s.

comment 3y ago · link · parent

I thought I recognized the site. This the same author who wrote very detailed analysis of the Siege of Gondor and the Battle of Helms Deep from LOTR as well as articles about military and political topics from Game of Thrones, and many real-world historical topics. They're a military historian IRL and have a lot of content worth reading: https://acoup.blog/resources-for-world-builders/

comment 3y ago · link · parent

"100 queries per minute per OAuth client id". An app like Apollo uses a single client id, AFAIK.

comment 3y ago · link · parent

The CEO is doing an AMA about it tomorrow.

Edit: https://old.reddit.com/r/reddit/comments/144ho2x/join_our_ce...

comment 3y ago · link · parent

Really? IME most devs are incredibly bad to underestimate the complexity of apps and problem domains where they don't have any experience.

I'd say an app like Reddit is especially prone to this because most decent devs probably could recreate the core UX (subreddits, posts, comments) in a couple of weeks. The really hard part is all the features people don't usually think about (mod and admin tools, for example) plus scaling up to millions of concurrent users.

comment 3y ago · link · parent

I totally get that it's possible, but it's completely unnecessary complexity for both deployed apps and local dev. If the react team tells us that we have to jump through these extra hoops to use react*, my response will probably be to move to a different front end framework. And I say this as someone who honestly really likes react and who never really cared for front end work prior to learning react.

* I'm aware that server components aren't required, and probably won't be in the near future. But the way they're being pushed ATM they're likely to become the de facto standard, similar to how functional components and hooks have completely displaced class components even though the latter is still officially supported.

comment 3y ago · link · parent

I tend to agree with the article. I've felt pretty frustrated with the direction of react in the last few years. Most of the companies I've worked for that used react did so because they wanted a SPA, in most cases making a conscious decision to move away from older SSR technologies towards the SPA.

It's doubly frustrating because we primarily use C# and Asp.Net Core for back end work. A react SPA is trivial to use with any back end of your choosing... this SSR push they're making isn't much fun unless you use a JS back end (no thanks).

comment 3y ago · link · parent

> how else could you implement a string class

I'm not claiming that it's good C++ code (or good code by any measure) but I imagine those "C with classes" devs would do something like:

  my_string* s = new my_string();
  s->initialize("hello world");
  // ...
  s->destroy();
  delete s;

comment 3y ago · link · parent

> RAII and scope are both core ideas in c++ and always have been.

I would say that's debatable. RAII definitely dates back to the earliest days of C++, but you don't have to know it in order to use the language. Even today there are many professional C++ devs who've never really learned RAII because they write C with classes style code. I first started learning C++ about 20 years ago and IIRC at the time usage of RAII was still in the minority but there was real momentum towards it being considered the "right" way to do C++.

comment 3y ago · link · parent

I would think that they're referring more to the rumbling sound of a small two-stroke engine idling as opposed to a chainsaw running at full throttle while cutting wood. Here in the southeast US, at least, it not unusual to describe the sound of an engine idling as "purring" or even "purring like a kitten."

comment 3y ago · link · parent

Yes and no. In theory it would be totally fine to "allocate" a stack that was exobytes in size (or whatever extremely large number). Thanks to virtual memory no one really cares... if that memory isn't actually being used. But as your stack grows larger and larger the OS has to find pages of physical memory to assign to that allocation, and you're simply going to run out of memory. A high end home PC or average server is only going to have 64-128 GB of RAM, a very high end server might have a few TB. Of course when you start to run out of physical memory the OS will start paging (dumping data from RAM to disk to free up memory), but that will kill the performance of your app even with high end SSD's. If you keep chugging along with your stack growth you'll probably hit OS limits on page file size next, if not you'll eventually run out of disk space.

comment 3y ago · link · parent

Your knowledge of the .Net ecosystem is a bit out of date. It's had first class support for mac and linux for 7-8 years now.

comment 3y ago · link · parent

> Reddit very successfully moved away from being the techy nerd basement dweller site to becoming a trendy young "normie" people site.

Didn't that transition happen in the early 2010s? When I was in grad school a decade ago basically everyone I knew (which included many "normies") was scrolling through reddit when they were bored. I don't think the dumbing down really started until new reddit was introduced, which was 5-6 years ago IIRC.

comment 3y ago · link · parent

To be honest it sounds like you're making a damned good argument in favor of mandatory AEB. You're risking a collision because you assume that the car that's turning will behave in the way you expect it to behave (no judgement, I usually do it too). If you're wrong there's a high risk of a multi-car accident because naturally all the drivers in line behind you are tailgating.

comment 3y ago · link · parent

Surprised no one has pointed it out, but the queries involve Pokémon. According to a quick Google search there are a grand total of ~800 different Pokémon. You aren't wrong, but a table scan over 800 rows isn't exactly worth worrying about.

comment 3y ago · link · parent

Does your app really only have one kind of user (maybe it does, I'm just asking)? My company doesn't get too deep into formal user personas stuff, but we understand that different people use our software to accomplish different goals. For example business owners, corporate accountants, facility managers, and operators all perform different tasks and focus on different information. The purpose of the story jargon is to summarize who needs it, what they need, and why. As SWE's we often don't need to care very much about who or why, but it's important to the product team when they're deciding what to prioritize and explaining to the rest of the business why we're spending time doing this work.

comment 3y ago · link · parent

> User stories as requirements seems to be the dominant understanding.

Really? Maybe I'm just lucky but I've not seen it yet in my career (10 years). The "as a, I want, so that" text is normally just a summary of who/what/why, and the ticket will include acceptance criteria detailing the changes to be implemented. For features larger than a couple of tickets PO's and PM's will usually keep up with requirements in planning docs that are in Confluence, Google Docs, etc.

comment 3y ago · link · parent

> In the south, Radon "can" be an issue, but it simply isn't an issue.

There's more to the south than Texas, y'know. I can't recall if radon tests are required during a home inspection here in NC, or just highly recommended, but when I was buying a house last year I toured several homes that had radon mitigation systems installed.

comment 3y ago · link · parent

You are correct. Mono is still an alternative runtime for .Net. It hasn't been merged into .Net and I'm not aware of any plans to do so.

comment 3y ago · link · parent

I mean of course, starting a new job involves signing tons of paperwork. Employee agreements, IT security policies, sometimes codes of conduct or confidentiality agreements... but no contract.

comment 3y ago · link · parent

Usually when you get a job offer you'll be sent an offer letter stating role, salary, start date, etc. Often companies ask you to sign it when you accept the offer, but those letters always include language explicitly stating that they don't constitute an employment contract.

comment 3y ago · link · parent

I've been in the industry for 10 years and have never had a contract.

comment 3y ago · link · parent

Whether an LLM actually learns is completely tangential to the topic at hand. A human coder who learned from copyrighted code and then reproduced that code (intentionally or not) would be in violation of the copyright. This is why projects like Wine are so careful about doing clean room implementations.

As an aside, it seems really strange to invoke "open source ideas" as an argument in favor of a for-profit company building a closed source product that relies on millions of lines of open source code.

comment 3y ago · link · parent

I'm not really arguing that your pattern _doesn't work_, I just think you've created an unnecessary new pattern to solve an already solved problem. Using expressions with lambdas is pretty standard in C# when you need to reference a method or property without calling it immediately. Entity Framework is an obvious example, mocking libraries like Moq, and at least one that I know of (Hangfire) uses expressions to serialize info about a method so that it can be invoked later, possibly on a different machine or even in a totally different app. All of the things that you mention can be validated in an expression, if you feel the need.

comment 3y ago · link · parent

If you're worried about someone doing something other than calling a method in the lambda it's pretty straightforward to use an Expression<Func<T, TResult>> and validate the contents of the expression. Seems like that would make for a much better dev experience than this static Ref property pattern that you don't see anywhere else in C#.

comment 3y ago · link · parent

Ironically in my area at least (NC) this is handled better in my parent's rural area than it is in the [small] city where I live with city garbage and recycling pick up. In their county (which is all rural) each community has a small facility that collects garbage and recycling, and each facility has collection bins for electronics, batteries, florescent bulbs, etc. I just googled to see what I'm supposed to do with these items, and apparently the city holds a "hazardous waste day" once a year which is usually a madhouse... so I'm guessing that 75+% of that stuff ends up in the normal garbage.

comment 3y ago · link · parent

Fighters like the Hornet use HOTAS (Hands On Throttle And Stick) which places buttons, 4-way switches, or other controls (mini joysticks, etc.) under most of the fingers. So pilots have something like 30+ commands that they can perform at any time without moving their hands. Interacting with MFD's would mostly happen when the plane is cruising straight and level, probably on autopilot.
1
678
26