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 Cloudflare and FastMail: Your info is safe
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

jsingleton··on Cloudflare and FastMail: Your info is safe
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-...

jsingleton··on The Investigatory Powers Bill and Online Privacy
Looks like this is launching soon: https://protonvpn.com/
jsingleton··on ProtonVPN
Background: https://protonmail.com/blog/investigatory-powers-bill-email-...
jsingleton··on Tour of F#
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#.
jsingleton··on Common Multithreading Mistakes in C# – Unsafe Assumptions
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/

jsingleton··on Postmortem of database outage of January 31
TIL GitLab runs on Azure. If your CI servers or deployment targets are also on Azure then the latency should be pretty low (assuming you get the correct region). Good to know.

I moved from AWS to Azure years ago. Mainly because I run mostly .NET workloads and the support is better. I've recently done some .NET stuff on AWS again and am remembering why I switched.

jsingleton··on Analysis of Soviet smoke detector plutonium
You can get both. I recently bought a twin pack containing one of each. The optical one is marketed as "toast proof" so you can put it near the kitchen and the alpha source one is claimed to be more sensitive.

Radioactive ones are usually cheaper but come with plenty of warnings about not disassembling or ingesting the source. Best to have a mix spread around the home. It's also well worth having a CO alarm if you have non-electric heating/cooking.

jsingleton··on Submarine cable map
^ trace route (tracert/traceroute)
jsingleton··on Submarine cable map
This one is very nice. It shows the actual positions and routes.
jsingleton··on Submarine cable map
This map is interesting too: https://www.us.ntt.net/about/network-map.cfm

It shows some overland links as well but it doesn't show intermediate hops. For example, you can see from other maps that most Pacific cables stop off in Hawaii.

You can match the nodes to entries in a trace root log. I did this for a chapter (on network latency and performance) in my last book.

jsingleton··on The .NET Core 2 Wave
I wonder if there is some confusion between .NET Standard and .NET Core. As .NET Standard 2.0 is a thing but I can't find any official reference to .NET Core 2 yet. Obvious, this will eventually come but it's not on the roadmap yet as far as I can see.

https://github.com/aspnet/home/wiki/roadmap

https://blogs.msdn.microsoft.com/dotnet/2016/07/15/net-core-...

Disclaimer: I've not been paying as close attention as I did last year when writing my book on .NET Core (https://unop.uk/book/). So I may just have missed something.

Edit:

I've found some more info: https://github.com/dotnet/core/blob/master/roadmap.md#ship-d...

  Milestone 	 	Release Date
  .NET Core 2.0 	Spring 2017
  .NET Standard 2.0 	Spring 2017
This is weird as I had previously heard this would be v1.2. Perhaps it is but it's now a major bump rather than a minor one. Either a breaking change or to tie in with .NET Standard?

I guess this means it won't stay aligned with the ASP.NET Core versions now?

