Law of Demeter

Just for the introduction – Law of Demeter is a rule that applied to object-oriented programming, helps us keep a code more maintainable and adaptable, by making classes and methods less dependent on other objects.

Let me copy & paste a few rules from Wikipedia:

The Law of Demeter for functions requires that a method m of an object O may only invoke the methods of the following kinds of objects:

* O itself
* m’s parameters
* Any objects created/instantiated within m
* O’s direct component objects

So, for instance, let’s take a class:

class Foo {
  public void bar(SomeObject o)
  {
    //you can:
    o.setResult(this.countResult());

    AnotherObject o2 = new AnotherObject();
    o2.append(o);

    //but you can't:
    o2.popObject().delete();
  } 
}

So far, so good. We have the loosely coupled class that can be easy refactored or re-used. However, one can say using Law Of Demeter tends to multiply auxiliary methods in classes and to grow class interfaces.

It is evident that this is some problem. So should we practice this law or not?

The short answer is: yes. The long answer is: we should keep the LoD in mind, and use it regularly as a starting point. When our class grows unnaturally and beyond reasonable limits, then and only then it is time to add some dependency and to worsen coupling. All right? ;)

Intention Programming

Intention Programming

Internet of Things is out there. Smart homes exist around us. Connected devices become annoying.

Simple things like lights, doors or heaters have started behaving like an old and worthy valet which wants to help you in every aspect of your life, but is a little deaf and additionally doesn’t speak your mother tongue. When you want to go to a cinema, he buys tickets to a museum, when you want to surprise your family, he loudly proclaims that you are already at home. The same thing is with “smart” devices.

Let’s take a smart garage door. It opens every time you’re approaching home in your car. It’s very nice as long as you want to park in the garage. But what if you want to stop on your drive only? Or you have just returned for a sec to pick up forgotten breakfast? The garage gate will be patiently opening every time you come.

Okay, maybe it’s so clever that it will close itself after a while. But this doesn’t change the fact that gate was unnecessary opened for a period of time while someone could steal your precious, still dumb, hammers. You didn’t want to park in the garage so it shouldn’t open at all! It’s not a smart behavior. Such devices aren’t truly smart, they only react to events, but what we need is to make them really smart. We need something I call an “Intention Programming”.

The Intention Programming goes beyond regular “on event” programming. It adds a mystique layer responsible for guessing user’s intention. It makes “smart” devices smart.

Instead of logic like this:

