ActionViews or how I do not like boilerplate from the very childhood

Hello, Habr! In this article, I want to share my experience creating my mechanism for automating the display of various View types: ContentView, LoadingView, NoInternetView, EmptyContentView, ErrorView.
 
ActionViews or how I do not like boilerplate from the very childhood
 
 
It was a long journey. The path of trial and error, a search of methods and options, sleepless nights and an invaluable experience that I want to share, and hear criticism that I will definitely take into account.
 
I will say at once that I will consider working on RxJava, since for coroutines I did not do such a mechanism - my hands did not reach. And for other similar tools (Loaders, AsyncTask, and ...
+ 0 -

We collapse on a maximum: from ORM to the analysis of bytecode

As you know, a real programmer in his life has to do 3 things: create your own programming language, write your operating system and make your ORM. And if I've written a language for a long time (maybe I'll tell you some other time), but the OS is still waiting, then I want to tell about ORM right now. And more precisely, it's not even about ORM itself, but about the implementation of one small, local and, as it seemed initially, quite simple feature.
 
Together we will go all the way from the joy of finding a simple solution to the bitterness of realizing its fragility and incorrectness. From ...
+ 0 -

We invite you to Java Meetup in Raiffeisenbank

The internal community of Java developers Raiffeisenbank invites to its first open Mitap, which will be held on the site of the Moscow office in Nagatino, 28 June .
 
 
We invite you to Java Meetup in Raiffeisenbank  
fill the form.
 
 
In the Java mitapa program, we are waiting for four reports from the speakers of Raiffeisenbank and colleagues from Infobip. Start of papers in 18:00 , we'll open the registration in 17:30 .
 
 
The program:
 
 
Viktor Tsvetkov, Raiffeisenbank
 
 
CRDT: relationships at a distance. How to resolve conflicts in distributed systems
 
 
Andrey Markelov, Infobip
 
 
Redis anti-patterns ...
+ 0 -

Swift and Kotlin - about the most important differences between these languages ​​

Swift and Kotlin - about the most important differences between these languages ​​  
 
Hello colleagues. The title is self-evident, we invite you to familiarize yourself with the translation of an interesting article by Krzysztof Turek. Also note that the author notices interesting improvements that distinguish Kotlin from Java when developing for Android. Word to the author:
 
 
Probably, many of you have seen the following comparison of Swift and Kotlin: nilhcem.com/swift-is-like-kotlin . It turned out quite interesting, right? I agree that there are many parallels between these languages, but in this article I would like to discuss some important differences between them.
 
...
+ 0 -

JetBrains Open Day Moscow: results and video

+ 0 -

"Let's start! I said: start! ", Or how we realized the work with faststart-video for Android

"Let's start! I said: start! ", Or how we realized the work with faststart-video for AndroidMost owners of smartphones, tablets and other gadgets daily consume a huge amount of digital information, including media: images, music and, of course, video. At the last stop in more detail. It is very important not to force users to wait for content, especially when millions of people use it daily. In the iFunny application we are working on, there is a lot of video content, and we thought that downloading the whole video is long, uninteresting and not scalable. And what if in the near future it will be necessary to download a video with a duration of not 30-60 seconds, but in 5-10 minutes? ...
+ 0 -

Calculation of logical expressions in a string inside Java /Scala /Kotlin code

I needed to evaluate the validity of expressions of type
in runtime.  
 
a> 10 && b
 
located in the Row.
 
 
The code itself is on the Rock, but I did the evaluation of various libraries for this on Kotlin, just to play with it. The expression I get from the client, but from the internal, so I did not have to take care that in the expression I did not erase the files from the disk.
 
 
I evaluated different libraries for 1) can they do what they need 2) the execution speed of
 
 
were tested.  
 
 
interpolation of
rows.  
Js Engine
 
javaluator
 
exp4j
 
evalEx
 
mxparser
 
MathEval
 
Groovy
 
 
[h4] R...[/h]
+ 0 -

Snake layout and "quantum" particles in applications for Android (Part 2)

Snake layout and "quantum" particles in applications for Android (Part 2)  
It's time to talk about the promised "Quantum" particles. Kuantum allows to reactively change the state of the UI. Vue inspired me to create this library. Immediately show the library in battle.
 
The code for github is
 
 
Part-2: Filter and BooleanKuantum
 
Now add the ability to search the dictionary.
 
We add the search icon [/b]

 
Let's change DictionaryFragment.kt (I marked the place of the changes with comments)
 

import android.graphics.Color
import android.support.v7.widget.RecyclerView
import ...
+ 0 -

Kotlin Playground

Kotlin PlaygroundHello, Habr!
 
Most recently, we released the ??? version of Kotlin Playground, which we wrote about in our blog post PMM Kotlin Roma Belov.
 
stop stop
 
What else is Kotlin Playground?
 
Kotlin Playground
- A full-featured code editor written in Kotlin, which can be integrated into your web page.
 
How can this be done?
 
It's all down to impossibility, it's worth adding one script-line to the header:
 

 
Attribute
data-selector tells us that all the blocks are code magically turn into an executable Kotlin code.
 

Let's try other ...

+ 0 -