<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DevSiddhartha</title>
    <description>The latest articles on DEV Community by DevSiddhartha (@devsiddhartha).</description>
    <link>https://dev.to/devsiddhartha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F538670%2Fafa851e5-539e-49de-9054-f84eeb172948.jpeg</url>
      <title>DEV Community: DevSiddhartha</title>
      <link>https://dev.to/devsiddhartha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devsiddhartha"/>
    <language>en</language>
    <item>
      <title>How to be more Efficient &amp; Consistent in your Career as a Software Developer</title>
      <dc:creator>DevSiddhartha</dc:creator>
      <pubDate>Tue, 04 Oct 2022 22:47:30 +0000</pubDate>
      <link>https://dev.to/devsiddhartha/how-to-be-consistent-in-your-coding-journey-2e89</link>
      <guid>https://dev.to/devsiddhartha/how-to-be-consistent-in-your-coding-journey-2e89</guid>
      <description>&lt;p&gt;As a Software Developer, there are times when we feel lost and have the feeling that we are not as good as others. First of all, having this kind of feeling when you enter the software industry as a fresher is very normal. We look at our seniors who are in the software industry for some time and we feel that we are not good and efficient as them.&lt;/p&gt;

&lt;p&gt;We should embrace this feeling. Here are some points from my experience that can help other people.&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Have a growth mindset&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;You cannot become a better Software Developer if you don't have a growth mindset. There is a lot to learn in the software industry. Having the curiosity to figure out things, search on the internet, looking into the documentation or the source code and debugging things on your own will help you to learn a lot and progress steadily.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Reaching out to senior developers&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;There are times when we feel that if we ask a certain question to someone senior than us, than they would laugh at us or think that we don't know this concept. But asking question is important. Don't be hesitant in asking questions in the initial stages of your career so that you can progress faster.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Learning by doing&lt;/strong&gt; -&lt;/p&gt;

&lt;p&gt;Most of the freshers do this mistake of getting stuck in the tutorial hell and when it comes to actually implementing something, they fail. Instead, start working on some project, don't try to figure out everything in the beginning. Just start and as you develop some application, you will eventually figure out things on your own when you get stuck somewhere. We often make this mistake of trying to learn everthing in the beginning and then only we think of making some project, but because of this we always remain stuck and never progress. So get your hands dirty, start working on some projects and figure things out in the way.&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;Documentation&lt;/strong&gt; -&lt;/p&gt;

&lt;p&gt;Documentation is a very important thing for a developer. Always document your learning, your mistakes and your thought process for any problem or project that you are working on. It will help you better when you come back to revisit your work or to showcase to someone your skills and your learnings. Documentation will also help you to write clean and efficient code&lt;/p&gt;

</description>
    </item>
    <item>
      <title>HTTP Request Methods</title>
      <dc:creator>DevSiddhartha</dc:creator>
      <pubDate>Tue, 04 Oct 2022 21:45:51 +0000</pubDate>
      <link>https://dev.to/devsiddhartha/http-request-methods-134l</link>
      <guid>https://dev.to/devsiddhartha/http-request-methods-134l</guid>
      <description>&lt;p&gt;We have various HTTP Request Methods available which indicate the desired action which is performed for a resource. Let us go through some of them here - &lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;GET&lt;/strong&gt; -&lt;br&gt;
HTTP GET Method, as the name suggests, requests a representation of a resource from the server. GET Method should only get the data. GET returns a representation in JSON format and an HTTP response status code of 200 (OK). In case of an error, it most often returns a 404 (NOT FOUND) or 400 (BAD REQUEST).&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;POST&lt;/strong&gt; - &lt;br&gt;
HTTP POST Method is often used to create new resources. On successful creation, HTTP response code 201 is returned.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;PUT&lt;/strong&gt; - &lt;br&gt;
HTTP PUT Method replaces the target resource with the request payload.&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;DELETE&lt;/strong&gt; - &lt;br&gt;
HTTP DELETE Method deletes a resource which is identified by filters or ID. On successful deletion, the HTTP response status code 204 (No Content) is returned.&lt;/p&gt;

&lt;p&gt;5) &lt;strong&gt;PATCH&lt;/strong&gt; - &lt;br&gt;
HTTP PATCH Method is used so that we can modify the resources. This method is used to do some partial modifications to a specified resource.&lt;/p&gt;

&lt;p&gt;We can classify the HTTP methods on the basis of idempotent and safe properties.&lt;/p&gt;

&lt;p&gt;The safe methods are the HTTP methods that do not modify resources. For example,if we use the GET or HEAD methods on a resource URL, they never change the resource.&lt;/p&gt;

&lt;p&gt;An HTTP method is called as an idempotent method if it can be called many times without different outcomes. It doesn't matter if we call the method one or hundred times over, the result should be the same.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Events In C#</title>
      <dc:creator>DevSiddhartha</dc:creator>
      <pubDate>Tue, 04 Oct 2022 21:24:05 +0000</pubDate>
      <link>https://dev.to/devsiddhartha/events-in-c-50fj</link>
      <guid>https://dev.to/devsiddhartha/events-in-c-50fj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Events&lt;/strong&gt; enable a class or object to notify other classes or objects when something of interest occurs. The class that sends (or raises) the event is called the publisher and the classes that receive (or handle) the event are called subscribers.&lt;/p&gt;

