teleren/devto huggingface dataset:
Five common mistakes when writing a technical blog post
Published: 2023-03-11 15:05:05

Writing a technical blog post can be a challenging task, especially if you are new to blogging. However, even experienced bloggers can make mistakes that can affect the quality and impact of their posts. In this article, we will discuss five common mistakes that writers make when writing technical blog posts, and how to avoid them.

**Using too much jargon**

Technical writing often involves specialized terms and jargon. However, it's essential to remember that not everyone reading your post will have the same level of expertise. Using too much technical jargon can make your post difficult to understand and turn readers away. Therefore, it's essential to strike a balance between using the necessary technical terms and explaining them in simple terms.

**Focusing on the product rather than the problem**

Technical writers can sometimes fall into the trap of focusing too much on the features of the product they are writing about. However, the purpose of a technical blog post is to help readers solve a problem. Therefore, it's crucial to focus on the problem the reader is facing and how the product can help them solve it. By focusing on the problem rather than the product, you can make your post more engaging and valuable to readers.

**Not structuring the post properly**

A technical blog post should have a clear structure that guides the reader through the content. Not structuring the post correctly can make it challenging to read and understand. Therefore, it's essential to use headings and subheadings to break up the post into sections. Additionally, you should use bullet points and numbered lists to make the content more scannable.

**Not providing examples**

Providing examples is an effective way to make your technical blog post more engaging and relatable to readers. Examples help readers understand how the product or solution works in real-life situations. Additionally, examples can help illustrate complex concepts and make them more accessible to readers. Therefore, it's essential to include examples in your technical blog post where relevant.

**Neglecting editing and proofreading**

Technical blog posts often require a lot of research, and it's easy to make mistakes. Neglecting editing and proofreading can result in errors that can affect the credibility of your post. Therefore, it's essential to take the time to edit and proofread your post carefully. You can also consider asking someone else to read and review your post before publishing it.

In conclusion, writing a technical blog post requires attention to detail, research, and careful planning. By avoiding these common mistakes, you can create a high-quality technical blog post that engages readers and provides value.
7 Common Mistakes to Avoid When Writing JavaScript Code
Tags: webdev, javascript, beginners, programming
Published: 2023-03-11 14:55:51

JavaScript is one of the most widely used programming languages in the world, and for good reason. It is a powerful language that can be used for everything from simple scripts to complex applications. However, even experienced developers can make mistakes when writing JavaScript code. In this article, we will discuss seven common mistakes to avoid when writing JavaScript code.

**Not using semicolons**

One of the most common mistakes in JavaScript is forgetting to add semicolons at the end of each statement. While semicolons are not always required in JavaScript, it is a good practice to use them to avoid errors. If you forget to add a semicolon, JavaScript will try to add one for you, but it may not always be in the right place, leading to unexpected errors.

**Declaring variables with var**

In JavaScript, you can declare variables using var, let, or const. While var is still supported in modern JavaScript, it has some issues that make it a less desirable option. One problem with var is that it has function scope, which can lead to unexpected behavior. Instead, use let or const, which have block scope and are more predictable.

**Using == instead of ===**

JavaScript has two equality operators: == and ===. The double equals operator (==) performs type coercion, which can lead to unexpected results. For example, 1 == '1' is true, but 1 === '1' is false. To avoid these types of issues, always use the triple equals operator (===), which performs a strict comparison.

**Not using braces with if statements**

In JavaScript, you can use an if statement without braces if there is only one statement to execute. However, this can lead to confusion and errors when modifying the code. It is best to always use braces, even if there is only one statement.

**Ignoring error handling**

Error handling is an essential part of writing robust JavaScript code. Failing to handle errors can lead to unexpected behavior and security vulnerabilities. Always use try-catch blocks to handle errors, and make sure to log errors to the console or server for debugging purposes.

**Not optimizing loops**

Loops are a common part of JavaScript code, but they can also be a source of performance issues. When iterating over arrays or objects, always use for loops instead of forEach or for...in loops, which can be slower. Additionally, try to minimize the number of calculations and function calls inside loops to improve performance.

**Not using strict mode**

Strict mode is a feature in modern JavaScript that helps you write safer and more secure code. It enables a set of strict rules that prevent common mistakes and encourage best practices. To enable strict mode, add 'use strict' at the beginning of your code or function.

In conclusion, JavaScript is a powerful and flexible language, but it can also be tricky to write error-free code. By avoiding these common mistakes, you can write more reliable and efficient JavaScript code that is easier to maintain and debug.
🎮From Animation to Game Development: My Journey Choosing a Career
Published: 2023-03-11 14:37:29

