Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

What small sample application can I make to learn Scala?

 
Ranch Hand
Posts: 1466
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am starting to learn scala and want to learn it by making a small sample application. what small sample application can I make to learn scala?.thanks
 
Marshal
Posts: 15638
264
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any particular reason why you couldn't think of a few yourself? When I want to practice a new language, I can usually think of a number of simple apps to try out what I've learned about the language. Just curious as to why you feel others would have a better idea of what your range of knowledge and limitations might be. Wouldn't you know better?  ¯\_(ツ)_/¯
 
Monica Shiralkar
Ranch Hand
Posts: 1466
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Different programming languages are suitable for different things. Like C is suitable for OS coding, game programming etc,  Pyhthon is suitable for data science, artificial intelligence etc. Thus I thought someone already knowing scala could guide me that which types of examples I can focus on to start with.  
 
Monica Shiralkar
Ranch Hand
Posts: 1466
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think in case of spark, It can a spark word count program and one can add small functionalities to that for further practice.
 
Sheriff
Posts: 7619
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Monica Shiralkar wrote:Thus I thought someone already knowing scala could guide me that which types of examples I can focus on to start with.


Start on basics, where you'd want to start with every language, to understand its syntax and technical capabilities. It can involve simple exercises such as find the largest number within an array of numbers.

Scala, Java, Python are general purpose languages, so to say that Python is suitable for data science, while is ok, but same saying holds I think for Scala and even Java. Python just has perhaps more libraries for data scientists, however, that does not necessarily mean if you use Python you need/must write programs which are data science project related. i.e. could be network scanner/analyser written in Python, perhaps same as in other mentioned languages too.

However, if you are interested in Scala at the moment, and looking for some niche area in it, you may want to look into akka toolkit, so you could use in combination with Scala. As for project? Could be anything, for instance twitter messages feed filter.

Something like (all happens in real time):
1. Reads your twitter messages feed.
2. Filters some of the feeds ([1] by user, [2] by keywords in feed, [3] by ...) and shows only them.
3. Prints them in console live?

Might be pointless project, but you'd learn something along the way for sure.
 
Bartender
Posts: 3959
155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I did a course in Scala, the three things that struck me first were: functions in functions, the heavy use of recursion, and a bit later the beauty of Pattern Matching. So I practised with simple exercises like reversing a List, making a frequency list of characters in a string (ending up with a List[Pair] "(a, 3), (b, 2), ..." and more of these basic problems.
 
Monica Shiralkar
Ranch Hand
Posts: 1466
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all. Apart from these I think I can take Spark Word Count of Scala (since I know Spark too)  and start adding small changes in it for practice.
 
Your mother was a hamster and your father was a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic