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 Ask HN: What can be done to prevent a climate catastrophe?
Depressingly pragmatic. While building resilience is certainly worthwhile, we can still fix this and should try.

I think individual actions can add up, particularly when we use the magnifying power of tech. I wrote a lot on this recently and I can't fit it all in a comment so I'll just link to it.

https://unop.uk/how-to-help-with-a-big-global-problem-as-a-t...

It boils down to a three step process:

- Understand

- Organise

- Amplify

There's a post for each and more to come.

jsingleton··on Ask HN: What can be done to prevent a climate catastrophe?
Very well put. We have the tools to fix this problem, we just need the will.

I wrote a lot more on this recently, with ideas that people on here can use to help influence better outcomes: https://unop.uk/how-to-help-with-a-big-global-problem-as-a-t...

It's a shame that the big technology companies aren't using their influence and reach to help.

jsingleton··on Ask HN: What can be done to prevent a climate catastrophe?
I wrote a trilogy of long posts on this topic very recently so I'll just link to that.

https://unop.uk/how-to-help-with-a-big-global-problem-as-a-t...

In summary, it's not somebody else's problem. It's our problem and we need to take responsibility and fix it. We already have all the core technology required to solve this and we just need to make it happen. Everyone can help, particularly the talented crowd on here.

jsingleton··on Ask HN: What can be done to prevent a climate catastrophe?
This is a good point. Optimism is good for motivation but it has to result in action and not be simply ignoring a problem. Pessimism paralyses people into inaction but by understanding the psychology we can change that.

I wrote a series of posts on this recently with more to come. Far more than I can fit in here. It's a classic tragedy of the commons but there is hope.

https://unop.uk/how-to-help-with-a-big-global-problem-as-a-t...

jsingleton··on BBC News on HTTPS
Previously: http://www.bbc.co.uk/blogs/internet/entries/f6f50d1f-a879-49... (https://news.ycombinator.com/item?id=12093986)

Only took 2 years! I suspect the imminent release of Chrome 68 was a factor.

jsingleton··on Ask HN: 2018 Summer Reading List?
I actually wrote a couple of blog posts about some of my favourite books for summer reading recently.

https://unop.uk/6-non-technical-book-recommendations/

https://unop.uk/3-more-non-technical-book-recommendations/

jsingleton··on CoreRT – .NET Core runtime optimized for AOT compilation
The framework is included with the application, so no install is needed. You can already generate a self-contained platform-agnostic deployment that includes the framework, but it contains lots of files. You need to specify the platform, yet that is just for the bootstrapper. There are also some pre-requisites that have to be installed, such as SSL libs.

.NET Native (a.k.a. CoreRT) is more like what you get with Go, a single native binary. You need to know the CPU architecture ahead-of-time, but it has performance advantages. You can also strip out unused code with IL Linker and do things like Profile Guided Optimisation.

Keep in mind that if you're using Docker containers then you probably want to share the framework, otherwise this will increase the size.

There's some more discussion around this in the .NET Core talks that I've given: https://unop.uk/talks/

jsingleton··on Open Source .NET three years later
This is a bit complex, but for what most people think of as WCF (enterprise SOAP APIs) then it is not supported on .NET Core. The W stands for Windows after all.

However, the ASP.NET Core MVC framework supports Web API and this was originally part of the WCF REST services. Of course, you can still interact with SOAP endpoints (served by various frameworks) as a client, as pointed out elsewhere here.

jsingleton··on Live CO2 emissions of electricity consumption
For the UK (and France) this has a lot of geeky detail: http://www.gridwatch.templar.co.uk/

UK data (inc. solar) with CO2 emissions in app form: http://gridcarbon.uk/

jsingleton··on Open Source .NET three years later
Basically this, but they also push things like Application Insights, which is heavily tied to Azure.

The VS Code editor is also embedded in the Azure web portal. So by getting people using Code they may find it easier to up-sell to Azure. In fact, Code started life as the Monaco editor in Azure and was spun out into a separate product.

jsingleton··on Open Source .NET three years later
Yeah, I meant the startup culture in SF/SV. Among regular companies I assume .NET will have a fair share of use.
jsingleton··on Open Source .NET three years later
I think .NET's vision is get people using Azure. You could say the same about VS Code. MS want to gain developer mind-share and get them using their cloud.
jsingleton··on Open Source .NET three years later
.NET is pretty popular in the UK and elsewhere (particularly in finance) but you also see Java/Oracle in the same space. There are moves towards JavaScript/TypeScript for modern front-ends though.

