Friday, 25 December 2015
Friday, 18 December 2015
Sunday, 29 November 2015
Learning Java Collections and Interfaces with Frogs, Sheep and Owls
A couple of days ago a funny drawing from Twitter caught my eye. I thought it would make a good exercise for kids learning Java. Here it is:
I had thought the exercise would be easy, but when I started to sketch a program to solve the puzzle I realized that was not the case. Knowledge of Java collections and interfaces seemed to be neccessary. Moreover, teaching the computer how to determine X, knowing that X*X*X = 27, raised unexpected issues:
I am looking forward to your opinions in the comments below or at Moodle Cloud.
For some lunch time #fun: are you able to #solve this #mathquiz? https://t.co/cZWVc26P2b
#justforfun #math pic.twitter.com/YWmVM9yezd
— sqlbythebook (@sqlbythebook) November 24, 2015
I quickly drafted a model and saved it at GitHub:I had thought the exercise would be easy, but when I started to sketch a program to solve the puzzle I realized that was not the case. Knowledge of Java collections and interfaces seemed to be neccessary. Moreover, teaching the computer how to determine X, knowing that X*X*X = 27, raised unexpected issues:
Trying to figure out why Math.pow(27,1/3) returns 1 https://t.co/JA1cnnshQp
#java
— C. Fierbinteanu (@inafierbinteanu) November 26, 2015
What do you think? Are these quizzes helpful in teaching kids programming?I am looking forward to your opinions in the comments below or at Moodle Cloud.
Sunday, 11 October 2015
Five Things To Remember About The Map Interface
- Maps are collections of key-value pairs.
- The keys are unique.
- Several keys can refer the same value.
- TreeMap implements SortedMap.
- The Map interface does not extend java.util.Collection.
Saturday, 15 August 2015
Teaching With Moodle
I'm very much enjoying the Moodle MOOC https://learn.moodle.net/course/view.php?id=6744.
I've just created a Cloze question in my practice course based on Yakov Fain's book Java Programming for Kids https://learn.moodle.net/course/view.php?id=6861.
I've also installed and played a little with Moodle Mobile. I find it awesome!
Won't you join me learning Java, with Moodle?
References
Saturday, 18 April 2015
How to learn from scratch
Motto:
I think that writing great computer programs is like writing wonderful poetry. Nobody can teach us the creative act. But we all have to learn how to write, in order to be able to handle correspondence related to our taxes, for instance. And to be able to read great poetry.
Similarly, we should all learn how to program computers, in order to be able to program our refrigerator, for instance. And to be able to read and appreciate wonderful computer programs (and programmers).
@ossia @rurounikz so, how to learn from scratch?
— Angelo Dias (@angelod1as) April 16, 2015
I think that writing great computer programs is like writing wonderful poetry. Nobody can teach us the creative act. But we all have to learn how to write, in order to be able to handle correspondence related to our taxes, for instance. And to be able to read great poetry.
Similarly, we should all learn how to program computers, in order to be able to program our refrigerator, for instance. And to be able to read and appreciate wonderful computer programs (and programmers).
Saturday, 14 February 2015
JavaFX Scene With Shapes
If a scene has only shapes, requestFocus() must be used explicitly before being able to process keyboard events.
I tried it myself! See below.
SceneWithShapes.java
FXMLDocument.FXML
FXMLDocumentController.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package scenewithshapes; import java.net.URL; import java.util.ResourceBundle; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Label; import static javafx.scene.input.KeyCode.A; import javafx.scene.input.KeyEvent; /** * * @author Cristina */ public class FXMLDocumentController implements Initializable { @Override public void initialize(URL url, ResourceBundle rb) { // TODO } public void keyHandler(KeyEvent event){ System.out.println("A Key was pressed"); } }
|
Bibliography
Subscribe to:
Posts (Atom)