Sadra Yahyapourblog.imsadra.me·Nov 3, 2024FeaturedGeneric Typing in PythonSince Python introduced the ability to add generic types to functions, the language has become much more type-friendly and encourages you to follow this convention for more maintainable code. Obviously, this will lead to a better development experien...31 likes·944 readsPython Generics
Abeer Abdul Ahadabeer.hashnode.dev·Oct 9, 2024Simplifying Type Narrowing and Guards in TypeScriptIntroduction to Narrowing Concept Typescript documentation explains this topic really well. I am not going to copy and paste the same description here, rather I want to make it even simpler and shorter. Let’s look at a problem and see how the concept...33 readsTypeScripttype narrowing
Jit Mitraeclair.hashnode.dev·Jun 7, 2024Types v/s Interfaces in TypeScript - A DilemmaWhen venturing into TypeScript, many encounter the dilemma of whether to employ Types or Interfaces, as both appear to fulfill the same function: predefining data or object types for future use. The TypeScript official documentation recommends priori...45 readsTypeScript
IgniteDevignitedev.hashnode.dev·Apr 14, 2024Implementing type-checking for your environment variables.This article explores how to secure your environment variables with type safety using T3 Env, ensuring robust and error-free configuration. Let's check out an example: "use client" import { ReactNode } from "react" import { ConvexReactClient } from ...TypeScript
Toni Väisänentonitalksdev.com·Oct 1, 2023Data Validation in ClojureMalli is a data-driven schema Clojure library for defining types and validating data. It can be used for example to: type check data when received from untrusted sources i.e. validate that HTTP request bodies before writing to the database define d...530 readsClojure
Potato Scriptcodingtalkies.hashnode.dev·Sep 25, 2023Understanding Type Annotations in JavaScript with JSDocHi and welcome! 👋 In this article, we'll explore the world of type annotations in JavaScript using JSDoc, and how they can improve your code's readability and maintainability. As you know JavaScript is a dynamic programming language, but it's not in...43 readsJavaScript
Wagner Mwagnerm.hashnode.dev·Aug 22, 2023The Magic of Discriminated Union Types in TypeScriptThis is a handy Typescript trick! In simple terms, I like to describe this feature as conditional types. This feature allows you to do things like the below ApiResponse type, let the code talk for himself // You can assert the property will have a sp...45 readsTypeScript
Lucy Linderblog.derlin.ch·Jul 10, 2023When plans go astray: my unsuccessful journey of migrating a large Django project to MypyTL;DR - Mypy is amazing, but your code needs to be ready for it. The untyped nature of Python allows magic to happen and shortcuts to be made (at the cost of more runtime errors). Adding a type checker such as Mypy to a codebase developed under this ...2 likes·2.2K readsPython
Abiola Fasanyaharbiola.hashnode.dev·Apr 20, 2023Exploring Advanced Type Features in TypeScriptTypeScript is a superset of JavaScript that provides optional static type checking and type annotations. One of the main benefits of using TypeScript is that it allows you to catch errors early during development before they make it to production. In...144 readstype checking
Henry Eleonuhenryeleonu.com·Apr 17, 2023How To Encourage Best Practices in Python Programming By Complying With PEP8 Style GuideAs part of this blog post, I have added a YouTube demo on how to enable PEP8 compliance in Visual Studio Code. Enabling PEP8 Compatibility of Python Code in Visual Studio Code - YouTube https://www.youtube.com/watch?v=ZkwHwQ6l4wI Some of the best p...1 like·3.8K readsphp8