CRUD'y Remedies for your Project

tinkerjoegit

Tinkerjoe-Git

Posted on March 29, 2021

CRUD'y Remedies for your Project

Don't bite off more than you can chew

With the past two coding projects, limiting the scope of my own desires has been a thorn in my side. This go around I thought I'd go ahead and make a DnD ( Dungeons and Dragons ) character creator app. A bad idea doesn't always sound like a bad idea at first, but it'll let you know relatively quick when it comes to coding out an application. Importing the data from the DnD5e.api was already giving me some bad vibes, like I'll need oh, y'know like...14 tables that I'll need to incorporate associations and foreign keys into.

  • here's a spell
        {
          "index": "acid-arrow",
          "name": "Acid Arrow",
          "desc": [
            "A shimmering green arrow streaks toward a target within range and bursts in a spray of acid. Make a ranged spell attack against the target. On a hit, the target takes 4d4 acid damage immediately and 2d4 acid damage at the end of its next turn. On a miss, the arrow splashes the target with acid for half as much of the initial damage and no damage at the end of its next turn."
          ],
          "higher_level": [
            "When you cast this spell using a spell slot of 3rd level or higher, the damage (both initial and later) increases by 1d4 for each slot level above 2nd."
          ],
          "range": "90 feet",
          "components": [
            "V",
            "S",
            "M"
          ],
          "material": "Powdered rhubarb leaf and an adder's stomach.",
          "ritual": false,
          "duration": "Instantaneous",
          "concentration": false,
          "casting_time": "1 action",
          "level": 2,
          "attack_type": "ranged",

          "damage": {
            damage_type: {
              name: "Acid",
              url: "/api/damage-types/acid",
            },
            damage_at_slot_level: {
              2: "4d4",
              3: "5d4",
              4: "6d4",
              5: "7d4",
              6: "8d4",
              7: "9d4",
              8: "10d4",
              9: "11d4",
            },
          },

          "school": {
            "name": "Evocation",
            "url": "/api/magic-schools/evocation"
          },
          "classes": [
            {
              "name": "Wizard",
              "url": "/api/classes/wizard"
            }
          ],
          "subclasses": [
            {
              "name": "Lore",
              "url": "/api/subclasses/lore"
            },
            {
              "name": "Land",
              "url": "/api/subclasses/land"
            }
          ],
          "url": "/api/spells/acid-arrow"
        }
Enter fullscreen mode Exit fullscreen mode

So yeah... that belongs to a character who belongs to a class, or maybe their subclass, I can go on... but lets not.

Start Simple and Build in Functionality

Find something you like, it goes without really having to explain that building out some of these projects can get tedious, and if you're already not engaged with the subject matter I only see things getting worse. I started working with the Studio Ghibli API, [link](https://ghibliapi.herokuapp.com/) and considering the scope of my previous efforts, this is a lot more manageable. I think immediately my concern was that '..what're you going to do with this information, that anyone would care or have a use for?..' I quelled that notion pretty quickly; it doesn't matter. When I say it doesn't matter, its all about context. The context I am in, I'm not about to market this app, or proclaim its greatness to the four winds. I'm building a project, for coding school so I can learn to code. Manipulating the data and actually hitting the benchmarks for a successful project are where the learning and real experience happen. You can have the best idea, but if you're not capable of pulling it off at your level, you're just hindering your end product.

Scaffold out Everything First, Period

I was on a great path, I built out functionality for the site and felt like I was 80% of the way complete. I had this lingering fear that I'd hate the CSS portion, ( which styling is not necessarily requisite ) many users alleviate this anxiety with just having bootstrap do the heavy lifting, which honestly, do that. I had fallen down the CSS well and drank deep from its plenty, I think I spent 2 days working on styling before I started to hit walls within my MVC logic and other CSS prisons of my own design. Its my strong recommendation through my own follies that I recommend saving CSS and any other peripheral or auxiliary functions for your spare time when you've checked off the requirements first.

image

I'm pleased with my end result, and falling down the various pits of despair along the way will doubtlessly help me out on my next project if I'm wise enough to listen to my own advice.

💖 💪 🙅 🚩
tinkerjoegit
Tinkerjoe-Git

Posted on March 29, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024