Sam Harwell

1.2K posts

Sam Harwell

Sam Harwell

@samharwell

.NET Developer Experience working on C# and Visual Basic at Microsoft. All opinions/speculation/suggestions mine.

Houston, Texas Katılım Şubat 2012
8 Takip Edilen633 Takipçiler
Sam Harwell
Sam Harwell@samharwell·
@davkean @KooKiz @voroninp @fiseni I'm not sure. Did it use to work for older versions? These are reference assemblies, so there's nothing immediately available for decompilation. The feature needs to be able to find the implementation assembly from the reference assembly in order to decompile it.
English
2
0
1
144
Kevin Gosse
Kevin Gosse@KooKiz·
The automatic decompilation feature in VS is nice, but when ctrl+clicking on a built-in .NET type it only shows the metadata. Anybody knows how to show the actual implementation, like with Resharper?
Kevin Gosse tweet media
English
10
0
40
14.9K
Sam Harwell
Sam Harwell@samharwell·
@CFDevelop @Evangel1nk I certainly think there is room for simplification in this example. I'll make some notes as comments on the linked Gist.
English
1
0
2
35
Christian Findlay
Christian Findlay@CFDevelop·
@Evangel1nk @samharwell I'm not entirely convinced that it's turning all errors on, and it's hard to check without opening up Visual Studio on windows. I feel like there are more older ones, but perhaps they don't exist in the NuGet package anymore
English
1
0
0
55
Christian Findlay
Christian Findlay@CFDevelop·
How do I turn all the #csharp code rules into errors? I want all of them, and then I will just turn off the annoying ones.
English
4
0
7
2K
Alex Cohen
Alex Cohen@anothercohen·
This couple is saving >$100k per year ($36k retirement, $30k-ish from principal on mortgage, $7k discretionary, + more because that effective tax rate is wrong), goes on three vacations, has kids in full time daycare with fun hobbies, and buys $800 of clothes per month and is still complaining. Incredible
Alex Cohen tweet media
English
368
180
3.7K
1.6M
Sam Harwell
Sam Harwell@samharwell·
@kzu @roslyn The feature is called "SignatureHelp" in the Roslyn code base. It's spread through a few different assemblies.
English
0
0
1
52
Sam Harwell
Sam Harwell@samharwell·
It's mainly frustrating when resources are not equally provided, followed by the use of employee efficiency in reviews. Employees who aren't covering the gap with their own money are going to end up docked in productivity reviews.
English
1
0
2
314
Sam Harwell
Sam Harwell@samharwell·
Don't assume your employer will provide all the hardware and/or service resources needed to complete your job effectively. I've realized over time that 2-5% of my salary will always need to go towards covering the gap.
English
1
0
0
400
Sam Harwell
Sam Harwell@samharwell·
@awakecoding @jaredpar Can you expand the node in the log viewer so I can see which diagnostic IDs are taking the time?
English
1
0
1
37
Marc-André Moreau
Marc-André Moreau@awakecoding·
@samharwell @jaredpar We are currently using the latest StyleCop release (1.1.118) but I did a test using 1.2.0-beta.435 and it made it worse by increasing the time taken per target framework for the same project from 60s to 75s, for a total of 2 minutes 30 seconds every time we build for net48 + net7
English
1
0
0
43
Marc-André Moreau
Marc-André Moreau@awakecoding·
Is .NET incremental compilation possible with Roslyn? Most compiler toolchains I've worked with produce object files and avoid rebuilding them when the corresponding source files haven't changed, but I've got a .csproj with 5000+ C# .cs files that gets fully rebuilt every time 🤔
English
2
0
5
1.9K
Sam Harwell
Sam Harwell@samharwell·
@awakecoding @jaredpar Looks like an old version of StyleCop Analyzers. Updating to a new version should bring significant performance improvements if the problem lies on one of the analyzers we updated to new APIs.
English
1
0
2
45
Marc-André Moreau
Marc-André Moreau@awakecoding·
@jaredpar @samharwell It's the code analyzers, again, especially StyleCop - the problem is that there isn't an easy way to do a quick build and launch without analyzers in Visual Studio, and disabling analyzers is only going to make it such that people will forget to run them before committing code
Marc-André Moreau tweet media
English
3
0
0
189
Sam Harwell
Sam Harwell@samharwell·
@altonbrown Not sure I'd call it a replacement for the original, but it sure holds its own against any Southern style pancake. Excellent work 😁
Sam Harwell tweet media
English
0
0
0
0
Sam Harwell
Sam Harwell@samharwell·
Perhaps a solution here would be allowing two of the wired switches to be linked. The secondary unit (which is connected to always-on power) has no load attached, and instead is linked to the primary switch wirelessly and shows the same LED indicators.
English
0
0
0
0
Sam Harwell
Sam Harwell@samharwell·
I really want @Legrand with @netatmo to be the answer for our connected switches, but I can't get past the fact that they don't have a wired three-way (or four-way) switch. The wireless ones don't count because they have noticeable latency and lack power-on indicators.
English
2
0
0
0
Sam Harwell
Sam Harwell@samharwell·
@hhariri Every abstraction comes with a cost (global complexity). They only need to be used when the gains (reduced local complexity) outweigh the cost. Most interfaces are not even close to beneficial on this evaluation.
English
0
0
0
0
Hadi Hariri
Hadi Hariri@hhariri·
"I'm declaring an interface because one day I may have multiple implementations" Sure. So when that day comes, do an Extract Interface refactoring. Most IDEs do it for you in a single click. Until then, drop the interface.
English
125
382
2.6K
0
Sam Harwell
Sam Harwell@samharwell·
@migueldeicaza Like any decision making group, failure to include people with different experiences inevitably leads to suboptimal outcomes.
English
0
0
0
0
Sam Harwell
Sam Harwell@samharwell·
@migueldeicaza The discussions and decisions leading to strict policies (in any direction) seem like consensus bias. Many more people today than a few years ago understand that people have different optimal working conditions, but others just haven't caught up.
English
1
0
2
0
Sam Harwell
Sam Harwell@samharwell·
@GergelyOrosz Most companies I've worked for don't have this restriction, but one did. I felt like the work environment did not allow me to achieve my productivity potential, so I left. This does not seem like a majority case, and developers generally have the choice to stay or not.
English
0
0
1
0
Gergely Orosz
Gergely Orosz@GergelyOrosz·
"I joined a company which brands itself as a tech-first company. I was super excited. As I was setting up my laptop, I noticed I have no admin rights. Turned out I needed to request permission to install anything. And my request for Visual Studio Code was rejected." 🤯
English
135
162
2.3K
0
Sam Harwell
Sam Harwell@samharwell·
@Pilchie I love an empty office. And now I've worked from home so long I have zero ability to ignore my surroundings in a team room with other people. I both get distracted and distract everyone else. 😁
English
1
0
2
0
Kevin Pilch
Kevin Pilch@Pilchie·
Decided to spend the day in the office today. So far I’ve seen no one, had a significantly worse AV experience than at home, and spent 40 mins commuting one-way. I WANT to come to the office periodically, but only if there are people there to see.
English
7
2
59
0
Sam Harwell
Sam Harwell@samharwell·
@sgorozco @nickchapsas Check out ReferenceCountedDisposable in dotnet/roslyn. It's the closest you can reasonably get to shared_ptr with the current language rules.
English
0
0
0
0
Nick Chapsas
Nick Chapsas@nickchapsas·
Ok time for round two. Which C# feature is your least favourite and why?
English
148
8
106
0
Sam Harwell
Sam Harwell@samharwell·
@vkornov @nickchapsas Null is an efficient representation of uninitiated data. If you remove null, you still have uninitiated data but you no longer have the performance or consistency in how to represent it.
English
1
0
0
0
Viktor Kornov
Viktor Kornov@vkornov·
@nickchapsas Nulls. Do I need to explain. Exceptions being used for expected errors. It’s a catch all language feature, could have benefited from more explicit error channel. Our parameters and the bool TryXxx(out x) “pattern”. Just subpar ergonomics. Very boilerplaty syntax from the 90s.
English
2
0
6
0
Sam Harwell
Sam Harwell@samharwell·
@simonw Under this definition of unit test, unit tests are generally a code smell. In rare occasions they are valuable, but each one incurs a maintainability debt that is unlikely to be covered by it's incremental value.
English
0
0
1
0
Simon Willison
Simon Willison@simonw·
In this case I mean "unit tests" as in tests that attempt to test just a single function or class in isolation, mocking/stubbing the things that it might talk to And "integration tests" as tests that don't do that isolation - that exercise multiple components integrated together
English
13
0
56
0
Simon Willison
Simon Willison@simonw·
Not sure if this is a controversial opinion or not: unit tests should make up a minority segment of your overall automated test suite I'd absolutely take a project with integration and no unit tests over one with unit tests but no integration tests
English
118
103
1K
0