I try to building an mini Async Task Retry logic. The goal was to simulate a flaky network request and build a wrapper function that automatically retries the request if it fails, instead of just breaking. What I practiced and learned: Generics with Promises: I used TypeScript's built-in generics by defining Promise<ApiResponse> for both the simulator function and the retry wrapper. This ensured both functions knew exactly what shape of data to expect on success. Function Types: I learned how to strongly type a function parameter. I defined my input as apiCallFunc: () => Promise<ApiResponse> so the compiler knows exactly what the passed function will return. later added 3 emojis to make terminal output more readable, 🟢🔴⏳ fun :) #TypeScript #AsyncProgramming #WebDev #LearningInPublic #StudentDeveloper
More Relevant Posts
-
🚀 Excited to share one of the most ambitious projects Diamond 💎 This isn’t just a compiler. It’s a complete educational ecosystem that brings together language design, systems programming, and modern web engineering into one unified platform. Visit here: https://lnkd.in/gP3QHCkx 🔍 What is Diamond? A custom programming language + a real compiler built in C + a fully interactive browser-based IDE. ⚙️ Core Highlights: Built a full compiler pipeline using C, Flex, and Bison Converted the compiler to WebAssembly so it runs directly in the browser Designed a modern IDE using Next.js, React, and TypeScript Added a multi-layer compilation strategy: Browser (WASM) Web Worker optimization Backend fallback (Express.js) Demo mode for resilience 📊 Educational Features: AST Visualization (Graph-based) Flowchart Generation from code logic Token & Symbol Table inspection Scope Explorer & Type Inference insights Intermediate Representation (TAC) & pseudo-assembly view Built-in Debugger with memory snapshots Interactive Challenges & Test Suite One-click HTML/PDF Report Export #CompilerDesign #WebAssembly #FullStackDevelopment #ProgrammingLanguages #SoftwareEngineering #CProgramming #React #NextJS #EducationTech
To view or add a comment, sign in
-
-
Claude Code Tip #20 / 100 — Auto Memory turns Claude into a developer that actually gets smarter the longer you work with it. Most engineers set up a CLAUDE.md once and move on. That's the file you write for Claude — project context, style rules, key file paths. Useful, but static. Auto Memory is different. It's a directory where Claude automatically records its own observations while working: patterns it notices in your codebase, preferences you've shown, mistakes it corrected along the way. Claude writes these notes to itself. Start a new session tomorrow, and Claude already knows you prefer functional components over class-based ones, that tests live in __tests__/ subdirectories, and that you always want TypeScript strict mode on. You never had to say any of it twice. Think of it as the difference between a contractor who starts from scratch every Monday versus one who keeps a running notebook about your project. The second one gets dramatically more useful over time. Set it up by pointing Claude to an auto-memory directory in your settings.json. Let it accumulate knowledge across sessions. The best AI developer isn't the one with the most context window. It's the one that learns from experience. #ClaudeCode #AITools #DeveloperProductivity #Programming #SoftwareEngineering
To view or add a comment, sign in
-
Day 100: Consistency, Growth, and a Milestone 💯 Problem 3740: Minimum Distance Between Three Equal Elements I Today marks 100 days of continuous problem-solving. While the number is just a marker, the real value has been the daily discipline of opening the IDE and tackling whatever challenge LeetCode throws my way. The Strategy: • Frequency Grouping: I used a HashMap to store a list of indices for every unique number in the array. This allowed me to isolate potential triplets instantly. • Sliding Window Logic: For any number appearing three or more times, I looked at a sliding window of three consecutive indices (i,i+1,i+2). • The Formula: Through testing, I identified that the minimum distance between three equal elements can be derived from the span between the first and third occurrence: (index of 3rd - index of 1st) * 2. • Optimization: By iterating through the pre-grouped index lists, I kept the solution efficient and clean. Reflecting on these 100 days, I’ve moved from basic simulations to complex optimizations like Square Root Decomposition and 3D DP. The goal isn't to stop here—it's to keep building, keep optimizing, and keep growing. 🚀 #LeetCode #Java #Algorithms #DataStructures #100DaysOfCode #Consistency #ProblemSolving #DailyCode
To view or add a comment, sign in
-
-
Completed Episode 8 "Deep dive into v8 engine" of Namaste Node.js season -1 #NamasteNodejs by Akshay Saini 🚀 learned how v8 engine takes your code through parsing, interpretation and jit compilation to turn it into fast ,optimized machine code.. 🧠 Parsing Stage Lexical Analysis + Tokenization Breaks code into small units called tokens (keywords, variables, operators). Example: var a = 10; → converted into tokens for easier processing. Syntax Analysis + AST Tokens are converted into an Abstract Syntax Tree (AST). AST represents the structure and logic of the code. Invalid syntax prevents AST creation, resulting in a syntax error. ⚙️ JavaScript Nature Interpreted + Compiled JavaScript is neither purely interpreted nor compiled. It combines both approaches to balance fast execution and performance. 🚀 Execution Pipeline Ignition Converts AST into bytecode and executes it initially. Bytecode An intermediate representation that is more efficient than raw JavaScript. TurboFan Optimizes frequently executed code and converts it into machine code for high performance. 🔥 Optimization makes your code run faster by turning commonly used code into highly efficient machine level instruction. Deoptimization If optimization assumptions fail (e.g., changing data types), the code falls back to the interpreter. #JavaScript #V8Engine #NodeJS #WebDevelopment #Frontend #Backend #FullStack #JSInternals #Coding #Programming #Developers #LearnToCode #Tech #SoftwareEngineering #JIT #TurboFan #Ignition #AST #Parsing #Execution #JSConcepts #CodingJourney #DeveloperLife #PerformanceOptimization #CodeLife #100DaysOfCode #DevCommunity #SoftwareDeveloper #TechLearning
To view or add a comment, sign in
-
-
Effect TS just hit 1 million daily downloads. I’ve spent the past year working with it seriously. Before that, a year with fp-ts. So I’ve seen both ends of the functional TypeScript spectrum. fp-ts taught me the fundamentals: model your data honestly, make errors explicit, use the type system as documentation. Effect keeps all of that and removes most of the friction. Typed errors at the fiber level. Structural dependency injection. Resource safety and concurrency that actually compose. The bigger shift is cognitive. You stop writing defensive code and start writing descriptive code. The difference in long-term maintainability is hard to overstate. 1M daily downloads isn’t just a metric — it’s a signal that the TypeScript community is ready for a more rigorous approach to building software. If you’re still on plain try/catch in 2026, it’s worth a look. #TypeScript #EffectTS #FunctionalProgramming
To view or add a comment, sign in
-
-
Analyzed the SkyFrac platform today. ~640k lines of code. JavaScript ~239k, Python ~165k, PHP ~157k, CSS ~68k But what I love about our software is that we built it from the ground up to handle and serve data, so developing new modules and technologies is easy. Typically we can conceptualize a new technology or analysis at 8AM and have a beta version deployed for testing by 2PM.
To view or add a comment, sign in
-
Do you still consider #JavaScript as “glitter” for webpages? Maybe it's time to reconsider! The math ecosystem of JavaScript is quietly growing under the mainstream radar! Projects like stdlib are building a robust foundation for scientific computing. The stdlib team is building versions of #BLAS and #LAPACK running in the browser! (if you have programmed in #FORTRAN I think you can relate to my enthusiasm😃) At FEAScript, we are also starting to integrate stdlib into our code, thus avoiding having to reinvent everything from scratch! #ScientificComputing #FEA #FEAScript #OpenSource #Engineering
To view or add a comment, sign in
-
-
Post Draft: Day 29 of #30DayCodeChallenge Title: The Art of Knowing Your Limits! The Problem: Jump Game. Given an array of non-negative integers where each element represents your maximum jump length, can you reach the very last index? The Logic: While this can be solved with Dynamic Programming, the Greedy approach is much more elegant and efficient, reducing the complexity to linear time. 1. Maintaining the Horizon: I used a variable mx (maximum reachable index) to keep track of the furthest point I can possibly stand on at any given moment. 2. The Reality Check: As I iterate through the array, if I ever find myself at an index i that is greater than my current mx, it means I've hit a "dead zone"-a gap I cannot jump across. In that case, the miss' Is (return false). 3. Constant Optimization: At every reachable step, I update my mx by taking the maximum of itself and the potential new reach: i + nums[i]. 4. The Result: If I finish the loop without getting stuck, it means the last index was always within my reach! Complexity: Time: O(n) - We only traverse the array once. Space: O(1) - No extra arrays, just one integer to track our progress. One more day, one more pattern mastered. Onward to Day 30! #Java #Algorithms #DataStructures #Greedy #LeetCode #ProblemSolving #150DaysOfCode #SoftwareEngineering
To view or add a comment, sign in
-
-
I watched a Benjamin Code video about a vibe coding tool using multiple terminals. Interesting idea — sometimes you don't want your AI to handle everything. Sometimes you want to split tasks across agents yourself. Went to check it out. MacOS only. So I built my own. It's called Agent Island. Electron + React + TypeScript + xterm.js + node-pty. Multi-window management. File diffs with diff2html. Hook server on port 17392 for external agents. Zustand, chokidar, global hotkeys, tray icon, layout picker (1×1 to 2×4 grids). Still a work in progress. But it works. The mental model came from an unlikely place. Poker players who multi-table (8+ tables at once) built tools like Jurojin and Table Ninja — not to replace their thinking, but to manage cognitive load. Same decision, 12 times in parallel. The tool keeps the operator sane, not autonomous. That's the model. Not "do everything for me." Help me not lose my mind while coordinating 12 things at once. I'm a Windows user. Not by ideology — by circumstance. Most "AI dev productivity" tools assume Unix. They're not wrong. Just optimized for a different environment. Never as well served as by oneself, apparently. — What tools have you built for yourself that nobody else seems to need? #AIEngineering #Tooling #VibeCoding #Electron #Windows #Productivity
To view or add a comment, sign in
-
-
I just returned false on a LeetCode problem… and it passed ALL 67 test cases. No loops. No base conversions. No palindrome checks. Just one line: return false; And it got accepted instantly. The problem? 2396. Strictly Palindromic Number You had to check if a number n is a palindrome in every base from 2 to n-2. Sounds brutal, right? Then I actually read the problem properly. Here's the mind-blowing part: For any n ≥ 4, when you convert it to base (n-2), it always becomes "12". n=5 → base 3 → "12" n=6 → base 4 → "12" n=10 → base 8 → "12" "12" is never a palindrome. So it's mathematically impossible for any number ≥ 4 to be strictly palindromic. For n=1,2,3 the base range is invalid anyway. The answer is always false. The entire "hard" problem collapses into a single line of code. Lesson for every developer: Before you write clever code, ask yourself: Is this problem even possible? Sometimes the best solution isn’t optimized algorithms. It’s pure elimination. O(1) thinking. Read the problem. Really read it. #LeetCode #ProblemSolving #SoftwareEngineering #Coding #DSA #BackendEngineering #CodingInterview #DeveloperMindset #CleanCode
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development