Tried out ReactJS

I didn't like it. Yeah, I know we are probably going to disagree about javascript but I have made an online portfolio using ReactJS which you can access at: "portfolio.mert.wtf" and the experience was frankly boring. I learned it overnight so I don't think I gave it the proper effort it deserves if it deserves any but I have spent around 6-8 hours on React trying to figure stuff out. Learned about how components work, Installed packages and tried them out. Didn't like some, did use some. It wasn't fun, It was an abomination of weird design decisions that are ugly, It was bloated and unnecessary. Let's start the bashing with the design decisions, Javascript components: Literally taking something that works, turning into something that doesn't work and then rendering it as the same thing that used to work using a DOM is not a better way of doing things. It is bad design and it is unnecessary repetition. You can just work on normal html elements and achieve the same with a little more effort. The only presumable plus is that you can keep states in javascript which you can also do with cookies or urls so I guess that is not really a plus. (Check openstreetmap and how it stores coordinates for a example of doing this with urls) "https://www.openstreetmap.org/#map=14/55.7634/-4.1951". Now let's come to the part with bloat, We don't really need shiny things to achieve information, It cost us web traffic, it is less available (assuming 1/3rd of the world doesn't even have internet access and there are so many people with slow internet connections) as we mostly render images and unnecessary icons everywhere we go which makes it resource heavy. It is hard to run on outdated hardware, It is a waste of resources as the front end needs a server to serve it that has to run javascript code for each user, instead of just returning a GET request with an html file which gets things done. So what we have is something that is bad by design, bad for the resources, and a hassle to use. I would recommend staying with plain html with a salt of css, and if you really really need that responsive stuff a little bit javascript without complex classes wouldn't hurt but I recommend against using ReactJS or anything alike.
May 19, 2020 -spike

Heroku

I kind of started to enjoy their services, It gets rid of the long process of: Installing a distro, Hosting an apache server, connecting my application to the apache server, port forwarding the port 80 to my server etc... Obviously it is not running on my device but as long as I own the domain name and as long as I am capable of hosting my own website in case they refuse me service or in case their service go down, I don't see a reason for the gruesome process of hosting and keeping the server up at home. Obviously I have to take back ups once in a while but that's what you should do everywhere. I used to host my own email server and my website on a librebooted thinkpad that I have laying around, It was long. Also making sure my home network is secure is another process, or re-deploying on every single update or writing a script or a docker file to do so.... Well I am a lazy person after all and why go through all that while you just can avoid it.... Now my personal website just updates with my git pushes. I am kind of happy. I mean happy as in most of the things in my life suck still but now I don't need to deal with deployment at every phase of my development process sort of happy. Which is such a good way to save time! Happiness is surely a process though, heroku still sometimes gives random errors, well the key to happiness in life is about fixing errors and making the process to fix the errors as easy as possible after all.
May 18, 2020 -spike

On Spatial Partitioning

I find this topic interesting so I hope you will as well... So let's start with physics engines even though there are many uses for spatial partitioning in programming and maths. Everyone likes video games after all. In video game engines, especially at that part where we detect collissions (physics engine) we run into a computational problem, there are too many collissions between objects to calculate. Let's assume there are 10 objects (to make this mathematically easy) in a scene if we calculated each object for colliding between each other we would have to calculate 100 colissions each update. Most of the time we have way too many more objects than just 10 in our game scene and calculating all of them for collisions with each other is not a feasible option. And well our computer kind of starts to heat up after some point if we try that anyways. So what do we do I hear you asking... Well even though title gives it out, we partition the game map into smaller fragments and calculate the collissions between objects that are in those fragments. There are also cool algorithms to accomplish this but I am not an academic blogger or anything I am just writing about the fact that this exist because it is cool so I am not going to get into details. If you want to get more into details though you can check out BSP trees, Quadtrees and Octrees. Also think about an algorithm (for video games) in a scenario where we calculate how many objects are meant to collide in an area and then partition the map according to that instead of using a generic algorithm, there is probably someone who already wrote this algoritthm but like still it would be cool if it exists (probably going to google this after finishing up writing this blog post).
May 13, 2020 -spike