Comments about sbt 1.0 – The Interactive Build Tool by Josh Suereth

There’s a bunch of video recordings from the NE Scala 2014 and I couldn’t resist to comment on Sbt 1.0 – The Interactive Build Tool by Josh Suereth. It’s 23 minutes about what’s coming in sbt 1.0 and the future of sbt.next.

Continue reading »

Tools 2 Comments

Final thoughts on #ScalarConf = #Scala conference in Central #Europe

tl;dr It was the very first Scala-only conference in Poland. The conference was a massive success and with so many friends in one place and the good technical content with the incredible speaker’s line-up I wish it’d lasted longer for me. Kudos to the conference team, the speakers and the audience!

Continue reading »

Conferences 1 Comment

Go in Action from Manning and go installed

I’ve been hearing about the Go programming language here and there and when I’ve seen the freely available chapter from the upcoming book Go in Action from Manning I thought I’d give it a go. It’s an introductory material to Go and the why’s one could pick the language for the next project. What I liked about the chapter — yes, you’re reading it right, about the chapter not the language — were the questions to answer before picking a language, which in this case is Go. If a language wants to stand out it either has to offer a perfect implementation of an already-available-somewhere-but-not-so-elegantly-implemented feature or find its niche and hence face new challenges that lead to new criteria for a language. I have never considered quite a few before, and they do point out useful language features. It could only be for the additional features of how to select a language for a project that the chapter is worth your time.

Continue reading »

Languages 1 Comment

WarszawScaLa UG coding session = Scalania 13 in Javart

I’ve been publishing my sentiments on the coding sessions called scalania under WarszawScaLa User Group on my Polish blog, but the ideas that are inspired by or spring out of them are worth spreading to wider audience and hence this one is here, in English (hoping that new ones come up or current ones got improved here and there).

Continue reading »

Languages , Leave a comment

What a pleasant experience – reading Pro Git book in Readmill on Samsung Galaxy S3

I keep trying out different approaches to absorb knowledge. I’m on GitHub to learn git and get skilled in a new way of software development which I call social development with people and projects I would’ve never been part of otherwise. Same for StackOverflow or twitter – yes, you’re reading it right – twitter – that can be as inspiring and offering an unabridged wealth of (implicit “linked”) knowledge when used appropriately as time devastating and without purpose.

I must admit I couldn’t have gotten used to one thing that seem so prevalent – using the many different kinds of devices to read books, articles or simply browsing the web. I seemed to have lived with paper books for so long that I couldn’t have stopped reading them on paper. It was part of me. Even when I had ebooks I couldn’t simply read them in that format, but was printing them out and was walking with paper sheets – the books – everywhere. It was very tiresome.

It has all changed once I bought my first smartphone – Samsung Galaxy S2. Then few months with Apple iPad 2 and I promised myself that with Samsung Galaxy S3 I’m gonna give book reading on a smartphone a serious try. And so I did. Something clicked. I was testing different ebook readers and got curious about Readmill on Android.

That’s not much git in my team in Citi. I wish we moved to git already, but it’s something we will do one day. There’re few attempts to work it around and practical knowledge of git is in growing demand.

There’s the Pro Git book, written by Scott Chacon and published by Apress available in Readmill. I couldn’t resist giving it a read. The reading went so well that I think I nailed it down. I may have become a ebooks-reading-on-smartphone convert.

The book was one of the very few books I’ve read recently that so easily introduced me to the topic of using Git as a common end user as well as showing its internals so I could feel more comfortable with the tool later on. Narrative was engaging and it was hard to get bored or overwhelmed with details. The book seems to have showed all I needed to become git power user. Highly recommended reading!

“Next book?” you asked? Functional Programming in Scala by Paul Chiusano and Rúnar Bjarnason from Manning has just been updated in chapters 1-15 with more updates to 7-15 soon. That’s what’s on my reading plate now.

Tools Leave a comment

project and projects commands in sbt

While reviewing the source code of sbt, I stumbled upon sbt.CommandStrings. I’d swear I’d been looking at the class so many times yet it was only today when I noticed how powerful the commands – projects and project – are. Even the official documentation of sbt is almost silent on the commands.

I simply couldn’t resist let the #scala twitterland know how mind-boggling the news was to me.

tweet-about-sbt-project-command_2014-01-06_2203

So to let you gain a little wisdom about sbt, I’ll let their detailed help speak for themselves.

[root]> help project
project

  Displays the name of the current project.

project name

  Changes to the project with the provided name.
  This command fails if there is no project with the given name.

project {uri}

  Changes to the root project in the build defined by `uri`.
  `uri` must have already been declared as part of the build, such as with Project.dependsOn.

