We already had a 2FA screen for login. It shows a code input, user enters their Google
Authenticator code, hits submit.
Now we need 2FA for password change too.
Option A: Build a second 2FA screen for password change
Option B: Reuse the same screen
React Native's philosophy: build once, reuse everywhere.
We went with B. But there's a catch.
#ReactNative#CodeReuse#CleanCode#AppDevelopment#DevTips
Learning to define functions today. Starting simple: function that takes a number, returns "even" or "odd". The power of reusable code blocks is becoming clear. #PythonFunctions#CodeReuse#ModularProgramming
Data engineering has no npm. Every company rebuilds sessionization, DAU calculations, and experimentation frameworks because SQL dialects fragment everything and we lack unified data models for parametric pipelines. youtube.com/shorts/zS5L_2KcI…#DataEngineering#CodeReuse
Code reuse is the difference between writing software and engineering it. Prioritize modularity for long-term project health.
What's the one utility function you always end up rewriting? 👇
#CodeReuse#Programming#SoftwareEngineering#TechTips#DRY
Custom hooks are a game-changer for building clean, efficient, and maintainable React code. They help developers follow the DRY (Don’t Repeat Yourself) principle by reusing complex stateful logic.
👉 Read the full blog: bit.ly/4ouTO23#React#JavaScript#CodeReuse
💻 Day 261 of #360DaysOfCode
🧩 Utility Types
Explored built-in utility types like Partial, Pick, and Omit — perfect tools for transforming existing types with ease.
#TypeScript#CodeReuse#TypeMagic
💻 C#: ¿Qué son los Genéricos?
Piensa en los Generics como plantillas para tu código 🧩.
En lugar de escribir métodos separados para cada tipo de dato, puedes crear uno solo que funcione para todos 🔥.
✨ Beneficios de los Genéricos en C#
🔁 Reutilización de código
🛡️ Seguridad en tipos garantizada por el compilador
🧼 Código más limpio siguiendo el principio DRY (Don’t Repeat Yourself)
Ya sea que construyas librerías, utilidades o APIs escalables, dominar los Generics es clave para llevar tu código C# al siguiente nivel 🚀.
📌 Ejemplo práctico
En la imagen te muestro un método genérico que devuelve un tipo T.
Mira cómo funciona 👇
🔹 El método genérico
T 👉 es un parámetro de tipo genérico (una “caja vacía” que se sustituye por el tipo real al invocar el método).
List<T> 👉 la lista puede ser de cualquier tipo (List<string>, List<int>, etc.).
items[0] 👉 devuelve el primer elemento de la lista.
public T 👉 el método regresa el mismo tipo que recibe.
🔹 Lo importante
👉 Con un solo método (GetFirstItem<T>) resolvemos el problema para cualquier tipo de lista.
⚠️ Sin genéricos, tendrías que escribir múltiples métodos (uno para string, otro para int, etc.) ❌.
✅ En resumen: los Genéricos hacen tu código más reutilizable, seguro y elegante ✨.
💬 ¿Y tú, ya estás usando Generics en tus proyectos?
#dotnet#csharp#efcore#dotnetcore#dotnetdev#programming#codequality#cleanarchitecture#webaapi#backend#developers#devcommunity#codingtips#softwareengineering#learncsharp#apidevelopment#dotnetdeveloper#genéricos#codereuse
Here is my video about Compositional Software Design !
This video explains what I mean by compositional design, and explains the SCIFI principles that can guide you when designing for composition. It also explains concepts such designing for replaceability and two-way reusability. It also discusses when to use an interface, and when not.
I have been working on the content of this video for more than 1.5 years - and promised this video several times inhere - before I finally got the core ideas distilled enough to convey in a video 😊
The ideas are reasonably simple - but it has taken a long time for me to make them this simple 😁
youtube.com/watch?v=rmEh3E1Z…#SoftwareDesign#CompositionalSoftwareDesign#OOP#FP#CodeReuse