<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for soniccat</title><link>http://disqus.com/by/soniccat/</link><description></description><atom:link href="http://disqus.com/soniccat/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 04 Feb 2021 14:33:45 -0000</lastBuildDate><item><title>Re: RxJava vs. Coroutines + Flow</title><link>https://blog.danlew.net/p/a6e7e2df-7a34-4f39-8ef0-9a6c0de181a2/#comment-5254437373</link><description>&lt;p&gt;Hi, thanks for such a precise article.&lt;/p&gt;&lt;p&gt;I'm curious about using Coroutines and RxJava at the same time while switching from one to another in a project. I suppose there might be problems with having different schedulers not knowing of each other. For example, if we use only Coroutines or only RxJava a corresponding computation scheduler is aware about how many cores a device has and takes that into account while managing an operation queue. On the other hand, if we have the RxJava Computation scheduler and the Coroutines Dispatchers.Default, it seems together they might run twice as many operations than required. Hence, I expect that might lead to overall performance degradation for simultaneously run operations. Probably there's a similar problem with the RxJava IO scheduler and the Coroutines Dispatchers.IO but I'm not sure.&lt;/p&gt;&lt;p&gt;What do you think?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Thu, 04 Feb 2021 14:33:45 -0000</pubDate></item><item><title>Re: MVI - The Good, the Bad, and the Ugly</title><link>https://adambennett.dev/2019/07/mvi-the-good-the-bad-and-the-ugly/#comment-4582510953</link><description>&lt;p&gt;I'd add that for relatively simple but popular app screens where we show a list of data loaded from a server, the current Google approach based on using LiveData with Resource template type looks like passing ViewState to the view and rendering it. The state is updated in the ViewModel via methods (Actions). It seems MVI won't be useful in this scenario.&lt;/p&gt;&lt;p&gt;For more complicated examples that might not be true.&lt;/p&gt;&lt;p&gt;Ref to the Resource type: &lt;a href="https://developer.android.com/jetpack/docs/guide" rel="nofollow noopener" target="_blank" title="https://developer.android.com/jetpack/docs/guide"&gt;https://developer.android.c...&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Sun, 18 Aug 2019 03:38:14 -0000</pubDate></item><item><title>Re: The Hobby · Moments of Inertia</title><link>http://localhost:4000/personal/2017/11/21/the-hobby/#comment-3629614044</link><description>&lt;p&gt;Some of my painted models in 2005 year. It was a try to make a Russian Warhammer. It's called "Ring of Rules". But I suppose, because of poor rules the project was closed.&lt;/p&gt;&lt;p&gt;&lt;a href="https://uploads.disquscdn.com/images/aaa2ca5da896234817792895beb59dd293bcba25f6846ce0271634e1e2e91bd9.jpg" rel="nofollow noopener" target="_blank" title="https://uploads.disquscdn.com/images/aaa2ca5da896234817792895beb59dd293bcba25f6846ce0271634e1e2e91bd9.jpg"&gt;https://uploads.disquscdn.c...&lt;/a&gt;  &lt;a href="https://uploads.disquscdn.com/images/5b31ab7e4a3ef14268003efcc2c6ce6bed8cec262f10c57f1a06e407e9339ca8.jpg" rel="nofollow noopener" target="_blank" title="https://uploads.disquscdn.com/images/5b31ab7e4a3ef14268003efcc2c6ce6bed8cec262f10c57f1a06e407e9339ca8.jpg"&gt;https://uploads.disquscdn.c...&lt;/a&gt;  &lt;a href="https://uploads.disquscdn.com/images/2f8b24e86b8f1a96eef051259cadd4ef09f32380c791592b8e3b32890b067c43.jpg" rel="nofollow noopener" target="_blank" title="https://uploads.disquscdn.com/images/2f8b24e86b8f1a96eef051259cadd4ef09f32380c791592b8e3b32890b067c43.jpg"&gt;https://uploads.disquscdn.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Thu, 23 Nov 2017 04:16:53 -0000</pubDate></item><item><title>Re: Swift: When to use guard vs if</title><link>https://www.natashatherobot.com/swift-when-to-use-guard-vs-if/#comment-3223195584</link><description>&lt;p&gt;Prefer not to use guard at all because, first of all, it forces to write more than one return statement. It's easier to understand small functions with only one. Then guard forces to handle wrong cases with early exits which might be wrong and should be done in another place.&lt;/p&gt;&lt;p&gt;In above examples, I think it would be better to move presented case blocks to separate functions. Where each function has one if statement and one return statement.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Sat, 25 Mar 2017 13:51:19 -0000</pubDate></item><item><title>Re: Why NULL is Bad?</title><link>https://www.yegor256.com/2014/05/13/why-null-is-bad.html#comment-2905047443</link><description>&lt;p&gt;What do you think about using annotations like Nullable and NonNullable? It should help to avoid long names like getByNameOrNullIfNotFound. Just name it getByName and mark it Nullable. IDE should help with highlighting situations where you forget to handle null cases.&lt;/p&gt;&lt;p&gt;Also it's strange that you're against returning null from get methods for storages like a map. Because returning an empty result from an empty map or a database is a valid result. It's logical to return a NonNullable result for methods like createAccount and throw an exception if it isn't possible. But it's expected to have an empty result from a storage object.&lt;/p&gt;&lt;p&gt;If I assume that throwing an exception from such get methods is a good idea that will lead to strange code. For example: I wan't to show one kind of UI if a person exists in a storage and another kind of UI if he is not. According your advice I should put one case in an exception handling part which smells like go to...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Mon, 19 Sep 2016 13:01:39 -0000</pubDate></item><item><title>Re: Handling Android resources with non-standard formats</title><link>http://blog.danlew.net/2015/01/06/handling-android-resources-with-non-standard-formats/#comment-2880722058</link><description>&lt;p&gt;In my case only&lt;br&gt;&amp;lt;dimen name="match_parent"&amp;gt;-1px&amp;lt;/dimen&amp;gt;&lt;br&gt;&amp;lt;dimen name="wrap_content"&amp;gt;-2px&amp;lt;/dimen&amp;gt;&lt;/p&gt;&lt;p&gt;works.&lt;/p&gt;&lt;p&gt;Your solution with item gives Resources$NotFoundException.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Wed, 07 Sep 2016 10:21:08 -0000</pubDate></item><item><title>Re: Custom Jackson Polymorphic Deserialization without Type Metadata - The Boy Wonders</title><link>http://www.robinhowlett.com/blog/2015/03/19/custom-jackson-polymorphic-deserialization-without-type-metadata/#comment-2591989442</link><description>&lt;p&gt;Thanks, that treeToValue method is what I was looking for.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Sun, 27 Mar 2016 15:23:32 -0000</pubDate></item><item><title>Re: Converting Complex Objective-C Macros to Swift Functions</title><link>https://www.andrewcbancroft.com/2015/01/29/converting-complex-objective-c-macros-swift-functions/#comment-1826283505</link><description>&lt;p&gt;It seems there's no way to convert string concatenation (##) to generate new class name for example to swift.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Fri, 30 Jan 2015 16:24:35 -0000</pubDate></item><item><title>Re: KYKY.ORG : Бестактность наших дней</title><link>http://kyky.org/mag/opinion/biestaktnost-nashikh-dniei#comment-1772270918</link><description>&lt;p&gt;Имхо если вопрос кажется дурацким то и отвечать на него надо по дурацки: типа "завтра", "вчера". А если все нормально то и отвечать как есть: "без понятия", "не знаю", "в следующем году". Не вижу проблемы.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Mon, 05 Jan 2015 02:14:30 -0000</pubDate></item><item><title>Re: Calling Blocks Inline</title><link>http://macoscope.com/blog/calling-blocks-inline/#comment-1264673182</link><description>&lt;p&gt;&amp;gt;it would have to be defined outside of the method and have all the used local variables as arguments&lt;/p&gt;&lt;p&gt;Yes, I don't see any problem there. Two small methods are better than big one.&lt;/p&gt;&lt;p&gt;&amp;gt;This approach allows us to avoid such measures when the block is needed in only one place&lt;/p&gt;&lt;p&gt;Hmm, It's really hard to predict that block will be needed in only one place. Yes, today it's obvious, but what about next week?. Creating a separate method will be nice preparing to code reusing.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Fri, 28 Feb 2014 12:52:56 -0000</pubDate></item><item><title>Re: Calling Blocks Inline</title><link>http://macoscope.com/blog/calling-blocks-inline/#comment-1264571570</link><description>&lt;p&gt;It's better to create functions which just return const values. Will be much easier to read.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Fri, 28 Feb 2014 11:47:41 -0000</pubDate></item><item><title>Re: Темы для 359 - Радио-Т Подкаст</title><link>https://radio-t.com/p/2013/09/24/prep-359/#comment-1061485066</link><description>&lt;p&gt;multi-path TCP в ios7: &lt;a href="http://qz.com/126642/apples-ios7-includes-a-surprise-a-ticket-to-the-next-generation-of-the-internet/?" rel="nofollow noopener" target="_blank" title="http://qz.com/126642/apples-ios7-includes-a-surprise-a-ticket-to-the-next-generation-of-the-internet/?"&gt;http://qz.com/126642/apples...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Fri, 27 Sep 2013 13:30:29 -0000</pubDate></item><item><title>Re: Open Source: Library Allowing For Automatic Synchronization Between Portrait And Landscape Views</title><link>http://maniacdev.com/2011/09/open-source-library-allowing-for-automatic-synchronization-between-portrait-and-landscape-views/#comment-308773559</link><description>&lt;p&gt;Are you familiar with autoresizingMask? Or if your layout is very difficult in different orientation you may write single function like -(void)updateUIForOrientation:(UIInterfaceOrientatione)orient and call it in willAnimateRotationToInterfaceOrientation:duration:. Don't fight with iOS frameworks simply use it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Tue, 13 Sep 2011 14:25:45 -0000</pubDate></item><item><title>Re: Hey International Gamers, Go Download 'Mirror's Edge' for Free (Not in All Markets)</title><link>http://toucharcade.com/2011/01/03/mirrors-edge-for-free/#comment-123772513</link><description>&lt;p&gt;In Russian it's free, but think gameplay will be boring.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Tue, 04 Jan 2011 01:00:10 -0000</pubDate></item><item><title>Re: Regular Expressions in Objective-C</title><link>http://www.spikesoft.ch/?p=24#comment-6837954</link><description>&lt;p&gt;Excellent library, but when i use multi-byte character ( russian in my example ) function crash. That happen because pmatch[i].rm_eo store a number of byte in string. In my example russian character have 2 byte and in &lt;br&gt;self substringToIndex:pmatch[i].rm_eo&lt;/p&gt;&lt;p&gt;i have out of range exception because  pmatch[i].rm_eo &amp;gt; [self length]&lt;br&gt;I write that for resolved that problem:&lt;/p&gt;&lt;p&gt;size_t buffSize = pmatch[i].rm_eo - pmatch[i].rm_so + 1;&lt;br&gt;char* buff = (char*)malloc( buffSize );&lt;br&gt;memset(buff,0,sizeof(char)*buffSize );&lt;br&gt;memcpy(buff,[self UTF8String]+pmatch[i].rm_so, pmatch[i].rm_eo - pmatch[i].rm_so );&lt;/p&gt;&lt;p&gt;[substring addObject: [NSString stringWithUTF8String:buff] ];&lt;br&gt;free( buff );&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soniccat</dc:creator><pubDate>Tue, 03 Mar 2009 09:28:13 -0000</pubDate></item></channel></rss>