Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Thursday, April 23, 2015

#codemaths:Programming math practice for students

//Checking in

I feel like I need to start the first paragraph of every post with a quick paragraph for those who will judge my whole classroom based on one blog post (not that anyone has every voiced judgement but I don't want to give the wrong impression either). As part of any good math classroom I believe there needs to be a balance of conceptual development, investigation and then, in turn, developing mathematical fluency and efficiency. This post will focus on how I am using computers to develop efficient math students, and will not focus on the conceptual development that has taken place prior to students doing this practice work (think textbook problems).

//Learning Cycle, Conversations and Self-Reflection

I have chromebooks in my classroom, two students to each device, which I actually love in promoting math conversations and collaboration. If offered one device for every student I'm not even sure that I'd want it as an option...seriously. I've spent many (seriously, MANY) more hours than I care to admit developing an electronic form of practice for my classroom that works for my situation and I feel like I'm at a new place personally, thus this blog post.
A few years back I was doing the traditional assign homework, quiz the students and look at the data myself. Big Data in education, we all know the drill. I had all kinds of charts and electronic analyzing going on but I was doing all the analysis, not the kids, and it was after the learning cycle was to have been completed. There are actually quite a few blog posts and processes I've written on electronic student data that I'm actually not even doing now in my own classroom now.
I dabbled in writing rubrics for each learning target for my students which I really actually liked but, for the sake of time and curriculum development, that has been pushed to the back-burner and saved for a year when my course content has fewer changes. In class we don't have "homework" but "practice" and as it is electronic there is an unlimited amount available to students at any time, along with help videos that are an option for kids wanting to review where we've been.
We have dedicated class time for practice (example here) and it keeps individual learners at the focus rather than the pace of the whole class. I actually think it's tragic to hear that many 12, 13 and 14 year old kids are having to do 3-5 hours of homework every night before bed rather than spending time with their family and I don't want to be a contributor to that any longer.
I've done the whole clicker thing and what I didn't like with that was there was a lot of down-time and waiting and a lot more focus on the right answer than the process and conversations. Maybe that's because we were gathering data and in education we want it to be "valid" and "formative". No thanks, I'd rather have my kids talking about the math they are wrestling with than getting pure data from them.
Properties of Exponents Review

//codemaths

I've written some about this in the past and wanted to highlight some of the changes I've put together. I'm presenting on this at the NCTM Regional Conference in Minneapolis, Fall of 2015 from both a teacher perspective as well as using it as a tool to challenge students to think more deeply about the math concepts they are learning while applying them in a pseudo-code environment. I tried going full-blown javascript with a class a few years ago and realized so much time is lost in so many of the small details of just writing code that we would never ramp up soon enough to get to applying the math we were currently learning. Today for example in class I found a couple of side-tracked girls that had clicked on the code link from a practice set they were working on and I think I have them hooked on a code challenge to write a system of equations and an algebraic solution based on three randomly generated variables.

//Screen

Kind of a sneaky teacher thing but I have it programmed to go through a subtle gradient of background color (starting at white). If a student continues to get consecutive questions correct their screen will move through shades of green toward blue. As they get consecutive questions wrong it will move through through yellow shades toward red. For a student looking directly at the screen they may not even notice it but as I'm walking around the room it is easier to see and it helps as a visual cue even from across the room for me to go check in with a pair of students if they aren't already calling for help.

//Stars

Far from gamification but after a set number of correct questions, based on quantity and percent correct they can get 1, 2 or 3 stars to show up. It doesn't save to their profile, record it anywhere or even go in as a grade book but it's laughable at how that actually motivates some kids to try harder and not rush through their thinking. Occasionally I'll hack my own code and pictures of my face will show up as they get more questions right. I thought it was funny--some thought it was creepy but deep down I think that means it's awesome so I keep doing it.

//Auto Math Formatting

This has been the latest project with many times where I almost gave up and it turned out I had literally one character in the wrong "else if" loop. I didn't want students to get hung up on understanding what 2x^3 represented mathematically so after the code is printed it will go through and format text (like in in the image above) as 2x³ while also formatting fractions and subscript labels, all based on order of operations so 1/2x will be 
shown differently than 1/(2x) for example. As students type their responses in a text box they will also see a math 
formatted preview of what they are entering.

//Makers

I've tried hard to make this all in a way that can be shared and duplicated but I recognize at this level you really need to have some level of javascript understanding to make something like this work for you. What I've found to be true for me though is that it has become easier for me to make specifically what I need for a lesson rather than trying to find something that is close to what I need. Here's a link to a getting started guide I've put together and I'd appreciate any feedback if there are steps or parts of the process that are confusing. I can't believe you've read this far, you must be pretty nerdy too.

Friday, March 21, 2014

#codemaths: Considering different solutions as variables change

A symbolic extension to our current learning in class
I presented this as a challenge for my students today that were ready to move on from the review that others were still doing in class. All students worked on the initial question and a handful moved on to try to program the solution in #codemaths. I was happy to see that a couple of my female students were working on this and I talked to them about the movement to try and get more girls into programming in what is typically seen as a male career path--they thought that was pretty cool.

Here is the example the class worked on and the skills I went over to prepare students for what they would need to do in order to connect the Javascript to the mathematics they were applying:

What is the solution to ax+b≥c where a, b and c are any value? Are there any circumstances that cause your solution to be different?

Javascript skills needed: using the eval() function and joining a string with variable expressions.

Joining strings with variable values:
“This sentence includes the value “+b;
displays as
“This sentence includes the value 3”
when b = 3.

Using the eval() function:
You can do math using the eval() function as well:
“x>”+eval(a*b-c)
would display as
“x>-1”
when a=1, b=2 and c=3.

In this #codemaths challenge, you will want to change the variable ‘solved’ in the constraints section to output a correct solution for any inequality that may result for random variables a, b and c that is programmed in the question section.
Notice in the first line of code
if(a==0){a = 3;}

that a will be changed to 3 if it is ever equal to 0.

Tuesday, December 3, 2013

#codemaths explained: Made to test and share code easily with students


I've since added some functionality to the #codemaths platform that will allow for easier exploration for students and some quicker editing for me (video). As I move into working with tables and graphs on a more regular basis I wanted a way to be able to display either or both of them in a question without having to recode it each time. Through the use of checkboxes a graph and/or associated table can be displayed alongside a question. I also have it set to automatically provide a link to the code (if a student gets the question wrong) so students can look under the hood of each practice question that I make for them and learn from seeing examples of working 'code'. In this example you can see the use of creating an array and sorting it so that the listbox choices are randomized a bit so the correct answer is not always in the same place.
I've also tweaked the code export a bit to be more stable so it really is just a cut and paste for me to build a question set to be used in the practice part of our learning cycle. This has been a really fun project for me as it has developed. As always I'm trying to take out some of the technical stuff so that it is more accessible to other teachers wanting to dabble in it.
To build question sets using custom code, check out this post.

Monday, November 11, 2013

#codemaths: Student outlining his approach to coding an algebra solution.

We are up and running in class today. This morning I caught a glitch that caused any use of commas to break the code but that is fixed. I had students working in class on this that were already proficient in solving equations with variables on both sides and understanding the causes for no solutions and infinite solutions.

The task for the group working in #codemaths was this:
Before you watch the video keep in mind that these students have had little or no experience up to today in writing computer code.


Saturday, November 9, 2013

Entry level point for using programming in Algebra!


After working with kids last Friday I left school thinking that maybe there is a way to get them into the idea of constraints, if statements and random variables without them having to do so much messy work early on. I'm working on making a web app that will let them enter only the constraints, variable expression, solution and worked out feedback when someone answers the question wrong. A problem I'm currently having is how to also allow for <a+b> to be replaced by the sum of the variables a and b. Right now it will only replace <a> with the variable a, etc. It does work and I am going to be working with kids this week on it. I'm pretty excited about this--it seems like a good way to integrate early JavaScript skills with my algebra class. What I see coming in the near future is evaluating expressions within sentence and making it a little more visually appealing. Here it is if you want to try it out so far.

Friday, November 8, 2013

Applying student learning to writing code


Today in class I worked with a small group of kids on applying Google Apps Script concepts to some basic algebra that they have learned in the past. I have not done anything like this before with students so I am beginning to think through some of the pieces that they will need to know. I am getting their feet wet by using the same computer generated practice template that I've been using to provide practice for students in my algebra classes.
Please know that I am not completely going computer math here--this is just what is used for the practice and remediation cycle for my students. We are still having class discussions on parallel tasks, open ended questions, pulling out algebra tiles and self-assessing our own work and understanding.
Here is a link to a presentation outlining some of the components needed to begin working in it.

Sunday, August 4, 2013

Order of operations practice with feedback


My summer hobby has turned out to be learning more programming. I want to try and create some practice for students in areas that I anticipate will need more practice. One of those earlier topics being the order of operations. Now that I have the code put together I think making future practice exercises will go much quicker. On the programming side I learned this time around how to have help text appear within the textbox and then disappear when clicked--something I wish Google forms would integrate *hint, hint*
Here's the link to the practice. There are seven question types, chosen randomly. If there is another you want me to add write it out in the comments below and I'll get it in there.
Here is a link to the code file.
*Disclaimer: rather than program a solution for division by zero I just made sure not to have any questions that would have that occur. When using division in expressions I didn't want crazy decimals so you'll always see division by 2.