• 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

What small sample application can I make to learn Scala?

 
Ranch Hand
Posts: 1257
6
  • 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: 14049
234
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: 1257
6
  • 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: 1257
6
  • 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.
 
Marshal
Posts: 7181
491
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: 3517
150
  • 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: 1257
6
  • 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.
 
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!