From the moment I was old enough to hold a pencil, I've been fascinated by animation. I'd spend hours doodling my favorite characters and dreaming of one day bringing them to life on the big screen.

One day, while exploring the depths of YouTube, I stumbled upon a Pixar studio tour that blew my mind. I was mesmerized by the intricate process of animation and knew then and there that I wanted to become an animator.

After diving headfirst into the world of animation for 3-4 years, I stumbled upon a whole new world - game development! I started tinkering with Blender's built-in game engine and found it to be the perfect fit for a non-coder like myself. But, as much as I loved it, I quickly realized that I could only create PC games.

Determined to expand my horizons, I scoured the internet for the best game engine to make phone games. I tried my hand at several engines, but none of them quite fit the bill. That's when my friend suggested the Unity game engine. I'd heard of it before, but my old computer couldn't handle it at the time. Now, with a new and improved setup, I was ready to tackle it head-on!

Since then, I've been on a mission to become the perfect hybrid of a game developer and animator. And guess what? It's working! Today, I'm proud to say that I'm working in the field of game development, doing what I love every single day.


#gamedevelopment #animation #like #developer #love #career #indiedev #story
React Typescript Code Snippet: How to smoothly scroll + focus to invalid input on form validation?
Tags: typescript, react, webdev, javascript
Published: 2023-03-11 14:32:36

When we use `onSubmit`, the default behaviour is to instant scroll and focus invalid element. Sometimes, if you have fixed headers, the input becomes **hidden** after scroll.

The following function will:

0. Select the first errored input
1. Smoothly scroll to selected input
2. Apply offset from top
3. Set focus, when input becomes visible


```ts
// Declare a window variable to get only first invocation of 'onInvalid' from 'form' 
declare global {
  interface Window {
    scrolled?: boolean;
  }
}
export function scrollToElement(
  element: EventTarget & HTMLFormElement,
  offset: number = 250
) {
  // It uses offset to check if its visible below header
  function isFullVisible(element: EventTarget & HTMLFormElement, offset: number = 0) {
    const elementRect = element.getBoundingClientRect();
    const windowHeight =
      (window.innerHeight || document.documentElement.clientHeight);

      const isTopVisible = elementRect.top >= offset && elementRect.top < windowHeight;
      const isBottomVisible =
      elementRect.bottom >= offset && elementRect.bottom <= windowHeight;
      
      const fullVisible = isTopVisible && isBottomVisible;
    return fullVisible
  }

  function run(element: EventTarget & HTMLFormElement, offset: number = 250) {
    const elementPosition =
      element.getBoundingClientRect().top + window.scrollY;

    const alreadyRunt = window.scrolled;

    if (alreadyRunt) {
      return;
    } else {
      window.scrolled = true;
      // Time to guarantee that all invocations of 'onInvalid' was ended
      setTimeout(() => delete window["scrolled"], 300);
    }

    if (isFullVisible(element, offset)) {
      element?.focus();
      return;
    }

    window.scroll({
      // This scroll is not always accurate
      // -1 is to force a scroll if by chance it is not visible for less than 1px
      top: elementPosition - offset - 1,
      behavior: "smooth",
    });

    window.addEventListener("scroll", function scrollHandler() {
      // 0 offset to immediate focus on user view, and not when scroll ended
      const fullVisible = isFullVisible(element, 0);

      if (fullVisible) {
        window.removeEventListener("scroll", scrollHandler);
        element?.focus();
      }
    });
  }

  return run(element, offset);
}

```

Then just use it

```tsx
<form
  onSubmit={(e) => {
    // ...
  }}
  onInvalid={(e) => {
    e.preventDefault()

    const element = e.target as EventTarget & HTMLFormElement
    scrollToElement(element, 250) // 250 is header height + gap
  }}
>
   ...
```

This post was created with the aim of helping people through the search, and registering this snippet for my future uses.

I hope you found this, and it helped you. :D
It's easier to win the lottery than to land a new job in frontend
Tags: frontend, career, programming
Published: 2023-03-11 14:31:46

Shower thought 💭

As a frontend developer, I recently had an eye-opening realization: it's easier for me to win the lottery than to land a new job in frontend.


![Lottery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0dqblq2mmzgplhbw013z.jpeg)

I don't say this to discourage anyone from pursuing a career in frontend development, which is a rewarding and exciting field that I'm passionate about. But it's important to acknowledge the reality of the job market.

Consider this: let's assume we're looking at a frontend developer position with the following requirements:

