SpreadIT Talks #1 – Ten o rozwoju doświadczonych programistów i planowaniu kariery

 

#SpreadITTalks to podcast w którym omawiane są tematy poruszane w trakcie konferencji SpreadIT związane z Software Architecture oraz Software Craftsmanship, ale nie tylko. Każdy odcinek porusza jeden główny wątek i ma przede wszystkim na celu wyczerpać temat. Zapraszamy Was do wysłuchania pierwszej części.

Moimi pierwzymi goścmi byli Jarosław Pałka oraz Jakub Marchwicki z którymi rozmawiałem o rozwoju i ciągłej nauce w kontekście osób już doświadczonych w branży IT. Jest to temat, który wielokrotnie pojawia się w dyskusjach, temat na czasie. Jeśli zatem interesuje Cię jak planować swoją ścieżkę kariery, kiedy znajdywać czas na rozwój, jak wybierać kolejne etapy swojego rozwoju i jakich narzędzi używać- to ten podcast jest dla Ciebie.

Główne tematy, które poruszyliśmy:

  1. Doświadczenie w prowadzeniu szkoleń Symentis, a aktualny rynek potrzeb- zarówno od strony firm, jak i od strony uczestników. Czy są jakieś części wspólne?
  2. Organiczny rozwój vs rozwój planowany. Czy warto, a jeśli tak to jak planować swój rozwój, czy może wystarczy mądrze wybierać projekty?
  3. Narzędzia. Jak organizować wiedzę, tips&trics, jak ją zbierać, jak przygotowywać i określać cel,
  4. Czy warto mówić nie projektom / zadaniom? “Tego nie zrobię, nie jestem frontendowcem, nie piszę w typescript, nie jestem od infrastruktury” – czy może jednak próbować. Albo kiedy próbować a kiedy zdecydowanie nie?
  5. Co motywuje moich gości i jakie są rodzaje motywacji popychające nas do rozwoju. Czy kasa może być motywatorem?
  6. Hype driven development vs zbalansowana / naturalna ścieżka rozwoju programisty. Zawsze nowe, czy legacy. Stare, istniejące, rozwijane, czy nowe – ale bez klienta. Jak ułożyć ścieżkę własnej kariery?
  7. SegFault i CoreDump, jak te konferencje mają się do tego wszystkiego? Czy SegFault i CoreDump, które reklamujecie jako konferencje dla doświadczonych są pewną formą wpisania się w ten problem i jedną z technik?
  8. Na sam koniec- jaki aktualnie kierunek obrali moi goście.
SpreadIT Talks #1 – Ten o rozwoju doświadczonych programistów i planowaniu kariery

JDD 2017 – Orchestrate your choreography!

Orchestrate your choreography!

You can read official talk description here [EN] or at conference page here [PL].

This talk is an effect of a few architectural discussions with several development teams over past few years. I saw that lack of knowledge in this particular area can be a real roadblock on architecture design, also I just “feel” that this topic is important. We – as a community of professionals – ignore base concepts too often.

In my opinion is very important to be able to make a conscious decision. No matter if you create simple monolith application or huge distributed system you will need to choose how modules, services, components communicate with each other. And whats important- you always will be able to choose one of these two: orchestration and choreography.  Good to know how aply orchestration and choreography to your architecture 🙂

Because of that I want to do some kind of “step back” to show that these concepts are a base for many modern architecture patterns. I believe that doing such thing will give possibility to make two or more steps further- just by being conscious about pros and cons of architectural decisions.

I want to show you how to understand these concepts, how to use them and point out what are the potential threats when you choose one over another. After this talk I want you to be more aware about your current project architecture.

Day 1, Track 1, 10:30 am 🙂 See you there!

BTW. You may also look at Validation – Operation – Notification post. This concept will be “somehow” used during my presentation 🙂

BTW2: Remember to rate my talk using official JDD eventory event.

Any other recommendations?

YES!

This year at JDD conference I represent SilesiaJUG as a Jugmajster candidate along with two of my colleagues- Grzegorz Gajos and Piotr Wittchen. I’m really proud of be a part of this great team! Take a look at their topics too. You can not miss them!

Full conference schedule is available here.

JDD 2017 – Orchestrate your choreography!

4Developers Gdańsk – Pomeranian edition of the biggest tech festival in Poland

First local 4Developers edition – Gdańsk