project {uri}name

  Changes to the project `name` in the build defined by `uri`.
  `uri` must have already been declared as part of the build, such as with Project.dependsOn.

project /

  Changes to the initial project.

project ..

  Changes to the parent project of the current project.
  If there is no parent project, the current project is unchanged.

  Use n+1 dots to change to the nth parent.
  For example, 'project ....' is equivalent to three consecutive 'project ..' commands.

[root]> help projects
projects
  List the names of available builds and the projects defined in those builds.

projects add <URI>+
  Adds the builds at the provided URIs to this session.
  These builds may be selected using the project command.
  Alternatively, tasks from these builds may be run using the explicit syntax {URI}project/task

projects remove <URI>+
  Removes extra builds from this session.
  Builds explicitly listed in the build definition are not affected by this command.

Questions? Comments? See you on StackOverflow.

Languages, Tools , Leave a comment

“What if I had” vs “As I have” – “observables” on data streams before the kid falls asleep

It has just struck me when I was putting my 2-year kid to bed…

My professional career as a software developer was mainly zoomed in on what I’ve already had here and now with little to no use cases where I’d have had to compose computations that’d be realised at a moment in the future when I’d have what I wish I had. It was back then when I was a mere Java software developer (and thought that the only right programming approach/paradigm is imperative, object-oriented one).

These times went by and am now more often exposed to a variety of problems that are considered the domain of functional languages like Scala, Clojure or F#. The concepts of the languages are often in opposition to what I already learnt and are causing severe mental pains that only the moments of putting my kid to bed can offer relief to.

I know what I can do in my program here and now, but had no idea what I’m gonna do when an event occurs or when a thing gets available in the future, say a task completes.

In other words, I can easily develop an application that would process a sequence of elements, but am short of experience with use cases where I’ve got an infinite stream of elements that I may or may not want to process at some point in time not necessarily at the exact line the expression is defined. I got used to the procedural/imperative thinking a lot. It became me.

It doesn’t then help me much when I face use cases with streams where you compose functions lazily and only when you call a function that does the processing they all get called and have their effect on the stream. I tend to consider streams (= infinite and lazy sequences) eager ones. I tend to consider problems as working with bits already in my memory space.

The idea behind composing computations lazily and be able to apply them to infinite and lazy data streams is to think what you’d do with them once the right moment occurs that is quite often not the moment they’re composed together. I need to wait and observe, and that’s something I haven’t mastered yet. Time to change it (as the moment to make resolutions is approaching fast – a mere couple of days away – it however is one already).

Funny enough, it appears that the blog post may’ve been an example of an infinite stream of loosely coupled thoughts that have been passing through my head while putting my kid to sleep. One of the very few moments where I can tune in to a steady continuous sound of his breath and…think harder. Thanks, kid!

Languages , Leave a comment

Mastering Scala, sbt and Play, and having fun on GitHub and StackOverflow

I’m a strong believer and big proponent of using social development platforms as a highly productive means of rising my own programming experience and expertise.

Quite recently I’ve decided to be more visibleactive on StackOverflow because 1) sbt’s users mailing list moved to the platform, 2) as a way to learn the Scala build tool as well as Scala and Play, and 3) compete with some of my colleagues.

At the same time, I’ve been using GitHub to master git and a variety of collaborative development practices (I could apply to my personal and commercial projects), esp. the concept of pull requests.

Being on StackOverflow and GitHub is fun and with enough patience and care will surely rise your expertise. They both could eventually become an integral part of your public CV (with Twitter, LinkedIn, and SlideShare amongst the other useful social development sites…if used wisely).

I’ve really been enjoying this kind of professional development. You can socialise with people you may never see in person yet be guided by their expertise and feel an integral part of a developers community.

There’re plenty of ways to gain knowledge on the sites – simply reviewing questions, changing their title and content to make them more relevant and useful on StackOverflow or review changes and pull requests on GitHub – are just a few ways on their practical use. It doesn’t require much – just patience and care.

Few days back, I ran a scalania meeting where I was encouraging this kind of personal development and as an example pointed at the issues labeled “community” in the Play Framework project on GitHub and picked one – Rewrite play start to use play stage and run the start script from that. I hardly understood what the issue was about so I commented it to seek help. The answer came the next day and was very welcome to further collaboration. What I really liked was the sentence “Doing this issue would more be an introduction to SBT than an introduction to Play.” Since I’m currently more into sbt than Play Framework it was exactly my wish and I couldn’t believe how right my random choice was! Inconceivable.

