<?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: Yatin Choudhary</title>
    <description>The latest articles on DEV Community by Yatin Choudhary (@yatin300701).</description>
    <link>https://dev.to/yatin300701</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%2F1037733%2F68baed9f-0414-4591-b20a-2e2db062baa3.png</url>
      <title>DEV Community: Yatin Choudhary</title>
      <link>https://dev.to/yatin300701</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yatin300701"/>
    <language>en</language>
    <item>
      <title>Should you join TCS, Wipro or startup as a junior software developer?</title>
      <dc:creator>Yatin Choudhary</dc:creator>
      <pubDate>Sat, 08 Jun 2024 16:25:01 +0000</pubDate>
      <link>https://dev.to/yatin300701/should-you-join-tcs-wipro-or-startup-as-a-junior-software-developer-27df</link>
      <guid>https://dev.to/yatin300701/should-you-join-tcs-wipro-or-startup-as-a-junior-software-developer-27df</guid>
      <description>&lt;p&gt;Let me first briefly tell you about myself. I am a junior software engineer in a startup. It is a product-based company which sells software for interior design to people. I was taken as a front-end developer in this.&lt;/p&gt;

&lt;p&gt;So...What's new in it? And why have I written an article about joining startups or big companies?&lt;/p&gt;

&lt;p&gt;Let me tell you a small story, my friend and I were searching for a job. He got a job as a Frontend Developer (React Js) in TCS, and I got the same in a startup. Fast forward to now, I met him on the weekend, and we discussed our little journey in the tech world. He was shocked when I told him the technologies I have worked on, from frontend, and backend to deploying code on AWS. In just a matter of one to two years, I have had more exposure to technology than him. Though our salaries remain the same ( we both cried on this).&lt;/p&gt;

