58 Matching Annotations
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
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.
-
- Nov 2022
-
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.
-
- Aug 2022
-
medium.com medium.com
-
I recommend using the term “parallel” when the simultaneous execution is assured or expected, and to use the term “concurrent” when it is uncertain or irrelevant if simultaneous execution will be employed.
-
- Jul 2022
-
store.steampowered.com store.steampowered.com
-
Patrician IV is an overhauling upgrade to Patrician III; so if you have not played the previous games in the Patrician series, starting with IV is really all you need. Also, the game of Patrician is very straightforward and addicting, so playing previous versions won't offer you anything unseen in Patrician IV.
-
- Dec 2021
-
github.com github.com
-
Just FYI, there is a nice way to "expect a change" in RSpec. You don't have to use it, what you have is fine, just thought I'd share. expect { widget.paper_trail.update_columns(name: "Bugle") }.to(change { widget.versions.length }).from(1).to(2)
-
-
stackoverflow.com stackoverflow.com
-
For what it's worth, accessing attributes with [] is not the same as using send. The latter will call the accessor method, which is what you want 99/100.
-
- Nov 2021
-
developer.mozilla.org developer.mozilla.org
-
When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all.
-
- Sep 2021
-
www.amazon.com www.amazon.com
-
These thing can save you literally thousands of dollars associated with repair of water damage. I have installed one under every sink, dishwasher, behind every toilet, washing machine and refrigerator (ice maker water supply). Essentially, any place where there is a water supply to a faucet or appliance.
-
-
github.com github.com
-
It is advised to inline any css @import in component's style tag before it hits css-loader. This ensures equal css behavior when using HMR with emitCss: false and production.
-
-
www.reddit.com www.reddit.com
-
Look at local job ads and see what they want.
-
- Jun 2021
-
github.com github.com
-
There's no official Chrome or Chromium package for Linux don't install it this way because it's either outdated or unofficial, both are bad. Download it from official source.
-
-
www.mutuallyhuman.com www.mutuallyhuman.com
-
The problem domain and the data involved in this project was complicated enough. We decided that not having to worry about unknowns with the frontend end-to-end testing stack helped mitigate risk. This isn’t to say you should always going with the tool you know, but in this instance we felt it was the right choice.
-
There are times to stretch individually and as a team, but there are also times to take advantage of what you already know.
-
-
docs.gitlab.com docs.gitlab.com
-
When mocking is deemed profitable:
-
The most important guideline to give is the following: Write clean unit tests if there is actual value in testing a complex piece of logic in isolation to prevent it from breaking in the future Otherwise, try to write your specs as close to the user’s flow as possible
Tags
- testing: what is worth testing?
- quotable
- testing: unit tests
- only do it if it makes sense/is worth it (may be sometimes but not always worthwhile)
- just because you can doesn't mean you should
- do pros outweigh/cover cons?
- rule of thumb
- guidelines
- testing: tests should resemble the way your software is used
- is it worth it?
- pragmatic
- reasonable compromise
- end-to-end testing
- good advice
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Programmers should be encouraged to understand what is correct, why it is correct, and then propagate.
new tag?:
- understand why it is correct
Tags
- quotable
- spreading/propagating good ideas
- programming: understand the language, don't fear it
- programming languages: learning/understanding the subtleties
- having a deep understanding of something
- annotation meta: may need new tag
- combating widespread incorrectness/misconception by consistently doing it correctly
- good advice
Annotators
URL
-
-
-
I've been thinking more about how to best do this. The preferred way might be to use the same domain and have an application load balancer like nginx split traffic on the URL path (e.g. /api). This is for two reasons. Firstly, you might not necessarily want to cookie the primary/apex domain and have the cookie shared across all subdomains. You also might not want to do CORS because preflight requests add latency and CORS adds complication.
-
- May 2021
-
gist.github.com gist.github.com
-
Budget your time. MTH 124 is a 5-credit course with no meetings, so you will need to plan on spending about 15-20 hours per week doing mindful work. That’s 3-4 hours per weekday if you choose not to work on weekends. If you are taking other courses or have job of family responsibilities, you’ll need to think about where to put these hours in your daily and weekly schedules. In my experience, the #1 reason students don’t succeed in online courses is overcommitment and not managing time well.
-
-
interpersonal.stackexchange.com interpersonal.stackexchange.com
-
Feel free to hint, brag, or both! The best CS reps should easily take a hint from clear language and a signature like John Appleseed, JavaScript/Ruby Developer, but any will catch on with a simple line like "I know what I'm doing, so I'd appreciate an extra-technical explanation!"
-
If the person answering the call misses something, nothing prevents them from asking you to repeat something. I think the key point that should be added to this answer is to not sound or act annoyed if the support tech asks for something you've already rattled off. To accept that you gave them a whole bunch of information at once, and that they might legitimately have missed or forgot one bit of it. Or, especially if you know the order in which they ask these questions, to take it slower; don't say it all in five seconds, take half a minute. Give them time to click!
-
So, +1 for play ball. Level 1 is supposed to filter out all simple issues (and once upon a time, you'll have forgotten something, happens to all of us), and they are not supposed to be creative. They get a script that has been refined over and over. Learn the scripts, prepare the answers, and you'll get to Level 2 more quickly than with any other method.
-
So my best advice if you need to stick with them is just to expect the treatment you have become used to and 'play along'. Actually, I find some things often run smoother when you act dumber than you are.
-
-
htmlpreview.github.io htmlpreview.github.io
-
Also, it is definitely NOT okay to recommend --force on forums, Q&A sites, or in emails to other users without first carefully explaining that --force means putting your repositories’ data at risk. I am especially bothered by people who suggest the flag when it clearly is NOT needed; they are needlessly putting other peoples' data at risk.
-
- Apr 2021
-
www.mailpoet.com www.mailpoet.com
-
Don’t replace words with emojis One thing you definitely don’t want to do is have your emojis get in the way of people being able to comprehend your subject lines. Emojis should be a complement to the words in your subject lines – they should never replace words themselves. It’s when people leave out words, right?
-
-
unix.stackexchange.com unix.stackexchange.com
-
If a program receives file names as arguments, don't join them with spaces. Use "$@" to access them one by one.
-
- Feb 2021
-
www.metacritic.com www.metacritic.com
-
It seems like such a beautiful little visual novel and while I wasn’t expecting a masterpiece of localisation based on its low price, I was expecting to be able to read it. But that just cannot be done. Developers from Japan, China, Taiwan, Indonesia, and every other emerging game development centre through Asia-Pacific, listen to me carefully: You can have the most beautiful aesthetics and a heartwarming concept for your game. If the localisation isn’t going to be good, though, do not bother with an English release, because it is going to get reviews like this one. Make “invest in proper translation” your big resolution for 2021. I do not want to play any other games like Lily in the Hollow - Resurrection ever again.
-
-
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.
-
-
www.reddit.com www.reddit.com
-
Think about how much you want to customize the desktop environment(DE), and whether you know how to do so. Pick a distro that has the DE you like.
-
-
stackoverflow.com stackoverflow.com
-
If you're creating an actual, informational web page, stick to frameless HTML, CSS and unobstrusive JavaScripts and keep in mind that the page should still be usable with scripting disabled.
-
- Jan 2021
-
unix.stackexchange.com unix.stackexchange.com
-
For the future, you should: Install LTS (Long-term support) versions as they have an 8-year life span (with Extended Security Maintenance) or 5 years without. The current LTS version is Ubuntu 18.04.1 LTS Bionic Beaver released on July 26, 2018 with an EOL in April 2023. OR Carefully watch the EOL of the interim / development releases and upgrade frequently.
-
-
material.io material.ioDialogs1
-
Avoid apologies (“Sorry for the interruption”), alarm (“Warning!”), or ambiguity (“Are you sure?”)
-
- Nov 2020
-
uxdesign.cc uxdesign.cc
-
You should always take the line hight of the font you are using and add a unit to it. For example: “My button’s label has a line height of 20px and vertical padding of 8px”.
-
Choose sentence case or title case over uppercase. (This being said, Material Design does use buttons with uppercase labels.)
-
-
-
Addition; Please add this variables to environment if you don’t want to change code. This is a better option. Add RAILS_ENV=production , NODE_ENV=production, RAKE_ENV=production
-
-
webpack.js.org webpack.js.orgConcepts1
-
By default the current directory is used, but it's recommended to pass a value in your configuration. This makes your configuration independent from CWD (current working directory).
-
-
serverfault.com serverfault.com
-
You may not want to go straight to that number and cause the kernel to allocate memory to track a million user file watch slots; instead, just take the current value and double it until the problem stops occurring.
-
-
github.com github.com
-
obviously it's too late, but it's a good practice to keep the 3rd party dependencies mirrored in your own infrastructure :) There is NO GUARANTEE that even a huge site (like launchpad for downloading DEBs) won't go down over a period of time.
-
-
github.com github.com
-
Avoid transpilers like Babel and Bublé (and if you're using TypeScript, target a modern version of JavaScript)
-
Don't create instances of things on initial evaluation — instantiate lazily, when the functions you export are called
-
- Oct 2020
- Aug 2020
-
material.io material.ioDialogs1
-
Dialogs are purposefully interruptive, so they should be used sparingly.
Tags
Annotators
URL
-
- Jul 2020
-
gist.github.com gist.github.com
-
See https://choosealicense.com/ for tl;dr Please, please add a license. The fact none is listed makes using this software a legal quagmire. Currently it is not legal to use this code or its derivatives in any useful software. I may be mistaken but hopefully this is not the intended effect. Currently no license is mentioned anywhere, what makes this code fully copyrighted, like any other creative work. It limits usefulness of this project - and I hope that it is unintentional. For example it seems that it would solve my problem of profiling hilariously slow rspec tests (2036.33 seconds ./spec/word_processor_spec.rb:43), in current situation I would be unable to legally publish project that would use this solution. Obviously, please do not release it under any license if you are not the author (that would be even worse legal quagmire)
-
-
docs.gitlab.com docs.gitlab.com
-
Once a test is in quarantine, there are 3 choices: Should the test be fixed (i.e. get rid of its flakiness)? Should the test be moved to a lower level of testing? Should the test be removed entirely (e.g. because there’s already a lower-level test, or it’s duplicating another same-level test, or it’s testing too much etc.)?
-
Quarantined tests are run on the CI in dedicated jobs that are allowed to fail
-
- Mar 2020
-
ruby-doc.org ruby-doc.org
-
It is recommended that a library should have one subclass of StandardError or RuntimeError and have specific exception types inherit from it. This allows the user to rescue a generic exception type to catch all exceptions the library may raise even if future versions of the library add new exception subclasses.
-
-
-
Also, make sure your client will handle an unexpected response. Don’t assume that the comment-check API will always return either true or false. An invalid request may result in an error response; additional information will usually be available in HTTP headers. And of course, a connectivity problem may result in no response at all. It’s important not to misinterpret an invalid response as meaning spam or ham.
-
-
thepugautomatic.com thepugautomatic.com
-
Then there’s markup inside each paragraph, like links and such. You could do it right in the translation strings, but your translator then needs to know how to handle the markup, and you risk duplicating knowledge if you go as far as to hard-code link URLs. What I do is split up the translations, but keep them under the same key: en.yml1 2 3 4 log_in_or_sign_up: text: "%{log_in} or %{sign_up} to do stuff." log_in: "Log in" sign_up: "Sign up" header.erb1 2 3 4 5 <%= t( :'log_in_or_sign_up.text', log_in: link_to(t(:'log_in_or_sign_up.log_in'), login_path), sign_up: link_to(t(:'log_in_or_sign_up.sign_up'), signup_path) ) %> This way, the translator sees no code or markup (except for the i18n interpolation syntax) and there is no duplication.
-
You probably don’t want one translation key per sentence, though. It’s helpful for the translator to have context rather than a lot of short strings, and less fiddly on your part.
-
-
developer.wordpress.org developer.wordpress.org
-
If you have more than one placeholder in a string, it is recommended that you use argument swapping. In this case, single quotes (') are mandatory : double quotes (") will tell php to interpret the $s as the s variable, which is not what we want.
-
-
www.gnu.org www.gnu.org
-
Translatable strings should be limited to one paragraph; don’t let a single message be longer than ten lines. The reason is that when the translatable string changes, the translator is faced with the task of updating the entire translated string. Maybe only a single word will have changed in the English string, but the translator doesn’t see that (with the current translation tools), therefore she has to proofread the entire message.
-
- Feb 2020
-
docs.k6.io docs.k6.io
-
Do Browse like a user wouldTake natural pauses that users would take to consume page contentFocus on the most common use cases, rather than all the possible use casesTake note of pages where forms/logins occur, you will likely need to complete some scripting there
-
-
loadimpact.com loadimpact.com
-
But, let’s be pragmatic for a second, the 80/20 rule states that you get 80% of the value from 20% of the work and a couple of simple tests are vastly better than no tests at all. Start small and simple, make sure you get something out of the testing first, then expand the test suite and add more complexity until you feel that you’ve reached the point where more effort spent on realism will not give enough return on your invested time.
-
-
docs.k6.io docs.k6.iok6/http1
-
Load Testing Manifesto Simple testing is better than no testingLoad testing should be goal orientedLoad testing by developersDeveloper experience is super importantLoad test in a pre-production environment
Tags
Annotators
URL
-
-
www.reddit.com www.reddit.com
-
I was able to use the "Gift to a Friend" link on HB on a game I already owned and was able to generate an email to a friend. They were able to successfully get the game.Seeing that my Steam account is linked to HB, I was more worried about clicking the "Reveal Your Steam Key" and getting hosed that way.
-
-
stackoverflow.com stackoverflow.com
-
It's a good practice to create respond_to_missing? if you are overriding method_missing. That way, the class will tell you the method you are calling exists, even though it's not explicitly declared.
-
In my opinion respond_to_missing? should never return true as default. Instead, it should be something like check_if_method_meet_condition || super . Another thing is that it is usually defined as respond_to_missing(method_name, include_private = false)
-