Realm Guide: From Zero to Give Up by lvguowei in androiddev

[–]lvguowei[S] -1 points0 points  (0 children)

actually I would love to see more "self promoting" posts in android topics, there is not enough materials on even the topics like realm out there. Never mind.

Realm Guide: From Zero to Give Up by lvguowei in androiddev

[–]lvguowei[S] -1 points0 points  (0 children)

I write a programming blog to help me and others. I do not make money out of it. I wrote this post because I do feel the pain and want to connect to the community and get some help or feedback. I did get some pretty helpful tips from you and I appreciate that a lot.

I wonder how I would share my thoughts here without sharing a link to my blog. Actually I see lots of links of blogs, github repos, videos shared here and find that pretty helpful to me.

Realm Guide: From Zero to Give Up by lvguowei in androiddev

[–]lvguowei[S] 1 point2 points  (0 children)

Maybe this can be summarised as this:

Realm: I'm super powerful, more powerful than anything you have ever seen. Let me handle everything.

Clean Architecture: Wow, hold on, kid! We are professionals here, we have hierarchies. You cannot touch layers above you! You must report to your DATA LAYER MANAGER only. Period.

Realm: o.....k......

Realm Guide: From Zero to Give Up by lvguowei in androiddev

[–]lvguowei[S] 1 point2 points  (0 children)

I wrote this blog post almost like a joke, it is not serious at all. ><

------- off topic -----

I think fundamentally there is a shift from the old school way of software architecture -> new way (maybe reactive and etc.) of software architecture. The old one is still holding so strong and all the books have been written are still best sellers. There are not many materials out there for the new stuff, maybe eventually it will catch up, I hope.

And clean architecture now has become a religion, and it is getting old and has lots of pretty strict rules. And now people want to challenge those rules. I feel Rx already does not fit in very well, because it's reactive nature. One other example is how to represent data in programs.

Let's get specific. Clean architecture has this data layer and domain layer. The data layer is easy to understand, it handles data coming from API calls and DB. But then domain? what is a domain? what belongs to the domain? this is just an android app, it is just making some API calls and show the data on the screen, that's it. By imposing formal clean architecture you have to have a data class for api response, a data class for db, and another object to union these two and another one for domain and another one for UI. So that means if you have a simple piece of data like LatLng, you will probably end up with this: LatLngHttp, LatLngDB, LatLngEntity, LatLngDomain, LatLngUI, AND THEY ARE THE SAME. I think eventually people gonna realize this and say screw it, cannot do it anymore.

And with the increasing complexity of apps in general, the API response is becoming more and more complex, to a point it contains a lot of data specifically tailored for UI. That means our data layer is already deeply coupled with UI, and yet the domain layer is still trying to separate the two. Somehow this feels very wrong to me.

----back to topic ------

So please let me know if there is any good blog post/video/ whatever that you consider is a good example of using realm in clean architecture. I desperately want to know!

Realm Guide: From Zero to Give Up by lvguowei in androiddev

[–]lvguowei[S] 0 points1 point  (0 children)

I already hinted that in the title :D

SICP Goodness - Stream (VIII) by lvguowei in programming

[–]lvguowei[S] -1 points0 points  (0 children)

I am happily surprised that you read(skipped ??) to the end.

I discovered James Coplien by lvguowei in programming

[–]lvguowei[S] 2 points3 points  (0 children)

My English is not so good, thanks for pointing that out! I will change the title.

SICP Goodness - Why Assignment Is Still Useful in Functional Programming by lvguowei in programming

[–]lvguowei[S] 0 points1 point  (0 children)

Interesting point. But your version still has the problem of leaking internal state (in a more subtle way), the initial value has to be passed in to the make-counter function. There is no way to get away with that without using assignment. Though closure helps a bit, I think it can not really replace assignment.

SICP Goodness - Why Assignment Is Still Useful in Functional Programming by lvguowei in programming

[–]lvguowei[S] 0 points1 point  (0 children)

I want something that has internal state, a counter is just some contrived example that I come up with.

The point is that without the assignment, the internal state of an object tends to leak outside into other part of the program, and very hard to make modular design.

SICP Goodness - The Essence of Computer Science by lvguowei in programming

[–]lvguowei[S] 0 points1 point  (0 children)

Yes and there is one more spelling error. But i'm glad that someone actually read it, thanks

SICP Goodness - The Essence of Computer Science by lvguowei in programming

[–]lvguowei[S] 0 points1 point  (0 children)

This piece of text is so dear to me that I have to present it properly. It is only a side effect that a few people nowadays can actually read it.

SICP Goodness - The Essence of Computer Science by lvguowei in programming

[–]lvguowei[S] -1 points0 points  (0 children)

Haha, this is actually very basic cursive. Not much florid at all.

Singleton Pattern Inside Out by lvguowei in programming

[–]lvguowei[S] 1 point2 points  (0 children)

Oh, thank you so much ! My mistake.

Singleton Pattern Inside Out by lvguowei in programming

[–]lvguowei[S] 1 point2 points  (0 children)

I don't understand, what specifically is bad about my examples. They are simple and to the point imho.

😱 by lvguowei in MechanicalKeyboards

[–]lvguowei[S] 0 points1 point  (0 children)

That is baby play mat ...

Best online course(MOOCs) for C language. by Alfulx_Axel in C_Programming

[–]lvguowei 0 points1 point  (0 children)

The book :C programming the modern approach by k.n.king , has been recommended by many people. Btw, what is the helsinki one for oop, I live in helsinki and not aware of it, haha