Sunday, October 25, 2020

Unity #002 - PlayerController script (probably part #01)

There are many methods of coding a player movement. I wrote down two of them (the most convenient ones for my solution). Reminder here - I've been learning Unity for a short period of time so probably there are plenty better methods to do the PlayerController script for this solution :)

The first method is using Unity function AddForce

 

 to a myRigidbody I've added force by Vector2. It will move acc. to forceFactor value

A second method it is function MovePosition


Here there is no physics (no forces) added. I just added vector value to the current position.

Friday, October 23, 2020

Unity #001 - First blood

 All right I am back to blogging. This time it is a time for Unity and C#. I've done a 12 hour course with a fine teacher. Now I am trying to focus on game creation from the scratch and learn as much as possible.


The first game I will try to do is "Zeldish" style of game. I will build a simple player controler and few levels. I've already downloaded free assets for this one.

It will look like this: 


More to come. Let's go!

Monday, November 25, 2019

Time for JAVA #002 - constructor


Constructor is a block of code that initializes the newly created object. A constructor resembles an instance method in java but it’s not a method as it doesn’t have a return type.
This is how it looks like (the simplest declared constructor - no arg):


There are three types of constructors: Default, No-arg constructor and Parameterized.

1) If you do not implement any constructor in your class, Java compiler inserts a default constructor into your code on your behalf (it is invisible).

2) Constructor with no arguments is known as no-arg constructor. The signature is same as default constructor, however body can have any code unlike default constructor where the body of the constructor is empty.

3) Constructor with arguments(or you can say parameters) is known as Parameterized constructor.


Output will be:
Id: 00001 Name: Stalkerowaty
Id: 00002 Name: Stalkerowaty2

Although you may see some people claim that that default and no-arg constructor is same but in fact they are not, even if you write public Demo() { } in your class Demo it cannot be called default constructor since you have written the code of it.

Difference between Constructor and Method

The purpose of constructor is to initialize the object of a class while the purpose of a method is to perform a task by executing java code. Constructors cannot be abstract, final, static and synchronised while methods can be. Constructors do not have return types while methods do.

Quick Recap of all info:
1) Every class has a constructor whether it’s a normal class or a abstract class.
2) Constructors are not methods and they don’t have any return type.
3) Constructor name should match with class name.
4) Constructor can use any access specifier, they can be declared as private also. Private constructors are possible in java but there scope is within the class only.
5) Like constructors method can also have name same as class name, but still they have return type, though which we can identify them that they are methods not constructors.
6) If you don’t implement any constructor within the class, compiler will do it for.
7) this() and super() should be the first statement in the constructor code. If you don’t mention them, compiler does it for you accordingly.
8) Constructor overloading is possible but overriding is not possible. Which means we can have overloaded constructor in our class but we can’t override a constructor.
9) Constructors can not be inherited.
10) If Super class doesn’t have a no-arg(default) constructor then compiler would not insert a default constructor in child class as it does in normal scenario.
11) Interfaces do not have constructors.
12) Abstract class can have constructor and it gets invoked when a class, which implements interface, is instantiated. (i.e. object creation of concrete class).
13) A constructor can also invoke another constructor of the same class – By using this(). If you want to invoke a parameterized constructor then do it like this: this(parameter list).

Wednesday, November 6, 2019

Automation for JIRA #005 - How to set active link to @assignee in comment

The situation is like that:
There are two tasks. Task 1 and Task 2. Task 2 has a link set to "is blocked by" Task 1. Person who trasit Task 1 to status "Done" do not inform other person who is responsible for Task 2 (and can not work on it because it is blocked by Task 1).
I solved it with a simple automation:

What I could not find was a assignee name (but the active one) - there is a smart values like: {{assignee.displayName}} or {{assignee.key}} but those are displaying only the value. The correct instruction is [~accountid:{{assignee.accountId}}].
That displays like this:

Thursday, October 17, 2019

Time for JAVA #001

I want to learn. That is the first statement You have to understand to start. I found out a great site - exercism.io.
You can find there a lot of free exercises from many languages, and what is the most important You can consult your solution with a mentor.

Earlier today I finished one the execrises - named Reverse String.
The task was to write a code which will reverse a string for example: input: "cool" output: "looc".
Looks pretty easy but there are serveral ways to solve it.
In my opinion I found the simplest one:


The main issue of this problem is that String class does not have reverse() method, You need to convert the input string to StringBuilder, and after reversing You need to switch to String using toString().

I used gradle (please check it) for testing.


Back to Java is great!


Tuesday, September 10, 2019

Automation for JIRA #004 - Cron in JIRA

Alright then... what is this Cron?

The software utility cron is a time-based job scheduler in Unix-like computer operating systems.
Users that set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration. This is what internet says about it. This is the shortest version I found - it is more : A cron expression is a string of fields separated by spaces
The task was to set creation of a new issue with reminder every wednesday. Sounds like a simple automation.

The automation has trigger "Schedule" (Executes this rule on the provided schedule.) To set it up correctly We need the CRON expression docs (or at least we should know it...) You can find the CRON expression docs here.

And here is an example code:
0 20 9 ? JAN WED 2019

This literally translates to 0 second, 20 minute, 9 hour, any day of the month, Wednesday, January, 2014.
In plain English, this represents 9:20 AM on every Wednesday during January of 2019. Note, the "?" character means "no particular value".

This is complete chain of strings:



source: here

Monday, July 22, 2019

Kanban - a PM tool? Differences between SCRUM

A kanban is an agile project management tool designed to help visualize work, limit work-in-progress, and maximize efficiency (or flow). Kanban boards use cards, columns, and continuous improvement to help technology and service teams commit to the right amount of work, and get it done!
That is a nice definition of the kanban which describe a whole idea. I really like it.
And here is a more precise and detail defition brought be Atlassian:
Kanban is a popular framework used to implement agile software development. It requires real-time communication of capacity and full transparency of work. Work items are represented visually on a kanban board, allowing team members to see the state of every piece of work at any time.

The work of all kanban teams revolves around a kanban board, a tool used to visualize work and optimize the flow of the work among the team. While physical boards are popular among some teams, virtual boards are a crucial feature in any agile software development tool for their traceability, easier collaboration, and accessibility from multiple locations.
Regardless of whether a team's board is physical or digital, their function is to ensure the team's work is visualized, their workflow is standardized, and all blockers and dependencies are immediately identified and resolved. A basic kanban board has a three-step workflow: To Do, In Progress, and Done. However, depending on a team's size, structure, and objectives, the workflow can be mapped to meet the unique process of any particular team. The kanban methodology relies upon full transparency of work and real-time communication of capacity, therefore the kanban board should be seen as the single source of truth for the team's work.

Typical workspace in the Atlassian JIRA kanban board:


Scrum vs. kanban

Kanban and scrum share some of the same concepts but have very different approaches. They should not be confused with one another. A simple table with a comparison of the two methods.



source: atlassian.com/agile/kanban