2

I am currently learning Scala and I find a mental blog of how to proceed to a degree where I can use Scala daily beyond the normal examples. I just do not have a particular project in mind of what I can do.

This is not really Scala specific in mind, just generally how do you get yourself proficient in a language via self learning without doing / having a project in your hand?

  • 4
    projecteuler.net – Doc Brown Jan 13 '14 at 6:44
  • 8
    You can't. Whatever you achieve in a language that is extensive enough to make you reasonably proficient is, by definition, your first project. – Kilian Foth Jan 13 '14 at 6:57
  • 1
    Its very difficult to become skilled in any language without applying your knowledge to a practical project. – GrandmasterB Jan 13 '14 at 7:27
7

You set yourself a small project, sometimes enlarging an existing code example, sometimes thinking about the language's strengths - e.g., if you're learning a language designed for practical extraction and reporting, you'll aim for some kind of extraction report, say, a log analyzer.

The fact is that whatever makes you pull your weight in any given language is a project. Even if the project aim is "learn me this language".

So with Scala, you might try with a simple web service producing/consuming XML packets (there are small examples for that; you can start by studying them and tying them together).

You'll want to start small because this kind of project, with a none-too-defined goal, tends to snowball; for example you might decide to develop both a web service and its client. This snowballing isn't a bad thing if you keep it under control, that is, you do not bite more than you can chew at any one time. You might be tempted to add database querying before you're sure of your "web service management" skills; if you do, you risk reaping an overwhelming crop of bugs and grow dissatisfied and disillusioned about the language and/or your own skills. Better to return mock-up data and placeholders for all the things you're not yet assured of; that will also give you a measure of how many topics you still have to cover.

This, however, is just my own point of view. You might want, or even need, to find your own way, the one that suits you best.

3

If you already have (small) projects in another language that are also suited for you new language. Try rewrite one of those projects to your new language and then trying to follow as much as possible the best practices of your new language.

This will help illustrate the differences in thinking you need between two different approaches. And help avoid the pitfall of "programming the old way in a new language". This helped me a lot with not using "old" contructs. Which would happen if I tried a new project in a new language.

2

You can come up with a small project on your own and start doing it. Initially don't go for large or hifi projects. A small simple project will be enough. Start building it up by using more and more concepts of that language.

  • +1 for suggesting the use of more and more concepts in projects used for learning a new language. – Jay Elston Jan 13 '14 at 14:48
2

I always consider reading other people's code important part of learning how to program both generally and in a specific language. So I would recommend to find an open-source project that uses Scala and does something that might be interesting for you and to try to contribute to it.

Every open-source project has untriaged bugs they will be happy to get help with and some of them will surely be easy enough for you to fix. Doing that you'll learn to understand Scala code written by others (languages with high level of abstraction like Scala tend to be difficult in this regard) and you'll see on real-world, non-contrived, examples how well various features work out in terms of readability and maintainability. You'll also be discussing your changes with the other people on the project and hopefully getting some useful mentoring that way.

When you start your own project, you'll have a period of writing the foundations when you won't have anything working to show and nobody will be using your work and if you won't have much time, you may never see how it fares in practice. By joining an existing project you can skip that phase and you can make a practical difference even if you find yourself with not so much time for it.

1

Sometimes it can be hard to start a project or contribute to open-source projects when you have little experience. My suggestion would be to find a framework that uses Scala and start working with that. I know the Play Framework uses Scala and there are plenty of tutorials and videos out there for that framework.

Just start by building a simple site that does some CRUD operations using the Play Framework. That will get you a little experience without having to build everything from scratch.

0

Nothing replaces a real project, but I find Code Katas are a good way to get your hands dirty solving real problems with the language. The nice thing is, many solutions are available online so you'll be able to compare them with your own and hopefully learn from that. It will also make you more familiar with a test environment.

There are some Scala specific katas out there as well as platforms where you can submit your solutions and get feedback on them.

Not the answer you're looking for? Browse other questions tagged or ask your own question.