1,050 karma · joined Jul 18, 2010 (16y ago) · 308 submissions
comment 3y ago · link · parent
This is a very problematic take, and is simply inaccurate when it comes to the web.
If you write zero CSS, a web page will render just fine on any display. Text will auto-wrap and be legible. The web is "responsive" by default. It's the designers who try to rigidly align things with specific widths, explicit sizes, and absolute values that make web pages harder to read and use.
Meaning, any given element shouldn't have a `width`, it should have a `max-width` instead. Text should have a relative font size to headings or other text. Alignment should take into consideration overflow, as it will by default with flexbox and grid. Everything by default will flow in some way and try to make it onto the page.
It's all the violence of designers that makes things both less device friendly and less accessible, just like these poor contrast decisions.
comment 3y ago · link · parent
If you go past that scope, you need to completely redesign, or create two separate DSLs. Surely not taking a super small, specific, DSL like "what if we made redundant styles automatic by cascading them down the DOM tree?" and try to extend that for every conceivable styling, layout, rendering, and animation need.
comment 3y ago · link · parent
I fundamentally blame Sun and Java for this. I guess I blame James Gosling for Java, and Sun's aggressive marketing of Java in the 90s, along with the naming/marketing deal with Netscape that resulted in JavaScript being created instead of Scheme being adopted.
One of the greatest tragedies in tech history.
comment 3y ago · link · parent
There's essentially no technical debt in choosing these technologies because if you start with a web app and then want to make a "desktop app", there's Electron. Want to make a mobile app? React Native. There's even React Native for Windows and macOS for a more true desktop app with a native UI. You can also run your JS on the backend with Node, and even inside the database (PL-V8 runs V8 for stored procedures inside PostgreSQL, aside from obviously CouchDB or MongoDB and others). Heck, you can even write an app for the Xbox or build out on several IOT platforms using JavaScript!
Is there any reason to create the same thing in 4+ different languages? Are you going to rewrite your frontend in C#, Kotlin, and Swift? Are you going to deal with different language models and incompatibilities? Rewriting the same exact functions over and over, and unit tests for every single one, keeping in mind the subtle semantic/scope differences between each language--and then realize you still have to serialize/deserialize to JSON to talk to your backend and other services and just juggle JS data models between all these languages and ecosystems.
Choosing JavaScript and React today are the sensible default where you won't code yourself into a corner, is what I'm getting at. And you can also now choose TypeScript or ClojureScript in all such cases as well.
comment 3y ago · link · parent
Without ASI, the following would work as you'd assume, instead of returning `undefined`:
return
{
answer: 42
};
Just one of many ridiculous edge cases that would go away if ASI didn't insert a secret "helpful" semicolon at the end of the return line.Rather than making me remember all the edge cases and rules [2] that keep growing with each new syntactical feature added to the language, we should just be making your code more explicit. The rules of reading the code are simply much more complicated than they should be with ASI, and many proponents don't even understand these issues, or suggest preposterous solutions to some of these edge cases such as inserting leading semicolons[3]!
Maybe put simply: Semicolons are sometimes required. Let's just make them always required.
[1]: https://www.theregister.com/2018/01/12/javascript_technical_...
[2]: https://tc39.es/ecma262/multipage/ecmascript-language-lexica...
comment 3y ago · link · parent
I am almost always using one of the following instead:
- o: open new line below current line
- O: open new line above current line
- I: insert at beginning of current line
- A: append to end of current line
- cc: change current line
- C: change to end of line
- ci(: change in current parenthesis
- ci": change in double quotes
- ctX: change to character X
- cfX: change to found character X
Each of these will perform an action and leave you in insert mode after the action. Then using `.` you can repeat both the changing action and the insert, all in one keystroke. Obviously impossible to do if you only use `i` and `a`.
Vim is not about toggling modes. Vim is an entire language to express text transformation, that you can then repeat with `.`, or undo with "micro commits" to your file, traversing the history back and forward in sensible chunks instead of the usual chaos of Ctrl-Z in other editors. (You can even branch your undo history!)
comment 4y ago · link · parent
https://hackmd.io/c/tutorials/%2Fs%2Ffeatures
For your use case, it saves files immediately as you type them. It's also collaborative and can sync to GitHub.
As an extra bonus, optional Vim and Emacs keybindings are built right in.
comment 4y ago · link · parent
So, it's obviously fine to two-space if you're using a typewriter.
It's therefor also fine if you're writing in a monospace/fixed-width font.
But don't do it with proportional width fonts! They are designed with various hints in place to render appropriately as one should typeset them, adjusting spacing between various letters, and of course rendering periods and decimal points correctly, contextually!
HTML will also ignore extra spaces, accordingly. Word processors will either highlight consecutive spaces as a typo or even auto-correct as you type. So I guess not much worry here if it's a habit.
comment 4y ago · link · parent
- A shortcut to turn on the flashlight
(The "Quick Tap" gesture can now turn on/off the flashlight)
And this concludes all the features I was looking forward to in Android 13.
Thankfully 3-button navigation is still here. The day they remove it is the day I stop using Android.
comment 4y ago · link · parent
And then after a few instances, I just turn off all the automation and set up a schedule like normal.
Same with the "away from home" which seems to randomly think I'm away and I have no idea why.
Oh, and the app doesn't show me filter reminders, only the actual device, which I never touch all the way downstairs. There's not even any status to let me know if it's accepted a new dialed-in temperature, as I've had it fail to capture a request, and then I go back, and see it never updated/saved the new temp. Just zero feedback to confirm that the thermostat has responded to any input, and zero notification from the app if this happens.
Just thoroughly unimpressed.
Thankfully I didn't buy this junk, as it was pre-installed by the owner of my rental. Can't imagine actually paying for something that's only real feature is being able to remotely control my temperature once in a while.
comment 4y ago · link · parent
comment 4y ago · link · parent
https://www.youtube.com/c/Scienceasylum
This channel covers the same subjects of physics and space, but does so with some incredible insight that I've seen no other channels dig into, and thoughtful animated diagrams that really help in comprehending the subject.
Here are some great episodes:
"What is Quantum Spin?": https://www.youtube.com/watch?v=sB1EPGmpzyg
"Quantum Superposition, Explained Without Woo Woo": https://www.youtube.com/watch?v=ZUipVyVOm-Y
"Capacitors Are Gaps! How Does That Work?!": https://www.youtube.com/watch?v=zYRx6Zub3cA
comment 4y ago · link · parent
It's really hard to take someone serious when they make big, untrue, statements saying the real web is "centralized" right on every page of their site, to peddle crypto scams.
https://chadnauseam.com/reasoning-quiz
> Neo-Nazis are holding a demonstration in a small town, waving swastikas around and shouting about Hitler. They seem to be pretty peaceful so far, so the First Amendment says you probably can’t get rid of them. However, their demonstration is near a main street and it could be a minor inconvenience to the traffic trying to go through.
>
> [ ] Allow the neo-Nazis to demonstrate.
>
> [ ] Break up the demonstration on the grounds of ‘blocking traffic’.
I am at a loss for words. Nazi sympathy under the guise of tolerance.
comment 5y ago · link · parent
None of these are Internet Explorer, the problem in question. Chrome and its Play Store dependencies are backwards compatible to much older phones. Android browsers even years ago had better web platform support than IE11.
I fully sympathize and believe that web sites should be as compatible as possible. It's the web apps that fall apart once you take away modern functionality.
> In the past, using a crappy browser was a matter of choice. Nowadays, the only people who use them are those who have no other choice.
This really depends on how much their actual lives depend on being able to use the web. If they live in poverty and/or third world countries, are their daily lives impacted by the web? What part of their life depends on what site exactly? Sure, communication is relevant, but we're already saying they have smart phones and thus data connections, email, and whatever native chat apps.
I'm not saying we should leave them behind technologically or that they don't matter or shouldn't have access to more information or knowledge, I'm just simply being practical with what is likely the real impact to their life.
In the end, I think web developers need to stop using ridiculous frontend tech for what ultimately constitutes static text content. The web already excels at that. Servers cache. Browsers cache. We don't need Vue to render a blog or article. Please leave such tech for SPAs and "apps" rather than sites or pages.
comment 5y ago · link · parent
I almost never press `i` to enter insert mode, and I don't expect most vimmers to do so either. My most common ways to enter insert mode are, off the top of my head...
o -- Open new line below current line, enter insert mode.
O -- Open new line above current line, enter insert mode.
ci( -- Delete all text between the nearest parenthesis and enter insert mode within the parens.
A -- Jump to end of line and enter insert mode.
I -- Jump to start of line and enter insert mode.
C -- Delete to end of line, enter insert mode.
cc -- Delete entire current line and enter insert mode.
ctX -- Delete to the character X where X is whatever character I see ahead of my cursor that I want to delete up to, and leave me in insert mode.
cfX -- Same as ctX except include the found character in the deletion, then enter insert mode.