- Mar 2021
-
www.codetriage.com www.codetriage.com
-
Better yet, send them a link to this page to help them understand why and how to make an example app:
-
If you end up finding and fixing a bug in your code, consider re-reading the documentation and seeing if that behavior of the library is unclear. Consider sending a documentation PR.
-
If you want the issue fixed as fast as possible, then you should try to help the maintainers as much as possible. Make an example app! Even if it takes extra time for you, it will ultimately lead to your issues getting fixed faster.
-
Finally: Give a link to the example app to a maintainer (usually through an issue).
-
An example app is an application that is designed to reproduce a bug or demonstrate an issue.
-
Before a bug can be fixed, it has to be understood and reproduced. For every issue, a maintainer gets, they have to decipher what was supposed to happen and then spend minutes or hours piecing together their reproduction. Usually, they can’t get it right, so they have to ask for clarification. This back-and-forth process takes lots of energy and wastes everyone’s time. Instead, it’s better to provide an example app from the beginning. At the end of the day, would you rather maintainers spend their time making example apps or fixing issues?
Tags
- valuing people's time
- good explanation
- answer the "how?"
- providing an example app (minimal reproducible example)
- help them help you
- wasteful/inefficient use of resources
- avoid wasting maintainers' time so they have more time to work on important things
- opportunity to improve/fix something
- a dedicated page for an issue/convention/recommendation that you can easily link to / share with others
- minimal reproducible example
Annotators
URL
-
-
github.com github.com
-
I don't myself understand what's going on, it clearly has something to do with source maps, but may also have to do with other sprockets changes.
-
sprockets 4 makes Chrome browser identification of SCSS css lines _worse_
-
But maybe few are still using sprockets at all, for JS or (S)CSS anymore? Hard to say.
-
But yeah, I'm not sure how you would determine which was the "recommended way" really. I don't see anything in Rails docs saying either way.
-
But last I have seen comments from DHH, he considered webpack(er) recommended for JS, but Sprockets still the preferred solution for (S)CSS.
-
I don't really understand what's going on. Clearly source maps have something to do with it -- a source map feature that doesn't handle SCSS very well, apparently.
-
If I can't do something to change the sprockets 4 debugging experience I am seeing, I am going to probably downgrade back to sprockets 3. I am finding it impossible to develop CSS the ways I am used to.
-
Is there a PR to... something? sassc-rails? That would make the patch not necessary? (I don't know if there's any good way to monkey-patch that in, I think you have to fork? So some change seems required...) Should the defaults be different somehow? This is very difficult to figure out.
-
I am not sure this whole ecosystem currently has much maintainers unfortunately. :( Pick your reaction
-
Is there a PR to... something? sassc-rails?
-
I'm not sure about all consequences of my change and this is very complex.
-
I agree about lack of maintenance. It's probably because people use more and more Webpack.
-
But I can describe a simple reproduction case to demonstrate the developer inconvenience (can provide a sample app if it's helpful).
Tags
- switching/migrating from Sprockets to Webpack (Rails)
- don't understand even what's going on, let alone how to go about finding/identifying/fixing the problem
- where (which project) do I even report this problem/bug? (whose responsibility is it?)
- difficult/hard problem
- abandoning/migrating away from
- falling out of favor
- made it worse
- unfortunate that this is no longer maintained
- switching/migrating to something different
- shift in preference
- minimal reproducible example
- is anyone even still using it anymore?
- official preferred convention / way to do something
- admit the limitations/shortcomings of your argument/benefits
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- providing an example app (minimal reproducible example)
- sprockets
- webpack
Annotators
URL
-
-
math.stackexchange.com math.stackexchange.com
-
What is the difference between equation and formula?
-
I'd say an equation is anything with an equals sign in it; a formula is an equation of the form A= stuffA= stuffA={\rm\ stuff} where AAA does not appear among the stuff on the right side.
-
I think that over time the distinction is lost. My math teacher, 35 years ago stated "formulas are used in chemistry, in math we have equations". To this day, the word 'formula' in math seems wrong, but I'd accept it's used commonly.
-
An equation is meant to be solved, that is, there are some unknowns. A formula is meant to be evaluated, that is, you replace all variables in it with values and get the value of the formula.
-
The key idea is that the equation captures not just the ingredients of the formula, but also the relationship between the different ingredients.
-
In your case, "mpg = distance/gallons" is best understood as "a formula in the form of an equation", which means that in this instance the two words are interchangeable.
-
An equation is any expression with an equals sign, so your example is by definition an equation. Equations appear frequently in mathematics because mathematicians love to use equal signs. A formula is a set of instructions for creating a desired result. Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
-
-
-
Using these attributes will show validation errors, or limit what the user can enter into an <input>.
-
Rails still encourages you to dump all validation errors at the top of a form, which is lulzy in this age of touchy UX
-
The HTML5 form validation techniques in this post only work on the front end. Someone could turn off JavaScript and still submit jank data to a form with the tightest JS form validation.To be clear, you should still do validation on the server.
-
With these JavaScript techniques, the display of server validation errors could be a lot simpler if you expect most of your users to have JS enabled. For example, Rails still encourages you to dump all validation errors at the top of a form, which is lulzy in this age of touchy UX. But you could do that minimal thing with server errors, then rely on HTML5 validation to provide a good user experience for the vast majority of your users.
-
-
Dave Rupert has a good solution that uses an input's invalid event. Instead of using the :invalid pseudo selector, he adds a CSS class to the input when it becomes invalid. We will extend this approach by removing the CSS class when the element becomes valid again.
-
The input is required and initially empty, so on page load the input is :invalid and border is red. :( :(The input is :invalid until you type a legit email address, so it is red when typing. :( :(Ok, so the :invalid pseudo selector is kind of useless. Ideally we would not show an error up front or the whole time they are typing, just when they submit something unacceptable.
Tags
- old way of doing things
- unfortunate defaults
- unfortunate
- arbitrary limitations leading to less-than-ideal workarounds
- reference
- rails: the Rails way
- HTML: constraint validation
- can we do even better?
- validation: server-side
- see content below
- good enough
- validation: server-side: need it even if you have client-side validation
Annotators
URL
-
-
-
-
Last week, I shared how to check if an input is empty with CSS. Today, let’s talk about the same thing, but with JavaScript.
-
We don’t want to invalidate the input if the user removes all text. They may need a moment to think, but the invalidated state sets off an unnecessary alarm.
-
-
stackoverflow.com stackoverflow.com
-
The valueAsNumber IDL attribute represents the value of the element, interpreted as a number. On getting, if the valueAsNumber attribute does not apply, as defined for the input element's type attribute's current state, then return a Not-a-Number (NaN) value.
-
Your expectations are reasonable considering the property name, but
-
-
stackoverflow.com stackoverflow.com
-
The :empty selector refers only to child nodes, not input values. [value=""] does work; but only for the initial state. This is because a node's value attribute (that CSS sees), is not the same as the node's value property (Changed by the user or DOM javascript, and submitted as form data).
-
If you would like to make “empty” include values that consist of spaces only, you can add the attribute pattern=.*\S.*.
-
You can use the :placeholder-shown pseudo class. Technically a placeholder is required, but you can use a space instead.
-
Semantically this is wrong.
-
There is (currently) no CSS selector for detecting directly whether an input control has a nonempty value, so we need to do it indirectly, as described above.
-
Generally, CSS selectors refer to markup or, in some cases, to element properties as set with scripting (client-side JavaScript), rather than user actions. For example, :empty matches element with empty content in markup; all input elements are unavoidably empty in this sense. The selector [value=""] tests whether the element has the value attribute in markup and has the empty string as its value. And :checked and :indeterminate are similar things. They are not affected by actual user input.
-
The selector [value=""] tests whether the element has the value attribute in markup and has the empty string as its value.
Tags
- good example
- HTML: constraint validation: pattern
- CSS: selectors
- CSS: pseudo class
- important point
- missing feature
- missing feature leading to less-than-ideal workarounds
- HTML
- CSS
- important distinction
- HTML: constraint validation
- good explanation
- semantically correct
- limitations leading to workarounds
- DOM: properties vs. attributes
- not:
Annotators
URL
-
-
feedback.dekudeals.com feedback.dekudeals.com
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
One word for each aspect of this game. Story - N/A.Gameplay - Excellent.Graphics - Minimal.Sound - Splendid.Music - Elegant.Overall - Delightful.
-
-
store.steampowered.com store.steampowered.com
-
If you plan on using a gamepad with big picture mode I made a config that works perfectly so check it out.
-
There are myriads of platformers around, it's an oversaturated market, and just like industrial designer Karim Rashid said about there being no excuse by this point to make an uncomfortable chair, there's no excuse by this point to make a boring patformer.
-
-
css-tricks.com css-tricks.com
-
Positively indicate valid input values Let users know a field has been entered correctly. The browser can give us this information through the :valid CSS selector:
-
-
it does require some CSS trickery to get everything just right
-
Assuming wonderful support, this is how the logic would play out…
-
But there doesn’t appear to be a simple way to test for :placeholder-shown.
-
You can’t use @supports for selectors, only property/values (e.g. @supports (display: flex))
first sighting CSS: @supports
-
We’re not really using placeholder in our demo, but a value of a single space works:
-
:placeholder-shown is super useful for us here! It’s basically the secret selector for testing if an input currently has a value or not.
-
You’d think :empty would be it, but it’s not. That’s for matching things like <p></p>… container elements with nothing inside them. Inputs are no-content elements already.
-
Sub trick!
-
You don’t need to do any tricky cursor stuff, because it’s all semantically wired up already.
-
always use real <label for="correct_input"> elements. Just that alone is a UX consideration all too many forms fail on
-
Placeholders are suggestions for valid input, like putting “Tulsa” in an input labeled “City”.
-
I’d say if the form is short and an obvious pattern (like sign up or log in), you could use the placeholder visual pattern, but use real labels instead.
-
If they click the area taken up by the label, it will activate the input. If they click the input, it will activate the input. Both correct.
-
You can do and impressive amount of form validation with just HTML attributes. You can make the user experience pretty clean and clear with CSS selectors.
Tags
- easy to confuse (mix up)
- form design: validation error display
- trickery
- forms
- CSS: @supports
- missing feature
- explanation
- advantages/merits/pros
- CSS
- UI: labels
- definition
- form design: validation feedback
- subitem/subcase/subcategory/subheading
- first sighting
- distinction
- clever
- fun wording
- tricky
- taken to its logical conclusion
- easy to falsely assume
- how to do it correctly and avoid common mistakes/pitfalls
- semantic markup
- semantically correct
- best practices
- clever solution
- HTML: label
- recommended option/alternative
- limitations leading to workarounds
- tutorial
- feature detection
- excellent technical writing
- it's just plain/pure HTML/CSS
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
When you code in a semantic way, you basically give meaning to the data you're describing.
-
Usually when people are talking about code being semantically correct, they're referring to the code that accurately describes something.
-
HTML elements have meaning. "Semantically correct" means that your elements mean what they are supposed to.
-
Semantically correct usage of elements means that you use them for what they are meant to be used for.
-
It means that you're calling something what it actually is.
-
Another example: a list (<ul> or <ol>) should generally be used to group similar items (<li>). You could use a div for the group and a <span> for each item, and style each span to be on a separate line with a bullet point, and it might look the way you want. But "this is a list" conveys more information.
-
The classic example is that if something is a table, it should contain rows and columns of data. To use that for layout is semantically incorrect - you're saying "this is a table" when it's not.
-
Browsers can correctly apply your CSS (Cascading Style Sheets), describing how each type of content should look. You can offer alternative styles, or users can use their own; as long as you've labeled your elements semantically, rules like "I want headlines to be huge" will be usable.
-
Screen readers for the blind can help them fill out a form more easily if the logical sections are broken into fieldsets with one legend for each one. A blind user can hear the legend text and decide, "oh, I can skip this section," just as a sighted user might do by reading it.
-
Mobile phones can switch to a numeric keyboard when they see a form input of type="tel" (for telephone numbers).
-
Knowing what your elements are lets browsers use sensible defaults for how they should look and behave. This means you have less customization work to do and are more likely to get consistent results in different browsers.
-
All of this semantic labeling helps machines parse your content, which helps users.
-
-
Fits the ideal behind HTML HTML stands for "HyperText Markup Language"; its purpose is to mark up, or label, your content. The more accurately you mark it up, the better. New elements are being introduced in HTML5 to more accurately label common web page parts, such as headers and footers.
-
Yes, but honestly, and no offense intended, but I don't see the harm in these type questions, nor why some people are offended when they are asked. If I owed a website, I wouldn't mind it because it just creates more pages that can be indexed. I see it as helping the website. But, I did look and didn't see a simple answer. Again, no offense is intended. I've just never understood the complaints.
Tags
- good example
- politeness
- consistency across all platforms
- calling something what it actually is (semantic labeling)
- use meaningful names (programming)
- simple explanation
- advantages/merits/pros
- definition
- what's wrong with _?
- good point
- fundamental principles/paradigm of the Web
- reasonable defaults
- explicit meaning
- be specific
- semantic meaning
- duplicate question/issue/post
- example
- why are people bothered/offended by this?
- good explanation
- semantically correct
- web: accessibility
- semantic markup
- explanation
- conveys more information (semantic)
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Currently, there is no way to style those little validation tooltips.
-
-
tylergaw.com tylergaw.com
-
Brass tacks:
-
Demos; Style 01, Style 02, Style 03 and the code.
-
-
tylergaw.com tylergaw.com
-
The source for all versions is available on GitHub.
-
My collection (this isn’t all of it) grows at a comical pace.
-
Having them in a physical form is good for my soul.
-
This is a non-exhaustive list of other things I love;
-
Spending an hour digging through bins in a record store is one of my favorite ways to clear my head. And then spend too much money.
-
Designing and writing code get me money so I can have food so they get a lot of my attention.
-
I get asked a lot which I want to do more; design or write code? I answer, “yes.”
-
Being a better designer makes me a better engineer and being a better engineer makes me a better designer.
-
;
:
-
;
:
-
There are plenty of words and acronyms you can put in front of “Designer”. Product, Web, Graphic, UX, UI, IA, etc. The lines between each are blurry, and the titles go in and out of fashion. Depending on the project and team I’m working alongside, I practice them all to varying degrees. I prefer to call myself; “A Designer.”
-
Tags
- design (general)
- mutually exclusive
- preferring to have them in physical form (books, …)
- fun wording
- "what I like to do"
- not:
- bio
- funny
- typo
- finding time for what you love doing
- collecting
- transparency
- source repository for personal web site
- "what I like"
- collecting more books/etc. than you will ever be able to read/etc.
Annotators
URL
-
-
bugs.chromium.org bugs.chromium.org
-
This is a huge disadvantage to all web developers. Why can't we at least have the ability to turn validation messages off? Why do we have to re-implement a validation system when you already have one in place, but all we want is the validation aspect and not the built in messaging? By taking away the ability to style elements that CHROME adds to the browser window, it is hurting developers professional appearance. We just want to use Chrome's WONDERFUL validation system with our own error messages. Either let us style them, or let us hide them, but don't make us re-invent the wheel just because you don't want our code to be "browser specific". Writing a new validation system just for Chrome is going to be much more "browser (chrome) specific" code than setting "::-webkit-validation-bubble, ::-webkit-validation-bubble * { display: none; }. This isn't just an annoyance, it's a huge disadvantage to any developer who wants to easily utilize Chrome's built in validation. I usually brag about how wonderful Chrome is, but I'm starting to think it's heading in another direction...
-
-
-
-
-
girliemac.com girliemac.com
-
the client form validation is the one I like a lot, because, for example, by adding required attribute to an input, I don’t need to write any additional JavaScript to warn a user, when the user submits a form without filling out the required fields
-
There are numerous user interface state pseudo-classes. You’ve probably already known :hover, :active etc. According to this W3C Candidate Doc, there are additional pseudo-classes defined, such as :valid, invalid, in-range, out-of-range, required, optional, read-only and read-write.
-
-
www.the-art-of-web.com www.the-art-of-web.com
-
Website: <input type="url" name="website" required pattern="https?://.+"> Now our input box will only accept text starting with http:// or https:// and at least one additional character
-
-
stackoverflow.com stackoverflow.com
-
The document.evaluate() method evaluates an XPATH query/expression. So you can pass XPATH expressions there, traverse into the HTML document and locate the desired element.
-
Array.from(document.querySelectorAll('div')) .find(el => el.textContent === 'SomeText, text continues.');
-
-
stackoverflow.com stackoverflow.com
-
The TreeWalker API gives you only the #text Nodes, and then you do what you want with them.
first sighting: TreeWalker 
-
You could also use the NodeIterator API, but TreeWalker is faster
-
All those 'modern' and 'super-modern' querySelectorAll("*") need to process all nodes and do string comparisons on every node.
-
the fastest solution because the main workload is done by the Browser Engine NOT the JavaScript Engine
-
[...document.querySelectorAll("*")].filter(e => e.childNodes && [...e.childNodes].find(n => n.nodeValue?.match("❤")))
-
Super modern one-line approach with optional chaining operator
-
Possibly use Array.prototype.filter.call instead of allocating a new array.
-
function contains(selector, text) { var elements = document.querySelectorAll(selector); return [].filter.call(elements, function(element){ return RegExp(text).test(element.textContent); }); }
-
-
developer.mozilla.org developer.mozilla.org
-
stackoverflow.com stackoverflow.com
-
This only works provided each element has a label. It will not work if you put the attribute on the element itself, because <input> elements cannot have :after pseudo elements.
-
label:after { content: attr(data-invalid); ... }
-
This question was asked over a year ago, but it's a good question that I recently encountered as well...
-
var applicationForm = document.getElementById("applicationForm"); if (applicationForm.checkValidity()) { applicationForm.submit(); } else { applicationForm.reportValidity(); }
-
-
webdevtrick.com webdevtrick.com
-
:placeholder-shown
-
-
stackoverflow.com stackoverflow.com
-
Does there exist a Unicode new-line, which I could copy-paste? (PLEASE NOTE, I DON'T ASK ABOUT THE CODE, like U+000D or whatever is considered as new line. I want the "copyable" output, like the above space (which I have put above in brackets and can be copied). So, if there is, please paste it in your answer, so I could copy it, like you copy the unicode space above from brackets.
-
-
www.html5rocks.com www.html5rocks.com
-
-
Therefore client side validation should always be treated as a progressive enhancement to the user experience; all forms should be usable even if client side validation is not present.
-
It's important to remember that even with these new APIs client side validation does not remove the need for server side validation. Malicious users can easily workaround any client side constraints, and, HTTP requests don't have to originate from a browser.
-
Since you have to have server side validation anyways, if you simply have your server side code return reasonable error messages and display them to the end user you have a built in fallback for browsers that don't support any form of client side validation.
-
workaround
-> work around
-
Validating forms has notoriously been a painful development experience. Implementing client side validation in a user friendly, developer friendly, and accessible way is hard. Before HTML5 there was no means of implementing validation natively; therefore, developers have resorted to a variety of JavaScript based solutions.
Tags
- difficult/hard problem
- missing feature leading to less-than-ideal workarounds
- graceful degradation / progressive enhancement
- HTML5
- typo
- good tutorial
- introduction/primer
- HTML: constraint validation
- validation: server-side
- validation: server-side: need it even if you have client-side validation
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
stackoverflow.com stackoverflow.com
-
I used this in the console to find the file and the line of the error (took it from this answer): JS_PATH = "app/assets/javascripts/**/*.js"; Dir[JS_PATH].each do |file_name| puts "\n#{file_name}" puts Uglifier.compile(File.read(file_name)) end
Didn't work for me because it was actually a .coffee file.
So I tried something similar with this:
main > Dir["*/assets/javascripts/**/*.coffee"].each { |file_name| puts "\n#{file_name}"; Sprockets::CoffeeScriptProcessor.(filename: file_name, data: File.read(file_name), cache: {}); } app/assets/javascripts/bootstrapped.js.coffee NoMethodError: undefined method `config' for nil:NilClass from /home/tyler/.gem/ruby/2.7.1/gems/sprockets-4.0.2/lib/sprockets/source_map_utils.rb:40:in `format_source_map'
but it wasn't as trivial to provide the necessary environment that Sprockets wants.
But that's okay, when better_errors paused on the exception, I just jumped to the
block in Sprockets::CoffeeScriptProcessor.call sprockets (4.0.2) lib/sprockets/coffee_script_processor.rb, line 24
frame and evaluated
input[:filename]
to figure out which file had failed.
Obviously this information should be part of the error message itself though!!
-
I know this is old, but I got the same error and I came here from Google, so in case someone does too, this was my solution:
-
-
github.com github.com
-
afarkas.github.io afarkas.github.ioWebshim4
-
If set to true the UI of all input widgets (number, time, month, date, range) are replaced in all browsers (also in browser, which have implemented these types). This is useful, if you want to style the UI in all browsers.
-
Webshim is opinionated, that a developer should always solve a problem the HTML5 way.
-
Webshim is also more than a polyfill, it has become a UI component and widget library. Webshim enables a developer to also enhance HTML5 capable browsers with more highly customizable, extensible and flexible UI components and widgets.
And now that it's deprecated (presumably due to no longer needing these polyfills), not only do the polyfills go away (no longer maintained), but also these unrelated "extras" that some of us may have been depending on are now going away with no replacement ...
If those were in a separate package, then there would have been some chance of the "extras" package being updated to work without the base webshims polyfills.
In particular, I was using
$.webshims.addCustomValidityRule
which adds something that you can't do in plain HTML5 (that I can tell), so it isn't a polyfill... -
-
-
html.spec.whatwg.org html.spec.whatwg.org
-
Fires an invalid event at the element
First time I've seen/heard it said that an event is fired at some target. But it sure makes sense, since it matches how "fire" is used in other senses (like shooting a gun).
-
-
stackoverflow.com stackoverflow.com
-
answered May 9 '13 at 15:29 alexander farkas
-
-
stackoverflow.com stackoverflow.com
-
You can't just use arbitrary pseudo selectors and expect it work. It's like me trying to speak Spanish in Japan and expecting japanese people to understand what I'm saying
-
-
mychartwa.providence.org mychartwa.providence.org
-
We’re doing our part to be more transparent and get data into the hands of patients quicker. Starting October 25, 2020, we’ll be releasing test results, visit notes and summaries immediately. Your provider may take up to three to five days to review your results and contact you to discuss abnormal results. Learn more here.
-
-
github.com github.com
-
markdown-it is the result of the decision of the authors who contributed to 99% of the Remarkable code to move to a project with the same authorship but new leadership (Vitaly and Alex). It's not a fork.
-
var md = require('markdown-it')('commonmark');
first sighting: require(...)(...)
How would that work with import? Not as fluidly but...
import markdownIt from 'markdown-it' let md = markdownIt('commonmark')
-
-
+ adds syntax extensions
-
Configurable syntax! You can add new rules and even replace existing ones.
-
Community-written plugins and other packages on npm.
Tags
- javascript libraries
- interesting approach/solution
- extension API
- forking
- CommonMark
- configurable
- distinction
- first sighting
- change of leadership
- controversial
- Markdown
- open-source software: transferring project to new maintainer
- easily extensible with plugins/extensions
- disagreement
- syntax extensions
- nice API
- competition in open-source software
- not:
Annotators
URL
-
-
code.visualstudio.com code.visualstudio.com
-
runtimes (such as .NET and Unity)
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
-
Starting the Game is a game about a non-experienced gamer who is trying to download, crack and play a game.
-
-
store.steampowered.com store.steampowered.com
-
Playing it now, I realise that the game isn't necessarily any easier - I'm just more patient.
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
i need to write review so i get my badge
-
-
store.steampowered.com store.steampowered.com
-
Posting an issue on the discussion boards for a three year old game, yesterday, I wasn't holding my breath for a reply. Earlier, this morning, a dev. responded, stating they'd look at fixing it, and it was just a few hours before it were sorted!
-
-
boardgamegeek.com boardgamegeek.comDawn1
-
Players try to build a village together. As the game goes on each player secretly chooses whether they want to go for a coop victory or a single-player win.
-
-
boardgamegeek.com boardgamegeek.com
-
Dawn - March 15 Dawn on Titan - March 15
-
-
www.kickstarter.com www.kickstarter.com
-
We often are too busy. We spend our days occupied by a multitude of worries. One day, I realized that my time left in this life was getting shorter and shorter. For the first time, I felt regret and wondered, “Where did my time go?”
-
-
www.kickstarter.com www.kickstarter.com
-
Try before you buy Here's a link to the game on Tabletopia: Judean Hammer on Tabletopia
-
-
stackoverflow.com stackoverflow.com
-
// A general key transform method. Pass it a function that accepts the old key and returns // the new key. // // @example // obj = transformKeys(obj, (key) => ( // key.replace(/\b(big)\b/g, 'little') // )) export function transformKeys(source, f) { return Object.entries(source).reduce((o, [key, value]) => { o[f(key) || key] = value return o }, {}) } // Provide an object that maps from old key to new key export function rekeyObject(source, keyMap) { transformKeys(source, key => keyMap[key]) }
-
function objectMap(source,keyMap) { return Object.entries(keyMap).reduce((o,[key , newKey]) => { o[newKey]=source[key] return o;},{}) }
-
Here's another plain ES2015/2017 version
-
You really don't need underscore/lodash for this ... nowadays anyways
-
I realize the question was asked 9 years ago, but this question is (still) ranked highly in search results and I came across it today
-
-
reedbarger.com reedbarger.com
-
Replacing map / filter with a single reduce
-
-
github.com github.com
-
Recursively transform object keys with a custom key transform strategy
-
-
stackoverflow.com stackoverflow.com
-
not all answers pass this tests
-
function isObject(o) { return o instanceof Object && o.constructor === Object; }
-
An array is from a logical point of view not an object - although JavaScript handles and reports them as such. In practice however, it is not helpful to see them equal, because they are not.
-
In case you need to verify that object is instance of particular class you have to check constructor with your particular class
-
Arrays are definitely objects. Not sure why you think objects can't have a length property nor methods like push, Object.create(Array.prototype) is a trivial counterexample of a non-array object which has these. What makes arrays special is that they are exotic objects with a custom [[DefineOwnProperty]] essential internal method, but they are still objects.
-
arrays are not objects from a logical point of view. I'm speaking about program logic. It is sometimes necessary to check if an array is a "real" array and definitely not an "real" object. That's what Array.isArray() is for. Imagine you have a function which accepts an object or an array of objects.
-
function isObject (item) { return (typeof item === "object" && !Array.isArray(item) && item !== null); }
-
-
What's a primitive?
-
What's an object (i.e. not a primitive)?
-
-
github.com github.com
Tags
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
In production, you will never trigger one specific callback or a particular validation, only. Your application will run all code required to create a Song object, for instance. In Trailblazer, this means running the Song::Create operation, and testing that very operation with all its side-effects.
-
There’s no need to test controllers, models, service objects, etc. in isolation
-
Run the complete unit with a certain input set, and test the side-effects. This differs to the Rails Way™ testing style, where smaller units of code, such as a specific validation or a callback, are tested in complete isolation. While that might look tempting and clean, it will create a test environment that is not identical to what happens in production.
-
Integration tests for controllers: These Smoke tests only test the wiring between controller, operation and presentation layer.
-
Unit tests for operations: They test all edge cases in a nice, fast unit test environment without any HTTP involved.
Tags
- unnecessary
- the Trailblazer way
- testing: avoid testing implementation details
- testing: smoke tests
- testing: tests should resemble the way your software is used
- testing: test the side effects
- isolation (programming)
- testing: avoid unnecessarily testing things in too much isolation, in a different way than the code is actually used (should match production)
- testing: philosohy of testing
- testing: integration tests
- testing: fast test suite
- testing: unit tests
- rails: the Rails way
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
Meta gaming at its finest.
-
Make It Indie! is an indie game about making an indie game.
-
-
www.kickstarter.com www.kickstarter.com
-
www.kickstarter.com www.kickstarter.com
-
She asked me if I could create international universal design Shogi set for foreign Shogi fans.
-
Design SHOGI pieces have been redesigned with new iconography to indicate the piece’s movement.
-
Redesigning the pieces was very difficult work, because traditional pieces have 4 specialties below.
-
Shogi is a classic game. I know many people who want to play Shogi, but the Kanji on the pieces makes it too hard to master. I have designed this Shogi with icons so anybody can learn it easily.
-
If you want to try playing to see how these pieces work in the game, you can playtest it on the Iishogi.org site (https://lishogi.org/). Last year the Iishogi designer asked me to register the Design SHOGI pieces on their site. This Iishogi.org is a free to play Shogi website. I was willing to give them permission to use them. You are free to play and switch pieces design from the piece variation section. If you register your ID, then you can play vs the A.I. easily. You can learn how the Design SHOGI pieces work there.
-
-
boardgamegeek.com boardgamegeek.comShogi1
-
I am only interested in the universal designed Shogi, like https://www.kickstarter.com/projects/logygames/design-shogi
-
-
www.kickstarter.com www.kickstarter.com
-
-
Why Kickstarter? Where else am I going to get the money to manufacture my game? No seriously, if you have a better place I can get this kind of money, please send me a message and I will do that immediately.
-
-
github.com github.com
-
It can also be included as individual modules, i.e. Hashie::Extensions::MethodReader, Hashie::Extensions::MethodWriter and Hashie::Extensions::MethodQuery.
-
The MethodAccess extension allows you to quickly build method-based reading, writing, and querying into your Hash descendant.
-
-
github.com github.com
-
-
Using ::delegates works exactly like the Forwardable module in Ruby, with one bonus: It creates the accessors in a module, allowing you to override and call super in a user module or class.
-
Uber::Option implements the pattern of taking an option, such as a proc, instance method name, or static value, and evaluate it at runtime without knowing the option's implementation.
-
-
github.com github.com
-
supermodel
Tags
Annotators
URL
-
-
guides.rubyonrails.org guides.rubyonrails.org
-
These methods should be used with caution, however, because important business rules and application logic may be kept in callbacks. Bypassing them without understanding the potential implications may lead to invalid data.
-
-
trailblazer.to trailblazer.to
-
Using multiple termini has three magnificent, beautiful advantages.
-
When nesting an activity with multiple outcomes, you can wire each terminus to a different route.
-
It is much easier to track what is going on within the activity. Instead of transporting additional state via ctx, you expose the outcome via an additional end event.
Note: It's only super easy to see what's going on if you have the benefit of a diagram.
-
You may communicate more than a binary outcome of an activity. For instance, a controller endpoint activity could have end events for success and failure, but also for “not authorized”, or “validation failed”. You’re not limited to a binary setup here.
-
we head straight into an additional terminus, or end event as it’s called in BPMN
no
-