• 2 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • Probably not. Having actually played with making a WYSIWYG editor as a learning project markdown is too simplistic for the formatting needs of any non-trivial text editing, as a serialized storage format.

    You almost always end up back with your own data structure that you serialize into something like XML for storage. Or you end up supporting HTML or non-spec compliant syntax in your markdown.

    And if you care about performance, you’re not actually working with XML, HTML, or Markdown in memory. You’re working with a data structure that you have to serialize/deserialize from your storage format. This is where markdown becomes a bit more tedious since it’s not as easy to work with in this manner, and you end up with a weird parsing layer in-between the markdown and your runtime data structures.

    The commenter that’s downvoted is more correct than not IMHO (Also why are we downloading discussions??). Markdown is ill suited for “most WYSIWYG needs”. It tends to get augmented with XML or custom non-spec compliant syntax. The spec poorly supports layout (columns, image & media positioning, sizing…etc) and styling (font color, size, family, backgrounds…etc)


  • There are markup languages for this purpose. And you store the rich text as normal text in that markup language. For the most part.

    It’s typically an XML or XML-like language, or bb-codes. MS Word for example uses XML to store the markup data for the rich text.

    Simpler and more limited text needs tend to use markdown these days, like Lemmy, or most text fields on GitHub.

    There’s no need to include complex technology stacks into it!

    Now the real hard part is the rendering engine for WYSIWYG. That’s a nightmare.




  • The follow on. Lots and LOTS of unrelated changes can be a symptom of an immature codebase/product, simply a new endeavor.

    If it’s a greenfield project, in order to move fast you don’t want to gold plate or over predictive future. This often means you run into misc design blockers constantly. Which often necessitate refactors & improvements along the way. Depending on the team this can be broken out into the refactor, then the feature, and reviewed back-to-back. This does have it’s downsides though, as the scope of the design may become obfuscated and may lead to ineffective code review.

    Ofc mature codebases don’t often suffer from the same issues, and most of the foundational problems are solved. And patterns have been well established.

    /ramble


  • There is no context here though?

    If this is a breaking change to a major upgrade path, like a major base UI lib change, then it might not be possible to be broken down into pieces without tripping or quadrupling the work (which likely took a few folks all month to achieve already).

    I remember in a previous job migrating from Vue 1 to Vue 2. And upgrading to an entirely new UI library. It required partial code freezes, and we figured it had to be done in 1 big push. It was only 3 of us doing it while the rest of the team kept up on maintenance & feature work.

    The PR was something like 38k loc, of actual UI code, excluding package/lock files. It took the team an entire dedicated week and a half to review, piece by piece. We chewet through hundreds of comments during that time. It worked out really well, everyone was happy, the timelines where even met early.

    The same thing happened when migrating an asp.net .Net Framework 4.x codebase to .Net Core 3.1. we figured that bundling in major refactors during the process to get the biggest bang for our buck was the best move. It was some light like 18k loc. Which also worked out similarly well in the end .

    Things like this happen, not that infrequently depending on the org, and they work out just fine as long as you have a competent and well organized team who can maintain a course for more than a few weeks.


  • Just a few hundred?

    That’s seems awfully short no? We’re talking a couple hours of good flow state, that may not even be a full feature at that point 🤔

    We have folks who can push out 600-1k loc covering multiple features/PRs in a day if they’re having a great day and are working somewhere they are proficient.

    Never mind important refactors that might touch a thousand or a few thousand lines that might be pushed out on a daily basis, and need relatively fast turnarounds.

    Essentially half of the job of writing code is also reviewing code, it really should be thought of that way.

    (No, loc is not a unit of performance measurement, but it can correlate)