#project subtrahend
Explore tagged Tumblr posts
downtotheskeletal · 3 months ago
Text
Tumblr media
sibling mushroom photoshoot
4 notes · View notes
5-7kacholluria · 6 years ago
Text
Weekly Update 2/1/19
Tumblr media
General Studies:
Reading:
This week was filled with many Groundhog’s Day themed activities. The friends learned about the holiday and made predictions. More friends hoped that Phil the Groundhog won’t see his shadow in hopes of an earlier spring. They also were taught key holiday vocabulary words such as burrow and hibernate. Some friends learned that compound words are formed when two smaller words are combined to form a new word, such as ladybug and baseball. The friends enjoyed learning about adjectives. Through a fun interactive matching game, the friends learned how adjectives are used to describe a noun.
Some friends read the poem “Groundhog’s Day” and learned the sight words little, see, more and winter.
I’m a little groundhog
In my hole.
On February 2nd
You will know,
If I see my shadow
It will be,
Six more weeks of winter
For you and me!
Friends who have been learning their r and l bends, began to learn the digraphs, wh, sh, ch, and th. Some examples they came up with are, whale, why, shoe, shop, chocolate, chip, thumb, thick. Many friends are beginning to use these digraphs and blends in their writing as well. The readers also worked on asking their reading partners “why” questions before, during and after reading to engage in active inquiry while reading to aid in deepening comprehension, making connections, and thinking beyond the text.
Some friends were introduced to reader’s theater, practicing the play Chicken Little. The friends learned to follow along to be prepared for their part.
Writing:
This week, the writers continued their handwriting without tears curriculum. They are learning to carefully write their uppercase and lowercase letters in an effort to support theirs writing stamina!
Some friends continued to work on opinion writing. They also began writing book reviews. Our reviewers listened to stories and wrote their opinions. They learned about star ratings and used adjectives to help express their feelings about the books, such as interesting, voting, and funny. They also learned how to write a summary and conclusion.
Math:
Some friends are continuing to practice their subtraction facts. As the weeks progress, the friends are challenged with larger number sentences. We also discussed the importance of paying close attention to the symbols and how the plus sign tells you to add while the minus sign tells you to subtract.
Other friends continued to practice solving word problems where they add to with change unknown, take from with change unknown, put together with addend unknown, and take apart with addend unknown word problems. For example: “Maria has 15 baseballs, 8 of them are old, and some of them are brand new birthday presents. How many brand new baseballs does Maria have?” Students solve these problems using both the counting on strategy and subtraction strategies.
Here are two more examples: Cameron gives some of his apples to his sister. He still has 9 apples left. If he had 15 apples at first, how many apples did he give to his sister?
Toby dropped 12 crayons on the classroom floor. Toby picked up 9 crayons. Marnie picked up the rest. How many crayons did Marnie pick up?
The get to ten strategy has students solving 12 – 3 as 12 – 2 – 1, understanding that decomposing the subtrahend to easily get to the ten yields a simpler, more manageable subtraction problem. It is the way a student can make ten when there is an unknown addend. It is a step away from counting on, where, rather than counting on by ones, students consider how much it takes to get to ten and then add on the rest to the teen number. For many students, the language of get to ten helps them bridge from counting on to a more efficient strategy.
Cultural:
We continued our study of North America and focused on understanding where we live. We reviewed the book Me on the Map, and worked on our project to understand where we live on the map. We looked at our street, city, state, country, continent, and planet.
Ivrit:
This week the 5-7 friends investigated the way a plant is developing from a zerah (seed) to a Tzemach (plant). Some friends worked on a visual dictionary drawing the corresponding pictures to words such as Zera (seed), Nevet (sprout), Shoresh (root), Geza (tree trunk), Anafim (branches), Nitzanim (flower buds), Alim (leaves), and Prachim (flowers), conjugated in plural and singular form. Others, added adjectives describing the nouns by conjugating each adjective to corresponding with the noun’s gender. Everyone enjoyed looking for zraeem in various fruits and vegetables sampling the evidence.
Yahadut:
This week in yahadut the friends learned about Parashat Mishpatim. We spoke about some of the mitzvot in this Parasha and noted that the mitzvot in this Parasha have a logical reasoning behind them. The friends got the chance to look at a short Torah phrase and find hidden words inside the passuk. Some of the friends also worked to find the Hebrew prefixes in the passuk. We are continuing our brachot unit. The this week we focused on the 6 different brachot we say before eating food. We looked at the words of each bracha and practiced sorting different foods into their correct brachah category.
Art Classes January Reflection
Students worked on a number of projects that focused on using a grid to create artwork. Creating art with boxes on graph paper ‘takes the edge off’ realistic drawing, as it’s more like building an image with squares and rectangles, like Legos, Minecraft or 8-bit video game graphics. We discussed this unit as requiring translation, that students were challenged to adapt their curved and diagonal lines to the grid format.
One activity was to copy a simple line drawing of an animal by breaking the image into gridded squares and working to recreate the same image square by square. We labeled the grid with letters and numbers to organize the process, and some students said it was like the game Battleship. The objective was to recreate the lines in each square, piece by piece, rather than trying to draw the whole animal all at once. Students had to observe each square, break the image into parts, and transfer the drawing to a second grid.
For another activity, students got a white paper with a 1”x1” grid, a bunch of black paper 1”x1” squares, and a glue stick. Students experimented with building a picture with the squares. Once they’d settled on a picture, they glued the squares onto the paper. We discussed how details were limited when working in this format, and we considered how the activity would change if the squares were smaller. I explained this is like HDTV, that the smaller pixels allow for a more crisp image.
The culminating project raised the bar. Students went from the 80 squares of the black and white project to over 1,200 squares and full-color on a sheet of graph paper. We talked about making decisions about what they wanted to draw and how the drawings may successfully be adapted as a gridded image. Students will continue these project for a few more classes as they build their pictures with boxes. We worked in pencil to create the image, and students will add color with colored pencils. They are having fun being challenged to translate their ideas into the grid format.
0 notes
suzanneshannon · 5 years ago
Text
Designing a JavaScript Plugin System
WordPress has plugins. jQuery has plugins. Gatsby, Eleventy, and Vue do, too.
Plugins are a common feature of libraries and frameworks, and for a good reason: they allow developers to add functionality, in a safe, scalable way. This makes the core project more valuable, and it builds a community — all without creating an additional maintenance burden. What a great deal!
So how do you go about building a plugin system? Let’s answer that question by building one of our own, in JavaScript.
I’m using the word “plugin” but these things are sometimes called other names, like “extensions,” “add-ons,” or “modules.” Whatever you call them, the concept (and benefit) is the same.
Let’s build a plugin system
Let’s start with an example project called BetaCalc. The goal for BetaCalc is to be a minimalist JavaScript calculator that other developers can add “buttons” to. Here’s some basic code to get us started:
// The Calculator const betaCalc = {   currentValue: 0,      setValue(newValue) {     this.currentValue = newValue;     console.log(this.currentValue);   },      plus(addend) {     this.setValue(this.currentValue + addend);   },      minus(subtrahend) {     this.setValue(this.currentValue - subtrahend);   } }; 
 // Using the calculator betaCalc.setValue(3); // => 3 betaCalc.plus(3);     // => 6 betaCalc.minus(2);    // => 4
