108 Matching Annotations
  1. Last 7 days
    1. That’s it. If you have a previous “precompile” array, in your app config, it will continue to work. For continuity sake I recommend moving over those declarations to your manifest.js file so that it will be consistent.
    2. Instead of having this confusing maze of lambdas, regexes, and strings, we could, in theory, introduce a single entry point of configuration for Sprockets to use, and in that file declare all assets we wanted to compile. Well, that’s exactly what the manifest.js file is.
    1. You’re allowed to blame us for a terrible developer experience in Trailblazer 2.0. It’s been quite painful to find out which step caused an exception. However, don’t look back in anger! We’ve spent a lot of time on working out a beautiful way for both tracing and debugging Trailblazer activities in 2.1.
    1. The activity gem is an extraction from Trailblazer 2.0, where we only had operations. Operations expose a linear flow which goes into one direction, only. While this was a massive improvement over messily nested code, we soon decided it’s cool being able to model non-linear flows. This is why activities are the major concept since Trailblazer 2.1.
    1. 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.
    1. Yes, Trailblazer is adding new abstractions and concepts and they are different to the 90s-Ruby, but now, at the latest, it becomes obvious how this improves the developing process. We’re no longer talking in two-dimensional method stack traces or byebug hoops, the language and conception is changing to the actual higher level code flow, to activities sitting in activities structured into smaller step units.
    2. We removed the trailblazer-loader gem just like Apple removed the headphone jack from the iPhone 6. This brings you faster startup and consistency with Rails autoloading.
    1. ActiveInteraction plays nicely with Rails. You can use interactions to handle your business logic instead of models or controllers.
    2. Since we're using an interaction, we don't need strong parameters. The interaction will ignore any inputs that weren't defined by filters. So you can forget about params.require and params.permit because interactions handle that for you.
  2. Feb 2021
    1. As of today, you can Wishlist OpenTTD on SteamE. Historically, OpenTTD always had a single home from where we distributed the game. We used to be hosted on SourceForge (you know you are old, if you remember that being a thing :D), and slowly moved towards our own self-created distribution methods. These days, we mostly distribute our game via our website. But times are changing, and so is our hair. Over the last few months, we have silently been working to become a bit more visible in the world. Don’t worry, not for reasons you might think: OpenTTD has as many active users as it had in 2007. But more because we no longer think it is the right approach to only distribute via our own website. This became painfully apparent when we noticed other people post OpenTTD on some stores. They are not always updated with new releases, sometimes even slacking behind a few years. And maybe more important to us: we can not guarantee that the uploaded version is unmodified and is the version as we intended. So, instead of fighting it, why not turn around and join them! Why not release our own, verified, builds on those stores! And this is exactly what we have been working on lately. And when I say “we”, a bit ironic to me, I mean the two developers that are around longest (myself and orudge) ;) A while back orudge added OpenTTD to the Microsoft Store. And today, I am happy to announce we will be on SteamE too! Well, we are on Steam, but we haven’t released anything there yet (sorry that I got your hopes up, just to squash them right after :( ). This is partially because of how Steam works, but also because we know we can bring a better experience for Steam with our upcoming release. That brings me to the most exciting news: if everything goes as planned, we will release OpenTTD 1.11 on Steam on the first of April, 2021! And that is not even an April fools’ joke! You can already Wishlist OpenTTD today .. and till we release on Steam, you can find our game via our website ;)
    1. As of today, you can Wishlist OpenTTD on SteamE. Historically, OpenTTD always had a single home from where we distributed the game. We used to be hosted on SourceForge (you know you are old, if you remember that being a thing :D), and slowly moved towards our own self-created distribution methods. These days, we mostly distribute our game via our website. But times are changing, and so is our hair. Over the last few months, we have silently been working to become a bit more visible in the world. Don’t worry, not for reasons you might think: OpenTTD has as many active users as it had in 2007. But more because we no longer think it is the right approach to only distribute via our own website.
    1. Well, I'm glad they did, because Turbolinks is a much better piece of software than jquery-pjax ever was. It's actively maintained and doesn't require jQuery at all! So we're one step closer to our dream of ditching $.
    2. Now if you think about it, PJAX sounds a lot like Turbolinks. They both use JS to fetch server-rendered HTML and put it into the DOM. They both do caching and manage the forward and back buttons. It's almost as if the Rails team took a technique developed elsewhere and just rebranded it.
  3. Dec 2020
    1. People really don't stress enough the importance of enjoying what you're programming. It aids creativity, makes you a better teammate, and makes it significantly easier to enter a state of flow. It should be considered an important factor in choosing a web development framework (or lack thereof). Kudos!
  4. Nov 2020
    1. There was a major refactoring in the resolver (https://github.com/webpack/enhanced-resolve). This means the resolving option were changed too. Mostly simplification and changes that make it more unlikely to configure it incorrectly.
    1. {#key} was introduced in Svelte v3.28, before that you needed to use a keyed {#each} block with only one item When the key changes, svelte removes the component and adds a new one, therefor triggering the transition.
    1. Svelte's advantage here is that it indicates the need for an update at the place where the associated data is updated, instead of at each place the data is used. Then each template expression of reactive statement is able to check very quickly if it needs to rerender or not.
    2. Svelte slots are much easier to use and reason about than Angular transclude, especially in cases where you don't want an extra wrapper element around the slot content.
    1. If your Svelte components contain <style> tags, by default the compiler will add JavaScript that injects those styles into the page when the component is rendered. That's not ideal, because it adds weight to your JavaScript, prevents styles from being fetched in parallel with your code, and can even cause CSP violations. A better option is to extract the CSS into a separate file. Using the emitCss option as shown below would cause a virtual CSS file to be emitted for each Svelte component. The resulting file is then imported by the component, thus following the standard Webpack compilation flow.
  5. Oct 2020
    1. Instead of this, you can use a File type variable.
    2. Previously, a common pattern was to read the value of a CI variable, save it in a file, and then use that file in your script:
    1. I'm suggesting there should be a way to write lifecycle related code that also responds to changing props, like how useEffect works. I think how React handles this could be a good source of inspiration.
    2. Svelte doesn't re-render, so you need to respond to component mount/dismount and prop changes separately as they are distinct concepts and never tied together, unlike in React.
    3. While react hooks were one of the catalysts for v3 we don't agree with with the APIs or the model and won't be emulating it.
    1. Note how we have to duplicate the code between these two lifecycle methods in class. This is because in many cases we want to perform the same side effect regardless of whether the component just mounted, or if it has been updated. Conceptually, we want it to happen after every render — but React class components don’t have a method like this. We could extract a separate method but we would still have to call it in two places.
  6. Sep 2020
    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
    2. The main rationale for this PR is that, in my hones opinion, Svelte needs a way to support style overrides in an intuitive and close to plain HTML/CSS way. What I regard as intuitive is: Looking at how customizing of styles is being done when applying a typical CSS component framework, and making that possible with Svelte.
    1. The more I think about this, the more I think that maybe React already has the right solution to this particular issue, and we're tying ourselves in knots trying to avoid unnecessary re-rendering. Basically, this JSX... <Foo {...a} b={1} {...c} d={2}/> ...translates to this JS: React.createElement(Foo, _extends({}, a, { b: 1 }, c, { d: 2 })); If we did the same thing (i.e. bail out of the optimisation allowed by knowing the attribute names ahead of time), our lives would get a lot simpler, and the performance characteristics would be pretty similar in all but somewhat contrived scenarios, I think. (It'll still be faster than React, anyway!)
    2. I'll work on a preliminary PR (which I expect will need some love from maintainers, sorry!)
  7. Aug 2020
    1. For example, to search for text occurrences, I used ack-grep. Later on, I found that there is a faster approach using ag. Then, there is an even faster alternative called ripgrep.
    1. If you are a senior, try talking to a junior or someone less experienced than you. Many companies are running what is called ”reverse mentoring” programs where juniors coach senior members of a company. Senior’s experience is traded for a fresh perspective from a junior. You’d be amazed at how much you could learn and share.
  8. Jul 2020
    1. Creating and calling a default proc is a waste of time, and Cramming everything into one line using tortured constructs doesn't make the code more efficient--it just makes the code harder to understand.

      The nature of this "answer" is a comment in response to another answer. But because of the limitations SO puts on comments (very short length, no multi-line code snippets), comment feature could not actually be used, so this user resorted to "abusing" answer feature to post their comment instead.


  9. Jun 2020
  10. May 2020
    1. “Make it work” means shipping something that doesn’t break. The code might be ugly and difficult to understand, but we’re delivering value to the customer and we have tests that give us confidence. Without tests, it’s hard to answer “Does this work?”
    1. The administration and its allies fear that the more people gravitate toward the successful, free-market self-insurance approach, the worse their government-engineered health “reform” will look. We’re already seeing the beginning of this trend.
    1. This is it. I'm done with Page Translator, but you don't have to be. Fork the repo. Distribute the code yourself. This is now a cat-and-mouse game with Mozilla. Users will have to jump from one extension to another until language translation is a standard feature or the extension policy changes.
    2. Mozilla will never publicly ask users to circumvent their own blocklist. But it's their actions that are forcing people to do so.
    3. So to me, it seems like they want to keep their users safer by... making them use Google Chrome or... exposing themselves to even greater danger by disabling the whole blocklist.
  11. Mar 2020
    1. Q. Why does Rubinius not support frozen and tainted? A. Rubinius has better features; frozen and tainted are considered harmful. To elaborate... Both frozen and tainted depend on strewing checks throughout the source code. As a classic weak-link system, only one of those checks needs to be misplaced for the guarantees offered by either to fail. Since the number of checks is high, and as new code is written new checks need to be considered, the features inherently constitute unbounded complexity and unbounded risk.
    1. For several reasons the Simple backend shipped with Active Support only does the "simplest thing that could possibly work" for Ruby on Rails3 ... which means that it is only guaranteed to work for English and, as a side effect, languages that are very similar to English. Also, the simple backend is only capable of reading translations but cannot dynamically store them to any format.That does not mean you're stuck with these limitations, though. The Ruby I18n gem makes it very easy to exchange the Simple backend implementation with something else that fits better for your needs, by passing a backend instance to the I18n.backend= setter.
  12. Jan 2020
    1. Your idea should stem from solving someone’s problem. Ideally, your own problem. It’s important that you choose an idea which interests you. Interest is key to fuelling motivation which is crucial when making a web app. It takes effort building web apps and it’s important you have fun during the process.
  13. Dec 2019
    1. Confusingly, all the distributions I use (Ubuntu, RHEL and Cygwin) had some type of check (testing $- or $PS1) to ensure the current shell is interactive. I don’t like cargo cult programming so I set about understanding the purpose of this code in my .bashrc.
    1. No, clumsily working around the root account in situations where it is absolutely appropriate to use it is not for good reasons. This is just another form of cargo cult programming - you don't really understand the concept behind sudo vs root, you just blindly apply the belief "root is bad, sudo is good" because you've read that somewhere.
    1. Cargo cult programming is a style of computer programming characterized by the ritual inclusion of code or program structures that serve no real purpose.
    1. Just for the record newer versions of ssh support the -W option, you can do something like ProxyCommand ssh -W %h:%p gateway instead of depending on nc
  14. Nov 2019
    1. We accept as axiomatic that students learn by doing

      While I personally agree that "learning by doing" is perhaps one of the or even the most powerful forms of pedagogy, a very large part of current and historical pedagogy does not really engage doing. So either not ALL learning involves doing, or the majority of education that happens without doing doesn't involve learning.



  15. Oct 2019
    1. WHEN it comes to the state of the environment, it’s easy to get swept up in the doom and gloom of it all. Global warming, high pollution levels, climate change and waste disposal all dominate the headlines, painting a bleak picture of what’s to come. But just because it seems hopeless doesn’t mean it is.T roubled times call for ingenious solutions, and Australia is home to some of the brightest ecovators in the world, like Robert Pascoe, Managing Director of environmental solutions company Closed Loop.Through its Simply Cups initiative, Closed Loop is tackling Australia’s overwhelming waste problem by teaming up with 7-Eleven to save 70 million coffee cups from landfill this year — equivalent to the number they sell each year. While the most sustainable option is forgoing a disposable cup for a reusable one, some circumstances are beyond your control. Like your inability to remember anything before you’ve had your morning coffee. Which is a bit of a catch 22, isn’t it? That’s why 7-Eleven are installing dedicated coffee cup recycling bins in over 200 of their stores nationally, as well as funding 50 other large-scale locations including offices, universities and construction sites as part of the initiative. Coffee cups are one of the largest contributors to litter waste in Australia, with an estimated one billion ending up in landfill each year because they are not recycled.Yep, unfortunately you read that right: one billion cups.Coffee cups are one of the largest contributors to litter waste in Australia, with an estimated one billion ending up in landfill each year because they are not recycled.“T here’s a lot of misinformation out there,” Mr Pascoe said. “The consumers aren’t at fault because ultimately they don’t know what can be recycled and what can’t. I think if we can get that information out there, then people will demand products that are made from recycled materials.”For the majority of us, learning that our disposable coffee cups fall into the category of what can’t be recycled is both confusing and devastating. But, as Mr Pascoe says: “You can’t unknow something once you know it.”“Part of the problem is they didn’t know they weren’t being recycled. A lot of people said, ‘oh no, I put my coffee cup into the recycling to be recycled’, but of course, they’re not,” he continued.A nd why is that, exactly? It’s because most paper coffee cups are lined with a waterproof plastic that makes them hard to recycle — but not impossible. And that’s where Simply Cups comes in. “We’ve come up with a system that can actually recycle these cups if we keep them separate. We’ve got technology available now to do it, but we have to have coffee cups kept as a separate stream. Or anything that has the plastic lining of milk cartons or juice boxes,” Mr Pascoe said. The technology he’s referring to is “kind of like an organic solvent” that works to separate compound materials. Invented by Dennis Collins in Ballarat, the technology was initially designed to separate the PVC material from the hessian used in truck liners and advertising banners.“Dennis called us and said, ‘I’ve got a solution for your coffee cups’,” Mr Pascoe said. “So now we’re building a plant that can process around 150 million coffee cups per year, which is about 1.5 thousand tonnes. That will only be about 10 per cent of disposable coffee cups alone, so we’re going to need quite a few of these plants eventually. We have the solution, but we really need the coffee cups. “That’s why we started the Simply Cups program.”And that’s where coffee addicts come in. Once they drop their coffee cups into a designated recycling bin, they will then be taken to a processing plant using this new technology. The inner plastic lining of the cups will be removed and then recycled into things like plastic outdoor furniture, safety equipment and food trays.A nother eco-minded initiative helping solve Australia’s waste problem is the anti food-waste website, Yume. The website fights food waste — which is a huge problem in Australia — by allowing consumers to buy surplus and unsold food from restaurants and cafes at half the price. The ‘wholesale marketplace for surplus food that saves you money while saving the planet’ shares the same idea as ‘YWaste’, an app allowing retailers to sell food that would otherwise be thrown away.Over its 40-year history, Patagonia has donated about $114 million to grassroots environmental organisations. Over its 40-year history, Patagonia has donated about $114 million to grassroots environmental organisations. Their advertising has begged consumers not to buy things they don’t need (even their own products) and they’ve implemented a program that repairs their products for free rather than replace them. Their commitment to the environment is reflected in the materials of their products too; wetsuits are made of natural rubber and raincoats are made from recycled plastic bottles. This year, the company launched Patagonia Action Works, a digital platform that aims that aims to connect people with environmental nonprofits, helping them get involved through events, petitions, and volunteering.H &M, too, are doing their bit to close the loop on fashion waste with their global campaign encouraging customers to recycle their clothes. They launched their garment collecting initiative in 2013, asking customers to drop off any unwanted items from their closets. Depending on the condition of the clothing, the items are either distributed to second-hand stores for resale, or recycled into other items like yarn, rags, and insulation materials.And just look at Elon Musk. He’s raking in bajillions of dollars every minute almost exclusively thanks to Tesla and SolarCity, which have disrupted an entire industry. While some snigger at his grand ideas — let’s colonise Mars! — the accomplishments of how he has changed the way we shop for cars are hard to deny.A fter a complicated relationship with French beauty giant L’Oreal, The Body Shop is now in the hands of ethical Brazilian beauty brand Natura, promising to return to its pioneering ethical business.“All of us share the aim of doing business as a transformational force for good and a force for change for society and for the environment. We couldn’t think of a better union to nurture our brand’s commitment to naturality and sustainability,” said the Body Shop’s Communications Manager, Jessica Styles. “In 2016, The Body Shop launched its new sustainability plan, Enrich Not Exploit, supporting the brand’s vision to be the most ethical and sustainable global business in the world.”“All of us share the aim of doing business as a transformational force for good and a force for change for society and for the environment. We couldn’t think of a better union to nurture our brand’s commitment to naturality and sustainability,”Jessica Styles, Body Shop’s Communications Manager The plan set fourteen targets to help The Body Shop become a "truly sustainable business", including powering all its stores with 100 per cent renewable energy, overhauling product packaging by slashing the use of fossil fuel-based wrapping and designing new sustainable innovations. This year there’s a special focus on protecting Red Pandas in Nepal, a species currently on the endangered list.“Now more than ever, companies have the platforms and frameworks to not only voice doing good for the planet and people but to also act on it. The more we see big brands doing their bit, the more it becomes entrenched as something that not only employees but customers should be thinking about,” Styles said. “It’s the big corporations of the world that can help foster and influence this through their own businesses.” Skin care brand Youth to The People has made a conscience decision to use 100 per cent recyclable packaging. Co-founder Joe Cloyes says the decision reflects the brand’s philosophies.“We believe in creating as little waste as possible, we believe in cruelty-free products, and we believe in sourcing the best ingredients for your health and your skin. It's just that simple,” he said. “Modern consumers care about their environment just as much as they care about their healthy skin, and they're very much connected. We have found it's very important to people.”FIND OUT how many cups of coffee you could be recycling EVEry yearHow many cups of coffee do you drink every day?How many days per week do you drink coffee?How many weeks per year do you drink coffee?Calculatecups of coffeecould be recycled These are but a few eco-minded initiatives that offer Australians the chance to do their part in securing a cleaner future for generations to come. For every company that spills millions of gallons of oil into our oceans, there are plenty more companies operating under a socially responsible ethos. They recognise enterprise and environmental responsibility can in fact go hand-in-hand.“I think every organisation should have a sustainability policy,” Mr Pascoe said. “There are plenty of organisations around that can have a positive impact on the environment. We’re talking about the effect they have on the environment, the way they consume energy, and the way they manage their waste. In my world, there’s no such thing as waste.” Over one billion cups end up in landfill each year because they are not recycled. That’s why 7-Eleven has joined forces with Simply Cups to establish cup recycling in Australia. Save your cups by placing them in a Simply Cups bin at any participating 7-Eleven #cuprescue. Story by Erin Bromhead | news.com.au
    1. “To measure the head, the height, etc., does not indeed mean that we are establishing a system of pedagogy, but it indicates the road which we may follow to arrive at such a system, since if we are to educate an individual, we must have a definite and direct knowledge of him.”

      This is obviously done incorrectly in schools nowadays, referring to the large class sizes and common core putting restrictions on mostly everything. This raises the question, though, does homeschooling produce a better pedagogy? Or is it dependent on the specific educator?

    2. But in spite of all these tendencies, Scientific Pedagogy has never yet been definitely constructed nor defined. It is something vague of which we speak, but which does not,[Pg 2] in reality, exist. We might say that it has been, up to the present time, the mere intuition or suggestion of a science which, by the aid of the positive and experimental sciences that have renewed the thought of the nineteenth century, must emerge from the mist and clouds that have surrounded it.

      It is interesting to think about the hugely varying ideas that restrict the existence of a Scientific Pedagogy. Not even those that oppose each other through a research standpoint, but also those that are constrained by religious beliefs.

  16. Feb 2019
    1. Firmness and strength of Mind ·,_ 1 • ..will carry us thro all these little persecutions,, ..... ..-orrt ... • h' h . r • • w 1c may create us some uneasiness 1or a.. .t...t 0r while, but will afterwards end in our Glory and-....:� Triumph.

      I think it's important to note that the words Astell is using are not unusual or incredibily difficult to understand -- they are, in fact, pretty conversational, and don't seem pretentious or alienating. She's working with her audience.

  17. Jan 2019
    1. For, as Seneca points out, when one writes one reads what one writes, just as in saying something one hears oneself saying it. The letter one writes acts, through the very action of writing, upon the one who addresses it, just as it acts through reading and rereading on the one who receives it.

      Words, doing their thing: doing.

  18. Nov 2017
  19. Mar 2017
    1. Who am I? I am "doing" French history.

      This is fascinating! What an excellent articulation of the self. I'm willing to bet that I'm going to be using the "embodiment" tag a fair number of times in this text, and this is a great place to start.

      Here, Cixous is already recognizing that her "self" is at least partly a racially, historically, and politically situated body. Simply by being the rhetor she is, she is actively "doing" French history by participating in the public sphere. It may not have been as dangerous for her as it was for Douglass or Palmer or Stewart, but much of what she had to say was still revolutionary, and her body is an important part of that revolutionary performance.

  20. Feb 2017
  21. Jul 2016
  22. Feb 2016
    1. The author almost realized the much more important conclusion of the fact he lived. He shouldn't conclude the article by asking "what is the purpose of studying maths?" and then giving an three stupid answers.

      He should have asked: is this actually "knowledge" as they say academia brings to society? Is the money researchers earn being well spent? Did I actually deserve to be remunerated by this piece of work no one understands -- and, in fact, no one has read except for maybe three people?

  23. Oct 2015
    1. In other words, for the foreseeable future, the urbandisenfranchised are trapped in the structural web of the current capitalistsystem and the states that uphold it.

      Instead of reading the authour just restate questions and paraphrase, I'd like to read his proposal of solutions or an argument of how these questions could be answered/issues fixed.

  24. Aug 2015
    1. Hands on

      This might be the most explicit link to constructivism and constructionism. Not only is it about “learn by doing”, but it’s about concrete action in the physical world. Can’t help but find it limiting and restrictive to mention “3D Printing” as the main component. After all, FabLabs got started without 3D printers and the Maker movement has a lot of stuff which has little to do with 3D Printing. But it’s hard to argue that 3D Printing haven’t attracted attention, in the past couple of years. Sexier than laser etching? As Makers often point out, there’s a lot in the movement which is really very similar to what was happening in shop class. Though the trend may sound new, it’s partly based on nostalgia. A neat aspect, though, is that much of it can happen through learners’ projects cutting across class boundaries. Sure, we’ve known about project-based learning for a while. You do a project for a class or a series of classes. But how about a personal pathway (cf. “individualism”, above) through which learners add learning experiences around a central project? Learning Circles can make that into something really neat.

  25. Oct 2013
    1. The ambitious man does wrong for sake of honour, the quick-tempered from anger, the lover of victory for the sake of victory, the embittered man for the sake of revenge, the stupid man because he has misguided notions of right and wrong, the shameless man because he does not mind what people think of him; and so with the rest -- any wrong that any one does to others corresponds to his particular faults of character.

      Types of people who commit wrong-doings. It is interesting because they all do the same things but for drastically different reasons.