&lt;p&gt;In a typical C# Windows Forms or Web application, you subscribe to events raised by controls such as buttons and list boxes. You can use the Visual C# integrated development environment (IDE) to browse the events that a control publishes and select the ones that you want to handle. The IDE provides an easy way to automatically add an empty event handler method and the code to subscribe to the event.&lt;/p&gt;

&lt;h2&gt;
  
  
  Events Overview
&lt;/h2&gt;

&lt;p&gt;Events have the following properties:&lt;br&gt;
• The publisher determines when an event is raised; the subscribers determine what action is taken in response to the event.&lt;br&gt;
• An event can have multiple subscribers. A subscriber can handle multiple events from multiple publishers.&lt;br&gt;
• Events that have no subscribers are never raised.&lt;br&gt;
• Events are typically used to signal user actions such as button clicks or menu selections in graphical user interfaces.&lt;br&gt;
• When an event has multiple subscribers, the event handlers are invoked synchronously when an event is raised. To invoke events asynchronously, we use Calling Synchronous Methods Asynchronously.&lt;br&gt;
• In the .NET class library, events are based on the EventHandler delegate and the EventArgs base class.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to subscribe to and unsubscribe from events
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To subscribe to events programmatically&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define an event handler method whose signature matches the delegate signature for the event. For example, if the event is based on the EventHandler delegate type, the following code represents the method stub:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;void HandleCustomEvent(object sender, CustomEventArgs a)&lt;br&gt;&lt;br&gt;
{&lt;br&gt;&lt;br&gt;
   // Do something useful here.&lt;br&gt;&lt;br&gt;
}&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Use the addition assignment operator (+=) to attach an event handler to the event. In the following example, assume that an object named publisher has an event named RaiseCustomEvent. Note that the subscriber class needs a reference to the publisher class in order to subscribe to its events.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;publisher.RaiseCustomEvent += HandleCustomEvent;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;To subscribe to events by using an anonymous function&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you don't have to unsubscribe from an event later, you can use the addition assignment operator (+=) to attach an anonymous function as an event handler. In the following example, assume that an object named publisher has an event named RaiseCustomEvent and that a CustomEventArgs class has also been defined to carry some kind of specialized event information. Note that the subscriber class needs a reference to publisher in order to subscribe to its events&lt;/p&gt;

&lt;p&gt;&lt;em&gt;publisher.RaiseCustomEvent += (object o, CustomEventArgs e) =&amp;gt;&lt;br&gt;
{&lt;br&gt;&lt;br&gt;
  string s = o.ToString() + " " + e.ToString();&lt;br&gt;&lt;br&gt;
  Console.WriteLine(s);&lt;br&gt;&lt;br&gt;
};&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You cannot easily unsubscribe from an event if you used an anonymous function to subscribe to it. To unsubscribe in this scenario, go back to the code where you subscribe to the event, store the anonymous function in a delegate variable, and then add the delegate to the event. We recommend that you don't use anonymous functions to subscribe to events if you have to unsubscribe from the event at some later point in your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unsubscribing
&lt;/h2&gt;

&lt;p&gt;To prevent your event handler from being invoked when the event is raised, unsubscribe from the event. In order to prevent resource leaks, you should unsubscribe from events before you dispose of a subscriber object. Until you unsubscribe from an event, the multicast delegate that underlies the event in the publishing object has a reference to the delegate that encapsulates the subscriber's event handler. As long as the publishing object holds that reference, garbage collection will not delete your subscriber object.&lt;/p&gt;

&lt;p&gt;To unsubscribe from an event&lt;br&gt;
• Use the subtraction assignment operator (-=) to unsubscribe from an event:&lt;br&gt;
• &lt;em&gt;publisher.RaiseCustomEvent -= HandleCustomEvent;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When all subscribers have unsubscribed from an event, the event instance in the publisher class is set to null.&lt;/p&gt;

&lt;p&gt;Events are, like delegates, a late binding mechanism. In fact, events are built on the language support for delegates.&lt;br&gt;
Events are a way for an object to broadcast (to all interested components in the system) that something has happened. Any other component can subscribe to the event, and be notified when an event is raised.&lt;/p&gt;

&lt;p&gt;You've probably used events in some of your programming. Many graphical systems have an event model to report user interaction. These events would report mouse movement, button presses and similar interactions. That's one of the most common, but certainly not the only scenario where events are used.&lt;/p&gt;

&lt;p&gt;You can define events that should be raised for your classes. One important consideration when working with events is that there may not be any object registered for a particular event. You must write your code so that it does not raise events when no listeners are configured.&lt;/p&gt;

&lt;p&gt;Subscribing to an event also creates a coupling between two objects (the event source, and the event sink). You need to ensure that the event sink unsubscribes from the event source when no longer interested in events.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
