364 Matching Annotations
  1. Feb 2021
    1. The sole purpose to add Dev::Trace::Inspector module is to make custom inspection possible and efficient while tracing. For example, ActiveRecord::Relation#inspect makes additional queries to fetch top 10 records and generate the output everytime. To avoid this, Inspector will not call inspect method when it finds such objects (deeply nested anywhere). Instead, it’ll call AR::Relation#to_sql to get plain SQL query which doesn’t make additional queries and is better to understand in tracing output.
    2. Feel free to pick and choose what you need for your applications.
    1. While you could program this little piece of logic and flow yourself using a bunch of Ruby methods along with a considerable amount of ifs and elses, and maybe elsif, if you’re feeling fancy, a Trailblazer activity provides you a simple API for creating such flow without having to write and maintain any control code. It is an abstraction.
    1. So, what can we do to check for None in our programs? You can use builtin Optional type and write a lot of if some is not None: conditions. But, having null checks here and there makes your code unreadable.
    1. Return None. That’s evil too! You either will end up with if something is not None: on almost every line and global pollution of your logic by type-checking conditionals, or will suffer from TypeError every day. Not a pleasant choice.
    1. The bare bones operation without any Trailblazery is implemented in the trailblazer-operation gem and can be used without our stack.
    2. While Trailblazer offers you abstraction layers for all aspects of Ruby On Rails, it does not missionize you. Wherever you want, you may fall back to the "Rails Way" with fat models, monolithic controllers, global helpers, etc. This is not a bad thing, but allows you to step-wise introduce Trailblazer's encapsulation in your app without having to rewrite it.
    3. Only use what you like.
    4. you can pick which layers you want. Trailblazer doesn't impose technical implementations
    1. account.first_name = first_name if first_name.present? account.last_name = last_name if last_name.present?

      I guess this is needed so we don't reset to nil (erasing value in database) when they haven't even provided a new value as input.

      But surely there's a cleaner way...

    1. @adisos if reform-rails will not match, I suggest to use: https://github.com/orgsync/active_interaction I've switched to it after reform-rails as it was not fully detached from the activerecord, code is a bit hacky and complex to modify, and in overall reform not so flexible as active_interaction. It has multiple params as well: https://github.com/orgsync/active_interaction/blob/master/spec/active_interaction/modules/input_processor_spec.rb#L41

      I'm not sure what he meant by:

      fully detached from the activerecord I didn't think it was tied to ActiveRecord.

      But I definitely agree with:

      code is a bit hacky and complex to modify

    1. I do think it's a common pattern that should be solved, and I am probably going to try and solve it as a Gem as opposed to simply writing code that we use in our code base
    2. My only concern with this approach is that if someone calls #valid? on the form object afterwards, it would under the hood currently delete the existing errors on the form object and revalidate. The could have unexpected side effects where the errors added by the models passed in or the service called will be lost.
    3. My concern with this approach is still that it's somewhat brittle with the current implementation of valid? because whilst valid? appears to be a predicate and should have no side effects, this is not the case and could remove the errors applied by one of the steps above.
    4. I find reform's implementation a bit too complicated too (lots of layers of abstraction, including going through the representable gem for a lot of things)
    5. I have developed a simple pattern that copies errors from the model or the service into the form object so that the view can still use those errors
    1. I found the code a little bit complicated. Why to instanciate instance variables in this class instead to do a hash that could be used like this form.models[:first_model]; form.model[:second_model]?
    1. From having the DLC only items be both constantly in your face and the kind of things you should really have access to as a base (medium sized building, most of the decorations etc) to the maps layout being seemingly purposefully made to be agravating, everytme I tried to play and like this game I got spit in the face by the devs
    1. Patreon is a good example of why generic community platforms are not the future. You could certainly say that Patreon is already at the center of content, social, and commerce. But of course, Patreon has for years been getting unbundled into A, B, and C type businesses. The reason for Patreon’s erosion is that its product design is totally unsuitable for all three use cases: it’s a bad brand platform, a bad content platform, and a bad social platform. Patreon is a classic case of what Venkatesh Rao calls “Too Big to Nail,” and businesses that try to follow in its stead will face similar challenges.

      An interesting analysis of why Patreon is doomed to failure.

    1. You use grid-area, so the place for the side nav is allocated at start. If you hide (or even delete) the side nav, that won't change anything about this. You have to do a little trick: Set the width for the first column to 0 and change the grid-gap because otherwise you will have a (not needed) gap at the left.
  2. Jan 2021
    1. Group Rules from the Admins1NO POSTING LINKS INSIDE OF POST - FOR ANY REASONWe've seen way too many groups become a glorified classified ad & members don't like that. We don't want the quality of our group negatively impacted because of endless links everywhere. NO LINKS2NO POST FROM FAN PAGES / ARTICLES / VIDEO LINKSOur mission is to cultivate the highest quality content inside the group. If we allowed videos, fan page shares, & outside websites, our group would turn into spam fest. Original written content only3NO SELF PROMOTION, RECRUITING, OR DM SPAMMINGMembers love our group because it's SAFE. We are very strict on banning members who blatantly self promote their product or services in the group OR secretly private message members to recruit them.4NO POSTING OR UPLOADING VIDEOS OF ANY KINDTo protect the quality of our group & prevent members from being solicited products & services - we don't allow any videos because we can't monitor what's being said word for word. Written post only.

      Wow, that's strict.

    1. So, what I've discovered in a meanwhile. It was an ubuntu-docker issue. Recently I upgraded my ubuntu from 16.04 to 18.04. This change seems to be incompatible with the docker version I had, 1.11.0.
    1. Situation: you have a single line of text in a flex child element. You don’t want that text to wrap, you want it truncated with ellipsis (or fall back to just hiding the overflow). But the worst happens. The unthinkable! The layout breaks and forces the entire flex parent element too wide. Flexbox is supposed to be helping make layout easier!
    1. the bloody mount points. I couldn't believe that when I realised what was going on. I got the wire brush and dettol out and scraped it off my drive. Never, ever again.
    2. Plus, have you seen how many loopback mounting points it creates? "df" becomes very hard to use as it buries your actual drives with it's own. One for the daemon, one for GTK, one for Gnome, one for each of the snaps you have installed....
    3. The strangest "quirk" I had was that I couldn't get the web browser to save a file directly to an attached, encrypted drive. Permissions problem. So I had to save to an interim folder then move it across by hand. Utter pain.
    4. It appears that Canonical is continuing it's vice grip of unliateral, maybe dictatorial control on the development of Snap to the benefit of Ubuntu, but to the detriment of groups like Linuxmint, and all other non-Ubuntu based Linux distributions - like CentOS/Redhat, Suse/openSuSe, Solus, Arch/Manjaro, PCLinuxOS, etc, that are pushing Flatpak as a truly cross-distro application solution that works equally well and non-problematic for all. .
    5. What's wrong here is Canonical trying to position itself as a powerhouse and ascertain control over Linux users.
    6. See also BMW and Tesla owners. If Tesla does become the largest US-based carmaker, many of the buyers will, I'm sure, think of reasons to move onto something else.
    7. If we're not careful, it could become the new 'systemd' problem It probably already is. I don't want to sound too Stallman, but this is the inevitable "company" influence you'll always have. Companies do have their objectives which they will pursue determinedly, since they are not philanthropic (no judgment, just observation). Systemd and Red Hat. Nvidia and their drivers. Google and Android. Apple and iOS. Manufacturers with MS only support. And Canonical also has a history there: the Amazon links, Unity, Mir, and now snap.
    1. What we didn't want it to be was for Canonical to control the distribution of software between distributions and 3rd party editors, to prevent direct distribution from editors, to make it so software worked better in Ubuntu than anywhere else and to make its store a requirement,"
    1. Basically the typescript compiler emits no code for interfaces, so webpack can not find them in the compiled module; except when a module consists of only interfaces. In that case the module will end up completely empty and then webpack will not investigate the exports.
    1. Knowing exactly what happens in your application can mean the difference between feeling in full control or experiencing deep frustration. Personally, unknowns drive me crazy, which in turn often leads to all sorts of experiments and/or debug sessions.
    1. You may find that your application requires a layout that differs slightly from your regular application layout to support one particular controller. Rather than repeating the main layout and editing it, you can accomplish this by using nested layouts (sometimes called sub-templates).
  3. Dec 2020
  4. Nov 2020
    1. If I understand the problem correctly, just changing the imports to point to svelte/internal isn't enough because they could still point to different packages depending on how your components are bundled. It solved your specific issue, but if you had two completely unrelated Svelte components compiled to vanilla javascript bundled with Svelte, you'd still hit issues with mismatching current_component when using slots or callbacks.
    2. It sounds like another case of multiple svelte/internal modules? I think we need to look into reworking how svelte/internal keeps track of the current component since it breaks when mixing components not bundled with the app. It sounds like we need to find a way to pass Svelte's internal runtime state when instantiating components, since slots and callbacks end up mixing different svelte/internal together.
    1. I'm still calling this v1.00 as this is what will be included in the first print run.

      There seems to be an artificial pressure and a false assumption that the version that gets printed and included in the box be the "magic number" 1.00.

      But I think there is absolutely nothing bad or to be ashamed of to have the version number printed in the rule book be 1.47 or even 2.0. (Or, of course, you could just not print it at all.) It's just being transparent/honest about how many versions/revisions you've made. 

    1. A Chrome Extension designed with one intention: Increase the speed and privacy of your web browsing by skipping tracking redirects and removing the tracking parameters from URLs to keep them short and cleaner for sharing, bookmarking, etc.
    1. It is impossible to rebuild the base from the Dockerfile as the 3rd party dependencies have changed significantly since 8 months ago when the base was last built. The tags for my base image have been overwritten and I can only restore them from a descendant image. With Docker 1.8 I simply pulled the descendant image, tagged the base layer and I was done. With Docker 1.10+ I'd need to save, then manually construct the base image descriptor and reload it. Doable but sad that it's far more complex.
    2. Is anything like this possible with the new setup?
    3. Unfortunately, this image was built months ago. No one has the build any more. We are left with a descendant image that has all the original content but on lower layers.
    4. is there a way we can specify for image build layers to be included in the pull?
    5. Sorry, I don't totally know how the internals work, but does there currently exist a workaround? By that I mean, can I pull an image, then run it at a layer other than the top layer? (I basically use this for testing purposes, its certainly possible to build the image myself then do it, but its slightly less convenient)
    1. Don't you hate to repeat yourself? For example, I hate working on anything related to user authentication or authorization that isn't directly related to the system I'm working on. I see it as necessary evil, an accidental complexity.
    1. It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.

      Ignoring official advice

    2. @evilebottnawi Closing the issue because I removed the template looks like excessive bureaucracy.
  5. Oct 2020
    1. To be honest, I'm not sure what networking activity docker-compose is doing directly vs. what the docker daemon is doing.
    1. Focus on your application: forget about forms details like I'm dirty, field touched...
    2. You can try to build a solution to tackle these issues on your own, but it will cost you time and money... why not use a battle-tested solution to handle all this complexity?
    3. If you want to implement a form with a superb User Experience, you have to take care of many variables:
    4. Form validation can get complex (synchronous validations, asynchronous validations, record validations, field validations, internationalization, schemas definitions...). To cope with these challenges we will leverage this into Fonk and Fonk Final Form adaptor for a React Final Form seamless integration.
    5. Managing Form State (holding field information, check if a control has been touched, if the user has clicked the submit button, who owns the current focus...) can be tedious and prone to errors. We can get help from React Final Form to handle these challenges for us.
    1. I don't want Svelte to go out of its way to try to catch all these edge cases. It would require lots of fragile heuristics in the compiler. I want a solid compiler I can trust, not something magic but often out of service. I want it the simplest possible.
    1. Especially when rollup is configured with multiple outputs, I find this particular onwarn to be helpful in reducing warning clutter. It just displays each circular reference once and doesn't repeat the warning for each output:
    2. I think my personal preference would be to see them all at once. Or maybe limit it to up to 10 messages and then list the count of how many more messages were not displayed. Pick your reaction
    3. Another thing we could do to limit output would be to only every show the first circular dependency warning. I think we already do this for other types of warnings. Then you would need to tackle the warnings one-by-one, though.
    4. It looks like your links for "this" and "that" no longer work, and I'd be really curious to see.

      It looks like your links for "this" and "that" no longer work, and I'd be really curious to see.

    1. One of the primary tasks of engineers is to minimize complexity. JSX changes such a fundamental part (syntax and semantics of the language) that the complexity bubbles up to everything it touches. Pretty much every pipeline tool I've had to work with has become far more complex than necessary because of JSX. It affects AST parsers, it affects linters, it affects code coverage, it affects build systems. That tons and tons of additional code that I now need to wade through and mentally parse and ignore whenever I need to debug or want to contribute to a library that adds JSX support.
    2. Furthermore, JSX encourages bad non-dry code. Having seen a lot of JSX over the past few months, its encourages copypasta coding.
    3. However, as a developer that uses JSX, I find it too useful/concise to give up in the name of syntax purity, especially when I know that what it translates to is still very isolated and computationally pure.

      What does "isolated" mean in this case? Is it a different sense than how isolated is usually used in programming context?

      What does "computationally pure" mean? Sounds like a bit of a vague weasel word, but this is an honest question of curiosity and wanting to understand/learn.

    1. Incurring high-cost changes isn't evolutionary design-it's oscillation caused by poor planning and requirements specification on a high cost-of-change component-it tips the anticipation/adaptation balance too far towards adaptation.
    1. I don't think we want the cookbook to become a collection of tutorials regarding how to use certain libraries and tools with svelte. A set of more generic recipes or deep dives into topics would probably serve people better and have broader application.
    1. emphasized the disutility of 1:1 maps and other overly detailed models: "A model which took account of all the variation of reality would be of no more use than a map at the scale of one to one."
    1. Comparison to useReducer
    2. This library is built in TypeScript, and for TypeScript users it offers an additional benefit: one no longer needs to declare action types. The example above, if we were to write it in TypeScript with useReducer, would require the declaration of an Action type: type Action = | { type: 'reset' } | { type: 'increment' } | { type: 'decrement' }; With useMethods the "actions" are implicitly derived from your methods, so you don't need to maintain this extra type artifact.
    1. A new option --proximate=N groups together lines of output that are within N lines of each other in the file. This is useful when looking for matches that are related to each other.

      I'd been wishing for a feature like this with grep/etc. tools.

      I've had to use some really ugly workarounds (chain grep -C5 | grep -B5) which end up showing extra irrelevant context lines.

      So I'm glad there's a clean way to do this now!

  6. Sep 2020
    1. It would be tiresome - and bloated - to include a class pass-through for every component or assigning custom properties (from the RFC linked) for all potential properties on every component, just in case it's gonna be used in layouts that requires it. Wrapping them in a wrapper div is certainly an option, but potentially creates 100s or 1000s (long lists, several lists etc.) of new elements in the DOM slowing down low-end devices.
    1. Your styles are scoped to the component. No more leakage, no more unpredictable cascade.
    2. It's fashionable to dislike CSS. There are lots of reasons why that's the case, but it boils down to this: CSS is unpredictable. If you've never had the experience of tweaking a style rule and accidentally breaking some layout that you thought was completely unrelated — usually when you're trying to ship — then you're either new at this or you're a much better programmer than the rest of us.
    3. It gets worse when you're working on a team. No-one dares touch styles authored by someone else, because it's often unclear what they're doing, what markup they apply to, and what disasters will unfold if you remove them. The consequence of all this is the append-only stylesheet. There's no way of knowing which code can safely be removed, so it's common to undo some existing style with another, more specific style — even on relatively small projects.
  7. Aug 2020
    1. Safari sends following order application/xml (q is 1) application/xhtml+xml (q is 1) image/png (q is 1) text/html (q is 0.9) text/plain (q is 0.8) \*/\* (q is 0.5) So you visit www.myappp.com in safari and if the app supports .xml then Rails should render .xml file. This is not what user wants to see. User wants to see .html page not .xml page.
  8. Jul 2020
    1. Take the case of the <input> element in this component — we could add an on:input event handler that sets the value of name to event.target.value, but it's a bit... boilerplatey
    1. In the Set class we already called this - and difference, which it is ok but not really accurate because of the previous explanation, but probably not worthwhile to change it.

      Is this saying that the name difference is inaccurate?

      Why is it inaccurate? You even called it the "theoretic difference" above.

      Is that because "relative complement" would be better? Or because the full phrase "theoretic difference" [https://en.wiktionary.org/wiki/set-theoretic_difference] is required in order for it to be accurate rather than just "difference"?

  9. Jun 2020
    1. I was just expressing that, even thought I like React, I dread having to still manually handle everything, instead of just using a directive, a la Vue.JS. This is what I consider boilerplate. Hence my comment on how I could leave React for Svelte just because of that. Clearly a Svelte side-by-side code comparison shows a much cleaner code for Svelte.
    2. Man, just because it gets rid of SO MUCH boilerplate I want to switch already.It kills me everytime I work with forms in React. So much noise for such a simple task.
    1. Some large tech behemoths could hypothetically shoulder the enormous financial burden of handling hundreds of new lawsuits if they suddenly became responsible for the random things their users say, but it would not be possible for a small nonprofit like Signal to continue to operate within the United States. Tech companies and organizations may be forced to relocate, and new startups may choose to begin in other countries instead.
  10. May 2020
  11. Apr 2020
    1. For instance, one recent blog entry from the Irish Data Protection Commission discussing events at schools borders on the absurd:“Take the scenario whereby a school wants to take and publish photos at a sports day ­– schools could inform parents in advance that photographs are going to be taken at this event and could provide different-coloured stickers for the children to wear to signify whether or not they can be photographed,” the Commission suggested. The post goes on to discuss the possibility of schools banning photographs at a high school musical, but suggests that might be unwieldy.
    1. many organisations block torrents (for obvious reasons) and I know, for example, that either of these options would have posed insurmountable hurdles at my previous employment
    2. Actually, I probably would have ended up just paying for it myself due to the procurement challenges of even a single-digit dollar amount, but let's not get me started on that
  12. Mar 2020
  13. Feb 2020
    1. Not every problem should lead to a new process to prevent them. Additional processes make all actions more inefficient, a mistake only affects one.
    1. Market competition provides a mechanism for weeding out those who underperform.

      Note how this has failed in the current guilded age of the United States where it is possible for things to be "too big to fail".

  14. Jan 2020
  15. Dec 2019
    1. Basically, the standard said something, interpreters ignored it because the standard seemed illogical, but now interpreters like Bash have really confusing semantics, and no-one wants to fix it.
  16. Oct 2019
  17. Jul 2019
    1. but Salt Lake City’s cost of living is 16 percent lower than in Denver, 37 percent lower than Seattle’s and 48 percent under San Francisco’s, according to PayScale. The state — often led personally by Governor Gary Herbert — pitches its advantages well to firms considering relocation, says Joe Vranich, whose consulting firm helps small businesses looking to move. “They will roll out the carpet for you and treat you like a king.” The approach is working. Utah’s “Silicon Slopes”

      Utah's low cost of living attracts tech companies to operate in Utah. This will make more outsiders to relocate to Utah for jobs which can further aggravate the burden of housing shortage and pricing.

  18. Mar 2019
    1. Now, iPhone sales are finally leveling off, and at $1,000-plus, they’re pushing the limits of what people are willing to pay.

      yikes

  19. Jan 2019
    1. excessive reading has a scattering effect: “In reading of many books is distraction.”

      I feel personally attacked. ;)

  20. Dec 2017
    1. cles For journal articles, the generic format for a reference is as follows: Author, A. A., Author, B. B., & Author, C. C. (year). Title of article. Title of Journal, xx(yy), pp–pp. doi:xx.xxxxxxxxxx
    2. Presenting your research

      i wish this was closer to the beginning of the book since we had to do papers before we covered this chapter.

  21. Jan 2017
    1. A plant science manifesto

      During the Spring 2017 semester, students taking a plant physiology course at Dickinson State University will be publicly annotating chapters from this online textbook.

      https://www.youtube.com/watch?v=uak3m_q-HDo

  22. Apr 2016
    1. Sanders Is Right About Busting Up the Big Banks By:  Robert Reich

      "Oh, and yes, the episode also showed that making the breakup of big banks the be-all and end-all of reform misses the point."