Loading...

All Tips (10)

Logo SQL
SQL Join Types Simplified khairy1999 | May 02, 2024
Joining tables is a fundamental skill in SQL that allows you to merge data from multiple tables based on common columns. Whether youโ€™re a database developer, analyst, or SQL enthusiast, this simplified PDF guide will provide you with a clear understanding of SQL join types and empower you to unlock the full potential of your data.

Credits - @connect4techs.com
Logo CSS
All CSS Cursors thecodecrumbs | April 30, 2024
Credits - @thecodecrumbs
Logo CSharp
Use Exists instead of Any with collections Jalal Alzebda | April 23, 2024
โœ… ๐—˜๐˜…๐—ถ๐˜€๐˜๐˜€ is a method that is available on collections like List and Array types. It checks whether an element that satisfies the condition exists in the list or array.
โœ… ๐—”๐—ป๐˜† is a LINQ method that works with any IEnumerable (which includes arrays, lists, and other collection types). It checks whether any element in the IEnumerable satisfies the condition.continue reading...

๐Ÿš€ ๐—˜๐˜…๐—ถ๐˜€๐˜๐˜€ is generally faster than Any. This is because Exists can take advantage of the internal implementation of List to perform the check more efficiently. Exists doesn't require the overhead of creating an enumerator that Any does.

๐Ÿ’ก If you are working with collections other than List or Array, or if you want your code to work with any type of collection in the future, it's better to use ๐—”๐—ป๐˜†.
Logo JavaScript
Comparison between data containers in JavaScript programming language Bishir Tijjani | April 18, 2024
Credits: Theta Trainings ๐Ÿ‘โญ๐Ÿ’–

Follow Bishir Tijjani ๐Ÿ˜‰๐Ÿ•บ for the most amazing content related to JavaScript, programming, ReactJS & Web Development
Logo CSharp
Fields 'readonly' Georgios Petas | April 16, 2024
Make fields '๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ผ๐—ป๐—น๐˜†' when exclusively assigned in the constructor!

A field set only in a constructor without the readonly modifier may lead to ambiguity in its intended use.continue reading...

Marking such fields as readonly enhances clarity about their purpose.

The readonly modifier prevents unintentional alterations by future maintainers.

However, there are some ๐—ฒ๐˜…๐—ฐ๐—ฒ๐—ฝ๐˜๐—ถ๐—ผ๐—ป๐˜€:

โ†’ Fields declared in classes marked with the Serializable attribute.

โ†’ Fields declared in partial classes.

โ†’ Fields with attributes are ignored.

โ†’ Fields of type struct that are not primitive or pointer types are also ignored because of possible unwanted behavior.
Logo CSharp
Use Guards and Fail Fast Poorna Soysa | April 11, 2024
๐—š๐˜‚๐—ฎ๐—ฟ๐—ฑ is a conditional statement to perform early input validation and detect problematic states, mitigating potential execution errors within a method.

The ๐—ด๐˜‚๐—ฎ๐—ฟ๐—ฑ ๐—ฐ๐—น๐—ฎ๐˜‚๐˜€๐—ฒ runs before the main code, quickly checking if specific conditions are not met and ๐—ณ๐—ฎ๐—ถ๐—น๐—ถ๐—ป๐—ด ๐—ณ๐—ฎ๐˜€๐˜ if necessary. It guards the rest of the code.continue reading...

โœ… By checking for invalid input or problematic states at the beginning code becomes less cluttered and easier to follow, enhancing both code ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜† and ๐—บ๐—ฎ๐—ถ๐—ป๐˜๐—ฎ๐—ถ๐—ป๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜†.
โœ… This technique is highly effective for preventing deep conditional nesting, making the logic flow clearer and more transparent.

Do you use ๐—š๐˜‚๐—ฎ๐—ฟ๐—ฑ๐˜€ & ๐—™๐—ฎ๐—ถ๐—น ๐—™๐—ฎ๐˜€๐˜ techniques in your code? ๐Ÿ‘‡

๐Ÿ”„ If this is useful, ๐™ง๐™š๐™ฅ๐™ค๐™จ๐™ฉ to spread the knowledge.
๐Ÿ‘‰ Follow Poorna Soysa and click the notification bell๐Ÿ””on his likedin profile to receive notifications for all his upcoming posts.
Logo CSharp
Use Where before OrderBy Jalal Alzebda | April 04, 2024
๐Ÿš€ In LINQ queries, the order in which you apply operations can affect performance. If you filter a collection using ๐—ช๐—ต๐—ฒ๐—ฟ๐—ฒ before sorting it with ๐—ข๐—ฟ๐—ฑ๐—ฒ๐—ฟ๐—•๐˜†, you reduce the number of items that need to be sorted. Sorting is generally more computationally expensive than filtering, so this can result in significant performance benefits, especially for larger collections.

๐Ÿ”ฅ This approach enhances performance because we're sorting a smaller subset of the original data.
Logo SQL
SQL Optimization Activity - Performance database Kadek Dwi Pradnyana | March 20, 2024
Here are some tips to help you enhance the performance of your SQL queries.
Logo jQuery
jQuery AJAX Example Sonzogni Nicolò | March 11, 2024
Here is first a jQuery AJAX example showing how to make an AJAX call in jQuery:
var jqxhr = 
    $.ajax({
       type: "POST",
       url: "/theServiceToCall.html",
       data: {
           name : "The name",
           desc : "The description"
        }
    })
    .done  (function(response, textStatus, jqXHR)    { alert("Success: " + response); })
    .fail  (function(jqXHR, textStatus, errorThrown) { alert("Error"); })
    .always(function(jqXHROrData, textStatus, jqXHROrErrorThrown)     { alert("complete"); })
    ;
Logo Visual Studio
Keyboard shortcuts in Visual Studio Microsoft | March 04, 2024