Category: Ramblings

  • WP REST API vs GraphQL Performance

    A client had recently pointed out to me a post detailing performance differences between the REST API that ships in WordPress Core, and WPGraphQL —

    https://www.wpgraphql.com/docs/wpgraphql-vs-wp-rest-api#performance

    In it, it asserts that the difference between two similar queries running the REST API and WPGraphQL yields vastly different performance impacts:

    Below are screenshots of the same WordPress site asking for 100 posts from the WP REST API and 100 posts from WPGraphQL with the Chrome network tab open.

    REST:

    • Download size: 335 kb
    • Time: 7.91s

    WPGraphQL

    • Download size: 6.4 kb
    • Time: 67 ms

    That seemed like an unrealistic difference from an initial glance — the REST API takes over 100x longer to return data than WPGraphQL? I wanted to check and see if I could duplicate the test and find out what accounted for the orders of magnitude difference between the two.

    (more…)
    Fediverse Reactions
  • The Dimensions of POGs

    The Dimensions of POGs

    Because of reasons, I’ve had cause to dig out my old POG collection and take detailed measurements of them.  Here’s what I’ve come up with:

    A POG Milkcap measures:

    • 41.37 mm or 1.6285 inches in diameter.
    • 1.25 mm or 0.0490 inches in thickness.
    • Forty POGs weigh 1.65 oz or ~0.041 oz per POG.
    • Forty POG measure 2.0310 inches in thickness

    An off-brand Slammer is:

    • 42.80 mm or 1.6850 inches in diameter.
    • 5.91 mm or 0.235 inches in thickness.
    • 0.30 oz.

    So, a Slammer is approximately 4-5 POGs in thickness, about 1.5mm larger in diameter, and weighs approximately 7-8 times as much as an individual POG.

     

  • Chicken Tender Wrap

    Chicken Tender Wrap

    • Servings: 1
    • Difficulty: Easy
    • Print

    Food of the Gods

    One of the best things about my college experience at Grove City was the one unique, delectable item on the menu that — to date — I’ve never seen quite duplicated elsewhere.  So for any other Grovers out there that miss the taste of the Chicken Tender Wrap, here’s what I’ve come up with as a pretty darn close approximation.

    Credit: Angela Starosta and Matt Schiavone for help piecing back together the recipe.

    Ingredients

    • 1 large burrito-size tortilla
    • Diced plum tomatoes
    • Chopped iceberg lettuce
    • 2 Chicken Tenders
    • Ranch dressing
    • Hot sauce (optional)
    • White rice
    • Shredded mild cheddar cheese

    Directions

    1. Put two frozen chicken tenders in a microwave safe bowl, and microwave for 1m30.
    2. Put the tortilla wrap you’re using on a plate.  Spread some diced tomatoes and chopped lettuce as a base.
    3. Take the (now hot) chicken out of the microwave, and put it in some hot oil in a skillet over medium heat for about 30-45 seconds per side.
    4. Take the chicken tenders out of the oil, put them on a cutting board, and chop them into maybe ½” chunks.
    5. In the same microwave safe bowl, put approximately equal quantities of white rice, and then shredded cheddar cheese in, and microwave for 1m30.
    6. Spread the chicken on top of the lettuce on the wrap.  Add your desired quantities of ranch dressing and hot sauce.
    7. Take the melted cheese and rice out of the microwave and combine it with a spoon until it’s mixed.  Add this on top of the chicken.
    8. Wrap, folding the edges, and slice it on a bias.  Enjoy!

    Disclaimer: You’ll want a bigger tortilla than I’m using in the pictures.  I wound up having way too much stuff in it, and had to split it into two wraps after trying to wrap it.

  • Electronic Conference Badges

    Ever since attending Defcon 24 this past August, I’ve been enthralled with the idea of electronic event badges.

    I’m also pondering and trying to sort out what exactly would be needed to accomplish them on a budget that could be done for a WordCamp, and have it be both hackable after the event, but also usable during — and of course, look cool.

    From my experience running a WordCamp, I know that attendee gifts should normally be about or just under $10 per attendee, whereas speaker gifts should normally be about maybe $20 or so.  One handy bit is that speaker gifts are in addition to attendee gifts that they get anyways, so it’s possible to have the speaker gift be an addition to their attendee badge — like an LED display and better battery or sensors or the like.

    All this compiles to roughly the following requirements for attendees:

    • $10 per badge price limit.
    • Battery powered.
    • Blinky LEDs — either pretty or useful.
    • (optional) Reprogrammable after (or during) the event.

    The programmability and interactivity aspect of the badge is particularly tricky, but there’s a variety of cheap microcontroller units (MCU) like the ESP-8266 12-F that can be had for under $1 per in quantity.  Or, if you’d like something a bit easier for your attendees to reprogram, the Wemos D1 Mini which is based on the aforementioned ESP-8266 12-F can also be had for under a dollar in quantity — while it would make your badge a bit bulkier as it would need to connect to your badge via pins, rather than just soldering SMD directly to the badge — it also provides a Micro USB port to make it easier for users to connect to, without having to supply their own UART adapter.  The added bulk is likely worth it, in this case.

    As an aside, the Wemos D1 Mini is also programmable via the Arduino IDE, so that may simplify the process for your attendees to hack on their badges.

    The other tremendous advantage to using an ESP8266 based board as the brain of your badge is that the ESP8266 is actually a wifi chip!  That’s right, it can reach out and connect to wifi networks, or make an ad hoc network between multiple badges so they can communicate!

    This opens up a number of possibilities.  Would you like to let your attendees sign up for specific sessions throughout the day, and have their badge light up an LED indicating which room they need to go to?  Totally doable!  Would you like to have every attendee’s badge light up and start blinking at the same time?  Also doable!

    The one downside with being cost-constrained is that you may wind up putting in more time than expected assembling the boards.  It is possible to have your factory that manufactures the PCBs also pick and solder all the components, but that costs a bit more as well.  If you’re doing a short run of maybe 10-20 boards for just speakers or the like, it’ll probably be easier to just make them yourself.

    The other option that can be explored is to have the attendee gift be a cheap system-on-a-chip linux computer somewhat like to the $5 Raspberry Pi Zero — basically giving every attendee a computer that can operate as a WordPress Server — and then have the Speaker Gift be a badge with sensors and lights and batteries that can be powered by the attendee gift.

    In my exploring of this option, it seems that the simplest option may actually be the C.H.I.P. — while there are other options such as the aforementioned Raspberry Pi Zero and Orange Pi Zero, they both would necessitate also picking up MicroSD cards which can add to the price significantly — however, there are other development boards like the C.H.I.P. that include sufficient storage space on-board to simplify supply chain management.

    https://nextthing.co/pages/chip

    For $9, you get a 1GHz processor, 4GB of storage space, 512MB of RAM, and both Bluetooth 4.0 and WiFi b/g/n for connectivity.  While it doesn’t have the mini-HDMI out that the Raspberry Pi Zero has, it does have composite video out on the board’s headphone jack — and the manufacturer also sells expansion boards that can add on either HDMI or VGA displays.

    As an added bonus, when you need to flash your Chip, the maker also has a tremendously simple, browser-based flasher tool. For something you’re giving to attendees — many of whom may not be comfortable with flashing development boards — the visual flow can be tremendously useful as a jumping off point for many.

    Then you simply need to design a badge with  the pin headers for the C.H.I.P. to plug into, work up a firmware image with things such as the event’s wifi details preloaded, and a script running on a cronjob to operate the lights — and you’ve got yourself a badge for your speakers!

    Or at least that’s the plan.  At the moment, this is all theoretical, I’ve been puttering about and planning possibilities, but haven’t had occasion to actually put all of this into practice.  If any of it catches your fancy and you’d be interested in doing digital badges for your WordCamp, drop me a line on Twitter at @daljo628 and I’d be happy to help as I can.  🙂

     

     

     

     

  • Nintendo’s Modular Switch

    Nintendo’s Modular Switch

    (apologies for the pun, but it was totally intended)

    Last night, Nintendo officially announced details and games for their upcoming console, the Switch.  This morning I waited outside of a GameStop to preorder mine.  I’m excited.

    Most of the technical details, while impressive, struck me as basically what was to be expected — nothing out of the ordinary.  Better haptic feedback, new sensors, etc.  One thing did surprise me, though.

    USB-C.

    The actual Nintendo Switch charges via USB-C.  The controllers also charge via USB-C.  This means a couple things, listed roughly in the sequence that they occurred to me:

    1. Huh, that’s interesting.  I’ll be able to use the same charging cable that I have for my Pixel phone for the Switch as well!  That’s certainly a change, Nintendo has a history of inventing proprietary connectors on, like, everything.
    2. Oh, so if I’m on a plane ride or a trip, I’ll be able to charge it on the go to extend its battery life.
    3. Wait wait wait, if the Switch charges via USB-C when it’s plugged into the TV Dock, I wonder if it uses that single connection for both charging, and the 1080p HDMI video out?  It certainly could, I don’t see why it wouldn’t.
    4. Does that mean that the Nintendo Switch’s TV dock is just a glorified version of Apple’s USB-C Digital AV Multiport Adapter — piping the video out through the same single USB-C port that the power comes in via?  I wonder if they’d be interchangeable.
    5. I wonder if it would support USB peripherals via a USB-C hub plugged into the Switch.

    There’s a lot of tech questions that will only be answered on or about March 3rd, when the Nintendo Switch actually releases — but with Nintendo changing — err, switching — to more modular technology standards, I’m very excited to learn where we go from here.

  • Diminish.

    Most of y’all may not know, but I’ve been changing myself lately.  Physically, I mean, and a lot more than my recent tendency of dying my hair blue.

    For almost a year now, I’ve been using Invisalign to fix my teeth, and tomorrow I go under the knife for a Gastric Sleeve surgery.

    To be completely honest, I’m a bit scared.  I know it’s considered a trivial procedure, very low risk, but it’s not nothing.

    I’ve tried losing weight for years — both for self-image reasons, but also health.  I have two kids, I’d like to do everything I can to make sure I’m around to see them both grow up.

    So now, I’ve been on a liquid diet consisting of less than 1,000 calories per day for the last week, and that’s about to get cut down to practically nothing for a few days as I recover from surgery.  And then I’ll make my way back to food.

    The confusing bit is I’m not really hungry.  I don’t know.  Maybe I’m not good at listening to my body’s hunger cues.  Or maybe protein shakes are magical and really do keep you full.

    Anyway, tomorrow.

    Tomorrow I go in for surgery, and then I’ll get to miss gorging myself at holiday dinners this year.  But egg nog is okay on a liquid diet, right?

    Hopefully, as time passes, I’ll become myself again.  Emotionally and physically.

  • Kiri Kiri Basara, a lesson in domains

    Kiri Kiri Basara, a lesson in domains

    Howdy!  If you’re here, one of two things happened.

    Either you follow me on social media or my blog and found this new post, or you’re an anime fan watching Occultic;Nine, and saw the domain kirikiribasara.com in episode one and tried typing it into a web browser.  That domain — for now — redirects to here.

    Here begins the lesson:

    If you’re ever using a domain name in a movie, or a tv show, or in a presentation — any form, really — do yourself a favor and make sure you buy the domain before you go live.

    It’ll cost you like $12, tops.  If your show flops, no big deal.  You don’t need to renew it for a subsequent year.  But if it takes off — or even if someone pulls up the domain just right after airtime, it’s a great tool to engage your users.

    Or, you could not buy it, and some rando on the internet (hi there) can scoop the domain up for $12 on Google Domains.  Or cheaper if I wanted to go elsewhere.

    Also, if you would like to start your own affiliate blog (like the domain was used for in the anime), I’d suggest building at WordPress.com!

    As an aside, I’m not really looking to sell the domain, I just think it’s funny, but if anyone does desperately want the domain to run some sort of fan-forum or if the show’s producers are interested, feel free to drop me a line — the contact form on this site should work, and I’m fairly easy to reach on social media. 🙂

  • On the FDA and E Cigarettes

    On the FDA and E Cigarettes

    DISCLAIMER: While I may enjoy a rare cigar or pipe of tobacco perhaps once or twice per year, I don’t regularly consume tobacco products or nicotine. This post is more my musings on the bureaucracy and workings of the federal government.

    Yesterday, the Food and Drug Administration (FDA) expanded its regulation authority to include “Vaporizers, vape pens, hookah pens, electronic cigarettes (e-cigs), and e-pipes are some of the many types of Electronic Nicotine Delivery Systems (ENDS)”.

    I have concerns.

    According to their press release,

    Examples of components and parts of ENDS include, but are not limited to:

    • E-liquids
    • A glass or plastic vial container of e-liquid
    • Cartridges
    • Atomizers
    • Certain batteries
    • Cartomizers and clearomizers
    • Digital display or lights to adjust settings
    • Tank systems
    • Drip tips
    • Flavorings for ENDS
    • Programmable software

    So, in short, it’s regulating all of the paraphernalia associated with vaping, and not merely the nicotine itself.

    This is concerning to me.

    Back in my college days, I used to smoke a (tobacco) pipe and cigars on a weekly basis with other students.  It was a communal event, and I learned to blow smoke rings.  As I’ve grown in the decade since then, I’ve lost the inclination to smoke, and really have no desire for nicotine.  I’ll occasionally smoke a pipe socially with friends once or twice a year, but I do enjoy blowing smoke rings.

    As such, I own an electronic cigarette, and I purchased a quart of food-grade USP Propylene Glycol — the base liquid that most suppliers use when making liquid for vaping — and I’ll occasionally use it to blow smoke rings in my office.  No nicotine, no flavorings.

    By my understanding, the FDA’s regulation of E-liquids has no limitation to “We only regulate E-liquids that contain nicotine” — in fact, they even state explicitly that:

    If the tobacco product manufacturer submits a self-certification statement to FDA that the newly-regulated tobacco product does not contain nicotine (and that the manufacturer has data to support this assertion), then an alternate statement must be used on product packages and advertisements:

    “This product is made from tobacco.”

    Keep in mind that they are also broadly defining “Tobacco Product” to include all ENDS including all E-liquids and cartridges, atomizers, and even certain batteries. They must be labeled (falsely) that it is made from tobacco?

    This feels like a significant overreach.

    It strikes me that a similar regulatory effect could be accomplished, simply by exclusively regulating exclusively substances that contain nicotine. What is gained by having the Food and Drug Administration regulating the batteries that power vaporizers? Regulate the nicotine. If someone’s selling electronic cigarettes that come preloaded with nicotine? Sure, regulate that.  But leave the rest alone.

  • Two Weddings, One Family

    I attended two weddings in the family this past weekend.  Two cousins, both on my mom’s side, tied the knot.

    Saturday was a beautiful outdoor wedding at a farm in the countryside.  It was about a four hour drive away, which made it into a bit of an interesting day trip, but mostly uneventful.

    https://www.instagram.com/p/BE1AUyfKkuf/

    Sunday was a much easier affair to make it to.  A scant fourteen minute drive from our house, a “come as you are” ceremony.  Much easier to pull off with a seven month and three year old in tow.

    And yet some members of the family chose not to attend.

    Some members of the family who just drove eight hours round trip to attend another cousin’s wedding didn’t attend.

    Why?

    It was a gay (or, more specifically, lesbian) wedding.

    And it ranks up there in one of the most charming weddings I’ve ever attended.  The schedule on the program was titled “The Gay Agenda,” and they made jokes about “If this isn’t your first gay wedding, please keep the Bernie chatter to a minimum,” “Now that you’re all attending a gay wedding, congratulations, you’re all gay too,” and even “By the authority vested in me by Obergefell v. Hodges

    My mind is just utterly blown at trying to comprehend the mindset that feels it’s more important to not attend a non-religious marriage ceremony.  If you’re Catholic, would you also refuse to attend the wedding of a cousin who was previously divorced and is now getting remarried?  Or do you only attend religious wedding ceremonies presided over by your own church?

    I mean — what’s the thinking behind this? “If only I don’t attend their wedding, they’ll recognize the error of their ways, and abandon their sinful plan to marry the person that they want to spend the rest of their lives with?”

    (btw, I’m pretty sure the bible doesn’t say anything about gay marriage, all the verses deal with the consummation, and I’m pretty dang sure you’re not invited to that part)

    In the end, if I’m going to screw up in this life, I want it to be for loving and accepting people, not making them feel unwelcome or judged.  That’s my Pascal’s Wager. And that’s what I believe the message of the gospel is. The message of the Christ who dined with prostitutes.

    Don’t approve of gay marriage?  That’s cool, don’t get gay married. 👍

    But to not attend feels spiteful and unkind and wrong.

    And I’m left feeling disappointed.

  • DIY Halloween Costume Smoke

    I’m currently experimenting with possibilities for making a combo halloween costume that I could wear with my daughter this year, and I’d always wanted to be able to add a flair of the dramatic to costumes, and smoke is one of the best ways to do it.  Especially when it’s just a touch here or there.

    I want it to be portable, and affordable.  Both of these are kinda requirements, honestly, for a once-per-year halloween costume.

    In doing some research online, I saw an offhand remark from someone about e-cigarettes, vaporizers, whatever you like to call them, and the more I thought about it, the cleverer it seemed.  The recent pivot in the nicotine industry had driven down the cost of e cigarettes to the point where I could buy a “V2EX Automatic EX Starter Kit for E-Liquid” for about $12 at my local gas station.

    Keep in mind, that this is just the e cigarette, not the ‘e liquid’ or the nicotine-laden stuff that makes it go.  By my understanding, that’s the far pricier bit.

    So, e cigarette (rechargeable miniature smoke machine) in hand, I’d need at several more things: the fuel that makes it go (as I have no desire for nicotine or flavoring, I decided to forego the ‘e-liquid’), some sort of pump to operate the ‘draw’ that activates the e cigarette, and some way of getting the smoke from the e cigarette to where I want it.

    The primary ingredient in ‘e liquid’ is a fun little compound called Propylene Glycol, and indeed you can buy it without the nicotine or flavorings much cheaper — if you have a Compounding Pharmacy anywhere near you, they normally sell it for probably about $10/pint — far more than you would conceivably need for a little smoke machine, but the point is that it’s cheap.  It’s also available on Amazon Prime.  You don’t need to mix it with anything, you can just pour it directly into the refill area of the e cigarette.  Granted, you may want to get an eyedropper or syringe with a blunt needle to do it with, so you don’t make a mess.

    Now, we need a delivery method.

    I had initially been envisioning some sort of one way dinky little plastic air pump with some hose on it that I could hide either under an armpit or behind a pushable button somewhere on the costume, but while trawling Amazon, found a great option — a 6′ tube with a siphon pump.  Going by its reviews, it’s made just as cheaply as the price indicates, but for our purposes — a one night costume — the price ($7) is right, and free shipping on Prime.

    It is missing one-way valves, and I’ve got a set of those coming — again, Amazon Prime — but I don’t have them in hand quite yet.

    In all, it’s come out to just about $30, $35 with the one way valves, and it feels totally worth it to add an incredible effect to a costume.

    So, all things considered, I’m expecting to have a pretty fun instant smoke addition to a halloween costume this year.  And with the leftover propylene glycol?  Maybe I’ll just practice making smoke rings.  🙂

    One friendly warning, though — you do not want polyethylene glycol.  That’s a laxative.  💩