@jerclarke@mastodon.social
@jerclarke@mastodon.social avatar

jerclarke

@jerclarke@mastodon.social

🇨🇦➡️🇲🇽 Canadian living in Mexico City

💚 Web developer for https://globalvoices.org

☸️ Free from addiction with https://recoverydharma.org

🔒 Contact me on Signal: jer.42

🌈 They/them pronouns, please and thank you.

I tend to boost and post nerdy stuff, humor, progressive politics, nature photography, and whatever else makes me 🤔, 😂 or🫠.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

tim, to wordpress
@tim@mastodon.timnolte.com avatar

I've been a proponent of the "return early" pattern in programming for some time. In code reviews I generally call this out. I recently found an excellent article that provides an alternative coined the "break/continue guard clause" pattern. As a developer I appreciated this article using WP Core in the examples.

https://mikeschinkel.org/2019/better-alternative-to-return-early-php-wordpress/

jerclarke,
@jerclarke@mastodon.social avatar

@shawnhooper @tim Very interesting to me as someone who relatively recently started "returning early" and seeing enormous benefits.

Personally, I think the “while (false)” part of this is a very bad code smell. We shouldn't abuse this structure like that.

I think the key (and the hard part) is the EXTRACTION Mike does before his final solution, breaking the logic into many functions.

Once you extract the sub functions, "returning early" is no longer needed. It's a tight, readable function.

jerclarke,
@jerclarke@mastodon.social avatar

@shawnhooper @tim I think for me it's kind of a false dichotomy, it's not "return early or use do/while", it's “use if/else or use do/while when you can't return early”.

Returning early is for when you skip some chunk of logic, but in this example, you are always doing the logic.

Mike points out some reasons to not return early (pre-emptive concern about needing to apply_filters at the end, which I can relate to), but in that case you can still do it with if/else, and I'd rather do that.

chris, to random
@chris@mastodon.chriswiegman.com avatar