I’m really happy to be a part of first local 4Developers edition as a speaker 🙂 About half year ago I presented my topic about the Evolution of Architecture at Warsaw edition of this great event (You can read more about this talk here) and received really motivating feedback from audience. Finally I decided to try my chances to join pomeranian edition as well. As you can see with success 🙂

Evolving Architecture, 4Developers 2017, Warsaw, Image from twitter

I really like the idea of 4Developers Tech Festival and this interdisciplinary approach to topics selection. Because of that professionals that work in different business environment can exchange experiences and find how much we have in common regardless to used technologies or programming language. It’s pretty similar strategy as I use with my colleagues organizing SpreadIT conference 🙂

Note that there will be another local edition of 4Developers soon! Check it out 🙂 And good luck to organizers!

Orchestrate your choreography!

What my talk will be about? Here’s short note:

When we speak about orchestration we should think of conductor in philharmonic orchestra. Basically His role is to show rhythm to all musicians. In the other hand “Swan Lake” musical don’t need conductor for dancers. They know when its their part, and which steps they need to do. It’s all because of choreography.

You can find a lot of examples which use this two fundamental ways of keeping processes in correct order. You can find them in Event Driven Architecture, Microservices, CQRS, Hexagonal Architecture and so on. In my opinion we should talk about them more- to understand them and use them in correct and proper way.

Sometimes you need to do one step back to be able to do two steps forward. I would like to show you advantages and disadvantages of orchestration and choreography. I would like to show you when to use them and finally – how to do it effectively.

My talk will be held at 2PM on App Arch Track. Full agenda here. Also there is site event on blog if you like to check location here 🙂

Discount!

If you haven’t bought your ticket yet then go and get it with 15% discount! Use this promo code: software-empathy-15

4Developers Gdańsk – Pomeranian edition of the biggest tech festival in Poland

Validation – Operation – Notification

Given When Then – short intro

Have You ever heard about Given-When-Then approach to create tests? It’s an approach to separate tests structure into three parts:

  • Given – Test preparation. We should ask ourselves a few questions here (depending on approach):
    • What I need to execute before tested operation?
    • Do I need some specific beans?
    • Do I need to mock something?
    • Do I need some particular data?
  • When – this is our operation under test.
  • Then – this are our expectations. Basically – test assertions.

Of course not every code can have such structure, but as an ideal approach it can increase overall readability of our source code.

Example:

This test checks if newly created issue will invoke some sort of notification. We can read this test like this:

  • With given title  and description
  • When I create new issue
  • Then one notification has been published.

Of course sometimes, some parts can not be that obvious. Take a look:

Now you can see that given part is hidden. But it’s still there!

There are a lot of good articles about this topic. Some of them:

Validation – Operation – Notification approach

I would like to propose similar approach, but for production source code. Let’s call it VON (Validation – Operation – Notification).

  • Validation – all prerequisites which need to be checked or done before you can do particular command. Such as validations, security check rules etc.
  • Operation – our business command. The heart of the method. We start writing our method because of this. This is our main purpose.
  • Notification – what happens after successful operation. Often it will be just some return statement, but it could be more. It’s a part of business method that did not exist to do primary operation, but invoke some other command (which very often can be done asynchronously. For example using CompletableFuture).

Let’s see a basic example:

Now, look at this method using 3 steps defined above:

  • Validate – if title and description is not null,
  • Create issue (our operation),
  • Notify about newly created issue and return it.

Of course sometimes it will not be such straightforward. Above method in real world can look more like this (using lombok):

Still – you can see all 3 parts of VON approach.

Error handling

Depending on step, we should think about errors and problems differently. Lets try to check possible scenarios when we use VON code structure.

Imagine that something happen on validation step – the only thing you have to do is to throw an exception, return specific error message or maybe send error information to some notification queue… You didn’t start any operation- so you have no problem (within this method).

When something happen during operation part- then you have a problem. If your validation was well prepared then any error within this step will be related to technical or network issues (database downtime, no network connection, etc.).

Finally when something happen during notification phase then you should know two things- operation went well, so main purpose of this method was finished without problems. The only problem you have now is that some notification was not published. Question is what can you do about this? Maybe you should not do anything, maybe you should send information to technical error queue that some message was not sent. Maybe just log this situation? It depends.

As you can see separating your method to VON structure helps you identifying error type that can occurred. It’s one of the advantages of this approach.

To “Enter” or not to “Enter”

