Skip to main content
Log in

Scratch-Rec: a novel Scratch recommendation approach adapting user preference and programming skill for enhancing learning to program

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Among teenagers, online programming learning platforms, such as Scratch, have obtained promising achievements for guiding beginners. However, with the ever-growing number of users, there is an urgent issue that learners are confused by the massive amounts of programming resources and cannot find projects that fulfill their tastes and programming skills. To tackle this issue, we propose Scratch-Rec, which is a novel Scratch recommendation model considering programming preferences and programming skills, to help users find suitable programming resources. In Scratch-Rec, we first design a project embedding scheme to convert projects into vectors that preserve source code features and semantic features. Based on the embeddings, we propose a water wave diffusion model to analyze users’ diverse preferences and aggregate their programming preferences along links in a user-project interaction graph. To track the evolving programming skills of users, we advance a programming skill learning model that combines long-short term memory networks (LSTM) with an attention network. LSTM models the time-dependency programming skills while the attention network weighs the importance of projects. Then, users’ programming preferences and programming skills are merged and input to multilayer perceptron neural networks for final probability predictions. Extensive experiments on the Scratch dataset show that Scratch-Rec performs better than other state-of-the-art models in recommending programming projects.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. https://scratch.mit.edu

  2. https://scratch.mit.edu/explore/projects/all

  3. https://github.com/phanein/deepwalk

  4. https://github.com/leoribeiro/struc2vec

  5. https://github.com/hwwang55/GraphGAN

  6. https://github.com/CRIPAC-DIG/SR-GNN

References

  1. Techapalokul P, Tilevich E (2019) Code quality improvement for all Automated refactoring for scratch. In: 2019 IEEE Symposium on visual languages and human-centric computing (VL/HCC). IEEE, pp 117–125

  2. About scratch. Available at https://scratch.mit.edu/about. Accessed on Oct 20, 2020

  3. Yang Y, Yi Z, Li Y (2021) Personalized recommendation with knowledge graph via dual-autoencoder. Appl Intell:1–12

  4. Zhou G, Zhu X, Song C, Fan Y, Zhu H, Ma X, Yan Y, Jin J, Li H, Gai K (2018) Deep interest network for click-through rate prediction. In: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp 1059–1068

  5. Zhou G, Na M, Fan Y, Qi P, Bian W, Zhou C, Zhu X, Gai K (2019) Deep interest evolution network for click-through rate prediction. In: Proceedings of the AAAI conference on artificial intelligence, vol 33, pp 5941–5948

  6. Ma J, Zhao Z, Yi X, Chen J, Hong L, Chi EdH (2018) Modeling task relationships in multi-task learning with multi-gate mixture-of-experts. In: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp 1930–1939

  7. Li Z, Zhao H, Liu Q, Huang Z, Mei T, Chen E (2018) Learning from history and present: Next-item recommendation via discriminatively exploiting user behaviors. In: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp 1734–1743

  8. Feng Y, Lv F, Shen W, Wang M, Sun F, Yu Z, Yang K (2019) Deep session interest network for click-through rate prediction. In: Proceedings of the 28th International Joint Conference on Artificial Intelligence. AAAI Press, pp 2301–2307

  9. Maxim N, Dheevatsa M Dlrm: An advanced, open source deep learning recommendation model. Available at https://ai.facebook.com/blog/dlrm-an-advanced-open-source-deep-learning-recommendation-model/. Accessed on Sep 11, 2021

  10. Moreno-León J, Robles G, Román-González M (2015) Dr. scratch: Automatic analysis of scratch projects to assess and foster computational thinking. RED Rev Educ Distanc (46):1–23

  11. Dhariwal S (2018) Scratch memories: a visualization tool for children to celebrate and reflect on their creative trajectories. In: Proceedings of the 17th ACM Conference on Interaction Design and Children. ACM, pp 449–455

  12. Krafft M, Fraser G, Walkinshaw N (2020) Motivating adult learners by introducing programming concepts with scratch. In: Proceedings of the 4th European Conference on Software Engineering Education, pp 22–26

  13. Qi P, Sun Y, Luo H, Mohsen Guizani M (2020) Scratch-dkg: A framework for constructing scratch domain knowledge graph. IEEE Trans Emerg Top Comput:1–1. https://doi.org/10.1109/TETC.2020.2996710

  14. Moreno-León J, Robles G, Román-González M (2020) Towards data-driven learning paths to develop computational thinking with scratch. IEEE Trans Emerg Top Comput 8(1)

  15. Gao Z, Qiu L, Qi P, Sun Y (2020) A novel music emotion recognition model for scratch-generated music. In: 2020 International wireless communications and mobile computing (IWCMC). IEEE, pp 1794–1799

  16. Zhao S, Qiu L, Qi Px, Sun Y (2020) A novel image classification model jointing attention and resnet for scratch. In: 2020 International wireless communications and mobile computing (IWCMC). IEEE, pp 1498–1503

  17. Chang Z, Sun Y, Wu T-Y, Guizani M (2018) Scratch analysis tool (sat): a modern scratch project analysis tool based on antlr to assess computational thinking skills. In: 2018 14Th international wireless communications and mobile computing conference (IWCMC). IEEE, pp 950–955

  18. Chai X, Sun Y, Luo H, Guizani M (2021) Dwes: A dynamic weighted evaluation system for scratch based on computational thinking. IEEE Transactions on Emerging Topics in Computing. https://doi.org/10.1109/TETC.2020.3044588

  19. Moreno-León J, Robles G, Román-González M (2016) Comparing computational thinking development assessment scores with software complexity metrics. In: 2016 IEEE Global engineering education conference (EDUCON). IEEE, pp 1040–1045

  20. Park J (2019) Evaluation of computational thinking through code analysis of elementary school students’ scratch projects. J Korean Assoc Inf Educ 23(3):207–217

    Google Scholar 

  21. Topalli D, Cagiltay NE (2018) Improving programming skills in engineering education through problem-based game projects with scratch. Comput Educ 120:64–74

    Article  Google Scholar 

  22. Gutierrez FJ, Simmonds J, Hitschfeld N, Casanova C, Sotomayor C, Peña-Araya V (2018) Assessing software development skills among k-6 learners in a project-based workshop with scratch. In: 2018 IEEE/ACM 40Th international conference on software engineering: Software engineering education and training (ICSE-SEET). IEEE, pp 98–107

  23. Marcelino MJ, Pessoa T, Vieira C, Salvador T, Mendes AJ (2018) Learning computational thinking and scratch at distance. Comput Hum Behav 80:470–477

    Article  Google Scholar 

  24. Hermans F, Aivaloglou E (2017) Teaching software engineering principles to k-12 students: a mooc on scratch. In: 2017 IEEE/ACM 39Th international conference on software engineering: Software engineering education and training track (ICSE-SEET). IEEE, pp 13–22

  25. Jiang Y, Yan S, Qi P, Sun Y (2020) Adapting to user interest drifts for recommendations in scratch. In: 2020 International wireless communications and mobile computing (IWCMC). IEEE, pp 1528–1534

  26. Cardenascobo J, Puris A, Novoahernandez P, Galindo JA, Benavides D (2020) Recommender systems and scratch: An integrated approach for enhancing computer programming learning. IEEE Trans Learn Technol 13(2):387–403

    Article  Google Scholar 

  27. Liang H (2020) Drprofiling: deep reinforcement user profiling for recommendations in heterogenous information networks. IEEE Transactions on Knowledge and Data Engineering. https://doi.org/10.1109/TKDE.2020.2998695

  28. Zhao X, Gu C, Zhang H, Yang X, Liu X, Liu H, Tang J (2021) Dear: Deep reinforcement learning for online advertising impression in recommender systems. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol 35, pp 750–758

  29. Liu Z, Yuan B, Ma Y (2021) A multi-task dual attention deep recommendation model using ratings and review helpfulness. Appl Intell:1–13

  30. Wu S, Tang Y, Zhu Y, Wang L, Xie X, Tan T (2019) Session-based recommendation with graph neural networks. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol 33, pp 346–353

  31. Guo Q, Zhuang F, Qin C, Zhu H, Xie X, Xiong H, He Q (2020) A survey on knowledge graph-based recommender systems. IEEE Transactions on Knowledge and Data Engineering. https://doi.org/10.1109/TKDE.2020.3028705

  32. Wang H, Zhang F, Zhang M, Leskovec J, Zhao M, Li W, Wang Z (2019) Knowledge-aware graph neural networks with label smoothness regularization for recommender systems. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp 968–977

  33. Wang H, Zhang F, Wang J, Zhao M, Li W, Xie X, Guo M (2019) Exploring high-order user preference on the knowledge graph for recommender systems. ACM Trans Inf Syst (TOIS) 37(3):1–26

    Article  Google Scholar 

  34. Wang H, Zhang F, Xie X, Guo M (2018) Dkn: Deep knowledge-aware network for news recommendation. In: Proceedings of the 2018 world wide web conference, pp 1835–1844

  35. fasttext library for efficient text classification and representation learning. Available at https://fasttext.cc/. Accessed on Oct 10, 2020

  36. Khatua A, Khatua A, Cambria E (2019) A tale of two epidemics Contextual word2vec for classifying twitter streams during outbreaks. Inf Process Manag 56(1):247–257

    Article  Google Scholar 

  37. Zhang X-Y, Yin F, Zhang Y-M, Liu C-L, Bengio Y (2017) Drawing and recognizing chinese characters with recurrent neural network. IEEE Trans Pattern Anal Mach Intell 40(4):849–862

    Article  Google Scholar 

  38. Hu X, Ge L, Xia X, Lo D, Jin Z (2018) Deep code comment generation. In: 2018 IEEE/ACM 26Th international conference on program comprehension (ICPC). IEEE, pp 200–20010

  39. Liu T, Yu S, Xu B, Yin H (2018) Recurrent networks with attention and convolutional networks for sentence representation and classification. Appl Intell 48(10):3797–3806

    Article  Google Scholar 

  40. Sachdev S, Li H, Luan S, Kim S, Sen K, Chandra S (2018) Retrieval on source code: a neural code search. In: Proceedings of the 2nd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages, pp 31–41

  41. Greff K, Srivastava RK, Koutník J, Steunebrink BR, Schmidhuber J (2016) Lstm: A search space odyssey. IEEE Trans Neural Netw Learn Syst 28(10):2222–2232

    Article  MathSciNet  Google Scholar 

  42. Lee JB, Rossi RA, Kim S, Ahmed NK, Koh E (2019) Attention models in graphs A survey. ACM Trans Knowl Discov Data (TKDD) 13(6):1–25

    Article  Google Scholar 

  43. Tang J, Ke W (2018) Personalized top-n sequential recommendation via convolutional sequence embedding. In: Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, pp 565–573

  44. Alon U, Zilberstein M, Levy O, Yahav E (2019) code2vec: Learning distributed representations of code. Proc ACM Programm Lang 3(POPL):1–29

    Article  Google Scholar 

  45. Alon U, Brody S, Levy O, Yahav E (2019) code2seq: Generating sequences from structured representations of code. In: International conference on learning representations

  46. Stahlberg F (2020) Neural machine translation: A review. J Artif Intell Res 69:343–418

    Article  MathSciNet  Google Scholar 

  47. Wan Y, Zhao Z, Yang M, Xu G, Ying H, Wu J, Philip SY (2018) Improving automatic source code summarization via deep reinforcement learning. In: Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, pp 397–407

  48. Perozzi B, Al-Rfou R, Skiena S (2014) Deepwalk: Online learning of social representations. In: Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, pp 701–710

  49. Ribeiro LFR, Saverese PHP, Figueiredo DR (2017) struc2vec: Learning node representations from structural identity. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, pp 385–394

  50. Wang H, Wang J, Wang J, Zhao M, Zhang W, Zhang F, Xie X, Guo M (2018) Graphgan: Graph representation learning with generative adversarial nets. In: Thirty-second AAAI conference on artificial intelligence

Download references

Acknowledgments

This work is partly supported by the National Natural Science Foundation of China under Grant 61877005 61772085 and 62172051.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yan Sun.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Qi, P., Sun, Y., Luo, H. et al. Scratch-Rec: a novel Scratch recommendation approach adapting user preference and programming skill for enhancing learning to program. Appl Intell 52, 9423–9440 (2022). https://doi.org/10.1007/s10489-021-02970-7

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-021-02970-7

Keywords

Navigation