I spend time writing a helpful comment and the thread gets flagged. :(

jsingleton··on .NET Core Image Processing
This makes sense as System.Drawing (aka GDI+) was mainly used for WinForms and has never been supported for web servers. I suspect Mono ported it to support their Windows Forms port.

It may just work on Windows but it won't keep working when used server-side in a web app. MS specifically recommend against using it in ASP.NET. I learned the hard way what happens if you ignore the warnings when I was supporting a site that did this.

Edit: I wrote about image optimization and resizing in chapter four of my book on ASP.NET Core - https://unop.uk/book/

jsingleton··on .NET Core Image Processing
Great work. Seriously. Keep it up.
jsingleton··on Microsoft Azure in Plain English
Re-post from the AWS thread (https://news.ycombinator.com/item?id=13442022).

That's a good high-level list, although the comparisons don't always match up. For example, I'd say Traffic Manager is more like Route 53 than ELB (which only works within a region).

If you're after something a bit more in-depth (but covering less services) then I wrote a three part series last year. It may be a little out-of-date, but most of it still applies. Azure now supports MySQL, for example.

1: https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing-c...

2: https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing-c...

3: https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing-c...

Edit: Should that "puts da" be on that page?

jsingleton··on .NET Core Image Processing
Unless you have a good reason to then I would recommend against rolling your own (with any library). Use an existing cloud service that specializes in it.
jsingleton··on Amazon Web Services in Plain English (2015)
The almost immediate modal pop-up on those pages is pretty annoying. It's just as easy (if not easier) to close the page rather than the overlay.

The problem with these intrusive tactics is literally the next thread on HN right now: https://news.ycombinator.com/item?id=13439828

jsingleton··on .NET Core Image Processing
You're welcome. I'm glad it's useful. It's a community effort so feel free to submit a PR or an issue.

P.S. There used to be a separate website but since GH broke how pages work the domain now just redirects to the repo.

jsingleton··on .NET Core Image Processing
Nice post. Looks like I'll need to update the compatibility list: https://github.com/jpsingleton/ANCLAFS#image-manipulation

NB: You shouldn't use System.Drawing in a web app. It can lead to memory leaks and lots of pain. Even the newer WPF equivalents are not safe for use on a web server.

jsingleton··on Amazon Web Services in Plain English (2015)
That's a good high-level list, although the comparisons don't always match up. For example, I'd say Traffic Manager is more like Route 53 than ELB (which only works within a region).

If you're after something a bit more in-depth (but covering less services) then I wrote a three part series last year. It may be a little out-of-date, but most of it still applies. Azure now supports MySQL, for example.

1: https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing-c...

2: https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing-c...

3: https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing-c...

Edit: Should that "puts da" be on that page?

jsingleton··on Raspberry Pi Compute Module 3 out now
Slice media player: http://fiveninjas.com

Edit: Old blog post with tech details: https://www.raspberrypi.org/blog/creating-and-kickstarting-s...

jsingleton··on Raspberry Pi Compute Module 3 out now
I'm sure there is another new version in the works. They always keep very quiet about it so as not to damage sales of the current version.

Who would have bought a Pi 2 knowing how quickly there would be a Pi 3? There could be a Pi 4 out next week for all we know, unlikely though.

jsingleton··on Raspberry Pi Compute Module 3 out now
No, I've not used one. I believe it's designed to be primarily an offline media player.

As the Pi sucks at I/O, the idea is that you mount the HDD directly over USB and transfer files to it from a regular computer. Network transfers would be very slow due to the Pi bottleneck.

jsingleton··on Raspberry Pi Compute Module 3 out now
Not personally. The only thing I've seen use a CM is the Slice media player: http://fiveninjas.com

I wonder if it can be easily upgraded to the new CM.

jsingleton··on Raspberry Pi Compute Module 3 out now
Their blog post has more info: https://www.raspberrypi.org/blog/compute-module-3-launch/

I posted this link earlier but it didn't attract much interest.

jsingleton··on What lies beneath async/await in C#?
It can be a good use case, to increase the number of concurrent users you can serve. See my comment elsewhere in this thread.

You should still be able to output an ID when using async/await. It just means that the calling thread can do something else while it waits for the DB to get back to it. Execution will resume in the same place.

As mentioned elsewhere in this thread, for a distributed system you can use GUIDs to remove a immediate dependency on the DB. You can adopt eventual consistency and merge later, but this adds lots of complexity. If you do go down this route, add the GUIDs as an additional key and stick with something sequential for PKs, to avoid clustering issues.

jsingleton··on What lies beneath async/await in C#?
I would argue that async/await is far more important for native applications. I've seen plenty of apps doing significant work on the UI thread and hanging. Making it easy for developers to run things in the background is great for performance. Web browsers automatically add a level of asynchronous interaction.

It's also important on a web server but it won't improve performance for a single user in isolation. As you say, it allows more requests to be serviced concurrently. This won't speed up an individual request unless the server is already heavily loaded.

Edit: You don't need to build two library APIs. You can just build an Async method as the default implementation then have a blocking call to that as the synchronous method. I believe that all new MS APIs are now Async by default.

jsingleton··on Explaining .NET Standard Like I'm Five
It's not that complex but I think it's just that .NET naming and versions are currently quite confusing. I did a lot of reading on this for the book I wrote and I still find I need to double-check things.

I guess this is what you get when you try and munge three platforms together. Package support is very important for uptake and many library authors were waiting for some stability. I found this out when researching the support matrix at https://anclafs.com.

If you look at the volume of MS docs on this you would be forgiven for thinking it's complicated:

https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introduci...

https://github.com/dotnet/standard/blob/master/docs/faq.md

https://docs.microsoft.com/en-us/dotnet/articles/standard/li...

https://blog.xamarin.com/net-standard-library-support-for-xa...

jsingleton··on Show HN: A mobile-friendly London transport status page written in React
To save a click, the live demo is at: https://reactube.com
jsingleton··on Show HN: A London Underground Tube Status Board Written in React
Unfortunately, those are the official colours: https://tfl.gov.uk/tube-dlr-overground/status/
← PreviousPage 5 of 24Next →