HNHacker News
TopNewBestAskShowJobs

jsingleton

3,046 karma · joined April 8, 2013

Author of ASP.NET Core 2 High Performance (Packt Publishing): unop.uk/book

I'm a developer, engineer, hacker and entrepreneur. My personal blog is at: unop.uk

[ my public key: https://keybase.io/jps; my proof: https://keybase.io/jps/sigs/O8UP6-fFcMSV4qZW8VA39-Z_NiV8JtLjKAk6cOH1O7A ]

submissionscomments
jsingleton··on It doesn't cost much to improve someone's life
The last section is worth a read.

> Your personal donations can also make a difference, especially if you focus on where they can go the furthest

https://ourworldindata.org/foreign-aid-donations-increase#yo...

Good time of year to donate (in the UK at least, as the tax year starts in April). Various ways to donate depending on your jurisdiction.

https://www.givewell.org/about/donate/tax-deductibility

jsingleton··on Electric Shift Web App
Electric Shift compares the carbon intensity of your next two electricity off-peak periods so you know if it's better to run appliances (or charge the car) tonight or tomorrow night (GB only).

The web app: https://unop.uk/shift/

jsingleton··on Show HN: A web app to show if it's better to plug in your EV today or tomorrow
We're on a dual-rate electricity tariff and often have flexibility about what night to charge the car, but is it better to plug in for tonight or tomorrow night? I got bored of working it out so I made an app for to do it for me.

More info and instructions in this blog post: https://unop.uk/electric-shift-web-app/

If you have any comments or feedback then please reply here or email me (contact details on my blog).

jsingleton··on How to Not COP It – Part 2: Home Energy
This is a post on our experience getting a solar/storage system installed and some other measures. Again, it's not too technical so any questions please ask. For example, I haven't touched on the backup power option as the grid here is pretty reliable.
jsingleton··on How to Not COP It – Part 1: Advice on Electric Vehicle Ownership a Year In
I wrote this post for a less-technical audience but if you have any geeky questions then feel free to ask here, particularly around charging. We used a standard 13A socket for a while before getting a fast charger fitted and it was adequate. I've also worked for an EV charging company so I know a fair amount about the underlying tech.
jsingleton··on Experiments on a $50 DIY air purifier that takes 30s to assemble
There is some interesting info on building a cheap ~$20 purifier here: https://airpollutionguide.net/

I haven't tried as cheap HEPA filters appear to be harder to get hold of in the UK. Maybe due to different heating systems.

Clearing the Air: The Beginning and the End of Air Pollution by Tim Smedley is an excellent book if you are interested in this area.

jsingleton··on Experiments on a $50 DIY air purifier that takes 30s to assemble
It looks like you're using a Plantower PMS5003. I have one of those hooked up to a Raspberry Pi and it works well but I also built a few of these with ESPs: https://sensor.community/en/sensors/airrohr/

They support the PMS but I used the default SDS011. They both seem reasonable for relative values but I'm not sure about the accuracy without proper calibration. They don't appear to give similar readings to my Plume Flow 2: https://plumelabs.com/en/flow/

jsingleton··on The first person in the UK to have air pollution listed as a cause of death
I recently finished reading Clearing the Air: The Beginning and the End of Air Pollution by Tim Smedley, which is excellent and well worth a read if you are interested in this area.

https://www.bloomsbury.com/uk/clearing-the-air-9781472953339...

> ...a detailed blueprint for saving our cities. Suggested measures include a ban on all petrol and diesel cars in city centres; the replacement of diesel buses and trains with electric vehicles; and an end to the use of wood-burning stoves and coal fires. It’s an achievable vision, he insists. “However, whether it happens in 10 or 100 years is down to public pressure and political will.”

https://www.theguardian.com/books/2019/mar/31/clearing-the-a...

I also built a few monitors to add to Sensor.Community (a contributors driven global sensor network that creates Open Environmental Data), which are pretty easy to make.

https://sensor.community/en/

jsingleton··on Transport makes up only 6% of the greenhouse gas emissions from food
Our World in Data have an excellent analysis on this topic as usual.

> Focus on what you eat, not whether your food is local

https://ourworldindata.org/food-choice-vs-eating-local

jsingleton··on Show HN: Command line tool for half-hourly energy tariff savings calculation
Related blgog post: https://unop.uk/octoyosu-agile-tariff-comparison-tool/

Sample output:

  Wed 11 Mar 2020 to Tue 09 Jun 2020 (91 days)
  Period total 770.37 kWh (approx)
  Daily average 8.47 kWh (approx)
  Yearly average 3092 kWh (approx)
  Monthly average 258 kWh (approx)
  
  Super Green:
  Period total 137.44 GBP inc. VAT (approx)
  Daily average 1.51 GBP inc. VAT (approx)
  Yearly average 552 GBP inc. VAT (approx)
  Monthly average 46 GBP inc. VAT (approx)
  
  Loading agile pricing and calculating...
  
  Agile:
  Period total 84.24 GBP inc. VAT (approx)
  Daily average 0.93 GBP inc. VAT (approx)
  Yearly average 338 GBP inc. VAT (approx)
  Monthly average 28 GBP inc. VAT (approx)
  
  Savings:
  Period total 53.20 GBP inc. VAT (approx)
  Daily average 0.59 GBP inc. VAT (approx)
  Yearly average 214 GBP inc. VAT (approx)
  Monthly average 18 GBP inc. VAT (approx)
  
  Super Green 100%: 
        Agile  61%: 
  
  Done in 502ms
N.B.: HN doesn't support emojis so you can't see the full output here.
jsingleton··on Show HN: OctoPlot: Visualise Paid Energy Use in Your Terminal
OctoPlot is a small command line tool that draws a graph of the Octopus Energy Agile GB electricity pricing in your terminal.

Source (EUPL): https://github.com/jpsingleton/octoplot

Sample output (colour not shown):

  Getting pricing data...
  
  Pricing data from Fri 22 May 13:00 to Sun 24 May 15:00 for region P
  
   18p                                                                                                     
   17p          £ £                                                                                        
   16p          £££                                                                                        
   15p        £ £££                                                                                        
   14p        £££££                                                                                        
   13p        £££££                                           £ £££                                        
   12p        £££££                                           £ £££                                        
   11p       ££££££                                           £££££                                        
   10p       ££££££                                           £££££                                        
   09p       ££££££                                           £££££                                        
   08p       ££££££                                           £££££                                        
   07p       ££££££                                           £££££                                        
   06p       £££££££                                         ££££££                                        
   05p       £££££££ £ £ £                                   ££££££                                        
   04p       £££££££££££££                                   ££££££        £                               
   03p       £££££££££££££                                   ££££££        £ £                             
   02p       £££££££££££££ £                                 ££££££        £ £                    £        
   01p       ££££££££££££££££                                £££££££££££££££££££                 ££        
   00p £     ££££££££££££££££££                ££££          £££££££££££££££££££                 ££   £    
  ---------------------------------------------------------------------------------------------------------
  -01p £     £££££££££££££££££££               ££££          ££££££££££££££££££££                £££££££   
  -02p £££   ££££££££££££££££££££             £££££  £       £££££££££££££££££££££ £        £   ££££££££ £ 
  -03p ££££ ££££££££££££££££££££££            £££££££££      £££££££££££££££££££££ £        £   £££££££££££
  -04p £££££££££££££££££££££££££££          ££££££££££££     £££££££££££££££££££££££      £ £ £ £££££££££££
  -05p £££££££££££££££££££££££££££        £ ££££££££££££     ££££££££££££££££££££££££££   £ £ £££££££££££££
  -06p £££££££££££££££££££££££££££££      £ £££££££££££££    ££££££££££££££££££££££££££££££££££££££££££££££
  -07p £££££££££££££££££££££££££££££     ££ £££££££££££££    ££££££££££££££££££££££££££££££££££££££££££££££
  -08p ££££££££££££££££££££££££££££££    ££ £££££££££££££    ££££££££££££££££££££££££££££££££££££££££££££££
  -09p ££££££££££££££££££££££££££££££    ££ £££££££££££££    ££££££££££££££££££££££££££££££££££££££££££££££
  -10p ££££££££££££££££££££££££££££££££ £££ £££££££££££££    ££££££££££££££££££££££££££££££££££££££££££££££
  -11p ££££££££££££££££££££££££££££££££££££ £££££££££££££    ££££££££££££££££££££££££££££££££££££££££££££££
       1 1 1 1 1 1 1 2 2 2 2                     1 1 1 1 1 1 1 1 1 1 2 2 2 2                     1 1 1 1 1 
       3 4 5 6 7 8 9 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 
  
  Paid most for electricity between Sat 23 May 14:30 and Sat 23 May 15:00 (-12.327p/kWh inc. VAT)
jsingleton··on Next-generation solar cells pass strict international tests
Inertia is slightly different to supply response and most inverters use grid coupling for frequency and phase synchronisation so are not suitable. The slow response of old plants is an asset in this case and only a problem if they are generating rather than just providing inertia, which is instant.
jsingleton··on Show HN: Raspberry Pi WiFi extender/router/ad-blocker to filter all DNS traffic
Pi-hole® (network-wide tracker/ad blocking) set up as a WiFi repeater/extender. This improves WiFi coverage, allows switching between the unfiltered/filtered connections and forces all traffic through the filter from devices that try to evade it.

Part 2: https://unop.uk/pi-hole-extended-part-2

jsingleton··on Show HN: Multi-room audio with Snapcast and Raspberry Pi
I made a similar setup with Home Assistant running on a low power Raspberry Pi 3A+ connected to a Xiaomi Mijia Bluetooth Low Energy temperature and humidity sensor (model code LYWSDCGQ). It takes a single AAA battery and it's lasted almost a year on one.

There's a ready-made Home Assistant component but I wrote up a guide on how to read the data from a Linux terminal on your laptop: https://unop.uk/xiaomi-mijia-bluetooth-temperature-and-humid...

I also have Volatile Organic Compounds / equivalent carbon dioxide (Sensirion SGP30) and Particulate Matter (Plantower PMS5003) sensors soldered up to a Raspberry Pi Zero W over I2C/UART for logging. It lasts quite a while on a USB battery so you can take it out and about. An ESP8266/ESP8285 would last longer but it's easy to log with a python script and the SD card gives you loads of storage. I haven't written this up yet but will if anyone is interested?

jsingleton··on Next-generation solar cells pass strict international tests
This is a great long read (if you like log graphs) on how solar prices have dropped more than anyone predicted: https://rameznaam.com/2020/05/14/solars-future-is-insanely-c...

> This incredible pace of solar cost decline, with average prices in sunny parts of the world down to a penny or two by 2030 or 2035, is just remarkable. Building new solar would routinely be cheaper than operating already built fossil fuel plants, even in the world of ultra-cheap natural gas we live in now. This is what I’ve called the third phase of clean energy, where building new clean energy is cheaper than keeping fossil fuel plants running. Even in places like Northern Europe, by the later 2030s we’d see solar costs below the operating cost of fossil fuels, providing cheap electricity in summer months with their very long days in the high latitudes. These prices would be disruptive to a large fraction of already operating fossil fuel power plants – particularly coal power plants, that are far less able to ramp their power flexibly...

(hat tip to the Forge the Future newsletter: https://forgethefuture.substack.com/?no_cover=true)

I predict a lot of fossil plants will convert to simply providing inertia for grid stabilisation and charge for the service. They won't burn anything any more and may even demolish their stacks and cooling towers. They will just keep their generators and turbines connected to the grid as a big virtual flywheel to dampen spikes in demand / supply and maintain the AC frequency within tolerance.

jsingleton··on Should I Block Ads?
If anyone is interested in how to set up a network-wide tracker blocker then I've written some guides on how to configure Pi-hole as a router and Wi-Fi range extender. This means you can force all traffic through your custom DNS, even devices from Google and Amazon that don't respect DHCP.

https://unop.uk/pi-hole-extended-part-1/

https://unop.uk/pi-hole-extended-part-2/

It's still worth installing privacy add-ons to Firefox but this helps with some profiling intrusions in mobile apps and Chromecasts etc. It also helps protect your less technical family members a little, although it obviously can't keep them completely safe from surveillance. Education is an important aspect too.

jsingleton··on Show HN: Huxley 2 – .NET Core cross-platform GB rail live SOAP to JSON proxy
Huxley 2 is a CORS enabled cross-platform JSON ReST proxy for the GB NRE LDB WCF SOAP XML API (called Darwin). It supports both the Public Version (PV) and the Staff Version (SV). It's built with ASP.NET Core LTS, C# 8.0 and lots of abbreviations!

V2 is a reimplementation on ASP.NET Core, allowing Huxley to run on Windows, macOS and Linux. You can now use Huxley on any platform (pun intended)!

Demo server: https://huxley2.azurewebsites.net/

No token needed e.g.: https://huxley2.azurewebsites.net/all/old/1

Source code (EUPL 1.2): https://github.com/jpsingleton/Huxley2

Guide to set up an instance on Azure with Azure DevOps YAML pipelines: https://unop.uk/huxley-2-release/

jsingleton··on Climatescape.org – Mapping the global landscape of climate-saving organizations
Not a geographical map but https://oneplanet.com/ has a tool to visualise the connections in a sustainability plan.
jsingleton··on Decades of diesel use in Europe have created a public health crisis
The air quality in Westminster this week is excellent. :)
jsingleton··on UK Government Selects OpenAPI v3
This also covers CSV as well as APIs.

Links:

https://openapi.tools/

https://tools.ietf.org/html/rfc4180

While using the open API spec is good, I'd say the standardisation of CSV data will have more impact. More of the open data available is in the form of historic reports rather than real-time: https://data.gov.uk/ (e.g. https://data.gov.uk/dataset/27dd8d7f-c58b-4de3-bf0d-81058465...)

jsingleton··on The $47T Death Sentence for Oil and Gas
Most people unfortunately stick with the default investments their employers choose. So funds will still have a big vote share even if a large number of concerned people switch, however it is a signal to them.
jsingleton··on The $47T Death Sentence for Oil and Gas
This is a link to Bill Gates' recent comments.

However, with pension funds this is slightly different. Funds have a huge voice and customers switching investments can influence how they use their votes. It's very easy to do, so why not do this in addition to all the other things?

It's also less about removing funds from fossil fuels and more about putting your retirement savings to better work. If you move your fund to a "future world" style one then this provides capital to clean energy projects etc. The ethical funds I looked at even performed better historically than the standard ones, so it's win-win.

jsingleton··on The $47T Death Sentence for Oil and Gas
Yes. The cost of action is dwarfed by the cost of inaction, but that cost is felt (not so) far in the future. It's a problem with short-term thinking creating a false economy and building up a huge debt.
jsingleton··on The $47T Death Sentence for Oil and Gas
> Around 130 international banks, all present at the UN climate change summit in New York, have committed themselves to decrease their support and investments in the oil and gas sector...

Edit: If you want an action you can take then change your pension fund to an ethical one that doesn't invest in companies that do harm.

jsingleton··on .NET Core 3.0
It's usually a good idea to wait for the patch release before updating. This applies to most software, including VS, VSC and .NET Core.

Being an early adopter sucks unless you're just testing it out. If it's your job then wait for it to stabilise and for the real-world bug fixes.

The next Long Term Support version of .NET Core will be 3.1. It should be out in November.

jsingleton··on .NET Core 3.0
It depends where your starting point is. Core bundles a lot of stuff together that was previously separate or just good practice. If you are familiar with MVC / WebAPI / EF / OWIN and already doing DI / Logging etc. then it's not much of a leap.
jsingleton··on .NET Core 3.0
I also have problems with VS resource usage. It appears to depend on what file type the focussed tab has open. It's still 32-bit, which can't help.

Never had perf issues with VSC, which is surprising considering it's web tech. It's a different class of app to VS but much nicer to use, and of course it's cross platform.

jsingleton··on .NET Core 3.0
There are a few related announcements, here are some links:

- https://devblogs.microsoft.com/dotnet/announcing-net-core-3-...

- https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazo...

- https://devblogs.microsoft.com/dotnet/announcing-f-4-7/

- https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0...

- https://dotnet.microsoft.com/download/dotnet-core (if you're on 2.2 you have until the end of the year to update to 3.1, which will be LTS)

- https://www.dotnetconf.net/ live now

Shame about the bad timing with the UN summit: http://webtv.un.org/

jsingleton··on A view to the possible habitability of ancient Venus over three billion years [pdf]
Very readable two-pager. Not sure I like the styling of the graph though.
jsingleton··on Charts show how little progress has been made in limiting greenhouse emissions
The UN Climate Action Summit 2019 is live online http://webtv.un.org/ or https://www.un.org/en/climatechange/
Page 1 of 24Next →