The only place .NET appears to be discounted is in SV, at least from those I've talked to. Outside of that it's fairly mainstream but obviously you see more of it if you work with it and write/talk about it.

jsingleton··on Open Source .NET three years later
Link to the recording (slides and audio): https://www.youtube.com/watch?v=garlskQb8BU
jsingleton··on Open Source .NET three years later
I've written[0] and spoken[1] a lot about .NET Core, so I understand that it can be confusing. The similar naming certainly doesn't help. To summarize (and oversimplify) there are three main varieties of .NET: .NET Core, .NET Framework and Xamarin.

The new open source and cross-platform one is .NET Core and it is currently suited to writing server-side web apps (e.g. ASP.NET Core) and command line applications. It is a reimplementation of .NET and more use cases are coming (UWP, CoreRT, native tool-chain etc.).

The Windows only one is .NET Framework and it is better for graphical desktop apps on Windows. WPF and Windows Forms are not open and are Windows only, so are not in .NET Core.

Finally, Xamarin is also open now and lets you build native mobile and desktop apps on Android, iOS and macOS. Full details of all these are on the official docs site[2] if you want to read more, or you could buy my book on ASP.NET Core 2 :).

[0]: https://unop.uk/book/

[1]: https://unop.uk/talks/

[2]: https://docs.microsoft.com/en-gb/dotnet/

jsingleton··on Announcing .NET Core 2.0
Xamarin makes this separation work pretty well. Not Xamarin.Forms but a core business logic project with custom UI projects for each platform.

I'm hoping this will turn into a good solution. Xamarin already supports Mac (in addition to iOS and Android) and when it aligns more with UWP (XAML Standard etc.) that could cover a large slice of the platforms you'd want to target.

React native could be another option. I hear Android support has gotten better and you can supposedly also target UWP: https://github.com/Microsoft/react-native-windows

I wrote this a while ago but it's still fairly relevant: https://unop.uk/cross-platform-native-mobile-app-development...

You could also look at https://github.com/AvaloniaUI/Avalonia or https://github.com/picoe/Eto.

jsingleton··on Ask HN: Protect loved ones from online scams?
+1 for Pi-hole: https://pi-hole.net

It's better than a browser extension, as it works for mobile devices and native apps (e.g. Skype). Remember to set a backup secondary DNS server in case it goes down though.

If the router allows changes to the DHCP DNS settings then make them there. Some don't, so then you'll need to use the Pi for DHCP too.

However, keep in mind that it provides an unauthenticated web interface that exposes all domains that have been visited. This could be a privacy risk. It's pretty easy to simply use dnsmasq on its own if you don't want the extras.

You can also use this technique to make some news sites less annoying: https://unop.uk/block-bbc-breaking-news-on-all-devices

No, BBC News still doesn't support HTTPS (it's now over 6 months later than they said it would).

jsingleton··on Monospaced Programming Fonts with Ligatures
I think Scott updated the sample used for the screenshots after putting it in the post.