🛠️ Must know one of three CSS frameworks (Bootstrap, Foundation, or Bulma)
🛠️ Must know one of three CSS preprocessors (SCSS, LESS, or Stylus)
🛠️ Must know one of three JavaScript frameworks (React, Angular, or Vue)
🛠️ Must know one of two build tools (Webpack or Gulp)
🛠️ Must know one of two task runners (Grunt or NPM scripts)
🛠️ Must know one of three templating engines (Handlebars, Pug, or EJS)
🛠️ Must know one of three CSS methodologies (BEM, SMACSS, or OOCSS)
🛠️ Must know one of three front-end testing frameworks (Jest, Mocha, or Cypress)
🛠️ Must know one of two version control systems (Git or SVN)
🛠️ Must know one of two content management systems (WordPress or Drupal)
🛠️ Must know one of two animation libraries (GSAP or Anime.js)
🛠️ Must know one of three UI component libraries (Material UI, Semantic UI, or Ant Design)
🛠️ Must know one of two vector graphic editors (Adobe Illustrator or Sketch)
🛠️ Must know one of two design tools (Adobe Photoshop or Figma)
🛠️ Must know one of three browser developer tools (Chrome DevTools, Firefox Developer Edition, or Safari Web Inspector)

To calculate the total number of possible combinations, we can multiply the number of options for each requirement:

3 x 3 x 3 x 2 x 2 x 3 x 3 x 3 x 2 x 2 x 2 x 3 x 2 x 2 x 3 = 373,248

🧮 So there are over 370,000 possible combinations of skills that a frontend developer may be required to have, depending on the specific job posting and list not even complete. It's no wonder that finding the perfect candidate can be a challenging task for hiring managers!

When you factor in all the other possible combinations that employers could be looking for, it's no wonder that finding the right job can feel like trying to win the lottery.

But even though it may be challenging, it's not impossible. With hard work, persistence, and a bit of luck, we can find the right opportunity that matches our skills and goals.

So if you're a frontend developer feeling discouraged by the job market, know that you're not alone. Keep pushing forward, keep learning and growing, and keep applying to jobs that match your skill set. And if you found this post helpful, please like, comment, or share it. Let's support each other in our careers and increase our reach in the job market.

Source: [LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:7039892707682496513/)

Written via ChatGPT.
Cloud Computing
Tags: cloud, cloudcomputing, deployments, cloudservice
Published: 2023-03-11 14:24:10

Cloud computing is the on-demand delivery of computing services which includes servers, data storage, databases, networking, software, analytics, and intelligence.

In cloud computing customer will have to pay only for the services he/she uses. As business change customer can scale their application based on their business requirements.

**Benefits of cloud computing**

**Cost**

By using cloud computing services, we can eliminate the expenses of purchasing the software and hardware resources that are used in the data centers. The entire infrastructure operations such as electricity, power, cooling, round-the-clock operations, server scaling, etc are done for us by the cloud provider.

**Speed**

Cloud computing providers are very fast at delivering services and are mostly self-service. A lot of things are done within minutes including the creation of servers, managing databases, etc, this enables businesses flexibility and on-time service delivery to clients.

**Security**

Cloud computing provides best security practices that include policies, and technologies that strengthen the security of the applications or software's that are hosted on the cloud. This reduces the risk of exposure to potential threats.

**Uses of cloud computing**

1. Creating cloud-native applications
2. Testing and building applications
3. Storing and backing up data
4. Data Analysis
5. Audio and video streaming services
Revamped Rust: Faster, Safer, and More Stable with Latest Updates!
Tags: rust, news
Published: 2023-03-11 14:15:26

Exciting news for Rust developers! Rust 1.68.0 stable has been released, bringing with it a number of new features and improvements.

One of the major updates is Cargo's new sparse protocol, which significantly improves performance when accessing crates.io. Instead of downloading a full index from a GitHub repo, Cargo now fetches files directly over HTTPS and only downloads information about the specific crate dependencies in your project. It's worth noting that this protocol will become the default for crates.io in the 1.70.0 release.

Another noteworthy feature is the local pin construction with the pin macro, which allows you to pin a future to a specific memory location, preventing it from being moved. This is crucial for making async blocks safe, as it ensures that references are not invalidated. The standard library's new Pin macro makes it easy to use without relying on a third-party dependency.

Lastly, the default alloc error handler has been updated. If your program includes the standard library and an allocation fails, it will print to stderr and abort. However, if your program does not include the standard library, it will panic on failure. This default behavior can be adjusted with the PanicHandler macro if desired.

In addition, Rust 1.68.0 includes some API stabilizations.

If you're interested in learning more about these updates, be sure to check out the official release notes at https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html.
![Rust 1.68.0](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t28z7icfg32dij8zgbd9.png)
Izoh
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-11 13:46:16