IF (adam's car approaches)
THAN
Open the gate 

We can do something like this:

IF (adam's car approaches AND Adam wants to park in the garage)
THAN
Open the gate

Instead of this:

On(UserEnteredRoom)
{
  If (IsDarkOutside())
  {
    turnLightsOn();
  }
}

Write this:

On(UserEnteredRoom)
{
  If (IsDarkOutside())
  {
    If (DoesUserReallyNeedsALight())
    {
      turnLightsOn();
    }
  }
}

Whoever implements The Intention Programming first, will win the race of connected devices. Ready, Steady, Go!

The 3

The 3

KISS is mature. KISS is three. Happy birthday to KISS!

I want to say BIG BIG BIG THANK YOU to all our employees, partners, customers and all people committed to KISS digital. We’ve started three years ago as a very small company that nobody knows but now we are widely recognized on polish market. The next step is to conquer the world. Yeah, we are coming!

Why Eddystone is not the game changer

Why Eddystone is not the game changer

I just wrote about beacons and we have Eddystone now. As Google announced, Eddystone is their approach to beacons and some people claim that this is really a game changer. I don’t agree. In my opinion it’s only evolution and natural step for Google who had to catch up with Apple iBeacons so far. I see also some serious issues that make Eddystone not the game changer.

My first doubt is that new features won’t be supported on Apple iPhones. It’s unlikely that Apple will decide to support 3rd party solution especially since they have their own iBeacons. What is more probable is that iBeacons’ specification will be expanded to meet new features but it won’t be compatible with Eddystone. So, Eddyston’s special features will work only on Android.

A second question is about a broadcasting URLs feature. Eddystone can broadcast an URL address and this features is claimed as a killer feature. This function will work even if you have no a beacon application installed on Android smartphone. In such situation Android will display a notification and will let you open the broadcasted address in a web browser. However could you imagine what happens if there is a lot of beacons broadcasting URL addresses and user will be flooded with notifications? I guess the user’s first reaction will be turning this feature off.

Another concern is related to a battery. As Eddystone can advertise three different packets we can assume that the device will consume more energy and it can affect battery life. Particularly if a beacon device would be dual-compatible – I mean it acts as Eddystone and iBeacon simultaneously. Instead of lasting for whole year we can get a beacon that works for a few months, however it strongly depends on a hardware and battery type.

I’m very curious how Google beacon will be adopted by developers.

The Useless Chromebook

The Useless Chromebook

If it made any sense I would buy chromebooks for our employees in a heartbeat. I like the general concept and a design of some models (i.e. Chrombook Pixel is beautiful as long as we don’t speak about the price). Their big advantage, comparing to windows laptops is its security and effortless management. I admire theirs simplicity which is fine, but not if it comes with overlimitation.

Buying Chromebook for business purposes doesn’t make any sense today. It’s pretty amazing that these devices are completely useless even though you need a computer only for doing a few simple things. Some people at KISS use their laptops just for stuff like this:

1. Communicating over email and chat
2. Working with spreadsheets and text documents
3. Browsing the Internet

It sounds like a great chance for Chromebook, however it didn’t take an advantage of it. Yeah, it supports very well Gmail, Hangouts and it has Slack app, but when you want to run Skype, you hit the wall. Yes, it can open documents in Google Docs or run the Office 365 online, but when you want to print it, you hit the wall (compatible cloud printer is needed). When you scan papers using an all-in-one printer… guess what? Yes, you hit the wall because you can’t get an access to scanned documents for a reason that Chromebook has no support for network shares. In my opinion only web browsing is acceptable. However, you don’t buy a laptop only for browsing the Internet. So, what are chromebooks for?

What beacons really are?

What beacons really are?

There are a lot of misunderstandings and myths around beacons. But the truth is beacons are pretty simple devices with very limited functionality. I’ll try to explain it in this article.

Let’s make a quick look at the very beginning. A beacon is NOT an idea invented by Apple. The term “beacon” means some device or building which was designed to attract attention to a specific location. Beacons are primarily used for navigation or defense communication purposes. You can still find the 16th-century beacon huts in England. But, let’s come back to modern times.

The beacon we are talking about is a simple electronic device with Bluetooth Low Energy chip fitted on it. It has a micro antenna and is powered by a small battery (like in an ordinary wristwatch). It can also be powered by a power supply. Energy consumption of typical beacon is so low, however, that it can work on a single battery for several months. It can be enclosed in a fancy, colorful casing, or in a generic plastic box. To have a beacon you don’t even need a dedicated device because it’s possible to make the beacon just by running an appropriate application on your computer or a smartphone. Of course, this kind of use doesn’t normally make sense, however, such procedure is often used by software developers for testing purposes.

All right, but what does a beacon do? Its role is pretty simple. Imagine a lighthouse. The beacon, like a lighthouse, sends information “Hello, here I am!” and within this information, it also tells its unique number: “Hello, here I am, and my number is 2369!”. This number is pre-programmed during the production process but can be changed in the implementation stage. What else? Hmm, nothing – this is all that beacons do: they announce their presence to the world. These small devices, attached to walls, doors, glass-cases in the museum, etc. only tell their id. Their power lies in the software running on the device that RECEIVES beacon’s signal. That is where all magic happens.

Typically a device that receives beacon’s signal is a smartphone with a dedicated application installed on it. When the application receives a signal from a known beacon, it launches some action (i.e., it can send information to a server that you are nearby a particular beacon, or can play audio description, or can show an advertisement on phone’s screen, etc. – possibilities are endless). The application can also determine a distance from the beacon. Such measurements are not very accurate they can rather show you whether you are close (1-2m) or far away from the beacon.

So, what do beacon companies offer? Actually, they don’t sell only these simple electronic gadgets but give you a complete product: beacons and software to manage them. However, there is still one missing part – the application for end users. And if you need such app or custom-made solution based on beacons, you can always turn to the best software company on Earth – that is KISS digital :)

Apps. Apps everywhere!

Apps. Apps everywhere!

Geeks love tools, don’t they?

However I don’t consider myself a geek. I’m not even a heavy user. I have only few apps installed on my smartphone. But, when I install an application you can be sure that I use it everyday and this app must be a very, very reliable tool. So what apps, beside standard ones like Phone, Mail or Calendar I use regularly ?

There are three major apps without which I feel like a child in the fog:

1Password – as an administrative manager, IT admin, CTO and god knows what more. I keep and store tons of passwords. For me this app has no competition because of its stability, Wi-Fi synchronization (you don’t need to put your password’s vault on external server such as Dropbox or Drive) and platform availability. Its user interface is also quite nice and it flawlesly supports my iPhone’s Touch ID.

OneNote – this is my number one application. I use it everyday for taking notes about my ideas or plans. I type up and analyze problems, write new blog posts, memos and meeting’s minutes and summaries. I like this tool for a data structure (notebooks, sections and pages), flawless synchronization – one, slight disadvantage of OneNote is the necessity of having Microsoft account – and full spectrum of features such as an audio recording, making screenshots or clipping web pages, but to be honest, I use only base functionality plus files attachments.

Wunderlist is another app installed on my smartphone. I used to use Apple’s Reminders for a long time and frankly speaking, I don’t remember why I switched to Wunderslist. Most likely the switch was related to my aversion to being limited and bound by one eco-system. All in all, in my opinion Reminders are as good as Wunderlist is. I don’t make any notes in it besides “to do” lists.

Another two applications can be placed in a category called “I can live without it but it’s very useful”:

HipChat is our team chat tool and I have its mobile client installed. It helps me to keep in touch with my team when I’m away from my desk.

The second application is Asana App. Asana is our collaborative tool that I chose because of its flexibility and price. Three years ago Asana was the cheapest option from all major team tools. It’s not very cheap now but it still meets our needs.

And.. That’s all folks. You could find more apps on my smartphone like Spotify, Polar Flow, Uber and Flickr, but they are only for my personal use. As you can see I keep my device pretty unclattered and I am very light on the amount of apps I use.

KISS rules

KISS rules

I like clear rules when everybody knows what to expect. Especially if we talk about a job and employees. Clear rules make our work more productive and let employees focus on main goals rather than on immaterial side issues.

On the other hand I wouldn’t like to create a rigid environment with restrictive limits. So I try to balance – I set clear rules that everyone can follow but I also keep them open for unforeseen situations. One of our set of rules is concerned with employee’s courses, fairs and conferences. Here they are:

Literature and online courses

Everyone at KISS can send request for buying books, newspapers, subscriptions and access to online courses at any time. Every request will be processed immediately unless our budget is tight. It’s pretty clear.

Attending fairs and conferences

Every engineer at KISS is welcomed to attend fairs or conferences of his/her choice. KISS will pay all costs including an entry fee, travel expenses, as well as up to three days hotel stay. KISS will not pay for food, sightseeing and any other attractions not related to fairs. If you are working for KISS for 12 months or more you have the right to one trip per year. If you are working less than 12 months you also can go but you need a permission from your superior.

Attending fairs or conferences doesn’t reduce your vacation time.

Attending courses and workshops

Any engineer working for 3 months or more has the right to take a training of his/her choice. The training has to be related to engineer’s job. KISS will pay for a course fee, transportation and accommodations for the time of the course. When an employee attends a course he has to sign a contract extending his commitment to KISS by another 12 months. If an engineer decides to quit before this time he will have to return all expenses related to the course.

Attending a training doesn’t reduce your vacation time.

How do you like it? If you, like us, prefer clear rules, check our current job offers right now!

Laz^H^H^H slack time!

Laz^H^H^H slack time!

Most likely every company doesn’t fully utilizes employees work time. There are always periods when personnel is less overloaded and doing nothing. It’s an obvious and non cutting-edge thesis. The question is how many companies and in what manner do they manage this slack time by design? And most importantly how does it look at KISS digital?
 
The “slack time” term I’ve borrowed from our office’s neighbor Pawel Brodzinski. Pawel (CEO at Lunar Logic) set this term as a part of their corporate culture. As for me I was never aware of the importance of free time in a company. Indeed, our employees used to have periods of time when they wasn’t loaded with a ton work and could do things not directly related to the job. But it was never named. And often this time could be lost completely for unproductive actions.
 
After I realized that I tried to figure out how to direct those activities in the correct way. The way which could help the organization in smart development as well as could help employees in their personal development. As a result a list of preferred activities and a rule of “free resources” was established. Pretty simply and effective.
 
The rule of “free resources” says that there are always a few people who are not involved in any ongoing project. Pawel defines it as about 10% of employees but in KISS we speak about 1 or 2 people per every team. Yes, that’s all – the rule just says that in every team we should have a person not working on any commercial project. Instead of this, he or she should be involved in one of the preferred activities.
 
So what are those preferred activities during the slack time in KISS? I always persuade our team members to learn new things like programming languages, tools, methods and everything that can broaden their (and our as a team) horizons. This is action number one in KISS and for instance one of our developers is becoming the Xamarin expert right now. So, while you are on your slack time – learn, develop, expand your knowledge, build your strengths.
 
But of course there are many other possibilities. In your slack time you can:
 
1. Learn new things (mentioned above).
2. Create in-house tools that help KISS to develop, i.e. by automation processes.
3. Do R&D work not necessarly related to your major job description.
4. Prepare your presentations, workshops, and lectures if you want share your knowledge.
5. Just teach your colleagues.
6. Test ongoing projects. You can make a code review or write unit tests. This is an excellent way for upgrading quality of our software.
7. Birth amazing ideas on how to improve our work.
8. In rare cases you can be assigned as a fireman to a project that goes behind schedule. :)
 
