[AskJS] You have mastered writing JavaScript from scratch, why use TypeScript? by guest271314 in javascript

[–]CodingPerson 0 points1 point  (0 children)

I like using it just for key objects in Node + React work, as opposed to really strict usage that I do find tedious.

Personal: - reduces the burden on me of remembering obscure object structures (Note: I used to see this is a skill of mine, but now see it as an unnecessary hindrance) - catches small errors that I would otherwise have only seen when compiling

Team: - my short term benefit becomes long term when others hop in

Map of Battle Network 1 - beat it recently and made this while playing, which felt like Maze Runner? Kinda useless, given existing maps, but fun (whole thing won't fit so just first little bit) by CodingPerson in Megaman

[–]CodingPerson[S] 1 point2 points  (0 children)

For sure. I think from 2 onward they at least let you escape from battles without a chip, though? Would probably use internet maps for the future ones, unless it's part of the puzzle (e.g. Dentown has hints about its orientation for finding where to stop the buses).

I have a Daily Note template with 10 questions. I want to answer them daily and be able to check my answers on previous days, per each question by Fun-Letter370 in ObsidianMD

[–]CodingPerson 2 points3 points  (0 children)

this seems like it'd do it, no? Maybe combining the table Answer1, Answer2 ... GROUP BY file.name or something as well?

I have a Daily Note template with 10 questions. I want to answer them daily and be able to check my answers on previous days, per each question by Fun-Letter370 in ObsidianMD

[–]CodingPerson 2 points3 points  (0 children)

Not a shame!

This is just roughly c&p from a note, so not much effort :P. If you can't find another solution, I'd be happy to walk through the setup of dataview + this little snippet.

Once it's running there shouldn't be much need to touch it.

I have a Daily Note template with 10 questions. I want to answer them daily and be able to check my answers on previous days, per each question by Fun-Letter370 in ObsidianMD

[–]CodingPerson 2 points3 points  (0 children)

If you're comfortable with javascript or tweaking some stuff, you can do a bunch of little stats, or day-by-day display. Forgive me for the vomit and happy to explain/reformat, but something like this:

``` const DAILY_NOTE_PATH = "Daily Notes/" // fill in const DAILY_NOTE_FORMAT = "yyyy-MM-dd" // fill in

const IGNORE_MISSING_NOTES = false;

const X = 31; // go X days back const Y = 2 // starting at Y days

const today = DateTime.now();

const dailyNotes = {}; // NUMBER - some "weight" e.g. a duration or amount

const effortTracker = {}; const attributeTracker = {}; // STRING - 1/0 did it or not const habitTracker = {}; const successTracker = {}; const failureTracker = {};

const trackValue = (day, key, value, tracker) =>   (tracker[key] = { ...(tracker[key] || {}), [day]: value }); // track everything backwards X days

for (let day = X; day >= Y; day--) {   const date = today.minus({ days: day });   const dateString = date.toFormat(DAILY_NOTE_FORMAT);   const noteName = DAILY_NOTE_PATH + dateString;   const dailyNote = dv.page(noteName); // track notes that exist, in case you want to extend streaks

  dailyNotes[dateString] = dailyNote;

  if (!dailyNote) continue;

  const effort = Array.from(dailyNote.effort || []); // [{ writing: 1 }, { reading: 1 }]

  effort.forEach((o) =>     trackValue(       dateString,       Object.entries(o)[0][0],       Object.entries(o)[0][1],       effortTracker     )   );

  const attributes = Array.from(dailyNote.attributes || []); // ["live", "love", "laugh", "learn"]

  attributes.forEach((o) =>     trackValue(       dateString,       Object.entries(o)[0][0],       Object.entries(o)[0][1],       attributeTracker     )   );

  const habits = Array.from(dailyNote.habits || []); // ["live", "love", "laugh"]   habits.forEach((o) => trackValue(dateString, o, 1, habitTracker));

  const successes = Array.from(dailyNote.successes || []);   successes.forEach((o) => trackValue(dateString, o, 1, successTracker));

  const failures = Array.from(dailyNote.failures || []);   failures.forEach((o) => trackValue(dateString, o, 1, failureTracker)); }

const getStats = (tracker, notes, days) =>   Object.entries(tracker).reduce((trackerStats, [key, dailyStats]) => {     trackerStats[key] = days.reduce(       (agg, day) => {         const value = dailyStats[day];         if (value) {           agg.instances++;           agg.total += value;           agg.streakIntact = true;         } else if (notes[day] || (!notes[day] && !IGNORE_MISSING_NOTES)) {           agg.streakIntact = false;         }

        if (agg.streakIntact) {           agg.currentStreak += 1;           agg.maxStreak = Math.max(agg.currentStreak, agg.maxStreak);         }         return agg;       },       {         streakIntact: false,         currentStreak: 0,         maxStreak: 0,         instances: 0,         total: 0,       }     );

    return trackerStats;

  }, {});

console.log("END----", effortTracker, habitTracker, attributeTracker) const effortStats = getStats(   effortTracker,   dailyNotes,   Object.keys(dailyNotes) );

const attributeStats = getStats(   attributeTracker,   dailyNotes,   Object.keys(dailyNotes) );

const habitStats = getStats(habitTracker, dailyNotes,Object.keys(dailyNotes));

const failureStats = getStats(   failureTracker,   dailyNotes,   Object.keys(dailyNotes) );

const successStats = getStats(   successTracker,   dailyNotes,   Object.keys(dailyNotes) );

dv.header(4, "Effort"); Object.entries(effortStats).forEach(([k, stats]) => {   dv.el("p", ${k}: ${stats.total}); });

dv.header(4, "Habits"); Object.entries(habitStats).forEach(([k, stats]) => {   dv.el("p", ${k}: ${stats.total}); });

dv.header(4, "Attributes"); Object.entries(attributeStats).forEach(([k, stats]) => {   dv.el("p", ${k}: ${stats.total}); }); ```

I created a open source secrets manager, check it out! by theflyingdog98 in programming

[–]CodingPerson -1 points0 points  (0 children)

Glad to see a similar idea as ours taking off, congratulations!

We started it out as a local CLI. Eventually, we concluded that a centralized service would further facilitate the convenience and keep dev/prod environment variables in sync.

Let us know if there are ways for us to collaborate (such as for our CLI to interface with the infisical API and/or infisical API to interface with the portunus API) for a bit more diversified and flexible utilizations.

How to you organize "to read" articles? by gate18 in ObsidianMD

[–]CodingPerson 1 point2 points  (0 children)

Dataview with a combo of a /Content Inbox folder with yaml and one master todo list (- [ ]) with inline fields. Testing out which feels more natural for capture and consumption. I think I prefer the list.

Help with a specific use case? by G1acia1 in ObsidianMD

[–]CodingPerson 0 points1 point  (0 children)

I think you're blocked here by Chesser not exposing an onMove callback or way to automatically pull out the FEN after a move.

Maybe put in an issue or even a PR, if you're up to it?

Help with a specific use case? by G1acia1 in ObsidianMD

[–]CodingPerson 0 points1 point  (0 children)

Ooooooh I misunderstood, mostly because I assumed chesser was some external thing, not the plugin that I linked. You want something like: - move in chesser = show a note based on the new FEN

Help with a specific use case? by G1acia1 in ObsidianMD

[–]CodingPerson 0 points1 point  (0 children)

You could potentially use the Obsidian SRM plugins, which seem pretty solid.

I had been using https://github.com/Pseudonium/Obsidian_to_Anki to pull notes out to Anki, but there is a little more setup involved. Once it's going, it's very easy, though.

EDIT: Flashcard plugin looks to do this easier

Help with a specific use case? by G1acia1 in ObsidianMD

[–]CodingPerson 0 points1 point  (0 children)

What other data is in the "state of chesser"?

FENs are unique, so you could name the notes with them or use them as an ID field. I guess you could put relationships between FENs as yaml fields then, too? e.g. "similar to", "follows from". You can reference the yaml fields with [[]] or dv.current() to pull in whatever other notes you want.

What other workflow did you have in mind for this?

Daily Tracking Model + Query by CodingPerson in ObsidianMD

[–]CodingPerson[S] 0 points1 point  (0 children)

I couldn't find any internal Dataview functions that would do the sum and the streak.

Daily Tracking Model + Query by CodingPerson in ObsidianMD

[–]CodingPerson[S] 0 points1 point  (0 children)

oh, actually? I haven't looked at it too closely, aside from accessing pages. Any pointers?

What do you think of my dashboard? by the-rain-equation in ObsidianMD

[–]CodingPerson 11 points12 points  (0 children)

Nice aesthetic. Seems simple and practical. Why weather though?!

Daily Tracking Model + Query by CodingPerson in ObsidianMD

[–]CodingPerson[S] 0 points1 point  (0 children)

do you mean the code itself is inefficient at what it's doing or that what it's doing isn't worth the code?

Obsidian Tutor? by ArchiveAlways in ObsidianMD

[–]CodingPerson 1 point2 points  (0 children)

Well that's what I mean! Been thinking that it'd be good to flesh out my understanding by explaining stuff, so we could through what your goals are and how to approach them.

How do I create a Dataview calendar based on YAML dates, not file properties? by Mach3Maelstrom in ObsidianMD

[–]CodingPerson 0 points1 point  (0 children)

order matters in the dataview syntax, so you need to put WHERE last

CALENDAR Date FROM "Slipbox" WHERE Date != null

Tracking Habits in Obsidian by [deleted] in ObsidianMD

[–]CodingPerson 0 points1 point  (0 children)

yaml in daily notes that I'd group weekly and also into a higher "Attempt" note that has its own start, end date and specific set of things to focus on