Posts

Showing posts from 2018

Why you should be active in the labor market?

Image
Hello, today I want to tell you something about why I like to be active in the labor market. I think this activity has a lot of advantages and not only for change the job. Know the labor market I read a lot of job offers, these give me a lot of information. I know what is popular in the labor market. I know what business need and where is a deficit. I think this very helpful on my job. When a lot of businesses use a specific framework, I think I should know about it a little thing. Maybe this knowledge is not useful now, but for the next project I could use it. The second advantage is I know what the specific company do. This knowledge is useful, when you find a solution. These companies a lot of time organizes a Meetups, so I can decide if I want to go to it. Finally, I know How much a programmer is worth. This is very dynamic, but we can average it for our comparison. Get a feedback about yourself This is why I like to be active. I have my opinion about me. My associates have an

You should be like your client

Image
Do you have a problem with how implement the feature? What it should be? I have it a lot, but I found a solution for this. I must change my mind, but it is not easy. Such as topic says, You should be like your client. The best is when you are a client. Why? I often didn't think about UX for my feature. When you have that approach the implementation is easy. Why? Because we implement the easier solution, but what with UX/UD? After one of the trainings I understand that is more important than working full solution. A lot of clients don't use a program, because they don't know how use it. That program can have a lot of features, but when the client doesn't know how use that feature it is only something that bothers you. The problem is bigger. We spend a lot of time for implementing these features, but they are unfriendly. That time we should invest in creating easier and better solutions for our clients. How? The topic is very wide, but I have my solutions for it, whic

Prototype vs full solution

Image
I hear that the prototype is expensive, because we must do more work. I don't agree with it, because this is the way, when we invest our time to get better project on small time. I will explain it in this post. The example We need to create some functionality to implementation, so example CRUD for managing money and some diagrams. The client doesn't know what it wants and how it works. The full solution way I think this is very simple to resolve. We prepare project and tasks which we need to implement. We think about a lot of solutions. What can be wrong? What happened? How the users will use it? Prepared solution is described as tasks. Tasks are estimated. This gets our 2 weeks. Ok, we have the solution, so go to implementation. During implementation, we have a problem with transactions, because we wake up that the clients will be more than 100. This bug we repair after one week. The implementation is done after 2 weeks. We give a solution to a client and it will be unha

If you can’t measure it, you can’t improve it - scrum measures

Image
Today, I want to tell you about one of the thinks which is very helpful, but missing on a lot of implementations of scrum. "If you can’t measure it, you can’t improve it" I heard this sentence on the conference in the other context. I think it fit to the Scrum. How you measure that you are better than half year ago? Do you feel a scrum spirit? Yes, we measure our story points, but I think this is a very bad measure, because if you have a small project you can do something fast, but the situation is opposite when you have a big project. The same functionality you can do with more problems, so your productivity is always lower and lower. The result is you are always worst. We need know what we want to improve and what is our problem. If you want to define it, you need to have a measure. What does mean bad? What does mean good? These are a good, but hard questions. What and how we can measure on Scrum? I want to say these are everything. I have some examples for explaining

Leader vs commander

Image
Did you think sometimes about What is the best manager for you? I think you did it. I think about it too a lot of times. I separate a lot of character and I create my own definition for leader (this is my favorite manager and person) and commander. Commander I start from the commander. I define it like a person who give a task and expect the employee will resolve it. I think this is a good person for old teams with a lot of experience, which like working alone without a manager. That person can't know a domain of problems, can't know how it will be resolved and can't know what are the problems. I think a lot of managers is like a commander. Of course I have maybe only one person with this character, but I heard a lot of stories about these people, so I think they are majority (yes, I am lucky). I think that type of character is very helpful for teams, such I mentioned, have a lot of experience. I think that the person don't must know about something, because it know

Why legacy code is better for you?

Image
I have been asked about what will be my best project. I thought about my experience and I got an answer. I want to show you that and my arguments. Why not greenfield? I started a lot of private projects and I think this is the worst way to learn something new. Why? Because we often will use only our knowledge and we only learn something when we have the problems. These problems are rare, because we are working on the greenfield environment. Yes, we have more flexibility and we can use new features, frameworks and other tools, but green field I think is focused to deliver something fast and we don't have time to experiment. Greenfield projects are the best for the rest. We can charge an energy to another project and do something the best how we can, but this is not a good place for improvement. This is like Kata, not like learning. We can improve only skill, but not improve our knowledge. The legacy code Such I mentioned in my post about my mistakes in working with legacy code

