How can we make disabled buttons more inclusive? When do they work well, and when do they fail on us? And finally, when do we actually need them, and how can we avoid them? Let’s find out.
In this short video, you'll learn about Immutable collections from Leslie and Brandon.Useful LinksImmutable collections ready for prime timeImmutable Collections in MSDN MagazineFirst steps with C#.NET Videos Get your questions answered on the Microsoft Q&A for .NET - http://aka.ms/dotnet-qa Learn .NET with free self-guided learning from Microsoft Learn: http://aka.ms/learndotnet #DotNet #Csharp
CKEditor 4 React integration 2.0.0 with React 17 support
We live in a call-out culture, says activist and scholar Loretta J. Ross. You're probably familiar with it: the public shaming and blaming, on social media and in real life, of people who may have done wrong and are being held accountable. In this bold, actionable talk, Ross gives us a toolkit for starting productive conversations instead of fights -- what she calls a "call-in culture" -- and shares strategies that help challenge wrongdoing while still creating space for growth, forgiveness and maybe even an unexpected friend. "Fighting hate should be fun," Ross says. "It's being a hater that sucks."
When it comes to e-commerce, the experience that your website users encounter can feel like a vague, distant consideration. Without an in-person interaction involved, it’s difficult to stay aware of what consumers are encountering when they interact with your brand’s various customer-facing channels. And yet, it’s that very disconnected nature of the online marketplace that...
In this article, we’ll discuss and learn about the use case of iterating over React `children` and the ways to do it. In particular, we will deep dive into one of the utility methods, `React.Children.toArray`, that React gives us, which helps to iterate over the children in a way which ensures performance and determinism.
After the tutorial, Prey settles into a pattern that’s going to repeat for most of the rest of the game. You need to get thing A, but to obtain that thing you need to go through obstacles B, C, D and E, and each of those obstacles has sub-obstacles and optional branching diversions to explore. […]
I used to call this technique "type tunnelling" and noted its use in XML in 2005. When you are using a strongly typed language but instead your types are stringly typed, you are passing strings around when a better type exists. Here's some examples of stringly typed method calls:Robot.Move("1","2"); //Should be int like 1 and 2Dog.InvokeMethod("Bark"); //Dispatching a method passing in a string that is the method's name. Dog.Bark()Message.Push("TransactionCompleted"); Could be an enum There's reasons to do each of these things, but as a general rule your sense of Code Smell should light up if you smell Stringly Typed things.Inline SQL is another where one language (a proper language with Syntax) is tunneled as a string within another. There's no good solution for this as most languages don't have a way to express SQL such that a compiler could noticed a problem. Sometimes we'll see Fluent APIs like LINQ try to solve this. RegEx is another example of a string language within a language. Sometimes one will see large switch statements that fundamentally change program flow via "magic strings." One misspelling and your switch case will never fire.Again, these have valid reasons for existence but you won't catch syntax issues until runtime.LinqPad has a great post on why strongly typed SQL via LINQ or other fluent syntaxes are often better than SQL. Here's some LINQ in C# that will eventually turn into SQL. You get autocomplete and syntax warnings throughout the authoring process:from p in db.Purchaseswhere p.Customer.Address.State == "WA" || p.Customer == nullwhere p.PurchaseItems.Sum (pi => pi.SaleAmount) > 1000select pSo why does it matter?Regex rx = new Regex(@"b(?<word>w+)s+(k<word>)b");This isn't to say all Stringly Typed code is bad. It's to say that you need to make sure it doesn't just happen on its own. Be prepared to justify WHY it was written that way. Is string the only data type the app uses? Are there potential uses where something should be a Message or an Event or a Something and it was just easier or simpler to use a string? And here's the rub - was this Stringly Typed data structure pass to another component or service? Did you intend for its semantic meaning to be retained across this logical (or physical) boundary?A great litmus test is "how would I catch a misspelling?" Compiler" Unit Test? Production ticket?What do you think about Stringly Typed code? Do we type Name and Surname? Is that too far? Do we string all the things?Sponsor: Pluralsight helps teams build better tech skills through expert-led, hands-on practice and clear development paths. For a limited time, get 50% off your first month and start building stronger skills.© 2021 Scott Hanselman. All rights reserved.