As you can see in above examples “enter key” change step in VON approach. In general “new line” in source code should inform us about context change. This principle goes well with whole VON approach as every step is different context. We can look at source code and with a single glance focus on most important part for us at the moment. If every team member use the same approach, then source code starts to look more clear and well structured. The faster you can focus on important things, the faster you can solve the problem you are currently working on.

Of course this doesn’t mean that we should create long methods 🙂 Ideally our methods will have 2-3 lines- each line for single step. Then we can omit all enters.

Lets start some cleaning!

Caution - Wet floor

Refactor to VON – example

Imagine a method that delete contract from some old system. Contract can be deleted when it’s not started and any of its conditions are not started yet as well (for example, there can be specific condition which will limit that resignation from contract can be made two or more months before contract is started). Delete operation is made using SoftDelete (BTW. I hate soft delete). Of course before we start making any changes we should have proper unit tests!

Our example:

First let’s try to find our steps:

  • validation 
    • our contract and any of its conditions can not be started- this is in the code
    • we don’t have validation that contractId  is null …
    • we don’t have validation that particular contract exists in repository..
  • operation
    • delete all contract conditions
    • set contract as non active (soft-delete)
    • save in repository
  • notifications
    • cancel payment disposition for deleted payment

I would start with preparing above steps. Problematic part is that deleteAllContractConditionsByContract method is at the same time in validation and in operation phase. Let’s split it to two methods (for now).

As we don’t want to change too much outside this method let’s just extract both assertions to particular methods:

Much better 😉 Now lets fill the gap with our validations:

Ok. We should hide this whole optional stuff:

Now some small refactoring with operation part:

Now we need to take a look at the notification part. There are two things possible:

  1. Add a new method to paymentsService  which will cancel payment disposition. Simple and safe operation, however we will still have direct relation between contracts and payments.
  2. Add some queue in the middle between payments and contracts modules/components. We can use queue or just simple implementation of Producer/Consumer pattern. It’s a bit more complicated, but this gives us a more loose connection between the modules.

And basically we can stop now as this finish whole VON approach. Using this approach we did find 2 possible problems with particular method, however- now probably we have redundant checks – in our method we must assert that all contract conditions can be remover, and probably within contractConditionsService  the same check will be made.

Despite this, its look like a good start to further source code refactoring. Finally we can finish with something like this:

Summary

This technique nicely apply mostly to more complicated business methods and for legacy code refactor. Its biggest advantage is shown when every team member use this technique for all business operations. Then these methods starts to look consistent and much more straightforward. Also it helps to look at different parts of method differently (for example in case of potential errors that could happen).

Please note that this approach should not be used at every cost. It’s a convention that nicely applies to legacy code methods as in our example, but also to shiny newly created operations.

Have fun and comment below what you think about this approach!

Validation – Operation – Notification

Quality Excites 2017 review

About

Quality Excites (QE) is a Polish nationwide conference on software quality, dedicated to the professionals who use the newest technologies and the best practices. Year by year, the event attracts more and more people who are interested in Quality Assurance (QA) and who want to influence the field.

The attendees include software developers, project managers, product owners and designers. The popularity of QE is not only represented by the growing number of speakers and participants. The second year in a row, Quality Excites took 1st place in the voting for the best testing events in Poland, within the category of free conferences.

https://qualityexcites.pl/en/

Attendee

Slides from all presentations should be available on Future Processing slideshare soon. Below some of my thoughts on topics that I was able to attend.

Keynote: Testable Software Architecture
Aslak Hellesøy

Good keynote from creator of Cucumber. At first I was a little bit worried because Aslak was talking about things which was also a part of my talk 🙂 However in middle point he change direction. The only regret that I have is it was quite basic stuff. I identify with statements that tests should be as fast as possible and feedback loop should be as short as possible. Also he told how to maintain architecture in a testable way.

Introduction to machine learning
Marcin Drobik

Quite nice introduction to Machine Learning. I did expect something totally different, but I enjoyed theoretical stuff. It made me think that stuff that I learned at my University can be used for real needs. Marcin did simplify things as much as possible, so definitely it was good “Introduction”. Mission accomplished!

SQA in TestOps era
Dawid Pacia, Tomasz Janiszewski

From my perspective this presentation was rather basic. Short feedback loops, automation everywhere, monitoring- that kind of stuff. However, if someone was there to check if this whole “DevOps, TestOps” culture is for him/her then it could be really interesting.

How to increase the value of unit tests?
Michał Kopacz, Łukasz Wróbel

