<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mariam Babutsidze on Medium]]></title>
        <description><![CDATA[Stories by Mariam Babutsidze on Medium]]></description>
        <link>https://medium.com/@MariamBabutsa?source=rss-43aa9dc2805b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BjlHuMqoCTr2R62IVev2TA.jpeg</url>
            <title>Stories by Mariam Babutsidze on Medium</title>
            <link>https://medium.com/@MariamBabutsa?source=rss-43aa9dc2805b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:04:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@MariamBabutsa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring the New Debug Console in Xcode 15]]></title>
            <link>https://medium.com/@MariamBabutsa/exploring-the-new-debug-console-in-xcode-15-248bc618226c?source=rss-43aa9dc2805b------2</link>
            <guid isPermaLink="false">https://medium.com/p/248bc618226c</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Mariam Babutsidze]]></dc:creator>
            <pubDate>Tue, 13 Jun 2023 14:43:08 GMT</pubDate>
            <atom:updated>2023-06-17T09:53:30.736Z</atom:updated>
            <content:encoded><![CDATA[<p>Apple’s Unified Logging APIs improve our diagnostic experience a lot. First, I will remind everyone that “print” should rarely be used to log events in your program’s execution. It is far better to use OSLog to obtain structured logging from end users as well as retain structure in the Debug Console. If you don’t know how to use OSLog and its benefits, look into my article <a href="https://medium.com/@MariamBabutsa/why-you-should-use-logger-over-print-for-logging-you-apps-data-6f4085500a76">“Why should you use logger over print for logging your apps data”</a>.</p><p>Debug Console in Xcode is no longer prefixing each log with the metadata. Instead, attention is focused on the underlying message. But if you want to view the additional information associated with these logs, there is new ability to view this by selecting the metadata options button in the lower left of the Debug Console and choosing the types best suited for the current need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swHgnMYilzfkVwGWt1X05Q.png" /></figure><p>With this now enabled, the metadata is placed below each log in the console and is made smaller and more subtle as to not take away from the intended output.</p><p>Also logs have different backgound, some yellow or red. This indicates that these logs are of higher importance and represent an error and fault.</p><p>The console allows us to inspect the metadata of a single log by selecting the log and then quick-looking it by pressing space. With this, a pop-up window appears providing us with all available metadata. This even includes information like the call site where the name of the function that originally emitted the log is displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtltVSOn0Ot3Bi73h_rLNw.png" /></figure><p>By hovering over the log we can see the source location in the lower right corner. Pressing it will open this location for you. So you don’t need to lose time searching it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5b5rKbMGyZ2G7RTeK3G4Hw.png" /></figure><p>The new Debug Console really shines in its filtering capabilities. It is easy for the console to fill up with logs we just don’t care about, but with Xcode 15, filtering them out is easier than ever. Now the console can perform complex filtering to easily locate logs that are most relevant to our needs. The console also offers many different ways to create these filters.</p><p>Of course, the filter can be entered directly in the filter bar. While doing so, an autocomplete popover will appear, providing us with assistance in creating the filter we are trying to enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ALrRl097GR7XwH-iVxFSJg.png" /></figure><p>Additionally, the filter menu provides quick access to filters for specific types of logs, allowing us to choose the types we would like to view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yi_5JXwEVEQoosDSXYJnmQ.png" /></figure><p>And lastly, when we secondary click a log that we are interested in, the console provides options to hide and show similar logs to quickly focus on or exclude a particular set of logs from our view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QEdq-512MMy-ME6Lgpk1vg.png" /></figure><p>With the new Debug Console in Xcode 15, developers can enjoy an elevated debugging experience. The refined message display, metadata inspection, filtering capabilities, and enhanced log management all contribute to a more efficient and effective workflow. By leveraging these features, you can quickly cut through the noise and pinpoint the logs that are most relevant to your current debugging needs.</p><ul><li><a href="https://developer.apple.com/wwdc23/10226">Debug with structured logging - WWDC23 - Videos - Apple Developer</a></li><li><a href="https://medium.com/@MariamBabutsa/why-you-should-use-logger-over-print-for-logging-you-apps-data-6f4085500a76">Why you should use Logger over print for logging your app’s data.</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=248bc618226c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Software Design Matters: Building Better Software with Strategic Thinking]]></title>
            <link>https://medium.com/@MariamBabutsa/why-software-design-matters-building-better-software-with-strategic-thinking-c235a0df4acf?source=rss-43aa9dc2805b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c235a0df4acf</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Mariam Babutsidze]]></dc:creator>
            <pubDate>Mon, 08 May 2023 13:58:52 GMT</pubDate>
            <atom:updated>2023-05-08T13:58:52.149Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is inspired by John Ousterhout’s book “A Philosophy of Software Design”.</p><p>As a software engineer, you may have encountered problems that are the result of poor design decisions. You may have experienced the pressure to meet deadlines, leading you to ignore software design and accumulate technical debt. Unfortunately, technical debt only grows over time, making it increasingly difficult to add or modify code. This slows down development, introduces more bugs, and creates a vicious cycle.</p><p>Complexity increases over the life of any program. The more features and people we add to work on it, the more difficult it becomes to manage this complexity. Over time, it becomes harder and harder for programmers to consider every factor as they modify the software. This slows down development, which leads to bugs and slows down development even more. To avoid this cycle, software developers should focus on making software simpler. Simple design can allow for the development of larger and more powerful systems without sacrificing efficiency.</p><p>Most software development projects today use an incremental approach such as agile development during building software. The incremental approach works for software because we cannot plan everything from the start, but during the process, we can make changes if needed. It is a continuous process that requires constant evaluation and redesign. Therefore, software developers should always be looking for opportunities to improve the design of the system, even if it requires dedicating a fraction of their time to these improvements. Don’t leave “<a href="https://blog.codinghorror.com/the-broken-window-theory/?fbclid=IwAR0fm_88EFbvxdzcucPjwkjyXIHX7NneuWsrOTCvLv-3vcre_YHQG7RQbQ4">broken windows</a>” unrepaired.</p><h4>Working code isn’t enough</h4><p>The most important element of good software design is the mindset with which developers approach their tasks. There are two mindsets: tactical and strategic.</p><p>In the tactical approach, the main focus is to get something working quickly, such as a new feature or a bug fix. The problem is that you don’t think about good software design, you are short-sighted. For you, it’s okay to add a bit of complexity if that allows you to make it work. This is how systems get complicated. Complexity is incremental. So when you and your team think tactically, it will accumulate really quickly.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FPxHEc3YRy3cfRuNBVE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FPxHEc3YRy3cfRuNBVE%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FPxHEc3YRy3cfRuNBVE%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bbf5eb12ca1b891fdfd555da299991a/href">https://medium.com/media/6bbf5eb12ca1b891fdfd555da299991a/href</a></iframe><p>The sad part is that tactical developers are heroes for management. At some point, they do their tasks very fast. During my career, I often heard boasting about a big feature done in two days. It appears that those engineers who think more about software design are making slower progress than the programmers who code tactically.</p><p>One of the risks of agile development is that it can lead to tactical programming. Agile development focuses on features, to produce working software as soon as possible. “The increments of development should be abstractions not features.” In my opinion, the lead software developer in your team means a lot. It’s their responsibility to talk about good design with the management and convince them why it is important.</p><p>The strategic approach, on the other hand, prioritizes design and takes a long-term investment mindset. Although it may slow down development initially, it can speed up over the long term by reducing complexity and technical debt. This approach requires dedicating 10–20% of total development time to design improvements, a small investment that can yield significant benefits in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*Ca_85KBZnOGC-FCh6QYNTA.png" /></figure><h4>Where is crossover point between the strategic and tactical approaches?</h4><p>This question cannot be answered straightforwardly. There are many factors to keep in mind, including the project and its growth rate. John Ousterhout suggests it has a lot to do with the developer’s memory. How much time they can remember their old code. So this range is between 6–18 months.</p><p>While some companies may prioritize time to market over software design, they may be making a mistake in the long run. Complex code is difficult to work with, and sometimes it may require companies to develop applications from scratch a second time, increasing costs and losing valuable time. Companies should hire great engineers from the start who care about software design, as this can decrease future costs and make it easier to hire top talent.</p><p>John Ousterhout gives two examples. One is Facebook, which encourages tactical programming. For many years, the company’s motto was “Move fast and break things”. They became successful but had big technical debt. Over time they changed their motto and encouraged developers to invest more in good design. The second example is Google and VMware, which embraced a more strategic approach. They are top companies that hire top programmers.</p><p>Ultimately, companies can succeed with both tactical and strategic approaches to software design, but software developers may prefer working for companies that prioritize good software design principles. By embracing a strategic approach to software design, companies can avoid technical debt and accumulated complexity, leading to more efficient and effective software development.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FkoczPeWPrRjSmo6qne%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FkoczPeWPrRjSmo6qne%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FkoczPeWPrRjSmo6qne%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/57c08ee3c652399edbc1febe17c0912f/href">https://medium.com/media/57c08ee3c652399edbc1febe17c0912f/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbmSAYlu0NcY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbmSAYlu0NcY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbmSAYlu0NcY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/495c08010fc21b19f614977e90c0abae/href">https://medium.com/media/495c08010fc21b19f614977e90c0abae/href</a></iframe><p><a href="https://a.co/d/5LJcP9Z">A Philosophy of Software Design, 2nd Edition</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c235a0df4acf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you should use Logger over print for logging your app’s data.]]></title>
            <link>https://medium.com/@MariamBabutsa/why-you-should-use-logger-over-print-for-logging-you-apps-data-6f4085500a76?source=rss-43aa9dc2805b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f4085500a76</guid>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[logger]]></category>
            <category><![CDATA[logging-and-monitoring]]></category>
            <dc:creator><![CDATA[Mariam Babutsidze]]></dc:creator>
            <pubDate>Thu, 04 May 2023 14:53:07 GMT</pubDate>
            <atom:updated>2023-05-04T14:58:24.001Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m sure many of you had this problem when you stick some logging into your code and suddenly the problem stops happening because you’ve changed the timing. You want a very fast logging interface that has minimal impact on your code. And another thing you should take into account is privacy.</p><p>Apple’s unified Logging API, also know as os_log makes our lives easier. Apple introduced <a href="https://developer.apple.com/videos/play/wwdc2016/721/">os_log</a> in 2016 and <a href="https://developer.apple.com/videos/play/wwdc2020/10168/">Logger</a> in 2020. If the device is connected to your Mac, you can stream log messages as they happen in Console app. If your app is launched from Xcode, you will also see them in Xcode’s console. Also you can collect logs after you app has finished running.</p><h3>It will help you to correct the bug when you cannot reproduce it</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FvrxxqQbyRxYi6scCjT%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FvrxxqQbyRxYi6scCjT%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FvrxxqQbyRxYi6scCjT%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="319" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a5c2724d6a82e5dc1e48cc0cd3c9a11/href">https://medium.com/media/4a5c2724d6a82e5dc1e48cc0cd3c9a11/href</a></iframe><p>When your app logs a message, the operating system stores it on device in a compressed form. You can use the “log collect” command on your Mac to retrieve those logs:</p><ol><li>Connect your device to your Mac</li><li>Run the “log collect” command from the terminal with device option. Start time from when you need logs and provide file name for storing the log.</li><li>Open log file in Console app. You can browse and filter here logs and understand what was the cause of the bug.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A97i9ZeZUlYHVVci-76iYw.png" /></figure><h3>Filter and categorize Logs</h3><p>When you create a Logger structure, assign an optional subsystem and category string to add context to all messages you log. A subsystem corresponds to a large functional area of your app, and a category corresponds to a specific area within a particular subsystem. When diagnosing problems, use those strings to filter out unrelated messages.</p><pre>let logger = Logger(subsystem: &quot;com.example.Wallet&quot;, category: &quot;networking&quot;)</pre><h4>Log Levels:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*4y0fvqYmbgdnqgtuAgM46Q.jpeg" /></figure><p>You can choose importance of your message from these log levels. The error and fault levels are highlighted with yellow and red bubbles in Console app.</p><pre>logger.log(level: .error, &quot;Network error&quot;)</pre><h3>Persistence</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qt39gP9tgjsjRwQwouumCQ.png" /></figure><p>Debug: not persisted, which means they cannot be retrieved after the app has completed execution.</p><p>Info: mostly not persisted, except when they are generated a few moments before a log collect command.</p><p>Messages logged at every other level are persisted, and you can retrieve them later.</p><p>There is, however, a storage limit on how many messages are archived. Once that limit is exceeded, the older ones are purged and become unavailable. The error and fault level messages are persisted even longer than notice level messages. Typically, the messages will be persisted for a few days. However, it depends on the storage space on your device.</p><h4>The thing you should keep in mind: the log levels also affect performance.</h4><p>Even though logging in general has low overhead, the log levels have different performance relative to each other. The levels that are less important are faster. The fault level is the slowest, and the debug level is the most performant.</p><p>Logging at the debug level is so fast because debug messages are not persisted at all. They are discarded when the logs aren’t being streamed. Further, the Swift compiler uses sophisticated optimisations to ensure that the code that creates the messages is not even executed when the debug messages are discarded. This means that you can log verbose messages at the debug level and call expensive functions to construct messages. Your users won’t pay the cost for them. Which is really cool thing, you don’t need to worry about performance anymore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxYM2UX4RFUDmCg9_jR-Uw.png" /></figure><h3>Privacy</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FaWxbEGCqkiZFK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FaWxbEGCqkiZFK%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FaWxbEGCqkiZFK%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="220" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0d9398742b67d63ce77b16a369ad29a/href">https://medium.com/media/e0d9398742b67d63ce77b16a369ad29a/href</a></iframe><p>You can use privacy options to control the visibility of data in the logs. It is really important to take seriously the privacy of the logged data. This is because logging happens all the time, even after your app has shipped and is in the hands of your users. Logs can be collected by anyone who has physical access to the device and also its passcode. Therefore, it is important that the log messages do not mark any personal information public, which could expose it in the logs. You can also choose .private with hash function, this will help you see when two messages are equal without revealing their values.</p><pre>logger.log(&quot;Request: \(request.body, privacy: .private)&quot;)<br>logger.log(&quot;Account Number: \(accountNumber, privacy: .private(mask: .hash))&quot;)</pre><h3>String interpolation</h3><p>You can log runtime data in the message. Unlike with print, the log message is not fully converted to a string, as that would be too slow. Instead, the compiler and the logging library work together to produce a heavily optimised representation of the log message that leverages the type of the logged data. With the optimised representation, you pay the cost of converting to a string only when the log message is actually displayed. Log messages can contain a wide variety of data types. You can log numeric types like Int and Double, Objective-C objects, as well as any type that conforms to Swift’s CustomStringConvertible protocol. This means to add your own type to a log message, all you need to do is make it conform to CustomStringConvertible.</p><h3>Formatting</h3><p>You can use the optional “format” and “align” parameter to format data. Since formatting data using the Logging APIs doesn’t add to the cost of a log call, you can use formatting as much as you like to make your data look pretty and easy to understand.</p><p>You can see the full range of options using Xcode’s code completion, including formatting numbers as hexadecimal, octal, exponential, and others.</p><p>Benefits using Logger over print are privacy, string interpolation, low performance overhead, different logging levels for different usage, formatting without a cost, easy filtering and persistence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f4085500a76" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>