ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - dkandalov/limited-wip: IntelliJ plugin to limit your work-in-progress
IntelliJ plugin to limit your work-in-progress. Contribute to dkandalov/limited-wip development by creating an account on GitHub.
Visit Site

GitHub - dkandalov/limited-wip: IntelliJ plugin to limit your work-in-progress

GitHub - dkandalov/limited-wip: IntelliJ plugin to limit your work-in-progress

Build Status

Limited WIP

This is a plugin for IntelliJ IDEs to limit work-in-progress (WIP) by adding constraints to your normal workflow in IDE.

It has three main components (each one can be enabled/disabled):

  • Change size watchdog: shows notifications when current changelist size exceeds threshold
  • Auto-revert: automatically reverts current changelist after a timeout (the timer is reset after each commit)
  • TCR mode (test && commit || revert): you can only commit after running a test; if the test fails, current changelist is reverted; if the test passes, changes are automatically committed

Why?

  • focus on one thing at a time, make really small steps and commit as soon as you're done
  • practice various constraints as if you're at a code retreat
  • explore your limits and learn new refactoring, coding and problem solving techniques

Change size watchdog

Whenever size of the current change list exceeds specified threshold, watchdog will show notification popup reminding to reduce amount of changes. This is the least extreme constraint and has been used on large scale enterprise projects.

You can find settings in Preferences -> Other Settings -> Limited WIP, where you can:

  • enable/disable component
  • change size threshold which is measured as the amount of lines changed ignoring empty lines (if file was deleted, then the amount of lines in the file). There are no particular reasons for the predefined thresholds of 40, 80, 100, 120. These numbers are just a guess.
  • notification interval, i.e. how often watchdog will nag you after exceeding threshold
  • enable/disable statusbar widget showing current change size and change size threshold, e.g. Change size: 50/80 means that change size is 50 and threshold is 80. You can click on the widget to suppress notifications until next commit.
  • enable/disable commits after change size exceeded threshold. If enabled and change size is above threshold, you will not be able to open commit dialog and will see notification popup instead (although you can still force commit by clicking on the link in the popup).
  • choose excluded files which will not be monitored by the watchdog. Use ; to separate patterns. Accepted wildcards: ? - exactly one symbol; * - zero or more symbols; / - path separator; /**/ - any number of directories.

Auto-revert

  • Timer starts as soon as there are any changes in version control.
  • Timer resets when there are no more changes (because of commit, revert or undo).
  • When timer reaches 0 seconds, all changes are automatically reverted.

This constraint has been used at code retreats with 5 minute timeout for quite a few years. It has been useful on large scale enterprise projects with longer timeouts (e.g. 30, 60, 120 minutes). And it also seems to work well in combination with TCR.

You can find settings in Preferences -> Other Settings -> Limited WIP, where you can:

  • enable/disable component (it is disabled by default)
  • timeout until revert in minutes or seconds
  • enable/disable notification on auto-revert (to make it clear why current changes disappeared)
  • enable/disable displaying timer in auto-revert widget. Sometimes it can be useful to see how much time is left till revert. In other cases, you might prefer not to see time left and just focus on making the smallest change possible.

This is not part of the workflow, but you can pause the timer by clicking on auto-revert widget in IDE toolbar.

TCR mode (test && commit || revert)

  • You're not allowed to commit without running a test.
  • If the test fails, current change list is reverted.
  • If the test passed, changes are committed.

This is the most recent constraint so there isn't a lot of experience using it. However, it's much more useful and enjoyable than it might seem initially.

You can find settings in Preferences -> Other Settings -> Limited WIP, where you can:

  • enable/disable component (disabled by default)
  • choose action on passed test, it can be
    • commit
    • amend commit (will open commit dialog if the last commit has been pushed or different set of tests has been run compared to last execution)
    • commit and push (if "push" is supported by VCS)
    • open commit dialog
  • choose commit message source, it can be
    • last commit
    • current changelist name
  • enable/disable notification on revert (to make it clear why current changes disappeared)
  • enable/disable revert of test code (aka relaxed TCR)
  • exclude files from revert in case some tests are not marked as test source root in IDE

I heard about the idea from Kent Beck mentioning Limbo and his "test && commit || revert" blog post in particular. Originally, the idea comes from Oddmund Strømme, Lars Barlindhaug and Ole Tjensvoll Johannessen.

Screenshots

Videos

History

The original version of the plugin called "Auto-revert" was conceived at LSCC meetup in 2012 after having a chat with Samir Talwar (it's easy to implement a basic version of auto-revert in bash but there are problems like resetting the timer after each commit and that IntelliJ will be asking on each revert from terminal if you really want to load changes from file system).

Some time later (in 2015) after using auto-revert for a while on large legacy code bases, I found that it can be too harsh sometimes, especially when you're in exploration mode. To solve the problem watchdog component was created which doesn't revert but just notifies if there are too many changes.

At FFS tech conf 2018 Kent Beck mentioned Limbo and test && commit || revert which looked like a great fit for the plugin so I had to implement it.

I hope there will be more components in the future. If you have an idea, feel free to create github issue or tweet it to me.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory