932 karma · joined Sep 18, 2020 (6y ago) · 485 submissions
comment 3y ago · link · parent
<div class="carousel-container xyz-row xyz-row-xs--top xyz-row-xs--nowrap" data-v-72ffe0f0="">
<div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
<div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
<a class="link-wrapper link-routable" ...>...</a>
</div>
<div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
<div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
<a class="link-wrapper link-routable" ...>...</a>
</div>
<div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
<div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
<a class="link-wrapper link-routable" ...>...</a>
</div>
...
<div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
<div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
<a class="link-wrapper link-routable" ...>...</a>
</div>
</div>
... vs: <div class="carousel">
<div class="caro-card">
<a href="product-url">
<picture>...</picture>
</a>
</div>
<div class="caro-card">
<a href="product-url">
<picture>...</picture>
</a>
</div>
<div class="caro-card">
<a href="product-url">
<picture>...</picture>
</a>
</div>
...
<div class="caro-card">
<a href="product-url">
<picture>...</picture>
</a>
</div>
</div>
Sure, the CSS in the second case will be larger, but that one file gets cached for the remainder of the visit, whereas every asynchronously loaded <div> in the first case is gonna be 3.8 KB. An inventory with 3,176 items will take 12.2 MB to fully load WITHOUT product descriptions e.g. user decides to search empty string and scroll all the way to the bottom. (These numbers are rather exact because I picked a random, well-known, segment-specific shop---not cherry-picked, just the first one I thought of.)Maybe someone at this large, segment leading company carefully considered that they should have 12 different srcset pictures because "responsive" and "bandwidth", but I doubt it because the URLs violate DRY and have escaped characters in the query part and the URL indicates this brand doesn't host static content on their own server (as in, they've hired someone else and have non-technical employees log in to a CMS and upload/update everything).
More realistically, the company that creates these websites imports a framework that has already considered that 2.3% of users are using Edge, 3.8% are using Safari, 0.4% are using Opera on Mobile, 0.2% are using Kiwi on Mobile, 0.8% have disabled Javascript, etc. and then decide they absolutely MUST have everything display as-desired on all platforms rather than excluding the most unusual or ancient user agents that represent far less than one percent of sales. I mean, who's going to leave if your site loads a little slow (but like all the others)? Who leaves if it loads "not at all"?
I see everyone from blogs to clothing stores slapping in a dozen minimized JS frameworks, fonts, reams of generated CSS, ElasticSearch, jQuery, images scaled or loaded improperly, cookie cutter UI elements and giant rounded corners and then some having the nerve to link to a "How awesome is our site?" survey (aka another nugget of JS) where I feel obliged to reply "Your front page takes 8.5 seconds to load on current stable Firefox, has 30 warnings and an error... How do YOU think you did?"
While I'm no web specialist, it seems you could even have a lightweight front page that has a small or even inline stylesheet while the sitewide CSS is loaded asynchronously (cached) after the front page is presented, so the first thing visitor sees is a quick loading page, the 2 to 4 second load happens in the background, they click a link, BOOM next page loads in its full-featured, one-or-two-human-readable-class-per-element glory with the Sneaky Load Giant CSS as an already-cached dependency.
I've also seen much worse violations than my example: divs within divs 20 deep, 15+ clvrly-abrvd-cls per div, because someone decided it's easier as a dev to have "flex flex-col-reverse lg:flex-row items-center justify-center mt-20 mb-32 md:mb-40" outside of every paragraph (instead of a single, well-defined paragraph class that could even inherit common custom properties) or better yet, <footer class="ou ov ow ox oy oz pa pb pc ab q pd pe c">
(I'm sorry if you see that I called out a snippet of your blog here, but that last example belongs to a Next.JS/TailwindCSS advocate, and it's like he took the ideas of the coinventors of CSS and then went full Second City improv, "yes, AND!")
comment 3y ago · link · parent
comment 3y ago · link · parent
1. the post is previewed with Github's dialect of Markdown and not the SSG's (and definitely with none of the inline configuration applied)
2. the preview is still a Markdown document, so you get no benefits of syntax highlighting or auto-formatting w.r.t. the config header (short of opening in Vim and explicitly declaring the filetype or temporarily changing the extension in Github's editor)
3. you HAVE to put trailing spaces in the YAML/TOML/JSON or the preview pane crams everything into an unbroken paragraph
4. there's not a quick preview of how the configuration will parse, just specific workflows (live update, compile single page) that you can test and then modify as needed. This is either in the rich online editor or your own machine and will require console commands and a browser window
5. I still have to know all of the modifiable attributes as well as defaults, which will be in a separate document and probably not in a Ctrl+Space dropdown
-----
For point 5, it would be nice if configuration formats had completions for common editors and/or their own scripts:
* "generate big config file with all possible keys and default values"
* "condense modified config file so it only contains non-defaults (and hope the schema doesnt change hahaha)"
* "suggest a valid fix for a currently invalid config file"
-----
Sure, this all isn't a direct criticism of TOML, but inlining configuration is a great-to-okay idea that is simply poorly executed. It is extremely unfriendly to non-technical users; I can fully understand why someone would pay a few hundred a year for a WYSIWYG templated website builder to just handle everything.
comment 3y ago · link · parent
From the past week:
Fine-tune Llama 2 (900 points, 180 comments) -- no flame war or snark, just engineering discussion
Bug in macOS (800 points, 200 comments) -- very short and objective bug report, just one major disagreeable discussion branch
Uninstallers are like malware (800 points, 480 comments) -- even the second page of comments has valid discussion outside most of the last dozen comments
iPhone 15 (750 points, 2000 comments) -- there it is. USB-C anger, annoyance at incrementalness, "every Apple fanboy is rushing to get this and use it for Insta", Apple fanboys (rightly) defending their phone will be supported for nearly a decade what now Asus/Motorola/Sony?!, and then the last two pages are the "grab some popcorn" discussions
(additionally, there's a second post about iPhone 15 Pro with 250 points and 500 comments; similar comment distribution)
-- a few more posts with more points than comments, nothing unusual --
Unity (480 points, 520 comments) -- understandably angry comment section, impressive because very few people have taken Unity's side which is maybe why it is close to the 1:1 points-to-comments ratio
Interactive Map of Linux Kernel (420:30) -- this one has a particularly point-heavy ratio, just a few people pointing out the minor inaccuracies, browser quirks, lots of praise and a few, "How do you do that?"
nothing else on the top 30 has more points than comments, the next one with this distinction is #32, "Uselessness of Phenylephrine," which is not a surprise to me
The next standout to me IS an engineering post with 150 points and 270 comments, but it represents a strong opinion bashing TOML. It's akin to a declaration of which food is the best, and the discussion gets heated but also technical.
comment 3y ago · link · parent
Honestly, I'd expect any Armv8.3+ or Armv9 to have USB PD/USB-C, Thunderbolt, etc. on the chip itself. USB PD is even halfway-or-more supported on some budget Cortex-M targets. Apple, though, is a special case; the chipmaker and developer are the same, so they have the freedom to say "no USB-C on mobile chips" and include only the features they want.
My post was pure speculation and a little giving them the benefit of the doubt.
comment 3y ago · link · parent
https://www.nytimes.com/interactive/2023/09/11/us/politics/7...
https://www.nytimes.com/2023/09/11/nyregion/sept-11-memorial...
The 9/11 section has as much coverage space as tomorrow's rumored iPhone announcement.
And, yes, at some point in the near future, it's going to be as meaningful to the American public as the Tet Offensive, Oklahoma City bombing, etc.
comment 3y ago · link · parent
For tracking, they'll have to rely on old-fashioned "order history" and "inventory period". By these metrics, I would be baffled if they decided to block my access or close my account, even if I'm bypassing Google Tags/their AB test suite/social media analytics/ads for their other services.
Ignoring their nonconsent feels impolite, but they can dry their tears with my spent money.
comment 3y ago · link · parent
Programmatic? Yes. Against their wishes? Also, yes.
The guilt or bad feelings subsided after realizing I'll use more of their bandwidth how I was searching before via the browser. Using the API, I see when the last inventory update occurred, and only after this will I search their discount inventory.
(In any case, if they are on EC2, I cost them 3 to 8 cents per month, estimating high, which they have certainly recouped.)
comment 3y ago · link · parent
(Auto-Redirect Short To "Normal" Video URL would be a good extension if I knew how to do one or had time to learn.)
comment 3y ago · link · parent
To save you a few clicks: It's a miniature hobbyist/electronics multitool built around foldable pliers, where the inner part that usually grips different bolt heads is replaced with wire strippers 12 to 20 AWG. With a bit of angle and speed you can cleanly strip to 24 AWG stranded or 28/30 solid (although I'd just use teeth for the latter). You can still grab reasonably small & loose bolts with the end. It also has a knife, one-handed scissors, file, bottle opener, and flat as well as flat-sized-for-Phillips screwdrivers. I probably use this every single day at work and at home: opening packages or beers, making XLR cables, prototyping with microcontroller EVBs, trimming loose threads/tangled hair ends/a rough nail/tag wire, tightening drum heads when the keys are all missing, scraping/filing dirt from suede, slicing food, turning screws.
When I carry a bag it's a giant diaper bag with all that this entails or---more rarely---my camera bag which has a laptop pocket and a drink pocket for an insulated metal flask. Otherwise, a slim wallet and phone completes the ensemble.
228.
Android 12’s Material You Is Terrible and You Know It(brendanmcginley.com ↗)
2 points · by PennRobotics · 3y ago · 1 comment
comment 3y ago · link · parent
On the flip side, if you are disabled, what pressures would you face that make you more likely to interact with games than the general population?
The article needs at least one clear peer-reviewed citation.
(1) https://www.consilium.europa.eu/en/infographics/disability-e...
comment 3y ago · link · parent
[1] https://global.oup.com/ushe/product/microelectronic-circuits...
When I did a Sedra/Smith course, it was after two semesters of passive linear circuit analysis, so it makes sense to skip the basics in lecture 1.
-----
Personally, I found 6.002 (MIT's Circuits lecture[2]) very good for getting through electricity basics and into amplifier modelling, and then using Falstad's simulator to explore real amplifiers and diode circuits. I wish the lecture audio was better, because at one point he moves from the I-V bend of a crude amplifier into the linear region (by applying a bias voltage and shrinking the signal input) while playing music[3], and that sounds really cool live.
[2] https://www.youtube.com/playlist?list=PL9F74AFA03AA06A11
[3] https://youtu.be/JqvKtMNz3RQ?t=1480
It's old content, so 240p. At one point, they had better lecture videos from a more recent year, but those are maybe on edX or MIT DSpace or their Digital Learning server.
comment 3y ago · link · parent
XWayland server provides limited capabilities for X11 desktop applications (see X11 Application Support and JDK-8269245). In order to get full support of the desktop features, we need to implement a pure Wayland client toolkit for java. Wayland architecture in many ways differs from X11, so we cannot reuse XAWT even for basic capabilities. The new toolkit should be implemented from scratch. Here are some major chunks of work: Event handling (...), Graphics devices support (...), java.awt.Robot (...), Client-side decorations for windows (...)
(That JDK is related to java.awt.Robot.createScreenCapture, and global screen capture is restricted by Wayland)
In short (and I've used this metaphor before) they've thrown away the complicated, dangerous steering wheel and provided a clear description of the steering column so that each app developer or desktop compositor (i.e. someone else/not us) can develop their own, presumably safer, steering wheel. For the functionality they tore away, apps either must use XWayland (the compatibility layer), rewrite to conform to pure Wayland, or submit a merge request for the thing they want to one of the Wayland repositories.
Of course, larger apps with lots of dependencies need every dependency to do Wayland appropriate things or have the XWayland server connect the dots. In some cases, for reasons I don't fully understand, the compatibility layer can be slow as hell.
For example, if I run OpenSCAD's AppImage (in Wayland with either an AMD GPU on a 3K 10bpp display or Nvidia GPU on a 4K 10bpp display) and type something like
cylinder([
it takes about a second to type but at least three seconds to fully appear in the editor. Switching to X instantly resolves the issue. OpenSCAD is Qt and has a handful of other dependencies that I guess are also not as actively developed, plus the official release has lagged the nightly for the past 3 years or so despite active development.The Wayland developers are few and seem to work on the things with the biggest impact to users/themselves while restricting a lot of proposed changes for security, stability, or "takes too long/doesn't make sense to us" reasons. Things like non-Intel GPU compatibility, unusual hardware, and legacy software have to rely on compatibility layers until someone else fixes issues upstream or downstream.
It's possible I misunderstand this system/organization and will gladly get schooled by anyone not blindly yelling, "Wayland works on my machine! Your problems exist not because of Wayland but because XYZ"
comment 3y ago · link · parent
If the FP5 were just a tad smaller with a telephoto (like the Xperia) I'd be all over it---water resistant or not.
comment 3y ago · link · parent
Water seeping inside an IP55 because you drop it in the bath, sink, toilet, hurricane, etc? Turn the thing off right away, remove battery, get it in a box with desiccant, and it'll probably be fine in a day. If not? Still repairable.
comment 3y ago · link · parent
I wonder if Google's end game is for manufacturers to hardwire a power LED to the microphone and camera, as this would be close to a perfect system of notifying users they are being recorded, although there will always be a handful of reasons to oppose this and a handful of people adamant a hardwired power LED can still be bypassed without physical access to a device.
-----
While annoying, you could just assume the pixels between the bezel and punch hole will almost never be useful and just put a thin, long tape piece over the entire edge. (The case would then conveniently keep it in place, where it can be temporarily flipped up.)
-----
For the extreme privacy minded (e.g. a Richard Stallmann level of, uhh, prudence) you could probably pop out the modules holding the microphone and camera and then exclusively use a USB-C microphone/headset/webcam. Then usability comes down to whether the OS would continue to start with one of these peripherals missing, although in our experience with FP2 and 3, some of the microphones would sometimes fail with no other side effects. I imagine a missing camera would probably just crash the Camera app and any other you've given camera permission to.
comment 3y ago · link · parent
The comment from fauigerzigerk sums it up well. You just have to know via experience, a great teacher, or very attentive learning that vec![1,2,3] is going to pop all of its values in a "print elements" loop while [1,2,3] will retain each value.
Other languages have similar behavior, but it's often more obvious e.g. Python with the .next() keyword.
comment 3y ago · link · parent
If I see Java source, it makes sense even though I don't know Java... at least up until how javax.swing layouts are constructed or I see a really obscure annotation without comments. If I had to add something to the Arduino 1.0 IDE, I'm confident I could figure it out in a day or two, because a class is a class, lines end with semicolons and comments look /* like this */, I can guess the existence of sort() or random() or an int being either int, Int, or Integer.
In contrast, a Rust "trait" being roughly equivalent to a C "struct" would not have been in my top 20 guesses. I can't recall trait being a keyword in ANY language I've used. I have no idea what Box and Arc are, because to me, those are "what you put tools in" and "plasma from too much potential difference".
Yes, I can check the reference (constantly) but at some point looking up every word or tick mark gets in the way of absorbing the story. The punctuation in particular bothers me, because it's not searchable via engine. There's no special Google result for
rust '
I can't be more clear. My ability to read/write code extends beyond pseudocode. Rust is just not an easy transition for a "primarily C" user, in my experience and opinion.comment 3y ago · link · parent
also, true about rewriting subject.rs, that was a bit of hyperbole about how everything spreads out vertically and seems to do one task per screen-full of text. I'd need at least as many lines as functions and classes and returns, so about 40 keeping everything clean and not combining/deleting classes. which is what you have if you combined your multiline statements.
(aside, i don't need to know how to read rust to understand subject.rs. The comments describe everything in plaintext)
comment 3y ago · link · parent
comment 3y ago · link · parent
I'm not a database expert, but I became comfortable with SQL this past year so I could better understand how my company's office software is structured. I can cobble together enough Javascript to create an own online sheet music book using abcjs, a directory full of ABC files, and jquery. I was able to barge through enough C# to write a crude 2D game during a game hackathon in college.
In fact, AFTER learning Python, a lot of C became easier because I knew HOW a data structure should behave, which then influenced how I would create it from structs and functions.
However.
I get hung up on Kotlin. Kotlin reminds me a lot of Rust in its syntax, and Android has the same habit of renaming every single concept.
In general, the more keywords and syntaxes two languages have in common, the easier to read. (In SQL's case, I think the relative lack of keywords and rigid query structure made this a nonissue.)
So, mixed bag.