Better HN
topnewbestaskshowjobs
Log inSign up

jsingleton

3,046 karma · joined Apr 8, 2013 (13y ago) · 1,188 submissions

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 ]

Submissions

comment 9y ago · link · parent

+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).

182.

Introducing Support for Brotli Compression(blogs.msdn.microsoft.com ↗)

1 points · by jsingleton · 9y ago · discuss

183.

Age verification plans put web users' privacy at risk(openrightsgroup.org ↗)

3 points · by jsingleton · 9y ago · 1 comment

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

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/

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

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.

189.

Introducing ASP.NET Core 2.0 Preview 2(blogs.msdn.microsoft.com ↗)

2 points · by jsingleton · 9y ago · discuss

comment 9y ago · link · parent

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/

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

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-...

comment 9y ago · link · parent

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.

194.

Selective, secret consultations have no place in open Government(openrightsgroup.org ↗)

1 points · by jsingleton · 9y ago · 1 comment

195.

The UK Government should protect encryption not threaten it(openrightsgroup.org ↗)

3 points · by jsingleton · 9y ago · 1 comment

comment 9y ago · link · parent

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...

comment 9y ago · link · parent

FWIW FastMail also comes with file storage and notes.

comment 9y ago · link · parent

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

comment 9y ago · link · parent

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...

comment 9y ago · link · parent

It does seem a little inconsistent.

https://thatoneprivacysite.net/email-chart-formulas/

"Our headquarters are located in Melbourne, Australia with servers at New York Internet and QuadraNet in the USA, and at Switch Datacenters in the Netherlands."

https://www.fastmail.com/about/company.html

Maybe this?

"We do not participate in, or co-operate with, any kind of blanket surveillance or monitoring. (We also point out that Australia does not have any equivalent to the US National Security Letter, so we cannot be forced to do something without being allowed to disclose it.)

...

Unless prohibited by law, we will disclose to the account holder when we receive a warrant for their account."

https://www.fastmail.com/about/privacy.html

comment 9y ago · link · parent

That's a good site. I wonder why Fastmail has a red mark against business ethics. ProtonMail (and even Gmail) are green (not even yellow).

Edit:

ProtonMail seem to be better for activism. I guess because of things like: https://protonmail.com/blog/investigatory-powers-bill-email-...

202.

Cloudflare and FastMail: Your info is safe(blog.fastmail.com ↗)

168 points · by jsingleton · 9y ago · 96 comments

203.

Running a high-availability SaaS infrastructure without breaking the bank(engineering.freeagent.com ↗)

1 points · by jsingleton · 9y ago · discuss

comment 9y ago · link · parent

Looks like this is launching soon: https://protonvpn.com/

comment 9y ago · link · parent

Background: https://protonmail.com/blog/investigatory-powers-bill-email-...

206.

ProtonVPN(protonvpn.com ↗)

3 points · by jsingleton · 9y ago · 1 comment

207.

The Investigatory Powers Bill and Online Privacy(protonmail.com ↗)

1 points · by jsingleton · 9y ago · 1 comment

comment 9y ago · link · parent

These is also FAKE (F# Make), a DSL for build tasks (https://fsharp.github.io/FAKE/). Similar to CAKE (http://cakebuild.net/), which uses C#.

209.

FAKE – F# Make – A DSL for build tasks(fsharp.github.io ↗)

1 points · by jsingleton · 9y ago · discuss

comment 9y ago · link · parent

Nice post. Simply written and easy to understand.

There are two others:

- http://benbowen.blog/post/cmmics_i/

- http://benbowen.blog/post/cmmics_ii/

It's well worth learning about the Interlocked class if you want to do parallel programming. If you get it wrong then you will see incorrect/corrupt results. It's also worth keeping in mind that for simple tasks it can be quicker to do them single threaded, due to the overheads involved. I demonstrated this in a simple benchmark app [0] that I wrote for a chapter of my book on ASP.NET Core [1].

[0]: https://github.com/PacktPublishing/ASP.NET-Core-1.0-High-Per...

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

1
678
40