25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

135 satır
11KB

  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8">
  4. <head>
  5. <link rel="stylesheet" href="../../style.css">
  6. </head>
  7. <body>
  8. <script data-goatcounter="https://services.opengamestudio.org:443/count" async src="//services.opengamestudio.org:443/count.js"></script>
  9. <div id="header">
  10. <div>
  11. <strong id="title">Open Game Studio</strong>
  12. <div id="lang">
  13. <a href="../../en/news/git-budget.html">EN</a>
  14. <a href="../../ru/news/git-budget.html">RU</a>
  15. </div>
  16. </div>
  17. <div class="header2">
  18. <div class="menu">
  19. <a href="../../en/news/index.html">News</a>
  20. <a href="../../en/game/index.html">Games</a>
  21. <a href="../../en/tool/index.html">Tools</a>
  22. <a href="../../en/page/about.html">About</a>
  23. </div>
  24. <a class="discord" href="https://discord.gg/3A6THQabNf">
  25. <img src="../../images/discord.png"></img>
  26. </a>
  27. <div class="clear"></div>
  28. </div>
  29. </div>
  30. <center>
  31. <h1>In the news...</h1>
  32. <div class="news_item">
  33. <h2 class="news_item_title">
  34. <a href="git-budget.html">Why I keep track of spendings in a personal app made with Git+JS</a>
  35. </h2>
  36. <p class="news_item_date">
  37. 2020-05-03 00:00
  38. </p>
  39. <div class="news_item_contents">
  40. <p><img src="../../images/2020-05-06_гит-бюджет_снимок.png" alt="GitBudget" /></p>
  41. <p>In this article Michael shares his experience of using Git+JS.</p>
  42. <p>Hi, folks, let me share my experience of creating an application to keep track of my spendings. Specifically, let me do it by answering the following questions:</p>
  43. <ol>
  44. <li>Why keep track of spendings in an application?</li>
  45. <li>Why did I create the application as a personal project?</li>
  46. <li>Why does the project use Git+JS?</li>
  47. </ol>
  48. <p><strong>1. Why keep track of spendings in an application?</strong></p>
  49. <p>I, like many people out there, wanted to become rich and <a href="https://youtu.be/7RchntYFtSE">successful</a>. To become rich, one is often advised to run a personal budget, that's what I started to do several years ago. I'd like to point out that running my personal budget hasn't made me rich and successful, and I increased income simply by moving to Moscow.</p>
  50. <p>I think I started to run the budget somewhere around 2012. By that time I already had a professional programmer deformation, which can be described as "made by someone else = bad" formula and is usually manifested by a strong desire to rewrite everything from scratch. However, I had no experience with budgeting back then, so I decided to try a "professional" solution and purchased <a href="https://www.youneedabudget.com">YNAB</a> (You Need A Budget) to use the application on both PC and mobile.</p>
  51. <p>I tried to do my best to set out budget plans and fulfill them in the course of three years. However, somewhere around 2015 the authors released a new application version and <strong>demanded money for the upgrade</strong>, the old version was no longer functioning. I had to choose one of the options:</p>
  52. <ol>
  53. <li>Pay for the upgraded version and use a completely new "shiny" user interface.</li>
  54. <li>Stop their ripoff, keep my money and lose the history of spendings.</li>
  55. </ol>
  56. <p>I concluded that:</p>
  57. <ol>
  58. <li>I already paid for the application;</li>
  59. <li>the old version was suitable for me;</li>
  60. <li>I did not ask for an upgrade;</li>
  61. <li>if I would know I have to pay for each upgrade, I would have never purchased their application in the first place;</li>
  62. <li>I didn't want to sponsor this boorishness;</li>
  63. </ol>
  64. <p>so I stopped the ripoff and <strong>lost my history of spendings</strong>.</p>
  65. <p>This was a very disappointing situation for me, so I stopped tracking my spendings for about a year. However, I was once experiencing a "painful synchronization" (also known as "figuring things out" with a wife). I failed to defend myself against a financial vocal attack like "you're a waster, you always waste money on junk". Then I realized I really need to keep track of my spendings. </p>
  66. <p>This time I decided not to repeat my mistake of giving all my data to someone with the risk of losing it, so I started to track my spendings with simple phone notes. The format was simple and looked like this:</p>
  67. <p><img src="../../images/2020-05-06_гит-бюджет_заметки.png" alt="Notes" /></p>
  68. <p>I used the notes solely on the phone until mid-2018. Then, a new need arose: I wanted to be able to <strong>work on my spendings from a PC</strong> to analyze them. I took the time to see through the solutions that would allow me to work with my spendings on both PC and mobile <strong>free of charge</strong>. A calendar turned out to be such a solution:</p>
  69. <p><img src="../../images/2020-05-06_гит-бюджет_календарь-день.png" alt="Calendar" /></p>
  70. <p><img src="../../images/2020-05-06_гит-бюджет_календарь-запись.png" alt="New record" /></p>
  71. <p>I used a Google account to access <a href="https://developers.google.com/apps-script">Apps Script</a> (a clone of JavaScript) to analyze the spendings. Working with spendings in Apps Script turned out to be quite daunting because calendar records are not designed to host spendings. Data ownership question was still unresolved: my data was still dusting on an unknown server I don't control, and I could only access my data through an API, <strong>which might change in the future by someone else's decision</strong>.</p>
  72. <p>While I was using a calendar, I've had the following ideas frequently visiting me:</p>
  73. <ol>
  74. <li>it would be nice to keep all my data in Git to be able to easily analyze the spendings;</li>
  75. <li>it would be nice to have a convenient user interface without all the noise that prevents me from quickly adding a record.</li>
  76. </ol>
  77. <p>Autumn 2019 I discovered <a href="https://isomorphic-git.org/">Isomorphic-Git</a>, which allows JavaScript to work with Git, quickly verified the ability to work with Git, and realized I found my Holy Grail. Recently I've finished creating the first version of GitBudget application, you can see its functionality here:</p>
  78. <iframe width="720" height="405" src="https://www.youtube.com/embed/ii_cLXAy3S0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  79. <p>That's how the spendings look like on my phone now:</p>
  80. <p><img src="../../images/2020-05-06_гит-бюджет.png" alt="GitBudget" /></p>
  81. <p>Git data looks like this: <a href="https://gitlab.com/kornerr/git-budget-sample-data/-/blob/me/gb.log">https://gitlab.com/kornerr/git-budget-sample-data/-/blob/me/gb.log</a></p>
  82. <p>Let me highlight a few important issues:</p>
  83. <ul>
  84. <li>Git repository above reflects actions performed in the video above;</li>
  85. <li>I keep my spendings in a private repository, you should do the same;</li>
  86. <li>the application runs completely on the device and has no back-end: GitHub Pages hosting is used;</li>
  87. <li>the application talks to the outside world only during synchronization with Git;</li>
  88. <li>password is kept by a browser, the application only uses it for synchronization with Git;</li>
  89. <li>the application should be loaded over HTTP because the currently used Isomorphic-Git version (0.70.0) makes some requests (metadata) to Git over HTTP, and browsers prohibit HTTP requests from HTTPS nowadays.</li>
  90. </ul>
  91. <p><strong>2. Why did I create the application as a personal project?</strong></p>
  92. <p>I spent 40 hours of my life during the first quarter of 2020, i.e., on average, I worked for about half an hour each day.</p>
  93. <p>Personal projects have the following benefits over those done at work:</p>
  94. <ol>
  95. <li>You can do whatever you want and learn from your mistakes.</li>
  96. <li>Nobody's breathing down your neck and restricting your fantasy.</li>
  97. <li>The above two points keep you calm and give you the strength to perform any stupid activity that might be required at work.</li>
  98. <li>Mistakes you own drastically widen your horizons.</li>
  99. </ol>
  100. <p>Personal projects have drawbacks, too:</p>
  101. <ol>
  102. <li>Nobody in the world cares about your project but you.</li>
  103. <li>Nobody would pay you for your project.</li>
  104. <li>You have to find time to do the project every day.</li>
  105. <li>Your wife won't thank you for the project, even if she would use it herself.</li>
  106. </ol>
  107. <p>It's easy to note that all drawbacks of the personal project are balanced with the benefits of the work project. And all drawbacks of the work project are balanced with the benefits of the personal project. Yin and Yang.</p>
  108. <p><strong>3. Why does the project use Git+JS?</strong></p>
  109. <p>Keeping data in Git instead of an unknown back-end/API has the following benefits:</p>
  110. <ol>
  111. <li>Git is the most widespread solution for decentralized source version control among developers, i.e., almost every developer has experience with Git.</li>
  112. <li>You don't need a new API to work with Git: you just work with files.</li>
  113. <li>There are numerous services offering Git free of charge if you're not too crazy about security and don't want to pay for the service.</li>
  114. <li>Of course, a Git service provider might be <a href="https://github.blog/2018-06-04-github-microsoft/">acquired by a large corporation</a> one day, however, it's easy to move your Git data wherever you want.</li>
  115. <li>For maximum security you can always host your own Git server.</li>
  116. </ol>
  117. <p>Usage of JS with HTML/CSS over Swift/Kotlin/C#/Python has the following benefits:</p>
  118. <ol>
  119. <li>Your application runs everywhere: PC, tablet, mobile phone.</li>
  120. <li>You don't need to pass AppStore reviews to get to every device.</li>
  121. <li>HTML/CSS/JS standards are international, so <a href="https://arstechnica.com/features/2018/09/macos-10-14-mojave-the-ars-technica-review/12/">no single company may stop supporting it</a> or <a href="https://medium.com/@DoorDash/tips-and-tricks-for-migrating-from-swift-2-to-swift-3-c67a8520dbac">change its API</a>; this may result in backward compatibility of <a href="on-the-way-to-durable-applications.html">20 years</a> or more.</li>
  122. <li>Since there's no back-end, all logic resides in JS executed on the client, so you can save the version of the application that best suits you and forget about recurrent updates that <a href="https://hardforum.com/threads/anyway-to-turn-off-the-damn-automatic-driver-updates-in-windows-10.1948410/">usually only hamper usability</a>.</li>
  123. </ol>
  124. <p>GitBudget is the first attempt to see what Git+JS can do. I can only imagine the possibilities lying ahead.</p>
  125. </div>
  126. </div>
  127. <div id="footer">
  128. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  129. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  130. The site is hosted by <a href="https://pages.github.com">GitHub Pages</a>.
  131. </div>
  132. </center>
  133. </body>
  134. </html>