3:I[4707,[],""] 5:I[6423,[],""] 6:I[2972,["972","static/chunks/972-cc9b42d7397369cf.js","878","static/chunks/878-982412dd4420a810.js","308","static/chunks/app/blog/%5Bslug%5D/page-13fab266d12dd767.js"],""] 7:I[5878,["972","static/chunks/972-cc9b42d7397369cf.js","878","static/chunks/878-982412dd4420a810.js","308","static/chunks/app/blog/%5Bslug%5D/page-13fab266d12dd767.js"],"Image"] 8:I[8291,["972","static/chunks/972-cc9b42d7397369cf.js","878","static/chunks/878-982412dd4420a810.js","185","static/chunks/app/layout-e4cbabb472e66bf8.js"],"Analytics"] 9:I[5463,["972","static/chunks/972-cc9b42d7397369cf.js","878","static/chunks/878-982412dd4420a810.js","185","static/chunks/app/layout-e4cbabb472e66bf8.js"],"SpeedInsights"] 4:["slug","static-typing","d"] 0:["oZfUkDMCN7PTLOZwYl3MD",[[["",{"children":["blog",{"children":[["slug","static-typing","d"],{"children":["__PAGE__?{\"slug\":\"static-typing\"}",{}]}]}]},"$undefined","$undefined",true],["",{"children":["blog",{"children":[["slug","static-typing","d"],{"children":["__PAGE__",{},[["$L1",["$","section",null,{"children":[["$","script",null,{"type":"application/ld+json","suppressHydrationWarning":true,"dangerouslySetInnerHTML":{"__html":"{\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",\"headline\":\"The Power of Static Typing in Programming\",\"datePublished\":\"2024-04-07\",\"dateModified\":\"2024-04-07\",\"description\":\"In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic.\",\"image\":\"/og?title=The%20Power%20of%20Static%20Typing%20in%20Programming\",\"url\":\"https://portfolio-blog-starter.vercel.app/blog/static-typing\",\"author\":{\"@type\":\"Person\",\"name\":\"My Portfolio\"}}"}}],["$","h1",null,{"className":"title font-semibold text-2xl tracking-tighter","children":"The Power of Static Typing in Programming"}],["$","div",null,{"className":"flex justify-between items-center mt-2 mb-8 text-sm","children":["$","p",null,{"className":"text-sm text-neutral-600 dark:text-neutral-400","children":"April 7, 2024"}]}],["$","article",null,{"className":"prose","children":"$L2"}]]}],null],null],null]},[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","blog","children","$4","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","blog","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/ef96a655ae698ddf.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"text-black bg-white dark:text-rose-pine-text dark:bg-rose-pine-base __variable_ac79ff __variable_8a4d12","children":["$","body",null,{"className":"antialiased","children":["$","main",null,{"className":"flex-auto min-w-0 flex flex-col px-2 md:px-0 bg-gradient-to-b from-rose-pine-overlay to-rose-pine-surface px-3","children":[["$","header",null,{"className":"z-50 shadow-lg shadow-rose-pine-base bg-rose-pine-surface","children":[["$","div",null,{"className":"max-w-4xl mx-4 mt-8 lg:mx-auto","children":[["$","$L6",null,{"href":"/","className":"flex items-center mb-8","children":[["$","$L7",null,{"src":"/images/mc-logo-rp.png","width":75,"height":75,"alt":"Matthew Caldwell Logo"}],["$","h1",null,{"className":"ms-4 text-2xl font-semibold tracking-tighter","children":"Matthew Caldwell"}]]}],["$","p",null,{"className":"mb-4","children":["I'm a software engineer based in Sparta, Tennessee. I create video games, volunteer with  ",["$","a",null,{"className":"underline","href":"https://cookingupgames.org","target":"_blank","children":"Cooking Up Games"}],", and referee high school sports. My work focuses on JavaScript, React, Elixir, Node.js, and C#. I enjoy building everything from web apps to Discord bots and home automation projects."]}]]}],["$","aside",null,{"className":"-ml-[8px] mb-8 tracking-tight","children":["$","div",null,{"className":"lg:sticky lg:top-20","children":["$","nav",null,{"className":"relative px-0 pb-0 fade md:overflow-auto scroll-pr-6 md:relative","id":"nav","children":["$","div",null,{"className":"flex flex-row space-x-0 pr-10 justify-around max-w-4xl mx-4 mt-8 lg:mx-auto","children":[["$","$L6","mailto:matthew@matthew-caldwell.com",{"href":"mailto:matthew@matthew-caldwell.com","className":"transition-all hover:text-neutral-800 dark:hover:text-neutral-200 underline relative py-1 px-2 m-1","children":"Email"}],["$","$L6","https://gitlab.com/Ech0_2G",{"href":"https://gitlab.com/Ech0_2G","className":"transition-all hover:text-neutral-800 dark:hover:text-neutral-200 underline relative py-1 px-2 m-1","children":"GitLab"}],["$","$L6","https://github.com/CaldwellYSR",{"href":"https://github.com/CaldwellYSR","className":"transition-all hover:text-neutral-800 dark:hover:text-neutral-200 underline relative py-1 px-2 m-1","children":"GitHub"}],["$","$L6","/blog",{"href":"/blog","className":"transition-all hover:text-neutral-800 dark:hover:text-neutral-200 underline relative py-1 px-2 m-1","children":"Blog"}],["$","$L6","https://cookingupgames.org",{"href":"https://cookingupgames.org","className":"transition-all hover:text-neutral-800 dark:hover:text-neutral-200 underline relative py-1 px-2 m-1","children":"Cooking Up Games"}]]}]}]}]}]]}],["$","main",null,{"className":"max-w-4xl lg:min-h-[650px] lg:w-4xl mt-8 lg:mx-auto","children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","section",null,{"children":[["$","h1",null,{"className":"mb-8 text-2xl font-semibold tracking-tighter","children":"404 - Page Not Found"}],["$","p",null,{"className":"mb-4","children":"The page you are looking for does not exist."}]]}],"notFoundStyles":[]}]}],["$","footer",null,{"children":["$","div",null,{"className":"max-w-4xl mx-4 mt-8 pb-4 lg:mx-auto","children":["$","ul",null,{"className":"font-sm mt-8 flex flex-col space-x-0 space-y-2 text-neutral-600 md:flex-row md:space-x-4 md:space-y-0 dark:text-neutral-300","children":[["$","li",null,{"children":["$","a",null,{"className":"flex items-center transition-all hover:text-neutral-800 dark:hover:text-neutral-100","rel":"noopener noreferrer","target":"_blank","href":"/rss","children":[["$","svg",null,{"width":"12","height":"12","viewBox":"0 0 12 12","fill":"none","xmlns":"http://www.w3.org/2000/svg","children":["$","path",null,{"d":"M2.07102 11.3494L0.963068 10.2415L9.2017 1.98864H2.83807L2.85227 0.454545H11.8438V9.46023H10.2955L10.3097 3.09659L2.07102 11.3494Z","fill":"currentColor"}]}],["$","p",null,{"className":"ml-2 h-7","children":"rss"}]]}]}],["$","li",null,{"children":["$","a",null,{"className":"flex items-center transition-all hover:text-neutral-800 dark:hover:text-neutral-100","rel":"noopener noreferrer","target":"_blank","href":"https://github.com/vercel/next.js","children":[["$","svg",null,{"width":"12","height":"12","viewBox":"0 0 12 12","fill":"none","xmlns":"http://www.w3.org/2000/svg","children":["$","path",null,{"d":"M2.07102 11.3494L0.963068 10.2415L9.2017 1.98864H2.83807L2.85227 0.454545H11.8438V9.46023H10.2955L10.3097 3.09659L2.07102 11.3494Z","fill":"currentColor"}]}],["$","p",null,{"className":"ml-2 h-7","children":"github"}]]}]}],["$","li",null,{"children":["$","a",null,{"className":"flex items-center transition-all hover:text-neutral-800 dark:hover:text-neutral-100","rel":"noopener noreferrer","target":"_blank","href":"/resume.pdf","children":[["$","svg",null,{"width":"12","height":"12","viewBox":"0 0 12 12","fill":"none","xmlns":"http://www.w3.org/2000/svg","children":["$","path",null,{"d":"M2.07102 11.3494L0.963068 10.2415L9.2017 1.98864H2.83807L2.85227 0.454545H11.8438V9.46023H10.2955L10.3097 3.09659L2.07102 11.3494Z","fill":"currentColor"}]}],["$","p",null,{"className":"ml-2 h-7","children":"resume"}]]}]}]]}]}]}],["$","$L8",null,{}],["$","$L9",null,{}]]}]}]}]],null],null],["$La",null]]]] b:Tddc,function greet(name: string): string { return `Hello, ${name}!` } // This will throw an error at compile time, preventing potential runtime issues. let message: string = greet(123)c:T1b68,// Refactoring example: Renaming a method in C# public class Calculator { public int Add(int a, int b) { return a + b; } } // After refactoring `Add` to `Sum`, all references are automatically updated. public class Calculator { public int Sum(int a, int b) { return a + b; } }2:[["$","p",null,{"children":"In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic. While dynamic typing offers flexibility and rapid development, static typing brings its own set of powerful advantages that can significantly improve the quality and maintainability of code. In this post, we'll explore why static typing is crucial for developers, accompanied by practical examples through markdown code snippets."}],"\n",["$","h2",null,{"id":"improved-code-quality-and-safety","children":[[["$","a","link-improved-code-quality-and-safety",{"href":"#improved-code-quality-and-safety","className":"anchor"}]],"Improved Code Quality and Safety"]}],"\n",["$","p",null,{"children":"One of the most compelling reasons to use static typing is the improvement it brings to code quality and safety. By enforcing type checks at compile time, static typing catches errors early in the development process, reducing the chances of runtime errors."}],"\n",["$","pre",null,{"children":["$","code",null,{"dangerouslySetInnerHTML":{"__html":"$b"},"className":"language-ts"}]}],"\n",["$","h2",null,{"id":"enhanced-readability-and-maintainability","children":[[["$","a","link-enhanced-readability-and-maintainability",{"href":"#enhanced-readability-and-maintainability","className":"anchor"}]],"Enhanced Readability and Maintainability"]}],"\n",["$","p",null,{"children":"Static typing makes code more readable and maintainable. By explicitly declaring types, developers provide a clear contract of what the code does, making it easier for others (or themselves in the future) to understand and modify the codebase."}],"\n",["$","h2",null,{"id":"facilitates-tooling-and-refactoring","children":[[["$","a","link-facilitates-tooling-and-refactoring",{"href":"#facilitates-tooling-and-refactoring","className":"anchor"}]],"Facilitates Tooling and Refactoring"]}],"\n",["$","p",null,{"children":"Modern IDEs leverage static typing to offer advanced features like code completion, refactoring, and static analysis. These tools can automatically detect issues, suggest fixes, and safely refactor code, enhancing developer productivity and reducing the likelihood of introducing bugs during refactoring."}],"\n",["$","pre",null,{"children":["$","code",null,{"dangerouslySetInnerHTML":{"__html":"$c"},"className":"language-csharp"}]}],"\n",["$","h2",null,{"id":"performance-optimizations","children":[[["$","a","link-performance-optimizations",{"href":"#performance-optimizations","className":"anchor"}]],"Performance Optimizations"]}],"\n",["$","p",null,{"children":"Static typing can lead to better performance. Since types are known at compile time, compilers can optimize the generated code more effectively. This can result in faster execution times and lower resource consumption."}],"\n",["$","h2",null,{"id":"conclusion","children":[[["$","a","link-conclusion",{"href":"#conclusion","className":"anchor"}]],"Conclusion"]}],"\n",["$","p",null,{"children":"Static typing offers numerous benefits that contribute to the development of robust, efficient, and maintainable software. By catching errors early, enhancing readability, facilitating tooling, and enabling optimizations, static typing is an invaluable asset for developers. As the software industry continues to mature, the importance of static typing in ensuring code quality and performance cannot be overstated. Whether you're working on a large-scale enterprise application or a small project, embracing static typing can lead to better software development outcomes."}]] a:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"The Power of Static Typing in Programming"}],["$","meta","3",{"name":"description","content":"In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic."}],["$","meta","4",{"name":"robots","content":"index, follow"}],["$","meta","5",{"name":"googlebot","content":"index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1"}],["$","meta","6",{"property":"og:title","content":"The Power of Static Typing in Programming"}],["$","meta","7",{"property":"og:description","content":"In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic."}],["$","meta","8",{"property":"og:url","content":"https://portfolio-blog-starter.vercel.app/blog/static-typing"}],["$","meta","9",{"property":"og:image","content":"https://portfolio-blog-starter.vercel.app/og?title=The%20Power%20of%20Static%20Typing%20in%20Programming"}],["$","meta","10",{"property":"og:type","content":"article"}],["$","meta","11",{"property":"article:published_time","content":"2024-04-07"}],["$","meta","12",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","13",{"name":"twitter:title","content":"The Power of Static Typing in Programming"}],["$","meta","14",{"name":"twitter:description","content":"In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic."}],["$","meta","15",{"name":"twitter:image","content":"https://portfolio-blog-starter.vercel.app/og?title=The%20Power%20of%20Static%20Typing%20in%20Programming"}],["$","link","16",{"rel":"shortcut icon","href":"/images/mc-logo-rp.png"}],["$","link","17",{"rel":"icon","href":"/images/mc-logo-rp.png"}],["$","link","18",{"rel":"apple-touch-icon","href":"/images/mc-logo-rp.png"}],["$","meta","19",{"name":"next-size-adjust"}]] 1:null