10x Clean Dev

204 posts

10x Clean Dev

10x Clean Dev

@10xcleandev

Gathering all the best tips to help you become a 10x Dev

London, United Kingdom Katılım Kasım 2023
104 Takip Edilen49 Takipçiler
10x Clean Dev
10x Clean Dev@10xcleandev·
@Zhuinden @hasen_95dx It got popular because Devs overused frameworks and Android imports don't allow to run your unit test in a fast way. A good Architecture removes the need for a lot of libraries/frameworks and make everything easy to test. History has been repeating itself since hexagonal arch
English
0
0
0
213
Gabor Varadi
Gabor Varadi@Zhuinden·
@hasen_95dx "Clean architecture" got popular because it was much easier to justify additional billable work hours under the guise of "higher quality", for even the simplest feature requests Clean Arch motto is simple: "why write the code in 10 lines, if you can do it in 10 classes instead?"
English
3
2
119
7.9K
ハセン حسن
ハセン حسن@hasen_95dx·
"Clean Architecture" Every single change has to touch 10 layers & possibly rename multiple files.
English
48
54
1.7K
116.4K
10x Clean Dev
10x Clean Dev@10xcleandev·
@hasen_95dx Clean Architecture is the outcome of SOLID principles. The Open/Closed Principle makes your code closed to these kind of modifications so if you find yourself changing 10 layers you are likely following some bad online example rather than the real CA
English
0
0
12
770
10x Clean Dev
10x Clean Dev@10xcleandev·
@unclebobmartin @gott_zac That will just burn extra tokens and context. AI is very likely leaving comments for you to read, not for itself. If AI can do the work, it can also do it the clean way. The less text the AI reads the faster and cheaper it gets.
English
1
0
0
33
Zac Gottschall
Zac Gottschall@gott_zac·
.@unclebobmartin In Clean Code, you wrote that comments are “a failure to express ourselves in code” but in the agentic era they help models index, navigate, and find relevant code faster have your thoughts changed?
English
11
1
44
14K
10x Clean Dev
10x Clean Dev@10xcleandev·
@Nek__12 @KasemSM_ @Zhuinden @DmitrySamoylenk @FatalError1609 Of course, by adding extra components or frameworks there is always a way out. But why adding more code and dependencies when you can do the work with less? Just follow SOLID/Clean Architecture and be rid of frameworks. You've read the book, you should know his take on this...
English
0
0
1
59
Kasem
Kasem@KasemSM_·
I think i am slowly realising MVI is the best arch for android codebase. specially opinionated libraries like Orbit MVI.
English
3
0
5
1.7K
10x Clean Dev
10x Clean Dev@10xcleandev·
@KasemSM_ @Zhuinden @DmitrySamoylenk @Nek__12 @FatalError1609 Once the OCP is broken you have scalability issues. If you have 50 actions in a screen, you have to sort them out in that when statement. With polymorphism you can have the VM implement multiple interfaces and use by to delegate to other classes. Now you have a facade that scales
English
1
0
1
62
10x Clean Dev
10x Clean Dev@10xcleandev·
@Nek__12 @Zhuinden @FatalError1609 @KasemSM_ Clean Code is more oriented to smaller components. There are good examples on how SOLID is violated at function/method level. CA is the follow up that moves focus on classes and modules. That’s been said the OCP is the same principle in all books, just different examples
English
0
0
1
25
10x Clean Dev
10x Clean Dev@10xcleandev·
@Nek__12 @Zhuinden @FatalError1609 @KasemSM_ Happy to look at your version of MVI and see. OCP is very simple: when you add new features you should add code not change existing one. If you have a sealed class for the intent and a single method for all the user interactions with a when statement you break it.
English
1
0
1
52
Nek.12
Nek.12@Nek__12·
@10xcleandev @Zhuinden @FatalError1609 @KasemSM_ First of all that is false: MVI does not dictate a single reduce function, it wants you to model events as objects. Second, that's not OCP at all, you don't know what you're talking about. Read uncle bob please first.
English
2
0
1
273
10x Clean Dev
10x Clean Dev@10xcleandev·
@Zhuinden @FatalError1609 @KasemSM_ Does it break S.O.L.I.D. principles? Check. MVI breaks the OCP by design. Does it rely on libraries/frameworks? Check. The vast majority of MVI codebases use libraries like Orbit. MVI is not an architecture, is an antipattern.
English
1
1
2
666
Gabor Varadi
Gabor Varadi@Zhuinden·
@FatalError1609 @KasemSM_ I know right, MVI was shady even in 2016, and somehow people still willfully choose to overcomplicate their design 10 years later And the wildest part is when they grab a third-party framework to do it (e.g Orbit) due to thinking: "if it's there, surely it's good for something".
English
3
3
18
1.7K
10x Clean Dev
10x Clean Dev@10xcleandev·
@Zhuinden Kotlin synthetics, ButterKnife, DataBinding... They didn't even learn from past mistakes
English
0
0
2
754
Gabor Varadi
Gabor Varadi@Zhuinden·
If you think you're following some kind of "best practice" that is used by "many developers" and is "agreed upon as best practice" so you know it has to be "the greatest idea of all time no one should ever question it", then: Remember when people thought this was a good idea?
Gabor Varadi tweet media
English
15
2
116
24.7K
10x Clean Dev
10x Clean Dev@10xcleandev·
@housecor If code reviews are a bottleneck the natural solution is to pair program, not to delay, and eventually remove code reviews ("later" is another word for "never"). Microsoft and "high trust", "mature", "strong automated quality checks" don't go hand in hand... Just look at GitHub
English
0
0
1
33
Cory House
Cory House@housecor·
Just learned a team at Microsoft is doing code reviews *after* merge. Why? To move faster. No more pausing work to wait for code reviews. No need for stacked PRs. No more time-consuming merge conflicts caused by long code review delays. This has risks, but may work well for a team that is: - mature - high trust - has strong automated quality checks
English
165
11
282
94.2K
10x Clean Dev
10x Clean Dev@10xcleandev·
@AmanHasNoName_2 When developers make a habit of writing bad code, it's hard to get the bad coding out of them. The same applies to AI. If AI was trained only on clean code we wouldn't stand a chance but since it is trained mostly on bad code... AI generated code is average at best.
English
0
0
0
196
Aman
Aman@AmanHasNoName_2·
Claude Code was built with billions of dollars, trained on every piece of knowledge and code on the Internet. You got your job by practising 3 sum 4 sum on leetcode. You think you stand a chance?
English
64
59
1.3K
79.5K
10x Clean Dev
10x Clean Dev@10xcleandev·
@KalumeYves Sealed classes are for mutually exclusive data. Data classes are for shared data. The most versatile approach is to wrap a sealed class into a data class, so you get the best of both. Full explanation here -> medium.com/clean-android-…
English
0
0
0
26
Yves Kalume
Yves Kalume@KalumeYves·
#AndroidDev asking for a friend... what’s your rule for choosing between a data class vs a sealed class/interface for UI state ?
English
11
3
27
3.4K
10x Clean Dev
10x Clean Dev@10xcleandev·
@dimitrov2k If you don't want to do it, don't do it. If it is a company requirement just pretend. Devs have been pretending to follow practices for years: TDD, unit testing, pair programming, agile... They've never been caught by the managers and ultimately the practice got the blame
English
0
0
0
24
Dimitar
Dimitar@dimitrov2k·
I really don’t want to orchestrate agents all day to do the work that I actually enjoy doing, this is super miserable state of existence, I struggle to understand how my colleagues enjoy this
English
63
39
920
87.3K
10x Clean Dev
10x Clean Dev@10xcleandev·
@udaysy @loftwah @LewisCTech It needs some cleanup but after the first few tests in the file it gets better. I think another important element is understanding whether you can write faster than AI as prompting still takes time, if you can then don’t use it. Maybe voice commands can make it faster?
English
0
0
2
12
Uday Yatnalli
Uday Yatnalli@udaysy·
@10xcleandev @loftwah @LewisCTech thats almost exactly my loop too. the test writing part is where ai struggles most imo. it can generate code that passes tests but writing good tests requires understanding the actual use case. does the ai-generated code need cleanup after or stays clean enough?
English
1
0
2
14
10x Clean Dev
10x Clean Dev@10xcleandev·
@udaysy @loftwah @LewisCTech After many years TDD is the natural way for me, with or without AI. Prompting the initial tests takes as much as writing them myself so I start manually then AI autocompletes them or I prompt. After each failing test AI generates the minimum code to pass the tests and I run them
English
1
0
1
29
Uday Yatnalli
Uday Yatnalli@udaysy·
@10xcleandev @loftwah @LewisCTech yeah the abstraction shift is something i keep thinking about. prompts as the new unit of work instead of functions. tdd flow seems like the natural guard rail tho. you running tests after each small prompt batch?
English
1
0
2
35
10x Clean Dev
10x Clean Dev@10xcleandev·
@udaysy @loftwah @LewisCTech It is. It also depends on the size of the context. Using agent mode in small batches or TDD flow is safe and there isn’t much to dismiss or adjust. IMO we are moving from a lot of lines of code to a lot of small prompts. We are basically just going 1 or 2 levels of abstraction up
English
2
0
3
74
Uday Yatnalli
Uday Yatnalli@udaysy·
@10xcleandev @loftwah @LewisCTech ask mode vs agentic is context-dependent imo. frontend component iterations? agentic all day. database migrations? ask mode and review every line. the task complexity determines the workflow not the other way around
English
1
0
1
76