What are major benefits of maintaining the slack time?
 
1. The organization is more flexible because there are always free human resources. You can assign an employee to an urgent project or even you can start a new project earlier then it’s needed.
2. You can develop internal organization’s processes and tools that always have been put off because of more significant needs.
3. Employees have the possibility for personal development and, as a result, they are more committed to the organization.
 
It just looks as good investment therefore in KISS digital it’s a part of our work organization.

Self driving future

Self driving future

According to the news, the coming years are supposed to see a major change in the car industry. The change I’m waiting impatiently for. The autonomous cars uprising.

I spend about 2 hours driving my car every business day. Two hours per day gives 10 hours per week that is a whole working day wasted in my car. What can you do while driving when your eyes, hands and your mind are busy? Maybe you can listen to music, make some phone calls, turn on audiobook or language lessons. Not too much, is it?

But what if you hire a private driver? Than you significantly expand the spectrum of your possibilities. Now you can read a book, watch a video, browse the internet, attend to a teleconference or take a nap. You can also play video games or play chess with a friend of yours. These are the most obvious. But hiring a driver is quite expensive, and probably you can’t afford it unless you earn several times more than the average. However, there is light in the tunnel: the self-driving car. Anybody heard about the Google car, but not only Google is working on this technology. I think Google is closer to final results than others, but almost every conventional automaker’s R&D lab is swamped with work related to self-drive solutions.

