-
Jekyll To Hugo Migration Notes
This blog is statically generated page hosted on my GitHub. Till recently the job of generating static files was handled by Jekyll. I didn’t do a lot of research before I first used it. I don’t think it would really help in my case. I used Jekyll because GitHub has support for it and it was convenient. I could store only the sources and GitHub will automatically compile the page when I push some changes.
Read more » -
The Cake Pattern
Let’s think a bit about how you should structure your program. If your codebase has less than 500 lines of code it is not really that hard to manage. You can simply manually create the objects and their dependencies to construct your application. The problem emerges when your codebase grows. Managing hundreds of dependencies manually is a tedious task. We need some kind of mechanism to do that for us.
Read more » -
Custom Collectors in Java 8
Java 8 sure did bring a few interesting features. One of them are definitely the streams. Internet is full of the instructions on how to create and use them. Today I’d like to talk about something a little bit different - collectors. What is a collector? Streams can be used to process collections. The way it works is that we first define all transformations on the collection with non-terminal operations like map, flatMap, filter, etc.
Read more » -
The Mighty Monad
When you begin to learn functional programming everybody is telling you that pure functions with no side effects are the only way to go. This is fine up to the point. Sooner or later you will hear about monads. This post tries to explain what the monad is and why you should use it. Prerequisites To fully understand the examples here you should know at least basics of Scala language.
Read more » -
No one expects the Spanish functions
Scala, as a functional language, treats functions as first class citizens. Of course it’s also object oriented language. Those two paradigms can be seen as conflicting with each other. In this post I’d like to show you some different ways of creating a functions in Scala to show that these two worlds can coexist. Foreword Function Let us start by defining what a function is. Wikipedia supplies us with this:
Read more » -
Optional in Java 8
Recently I’ve been a part of self-educating team. My workmates and I decided to learn Java 8 features so we could use it at work. Each of us have one or two topics to cover and we had to teach each other about the cool new features like streams or better type inference. My part was to cover the Optional class, and today I’d like to show and explain how and why you should use it.
Read more » -
Why I abandoned my old blog?
This blog has very little content, but I’m not new to blogging at all. In fact I’ve been publishing my thoughts and ideas online for a few years now. The only problem is that I’ve got tired of it. I don’t mean blogging. I mean writing posts. I can hear you ask “What is the difference?”. Well… I was using Wordpress. This software is great for blogging, but sometimes I wanted more.
Read more » -
Don't Use Vim if you like your job!
If you’re like me you probably like to make your life easier wherever and whenever it is possible. I also like to pick up the gauntlet and try something new and challenging. This is why I started to use Vim. I’m a professional programmer. I’m paid to edit code. No wonder why I wanted my editing to be quicker and easier. I knew that Vim has it’s worshipers even though it’s very old so I thought there must be something great about it.
Read more » -
Pattern Matching in Scala
Not so long ago I gave a presentation about Scala and ScalaTest to my co-workers. This was just basics as I wanted to give them a good and solid base for future researching this language. As it turned out - I probably learned a lot more than they did from this :) Whenever there is Scala mentioned there also is the phrase pattern matching. Of course Scala does support pattern matching but I didn’t know how much fun one can have with this.
Read more » -
Scalartemis
Recently I’ve been creating entity component framework which I named Scalartemis. Name is direct descendant of two words. First (surprisingly) is Scala - the language it’s written in. Second is Artemis. Artemis is entity component framework that I wanted to port to Scala. During the process of porting I started to change things a bit to achieve better performance/api/usability. At some point I decided that this is pointless and I should start from scratch using the knowledge I’ve gained.
Read more »
Subscribe via RSS