- May 2024
-
meta.stackexchange.com meta.stackexchange.com
-
"that post is written in a very indirect and unclear way" -- that is intentional, no? The company has been communicating in this style for quite some time now. Lots of grandiose phrases to bamboozle the audience while very little is actually being said. It's infuriating.
-
On the surface, this is a very nice sentiment - one that we can all get behind.
-
- Dec 2023
-
developers.google.com developers.google.com
-
A personalized button gives users a quick indication of the session status, both on Google's side and on your website, before they click the button. This is especially helpful to end users who visit your website only occasionally. They may forget whether an account has been created or not, and in which way. A personalized button reminds them that Sign In With Google has been used before. Thus, it helps to prevent unnecessary duplicate account creation on your website.
first sighting: sign-in: problem: forgetting whether an account has been created or not, and in which way
-
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
Are protected members/fields really that bad? No. They are way, way worse. As soon as a member is more accessible than private, you are making guarantees to other classes about how that member will behave. Since a field is totally uncontrolled, putting it "out in the wild" opens your class and classes that inherit from or interact with your class to higher bug risk. There is no way to know when a field changes, no way to control who or what changes it. If now, or at some point in the future, any of your code ever depends on a field some certain value, you now have to add validity checks and fallback logic in case it's not the expected value - every place you use it. That's a huge amount of wasted effort when you could've just made it a damn property instead ;) The best way to share information with deriving classes is the read-only property: protected object MyProperty { get; } If you absolutely have to make it read/write, don't. If you really, really have to make it read-write, rethink your design. If you still need it to be read-write, apologize to your colleagues and don't do it again :) A lot of developers believe - and will tell you - that this is overly strict. And it's true that you can get by just fine without being this strict. But taking this approach will help you go from just getting by to remarkably robust software. You'll spend far less time fixing bugs.
In other words, make the member variable itself private, but can be abstracted (and access provided) via public methods/properties
-
-
stackoverflow.com stackoverflow.com
-
I'm not saying never mark methods private. I'm saying the better rule of thumb is to "make methods protected unless there's a good reason not to".
-
Marking methods protected by default is a mitigation for one of the major issues in modern SW development: failure of imagination.
-
If it's dangerous, note it in the class/method Javadocs, don't just blindly slam the door shut.
-
Been disappointed, surprised or hurt by a library etc. that was overly permissive in it's extensibility? I have not.
-
The old wisdom "mark it private unless you have a good reason not to" made sense in days when it was written, before open source dominated the developer library space and VCS/dependency mgmt. became hyper collaborative thanks to Github, Maven, etc. Back then there was also money to be made by constraining the way(s) in which a library could be utilized. I spent probably the first 8 or 9 years of my career strictly adhering to this "best practice". Today, I believe it to be bad advice. Sometimes there's a reasonable argument to mark a method private, or a class final but it's exceedingly rare, and even then it's probably not improving anything.
Tags
- dangerous (programming)
- member visibility
- disappointing
- reasonable defaults
- member visibility: make it protected unless you have a good reason not to
- what does this actually mean?
- allow others take the responsibility/risk if they want; don't just rigidly shut the door to even the possibility
- surprising
- member visibility: make it private unless you have a good reason not to
- not:
- please elaborate
- can't predict the future
- annotation meta: may need new tag
- inextensible
- software development
- failure of imagination
- +0.9
- don't be so rigid
- not extensible enough
- you can't know for sure
- never say never
- extensibility
- good point
- rigidness/inflexibility
- rule of thumb
- bad advice
Annotators
URL
-
- Mar 2023
-
stackoverflow.com stackoverflow.com
-
Just because the code is described as part of the WebDAV spec doesn't mean it's WebDAV-specific! Status codes are supposed to be generic.
-
-
blog.cmpxchg8b.com blog.cmpxchg8b.com
-
I believe that SMS 2FA is wholly ineffective, and advocating for it is harmful.
Would this also appyl to OTP by e-mail??
-
This argument only works if what you’re defending is good. As I’ve already explained, SMS-2FA is not good.
-
Don’t let the perfect be the enemy of the good. Seat belts aren’t perfect either, do you argue we shouldn’t wear them? Etc, etc. This argument only works if what you’re defending is good. As I’ve already explained, SMS-2FA is not good.
-
If you use a third party password manager, you might not realize that modern browsers have password management built in with a beautiful UX. Frankly, it’s harder to not use it.
-
If you’re a security conscious user... You don’t need SMS-2FA. You can use unique passwords, this makes you immune to credential stuffing and reduces the impact of phishing. If you use the password manager built in to modern browsers, it can effectively eliminate phishing as well.
not needed: password manager: 3rd-party
-
- Feb 2023
-
stackoverflow.com stackoverflow.com
-
Result of lots of searching on net is that pre-checkout hook in git is not implemented yet. The reason can be: There is no practical use. I do have a case It can be achieved by any other means. Please tell me how? Its too difficult to implement. I don't think this is a valid reason
-
- Nov 2022
-
www.oauth.com www.oauth.com
-
You might notice that the “expires_in” property refers to the access token, not the refresh token. The expiration time of the refresh token is intentionally never communicated to the client. This is because the client has no actionable steps it can take even if it were able to know when the refresh token would expire.
-
-
learn.microsoft.com learn.microsoft.com
-
Glyph 0 must be assigned to a .notdef glyph. The .notdef glyph is very important for providing the user feedback that a glyph is not found in the font. This glyph should not be left without an outline as the user will only see what looks like a space if a glyph is missing and not be aware of the active font’s limitation.
-
- Oct 2022
-
stackoverflow.com stackoverflow.com
-
The problem is that the caller may write yield instead of block.call. The code I have given is possible caller's code. Extended method definition in my library can be simplified to my code above. Client provides block passed to define_method (body of a method), so he/she can write there anything. Especially yield. I can write in documentation that yield simply does not work, but I am trying to avoid that, and make my library 100% compatible with Ruby (alow to use any language syntax, not only a subset).
An understandable concern/desire: compatibility
Added new tag for this: allowing full syntax to be used, not just subset
-
-
github.com github.com
-
But this sounds like spreading fear and doubt when the Ruby parser has no such concepts :) {} always binds tightly to the call right next to it. This block {} will never go to using, unless it's rewritten as do ... end.
-
- Sep 2022
-
metalblueberry.github.io metalblueberry.github.io
-
Code explains what and how Documentation explains why.
-
- Aug 2022
-
stackoverflow.com stackoverflow.com
-
When we have our git rev-parse examine our Git repository to view our origin/HEAD, what we see is whatever we have stored in this origin/HEAD. That need not match what is in their HEAD at this time. It might match! It might not.
-
- Jul 2022
-
avdi.codes avdi.codes
-
github.com github.com
-
Stop autoclosing of PRs While the idea of cleaning up the the PRs list by nudging reviewers with the stale message and closing PRs that didn't got a review in time cloud work for the maintainers, in practice it discourages contributors to submit contributions. Keeping PRs open and not providing feedback also doesn't help with contributors motivation, so while I'm disabling this feature of the bot we still need to come up with a process that will help us to keep the number of PRs in check, but celebrate the work contributors already did instead of ignoring it, or dismissing in the form of a "stale" alerts, and automatically closing PRs.
Yes!! Thank you!!
typo: cloud work -> could work
-
- Feb 2022
-
github.com github.com
-
Even though not all code smells indicate real problems (think fluent interfaces)
-
- Sep 2021
-
-
Webpacker used to configure Webpack indirectly, which lead to a complicated secondary configuration process. This was done in order to provide default configurations for the most popular frameworks, but ended up creating more complexity than it cured. So now Webpacker delegates all configuration directly to Webpack's default configuration setup.
more trouble than it's worth
- creating more complexity than it cured
Tags
- complicated
- removing feature that is more trouble than it's worth (not worth the effort to continue to maintain / fix bugs caused by keeping it)
- more trouble than it's worth
- doing more harm than good
- Why can't this be easier/simpler? Why does it have to be so hard/complicated?
- modern javascript development is complicated
- changed their mind/opinion
- too complicated
- too hard/complicated/non-trivial
- newer/better ways of doing things
Annotators
URL
-
- Jun 2021
-
docs.gitlab.com docs.gitlab.com
-
When mocking is deemed profitable:
-
- Apr 2021
-
meta.stackexchange.com meta.stackexchange.com
-
We also know people need a good sized group and time to see the impact and value of a platform like Stack Overflow for Teams. Our previous 30 day free trial of our Basic tier wasn’t long enough. Now, Stack Overflow for Teams has a free tier for up to 50 users, forever.
-
-
store.steampowered.com store.steampowered.com
-
Secondly, the difficulty ramps up very quickly - once I'd got a handle on things and started getting in to it, it threw me off that the Novice level 7 is just WAY TOO HARD - it's not a game centered on difficulty so it's not like that's an excuse, nor is this a later on level where you'd except difficulty, but having just 15 seconds to do that lap, that needs to be changed to 20 at least!
-
- Mar 2021
-
gitlab.gnome.org gitlab.gnome.org
-
Sorry you’re surprised. Issues are filed at about a rate of 1 per day against GLib. Merge requests at a rate of about 1 per 2 days. Each issue or merge request takes a minimum of about 30 minutes (across at least 2 people) to analyse, put together a fix, test it, review it, fix it, review it and merge it. I’d estimate the average is closer to 3 hours than 30 minutes. Even at the fastest rate, it would take 3 working months to clear the backlog of ~1000 issues. I get a small proportion of my working time to spend on GLib (not full time).
-
-
www.sitepoint.com www.sitepoint.com
-
As to opinions about the shortcomings of the language itself, or the standard run-times, it’s important to realize that every developer has a different background, different experience, different needs, temperament, values, and a slew of other cultural motivations and concerns — individual opinions will always be largely personal and, to some degree, non-technical in nature.
Tags
- reaction / reacting to
- annotation meta: may need new tag
- +0.9
- software project created to address shortcomings in another project
- JavaScript
- software preferences are personal
- everyone has different background/culture/experience
- good point
- non-technical reasons
- runtime environment
- what is important/necessary for one person may not be for another
- everyone has different preferences
Annotators
URL
-
-
github.com github.com
-
Sure, you have a few extra newlines and semicolons, but the minifier will remove them anyway so no harm.
-
- Feb 2021
-
2019.trailblazer.to 2019.trailblazer.to
-
note that TRB source code modifications are not proprietary
In other words, you can build on this software in your proprietary software but can't change the Trailblazer source unless you're willing to contribute it back.
loophole: I wonder if this will actually just push people to move their code -- which at the core is/would be a direction modification to the source code - out to a separate module. That's so easy to do with Ruby, so this restriction hardly seems like it would have any effect on encouraging contributions.
Tags
- open-source software: not contributing new code back to project
- annotation meta: may need new tag
- neutral/dispassionate/impartial/objective wording
- LGPL
- loophole/escape hatch
- software licensing
- good point
- wording designed to be more palatable/pleasing/inoffensive
- well-written
- reminder
- proprietary software
Annotators
URL
-
-
softwareengineering.stackexchange.com softwareengineering.stackexchange.com
-
The more important point comes from a program design perspective. Here, "programming to an interface" means focusing your design on what the code is doing, not how it does it. This is a vital distinction that pushes your design towards correctness and flexibility.
-
-
-
It makes me happy to see people actually think about things and not just accept a shitty API.
Tags
- "makes me happy when ..."
- don't settle for/accept something that's not as good as it can be
- can we do even better?
- doing something without knowing why/how it works
- intentional/well-considered decisions
- describe the ideal hypothetical solution
- actually consider / think about how it _should_ (ideally) be
- less than ideal / not optimal
Annotators
URL
-
- Jan 2021
-
discourse.ubuntu.com discourse.ubuntu.com
-
The best place to let the developers know, and track those bugs is in the bug tracker. There are hundreds of forums online, all over the place in many languages. We can’t be expected to read all of them. Anyone with a launchpad ID (thus, anyone who has an account on this discourse instance) has the capability to file a bug. I’d strongly recommend doing so, for each specific issue. Taking just a few minutes to do that will help tremendously.
-
-
www.alfiekohn.org www.alfiekohn.org
-
They may skim books for what they’ll “need to know.” They’re less likely to wonder, say, “How can we be sure that’s true?” than to ask “Is this going to be on the test?”
This is completely true! As a student we honestly do not care about anything, as long as our grade is an A. I hate that it is true, because sometimes as a student, I just want to really learn for a second. Although it is nearly impossible when pressured is applied based on a letter grade that may or may not affect one's life. This class is really helping realize that it is not me, is that pressure kills the beauty of learning.
-
-
css-tricks.com css-tricks.com
-
One lesser-appreciated user-behaviour is when a user would like to choose an alternative download location. On a download link, your user can right-click -> “save link as…” and place the download directly into a folder of their choice. Handy if you want something to go directly to removable media, for example. On a download button, there’s no such option.
-
- Nov 2020
-
www.reddit.com www.reddit.com
-
Svelte by itself is great, but doing a complete PWA (with service workers, etc) that runs and scales on multiple devices with high quality app-like UI controls quickly gets complex. Flutter just provides much better tooling for that out of the box IMO. You are not molding a website into an app, you are just building an app. If I was building a relatively simple web app that is only meant to run on the web, then I might still prefer Svelte in some cases.
-
-
stackoverflow.com stackoverflow.com
-
Never use x && y || z when y can return a non-zero exit status.
-
- Oct 2020
-
final-form.org final-form.org
-
Wondering how to get field state from multiple fields at once? People coming from Redux-Form might be wondering where the equivalent of Redux Form's Fields component is, as a way to get state from several fields at once. The answer is that it's not included in the library because it's so easy to write one recursively composing Field components together.
-
-
humanwhocodes.com humanwhocodes.com
-
Once again, this isn’t good or bad, it’s just the most efficient way to create something that is similar to something else
-
This isn’t to say that multiplying code is good or bad – it’s a characteristic of all code regardless of quality.
-
For years, I’ve shared with friends and clients what I call the bunny theory of code. The theory is that code multiplies when you’re not looking, not unlike bunnies that tend to multiply when you’re not looking.
Tags
- inevitable
- when you're not looking
- inherent to all
- better/superior solution/way to do something
- most efficient way
- not necessarily good or bad
- time wasters
- characteristic/property/attribute/feature
- applicable
- good analogy
- funny
- inherent
- analogy
- avoid extra/needless work
- duplication
- bunny theory of code
- duplication of work/effort
- prolific
- ubiquity
Annotators
URL
-
-
-
Of all the compile-to-languages, the one that strikes me as having the least merit is JSX. It's basically a ton of added complexity for the sake of what boils down to syntax. There are no real gains in terms of language semantics in JSX.
-
I agree that "it feels gross" is a bad reason. "not paving a bad cowpath" is a much better reason.
-
-
leiss.ca leiss.ca
-
Good risk management is inherently simple; adding too many complexities increases the likelihood of overlooking the obvious.
-
-
facebook.github.io facebook.github.io
-
Why not Template Literals?
-
-
medium.com medium.com
-
Moreover, React team even removed the “highlight updates” feature from dev tools because people used to obsessively haunt wasted renders with no reasoning behind it
-
- Sep 2020
-
codingwithspike.wordpress.com codingwithspike.wordpress.com
-
To make this “if you install me, you better also install X, Y, and Z!” problem easier, peerDependencies was introduced.
-
- May 2020
-
gitlab.com gitlab.com
-
Just to make this clear, I'm on the side that adding strict rules doesn't necessarily improve a situation. Especially with something that is subjective like a commit message.
-
- Mar 2020
-
searchengineland.com searchengineland.com
-
the feature was dropped to “lack of use.”
I don't find the reason "lack of use" sufficient in its own right. (I personally didn't use this feature.) People might not use it because they don't know about. And those that do use may find it extremely useful; it's not their fault if others don't know about it or use. It seems to discriminate a bit against the minority who may use a useful feature. They would rather be in the majority, safe from having one of their favorite features removed.
But I do understand and appreciate the good explanation given below.
-
- Sep 2019
-
github.com github.com
-
I just don't feel like doing the change.
-
- Jun 2016
-
scafe.oucreate.com scafe.oucreate.com
-
One was that they were .inspired by fear, the other that they were inextricably confused with defilement and hygiene.
-