The only one presentation I did not like. Maybe because of PHP source code examples, maybe because of presentation flow. I just don’t feel it. Also, I did not agree with certain statements and would like to discuss them with speakers someday.

Developer on detox
Michał Płachta

This one was great. If you haven’t seen that then honestly you need to watch recording as soon as it will be published. Presentation about being aware of our limitations- don’t judge too soon, don’t make decisions only based on opinions without facts. Love it.

SOLID Page Objects — Screenplay Pattern in action
Tomasz Kras

Another really good presentation- this time much more technical. Tomasz describe briefly Screenplay pattern which is “Page Object Pattern” on steroids. Very, very, very good introduction.

Speaker

I talked about Evolving Architecture from a totally different perspective than usual (4Developers 2017, Confitura 2017, JUG BB Meetup, IPIJ). I tried to use my experience with quality assurance from various projects and connect them with my topic. I regret that I didn’t change description and topic name- these talks are quite different (about 50% of this presentation is different than “basic” Evolving Architecture).

You can find slides from my talk here.

Best talk!

As far as i know my talk was rated by conference attendees as the best talk of Quality Excites 2017 with rating 4.90! Thank You all! 

Organization

What I liked:

  • Food! Please, don’t even think about change 🙂
  • Immediate feedback boxes:

  • Block A lecture hall,
  • Countdown speaker timer 🙂

What can be improved:

  • Web page. I was not able to share direct link to any presentation. Its (a little bit) annoying from speaker perspective, but also from attendee perspective.
Quality Excites 2017 review

Confitura 2017 retrospective

Last weekend I have attended Confitura 2017 conference. This year not only as a participant, but also as a speaker with my “Evolving Architecture” talk! I must admit it was my dream to speak at this event someday. I don’t have enough words to explain this feeling 🙂 I always thought about Confitura as one of the biggest and the greatest Java events in Poland. Being a part of this was truly awesome!

Attendee

mid-sized building blocks and hexagonal architecture in real life
Jakub Nabrdalik

Jakub focused on (underestimated sometimes) package-level architecture. His basic statement was to divide source code using package-by-feature, not package-by-layer approach. Then he shows how to better hide class visibility using my beloved package-private access scope. I really, really enjoyed this presentation.

Slides here.

Studium przypadku wystarczająco dobrej architektury
Jakub Kubryński

Good presentation about high level approach to create “good enough” distributed architecture. Kuba point out that e2e tests are very expensive and should cover only really critical path. Also he mention that performance tests are far more expensive than e2e tests and should be skipped. His solution instead is to provide good monitoring. I really liked approach where you can allow pushing bugs to production but only in case that these are not critical and you can deliver fixup within minutes or hours. And you can achieve that only with good and quality unit and integration tests.

Slides: here.

DDD: Q&A – czyli co gryzie świadomego programistę/programistkę
Sławomir Sobótka

This talk was about asking good questions while using DDD approach. I need to admit that I was a little bit nervous before my presentation to be 100% focused on Sławek talk. However this session for sure was for people with at least some experience with DDD. Again there was CQRS approach and statement that CRUD APIs can exist alongside with REST API and cooperate.

Testy wydajności z Gatlingiem
Andrzej Ludwikowski

Really nice talk about testing in gatling (actually its my favorite performance tool at the moment). Source code examples were quite basic and straightforward (which was really good if you look at gatling first time). I really enjoyed first part of presentation where Andrzej show a few popular problems which can cause false-positive tests results and in the end didn’t show performance problem – which is basic idea of these kind of tests 🙂

What’s more – maybe I did found my next pet project! There was a question how to compare previous tests results with current (to find delta) and there was no answer to this question at this session. I’ll need to investigate this topic and if there is nothing out there than small tool which will analyze two gatling result files and draw diagrams (or just put these data to grafana board, as someone in the crowd suggested) would be nice.

Slides: here.

Code Review – how to do it better?
Sebastian Malaca

Good talk about very important topic. I really like approach with very small merge requests, however I did not feel how to implement this approach in my current project. But whats most important. This session made me think about CRs once more. For sure its time to rethink current approach in my project and talk about this topic on next retrospective meeting.

Slides: here.

Speaker