We’re defining our calculator as an object-literal to keep things simple. The calculator works by printing its result via console.log.
Functionality is really limited right now. We have a setValue method, which takes a number and displays it on the “screen.” We also have plus and minus methods, which will perform an operation on the currently displayed value.
It’s time to add more functionality. Let’s start by creating a plugin system.
The world’s smallest plugin system
We’ll start by creating a register method that other developers can use to register a plugin with BetaCalc. The job of this method is simple: take the external plugin, grab its exec function, and attach it to our calculator as a new method:
// The Calculator const betaCalc = {   // ...other calculator code up here 
   register(plugin) {     const { name, exec } = plugin;     this[name] = exec;   } };
And here’s an example plugin, which gives our calculator a “squared” button:
// Define the plugin const squaredPlugin = {   name: 'squared',   exec: function() {     this.setValue(this.currentValue * this.currentValue)   } }; 
 // Register the plugin betaCalc.register(squaredPlugin);
In many plugin systems, it’s common for plugins to have two parts:
Code to be executed
Metadata (like a name, description, version number, dependencies, etc.)
In our plugin, the exec function contains our code, and the name is our metadata. When the plugin is registered, the exec function is attached directly to our betaCalc object as a method, giving it access to BetaCalc’s this.
So now, BetaCalc has a new “squared” button, which can be called directly:
betaCalc.setValue(3); // => 3 betaCalc.plus(2);     // => 5 betaCalc.squared();   // => 25 betaCalc.squared();   // => 625
There’s a lot to like about this system. The plugin is a simple object-literal that can be passed into our function. This means that plugins can be downloaded via npm and imported as ES6 modules. Easy distribution is super important!
But our system has a few flaws.
By giving plugins access to BetaCalc’s this, they get read/write access to all of BetaCalc’s code. While this is useful for getting and setting the currentValue, it’s also dangerous. If a plugin was to redefine an internal function (like setValue), it could produce unexpected results for BetaCalc and other plugins. This violates the open-closed principle, which states that a software entity should be open for extension but closed for modification.
Also, the “squared” function works by producing side effects. That’s not uncommon in JavaScript, but it doesn’t feel great — especially when other plugins could be in there messing with the same internal state. A more functional approach would go a long way toward making our system safer and more predictable.
A better plugin architecture
Let’s take another pass at a better plugin architecture. This next example changes both the calculator and its plugin API:
// The Calculator const betaCalc = {   currentValue: 0,      setValue(value) {     this.currentValue = value;     console.log(this.currentValue);   },     core: {     'plus': (currentVal, addend) => currentVal + addend,     'minus': (currentVal, subtrahend) => currentVal - subtrahend   }, 
   plugins: {},     
   press(buttonName, newVal) {     const func = this.core[buttonName] || this.plugins[buttonName];     this.setValue(func(this.currentValue, newVal));   }, 
   register(plugin) {     const { name, exec } = plugin;     this.plugins[name] = exec;   } };    // Our Plugin const squaredPlugin = {    name: 'squared',   exec: function(currentValue) {     return currentValue * currentValue;   } }; 
 betaCalc.register(squaredPlugin); 
 // Using the calculator betaCalc.setValue(3);      // => 3 betaCalc.press('plus', 2); // => 5 betaCalc.press('squared'); // => 25 betaCalc.press('squared'); // => 625