Another example, just a few days back I opened the recent version of IntelliJ IDEA 13 Community Edition to learn sbt by reviewing the source code of the sbt-updates plugin that “can check maven repositories for dependency updates”. I’ve been using it for some time now and found it very useful. I knew it’s pretty small code-wise so with one hour free time I decided to give it a go. The journey ended up with two pull requests – one to README.md file using GitHub’s approach where a file once changed may eventually become a pull request with a few mouse clicks and the other on a separate feature branch I then pushed to the repo as another pull request. Easy and so much fun!

While on the sbt-updates plugin, I learnt how to configure sbt so libraryDependencies are different per sbtVersion in sbtPlugin (see the Files Changed for the pull request). I wasn’t sure whether or not it’s the right way to do it so I asked a question and answered it at once at StackOverflow – How to specify different libraryDependencies per sbtVersion in sbtPlugin with sbt-cross-building and sbt 0.13?. A StackOverflower liked it so I scored additional points for the question and the answer! With the answer of Daniel C. Sobral I learnt some more about sbt and Scala. That’s exactly the way to master different tools while having so much fun!

Check it out and see yourself how much the different social development platforms can do to improve your professional development. They’ve been working so well for me for the past couple of months and am sure they will in days to come.

What’s your take on using the many social development platforms? How are you finding StackOverflow or GitHub as a way to pursue your professional career? What other social sites would you recommend that would help me becoming a better software developer?

Uncategorized , 1 Comment

Trying out different development environments for Scala – Sublime Text 3 + REPL in iTerm

I am still unsure about the right development environment for my Scala developments.

At work it’s the very latest version of IntelliJ IDEA 13 with the Scala plugin (Windows 7) while at home I’m trying out other setups (Mac OS X). IDEA’s too much at times. I can’t seem to get fully up to speed with Sublime Text 3 either, perhaps because I’m not fully convinced it’s going to be my only development environment any time soon. People are using it with a great success, but the same may be said about Emacs or even Scala IDE.

Emacs is what many call the most powerful IDE, almost an operating system, but that is exactly what scares me a lot. Scala itself consumes a lot of my time, and with Emacs I’d have it less (or more when I’d learn it?). Let’s stick with something simpler. If however I could find a well written step-by-step document on how to get up to speed with Emacs and Scala, I might give it a try. Anyone?

Scala IDE is the IDE used by the author of the Scala language – Martin Odersky – while he’s teaching the courses on Coursera. It seems a de facto reference IDE for Scala development, but it’s Eclipse under the covers and I lost interest in using it (after I left IBM). I’m certainly sold to IDEA when picking up a full-blown IDE (I know nothing about the Scala support in NetBeans IDE).

With these mixed feelings I’m with Sublime Text 3 and sbt (console).

doing-exercises-fp-in-scala-sublime-repl

It’s however not a very productive environment for Scala newbies – no intellisense for Scala in Sublime Text gives very hard lessons. While there’s the excellent continuous relaunching a command, say test, with tilde (~), I haven’t yet learnt to have them upfront and often end up with just a bunch of Scala files that I load to REPL with :load completely overcoming SBT features that would help me upon saving.

What’s your development environment for Scala? I’d appreciate comments so they could help me find it and eventually focus on Scala rather than looking around for an development environment.

Languages, Tools Leave a comment

Week 1 Quickcheck in Principles of Reactive Programming course on Coursera – 10.00 out of 10.00

I’m on the devoxx conference in Antwerp, Belgium. Too bad that the past couple of days I’ve been spending on Week 1’s Quickcheck assignment in the Principles of Reactive Programming course on Coursera. I simply couldn’t let it go past me without a solution that would give me the whole 10 points! I simply couldn’t.

So I was solving the exercise and the first and higest score was 8.33. Doh! How could that have happened?! I was doing my best and the second submission was nothing better – 8.33 again!

It took me some time reading here and there about ScalaCheck, watching the videos over and over again, just to find the opportunity to bump up the score. I wish I had been smarter, but it was merely this thread How many tests did you write for the assignment? where I found the inspiration. It worked out very well and the score ended up 10.00/10.

coursera-reactive-quickcheck-score

I remember the moment when I wrote a property and the tests went green. That made my day.

coursera-reactive-quickcheck-tests-greenAs it was just before the final time for the solution, I was a bit worried how much off the clock I am and whether or not the solution gets the score. It was 7 minutes to the due date.

It didn’t take long to see the final result – 10.00 out of 10.00 – that’s what I was looking forward to while doing the exercise.

coursera-reactive-quickcheck-score-feedbackTime to socialize! On to Devoxx…

 

Languages , 2 Comments