I did talk about “Evolving Architecture” (I did this talk also at 4Developers conference and BB JUG recently, and also have one smaller version which was delivered for IPIJ). Each time it was a little bit different, each time with different energy and “flow”. Would I do it again? Definitely! I’m sure I will start next year in C4P for Confitura 2018! This feeling and energy is outstanding 🙂 Thank you all for choosing my talk during V4P and coming to see me there! I hope that I met your expectations.

My slides: here.

SPOINA Party

Great place, great people. Unfortunately because I was pushed to stand up early this day (~4:00 AM) I was too tired to stay long. Next year I definitely will come to Warsaw a day before conference to have enough strength for party 🙂

See you next year!

Confitura 2017 retrospective

How to become a DevOps? @ University of Silesia (11.04.2017)

DevOps (a clipped compound of “software DEVelopment” and “information technology OPerationS“) is a term used to refer to a set of practices that emphasize the collaboration and communication of both software developers and information technology (IT) professionals while automating the process of software delivery and infrastructure changes.[1][2] It aims at establishing a culture and environment where building, testing, and releasing software can happen rapidly, frequently, and more reliably.[3][4][5]

wikipedia

How to become a DevOps?

What DevOps usually are responsible for? Why such a role starts to be more and more important during last time period? This speak is an approach to answer these questions. Its a talk for you if you want to find out if becoming a DevOps is right for you. You will also find out what technologies are used on daily basis and how to start career as a DevOps in world of complex systems and fast, secure deployments. Basically if this blog post looks like something interesting for you, then thinking about become a devops is a good idea.

Presentation will be held in polish.

When and Where?

11.04.2017, 14:00 – 15:30

University of Silesia, Faculty of Computer Science and Materials Science
Institute of Computer Science
41-205 Sosnowiec
Będzińska street, 39
Room B-4

Here you can find official info about event:

http://www.wiinom.us.edu.pl/sprawy-bieżące/1030

How to become a DevOps? @ University of Silesia (11.04.2017)

Evolving Architecture @ 4Developers 2017

4Developers Festival, 03.04.2017, Warsaw

Track: Application Architectures II

Location:

Hotel Sangate Airport *** 
17 Stycznia Street No. 32
02 – 148 Warsaw

Here you can find more info about this great event 🙂

Description

During development phase its very easy to cross the design boundary – we want to take care about all possibilities and potential changes that can happen in our project. On the other hand when we are under the time pressure we take shortcuts which could in the end increase cost of even simple changes. How to deal with “overdesign”? How (at the same time) don’t close for improvements and changes? When we should make crucial technical decisions and when accept technical debt? This session is about true stories, mostly about huge mistakes, but also sometimes about decisions which in the end were very successful. The session for all who don’t want to end up with project that need’s to be rewritten to add a new button. The session for all who cares.

Still not sure?

This talk is a result of last 6 years of my professional experience with more than 10 projects. And within these projects I was able to see bad things and of course … really bad things. After each of them I’d got a feeling that I will never make the same mistake again. What I’m really proud of – I kept that promise! I was making new mistakes each time 🙂 I dealt with “over-designed” systems and “under-designed”. I’ dealt  with “company frameworks” and “our own solution!”.

I would like to do retrospective about all good and bad choices that have been made in all of these projects. I really do believe that with every mistake that has been made we can be closer to deliver better software with more fun and excellence…

There is one great thing about “standard” design patterns (book by gang of four): each of them is not only a description of implementation and its name, but also description of pros&cons. This is in my opinion the most important thing about them. You have solutions with ready on plate information about their limits and possibilities. Knowing the  limits gives you much more power to deliver better and more flexible software. It’s not only about delivering solutions. It’s about providing software that can be adopted to needs, however without wasting time when it’s not necessary.

And this talk is about my vision how to find this balance in real world projects.

Afterwords

I did very similar talk a few weeks ago in Gliwice. This time it will be slightly different with lot of improvements.

Evolving Architecture @ 4Developers 2017

I3 tiling window manager – try it out!

Why choosing tiling window manager can be a good option for you and how you can get more from your operating system? Find out if it can improve your daily tasks!

Tiling window manager?

In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects (windows) that tries to fully emulate the desktop metaphor.

wikipedia

I have already mention i3wm in 4 top performance boosters for linux users post- you can find video showing i3wm features in general:

Here you can see a couple of my workspaces:

Some examples of tiling windows managers:

  1. i3WM
  2. Awesome
  3. DWM
  4. xmonad

Why should I consider switching to tiling WM?

Designed for keyboard use

