Sukima's Avatar

Sukima

@mastersuki.bsky.social

I am a passionate software developer specialized in Ember.js & JavaScript. I dabble in Photography, 360 panoramic tours, interactive fiction, and geek culture. https://tritarget.org/

97 Followers  |  42 Following  |  304 Posts  |  Joined: 21.10.2024  |  2.2238

Latest posts by mastersuki.bsky.social on Bluesky

Screaming, then โ€œI got toothpaste on my eyeball!โ€ #OnlyParentsCanUnderstand

11.11.2025 01:34 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
/bar/d.exec('foo bar baz').indices[0]; // => [4, 7]

/* Especially useful with named groups */
/(?<bar>bar)/d.exec('foo bar baz').indices.groups.bar; // => [4, 7]

/bar/d.exec('foo bar baz').indices[0]; // => [4, 7] /* Especially useful with named groups */ /(?<bar>bar)/d.exec('foo bar baz').indices.groups.bar; // => [4, 7]

If you want start and ending indices try the โ€œdโ€ flag for RegExp. developer.mozilla.org/en-US/docs/W...

07.11.2025 13:54 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I wish there were more reasons to design custom WebStreams in typical browser based front end development (SPA). CRUD lacks the intellectual excitement these days. #JavaScript

07.11.2025 13:40 โ€” ๐Ÿ‘ 5    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Love this bit:

โ€œWe should be careful both to avoid โ€˜optimisingโ€™ and accelerating the creation of legacy code and to mistake such pessimisation as productivity โ€” especially if weโ€™re doing so at the expense of joy, time and skill.โ€

To repeat: โ€œat the expense of joy, time and skillโ€. Hits home that!

06.11.2025 00:29 โ€” ๐Ÿ‘ 8    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Some people leave sourcemaps on in prod to debug in prod easier.

I raw-dog JavaScript by hand. I donโ€™t need no stinknโ€™ sourcemaps!

06.11.2025 03:35 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

TIL that Vim windows can switch to a local (window contained) argument list with :arglocal and switch back to the global list with :argglobal Finally I can use the args list to kind of bookmark buffers when my buffer list gets too large to manage in my short term memory. Arg lists are editable!

06.11.2025 02:21 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
const reply = '';
Boolean(reply);
// => false

const reply = ''; Boolean(reply); // => false

Hmmm. Oh dear.

05.11.2025 00:27 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Hence the need to `return await โ€ฆ` This rule hits me every time I attempt to write a mock callback that is meant to be async but in testing can be sync. I hate this rule.

04.11.2025 01:58 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I set Vim abbreviations for โ€œffnโ€ for โ€œfunctionโ€, โ€œccnโ€ for โ€œconstโ€, and โ€œPvoidโ€œ for โ€œPromise<void>โ€

Makes using base features super easy. Like 1000x faster than using AI.

02.11.2025 23:24 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Yup, this one has hit me a bunch of times and each time I end up wasting an hour just trying to understand WTF it is preventing only to realize it thinks Iโ€™m a moron. Well eslint can kiss my ass!

01.11.2025 23:43 โ€” ๐Ÿ‘ 0    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1

The worse part is that some idiot in the company is giving a report to the C-Suite explaining that support calls to a live agent have dropped to zero. ๐Ÿคฆ

01.11.2025 23:29 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

What he said: ๐Ÿ’ฏ ๐ŸŽฏ

01.11.2025 18:55 โ€” ๐Ÿ‘ 49566    ๐Ÿ” 13581    ๐Ÿ’ฌ 1053    ๐Ÿ“Œ 586
The 5 Stages Of Becoming An ELITE Software Engineer
YouTube video by Modern Software Engineering The 5 Stages Of Becoming An ELITE Software Engineer

I personally feel that quality starts at the smallest level. If devs cared about the coding craft instead of only one solution. Adding more quality to that fits better when care is given to the base skills. youtu.be/wdrQ4vAV0uA?...

01.11.2025 15:57 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Why does every TV or Movie seem to be able to โ€œcrack the encryptionโ€? Why even bring encryption into the plot if it was crackable?

30.10.2025 12:32 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

TS adds an extra build step. JS can be added to an HTML file and just works.

30.10.2025 12:00 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
State of JavaScript 2025 Take the State of JavaScript survey

Go take the State of JavaScript 2025 survey if you have a minute! survey.devographics.com/survey/state...

30.10.2025 11:58 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
A tweet from John Fugelsang reads in all caps:
"NO FOOD FOR YOU UNTIL THE DEMOCRATS LET US TAKE AWAY YOUR HEALTHCARE"
โ€“ US House Speaker Mike Johnson.

A tweet from John Fugelsang reads in all caps: "NO FOOD FOR YOU UNTIL THE DEMOCRATS LET US TAKE AWAY YOUR HEALTHCARE" โ€“ US House Speaker Mike Johnson.

This perfectly encapsulates what the GOP position is on the shutdown.

29.10.2025 22:30 โ€” ๐Ÿ‘ 5062    ๐Ÿ” 1728    ๐Ÿ’ฌ 97    ๐Ÿ“Œ 41

I should clarify. React gets the job done. But it does not mean I have to like it.

