Craft By Zen

๐Ÿ‘‹๐Ÿฝ Hi! This is Jeremy's Craft by Zen


  • Movies I should have seen - Reflections from 2010
    Posted

    I review a list I made back in 2011 of movies I wanted to watch. Here it is again, more than a decade later.

    Filed: โœ๐Ÿผ Writing
  • 2024 Week 28 - Weekly Notes
    Posted

    Negative vibes from the media's stream of political turmoi, the AI threshold, NYT React 18 migration, Ladybird, Chemical recycling, loneliness from a low-ranking tennis player, and Bark Air - the airlines for dogs.

    Filed: โœ๐Ÿผ Writing
    ๐Ÿ”– weeknote
  • Broadcom and Henry T. Nicholas III
    Posted

    A curiosity sparked because my co-worker pointed out the Spring Framework is currently owned by Broadcom. Thatโ€™s because VMware is now part of Broadcom, and Spring Framework was part of VMWare prior. I had an inkling there was a scandal Broadcom had awhile ago. Low and behold: SEC Charges Four Current and Former Broadcom Officers for Backdating Options (Press Release No. 2008-87, May 14, 2008). In 2010, the charges were dropped - Chipmaker Broadcom stock options backdating case ends. Thatโ€™s not all though. Their first CEO, Henry Nicholas had criminal charges. The SEC dropped those charges in 2010, but that was enough to disgrace the people involved. Their former SEO left Broadcom before the SEC investigation back in 2003 to โ€œwork on his marriageโ€. He was sleeping with prostitutes.

    Read: Henry T. Nicholas III: A human tragedy. And the follow-up a decade later with Orange County tech billionaire Henry T. Nicholas III charged with drug trafficking following Las Vegas arrest.

    The court filings in the past case painted Nicholas as a ruthless entrepreneur who slipped drugs to competitors without their knowledge, who threatened the lives of employees he believed had turned against him, who had the means and motive to flee beyond the reach of justice in his private jet.

    His start was in researching ICs, and later thatโ€™s what Broadcom sold. He was given awards for his research. Heโ€™s like a walking contradiction, trying to save his name with his philanthropy while making wildly bad decisions. File under downfalls.

    Filed: ๐Ÿšฐ Stream
    ๐Ÿ”– TIL
  • 2024 Week 27 - Weekly Notes
    Posted

    Camp NaNoWriMo, blog updates, consulting firms are winning at AI, embeddings using Pokemon as an example, programming advice and beliefs, RIP Bill Cobbs and Martin Mull, why modern refridgerators don't last, and excitement for The Second short film.

    Filed: โœ๐Ÿผ Writing
    ๐Ÿ”– weeknote
  • Intl Locale String with Timezone
    Posted

    Itโ€™s always fun when the MDN documentation doesnโ€™t tell us what the options are within the methods page, I you have to dig deeper into the constructor. The TypeScript bindings donโ€™t always make sense.

    MDN - toLocaleString

    Anyways, I needed a datetime string with the date, time in hours and minutes, and the timezone. Iโ€™ve made the timezone explicit and came up with this snippet.

    date.toLocaleString("en-us", {
      year: "numeric",
      month: "short",
      day: "numeric",
      hour: "numeric",
      minute: "numeric",
      timeZone: "America/Los_Angeles",
      timeZoneName: "short",
    });
    

    This would return something like โ€œ2024-07-03, 12:00 PM, PDTโ€.

    Filed: ๐Ÿšฐ Stream
    ๐Ÿ”– TIL   programming
  • Chicago Recommendations
    Posted

    Travel recommendations to Chicago. For anyone who is looking on going for the first time.

    Filed: โœ๐Ÿผ Writing
  • Newsletter - June Bugs
    Posted

    Newsletter - We talk about having COVID and some web shares around the web, including China's Internet being wiped, Inbox Ten, in praise of amateurism, and exploring Jhanas.

    Filed: โœ๐Ÿผ Writing
  • 2024 Week 26 - Weekly Notes
    Posted

    jscodeshift notes, Dengue risk warning, SCOTUS latest rulings including overruling Chevron Doctrine, Dell's backlash for return-to-office, pop-up villages, Netflix's culture memo, and Claude 3.5 Sonnet.

    Filed: โœ๐Ÿผ Writing
    ๐Ÿ”– weeknote
  • jscodeshift Object Destructuring
    Posted

    The shorthand option is must be used in object destructuring to remove redundant prop: value to be prop.

    What I wanted was this shorthand:

    const { asFragment } = render(container);
    

    But what codemod generated was the following:

    const { asFragment: asFragment } = render(container);
    

    While both are true, I would rather have the shorthand, as thatโ€™s what we have strictly for eslint rules. This Github Issue helped describe the solution on how to implement in your transform file.

    const code = j.objectProperty(j.identifier("h"), j.identifier("h"));
    code.shorthand = true;
    
    j.variableDeclaration("const", [
      j.variableDeclarator(
        j.objectPattern([code]),
        j.callExpression(j.identifier("require"), [j.identifier('"packagename"')])
      ),
    ]);
    
    Filed: ๐Ÿšฐ Stream
    ๐Ÿ”– programming   TIL
  • 2024 Week 25 - Weekly Notes
    Posted

    Perplexity AI lying about their user agent, senior engineer fatigue, creating my first VSCode snippet, cutting an onion, and RIP Donald Sutherland and Willie Mays.

    Filed: โœ๐Ÿผ Writing
    ๐Ÿ”– weeknote
  • Embed TikTok videos in Obsidian
    Posted

    How to embed TikTok videos in Obsidianโ€™s editing/live preview and reading mode.

    <iframe
      src="https://www.tiktok.com/player/v1/7382225350710824222?autoplay=0"
      allow="fullscreen"
      style="width:100%;height:50vh;"
    />
    

    where 7382225350710824222 is the video id you get from TikTok from this example link: https://www.tiktok.com/@_jen_hamilton_/video/7382225350710824222.

    The TikTok v1 player has a bunch of controls that you can use to modify from this documentation.

    Thereโ€™s still some wonky height issues, and I suspect this is the default height Obsidian has on the container around the editor. I gave it a good enough viewable height of 50vh, which should be enough.

    Example Video

    Filed: ๐Ÿšฐ Stream
    ๐Ÿ”– TikTok   Obsidian
  • Running ESM on Node REPL
    Posted

    d3 v7 is packaged as ESM only. That made it difficult to use in the Node.js REPL. From this StackOverflow thread, I found a solution.

    let d3;
    import("d3").then((module) => {
      d3 = module;
    });
    // Then you can use d3 anywhere once the promise is resolved.
    
    Filed: ๐Ÿšฐ Stream
    ๐Ÿ”– development   TIL
  • Posted
    Director: George Miller, Released: 2024
    As the world fell, young Furiosa is snatched from the Green Place of Many Mothers and falls into the hands of a great Biker Horde led by the Warlord Dementus.
    Filed: ๐ŸŽž๏ธ Films
  • 2024 Week 24 - Weekly Notes
    Posted

    Keeping a dev journal, book recommendations, how computers reduce efficiency, introduction to jhanas, some podcast notes about AI companies, and how do dogs see color.

    Filed: โœ๐Ÿผ Writing
    ๐Ÿ”– weeknote
  • Retrieval-Augmented Generation (RAG)
    Posted

    An explainer for Retrieval-Augmented Generation (RAG). Breaking down what it is and how people are implementing it.

    Filed: โœ๐Ÿผ Writing
    ๐Ÿ”– learning   ai
  • Package Dependency for @observable/plot
    Posted

    Extremely esoteric bug. Iโ€™ve had an open issue for the past three months related to this other issue. I couldnโ€™t figure out why npmโ€™s registry would pull an older version of d3-scale-chromatic when I upgraded the @observable/plot library. As a future note for myself, if I run into this issue again, Iโ€™ll have to go into the package-lock.json file and update d3-scale-chromatic to v3.1.0.

    Filed: ๐Ÿšฐ Stream
    ๐Ÿ”– development   TIL

I'm currently leading application development at Clear Labs.

I write essays on eclectic topics, from programming, cooking, and strange habit of collecting obituaries.


๐Ÿ”– Top 10 Tags


Newsletter Series

I have put back together my newsletter after years of absense! These are primarily updates on my blog, "Craft By Zen", and maybe some highlights to the new articles I've written. There might be some life updates as well. I'm doing away with the old format of weekly longform essays, and trying some new things with my newsletter.

Powered by Buttondown.