All popular tiled WMs are designed to be operated by keyboard only (Of course you can use your mouse if you like :)). This means that every action like moving “tiles”, changing current workspace, changing current layout, resizing, going fullscreen etc. can be made by keyboard. You can work in your IDE, ask some questions on skype/slack, do some operations in terminal and get back to source code without even thinking about using a mouse.

I know that these is possible in classical window manager, however tiling WMs “push you a little” to go this way. if you feel (like I do) that its quicker to use a keyboard and want to go this way then tiling managers are probably for you.

Customizable by default

All popular tiling WMs are designed by developers for developers. This means that you can power up your window manager easily, by adding new shortcuts, modes or whole functions.

Finally… Efficient

Using classical window manager I was finding myself very often in reorganizing current desktop. Moving windows around from one screen to another, from one workspace to another. In case of single-workspace systems (like all Ms Windows) you can have a loooong list under ALT-TAB shortcut.

In tiling WM you will forget about alt-tab behaviour. Most powerful thing is that you can teach your WM to place tiles in exact manner that you like them to on particular workspaces. Basically after some time you will find out that you hardly rearrange anything on your desktop. Everything just works for you.

Why i3WM and not other tiling windows manager?

I did try awesome for some time. However I found myself in situation when I did not extend my current desktop environment, because awesome is using LUA scripts for all configurations. Back then I did not know lua so every change was a little bit difficult for me. Especially that awesome was my first tiling window manager. I broke a simple rule: one change at a time 🙂 If you know lua well then you can try awesome, in other case I would suggest you to try i3 – it use very simple configuration files.

My i3

Configuration files

You can find all my configuration files related to i3 here. Download it, change and use it however you like.

Basic keyboard layout

Keyboard layer when used Mod key
Keyboard layer when used Shift+Mod key

What I’ve changed:

  • jkl;  to hjkl for moving around and moving tiles
  • Mod1  to Mod4  ( Mod4  is windows key)

Workspaces

Biggest value from using i3 is automation. You can tell your WM to which workspace every window should go. Back then I used to name my workspaces directly, however after some time I found that I don’t need “names” on my screen as I already know what is where.

Take a look on my current configuration as it is self-explanatory ( $tagX  == workspace X):

As you can see I simply define where i3WM should put particular application. Magic 🙂

Achieving this kind of result is very simple. To find how assign command should look like for your application you have to find its selector. Most often used is class  selector. For finding what you have to put within it you can use xprop  application:

After typing  xprop (probably you will have to install it) you have to “click” on application (by mouse). Then you will receive all data as in above example. This line:

keeps information about class. So If I would like to have pcmanfm always appear on workspace 5 then I will add this line to my config file:

And that’s it!

How I have things organised?

At the moment I use up to 7 workspaces:

  1. Work – main window. I used to have here my current IDE, file managers, and all other applications as this is my “default” workspace to work with. Usually I use here tabbed layout.
  2. Browser – only browsers are usually here. This one also use tabbed layout.
  3. Shell – terminals 🙂 Split layout of course 😉
  4. Conversations – Skype, sometimes qtox or thunderbird when I remember that I still have this one 😉 Usually tabbed layout
  5. Slack – Slack only..
  6. Special – This one is empty. Sometimes I run specific application and when I want to have it on a side it goes manually to workspace 6
  7. Music – Spotify, Vlc. Music in general.

Thanks to automatic arrangement all my applications go directly to workspace that is prepared for them in my mind. So if I want to search for something in the internet then I go to workspace 2. If I need to do something in terminal I go to workspace 3, when I need to ask some of my colleagues about something I go to 4 for skype and 5 for slack. Everything is always there for me as it should be.

Modes

Another great feature in i3wm is possibility to create “modes”. Mode is an extension where you can put more commands under one shortcut. My modes are:

  • resize_window – default mode that you will have out of the box under  $mod+r then you can change size of currently selected tile using arrows or jkl; .
  • exit – mode where I can choose one of:
    • lock
    • shutdown
    • logout
    • reboot
    • hibernate
  • office – mode where i can select one of libreoffice application
  • browser – running one of selected browser
  • ide – as you can guess- it helps me to select IDE:
  • quick – I think of it as “quick access”. For example:
    • postman
    • skype
    • slack
    • spotify
  • screen – this one helps me to prepare my workspace at particular places. Back then it was used to change from single notebook display to multiple displays. Currently it change configuration from notebook display to external one as I don’t use more than one monitor anymore (yes!)

