Blog

  • How much money will I have in a year? Build a simple plan with FCF

    You probably have a reasonable idea of what you earn and what your everyday life costs. But “How much money will I have a year from now?” is a harder question.

    Answering it means connecting your current savings with future income and expenses. Then you can explore what happens if your rent goes up, you take on another recurring payment, or your salary increases.

    A simple model is enough to get started. Here is a worked example, followed by a walkthrough of FCF, the iPhone app I’m building.

    Start with three numbers

    Imagine the following monthly plan. All amounts in this example are in US dollars.

    ItemAmount
    Starting balance$10,000
    Monthly take-home income$4,000
    Monthly expenses$3,000

    That leaves $1,000 each month. If income and expenses stay the same, you will add $12,000 over twelve months. Including your starting balance, you would finish with $22,000.

    $10,000 + ($4,000 − $3,000) × 12 = $22,000

    This is a starting point. It assumes your income arrives regularly, all spending is accounted for, and your savings earn no interest. The useful part comes when you test those assumptions.

    Include the expenses that are easy to forget

    Rent, groceries, and transport usually come to mind first. Annual insurance, gifts, holidays, and car maintenance are easier to overlook because they do not arrive every month.

    Here is one way to break down the $3,000 monthly total:

    CategoryMonthly average
    Housing and utilities$1,400
    Groceries$500
    Transport$250
    Phone and subscriptions$100
    Other recurring expenses$350
    Allowance for irregular spending$400
    Total$3,000

    The allowance accounts for future spending in advance. If a holiday or insurance bill is already included there, do not count it again as a separate expense. A handful of broad categories is enough for your first model. You can refine them later using your bank statements.

    Build the plan in FCF

    FCF lets you enter a starting balance, add recurring income and expenses, and view a forecast.

    1. Open Balance and enter $10,000.
    2. Under Income, add $4,000 in take-home pay, repeating every month.
    3. Under Expense, add the categories above with the same monthly frequency.
    4. Open Report and choose a one-year period.

    The screenshots below show the English interface with a separate demonstration plan starting at $20,000. They illustrate the screens, rather than the $10,000 worked example above. You can choose a display currency in Settings; changing it does not convert your amounts.

    FCF Balance screen in English showing a sample starting balance of $20,000
    Your current balance is the starting point. This demonstration plan begins with $20,000.
    FCF recurring expenses screen in English
    Add recurring expenses individually. You can edit a stream or temporarily turn it off to explore a different plan.
    FCF one-year forecast in English showing a sample ending balance of $38,600
    The one-year report shows where the plan leads. This separate demonstration projects a balance of $38,600.

    You can now change an assumption and look at the result again. FCF uses approximate time periods, so its forecast may differ from a calculation covering exactly twelve calendar months. Use it to explore scenarios; checking the exact balance on a bill’s due date requires a calendar-based cash ledger.

    One decision, several possible outcomes

    Back to our worked example. Suppose you are considering an apartment that costs an extra $300 a month.

    Update the housing expense in FCF and check the forecast again. In our simple calculation, the monthly surplus falls from $1,000 to $700. The projected year-end balance falls from $22,000 to $18,400.

    That makes the trade-off easier to see: the apartment would mean $3,600 less in savings over a full year, with everything else unchanged.

    ScenarioMonthly surplusAfter 12 months
    Original plan$1,000$22,000
    Housing costs $300 more$700$18,400
    Expenses fall by $200$1,200$24,400
    Take-home income rises by $500$1,500$28,000

    Each scenario starts at $10,000 and assumes the change lasts the whole year. These figures use the simple twelve-month formula.

    The forecast helps you weigh a decision against your priorities. A more convenient apartment might be worth the difference. Or building an emergency fund faster might matter more right now.

    Leave room for uncertainty

    You will not predict every expense perfectly. Try at least three versions of your plan: your usual spending, slightly higher costs, and lower income.

    If the numbers only work under ideal conditions, revisit your expectations. If you still have a cushion in a less comfortable scenario, you have more room to make decisions.

    Return to the model once a month to update your balance, adjust expenses, and reconsider your assumptions. Your forecast should evolve with your life.

    Try it with your own numbers

    Start with your current savings, usual income, and a few major expenses. Look one year ahead. Then change one number that matters to a decision you are making now.

    FCF’s six-month and one-year forecasts are free. No account or bank connection is required, and financial data stays on your device. Longer forecasts and annual income and expense breakdowns are available through a one-time Premium purchase.

    If the next year looked like this month, would you be happy with the result?

    Download FCF on the App Store

  • Сколько денег у меня будет через год? Проверяем финансовый план с помощью FCF

    Обычно мы примерно знаем, сколько зарабатываем и сколько стоит наша жизнь. Но на вопрос «сколько денег у меня будет через год?» ответить сложнее.

    Нужно связать текущие накопления, будущие доходы и расходы. А затем проверить, что произойдёт, если вырастет аренда, появится новый регулярный платёж или увеличится зарплата.

    Для первого приближения достаточно простой модели. Покажу её на примере и расскажу, как построить такой прогноз в FCF — приложении для iPhone, которое я разрабатываю.

    Начнём с трёх чисел

    Представим человека со следующим финансовым планом:

    ПоказательСумма
    Деньги на старте100 000 ₽
    Ежемесячный доход120 000 ₽
    Ежемесячные расходы90 000 ₽

    Каждый месяц остаётся 30 000 ₽. Если доходы и расходы не изменятся, за двенадцать месяцев прибавится 360 000 ₽. Вместе со стартовой суммой получится 460 000 ₽.

    100 000 + (120 000 − 90 000) × 12 = 460 000 ₽

    Это отправная точка. Пока мы предполагаем, что зарплата приходит регулярно, расходы учтены полностью, а накопления не приносят дохода. Самая полезная часть начинается, когда мы проверяем эти предположения.

    Что включить в расходы

    Жильё, продукты и транспорт вспомнить легко. Реже вспоминаются траты, которые возникают несколько раз в год: страховка, подарки, отпуск, обслуживание автомобиля.

    Допустим, наши 90 000 ₽ состоят из таких категорий:

    КатегорияВ среднем за месяц
    Жильё и коммунальные платежи40 000 ₽
    Продукты20 000 ₽
    Транспорт8 000 ₽
    Связь и подписки2 000 ₽
    Другие регулярные расходы10 000 ₽
    Резерв на нерегулярные покупки10 000 ₽
    Всего90 000 ₽

    Резерв — способ заранее учесть будущие траты. Если вы уже включили отпуск или страховку в него, добавлять те же расходы повторно не нужно. Для первой модели достаточно нескольких крупных категорий. Их можно уточнить позже, сверившись с историей операций в банке.

    Как проверить этот план в FCF

    В FCF можно задать начальный баланс, добавить повторяющиеся доходы и расходы и посмотреть прогноз.

    1. На вкладке «Баланс» указываем 100 000 ₽.
    2. В «Доходах» добавляем зарплату — 120 000 ₽ с ежемесячным повторением.
    3. В «Расходах» добавляем категории из таблицы с той же периодичностью.
    4. Открываем «Отчёт» и выбираем период в один год.

    Ниже — скриншоты русской версии FCF с отдельным демонстрационным планом в долларах. Они показывают интерфейс; суммы на них не относятся к расчёту в рублях выше. Валюту отображения можно выбрать в настройках. Её смена не конвертирует введённые суммы.

    FCF: экран «Баланс» на русском, демонстрационная сумма 20 000 долларов
    Начальная точка прогноза — текущий баланс. В демонстрационном плане это 20 000 $.
    FCF: список регулярных расходов на русском языке
    Повторяющиеся расходы задаются отдельно. Потоки можно редактировать и временно отключать.
    FCF: прогноз баланса на один год на русском языке, демонстрационный результат 38 600 долларов
    Годовой прогноз показывает, куда ведёт заданный план. На скриншоте демонстрационный баланс растёт до 38 600 $.

    Теперь можно изменить один из параметров и снова посмотреть на результат. FCF использует приближённую модель периодов, поэтому график может отличаться от расчёта ровно за двенадцать календарных месяцев. Он подходит для оценки сценариев; точный остаток на дату конкретного платежа требует календарного учёта.

    Один расход — несколько вариантов будущего

    Вернёмся к нашему примеру в рублях. Допустим, мы рассматриваем квартиру, которая обойдётся на 10 000 ₽ в месяц дороже.

    Меняем соответствующий расход в FCF и снова смотрим прогноз. В упрощённой арифметике ежемесячный остаток уменьшится с 30 000 до 20 000 ₽, а сумма через год — с 460 000 до 340 000 ₽.

    Цена решения становится понятнее: более дорогая квартира означает на 120 000 ₽ меньше накоплений за год при прочих равных.

    СценарийОстаток за месяцЧерез 12 месяцев
    Исходный план30 000 ₽460 000 ₽
    Жильё дороже на 10 000 ₽20 000 ₽340 000 ₽
    Расходы меньше на 5 000 ₽35 000 ₽520 000 ₽
    Доход больше на 15 000 ₽45 000 ₽640 000 ₽

    В каждом сценарии стартовый баланс — 100 000 ₽, изменения действуют весь год. Суммы рассчитаны по простой формуле за двенадцать месяцев.

    Прогноз помогает сопоставить решение с собственными приоритетами. Возможно, удобная квартира стоит разницы в накоплениях. Возможно, сейчас важнее быстрее собрать финансовую подушку.

    Что делать с неопределённостью

    С первого раза угадать все расходы невозможно. Полезно проверить хотя бы три варианта: привычный уровень расходов, немного более дорогую жизнь и снижение дохода.

    Если план работает только при самых благоприятных условиях, это повод пересмотреть ожидания. Если запас сохраняется и в менее удобном сценарии, появляется больше уверенности в решениях.

    Раз в месяц можно возвращаться к модели: обновлять текущий баланс, уточнять расходы и пересматривать предположения. Прогноз будет меняться вместе с жизнью.

    Попробуйте на своих числах

    Начните с текущих накоплений, обычного дохода и нескольких основных расходов. Посмотрите на год вперёд. Затем измените одну сумму, которая сейчас имеет для вас значение.

    В FCF прогнозы на шесть месяцев и год доступны бесплатно. Регистрация и подключение банков не нужны, финансовые данные хранятся на устройстве. Более длинные горизонты и годовая структура доходов и расходов доступны в Premium с разовой покупкой.

    Если ближайший год будет похож на сегодняшний месяц, устраивает ли вас результат?

    Скачать FCF в App Store

  • MVVM+C: Making Navigation Testable and Scalable

    AI helps us develop software faster, but faster changes also increase the risk of regressions. That makes strong automated test coverage even more important.

    Navigation is one area where plain MVVM often becomes difficult to test.

    The challenge with navigation in MVVM

    In a traditional MVVM setup, the ViewController usually handles both UI and navigation: pushing the next screen, composing modules, handling deep links, and managing flow decisions.

    Testing this through unit tests is difficult because the logic is tightly coupled to UIKit. As a result, navigation is often covered by UI tests.

    UI tests work, but they can be slow, flaky, and expensive to maintain, which can significantly hurt the developer experience.

    Moving navigation into a Coordinator

    MVVM+C addresses this by moving navigation into a Coordinator.

    The ViewController focuses on UI, while the Coordinator handles navigation, module composition, deep links, child flows, and flow completion.

    MVVM + Coordinator architecture: AppCoordinator manages feature coordinators, with each module containing a ViewController and ViewModel.

    With navigation dependencies abstracted behind testable interfaces, this makes navigation decisions easier to cover with fast, reliable unit tests. UI tests can then focus on a small number of critical end-to-end scenarios.

    Scaling across features and teams

    Another benefit is loose coupling between modules. Each feature can own its own MVVM+C flow, which makes the architecture easier to scale across teams.

    MVVM+C is not just about cleaner navigation. It makes navigation isolated, scalable, and testable.

  • Removing Git branches by mask

    When working in a team with Git, you often have to create and delete branches. If you are a terminal user like me, you can optimize branch deletion as follows. Maybe someone will come in handy, I use it all the time.

    Before:

    % git branch
      MOBL-2509/0
      MOBL-2509/1
      MOBL-2522/0
      MOBL-2522/1
      MOBL-2522/2
    * master
      release/5.4
    

    Apply:

    % git branch | grep "MOBL" | xargs git branch -d
    

    After:

    % git branch
    * master
      release/5.4
    
  • How to add the SwiftLint without pain

    Why do you need SwiftLint?

    1. It speed ups code reviews, you stop wasting time on code formatting, force casting, and other common issues
    2. It improves the code quality, code becomes more readable, and maintainable

    Integration

    1. Add SwiftLint to a podfile

    Or use another option from the official documentation.

      # A tool to enforce Swift style and conventions.
      pod 'SwiftLint', '0.43.1'

    2. Add this .swiftlint.yml config file to the project root folder

    The main trick to make integration easy is to disable all rules at first.

    disabled_rules:
    - trailing_whitespace
    - force_cast
    - force_unwrapping
    - force_try
    - empty_string
    - line_length
    - mark
    - weak_delegate
    - unneeded_break_in_switch
    - identifier_name
    - function_parameter_count
    - unused_closure_parameter
    - vertical_whitespace
    - opening_brace
    - control_statement
    - statement_position
    - comma
    - colon
    - trailing_comma
    
    opt_in_rules:
    - empty_count
    - empty_string
    
    excluded:
    - Carthage
    - Pods
    - SwiftLint/Common/3rdPartyLib
    
    line_length:
        warning: 150
        error: 200
        ignores_function_declarations: true
        ignores_comments: true
        ignores_urls: true
    
    function_body_length:
        warning: 300
        error: 500
    
    function_parameter_count:
        warning: 6
        error: 8
    
    type_body_length:
        warning: 300
        error: 500
    
    file_length:
        warning: 1000
        error: 1500
        ignore_comment_only_lines: true
    
    cyclomatic_complexity:
        warning: 15
        error: 25
    
    reporter: "xcode"

    3. Build a project, add additional rules to the disabled_rules section, if there are many warnings for them

    4. Delete rules from the disabled_rules section one by one and fix all the warnings

    5. Leave the trailing_whitespace and other rules that you don’t want to fix in the disabled_rules section

    In the end, you will have something like this in your config file.

    disabled_rules:
    - trailing_whitespace
    
    opt_in_rules:
    - empty_count
    - empty_string
    
    excluded:
    - Carthage
    - Pods
    - SwiftLint/Common/3rdPartyLib
    
    line_length:
        warning: 150
        error: 200
        ignores_function_declarations: true
        ignores_comments: true
        ignores_urls: true
    
    function_body_length:
        warning: 300
        error: 500
    
    function_parameter_count:
        warning: 6
        error: 8
    
    type_body_length:
        warning: 300
        error: 500
    
    file_length:
        warning: 1000
        error: 1500
        ignore_comment_only_lines: true
    
    cyclomatic_complexity:
        warning: 15
        error: 25
    
    reporter: "xcode"

    Some ideas on how to fix common code issues

    Force Cast Violation: Force casts should be avoided. (force_cast)

    Problem:

    let cell = collectionView.dequeueReusableCell(
        withReuseIdentifier: "DocumentCollectionViewCell",
        for: indexPath
    ) as! DocumentCollectionViewCell
    

    Solution:

    guard let cell = collectionView.dequeueReusableCell(
        withReuseIdentifier: "DocumentCollectionViewCell",
        for: indexPath
    ) as? DocumentCollectionViewCell else { fatalError() }
    

    Force Try Violation: Force tries should be avoided. (force_try)

    Problem:

    let workingDirectory = try! FileManager.default.url(
        for: .documentDirectory,
        in: .userDomainMask,
        appropriateFor: nil,
        create: false
    )
    

    Solution:

    do {
        let workingDirectory = try FileManager.default.url(
            for: .documentDirectory,
            in: .userDomainMask,
            appropriateFor: nil,
            create: false
        )
    } catch {
        print(error)
    }
    

    Exceptions

    In very rare cases you will not be able to fix the warning. For example, when you use a framework and you cannot easily change its API. Then you can switch off a SwiftLint rule for a particular code block using // swiftlint:disable rule_name and // swiftlint:enable rule_name comments.

  • Мой конспект Apple Event June 2021


    Apple показали iOS 15, Mac OS Monterey и многое другое. Это мой конспект, который я использую, чтобы не забыть важные моменты для себя. Записи сделал с точки зрения возможностей практического применения.

    Что нового для пользователей

    Live Text

    • Можно будет фотографировать названия, состав товаров и переводить в текстовый вид, чтобы находить инструкции, отзывы в интернете, страницы товаров у производителей.
    • Можно фотографировать объявления на стенах и переводить в цифровой текстовый вид,
    • чтобы потом копировать адрес, телефон.

    Maps

    • Immersive walking instructions можно будет использовать в поездках в места, где это хорошо работает.

    Universal Controls

    • Можно будет использовать iPad как второй переносной экран к Macbook

    Safari Tab groups

    • Это лучше, чем закладки в папках, так как закладки остаются навсегда, но при этом не хочется захламлять свои закладки временными вкладками, которые хочется продолжить изучать только завтра.

    Spatial Audio

    • AirPods Pro дают не только шумоподавление, но и пространственный звук, который стал еще лучше

    iOS Focus

    • По моему личному опыту фокус очень важен для продуктивности. Можно будет группировать уведомления с приложений. Я выключал все уведомления со всех мессенджеров, кроме рабочего и со всех соц. сетей. Из-за этого я иногда пропускал важные сообщения. Теперь верну их, но создам для них отдельную группу, чтобы читать их только когда не работаю.

    Shortcuts app on Mac

    • Любая автоматизация увеличивает производительность. Я уже использую автоматизацию в Trello для обновления чек-листов и задач на день. Можно будет использовать для автоматизации открытия наборов окон перед работой над разными проектами. Это позволит быстрее приступать к работе.

    Privacy

    • Борьба со спамом и трекингом, анонимность в интернете – это хорошо и важно. Privacy в Apple Mail позволит запретить трекинг открытия письма через скрытый пиксель. Появится защита IP адреса в Mail.
    • С помощью Hide My Email в составе iCloud + можно будет создавать о прокси email адреса для всяких мелких сервисов и магазинов, чтобы скрыть свой настоящий адрес

    SpotLight, Health, Photos, Watch OS

    • Много мелких улучшений, хорошо в целом

    SharePlay, Facetime, Message

    • API SharePlay станет доступно для приложений
    • Не использовал и не собираюсь – не хватает кроссплатформенности и ее не добавили.

    Что нового для разработчиков

    APIs

    • SharePlay
    • Voice isolation, wide spectrum audio, portrait mode for video conferencing apps
    • New APIs for Focus and Notifications, for screen time
    • RealityKit, Object Capture для мерчендайза с AR

    Swift

    • Concurrency (async, await, actor)

    AppStore

    • Multiple product pages
    • In-App events

    XCode Cloud

    • build in cloud
    • test in cloud in parallel
    • distribute to testers

    TestFlight for Mac

    Ссылки

    Apple Event 2021, WWDC

    https://www.apple.com/apple-events/june-2021/

    iOS 15

    https://www.apple.com/ios/ios-15-preview/

    Mac OS X Monterey

    https://www.apple.com/macos/monterey-preview/

  • iOS – How to remove “Back” text from the back button

    The best solution is to create base classes for UIViewController and UITableViewController and override their init methods. This will allow you to add ViewControllers to the NavigationController programmatically after a rootViewController. If you put this code in the ViewDidLoad method, it will not be called in this case and the next controller will be pushed with a back text.

    BaseViewController in Objective C:

    #import "BaseViewController.h"
    
    @interface BaseViewController ()
    
    @end
    
    @implementation BaseViewController
    
    - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
     self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
     if (self) {
     self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
     }
     return self;
    }
    
    @end
    

    BaseTableViewController:

    #import "BaseTableViewController.h"
    
    @interface BaseTableViewController ()
    
    @end
    
    @implementation BaseTableViewController
    
    - (instancetype)initWithStyle:(UITableViewStyle)style
    {
     self = [super initWithStyle:style];
     if (self) {
     self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
     }
     return self;
    }
    
    @end
    
  • Using SFSafariViewController to open URL inside app without transitioning to Safari or using WebView

    RxSwift/RxCocoa example:

    import SafariServices
    
    learnMoreButton.rx.tap
        .subscribe(onNext: {
            guard let url = URL(string: "https://google.com") else { return }
            let svc = SFSafariViewController(url: url)
            self.present(svc, animated: true, completion: nil)
        })
        .disposed(by: disposeBag)
    
  • Merging Three Git Repositories Into One Repository Without Losing File History

    Let’s assume that we have three separate git repos named uremont-client, uremont-service, uremont-sdk. We want to create a new repo, named uremont-ios, that contains all those repos in separate folders to have one single repo.

    Why do we want to do this? In my case I had two apps and one sdk for them, and it was inconvenient for me to push changes to three separate repos while I was working with these projects and sdk at the same time.

    Let’s start.

    Terminal setup to allow git to move all folders except one. We will need this later.

    $ shopt -s extglob
    

    Create a new folder uremont-ios and initialize git repo:

    $ mkdir uremont-ios 
    $ cd uremont-ios
    $ git init
    

    Add remote of first old project uremont-client that we want to merge to the new git repo and fetch it:

    $ git remote add -f uremont-client git@bitbucket.org:wzbozon/uremont.git
    

    Merge first old project uremont-client to the new repo:

    $ git merge uremont-client/master --allow-unrelated-histories
    

    Move all folders and files of that old project to the separate folder inside of our new project:

    $ mkdir uremont-client
    $ git mv ./!(uremont-client) ./uremont-client
    

    Commit changes:

    $ git commit -m 'Move uremont-client files into subdir'
    

    Similarly merge second old project uremont-service to the new repo:

    $ git remote add -f uremont-service git@bitbucket.org:wzbozon/uremontservice.git
    $ git merge uremont-service/master --allow-unrelated-histories
    $ mkdir uremont-service
    $ git mv ./!(uremont-client|uremont-service) ./uremont-service
    $ git commit -m 'Move uremont-service files into subdir'
    

    And third:

    $ git remote add -f uremont-sdk git@bitbucket.org:wzbozon/uremont-sdk.git
    $ git merge uremont-sdk/master --allow-unrelated-histories
    $ mkdir uremont-sdk
    $ git mv ./!(uremont-client|uremont-service|uremont-sdk) ./uremont-sdk
    $ git commit -m 'Move uremont-sdk files into subdir'
    

    Finally, add a new remote to our new repo and push it:

    $ git remote add origin git@bitbucket.org:wzbozon/uremont-ios.git
    $ git push -u origin master
    
  • Chaining example on RxSwift

    This is one of the reasons I love RxSwift. It allows to chain requests beautifully.

    Here I authorize user by getting auth token, then I request userInfo, then I request profile.

    func loadUserInfoAndProfile(login: String, password: String) {
        UserManager.shared.auth(login: login, password: password)
            .flatMap { _ in
                return UserManager.shared.info()
            }
            .map { (result: APIResult) -> UserInfo? in
                switch result {
                case .success(let value):
                    UserManager.shared.userInfo = value
                    return value
                case .failure(let error):
                    print(error)
                    return nil
                }
            }
            .flatMap { userInfo in
                return ServiceManager.shared.profileView()
            }
            .map { (result: APIResult) -> ServiceProfile? in
                switch result {
                case .success(let value):
                    ServiceManager.shared.profile.value = value
                    return value
                case .failure(let error):
                    print(error)
                    return nil
                }
            }
            .subscribe(onNext: { _ in
                self.showTabs()
            }, onError: { error in
                self.showTutorialViewController()
            })
            .disposed(by: disposeBag)
    }