Tuesday, July 8, 2014

[Solved] Amazon EC2 HTTP/HTTPS Redirection Loop using IIS

I'm writing this up because, like with a couple of problem solving posts in the past, I think this could be helpful for other people who have spent hours googling without any results.

I have been setting up a site on a single Amazon EC2 instance. The site can be accessed with SSL or without.

I generated the certificate request, going through GeoTrust, installed it with only a little difficulty.
Everything was going well until I tried to visit any of the HTTPS pages. If they didn't require HTTPS, then the request was redirected back to the HTTP version with a 301 permanent redirection. If HTTPS was required, then a redirection loop was encountered, as my code kept redirecting back to HTTPS, with something redirecting back to HTTP.

Lots of articles exist where people can't reach the site over SSL, but that wasn't my problem. Lots of articles exist where the problem is that Amazon's Enterprise Load Balancer (ELB) was in use, which obviously intercepts HTTPS requests, then passes on the result as HTTP, which would cause a redirection if requesting a page that requires HTTPS, but should not cause a loop where HTTPS is optional.

Instead, the problem was much simpler. The binding I had set up in IIS for HTTPS was using the EC2 instance's public, elastic IP address, rather than the server's private IP address. This was resulting in a redirection to the non-secure version on requests for the secure version, because as far as the server knows, the elastic IP address is a different machine.

Anyway, so changing the binding to use the private IP address worked perfectly.

I can't be bothered trying to word this as a question and answer using the right keywords and then deciding on whether it is more appropriate to go on Stackoverflow.com or Serverfault.com, hence me brain-dumping this here.

Hopefully, this SEO-keyword-laden blog post will allow others who get bitten by this esoteric issue to find an answer much faster.

Wednesday, June 11, 2014

The Why of Pirate Party Australia

Recently, a discussion within Pirate Party Australia started up around "why" we're here, rather than the usual viewpoint of what we're trying to achieve. Simon Frew, the party president, wrote a piece about it on his blog.

These are my thoughts on the question of "why".

I understand that, from an "Apple marketing is different" stance, why before what leads to a more engaged audience, so we need to be clear in our why, which is difficult because the Pirate Party's why is inextricably linked to its what.

Our what is civil liberties and social inclusion. Our corresponding why is because we're passionate about allowing people to have dignity, and to come together as a society where everyone is able to freely contribute to what they think will make society a better place than when they arrived

People should be allowed dignity... but they can choose to give it up.

Sunday, May 4, 2014

Google's stock split

It's been a few weeks now since GOOG stock split into what is now GOOGL and GOOG.

For each share of GOOG that a person held, pre-split, they retained 1 GOOGL share, which was the renamed, normal class of shares, and they were issued a new, non-voting share under the old name GOOG, which is different to the old GOOG, which was renamed GOOGL.

Nice and simple.

What's been irking me over this time is that the share prices are so similar. GOOGL currently trades for $533.87, and GOOG is trading for $527.93. That's about 1% apart, and the biggest difference has been about 2%.

It seems to me like a share that has a voting right should be worth more than one that doesn't. More than 1% more.

There's a special class of shares in Google that are only held by Larry Page, Sergey Brin and Eric Schmidt, which each have 10 votes per share. This is the reason for the low difference in price between GOOGL and GOOG; it doesn't really matter how many shares anyone has in Google because they can never affect anything with a vote, so all shares held by the public, or even institutions, are effectively non-voting.

Except, if I recall correctly, the super special class of shares cannot be transferred without converting to an ordinary share.[citation needed]

If that's the case, then over time, these special shares will disappear, even if it is on the time scale of a lifetime. So the better long term investment is in GOOGL, as one day, they'll actually have a say, whereas GOOG will remain merely a token to partake in profit-sharing.

I guess that the value difference that's put by the market at a mere 1%. If I actually had any shares in Google, I'd have sold all my GOOGs and bought the same number of GOOGLs, paying the 1% right-to-vote tax. Perhaps it's the love of democracy that I have that makes me sad and confused that the value of a (promise of a) vote can be so little.

Anyway, let's see how this plays out.

Tuesday, April 15, 2014

Love is Selfish


For any given parent-child relationship, there's probably some alternative parent who would be a better parent on any objective scale your care to measure, and even on the subjective ones.

There's a potential parent who is richer, more emotionally stable, more in love with the idea of a child and willing to have that love applied to the actual child, with a better sense of ethics and morality, and a greater ability to raise a child with those positive traits, all while teaching the child to avoid negative aspects of life, after consciously weighing them, and while not judging others who weigh things differently.

Despite this, just about any parent who was confronted with the opportunity to hand their child over permanently to someone who fit that description would balk at the suggestion, and violence might even ensue, depending on how serious the suggestion was when it was made.

Monday, April 7, 2014

Android Finance

I sent this as feedback to Google, because the flaws in the Android Finance app were annoying me:

----
Hi,

It feels like you guys haven't bothered improving this in a while.

Could you please review how to make it better rather than letting it stagnate?

High res screens like the Galaxy S4 show the graphs as tiny, as the graphs seem to be a fixed size in pixels.

Adding a stock always results in an error message, but on refreshing, it's been added correctly.

There seems to be no way to drag and drop the order of items, so their stock in the order they were added.

You add stocks to a "portfolio", but it's just a list of tickers without the ability to even log stocks that you own, let alone integrate in with actual portfolio management tools.

I know that a stock tool seems like it doesn't *need* to do much, but there are lots of opportunities to do things that will blow people away, especially considering it's a default app, so loss of people use it.

Regards,

David Crafti
----

I sent the email by clicking the link within the app. Here is the feedback I got:

----
Hello [my email address],

We're writing to let you know that the group you tried to contact (android-finance-feedback) may not exist, or you may not have permission to post messages to the group. A few more details on why you weren't able to post:

 * You might have spelled or formatted the group name incorrectly.
 * The owner of the group may have removed this group.
 * You may need to join the group before receiving permission to post.
 * This group may not be open to posting.

If you have questions related to this or any other Google Group, visit the Help Center at http://support.google.com/a/google.com/bin/topic.py?topic=25838.

Thanks,

google.com admins

----

Well, now I know why the app appears to be so neglected.

To the Android Finance developers... In memoriam.