Example mode configuration looks like this:

At first you set how it should look after invoking, then you describe your mode, after this you have to create shortcut to particular mode. Now When I use  $mod+p I will see at the bottom of my screen something like this:

So I can choose from one of above browsers. Please note that after command there is operation to go back to “default” mode. One can create “nested” modes. It’s possible to create mode that will be for example used only during development and change totally all shortcuts and behaviour, however I never get that far 😉

Other configurations?

In my configs repo you can also find a few other things:

  • own shortcuts – which are very easy to add
  • autostart applications
  • i3bar configuration
  • i3gaps configuration
  • color changes

Tips & Trics

Here are a few very useful in my opinion tips and trics that you may want to reuse:

  • Change moving around shortcuts from jkl;  to hjkl . Especially if you are using vim 🙂
  • Add  exec --no-startup-id nitrogen --restore  somewhere near end of config file. It will restore your desktop wallpaper. It’s really useful if you are using multiple displays or change from notebook to external one 🙂
  • Add these two lines to your shortcut configuration:

    After installing scrot you will be available to take screenshots (printscr for full desktop, shift+printscreen and then select desktop part using mouse to take partial screenshot).
  • I found that access to simple calendar can be really useful:

    This is how it looks like:

Afterwords

There is still a lot to say about i3WM. Definitely I will  write more about this great window manager in future. Leave a comment below!

I3 tiling window manager – try it out!

My top 4 performance boosters for linux system users

Here are a few of my favourite Linux “performance boosters”. If you think about starting using Linux OS every day (or you are use it already) at your work then this list can help you to boost your performance. List consists of only very general things – this means I didn’t put on it any specific (like git or mvn) tools which can be helpful only in particular cases. Try it out! I’m quite sure you will not be disappointed.

1. VIM

Yup- VIM. I couldn’t start this list in any other way. Could I? 🙂 Vim is not only a standalone tool. It’s more like text-editing approach. This approach can be used within many other tools (IntelliJ, Eclipse, Browsers (there are plugins!), Sublime, Kate, Visual Studio :)). Also I did try neovim, but probably my knowledge is far too small to use anything than standard vim functions. I’m aware that learning curve is shallow, but every little step further makes you much more efficient during text processing (efficient text processing is quite important during programming :))

2. ZSH instead of bash

I still remember that moment when I moved from bash to ZSH and it was really big step forward in my day-to-day performance. ZHS together with oh-my-zsh its a whole new level of possibilities to improve how you do every day tasks. For instance completions – git, gradlemvn, httpie, npm, docker, kubectl are fantastic. It’s already there and work out-of-the box, so in almost no-time you can boost how you manage things from CLI.

You can select option by using tab key. Of course it’s not only about completions 🙂 There is a lot more (possibility to auto syntax highlighting, great path expansion, path replacement or even spelling correction).

3. I3 tiling WM

In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects (windows) that tries to fully emulate the desktop metaphor.

— Wikipedia: https://en.wikipedia.org/wiki/Tiling_window_manager

My experience with tiling WMs started with Awesome, however it was a little bit difficult (as you need to learn lua scripts, and back then my knowledge of lua wasn’t too good). Along with my habits (Before I used gnome, kde, lxde and openbox mostly) this was bad choice (learning lua scripts and change perspective from windows to tiles). I3 on the other hand it’s quite simple to extend and adopt to tiles without swearing 🙂 This one deserves its own post (soon!).

Why using i3 boost productivity? First of all – distraction free. Tiles really helps to keep on screen only things that you really need at the moment. With possibility to auto-assigning particular applications to selected workspace you can provide yourself workspace which help you to be more productive. On top of that there is possibility to create your own modes. Watch screencast of i3 window manager:

TIP: Change default switch focus bindings to more vim-like approach:

4. Z plugin for ZSH

I’ve already mentioned ZSH. However, this one deserves its own place in my top 5, because its very simple, yet very powerful. Z is a plugin that helps you to move around within directories- it tries to remember most recent and most often used directories and help you moving to them using just part of its name. Since I have discovered it I barely use  cd command! Imagine that I work on completable future examples for blog. I can use command like this for that:

Is there more?

YES! There is a lot of small tools which can help you with your performance. However most of them are very case specific (like wrk2httpie or retrospective) so their usefulness is strongly related to particular use case.

Afterwords

Do you have any beloved tools? If so, please share them in comments!

My top 4 performance boosters for linux system users