The code is listed as:

  // FIRA CODE
  object o; 
  if (o is int i || (o is string s && 
      int.TryParse(s, out i)) { /* use i */ }
  var x = 0xABCDEF;
  -> --> ==> != === !== && ||<=<  
  </><tag> http://www.hanselman.com 
  <=><!-- HTML Comment -->
  i++; #### ***
I think what was actually used is:

  // FIRA CODE
  ABCDEFGHIJKLMNOPQRSTUVWXYZ
  0123456789!@#$%^&*()_+={}[]<>/?'";:~`
  object o; 
  if (o is int i || (o is string s && 
      int.TryParse(s, out i)) { /* use i */ }
  var x = 0xAB_DE_F;
  -> --> ==> != === !== && ||<=<  
  </><tag> http://www.hanselman.com 
  <=><!-- HTML Comment -->
  i++; #### ***
The underscores in the hex literal are not part of the font, which looks like it is confusing some people.

A couple of those lines are new C# 7 features (patterns and literals) that appear to have been partially lifted from this blog post: https://blogs.msdn.microsoft.com/dotnet/2017/03/09/new-featu...

I wrote a section on C# 7 for a new chapter in the upcoming second edition of my book from last year. There are loads of useful new features in C# 7 (and 6 if you're still on 5) and I thought I recognised those snippets.

jsingleton··on Show HN: $200 Solar Self-Sufficiency  Without Your Landlord Noticing
Most modern motor-homes I've seen/used have a solar panel for trickle charging the leisure battery.

Some other good examples of retrofits here: http://www.goalzero.com/solarlife/stories/en-route/

jsingleton··on Show HN: $200 Solar Self-Sufficiency  Without Your Landlord Noticing
For anyone curious, a VAWT is a Vertical-axis wind turbine (https://en.wikipedia.org/wiki/Vertical_axis_wind_turbine). I always thought these were less efficient than the conventional designs but they're clearly simpler.
jsingleton··on SPIF – Streaming Progressive Image Format
Progressive JPEG is slightly different but JPEG2000 is very interesting. The wavelet transform is pretty clever in how it arranges the frequency components.

It's a shame JPEG2000 never took off, probably due to the patent issues. It has a niche in medical imaging though.

I wrote my thesis on this topic, over a decade ago now. When doing image recognition you only need to read the first small part of a JPEG2000 file to get good results, which has obvious advantages. You can ignore the high detail bits at the end.

jsingleton··on SPIF – Streaming Progressive Image Format
This appears to be quite similar to FLIF (http://flif.info/) and to some extent BPG (https://bellard.org/bpg/). There's no shortage of image formats that are better then JPEG and some have been around for quite a while.

The problem is in software/hardware support, particularly in browsers. JPEG has a lot of momentum. WebP is only supported in Chrome/Opera (https://caniuse.com/#feat=webp) and IE/Android don't even support animated PNG yet (https://caniuse.com/#feat=apng).

I did loads of research on this for a web app dev book, which I'm currently updating for the second edition. Browser image support hasn't changed much since it was originally published.

jsingleton··on Performance Improvements in .NET Core
To be fair, the new https://docs.microsoft.com site is much better than the old ones, but I know what you mean. I still occasionally get confused at all the .NET nomenclature, and I wrote I book on the topic.

I gave a talk at the London .NET user group earlier this year on why it's all so hard to understand. Maybe it will help clarify some things, however it was before the 2.0 announcement: https://unop.uk/on-asp-net-core-and-moving-targets/

jsingleton··on Network Protocols
Shameless plug but I cover a lot of lower level network and hardware effects for web developers in this book: https://unop.uk/book/

It's mainly aimed at people interested in ASP.NET Core but there are a lot of general performance tips in there. I have a EEE background and I think understanding things down to the transistor level can really help you write better software.

BTW Gary's WAT video is great fun if you haven't seen it.

jsingleton··on The UK Government should protect encryption not threaten it
Deadline to complain to the home office is 19 May (tomorrow). You may also want to write to your MP, as they will probably be up for re-election very soon.

https://action.openrightsgroup.org/tell-home-office-protect-...

jsingleton··on Selective, secret consultations have no place in open Government
Follow up blog post (linking this to WannaCry): https://www.openrightsgroup.org/blog/2017/tcns-encryption (discussion: https://news.ycombinator.com/item?id=14365046)

Deadline to complain to the home office is 19 May (tomorrow). You may also want to contact your MP, as they will probably be up for re-election very soon.

jsingleton··on UK launches program to explore removal of greenhouse gases from the atmosphere
Carbon Capture and Storage (particularly on biomass) appears to be one of the more realistic solutions. So it was a huge shame when the UK Conservative government cancelled planned investment in CCS (breaking a manifesto promise in the process).

It's not a technical or economic problem. It's a political and social problem.

https://www.theguardian.com/environment/2015/nov/25/uk-cance...

https://www.theguardian.com/environment/2016/jul/20/treasury...

jsingleton··on Cloudflare and FastMail: Your info is safe
FWIW FastMail also comes with file storage and notes.
jsingleton··on Cloudflare and FastMail: Your info is safe
They do have a calendar, which is something lacking from ProtonMail (although I believe they are working on this). ProtonMail has a free plan and if you only need a single custom domain then it's cheaper than FastMail. FastMail only have a free trial but the standard plan covers multiple domains (you have to pay more for extra domains on ProtonMail).

Edit (numbers):

FastMail = $50/yr (https://www.fastmail.com/pricing/)

Up to 100 domains (https://www.fastmail.com/help/account/limits.html)

They also do DNS and static website hosting (but not with HTTPS)

ProtonMail = $48/yr (https://protonmail.com/pricing)

1 domain, extra domains: $18/yr per domain

jsingleton··on Cloudflare and FastMail: Your info is safe
True, but probably still better than the US or UK: https://protonmail.com/blog/investigatory-powers-bill-email-...

Their EU servers are in the Netherlands. Although I guess it's hard to know if any EU traffic goes to the US servers.

Australia does have similar laws but it seems they don't apply in this case: https://blog.fastmail.com/2015/04/09/fastmail-is-not-require...

← PreviousPage 4 of 24Next →