Blog2020 ≫ Rewriting popex is harder than I thought

Well, it's about as hard as I thought to rewrite popex. I had a big boost of confidence in the first day when I had buying and selling of shares working in a few hours. 90% done I said, this will be easy I said. Only two bits to do now, though quite big bits;

  1. The game mechanics, the rising and falling of prices
  2. The dividends, the weekly1 payout of extra cash to players

The big stumbling block is I can't quite remember how the original game worked, and I don't have any of the code. There was some magic formula to reprice the shares based on demand. It was a bit gameable (ie tell all your friends to buy shares in the same thing) but not too gameable. So I'm still working on this bit, think I might have come up with a formula today.

The dividends is a bit easier, but the tricky balance was between automating it so it is manageable but not letting it get out of control.

I currently have ten automated players and me buying and selling shares and it's not crashed yet...

Next steps:

  1. Add the missing features.
  2. Put it on a production server? Or try and run it from the house?
  3. Tell people about it.
  4. ???
  5. Profit.

I might update the styling before letting people play it. Or I might not.

Here are some exciting logs of the automated players:

16:04:08 REFRESH helen-love 298.33
16:04:08 REFRESH [kenickie](/wiki/#kenickie) 297.85
16:04:08 REFRESH [blur](/wiki/#blur) 999.10
16:04:08 REFRESH mj-[hibbett](/wiki/#mj/hibbett) 299.14
16:04:08 REFRESH [suede](/wiki/#suede) 904.50
16:04:08 REFRESH david-[devant](/wiki/#david/devant) 299.23
16:04:08 REFRESH [oasis](/wiki/#oasis) 1003.56
16:04:08 REFRESH
16:04:17 OOPS whale2 [oasis](/wiki/#oasis) 103 Error: not enough funds
16:04:28 TRADE whale4 [suede](/wiki/#suede) 80
16:04:36 GET /login 302 0ms pauly
16:04:36 GET /portfolio 200 0ms pauly
16:04:47 OOPS whale6 mj-[hibbett](/wiki/#mj/hibbett) -28 Error: not enough [shares](/wiki/#shares)
16:05:05 OOPS whale3 [oasis](/wiki/#oasis) 26 Error: not enough funds
16:05:22 TRADE whale6 david-[devant](/wiki/#david/devant) 258
16:05:35 OOPS whale6 mj-[hibbett](/wiki/#mj/hibbett) -255 Error: not enough [shares](/wiki/#shares)
16:05:54 OOPS whale2 david-[devant](/wiki/#david/devant) 217 Error: not enough funds
16:06:12 TRADE whale6 [oasis](/wiki/#oasis) 19
16:06:29 OOPS whale7 [kenickie](/wiki/#kenickie) -229 Error: not enough [shares](/wiki/#shares)
16:06:30 REFRESH helen-love 297.43
16:06:30 REFRESH [kenickie](/wiki/#kenickie) 296.95
16:06:30 REFRESH [blur](/wiki/#blur) 996.09
16:06:30 REFRESH mj-[hibbett](/wiki/#mj/hibbett) 298.24
16:06:30 REFRESH [suede](/wiki/#suede) 907.90
16:06:30 REFRESH david-[devant](/wiki/#david/devant) 300.73
16:06:30 REFRESH [oasis](/wiki/#oasis) 1001.84

Popbitch still hasn't gone live with my new thing yet.

I bought a Private Eye for the first time in ages and that has been my downtime reading for the last few days, so between that and coding and podcats, I have made no further book progress. My furlough reading list will ultimately look a bit weak.

I think we're going to overtake Italy for number of deaths tomorrow, taking us to number two in the coronavirus death list. We seem unlikely to head this list any time soon though. Go USA!

Country cases deaths
USA 1212835 69921
Spain 248301 25428
Italy 211938 29079
UK 190584 28734
France 169462 25201
Germany 166152 6993
Russia 145268 1356
Turkey 127659 3461
Brazil 108266 7343
Iran 98647 6277

Did my Sainsbury's click and collet and there was no queue!

Coronavirus weekly death graph for USA + Italy + UK + Spain + France + Germany

popex graph Graph line from 11905.0 to 18090.0🇺🇸 🇺🇸 Graph line from 2048.0 to 3849.0🇮🇹 🇮🇹 Graph line from 4465.0 to 7959.0🇬🇧 🇬🇧 Graph line from 1919.0 to 3637.0Spain Spain Graph line from 1966.0 to 5855.0France France Graph line from 848.0 to 1577.0Germany Germany Y axis of graph 0 - 5000 - 10000 - 15000 - X axis of graph Apr 20 '20 21 '20 22 '20 23 '20 24 '20 25 '20 26 '20 27 '20 28 '20 29 '20 30 '20 May 1 '20 2 '20 3 '20 4 '20 5 '20
⬅️ :: ➡️

Paul Clarke's blog - I live in Hythe in the deep South. Wed + father to two, I am a full stack web engineer, + I do js / Node, some ruby, python, php etc. I like pubbing, parkrun, eating, home-automation and other diy stuff, history, family tree stuff, Television, squirrels, pirates, lego, + TIME TRAVEL.