Traveling by car differs from traveling by bus or train. In your car, you are in your very private space. You are able to do things undoable in more public places. Sure, I don’t mean sexual activities :) You can exercise for instance. As for me, I would like to have a whiteboard in my car which would help me to analyze my ideas. These new possibilities will change my life and the life of all those drivers who spend hours in their cars. They can do more work, can learn more things, can be more rested during a day. Even healthier because driving can be quite stressful.

It will change the full range of businesses. Insurances will be affected by taking the responsibility from human and accidents will plummet. Car rentals will become more popular because there will be no need for a driving license. Share economy can rise because people should be more willing to give their (still private) cars to others. And if we take this popularity of rentals and sharing growth we can assume that taxi companies will be no longer necessary.

In the long term, it should change our cities and the infrastructure we build. Roads could be narrower, intersections smaller, no street lights, no signs. Space recovered will be allocated to pedestrianization and greenways. For being more human. Cities landscapes should look better.

And last but not least it’s a great opportunity for startups and tech companies. Self-driving cars will create a huge market of consumers who will get extra hours for their activities. Cars will become products from the Internet of Things category rather than from transportation industry. There will be new needs and new solutions that we can’t imagine yet.

In my opinion, we can compare these ongoing changes to another revolution that was the invention of the Internet. It’s a game changer.

Can’t wait!