Tuesday, February 3, 2015

2nd of 3 Books That Changed My Life: @ericevans0's Domain Driven Design

I was thinking lately that from all the books I've read related to my professional life and career, there are three that stand out. I can not decide which one had a bigger impact because each effected a different part of my life. So there is not one better than the other. I will write three blog posts about each book. They will be presented in the chronological order I read them.

-------------------

One of the most difficult to read books, and still one of the most enlightening ones, Domain Driven Design by Eric Evans is second on my list of three books that had a major impact on my professional life.

This one is a book that takes software development to a totally different level. Seemingly it leaves most technicalities behind and views the whole software from a much higher level.

Imagine your source code as a balloon filled with air. It sits between two major actors of our industry: the software developers on one side, and the business people on the others. Or if you take the people out of the picture, software production versus business domain.

In such a setting, Domain Driven Design pulls a part of the balloon toward the business people, toward the domain, while at the same time anchoring its other side in the software production department. It tries to fuse business with software by both pulling simple software concepts like modules, classes, dependencies, functionalities into business, as well as pulling business concepts to the source code.

As a software developer, I was more concerned and intrigued by the introduction of business concepts into the source code. At Syneto we work on Storage OS, an operating system for storage devices. We are both the software developers and the domain experts. So we could not pull software concepts into our domain, we already knew all the programming related concepts. But we could start working toward representing domain concepts in our code.

This had a major impact on our architecture and structure of modules. We started by implementing the Repository Design Pattern learned from Domain Driven Design. This opened up some interesting possibilities. It forced us to have each of our models represent a domain concept. As we mostly work in PHP, our modules are simple directories. Each module represents a domain concept and has a repository. The repository can provide and save objects. It's not a generic ORM though, it is more likely a domain specific query language. And what kind of objects should such a repository provide? Domain objects. These objects represent a more specific part of the domain.

For example, we can have a Network module. In this module we can have several repositories like NetworkAddresses, or HardwareLinks. A NetworkAddress repository can provide NetworkAddress objects. A NetworkAddress object represents a unique combination of IPv4 address, IPv6 address, a subnet mask, and a name. The HardwareLinks repository may provide Link objects. These represent the state of a network link: type - ethernet or fibre channel -, cable plugged or unplugged, link speed, frame sizes, etc. These are value objects, representing state. But we also have entities representing functionality like applying a NetworkAddress to a specific HardwareLink. This will result in a setting on the operating system. This setting will assign the IP address and subnet mask to a network link on a physical network card.

I will stop now and let you read and discover the mysteries of Domain Driven Design.

-------------------

Read also: 1st of 3 Books That Changed My Life: @unclebobmartin's Agile Principles, Patterns, and Practices in C#

Tuesday, January 20, 2015

Galaxy Note 4 - After the First Eight Weeks

I've got my Galaxy Note 4 delivered about eight weeks ago, on December the 2nd 2014, and I waited some time for the placebo effect to subside before I write about my experience with it. My previous phone was a Galaxy Note 2, so most of my comparison and impressions will be related to that device.

The Exterior


I love how the Note 4 looks. I ordered the bronze gold version. The color you perceive is actually very much influenced by the light conditions. You will see it brown under a 1600W white colored light bulb. You will see it gold, and quite yellowish, under a 60-100W light bulb. You will see it a pinkish-magenta under natural light with clear sky but in the shadows. And it actually look bronze-gold under direct sunlight.

The Note 2's round form never really attracted me. I bought it for the big screen, not for the rounded corners. Note 2 was inspiring a natural object, like a stone, egg, leaf, etc. The Note 4 is a totally different story. The much less rounded corners and 45 degree angled flat edges give the Note 4 a futuristic technology look. It looks like a modern electronic device, not something resembling nature.

But the sharp angles give the Note 4 a big handicap compared to Note 2. It is much harder to fit it into your packet. The Note 2, with its round form, slid into any pocket with ease. I used to keep it in my front packet of my blue jeans and while I was sitting the Note 2 felt comfortable while pressing to my legs. The new Note 4 is much harder to be pushed into the pocket and the right angles produces a discomfort after some time. While having it in my pocket for 10-15 minutes is OK, I wouldn't think of keeping it there for much longer.

When you keep the two phones in your hand, they provide two totally different experiences. The Note 2's sticky, glossy cover and rounded edges encourages you to keep it laid in your palm. As it won't slide out of your hand, you can do this comfortable even at angles larger than 45 degrees. The Note 4 has a very different feeling. Its sharp edges encourages you to grab it by the sides and it will stay in your grip with easy and little effort. The faux leather back slips easier on the skin compared to Note 2, so you won't let this phone just sit in your palm. Which one is better? I don't know. They are two different experiences, I like how each one feels in its own way.

The Hardware


Regardless of the version you choose, the Note 4 is a beast. The Qualcomm CPU is slower, but it has faster 4G. The Exynos CPU is faster but it has slower 4G. As I am mostly using Internet over Wi-Fi, I've chosen the Exynos variant and I am completely amazed. Any game runs very smoothly and loads blazing fast. I didn't play Asphalt 8 on the Note 2, but I play with a friend of mine who has and LG G3. On the Note 4 the game loads about 2 times faster and runs somewhat smoother. Both phones can run the game with amazing graphics at the most demanding settings. I am very pleased with the speed of CPUs & GPU.

Now let's talk about the screen. Some may think that it's too big, but I've never met any person who bought a large screen phone (phablet) and then reverted to a smaller screen on his/her next phone. The colors of the super amoled 2K resolution display are very good and much more natural than the Note 2's screen. But beauty comes with a price. The screen is the largest battery consumer on the Note 4.

The new pen... well, it's shorter than on the Note 2 and it feels a little bit awkward to write with it. I am sure, however that I will get used to it quickly. As a small design element, I liked better how the pen hid in the Note 2. On the Note 4 case, the pen's tail is a very visible element.

The 32GB builtin storage and the 128GB SD card extension slot should be enough for everyone, I can't complain about the space. On the Note 2 I felt the need for some extra space. I had the 16GB variant, and you know 5-6 GB are always reserved by android. I never had more than 8-9 GB usable space for programs and multimedia.

Battery Consumption


I didn't do any particular test, but as with any new phone I used it quite a lot at the beginning. I installed a lot of applications, personalized it, played visually amazing games, read news, mails, chatted with friends and of course I called other people.

The battery did not discard in less than 24 hours, regardless of how I used my phone. As I am getting used with the phone and I have some automation in place that conserves power by turning on Wi-Fi and 4G over night, I am getting more and more hours out of it. My next charge should be at around 35-40 hours from the previous one with the following daily usage: 60 minutes reading stuff, 30-45 minutes playing Asphalt 8, 70-85 minutes 4G and GPS navigation, 16 hours of Wi-Fi, 10 minutes of talking, a couple of SMS, a few Hangout Messages. I am so far very pleased with the battery life and I am surprised that 4G doesn't really matter that much, but I made no extensive testing.

Software

Well, I will let you discover the details. I just say that I love "S Finder", air commands, ScrapBook app, selective screenshots that can be easily stacked and then combined in various apps.

Handwriting recognition got much better. It almost always guesses what I write, very little correction is needed.

The camera and its software are amazing. The downloadable camera modes are a nice touch by Samsung, I love them! Colors are very realistic, the image stabilization works pretty well, pictures at low light are so much better than the Note 2 that I can't even compare them.

My Final Verdict

I love it. Very good phone. A little pricey though.