Jolie Rouge


all ur parentheses Я belong to me


Roblox Lua – Swappable Memory Storage

A significant hurdle to testing code, and managing a game in Roblox is the tightly coupled nature of the DataStore. A good idea for dealing with the added complexity is abstracting away the idea of storing information to a swapable or customizable memory backing system.

Unifying Read/Write to a DataStore

The DataStore for Roblox is really just a glorified table that is written to a database. More than likely this is backed by Redis, information that is not really important here.

When you think about data you think about 4 essential operations: Loading, Reading, Writing and Saving.

We can create a module that has a swapable interface, and then in our code use that. During testing we can then back all of the game state with an in-memory database, and when it’s time to deploy the game, we can swap out the Loading and Saving functions to actually use the real datastore.

Logging Module

Don’t use GMAIL for your business

  1. Fool me once, shame on you, fool me twice, shame on me
  2. Google has shown it will make ideologically based decisions against users
  3. Even if you agree with Google’s ideology today, you might not tomorrow
  4. Are you willing to bet money you and Google will always agree?

Roblox – Lua Module Design

  1. Design your plugins/modules around Inputs and Outputs
  2. The functions receiving Inputs (and returning Outputs) are your Interface
  3. Obey the Separation of Concerns
  4. Use Dependency Injection of other modules with well defined Interfaces
  5. Never do more than you have to
  6. Never settle for 1 plugin when 2 will be cleaner

Dopamine and Investing, how green and red affect us

  • Dopamine highs and lows affect you more strongly when real money is on the line.
  • Your biases mess with your head, and mess with your ability to even see a bias as a bias.
  • Cut losers, not winners. This one will mess with your mind.