-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Vince Mulhollon edited this page Mar 14, 2023
·
2 revisions
Roman Numeral Thermometer Notes, Status, Ideas
Weather class "input"
- Reads a REST API, NWS hourly temperature airport KUES (near my house)
- Async
- Returns an integer C unit temp. Probably should return an OutdoorTemperature object directly rather than integer C temp.
- There's many ways to deserialize JSON in C#; in this simple example I used a JsonNode as a DOM
- Probably should use the async deserializer that can work directly with HttpClient
- This Works
OutdoorTemperature class "process"
- Can use C units, F units, or F unit Roman Numerals (Clearly, Romans predate the metric system and as such would use degrees F)
- Has unit tests to verify the conversions and exceptions
- Throws exceptions if fed temperatures outside of World Record ranges with the intent of detecting programmer errors (like trying to store 1014 mb air pressure as a 1014 C temperature)
- This Works
Database class "long term storage"
- Stores OutdoorTemperature object in Azure cloud SQL database.
- Was unhappily surprised to discover Azure SQL database minimum cost is about five hundred dollars per month; cheap per hour for testing, however need an alternative for a longer term experiment.
- This is in progress see github branch "5-database"
Tentative web class "output"
- Cloud
- General idea is something like this mysql query, but translated to mssql query, displayed on a web page: "Select roman from observations where date(timestampcolumn) = subdate(now(), 1) order by celsius desc limit 1" which would be the roman numeral format high temp yesterday, likewise similar queries for low temp, or group by for various intervals etc.
- This is completely speculative at this time