My fast way to start using new language!

Image
On our job we need to learn new languages. I have been a programmer for 3 years. Now, I am learning python, but I learned JavaScript, Ruby, Java, C#, C++. After each next language I had more experience in learning. Now, I have a system for it and I want to show you it. I don't say it is ideal, but I still improve it every language. The first step is basic language syntax I always start from learning basic syntax. I use for it the website like Codecademy or Pluralsight . I can write very easy code with advice on it. After one course I will know about loops, conditionals, syntax, variables and specific for language things (import modules or something like that). This is a very quick way to start. The second step is practical problems I am looking for challenges to learn more. Now I use for it the codingame website. During resolving the problems we will search how do it in our new language. The learn from the problems is the best way to remember how to use the new language. This

Why we should use immutable object as a key in HashMap?

Image
I have been asked about why key should be an immutable object on HashMap? I never think about it, but after that question I prepare the answer. When I return to home I check it. Do you know why? The passed test package com . devpragmatic ; import org . junit . Test ; import java . util . HashMap ; import java . util . Objects ; import static org . junit . Assert . assertEquals ; public class TestHashMap {     @Test     public void hashMapTest(){         HashMap<NoImmutableClass, String> map = new HashMap<>();         NoImmutableClass noImmutableObject = new NoImmutableClass();         noImmutableObject.field = "test1";         map.put(noImmutableObject, "test1");         noImmutableObject.field = "test2";         map.put(noImmutableObject, "test2");         assertEquals(2, map.size());     } class NoImmutableClass {         String field;         @Override         public boolean equals(Object o) {   

What I want in my job?

Image
Maybe, I am different, but modern style of IT recruiting is not what I want. Sometimes I think I am not a programmer, but a baby who looking fun. What is on job offers? I read a lot of offers. The requirements are more or less the same. The experience in years, English level, know programming language, good communication skill and team player (this is measurable...) and git, Jenkins, sonar or other tools. I often have a problem with these requirements, because when I know programming language or when I know tool? I think I can say I know a tool after watch 1,5 h tutorial, so I can meet a requirement of the job, after one week prepare. Is it correct? Sometimes better is learning new employee that tool. This consumes only the first week of work. Job description is similar on all offers. Thinking, doing and contact with people. I think this all. Sometimes I think an employer looking people who do everything. Benefits are cash, Multisport, private health care, playstation, foosball, a

The goal without plan is only wish

Image
Today, I want to tell you about planning our goal. Why we need to plan our goal and what we should do during the planning. What we need to do during the planning? In my opinion, We should ask to three questions. What we want to do, why and how. The answers to that question will be our plan. Easy, right? I think not, because a lot of time we don't know what, why and how. What? This is globally goal. This should be measurable. Why? We should be able to define the end of this goal. Bad example for that is I would like learn English language, because when is the end of this? When I can talk to other people using English? Maybe when I can write posts on the blog using English? I think you understand now. If you want to learn English you should define your goal like, I would like to write an article about goal without a dictionary. I think this is a good goal. Why? A lot of people skip this step. I think this step is very helpful. We will better understand myself or other people wh

How to increase own knowledge every day and don't go crazy?

Image
Hi everyone. I was in the programming school and the members asked me a lot about how learn that all knowledge of programming? I had a little advice for them. A lot of people start by reading books and documentation. Sometimes they do tutorials. Yes, this is helpful, but it is only for beginners. If you want to learn more, if you want find something new, I have a solution for you, which is not tiresome. This way of learning is very motivating and interesting for me. Local meetup You can rise your knowledge during talk with the experts or aficionados. They like to share its knowledge. They like to talk about solutions, problems or projects. This knowledge a lot of time is unique and you won't get it anywhere else. Meetups are often loose (pizza, beer, talks). That is a good time to talk with more experienced people. If you want to find some meetups in your town, you should start from the www.meetup.com site. Comapny events A lot of corporations organize the events, where their

Focus on goal, not on tasks.

Image
Hi, I had a problem with plan my life. Why? I did a lot of tasks every day, but I still stand in the same place. I change my mindset and it is working now. I change a lot of tasks to goal. This method can be used in Scrum, so I want to share you my think. Difference I am starting from show you my definitions of task and goal. The goal for me is the result, which I want to get. For example: I would like to write the application for team cup foosball using Django. The task for me is the piece of way to get the goal. For example: Watch tutorial for creating an application using Django or prepare use cases for application. Why goal is better? Goal has a value. We should focus on a goal, because when we get that we get a value. Of course, sometimes our tasks have the values too, but the core of value is in goal. The value for a lot of tasks is our goal. Example: I want to watch tutorial for creating an application using Django, because I would like to write the application for team cu

My mistakes in working with legacy code

Image
Hi everyone. A little bit time before, I have to work with legacy code. I need to extract the two from a lot of functionality. Of course the other functionality can work too. I need only change the way how it works and replace a kind of connection to database, servers and other applications. I made a mistake and I want to share my conclusion for it. How will I do it today? I will get a knowledge. I will get the use cases. I will validate the knowledge with the code and the use cases. I will change only fragment of code, where I must change. The end. Why? Get a knowledge I started from getting a knowledge from my colleague. I ask a lot of questions, get information about core functionality and what they want. If you worked with legacy project you know that knowledge is very poor. My first mistake was I didn't verify that knowledge in the code. I started working with code and three days later I got the blocker. I couldn't do it like I wanted, so next time I will try t

Don't change project, change yourself.

Image
Hi, everyone. I was on a lecture about "Don't change project, change your project." This was interesting, but I saw a bigger problem. The problem is not on the project, the problem is in us. I want to tell you something about my thought. The main problem A lot of people say that Scrum doesn't work, the project is bad, the business is stupid. You know that, right? I think everything can be changed, but how? We always should start from us. We need change our mindset. After it, we can change the problems around us. To confirm my words, I ask you some question. Why your Scrum doesn't work? Maybe you are not agile? Who writes your project now? Why you still write a bad code on this project? Why new part of code you don't write separately? If your business is stupid, why you don't teach it? Why you don't want to help your business to get knowledge? Why you are not a smart business? I think you never think about what should you change in yourself for reso

Spring is like onion - about layers

Image
Spring has a lot of standards and share knowledge about good practice for using it. One of these is chop your application for layers. Three layers of your application The good practices tell us, we should create three or more layers of our enterprise application. Those layers are controllers, services and repositories. In my opinion, this is very good practices, because we are separate three things communication with client, business logic and communication with other systems. I think this is a reason why spring promote this solution. If you want a proof that spring prefer a layers take a look at the specific annotation for the components we have three predefined: @Service, @Controller and @Repository. This is the same like @Component, but we have a marker for that. This is ok, but... This is very problematic, when we use this solution without thinking. We can put all services in one package. A lot of tutorials do that. If you do that you will have a problem with relations between

Why TDD is bad, but we should use it?

Image
Today, I have given you some thought about TDD. This is a summary of my investigate and using TDD. I think this will be something new for you. The fresh information and looking for topic from different site. What is TDD? I know that you read about TDD, before you are looking at our blog, but to remind I tell you something about it. In TDD important things are three states: The test is not passed, The test is passed, Refactoring all code, which you have This is a short cycle. I think the best time for beginners is 30-60s for one of this cycle. The professional programmers can increase the scope and time for one cycle. About TDD and how you should write in this method you can read a lot of on the net. What is TDD for me? My opinion about TDD I slice for six categories this is the tools to learn how write a good quality test, it doesn't the determinant for good quality product, enforce the discipline, the ordeal, time absorber and the technique which is strove for sel

Why we need to automate everything?

Image
I think I waste my time when I do something twice. Why I don't automate it? I don't have a clue. We need to automate more and more things. We need to save our time. Why? People time is very expensive. I think my time is priceless, so why I don't save my time by automate my processes? Sometimes it is unprofitable, because we need a lot of time and resources to automate and a little time and resource to do it many times like robots for join your telephone with charger. The problems, which we can automate, are exist. Add new post to your blog. Publish information about new posts on fan pages. A lot of things we can automate. We don't do it, because we don't think about profit. We think, when we do something fast we save our time. This is the wrong way to think. Example Netflix a creates a very good feature for saving my time. It automates skip intro and closing credits. This feature saves me hours. When I watched a TV show in another site I skip it manually (b

One good way to learn something

Image
Sometimes I am looking for way to learn something. I found one good way to do it. I share you my observations about it. Step 1. Find the problem When I want to learn something, I often start by finding the problem with it. This is the most important point for it. Why? When we have a problem we have motivation to resolve it. Maybe not you, but I have a problem with the forgiveness of yourself before resolve it. This is my way to focus on the problem and to not enjoy. Step 2. Resolve the problem using your new knowledge or finding a solution You should resolve your problem using the knowledge which you want to know. This lets you remember your solution and understand your knowledge. I think practice is the best teacher. So lets it teach you. During resolving a problem you something wants or should read more about a solution. Maybe you learn more about it because you will want to know how it works. I a lot of times had such an approach. I didn't want only resolve a problem, I

How we should use a streams?

Image
Do you think sometimes about how we should do something? I was that moment with streams. Maybe my post learns you about streams. My first contact The first time when I heard about streams, I thought this was the same as Apache collection library and abstract class. A lot of time this was for me the same. Why? Because I didn't know about how it work and for how case it is created.  What difference is on stream? Stream executes all operations only at the end of the pipeline. Find, match and collect are terminating operations. It's close our pipeline, execute operations and return result. When we implement the same without a stream, we execute each by each operation in the implementation place. Fun fact I heard that stream is faster than a loop. I don't know who give him that information, but it is crap. My tests show that the time of each way is close. Article on other side show you that the stream is slower . When stream uses? I like stream. It is very readable, so I

How prepare input data for tests?

Image
I had had a problem with preparing input data for tests. I am looking for the best way for it, because this is problematic. Why? I tell you something about it and my mistakes. The ways which I tried All in tests/suite I want to tell you about my first solution. I read about good tests and I often read that on the tests should be prepared always only on a test or suite tests. This is a good point, because when I read these tests I know what I have in input. I shouldn't search information about it. I think you agree with me that You have all on this place when you need to check why the test is failed. Minuses are two in this solution. First is a lot of copy paste code. If you don't have a problem with duplicate code, you never refactor your code or change functionality. After these actions you always need fixes a lot of tests where you use that object. Sometimes you can use replace feature on your IDE, but when you create a product with other people, I am sure You will find

Private and public methods - how to organize them?

Image
Do you think sometimes about how organize your code? I think about it a lot of time, when I have time to analyze it. I don't know how you, but I sometimes think that private is all what we don't use on another space of code and public is whatever what we used. It is organized without thinking about what the function does. The problem is when we want to test that function. If you have public is easy to test, but when you have a private function my question is why you want test it? Maybe it should be public or package private? As you see I had a lot of questions. I will show you my answers for it. Access modifiers As you know well, we have four access modifier (in Java): private, package private, protected and public. A private is only class access. A package private is for class and package, but doesn't for subclasses. A protected the same as package, but with subclasses. A public is access for all. I am showing you these just for the reminder. My previous wrong wa

When we should use Mockito on Unit test?

Image
As I mentioned, I would like to tell you something about Mockito on unit tests. You should know about where use unit test, because I will use that context for this post. What Mockito is? I changed my thinking about Mockito object and this step allows me to use it only in a good place for it. I think about Mockito objects only like data source (on "given" section) and communicate with other system (on "then" section). Why? Because I think when you use a lot of Mockito objects, you don't have a single responsibility in testing code. You use mock or stub for a lot of objects, because you think that part of the code isn't currently important. I don't think that it doesn't important if you have on that method. Maybe it should be another function in another place. When you think like me, You will use it only for a really important place for it. What can I stubbing? As I mentioned You can stubbing data sources. This is a good place for it, because Y

Where use unit test?

Image
I wanted to make a post about Mockito, but I think the answer for title questions is the necessary knowledge before it. So what do you think about it? All code should be tested or only core? I have my option about it and I share it for you. I don't test all code using unit tests I begin from the easier sides. I don't test getters and setter, because it is stupid. If you don't use setters or getters on your methods, maybe you don't need it. Sometimes of course you use the library which map an object using reflection, so You must have these data only for storage. I know, but in other cases you test your getters and setters during testing functionality which using it. A unit tests are bad for facade implementation, because I think this is a good place for integration tests. Why? Integration tests are for check how components working together. If you want to check how methods work together I feel you want to do the same. The next place is integration with other syste

Why TDD is bad practice?

Image
Did you listen that TDD is bad? What do you think about it? I have my opinion about it! TDD is bad because... We don't have time to write tests first - I think this is a good point. I sometimes don't have time for that. Why? Because I need to do quickly fix on our code and deploy it. In this case I don't have time to create test after wrote production code too. The even worse case is when we have tested this part of our code and test after change doesn't work. I don't like this, because I must read tests and thinking about repair tests for new logic. I really don't like this. I would like to create new test and remove old every time when I have that situation. What's wrong with the test first on this case? Nothing, because if you have time to write tests after create code, you have time to create test before it. Don't you think so? We know how will implement it, but we don't know how testing it - I think a lot of developers have this problem,