I want to share some basic CSS that I wish I knew at the start of my web development journey. These tips have been boiled down, shaved, filtered and thickened. Im only including the juicy bits and will not be getting into the nitty gritty of what, only how. Explanations will be puddle-deep but that’s all you really need to get a little drink of CSS. I will cover:
The Power of Three is a classic beginner programming question. The question goes like this: given a number n, return true if it’s a power of three or false if it’s not. Assume n is greater than 0. Its simple to solve but the most optimal solution is pretty cool as it’s runtime is constant. Constant time solutions are great because they will do a set amount of operations no matter how large the input n is. I will first cover the simple bottom-up solution, then cover logarithms. Next I will explain the constant time solution and how it works…
The Lonely Integer problem is a classic beginner coding question and one often found on HackerRank tests and in interviews. The problem is this: given an array of integers, find the unique integer. The array will be at least one integer and will always have a unique integer. In this article I will cover the process of reasoning out a solution, a dynamic programming solution, the XOR solution and finally how binary numbers and XOR works. Click on any of the lines below to scroll to the part you’re most interested in.
As someone who wants to become a professional Web Developer, I view my portfolio website as my pride and joy.
As a software engineer especially a front-end one, it is essential to have a clean and well preforming portfolio website. To evaluate how good a website is, I first use Chrome dev tool’s Lighthouse feature. It measures a bunch of different metrics under performance, accessibility, best practices and SEO. In this article I will document the process of making my single page application (SPA) website into a highly efficient, accessible and optimized website that will score 100/100 on every Lighthouse…
Search engine optimization (SEO) is the process of improving the quality and quantity of website traffic to a website or a web page from search engines. SEO is crucial for any commercial website. Google has made their ranking algorithm so it prioritizes user experience more so than other factors. The top factors include the number of visits, if a user stays on the page(bounce rate) and how many pages a user visits on a site. In this article I will cover these topics:
What is the difference between ‘self’ and ‘this’? The answer can seem a bit unclear and murky at first. But understanding the difference between the two can be helpful and lead one to becoming a better object oriented programmer.
Let’s start with ‘this’. ‘this’ is a keyword. It is used to refer to an object in which a method is called. For example:
However ‘this’ can lose its scope easily. If we were to do something like this with the previous example:
We can see that it would print out ‘undefined’. This is because ‘this’ default is window…
The problem arose when trying to create a leaderboard. Leaderboards were unique to the current date. After a user beat the game our application would create a score object and search the database for that date’s leaderboard. If it wasn’t found, a new leaderboard would be created. The problem that we encountered was that when the leaderboard was first created and our function tried to post a score, it wasn’t able to be found. If the page was reloaded, that score would…
innerText vs textContent
Short answer: innerText is what is rendered to the user while textContent shows everything, visible or hidden, including <style> and <script> elements. Heres a simple example:
I encountered a problem while coding thru a lab while attending Flatiron. The instructions stated that using innerText to modify DOM element content would not work. How could this be? Doesn’t innerText do exactly what I think is does? Why would textContent work in its place?
First, a little history. Internet explorer introduced…
My first thought was to iterate over the provided array, and if the current element in the iteration was not an array I would push that into…