A
A
artshelom2017-09-18 23:08:35
Android
artshelom, 2017-09-18 23:08:35

Code review of the unofficial toaster app?

Good day.
I decided to do a good deed to everyone who sits and reads questions on this wonderful site from the phone.
My first application for the phone is cloud.mail.ru/public/73zn/CAs2L1zjA
So if you don't like the code somewhere, scold me so that I don't write "shit" code anymore. There are many things that need to be added, I wanted to make a notification for signed questions and, most importantly, authorization, with which I have a lot of problems.
At this stage, I wonder if people need this application at all, and what errors do I have??
Link to mail repository from github, I can’t figure it out ((

screenshots
33974e23b5504737a423baa55a8f446f.jpg5ce47d3c7fff4f7ba9ee0c5ec7515ad9.jpg99367bad95944b90b7d338de586795bc.jpgf30dd695a2334cae8657cfc6b29d99cc.jpg978c6889144c4e46aeda3446a5fb70aa.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2017-09-19
@artshelom

1. Review (code inspection) does not happen without swearing. There is a law from celestials "the quality of the code is measured by the number of curses that the reader spews." Those. inversely. This means that it is never equal to 0. )))
Therefore, do not believe when they say that everything is fine and perfect. So they didn't get in.
Do not believe when they say that everything is g..no. Or something mr. Listen, but don't believe. This is such a philosophical digression.
2. Research the market before writing. Before the beginning. Or after. You can't do this during the first release. Otherwise, you may lose interest in writing. To the very release of the product. The study is not a fact that will show real results. And the product will not be released. After the release, you can find out how to improve the product or what to add. Again, do not do this during the preparation of the first release.
3. Already wrote GitHub. Try to make things easier for people. Including those who check your code. Believe it's worth it.
4. Philosophical question to open or not to open the code. If you want to learn how to write open.
By code. Superficial. example QuestionFragment
There are libraries that improve the code. like ButterKnife. they are simple, but the code is clearer (shorter).
Links to url are in the getHttp method, which is very inconvenient. I think it's better to separate text links in one place, building and executing a query in another (general case). receiving data in the third. Try to stick to the Single Responsibility Principle. To make the code easier.
The fragment contains both rendering and business logic (the logic of the application). This is how the code gets cluttered. It turns out huge confusing classes. Check out the MVP template. They can simplify the code. Even strongly.
As far as I understand, when the screen is turned over, the data is read again. This is not good. Even if the request is cached. Use for example MVP + Dagger2
(another fashionable, or rather, already traditional library)
You can watch
Loader (data loading)
RxJava (for example, work with retrofit, thread-threads, etc. is very useful)
SOLID (principles. to make the code more flexible and understandable)
Try to break the program into independent components that can be reused.
Do not take my words as absolute truth. I don't have much experience writing android apps. But if you want to listen to criticism, write to me, for example, in vk.
Anyway, good luck with your project.

X
xmoonlight, 2017-09-19
@xmoonlight

Do not open the code, use OAuth from the key to login to the application.
You are doing a really good thing, but it's better - show only a small part of the code and then sell your product.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question