deleted_by_author

  • Loading...
  • jerclarke,
    @jerclarke@mastodon.social avatar

    @chris Thanks for the reminder that this is an option. Been noticing the “5g” and thinking how it’s probably just draining my battery.

    chris, to random
    @chris@mastodon.chriswiegman.com avatar

    deleted_by_author

  • Loading...
  • jerclarke,
    @jerclarke@mastodon.social avatar

    @chris My partner has been loving her Samsung integration between phone, tablet, and windows laptop. Just like apple nites but more powerful tools.

    On Tuesday it suddenly stopped working. Blocked to only sync to “Galaxy Book” windows laptops.

    It’s a tough one out there!

    shawnhooper, to books
    @shawnhooper@fosstodon.org avatar

    Ah, the “computers” section in used book stores.

    jerclarke,
    @jerclarke@mastodon.social avatar

    @shawnhooper The mere mention of XHTML gives me such a wave of nostalgia 🫠

    jerclarke, to random
    @jerclarke@mastodon.social avatar

    The plumage don't enter into it.

    jerclarke, to Palestine
    @jerclarke@mastodon.social avatar

    Another excellent reflection on the situation in by @justinling , this time comparing it to the US quagmire in Iraq:

    “Whatever the strategic objectives of invasion, without a clear exit strategy you will have no choice but to fight the forever war. Any action you take will radicalize the people you control — and it will radicalize your own people as well.”

    https://www.bugeyedandshameless.com/p/israel-ground-war-gaza-hamas

    atomicpoet, to fediversenews

    Hey, check out this graph! Take a moment to look at it because, honestly, it's pretty amazing. The growth of WordPress on the Fediverse is truly impressive.

    In Q4 2022, there were 924,888 posts, and fast forward to Q4 2023, we're seeing a whopping 2,998,430 posts. Can you believe that? It's a 324% increase year over year!

    I've always had a hunch that ActivityPub-enabled WordPress would make a big splash, and if this chart keeps going up, it looks like my prediction might just come true!

    SOURCE: https://fedidb.org/current-events/wordpress

    @fediversenews

    jerclarke,
    @jerclarke@mastodon.social avatar

    @atomicpoet @fediversenews

    Any evidence this represents actual fedi activity? People actual engaging with all these “posts in the fediverse”?

    Strikes me that a lot of that blog content is both effectively and often literally spam.

    jerclarke, to CSS
    @jerclarke@mastodon.social avatar

    So “Container Queries” are now working in all major browsers, assuming people have updated since Sep 2023…

    Can we please start using them for everything?

    https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_container_queries

    I think I'll start employing it for responsive refinements, where the page still always makes sense without them, but uses them to get perfect layouts at every possible breakpoint, which is the long-awaited promise of container-based styles.

    jerclarke, to photography
    @jerclarke@mastodon.social avatar

    The benefits of waking up early 🌄 🇲🇽

    chris, to random
    @chris@mastodon.chriswiegman.com avatar

    deleted_by_author

  • Loading...
  • jerclarke,
    @jerclarke@mastodon.social avatar

    @chris OMG fine grained control over what makes a badge should be table stakes, but none of the big brands offer that either.

    chris, to random
    @chris@mastodon.chriswiegman.com avatar

    deleted_by_author

  • Loading...
  • jerclarke,
    @jerclarke@mastodon.social avatar

    @chris I NEVER thought of myself as a highrise person until I happened to move in to a 9th floor apt and now I never want to go back.

    shawnhooper, to random
    @shawnhooper@fosstodon.org avatar

    Watched BEEF on Netflix last night. The whole series, in one sitting. Not the silly comedy I was expecting at all. Highly recommended.

    jerclarke,
    @jerclarke@mastodon.social avatar

    @shawnhooper Nice another rec for this one.

    I loved PainKiller, if you haven’t seen it yet.

    jerclarke,
    @jerclarke@mastodon.social avatar

    @shawnhooper Ah yeah, same! I’m on House of Usher now which it turns out is somehow ALSO about Purdue 🙃

    derickr, to random
    @derickr@phpc.social avatar

    🚀 I've been working on optimising @Xdebug's debugger this week.

    📜 On the home page of a default WordPress installation, the number of instructions that Valgrind counted went from 3.7 billion to 2.9 billion — providing that there are no breakpoints at all configured.

    ➡️ Next up: being more clever of when to actually check for line breakpoints (the most common ones).

    jerclarke,
    @jerclarke@mastodon.social avatar
    appleinsider, to random
    @appleinsider@mastodon.social avatar
    jerclarke,
    @jerclarke@mastodon.social avatar

    @appleinsider Too bad, though it barely ran on my 2019 16” MBP. They clearly gave up on putting an effort in long before this.

    I just want to play TF2 like the old days.

    onepict, to random
    @onepict@chaos.social avatar

    A question for some folks for a crowdsource thing.

    What excuses do you get from , when you ask about a or public health policy due to ?

    I need some answers for..... Reasons.

    jerclarke,
    @jerclarke@mastodon.social avatar

    @onepict Here’s a genuine answer from someone infected with covid after a conference last week: Wearing a mask while sitting quietly is no bother, but during conversations it can be very disruptive, especially for non-native speakers on both sides of the comversation.

    I’m starting to think we should just do online meetings. Easier to talk through zoom than masks.

    jerclarke, to random
    @jerclarke@mastodon.social avatar

    i don’t think mastodon needs to feel threatened by threads

    jerclarke, to Bloomscrolling
    @jerclarke@mastodon.social avatar

    This strawberry wasn’t waiting to be eaten 🍓

    stroughtonsmith, to random
    @stroughtonsmith@mastodon.social avatar

    There is a significant trend of new big-budget games on the Mac that do not support Intel, from Resident Evil to Death Stranding to Lies of P to Layers of Fear. All require an M1 chip or higher 👀

    How long before app developers start to go Apple-Silicon-only?

    jerclarke,
    @jerclarke@mastodon.social avatar

    @stroughtonsmith The question to me is: Will Apple be able to sustain these developers with long term support, and avoid the historical rug-pull deprecations that have broken all historical releases.

    Really hoping so!

    jerclarke,
    @jerclarke@mastodon.social avatar

    @stroughtonsmith The question to me is: Will Apple be able to sustain these developers with long term support, and avoid the historical rug-pull deprecations that have broken all historical releases.

    Really hoping so!

    jerclarke, to random
    @jerclarke@mastodon.social avatar

    @redpandaclub How can I get rid of this macOS menu icon for "Ask Shorty”?

    I don't understand why I have it, because there doesn't seem to be a macOS version of Short Circuit.

    Either way, this menu item should offer an option to change settings/uninstall from inside the menu. As-is it's inscrutable and very annoying.

    Sorry if it's not from your app, I genuinely can't tell.

    jerclarke,
    @jerclarke@mastodon.social avatar

    @redpandaclub @marioguzman

    Ok thanks for the instructions both of you. Found it and unpinned 👍🏻

    chris, to random
    @chris@mastodon.chriswiegman.com avatar

    deleted_by_author

  • Loading...
  • jerclarke,
    @jerclarke@mastodon.social avatar

    @chris You're using "Compact" I guess? I'm trying to get into it, but can't stand having the URL rather than the title.

    In "Separate" tab layout the size of the profile chicklet seems reasonable, if anything I wish it was more intense, specifically I wish the color was visible when the window is backgrounded. In Chrome my profiles had totally different window chrome colors, and it was super useful to find them and know which was which even when minimized to dock. Need something equivalent.

    jerclarke,
    @jerclarke@mastodon.social avatar

    @chris Yeah, I'm very happy to at least have the option of ditching Chrome, with various tradeoffs considered.

    I just come to Safari with a lot of demands because I'm used to a very mature version of this feature.

    I'm simultaneously trying to switch to Reading List form Instapaper with similar results. It has what I need in theory (read-aloud), but is even more limited than the bare-bones features I'm used to (and seemingly a fair share of bugs, but it's a brand new OS so I can give it time)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • cubers
  • magazineikmin
  • GTA5RPClips
  • khanakhh
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • thenastyranch
  • everett
  • osvaldo12
  • kavyap
  • rosin
  • anitta
  • DreamBathrooms
  • Durango
  • modclub
  • ngwrru68w68
  • vwfavf
  • ethstaker
  • tester
  • cisconetworking
  • tacticalgear
  • Leos
  • provamag3
  • normalnudes
  • JUstTest
  • All magazines