Salom dasturchi bugun siz bilan C ++ da _Izoh_ ya 'ni kamentariya qoldirish bilan tanishib chiqamiz . 
Hozir siz Izoh nima ? U bizga nima uchun kerak va yana shunga o'xshash savollaringizga javob olasiz . 

Qani ketdik : 
Izoh bu boshida aytganimdek komentariy uni biz - biror joyini tushuntirib ketayotgan bo'lsak yoki yozayotgan narsamiz ekranga chiqishini hohlamasak ishlatamiz . 

Izoh o'zi qanday bo'ladi ? 
Paython dasturlash tilida komentariya qoldirish : 

1. Bitta qator uchun - # 
2. Katta komentariya qoldirish - Boshiga """ va tugashiga """ qo'ysa komentariyaga olinadi . Buni qulay tarafi vaqt tejaladi va ajralib turadi . 
Man sizlarga kotta komentariyadan foydalanishingizni maslahat beraman **ammo** bitta qator uchun komentariya chiroyliroq va o'zgacha turadi . 

C ++ dasturlash tilida Izoh : 

1. Bitta qator uchun izoh qoldirish - // belgisi . 
2. Katta komentariya qoldirish - boshiga /* va oxiriga */ belgilari . 

Hozir C ++ da qanday yozilishini ko'd orqali yozib ko'rsataman .
Why do developers earn a lot of money ?
Tags: devjournal, computerscience, programming, productivity
Published: 2023-03-11 13:43:41

Developers can earn a lot of money for several reasons. One of the primary reasons is that the demand for skilled developers is high, and the supply of qualified developers is relatively low. This supply and demand imbalance drives up the salaries for developers as companies compete to attract and retain top talent.

Additionally, developers possess highly specialized skills that are in high demand across a wide range of industries. As businesses increasingly rely on technology to operate and grow, the need for skilled developers to create, maintain, and improve software systems continues to grow.

Furthermore, the complexity and importance of the work that developers do also contribute to their high salaries. Developing software systems can be challenging and requires a high degree of skill, expertise, and attention to detail. Errors in code can lead to costly downtime, data breaches, and other serious consequences for businesses.

Finally, the constantly evolving nature of the technology industry means that developers must continuously learn and adapt to new technologies and trends. This ongoing investment in education and training also justifies the high salaries that developers command.

In summary, the high demand for skilled developers, the specialized nature of their work, the importance of the systems they develop, and the ongoing investment in their education and training are some of the reasons why developers can earn large salaries.
A Roadmap to Becoming a Python Developer
Tags: codenewbie, computerscience, python, programming
Published: 2023-03-11 13:40:57

Python is a versatile and widely-used programming language that has become increasingly popular in recent years. Its ease of use and vast library of tools and resources make it an attractive language for both beginners and experienced developers. In this article, we will provide a roadmap for becoming a Python developer.

**Step 1: Learn the Basics of Python**
The first step in becoming a Python developer is to learn the basics of the language. This includes understanding the syntax, data types, control structures, and functions. There are many online resources available for learning Python, including interactive tutorials, online courses, and textbooks.

Some popular resources for learning Python include Codecademy, Coursera, Udemy, and the official Python documentation. It's important to find a learning resource that works for your learning style and pace.

**Step 2: Practice Coding and Build Projects**
Once you have a solid understanding of the basics of Python, it's important to start practicing your coding skills and building projects. This will help you to reinforce your knowledge and gain practical experience in applying Python to real-world problems.

There are many online resources available for practicing coding and building projects, including coding challenges, coding competitions, and open-source projects. Some popular resources for practicing Python coding and building projects include Project Euler, HackerRank, and Kaggle.

**Step 3: Specialize in a Specific Area**
Python is used in a wide variety of industries and applications, from web development to data science to artificial intelligence. Once you have a solid foundation in Python, it's a good idea to specialize in a specific area.

Some popular areas of specialization in Python include web development with Django or Flask, data analysis and visualization with NumPy and Pandas, and machine learning with Scikit-Learn or TensorFlow. It's important to choose an area that interests you and aligns with your career goals.

**Step 4: Build a Portfolio and Network**
Building a portfolio of projects and networking with other developers and industry professionals is an important step in becoming a successful Python developer. Your portfolio should showcase your skills and demonstrate your ability to solve real-world problems using Python.

Networking can be done through attending industry events, participating in online forums and communities, and connecting with other developers on social media platforms like LinkedIn and Twitter.

**Conclusion**
Becoming a Python developer requires a combination of learning the basics, practicing coding and building projects, specializing in a specific area, and building a portfolio and network. It's important to have a solid foundation in the language, but also to continuously learn and adapt to new technologies and industry trends. With dedication and hard work, anyone can become a successful Python developer.