Where I’m at
Onward - Finishing up the Stocktake Form - Initialisation, Completion and Submission
Status update:
- Initialisation - nearly complete
- Completion - about halfway
- Submission - not much progress — have psuedocode for submission logic
Tasks for completion for today:
- Finish off initialisation - this is the requirements:
- Allows user to use the button on the right conditions
- Understands the context - by calculating the week and reading the database for existing records.
- For the future - getting context from a custom claim JWT (Auth token) - that will be how we determine the users associated location, role, etc.
- When pressed it does three actions:
- Writes a new blank stocktake
- Opens the stocktake widget
- Locks the stocktake for the other user
- Allows user to use the button on the right conditions
What I learnt
Random thoughts to checkout
- CSvisTool - understanding data structures and algorithms
- Notion - Planning tasks in software development
- Ani-cli - some random anime CLI program that allows you to watch HD anime for free?
- TODO Tree - VS Code extension for compiling TODO lists
- Background Noise - better with or without it? Probably without. I like music though.
- Functional Programming - time to check out Rust?
- Build your own X - Github repo
- devtoolbox.co - all those annoying tasks automated in one single place!
- Zapier - automate tasks
- TinyWow - free micro-services
From “Pragmatic Thinking and Learning”
Finished Chapter 3 - This Is Your Brain:
CPU 1 vs CPU 2
Basically there’s two modes of thinking - people consider this left / right brain. It’s a bit more nuanced than that and can be more accurately described as linear mode and rich mode:
Item | L-Mode | R-Mode |
---|---|---|
Description | Logical | Emotional |
Strengths | Working through details, logical thinking Analysis - learning by pulling apart | Intuition, problem solving, creativity Synthesis - learning by building |
Memory | Short-term memory | Retrieval for long-term memory and ideas that are “in process” |
Conscious | Controllable - often described as the conscious brain | Uncontrollable - sort of like peripheral vision |
Storage | Stores only a fraction - good at indexing | Stores everything - poor at indexing |
Retrieval | Searching narrowly | Searches all memory - including unindexed memories |
Verbal | Verbal | Non-verbal - can retrieve words though |
Order of Relating | Abstractions of objects (Small piece of object extracted to fit the larger picture) | Concrete relationships between objects |
Time | Aware of time | Unaware of time |
Determines | Answers | Questions |
Level of Thinking | Low level | High level |
Capture your thoughts 24/7
The brain (both sides) is constantly offering up good suggestions!
Take note of them – The brain produces more of what you think is worth paying attention to!
For me I know that writing on the whiteboard is the best way to do so
Acting vs Ideating
- Everyone has great ideas
- Far fewer people keep track of them
- Of those, less act on them
- And of those, less can pull it off
Keeping track of your ideas is the first step in acting on your thoughts.
Using R-mode in learning
- Learning by synthesis - or by building is such a powerful learning technique
- For example, the dialectic in creating a feature of starting with data, then skipping to the UI, then returning to the logic leverages both R-mode and L-mode.
- The GM of General Motors said that they’re in the business of art, entertainment, sculpture - that also provide transportation.
- iPod shows that for business - design trumps features. Attractive interfaces are easier to use than unattractive interfaces - even though the functionality is the same.
- Being “happy” broadens your thought processes, and brings more of your hardware online.
- This makes me wonder if the Ying / Yang model of “happiness” is a good visual representation - that happiness is emphemeral, but long-term satisfaction comes from a balance of stress and success.
- Happiness in my opinion then becomes the emotion we experience when we’ve effectively “leveled up” from our current challenges - we got some more money, we figured out that problem we’ve been wrestling with, we got together or away from that person, etc.
- Happiness does mean that we can take on more challenges, and bringing on more resources from the brain. We feel that we can do anything.
- This also means that designing an attractive interface means that the subject will think more deeply about what’s going on
- Conversely - being angry or fearful means that your brain is shutting down cognitive resources for fight / flight / freeze response
Selection - creating attractive things
- Beauty comes from the selection of a near amount of infinite choices - just the right selection and assembly of those choices
- Knowing what that is comes from pattern matching that comes from both R-mode and L-mode thinking - and experts use both.
- Global, holistic pattern matching => R-mode “sees the forest”
- Detailed pattern matching => L-mode “sees the trees”
- Some fortunate few have an integrated and equal sense of using both R-mode and L-mode => “seeing the trees and the forest”
Rewiring your brain for learning
- We aren’t stuck into thinking paths because of our biology - our brains are very plastic and maleable
- Rewiring comes from belief, and constant practice
- If you really simply believe your brain can comprehend more, it will
- The brain really goes by “Use it or lose it” motto for brain real estate - practice your skill to protect that area of real estate
Portal - Development
Data and State Management Model
- Data Models
- Think of this as what am I actually trying to capture for later use? E.g. stock item
name
,count
,location
, etc- Consider not only what data you are trying to capture - but also maybe how you will create relationships between other models - stock item model that defines a
itemId
that is then also used in the stocktake model. Also consider metadata requirements - e.g. thedateTime
of the stocktake or the usersid
. - Think in terms of the object, and also relationships. Metadata is really just a special relationship with the functioning of the application.
- To figure these out - you must understand what exactly the purpose of the feature is doing. What is the stocktake feature in exact and precise terms doing?
- Streamlining the stocktake count process by giving a more user friendly interface (e.g. only showing user relevant data)
- Helping the user with more context specific information to help guide the users (e.g. showing the last count numbers on a new stocktake being initialised)
- Getting more quality data inputs to guide business decisions (e.g. ensuring quality through only presenting appropriate UI elements and or validation logic)
- Consider not only what data you are trying to capture - but also maybe how you will create relationships between other models - stock item model that defines a
- Think of this as what am I actually trying to capture for later use? E.g. stock item
- States
- Think of this is as a snapshot of data that I’m trying to capture. While not all data is displayed, what is - do I need to hold onto it?
- Flutter will recreate each widget when there is a change this means - do I need to instruct Flutter to not recreate this part of the widget when that change occurs?
- So imagine it as we’re taking a snapshot - and then tell me what information we need to capture. This data will then be held either to be held in the database, affect other state changes, etc.
- Notifiers
- Think of this as what is taking the snapshot and or changing things - it is executing the logic of the application (the change element between data and UI)
- This is best thought as “If I have this data - the visuals needs to change this way” or “The user used the UI - the data needs to change this way”
- The Notifier can do this either by it’s own methods (the real logic of the application) and by also incorporating methods from repositories.
- StateNotifiers - A combination of both, best to leave complex state management to separate States / Notifiers in my opinion. StateNotifiers are useful for basic or singular implementations such as intialisation or submission logic.
- Repositories
- This is a collection of methods to accessing data into the application. In concrete terms this is a CRUD call to Firestore.
- This can also have more specialised methods for particular methods - such as intialisation or submission methods
- Can depend on interfaces that allow for easy refactoring of how methods are implemented - e.g. instead of calling Firestore, we can check local device data.
- Providers / Consumers
- Providers are simple methods that give access to all the methods defined in the Notifiers, and Repositories
- If we are saying here’s the data (the model), and this is relevant to the UI (the state), because when X happens then Y changes (the notifiers or repositories), then we need a way to access all of those classes. This is where the Provider comes in.
- The Consumer is simply the opposite - where a widget can read the Provider and implement the logic as intended.
- Providers are simple methods that give access to all the methods defined in the Notifiers, and Repositories
Development Pathway
- Data - Models
- UI - Placeholder widgets
- State Management - Integrate logic
- Integration
- Testing
- Deployment