wtorek, 14 marca 2017

The architecture of the project

I have not been journalist and director more then five times. The reason was: ambition. 
Hate that word, hate that mind condition, when you have belief that you are perfect one to change the world. Everyone is equal, nobody's perfect. When I decided to cure out of my ambition I felt happy. Ambition for me is synonyms of expectations, but not mine. Expectations from each other, and I can't feel free with that. Kill every ambitions as soon as possible. No matter what are you doing, developing apps or directing films. Ambition kills you like a cancer, and wasting your time and life. I even think that it causes often suicide especially in the artistic class. That it is a primary reason why I'm stopped with films and started with programming.

So..., I don't want to be the best RoR and JS developer in the world, the life may be boring when you're the best. I have a lots of fun when I make a mistake. Sometimes it's funny. But... I'm going to present you how my RoR app looks like.

At first... I should not use MVC architecture in Rails app

So I'm convinced that rails app should have many layers. Not only three. It will be simple and chaotic. My app structure also has:

1) Models: only for validations, callbacks and extra methods. I don't like business logic in the models. 2) Validators: for every validator which includes with many models. 3) Interactions - for interactions with database, CUD methods (create, update, destroy) - without R (read). For every business logic. I'm using Active Interaction gem. In the interaction you can also use validations through models. 4) Providers: for 'R' method from CRUD - filtering and ordering data. Simple ruby functions. 5) Queries: for SQL queries. 6) Controllers (building with GRAPE gem): Endpoints without business logic. In the controllers I also run the interactions, providers or queries. Sometimes simple active record queries like .all or .first. I'm convinced that more then 2-3 lines of business logic in the controllers is too much. I know, it's a philosophical issue. The grape endpoints can validate params with type. It's a big plus. 7) Entities: for grape endpoints, using grape-entity gem. 8) Specs: I'm TDD fan. I'm testing everything using RSpec. APIs (quasi integrations tests), Interactions (business logic), queries, providers and models. Remember, do happy and unhappy path. I'm also using factory girl gem, and spring. 9) Workers: for sidekick workers. 10) Mailers: for mailers. 11) Sometimes others i.e. helpers, matchers for rspec etc.


Views & Rails Controllers
Views are also different frontend app. Sorry rails views, I don't need you. 
Rails controllers? What it is? :)


the systems theory for developing apps (part I)

When I was on the first grade at University, good old professor told me that systems was everywhere, and reality is imagination of my individual programme (system) situated in my brain (sic!). You are even a system like me, he said. I didn't believe him and I though that he is insane. Seriously, he amused me a lot with that nonsense, because everyone knows that humans are also different than computers or other piece of junk. He answered me bluntly by giving a list of scientific publications which I had to learn to pass half-year exams. After that, I read a lot of books about operative systems written by Ludwig von Bertalanfy, Niklas Luhmann, George Spencer Brown, Humberto Maturana and Francisco Varela. Currently, I'm sure that he was right. The computers are like humans.

We are still programming our brains in the process of creating reality by experience. Niklas Luhmann wrote, that every system (ecological, social, physical) can only create a reality in the process of binary coding. The binary code is the leading difference between system and boundary-of-the-system articulated as a denial, i.e. the social system of law has only two sides (with two values like binary code) legal side or illegal side, the social system of art has similarly two sides - the beauty or ugliness, system of science - truth or not true, the system of economy: ownership and lack of something. In the society we stabilized sides of those systems by communications - in the law - by legal acts, in the art by the discourse of art critics, in the economy by money. Communication creates our world and our experience. Humans communications. It's a pity and I'm sorry too for this reason. 

The process of creating self-worlds was started during our socialization. The social systems tell us incessantly how to do something, how to behave, how to make money etc. The instructions are everywhere. In sum, I know what can I expect from you in different social contexts. Yes, everyone knows, that in the cab people talking about politics and weather. Systems can't exist without communications, because communication stabilizes them.  Points of views were created by fucking systems, and each of us were created by historical communications, by the past, by culture before our birth. I quietly believe in the Luhmann's thesis, that people are not included into social systems, because nobody bring those instructions into existence. They always exist - in the air, over our heads. Every instruction has historical foundations, every instruction has frames, every instruction can answer you true or false, every instruction has binary coding. You can't get away on it, because of neurological construction of your brain and culture. Every system has a schema. If you decided to live on the hermitage, you have to use instruction how to escape from society, but this instruction was in the society before. Vicious circle.

After social and communication studies, I've graduated from film and journalism faculty in Poland. I'm going to create an app with instruction how to lead a film project from development (the moment when you get the idea for a film to the first film slate) trough promotion, marketing communication to distribution. The instructions are not constant over time. Time has a devastating impact on everything. Do you believe that society has own instructions how to be a good friend? And tell me, how do you know, that it is true?

I'm going to inject few systems into the app: 
1) the art system
2) the economy system
3) pop-culture system
4) social system in the interactions level,
5) law system

Instructions and also apps with instructions show the construction of our reality. I hate them.

See also:
N. Luhmann, The art as social system
N. Luhmann, The theory of social systems
N. Luhmann, Die Gesellschaft der Gesellschaf
or text me if you want more sources




sobota, 11 marca 2017

Kiddo will be a simple app for every creative producers, directors for developing film projects from zero to Oscar prize. I'm RoR and JS developer who graduated from Krzysztof Kieślowski's Radio and Television Faculty and I know what problems film industry has in artistic level.
Stack: RoR 5 with Grape,  JS (vue.js) and postgresql.
Let's create art using software.
The project has started in competition ''DajSięPoznać", organized by devstyle.pl