R
B
code

Robert Tamayo's Code Blog

There is no such thing as "thinking in React". There is no "thinking in JavaScript"; there isn't even a "thinking in code". If you think that you are thinking in React, you only think you are thinking.That's true by definition. If I am thinking in React, then technically React i...
Before last week, all the code on my posts was in one color. I built this blog myself, and so instead of finding a 3rd party solution, I decided to build the syntax highlighter myself. My solution was very simple. The constraint was that it h...
My most recent 2 web apps were made using React. I enjoyed React's benefits over jQuery for managing large amounts of data and updating the DOM accordingly. So naturally, I wanted to cheat a little the next time I was working on a project that only had jQuery.There were 3 parts ...
After finishing my first game Bad Blaster in 2015, I started making another one called RoboBot. I had spent a lot of time on the artwork for Bad Blaster, and so for RoboBot I wanted a simpler graphical design that was still visually impressive. I then went on a rampage and creat...
Previously, I wrote about making a simple JavaScript template renderer. It was basically a simple function that would take data in JSON format and use it to render a template.Recently, I needed to enhance it a little. I originally built it so that I wouldn't have to pull in a 3r...
Before I knew what it was called, I was using something called procedural graphics. I figured that as a solo game developer, I couldn't spend too much time drawing everything I wanted to draw, so why not code it instead? In the process, I created some pretty incredible effects f...
I recently added the ability to add comments to this blog. I checked in a month later, and there were of course plenty of spam comments. Some were even posing as me. But of course, that's all fixed now, because I wrote a very simple script that forces comments to be approved bef...
Locking users out of their accounts after a certain number of unsuccessful login attempts is one of the most basic security measures you can take. I have a handful of personal applications which require a user to log in, and so I needed a way to lock out people who might try bru...
Who Built That?
September 08, 2018
A coworker just finished a project he had been working on for weeks. The product manager sent out an email congratulating him, and then gave a demo of the new product. As he was demonstrating it, I thought to myself, does he think it was he who built this, and not the developer?...
It's easy to send an ajax request with POST data from the web, but the first time I needed to do this in Android I found it was a little different. To make things more complicated, Android has deprecated the DefaultHTTPClient class, so when I wanted to reuse old code for sending...
By now, almost all browsers support es6 JavaScript modules, but because Internet Explorer still doesn't support them, I needed to find a backwards compatible solution. In addition, other es6 features such as arrow functions aren't supported by Internet Explorer, and Uglify has t...
In part one of this series, I covered how to prepare the backend API and database for blog comments. This time, I'm going to cover the frontend, which is what the user actually sees and interacts with to write and post a comment. When I first design something, I think in terms o...
When I first began learning web development a couple years ago, I decided to take on a couple of "big" projects to help me learn, the first of which being to write my own blogging platform that I could use on websites I build. The blogging platform I'm using to write this post i...
A while ago I was working on making a store locator ADA compliant. This was my first time working with things like aria-label attributes, screen readers, skip links, and tab-based navigation. I got to the point where the page was working with a screen reader and by using tab nav...
Javascript templating frameworks separate code from html. They also keep things clean. Let's say you have two variables, className and content, and need to use them to create a message somewhere on your page in an async callback function. ...