&lt;p&gt;Everything aside, I asked him the reason. And he told me the same as any LinkedIn post would, in big companies like TSC and Wipro which are service-based, ( I don't know about Product Based Companies like Amazon etc), junior software developers either work on fixing small bugs or are on bench when there is no work. So the growth in these companies as a developer is &lt;em&gt;Nil batee san nata&lt;/em&gt;. Whereas in startups even the junior developers may have the responsibility of a feature ( it may not be something big). It teaches a lot of things as a fresher from ownership to seeing its impact on actual users. &lt;/p&gt;

&lt;p&gt;I still remember I removed sorting on the name (as we had a search feature on it) in one table thinking no one used it. The next day we got a call from a customer who complained about sorting not working on name. Yes, my code was reviewed, and tested (our company didn't have testers, the developer was the owner of the feature so he was the tester himself, inspired by Amazon)  but somehow it was missed, and guess who was blamed, &lt;strong&gt;no one&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Of course, it was a joke, I was blamed for it.&lt;/p&gt;

&lt;p&gt;But I was not scolded for it. I was asked to fix it and within one or two hours, we deployed my fix. (So fast isn't it). Later my manager after my apology told me to never remove any feature on my own.&lt;/p&gt;

&lt;p&gt;I don't know what would have happened in big companies, either it would have been detected earlier or I don't know.&lt;/p&gt;

&lt;p&gt;This is one of the many mistakes that I have done and learnt from them ( Yes, I made a lot of mistakes). &lt;/p&gt;

&lt;p&gt;I not only learned about ownership, but as I was getting a grip of one technology, our team leader started delegating more work, from deploying code on AWS to writing backend for some applications.&lt;/p&gt;

&lt;p&gt;It made me learn more and more technologies, and I was growing.&lt;/p&gt;

&lt;p&gt;It was not the same for my friend. It's been more than a year, and guess what his knowledge is still somewhat the same ( I am not criticizing him, he had tried learning from doing personal projects, but his speed is slow).&lt;/p&gt;

&lt;p&gt;So should you join startups over these companies? &lt;/p&gt;

&lt;p&gt;I would say take a step back and look what you want. Though I may have learned a lot, but still working on some Saturdays and Sundays is tiring. And we are not given extra money for overwork. &lt;/p&gt;

&lt;p&gt;So would you be able to do it, will determine what you want (If the salary in both companies is the same).&lt;/p&gt;

</description>
      <category>fresher</category>
      <category>develper</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>Why You Should Avoid Using 'any' in TypeScript and How to Do It</title>
      <dc:creator>Yatin Choudhary</dc:creator>
      <pubDate>Sun, 16 Apr 2023 15:28:10 +0000</pubDate>
      <link>https://dev.to/yatin300701/why-you-should-avoid-using-any-in-typescript-and-how-to-do-it-14f</link>
      <guid>https://dev.to/yatin300701/why-you-should-avoid-using-any-in-typescript-and-how-to-do-it-14f</guid>
      <description>&lt;p&gt;In TypeScript, 'any' is a special data type that allows a variable to hold any type of value, similar to the 'Object' type in JavaScript. When a variable is declared as 'any', TypeScript's type checker doesn't perform any type checking on it, making it possible to assign values of any type to the variable. While using 'any' can make the code more flexible and easy to write, it can also lead to runtime errors and make the code less maintainable, as it makes it harder to catch type-related errors during development.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myVariable: any = "Hello World";
console.log(myVariable); // Output: "Hello World"

myVariable = 123;
console.log(myVariable); // Output: 123

myVariable = true;
console.log(myVariable); // Output: true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using 'any' in TypeScript can provide some benefits in certain scenarios. For eg.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When prototyping an application, using 'any' can make the code more flexible and easy to write. It allows you to quickly build the application without worrying about the data types and allows you to test your code quickly.&lt;/li&gt;
&lt;li&gt;When prototyping an application, using 'any' can make the code more flexible and easy to write. It allows you to quickly build the application without worrying about the data types and allows you to test your code quickly.&lt;/li&gt;
&lt;li&gt; If you are working with existing code that doesn't have type annotations, using 'any' can help to gradually introduce type safety in your codebase. By starting with 'any' types, you can progressively add type annotations to your code over time, making it more maintainable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;BUT...&lt;/p&gt;

&lt;p&gt;Using 'any' in TypeScript should be avoided as much as possible for several reasons&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When using 'any', TypeScript's type checker does not perform any type checking on the variable, making it easier to introduce runtime errors. This can make the code less reliable and harder to maintain, especially in larger projects.&lt;/li&gt;
&lt;li&gt; When a variable is declared as 'any', it can be difficult to understand what type of data it should hold. This can make the code less readable and harder to understand for other developers working on the project.&lt;/li&gt;
&lt;li&gt;When a project grows in size and complexity, using 'any' can make it harder to maintain and debug the code. This is because it's more difficult to catch type-related errors during development, making it harder to identify and fix issues.&lt;/li&gt;
&lt;li&gt;TypeScript is designed to use type inference to determine the types of variables based on their values. When a variable is declared as 'any', TypeScript loses the ability to infer the type, making it harder to detect errors and maintain the code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So how to do it ,&lt;/p&gt;

&lt;p&gt;Some well known answers are :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use more specific types&lt;/li&gt;
&lt;li&gt;Use type inference&lt;/li&gt;
&lt;li&gt;Use interfaces or types&lt;/li&gt;
&lt;li&gt;Use strictNullChecks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And you can also use :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Record types to avoid using 'any' in TypeScript. Record types allow you to define an object type with a specific set of keys and values.
For example, instead of using 'any' to represent an object with unknown keys and values, you can define a Record type that specifies the shape of the object:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyObject = Record&amp;lt;string, unknown&amp;gt;;

const myObj: MyObject = {
  foo: "bar",
  num: 123,
  bool: true,
  nestedObj: {
    key: "value",
  },
};

console.log(myObj.foo); // Output: "bar"
console.log(myObj.num); // Output: 123
console.log(myObj.bool); // Output: true
console.log(myObj.nestedObj.key); // Output: "value"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.'Partial' and 'Required' utility types to create a new type with some properties optional and some required.&lt;/p&gt;

&lt;p&gt;For example, let's say you have an object type that includes 'any' to allow for flexibility:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyObject = {
  name: string;
  age: number;
  address: any;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to make the 'address' property optional, you can use the 'Partial' utility type to create a new type with the 'address' property as optional:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyPartialObject = Partial&amp;lt;MyObject&amp;gt; &amp;amp; {
  address?: any;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, if you want to make the 'name' property required, you can use the 'Required' utility type to create a new type with the 'name' property required:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyRequiredObject = Required&amp;lt;MyObject&amp;gt; &amp;amp; {
  name: string;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.Pick and Omit &lt;br&gt;
'Pick' and 'Omit' utility types can be used to select or remove properties from an object type, respectively.&lt;br&gt;
The 'Pick' type allows you to select specific properties from an object type and create a new type with only those properties. For example, if you have an object type with multiple properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyObject = {
  name: string;
  age: number;
  email: string;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can create a new type with only the 'name' and 'age' properties using the 'Pick' type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyPickObject = Pick&amp;lt;MyObject, 'name' | 'age'&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the other hand, the 'Omit' type allows you to remove specific properties from an object type and create a new type without those properties.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type MyOmitObject = Omit&amp;lt;MyObject, 'email'&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading...&lt;/p&gt;

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