2 minute read

So, I’ve been working on private projects. It’s quite massive. I’m learning some concepts along the way but they’re more of ideas to improve managing and organizing a project so that it is maintainable even with the large amount of things that’s supposed to be there.

I’ve started using Typescript

What could I say? It’s amazing. You don’t know just how much benefit you get by adding types to everything in javascript until you’ve experienced it yourself. Sure, JSDoc might be an alternative (in terms of autocomplete features and type inference with VSCode) if you still don’t wanna do Typescript but it is severely limited on its own.

In large projects, it’s easy to lose track of things, and using typescript makes it so that we know everything that’s happening. Oh, you don’t know what this variable is? or what it should have? Hit up Ctrl and hover your mouse on it, if typescript is set up and everything is typed properly, you would see the answers to your question in an instant. You don’t even need to run the code at times to see if you’re doing it right. If the types don’t match up you can’t do certain things and it gives you errors already, like using methods from an object of type X that an object of type Y won’t have.

Overall, Typescript is a must have when developing things with Javascript.

Solving problems creatively

I guess there’s really a difference when it comes to people who are experienced in programming and not. Well, that’s the case for almost any endeavour. Someone who’s an expert on something could apply “creativity” to their work. What I mean by “creativity” isn’t simply a personal touch, rather it is an enhancement that isn’t written in the books and does not violate the established rules and principles as well.

In programming, that would be following the best practices, the conventions depending on the language, and creating a novel solution that ChatGPT couldn’t make up without you spoonfeeding the literal specific process of the thing you’re doing. Which in that case, ChatGPT wouldn’t be helpful because you’re supposed to know how to do it before it does and it can only regurgitate what you told it. That is creativity. I applied my creativity to a problem in web-scraping where people find it difficult to scrape sites with random autogenerated classnames and ids. Which makes sense, since classnames and ids are used to categorized content. During development, one would have to write those classnames and ids as something that makes sense to the developers. However, their site could also end up being abused by bots and scrapers, so during production they use another process to randomize the names of almost everything except for the literal content we see.

Well having developed websites for fun, I figured out an algorithm that can scrape content regardless of what was mentioned above. Bonus, it is fast and it doesn’t require models be it an OCR (optical character recognition) and the like (other machine learning methods).

Updated: