Coding Update: Challenges, My Latest Project, and Website Optimization.

Michael Fares
4 min readJul 9, 2021

What do you find challenging about coding?

One of the things I currently find most challenging about coding is optimizing a solution to a given problem. For most algorithm implementations or white-boarding questions I have been practicing so far, my mind usually settles on a “brute force” direction to approaching the problem which usually leads me to what seems to be a working solution.

However, upon comparing my first intuitions to those of more experienced developers whose tutorials I watch, and my instructors at Austin Coding Academy, I usually find that their intuition takes them to a solution that is more optimal, elegant, and requires less lines of code.

I am confident that as I continue to practice, I may develop this same kind of “optimization” intuition. Two particular areas in this regard I want to personally focus on improving on are: 1) getting better at using higher order array methods whenever possible instead of regular for loops and 2) getting better at thinking about the time complexity and space complexity of the solution I am implementing.

Talk about a project that disappointed you. What would you change?

A recent project that, although ultimately I am proud of, I found a little disappointing in some aspects was a simple Arabic letter writing and spelling app I recently wrote. Basically, the app plays the audio of a random Arabic word, the user then drags and drops the correct letters of the alphabet in order to spell the word, and then the app tells her if it is correct or not. I implemented the audio feature using the web speech API, which I was thrilled to discover comes with a pretty decent Arabic voice out of the box. I found though that the Arabic voice would not read all words correctly, and so I had to be relatively selective with what words I could include in the list. Secondly, I found that the text to speech audio would not work correctly on all browsers, which I am not too distressed about for now given that the web speech API is still an experimental technology . I’m actually curious and excited to see this technology progress further, and ultimately had fun experimenting with it to come up with what at the end of the day is a working up for now!

List three key things to consider when coding with SEO in mind.

Three key things to consider when coding with SEO, or Search Engine Optimization in mind include 1) clear and detailed meta-data, 2) semantic HTML tags, and 3) page speed. Clear and detailed meta-data means at minimum that each page on a site should have a descriptive <title> tag, as well as <meta> tag that gives a concise short paragraph summary of the purpose of your page and why users should visit it. This is using the following “name” and “content” attributes of the meta tag, like so: <meta name= “description”, content=”** page summary here**”>. Similarly, using semantic HTML tags help search engines parse the content of a site much more meaningfully in terms of relevance of results that will be returned to the search engine users query. As much as possible, tag names should reflect the actual content and content areas of each pages on a site, and this is what is meant by semantic. Hence using tags like <nav>,<header>, <main>,<footer> should result in a higher result relevance ranking than <div class =”nav”>, <div class =”header”>, <div class =”main”>, <div class =”footer”>! Finally, page speed is also a factor that influences search engine result relevance rating and is therefore important to SEO. Page load speed can be improved by eliminating superfluous or redundant lines of code, using file compression or “minification” for larger files. Basically, especially for a very large site with many users, every little bit of redundant code or whitespace counts! Find more detailed explanations of principles of coding for SEO like these and others here and here.

List five or more ways you could optimize a website to be as efficient and scalable as possible.

  1. Clear differentiation in architecture and roles between the 3 key components of most web applications: the client, the application server, and the database server. In short, the database server should house new data as the app scales upwards and grows, the application server should be focused on sending requests back and forth between the front and and the database, and the front end should be primarily concerned with rendering site data and content to the DOM. This is not the be all end all of site architecture, it is just a good starting principle for scalability.
  2. Make the code base as maintainable as possible. The code base should be modular and easily understandable by each person who collaborates on it past, present, and future. This will help ensure that the code base grows in a clear and logical manner as the user base and performance needs of the app grow.
  3. Adopt the principle of DRY code (Don’t Repeat Yourself). As the app grows, unintended redundancies in code can reduce speed and also introduce bugs.
  4. Compress website files for faster loading time using a service like GZIP. See the MDN docs here for an overview of the different types of compression all relevant to site performance.
  5. If possible, utilize a CDN, or content delivery network. A CDN is a network of servers distributed across multiple geographical locations, that can route and handle requests optimally based on geographical location and proximity of individual clients. Having network of multiple servers handle website traffic also helps optimize speed by reducing the load on any one server at a given time. This results in faster site performance and scalability than in the case of a single server handling all requests.

--

--

Michael Fares

I am a Web Developer, Educator, Lifelong autodidact, 3rd Culture Kid, and Citizen of the World.