We’ve got a few notable changes here.
First, we’ve separated the plugins from “core” calculator methods (like plus and minus), by putting them in their own plugins object. Storing our plugins in a plugin object makes our system safer. Now plugins accessing this can’t see the BetaCalc properties — they can only see properties of betaCalc.plugins.
Second, we’ve implemented a press method, which looks up the button’s function by name and then calls it. Now when we call a plugin’s exec function, we pass it the current calculator value (currentValue), and we expect it to return the new calculator value.
Essentially, this new press method converts all of our calculator buttons into pure functions. They take a value, perform an operation, and return the result. This has a lot of benefits:
It simplifies the API.
It makes testing easier (for both BetaCalc and the plugins themselves).
It reduces the dependencies of our system, making it more loosely coupled.
This new architecture is more limited than the first example, but in a good way. We’ve essentially put up guardrails for plugin authors, restricting them to only the kind of changes that we want them to make.
In fact, it might be too restrictive! Now our calculator plugins can only do operations on the currentValue. If a plugin author wanted to add advanced functionality like a “memory” button or a way to track history, they wouldn’t be able to.
Maybe that’s ok. The amount of power you give plugin authors is a delicate balance. Giving them too much power could impact the stability of your project. But giving them too little power makes it hard for them to solve their problems — in that case you might as well not have plugins.
What more could we do?
There’s a lot more we could do to improve our system.
We could add error handling to notify plugin authors if they forget to define a name or return a value. It’s good to think like a QA dev and imagine how our system could break so we can proactively handle those cases.
We could expand the scope of what a plugin can do. Currently, a BetaCalc plugin can add a button. But what if it could also register callbacks for certain lifecycle events — like when the calculator is about to display a value? Or what if there was a dedicated place for it to store a piece of state across multiple interactions? Would that open up some new use cases?
We could also expand plugin registration. What if a plugin could be registered with some initial settings? Could that make the plugins more flexible? What if a plugin author wanted to register a whole suite of buttons instead of a single one — like a “BetaCalc Statistics Pack”? What changes would be needed to support that?
Your plugin system
Both BetaCalc and its plugin system are deliberately simple. If your project is larger, then you’ll want to explore some other plugin architectures.
One good place to start is to look at existing projects for examples of successful plugin systems. For JavaScript, that could mean jQuery, Gatsby, D3, CKEditor, or others.
You may also want to be familiar with various JavaScript design patterns. (Addy Osmani has a book on the subject.)  Each pattern provides a different interface and degree of coupling, which gives you a lot of good plugin architecture options to choose from. Being aware of these options helps you better balance the needs of everyone who uses your project.
Besides the patterns themselves, there’s a lot of good software development principles you can draw on to make these kinds of decisions. I’ve mentioned a few along the way (like the open-closed principle and loose coupling), but some other relevant ones include the Law of Demeter and dependency injection.
I know it sounds like a lot, but you’ve gotta do your research. Nothing is more painful than making everyone rewrite their plugins because you needed to change the plugin architecture. It’s a quick way to lose trust and discourage people from contributing in the future.
Conclusion
Writing a good plugin architecture from scratch is difficult! You have to balance a lot of considerations to build a system that meets everyone’s needs. Is it simple enough? Powerful enough? Will it work long term?
It’s worth the effort though. Having a good plugin system helps everyone. Developers get the freedom to solve their problems. End users get a large number of opt-in features to choose from. And you get to grow an ecosystem and community around your project. It’s a win-win-win situation.
The post Designing a JavaScript Plugin System appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
Designing a JavaScript Plugin System published first on https://deskbysnafu.tumblr.com/
0 notes
9-11luria-blog · 7 years ago
Text
Week of:  January 22nd
9-11 Class Learning Highlights
Language Arts
Fourth grade: We began a new writing unit:  Boxes and Bullets-Personal and Persuasive Essays.  We began the unit by setting some goals for our writing.  They include generating and planning ideas for essay writing, elaborating using convincing details, structure writing in the most convincing way and writing so the reader can understand.  
Fifth grade: This week, we started our Argument Essay unit by setting goals and learning the “lingo” of this writing unit. Goals include: learning from different media types on one topic, taking a solid stance and supporting it with clear evidence, persuading the reader by using voice, structure, and precise language, and using grammar and conventions to convey ideas precisely and powerfully.
Math
Green & Blue: This week, students reviewed everything they’ve learned in the multi-digit whole number and decimal fraction operations unit.  
Purple: Students related decimals to mixed numbers and rounded addends, minuends and subtrahends to whole numbers in order to predict reasonable answers.  Through the use of arrays and partial products, students used place value and applied the distributive property to find the product of decimals. Finally, students used estimation and place value to determine the placement of the decimal point in products and to determine that the size of the product is relative to each factor.  
Red & Orange: Using division and the associative property to test for factors and observe patterns; Exploring properties of prime and composite numbers to 100 by using multiples.
Yellow: Writing and interpreting numerical expressions and comparing expressions using a visual model and mathematical vocabulary (i.e., sum, difference, product, quotient).
Rainbow: Solving multi-digit by one-digit multiplication using the partial products method and the standard algorithm.
History
Fourth grade: Students continued their introductory learning as a part of our Native Americans unit.  We continued to learn and use vocabulary and terms which will be important to our upcoming research project and we began to study some of the history of tribes of the Northeast Woodlands prior to the Colonial Period.
Fifth grade: Students used their knowledge of the Articles of Confederation and information about the 13 states’ economy at that time to have a mock Continental Congress session. We discussed three different issues and voted either unanimously to change the articles or a majority (9 out of 13) to amend the articles. After the activity, students reflected on the challenges of this type of government and why this led to change in America.
Science
Students investigated comets, asteroids and meteors this week.  
Yahadut
In their parasha studies this week for parashat Be-shalach, students focused on the crossing of the Sea of Reeds and on a series of contributing factors and themes, such as Moshe’s leadership traits, grumblings of a recently freed people, and how to balance celebration with thoughtfulness.  We also spent time examining the structure of Shirat Ha-Yam or the Song of the Sea, as it appears in the Torah and in the siddur.  Students worked to produce divrei Torah or thoughts on this week’s parasha based on questions, challenges or areas of interest they had during their learning this week.
Mishnah
Fourth grade: Students continued their learning in the 6th chapter of Mishnah Brachot, focusing on the hierarchy of brachot and how much mileage we can get out of each blessing.  We discussed what exactly constitutes a meal and students got to share examples of some of the different scenarios that we discussed.
Fifth grade: Students learned the third mishnah in the first chapter of Mishnah Brachot, which focuses on the text of the Shemah  and how the houses of Hillel and Shammai used this text to discuss how it should be said in the morning and in the evening.  
Ivrit
Be’er Sheva: We continued to learn Tu Bishvat terms and created sentences using new and old adjectives. We played a game mixing and matching singular and plural, female and male nouns and adjectives.
Yerushalayim and Tel Aviv: We learned about taftafot, Israeli invented water irrigation systems and how they help save water. We spoke about Tu Bishvat and other Israeli- agricultural innovations and used new and old adjectives to speak about Tu Bishvat related terms.
Haifa: We learned about Tu Bishvat terms and practiced past tense conjugation. We wrote a story where each student said one sentence and picked up from where the one before left off. We enjoyed using humor and shaping the story as we went along.
Chumash
Rashi and Ramban: We learned Pesukim 30-40 and compared the blessings that Yitzchak gave to Ya’akov and Esav. We focused on some key Rashis and practiced figuring out what Rashi is saying and what his question is.
Sforno and Eben Ezra: We finished chapter 42 and started chapter 43. We discussed the weight family has in our lives, and spoke about the relationships within the family. We continued to learn key Rashi, Sforno and Eben Ezra commentary, and base our responses and answers on text and commentary evidence.
Questions
Language Arts
Fourth grade: Why do we write essays?  How do we get ideas for essays?  What is a counterargument?
Fifth grade: What is a claim and a counterclaim? How might a counterclaim make your argument stronger?
Math
Green & Blue: What is the most challenging skill in this unit for you and why?  What is the easiest skill in this unit for you and why?  
Purple: Describe the circumstances when it would be easier to add and subtract mixed numbers by converting them into decimals first.  How can estimation be used to help solve addition and subtraction problems with rational numbers?  
Red & Orange: What did you notice about the multiples of 3? What do they all have in common?
Yellow: What is the sum of 34 and 16, doubled?
Rainbow: Solve 873x4= using the partial products OR standard algorithm method.
History
Fourth grade: What was something new that you learned about the history of Native Americans this week?  Was there anything that surprised you?
Fifth grade: What was the Continental Congress experience like for you? Prove why this system of government did not work.
Science
What are comets composed of?  What is the difference between a meteor and a meteoroid?  Where are most asteroids located?  
Yahadut
Fourth grade: Give of an example of a meal where pat (bread) is served before parperet (appetizer).  Which brachot do you say, in what order and why?
Fifth grade: What were the two text sources that Hillel and Shammai used in their mahloket on Kriat Shemah? Who had the more usable source and why?
Ivrit
Be’er Sheva: מה עושים בט”ו בשבט?
Yerushalyim and Tel Aviv: מה זה טפטפות? מה הם עושות? למה צריך טפטפות?
Haifa: Share your story at home!
Chumash
Rashi and Ramban: Who got the better end of the deal? Why? What is Yitzchak feeling? What is Ya’akov feeling? What is Esav feeling? What is Rivka feeling?
Sforno and Eben Ezra: Is Yosef still connected to his family? Why or why not? What is Ya’akov feeling now? What are the brothers feeling?
0 notes