Cutting through the smog: making an air quality bot with Haskell
engineering.linecorp.com
Cutting through the smog: making an air quality bot with Haskell
1–10 of 12 posts
Re: Cutting through the smog: making an air quality bot with Haskell
#2Re: Cutting through the smog: making an air quality bot with Haskell
#3The smaller parts with the types and small implementations should be at the top and only at the end all is easily combined.
And I highly doubt that the author went about writing the chatbot by writing out all the language extensions and imports first (which makes the coding-along line at the and a bit cynical).
Edit: This sounds so negative. I think the article is good and shows how the small pieces work together but I think the order is all wrong.
Re: Cutting through the smog: making an air quality bot with Haskell
#4Then, people started to requesting new features and I had ideas for new features and it was no longer a single-page project.
Then, people started to reporting issues with their PHP hosting accounts, so I was spending time debugging problems in their deployments.
Then, I thought it may be easier to introduce multi-tenancy so I can just support a single environment, the one that I own. So I added registration, dashboard, maps, Let's Encrypt, etc.
This way I ended up owning a small, open-source SaaS written in PHP7 and MySQL [4]. If I knew how my single-page app will grow, I'd choose something more suitable, like Rails or Dropwizard. On the other hand, it works, is usable and maintainable, so maybe it's fine the way it is.
[1] https://smolna.aqi.eco/ [2] https://luftdaten.info/ [3] https://github.com/trekawek/air-quality-info/ [4] https://aqi.eco/
Re: Cutting through the smog: making an air quality bot with Haskell
#5I know it is hard to strike a good balance between academic and technical focus, especially when writing about haskell, but I think starting out with language extensions and imports without writing about what and how we're going to do it, makes for difficult reading. The smaller parts with the types and small implementations should be at the top and only at the end all is easily combined. And I highly doubt that the…
I will think about rearranging the code blocks or add more explanations to make it all fit more naturally. Thanks for your feedback!
Re: Cutting through the smog: making an air quality bot with Haskell
#6I know it is hard to strike a good balance between academic and technical focus, especially when writing about haskell, but I think starting out with language extensions and imports without writing about what and how we're going to do it, makes for difficult reading. The smaller parts with the types and small implementations should be at the top and only at the end all is easily combined. And I highly doubt that the…
Hi, author here. I agree that straight away throwing a bunch of language extensions without an explanation of why we need them at all wasn't a good idea. The original blog post was written in literate Haskell, that's the reason why the code is organized that way. I will think about rearranging the code blocks or add more explanations to make it all fit more naturally. Thanks for your feedback!
I think there are quite a few parts in there that one can easily "try out on their own".
Re: Cutting through the smog: making an air quality bot with Haskell
#7edit: Looks like esphome with the following low-cost sensors is the way to go: * MH-Z19 for co2 (or CCS811 CO_2 for VOCs as well) * SDS011 for particle counts
Re: Cutting through the smog: making an air quality bot with Haskell
#8On a related note, I've been looking for a good sensor that is hopefully plug & play and reliable for integration with home assistant. Is something like https://www.banggood.com/Geekcreit-Nova-PM-Sensor-SDS011-Hig... really the best way to go about it rather than an Awair? Would be keen on VOCs and CO2 as well. edit: Looks like esphome with the following low-cost sensors is the way to go: * MH-Z19 for co2 (or CCS811…
This sensor also looks good: https://shop.pimoroni.com/products/adafruit-sgp30-air-qualit...
Re: Cutting through the smog: making an air quality bot with Haskell
#9I hope I never have to move to a place where I want to monitor the air quality at all.