2008-10-10 12:16:55 +04:00
hledger project notes
2007-07-02 18:36:58 +04:00
2007-08-04 18:51:45 +04:00
"...simplicity of design was the most essential, guiding principle.
Clarity of concepts, economy of features, efficiency and reliability of
implementations were its consequences." --Niklaus Wirth
2008-11-08 20:41:14 +03:00
"The competent programmer is fully aware of the limited size of his own
skull. He therefore approaches his task with full humility, and avoids
clever tricks like the plague." --Edsger Dijkstra
2007-08-04 18:51:45 +04:00
* to do
2008-11-09 01:20:43 +03:00
** errors
2009-01-18 00:03:25 +03:00
*** balance report: zero-balance root accounts do not elide properly
2009-01-26 23:27:03 +03:00
*** too many dependencies, hard to install esp. without cabal install
2008-10-17 20:55:28 +04:00
** features
2008-12-05 13:02:24 +03:00
*** more ledger features
2009-01-26 23:27:03 +03:00
**** actual/effective entry & txn dates, for completeness
**** ~/.hledgerrc for setting defaults
2008-12-04 02:20:38 +03:00
**** support complete period syntax ?
every N days # N is any integer
every N weeks
every N months
every N quarters
every N years
biweekly
bimonthly
2009-01-26 23:27:03 +03:00
**** allow - before currency symbol ?
2008-12-05 13:02:24 +03:00
*** new features
2009-01-26 23:27:03 +03:00
**** more date syntax: last nov, next friday, optional this, week of
2008-12-07 21:57:04 +03:00
**** allow comment lines immediately after or within an entry
2009-01-18 00:03:25 +03:00
**** accept multiple -f files
2008-12-07 21:57:04 +03:00
**** more reliable tidy layout from print
2008-12-04 02:20:38 +03:00
**** -Q quarterly interval option, for consistency/convenience ?
2008-11-26 08:29:10 +03:00
**** web gui
2008-11-24 03:29:53 +03:00
**** charts
2008-10-17 20:55:28 +04:00
**** easier data entry
2008-11-24 03:29:53 +03:00
**** parse more file formats - gnucash, qif, ofx, csv..
2008-12-05 13:02:24 +03:00
**** parse in-progress timelog entries
2009-01-18 00:03:25 +03:00
**** split day-spanning timelog sessions, don't report more than 24 hours in a day
**** easy timelog queries when called as "hours"
2008-10-17 20:55:28 +04:00
**** i18n
2009-01-26 23:27:03 +03:00
*** speed
**** more optimisation
**** speed regression tests
**** cache file ?
2008-10-17 20:55:28 +04:00
** tests
2009-01-26 23:27:03 +03:00
*** test all esoteric ledger file features
2009-01-18 00:03:25 +03:00
*** wanted: a test for reading a ledger from stdin
2008-10-17 20:55:28 +04:00
*** easy ledger compatibility testing
2008-11-26 08:29:10 +03:00
**** --compare to compare (xml?) output with ledger with same args
2008-10-17 20:55:28 +04:00
** docs
2009-01-20 11:21:50 +03:00
*** funding
**** vision
How to grow the hledger project ?
I'm looking for ways to fund active and sustainable hledger
development by me and others.
A secondary goal is to develop new sustainable models and processes
for funding free software developers and other community projects.
This is sometimes the point in a free sw project's development where
the project leader seemingly loses the plot, alienates contributors
and destroys the community's good-will dynamic. I've seen it many
times, but a few have succeeded and I want to be one of them - so
that I can eat, have a modicum of stability and do my best work in
service to the community. At worst, I'll look bad but the project
will still be out there. At best I'll live more easily and joyfully
while serving the cause of Financial Solvency!
2009-01-20 11:43:06 +03:00
So I'm beginning by posting these notes and inviting your thoughts -
as much or as little as folks want to give. How could we do this so
that all benefit ?
2009-01-20 11:21:50 +03:00
**** funding models
Brainstorming some possible funding models & processes.
***** grants
How to find possible grant sources ?
****** con
******* getting grant funding is a whole new field to study
******* slow and time intensive, I imagine
***** donations
Solicit donations.
****** pro
******* simple
****** con
******* often difficult
******* donators do not feel a direct benefit
***** shareware
Release the project under a non-free license, requiring commercial
users to pay the fee on an honour basis (eg).
****** pro
******* flexible, low administration, encourages trust
****** con
******* effectively closed-source ? would inhibit collaboration
******* benefit is still indirect, only a proportion will pay
******* enforcement/guilt may come into play
***** limited-time premium branch
The funded version of hledger gets some desirable premium features
before the free version and is closed-source. Funders/customers pay
a fixed price for immediate access to the funded version. Yearly, a
new funded version is released and the old funded version is merged
into the free version. (To gain experience it could be done on a
smaller scale, eg monthly/quarterly.)
****** pro
******* all features reach community, predictably
******* customers are also community funders
******* customers receive direct benefit from paying
****** con
******* free sw developers compete/outshine the premium branch
***** bounties
Some (or all) feature, bugfix, project management or other tasks are
published with a bounty attached. When the bounty is paid by one or
more funders, the task is performed and delivered. Or, bounty is paid
on completion of task (honour system).
****** pro
******* funders receive direct benefit
***** bounties using fundable.org (eg)
A more organised form of the above, perhaps facilitating trust,
co-funding and larger bounties.
****** pro
******* proven process developed by others
****** con
******* fundable takes a cut
***** hosted service
Offer hosted and managed ledgers, perhaps with premium features, for
a monthly fee
****** pro
******* proven model
******* clear benefit to customers, especially non-technies
****** con
******* success of free/self-installed version competes with hosting service
******* some will avoid web-hosting their financial data
***** customisation
Offer per-user customisations, possibly to be merged in the trunk,
for a fee
***** support
Offer user/developer support for a fee
***** training
Offer application and/or financial training for a fee
***** profit sharing/tithing
Each period (quarter, half-year, year), donate 10% (eg) to project
contributors and/or supporting projects
***** transparent funding
Funding and usage of funds is published on the web as a ledger
***** opaque funding
All funding and spending need not be made public
**** strengths
hledger has some aptitudes in this area:
***** hledger deals with money => hledger users will tend to have some money
***** hledger's purpose is to increase financial success => users will feel its value to their bottom line
***** hledger is a tool that can support project funding, eg by publishing community funding data
**** weaknesses
***** hledger doesn't have a nice ui yet
***** hledger has a limited featureset
***** hledger requires work, eg data entry and chart of accounts maintenance
***** hledger is geeky
***** there is competition
***** hledger has no compelling market niche (aside from payment-averse free software users)
**** competitors/fellow niche inhabitants
***** web apps
****** netsuite
****** sql-ledger, ledgersmb
****** wesabe
****** ...
***** desktop apps
****** quickbooks
****** quicken
****** ms money
****** grisbi
****** gnucash
****** excel
****** ledger!
****** ...
2008-11-24 01:04:45 +03:00
*** --version
*** --help
2008-10-17 20:55:28 +04:00
*** readme
2008-11-24 01:04:45 +03:00
**** keep in sync (automate)
***** README file
***** hledger.hs module description
***** hledger.cabal description field (exclude home page link)
***** home page description (http://joyful.com/Hledger/editform)
2009-01-18 00:03:25 +03:00
***** mail list description (http://groups.google.com/groups/hledger -> edit welcome msg)
2008-11-24 01:04:45 +03:00
***** gmane description
***** darcsweb description
2008-10-17 20:55:28 +04:00
*** announcements
2008-11-24 01:04:45 +03:00
**** generate from README and NEWS
2008-10-17 20:55:28 +04:00
*** release notes
2008-11-24 01:04:45 +03:00
**** NEWS
2008-10-10 12:16:55 +04:00
*** implementation docs
*** api docs
2008-10-18 12:39:47 +04:00
*** developer intro
2008-12-10 21:43:19 +03:00
**** style tips
***** we aim to make reliable software:
****** fixes come before features
****** "bugs" get called "errors", as in "the programmer messed up"
****** we test continuously and thoroughly (code, doc & speed tests on each checkin)
****** less is more
2008-10-10 12:16:55 +04:00
*** user manual
2008-12-05 13:02:24 +03:00
*** differences not noted in README
**** ledger shows description comments as part of description
**** ledger seems to get amounts' x-position wrong more than hledger
**** ledger can't parse full smart dates in display expressions
**** hledger print puts a blank line after the entry, not before it
**** ledger can get timelog entry balance wrong, see mail list
**** ledger reports timelog sessions as virtual transactions
2008-10-18 12:39:47 +04:00
** web presence
*** clarify bugtracking process
2008-10-10 12:16:55 +04:00
* misc
** things I want to know
*** time
2007-05-01 09:34:49 +04:00
where have I been spending my time in recent weeks ?
where have I spent my time today ?
what is my status wrt spending plan for this week/month/year ?
what is my current status wrt time spending goals ?
2008-10-10 12:16:55 +04:00
*** money
2007-05-01 09:34:49 +04:00
where have I been spending my money ?
what is my status wrt spending plan for this week/month/year ?
what is my current status wrt spending/savings goals ?
what are all my current balances ?
what does my balance history look like ?
what does my balance future look like ?
are there any cashflow, tax, budgetary problems looming ?
2008-10-10 12:16:55 +04:00
*** charts
2008-05-27 01:13:54 +04:00
[1:27pm] <sm> I have decided I am not getting enough visible day-to-day value out of my ledger, I need more of that to stay motivated
[1:27pm] <Nafai> What do you think will help in that?
[1:27pm] <sm> I think some simple self-updating charts, or even good reports in a visible place
[1:28pm] <sm> something I don't have to spend an hour fiddling with to get answers
[1:38pm] <sm> Nafai: identifying/designing some useful reports/charts seems to be blocking me
[1:39pm] <sm> there are probably some standard ones I should use
[1:40pm] <sm> a graph of daily net worth is probably one of the simplest
[1:58pm] <sm> what else.. a chart of weekly expenses in key categories
[1:58pm] <sm> ditto, monthly
[1:58pm] <sm> a chart of monthly income
[1:59pm] <sm> those three should help me be more clear about cashflow status
[2:00pm] <sm> also I'd like something that shows me how much I am on top of financial tracking - how current my numbers are, when last reconciled etc - at a glance
[2:01pm] <sm> another simple one: current balances in all accounts
[2:01pm] <sm> those would be a great start
[2:04pm] <sm> daily net worth, weekly expense, monthly expense, monthly income, confidence/currentness report, and balance report
[2:05pm] <sm> let's see, which of those 6 would give most payoff right now
[2:05pm] <sm> probably 5
[2:06pm] <sm> how could I measure that ?
[2:06pm] <sm> number of days since last ledger entry..
[2:06pm] <sm> number of ledger entries in last 30 days (compared to average)
[2:07pm] <sm> number of days since last cleared checking entry (indicating an online reconcile)
[2:08pm] <sm> those would be a good start. How do I make those visual
[2:09pm] <sm> well I guess the first step is a script to print them
2007-08-04 18:51:45 +04:00
** compare other languages! a parser generator and decent speed is required
2008-05-27 00:42:46 +04:00
*** python: http://cheeseshop.python.org/pypi/ZestyParser, pysec, pyparsing
2007-08-04 18:51:45 +04:00
*** squeak: LanguageGame, T-Gen, SmaCC
*** lisp: ?
*** ruby: too slow (?)
** data representation
*** http://www.python.org/dev/peps/pep-0327/
*** http://www.n-heptane.com/nhlab/repos/Decimal/
*** http://www.n-heptane.com/nhlab/repos/Decimal/Money.hs
*** http://www2.hursley.ibm.com/decimal/
2008-10-10 12:16:55 +04:00
** lispy's template haskell for quickcheck
-- find tests with template haskell
import Language.Haskell.Parser
{-# OPTIONS_GHC -fno-warn-unused-imports -no-recomp -fth #-}
{- ghc --make Unit.hs -main-is Unit.runTests -o unit -}
runTests :: IO ()
runTests = $(mkChecks props)
mkChecks [] = undefined
mkChecks [name] = mkCheck name
mkChecks (name:ns) = [| $(mkCheck name) >> $(mkChecks ns) |]
mkCheck name = [| putStr (name ++ ": ") >> quickCheck $(varE (mkName name)) |]
{- | looks in Tests.hs for functions like prop_foo and returns
the list. Requires that Tests.hs be valid Haskell98. -}
props :: [String]
props = unsafePerformIO $
do h <- openFile "Tests.hs" ReadMode
s <- hGetContents h
case parseModule s of
(ParseOk (HsModule _ _ _ _ ds)) -> return (map declName (filter isProp ds))
(ParseFailed loc s') -> error (s' ++ " " ++ show loc)
{- | checks if function binding name starts with @prop_@ indicating
that it is a quickcheck property -}
isProp :: HsDecl -> Bool
isProp d@(HsFunBind _) = "prop_" `isPrefixOf` (declName d)
isProp _ = False
{- | takes an HsDecl and returns the name of the declaration -}
declName :: HsDecl -> String
declName (HsFunBind (HsMatch _ (HsIdent name) _ _ _:_)) = name
declName _ = undefined
2008-11-09 01:20:43 +03:00
2009-01-18 00:03:25 +03:00
** snippets
-- trace a MixedAmount
matrace :: MixedAmount -> MixedAmount
matrace a@(Mixed as) = trace (show as) a
-- normalise and trace a MixedAmount
nmatrace :: MixedAmount -> MixedAmount
nmatrace a = trace (show as) a where (Mixed as) = normaliseMixedAmount a