Hi guys! This is my second post of fun and exciting computer science blog. Today I will talk about the fabulous functional programming language scala. Have you guys heard about it before? Actually it was my first time using functional language, so I had to suffer a little. But eventually I think it is very efficient and good looking language.
So what is functional programming? In wikipedia, it says - a style of building the structure and elements of computer programs. Functional programs are based on mathematical and implemented computational models, therefore there are lots of efficiency when the user is calling the exisitng function. On the other hand, it is harder to use for the user who are used to objective language such as java or c++. Ironically, scala is based on java. There are several other types of functional programming languages as well such as ocaml,
One thing that I really enjoyed about this project is that this project actually resembles machine learning technique. When I see those phenomenal machine learning methods, I've always wondered what would be the sufficient input and how do they calculate the result based on limited number of data. It was good opporutnity for me to think about the actual implementation of machine learning algorithm. For this project, it takes dining histories and restaurants' information in the mall. It would be way simpler if we know which paramaters we can take in real world. For example, in my ideal scenario, recommendation of restaurant should take way more than just two parameters. Let's say if I have an access to all the dats including the personal and physical datas. I totally agree that thosetwo parameters we take in the project also has a great rule in actual world as well, but I think it needs more restrictions. If I think about going to the restaurant with group of people, the most thing I would consider is how much money I would like to spend on a one meal. If it's group of college students, even though we all like Japanese food and there is a Japanese restaurant in the mall, if the restaurant is expensive our group probably cannot afford it. Secondly, the occasion is another important parameter that should be considered. For example, if it's a first date, you probabily don't want to take your partner to McDonald's just because both of you guys love chicken nuggets. Furthurmore, this extends to the weight of each parameters. Some parameters should be considered more importatnly than others. For example, if there is a vegetarian friend in your group, you have to limit your group's choice into reataurnts serve vegetarian food. Under our project, it will never figure out under the heruistics the instruction provided. In realistically, there is no such machine learning program that reflects 100% of circumstances (...maybe yet). However, if we specify the weight and the order of herustics carefully, it will imporove the choice of recommendation.
The most thing I like about functional language is usage of recursive. Recursive functions has been my favorite way to iterate the functions every since 1114. I like the way it calcualtes that startaing one method techincally don't end until the end of the iteration.
Personally, I would love to learn more about functional languages, but at this point, I would prefer objective langauges such as java or python over scala. There are so much great things about functional languages such as implemented graph algorithm, search, and sorting algorithms, but it takes time to get familar with those functions. From this project, I actually never heard about currying the function, but I had thought about the concepts before. When I was writing the code with 3 parameter, what would happen if I just put two? Currying enables to those choices by deafulating and specialize partial parameters. It is very interesting approach to see that even the computer language program can understand the purpose of the functions. In real world, people often make those mistakes without clarify the variables. Such as answering without specifying the meanings. For example if someone says "I had Indian food yesterday", it could be the answer for "Where did you have for dinner yesterday" or "What do you want for lunch today?". In the former question, it is a simple statement, but the latter one can be taken as "I don't want to go Indian restaurant".