Learning How to Script

05 Sep 2024

Starting with Typescript has been eye-opening for me, especially from a Java background. Typescript and JavaScript were new terrains, but my Java experience provided a stable foundation.  

New Possibilities

One of the most striking aspects of Typescript for me has been the sense of freedom it offers. Unlike the more rigid constraints of Java, Typescript allows for multiple return types and flexible variables. This flexibility has opened up new possibilities in my coding. For instance, being able to define a variable with multiple possible types or a function with varied return types has encouraged me to explore more creative (if not always conventional) coding practises. While these might not always align with traditional best practises, they offer an intriguing alternative and make coding more enjoyable. I strictly remember instances where I wished I could return no object and only nothing. For example, in the Balanced Search Tree I made, I would want to search for a node with specific data and then return that node. However, what if no such node was found?

Thus, this newfound freedom has started to reshape how I approach problem-solving. I am increasingly considering how to leverage Typescript’s features to modularise and simplify code. The ability to mix and match types and adapt variables has made me think more about how I can streamline and optimise my code. While I have only had a minimal chance to work with Typescript, this experience has sparked a curiosity about how I can apply these features in more complex scenarios.

Workout of the Day (WOD)

The practise WOD was a valuable introduction to Typescript in a group setting, which helped to ease some of the stress. Working with others on these exercises allowed me to get accustomed to the Typescript environment without the intense pressure of individual performance. However, the real test will be the upcoming individual WOD. I anticipate this will present a more significant challenge, especially when faced with time limits and the need to work independently. The collaborative aspect provided a less stressful environment for further exploring the area with Typescript. I am curious to see how I will handle this independently and how well I can apply the lessons learnt from the practise sessions.

Applying Typescript in Future Projects

As I continue using Typescript, I am excited to explore its potential further. The freedom it offers has already influenced my approach to coding and problem-solving. I am particularly interested in utilising Typescript’s features to enhance code modularity and reduce complexity. The real challenge will be applying these insights in practical scenarios and balancing creativity with maintainability. I have a few projects I want to get going that use Typescript.

In summary, Typescript has provided a refreshing change. Its flexible type system and syntax have encouraged me to think differently about coding practices and problem-solving. While the practise WODs have been a good start, the real test will be to see how these new practises hold up under more demanding conditions. As I continue to explore Typescript, I look forward to discovering how its features can further improve my coding skills and approach.