30.10.2025 01:09 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Why do your loops reach that high? What are they calculating? And why would you want JavaScript to handle that? Based on the original JS is inferior complaint.

29.10.2025 23:31 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Still not a good reason to architect it with hooks because of dogmatic functions over OOP. All the benifits you mention can still happen with classes. Ex. @emberjs.com

29.10.2025 23:21 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

React is weird because of how hard they had to bend and contort hooks to do what the language has built-in with classes/prototype. The original OOP concept to manage state associated with instances of things.

29.10.2025 11:05 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Challenge Accepted: WebStreams + WebSockets, No Libs
s.tritarget.org/q

29.10.2025 04:15 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

FFS what kind of for-loop you running where you need more than nine quadrillion, seventy-one trillion, nine hundred ninety-two billion, five hundred forty-seven million, four hundred nine thousand, nine hundred ninety-one iterations?!!!

28.10.2025 22:35 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
For a basic crud app, you have "must haves", "Nice to haves", and "Polish". In each are different skills, like "Data fetching" or "Remote logging". These skills are differently weighted between how often a company does them and how valuable they are for individuals to have as skills on a team.

For a basic crud app, you have "must haves", "Nice to haves", and "Polish". In each are different skills, like "Data fetching" or "Remote logging". These skills are differently weighted between how often a company does them and how valuable they are for individuals to have as skills on a team.

Most companies have similar business needs for their software, but not all needs are met equally

IE: Error handling. Critical for biz needs. Yet so many companies I've seen absolutely neglect it. Why? Not enough engineers focusing on that discipline

Get good at that stuff and you'll be unstoppable

26.10.2025 15:02 โ€” ๐Ÿ‘ 30    ๐Ÿ” 5    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 2
Not invented here - Wikipedia

en.wikipedia.org/wiki/Not_inv...

28.10.2025 22:15 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Sites do this? Iโ€™ve only ever implement that for apps that have unsaved changes. But for advertisement that is messed up! This is why we canโ€™t have nice things.

27.10.2025 21:29 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
TriTarget.org A blog of personal quality

New #JavaScript blog post about compressing data and encoding it into Base64 using built-in Web APIs
tritarget.org#Rethinking%2...

27.10.2025 21:04 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Interesting idea. At the moment my PWAs have to use a local server/extension or resort to .href = objectUrl & .click()

I started saving content to the URL fragment which I can update anytime and a refresh keeps the URL intact.

Wish you could install app to desktop to get more desktop features.

25.10.2025 11:06 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

Don't [...spread] or .split() your strings!

Use Intl.Segmenter API. Available in every JS runtime

23.10.2025 14:54 โ€” ๐Ÿ‘ 527    ๐Ÿ” 79    ๐Ÿ’ฌ 17    ๐Ÿ“Œ 9
class Resource {
  constructor(label) {
    this.label = label;
  }

  [Symbol.dispose]() {
    throw new Error(`bork ${this.label}`);
  }
}

function newExample() {
  using a = new Resource('A');
  using b = new Resource('B');
  using c = new Resource('C');
  throw new Error('bork');
}

class Resource { constructor(label) { this.label = label; } [Symbol.dispose]() { throw new Error(`bork ${this.label}`); } } function newExample() { using a = new Resource('A'); using b = new Resource('B'); using c = new Resource('C'); throw new Error('bork'); }

function oldExample() {
  let aError;
  const a = new Resource('A');
  try {
    let bError;
    const b = new Resource('B');
    try {
      let cError;
      const c = new Resource('C');
      try {
        throw new Error('bork');
      } catch (error) {
        cError = error;
        throw error;
      } finally {
        try {
          c[Symbol.dispose]();
        } catch (error) {
          if (cError) throw new SuppressedError(error, cError, 'message');
          throw error;
        }
      }
    } catch (error) {
      bError = error;
      throw error;
    } finally {
      try {
        b[Symbol.dispose]();
      } catch (error) {
          if (bError) throw new SuppressedError(error, bError, 'message');
          throw error;
      }
    }
  } catch (error) {
    aError = error;
    throw error;
  } finally {
    try {
      a[Symbol.dispose]();
    } catch (error) {
      if (aError) throw new SuppressedError(error, aError, 'message');
      throw error;
    }
  }
}

function oldExample() { let aError; const a = new Resource('A'); try { let bError; const b = new Resource('B'); try { let cError; const c = new Resource('C'); try { throw new Error('bork'); } catch (error) { cError = error; throw error; } finally { try { c[Symbol.dispose](); } catch (error) { if (cError) throw new SuppressedError(error, cError, 'message'); throw error; } } } catch (error) { bError = error; throw error; } finally { try { b[Symbol.dispose](); } catch (error) { if (bError) throw new SuppressedError(error, bError, 'message'); throw error; } } } catch (error) { aError = error; throw error; } finally { try { a[Symbol.dispose](); } catch (error) { if (aError) throw new SuppressedError(error, aError, 'message'); throw error; } } }

For the curious, to do what "newExample" is doing WITHOUT the "using" keyword it would look like "oldExample".

Have I got your attention about Explicit Resource Management in #JavaScript yet?

24.10.2025 00:10 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@mastersuki is following 20 prominent accounts