Code Monkey home page Code Monkey logo

blogginginhell's Introduction

Blogging In Hell - My blog app

First try at building a decent blog app (which means previous attempts were indecent LOL).

Deployed at: https://blogginginhell.netlify.app/

Lessons learned from weird bugs encountered

  • I shouldn't have tried to write the ssg module functionally.

  • String.prototype.replace(searchPattern, replacementText)

    • The second argument assumes that some character sequences have special meaning and this have wrecked havoc for 1 hour straight. All I wanted to do was simply replacing the substring that matches the searchPattern with replacementText. However, it produces some weird result I couldn't understand. As I found out later, some sequences in my replacementText have been transformed, leading to the weird result.
    • As a fix, I simply pass a callback that returns the string I intended to replace the pattern.
  • Always use style scoped to prevent "style leak". If you want to pass a style to child components, use :deep(<inner-selector>).

  • Never use the css property line-height < 0.

  • Always specify the format of date string for parsing. (Costs me a day)

  • Use npmjs to search for a library before installing. (Costs me an hour)

  • Never forget to pass key when using v-for.

  • Avoid using top-level scripts as much as possible.

To do list

  • The blog sort by date function currently doesn't work correctly on FireFox, causing hydration mismatch and the index page isn't working correctly -- while Chrome works fine. The datetime parsing was causing problems - Because luxon expects the date string to be in another format, it returns NaN and unexpected behaviors ensue! It takes me one day OMG!

blogginginhell's People

Contributors

huy-dna avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.