Three days ago, I sent the following note to the FCC stating my strong support for protecting the FCC Open Internet Rules and maintaining Title II classification. The current administration and their appointed head of the FCC want this to be removed. I believe that some regulations are good, and it is important for a functioning economy to have a government that protects reasonable regulations.

If you would like to send them your opinion, I recommend the Fight For the Future (FFTF) website as an easy way to post.

You can also watch John Oliver in his Last Week Tonight segment on Net Neutrality. At the end he shares a URL that redirects directly to the FCC page to post (NOTE: it seems you have to click “express”, then it opens a new page with the proceedings set as 17-108, which is the proper number for entering your comment!)

Here is what I sent:

Dear FCC and congressional representatives,

Please protect the FCC Open Internet Rules.

The digital sector has been a huge area of innovation and growth in our economy. I firmly believe that a strong reason why this is possible is because we have a free and open environment in which newcomers can experiment with and test out new ideas. While they do not have a level playing field of having the massive cash reserves of the incumbents, they at least have the security of net neutrality to keep some level of fairness in how the Internet—an essential utility of everyone’s daily lives—operates.

If the FCC ends Title II classification, which can lead to ISPs charging for "fast lanes", I see no benefit to anyone other than the ISPs and large, rich tech incumbents who can afford them. How on earth will this help our economy and how will it help with innovation (the real source of growth and a critical factor in what actually makes America great)? This change would only stifle our economy and the creativity of the US tech sector.

I regularly contribute open source software to the online community. I have worked at large and small tech companies. I hope to, one day, start my own company that will bring jobs and money to our economy. I am optimistic in the idea that this will not be a rigged, pay-to-play system where the ISPs can arbitrarily or even corruptly determine the winners and losers. If I do and I succeed, you can also be certain that I will continue to defend the ideas of net neutrality and an open Internet.

You can also be certain that congressional actions on this topic will inform my voting and how I communicate this issue to other voters.

Furthermore, I support and understand the FFTF statements that are pasted below.

Best regards,

The FCC Open Internet Rules (net neutrality rules) are extremely important to me. I urge you to protect them.

I don't want ISPs to have the power to block websites, slow them down, make some more accessible than others, or split the Internet into "fast lanes" for companies that pay and "slow lanes" for the rest.

Now is not the time to let giant ISPs censor what we see and do online.

Censorship by ISPs is a serious problem. Comcast has throttled Netflix, AT&T blocked FaceTime, Time Warner Cable throttled the popular game League of Legends, and Verizon admitted it will introduce fast lanes for sites that pay—and slow lanes for everyone else—if the FCC lifts the rules. This hurts consumers and businesses large and small.

Courts have made clear that if the FCC ends Title II classification, the FCC must let ISPs offer fast lanes to websites for a fee, and Chairman Pai has made clear that he intends to do just this.

But if you let ISPs make some websites fast and others artificially slow—for a fee—you will kill the open marketplace that has enabled millions of small businesses and created the 5 most valuable companies in America—just to further enrich a few much less valuable cable giants famous for sky-high prices and abysmal customer service.

I'm sending this to the FCC's open proceeding, but I worry that Chairman Pai, a former Verizon lawyer, has made his plans and will ignore me and millions of other Americans.

So I'm also sending this to my members of Congress. Please publicly support Title II rules and denounce Chairman Pai's plans. Do whatever you can to dissuade him.

Thank you!

Copy-paste this into your Python 3 interpreter to see a human-readable version of the raw SQL queries that your Django code is running.

from django.db import connection; import re
for i, query in enumerate(connection.queries):
    sql = re.split(r'(SELECT|FROM|WHERE|GROUP BY|ORDER BY|INNER JOIN|LIMIT)', query['sql'])
    if not sql[0]: sql = sql[1:]
    sql = [(' ' if i % 2 else '') + x for i, x in enumerate(sql)]
    print('\n### {} ({} seconds)\n\n{};\n'.format(i, query['time'], '\n'.join(sql)))

This is just a spruced up version of what is in the Django docs:

from django.db import connection

I kept mine short and a bit obfuscated looking so it takes up fewer lines and is easier to copy-paste.

Being able to view raw database queries is very important.

ORM’s (aka object relational mappers) allow one to write database code without having to actually touch the underlying SQL or whatever query language their database is using. This creates a nice decoupling between your code and database of choice and can speed up development. However, it also creates tons of risks that you’ll write terribly inefficient SQL, since you’re so removed from what is really happening.

Django’s ORM has a lot of abstracted ways to write intelligent queries (prefetch_related, select_related, only, deferred, values_list, remembering to actually index relevant columns, etc.), but it’s easy to screw it up.

There are some nice tools, like Django Debug Toolbar, to debug the queries that are used to render a page, but sometimes you want to just check from your interpreter—so copy-paste the above code into your python interpreter whenever you want to see what’s going on with your SQL queries.

*NOTE: the above example assume Python 3, hence the print-statement with parenthesis. Also, I do realize that if a query has any of my split tokens, e.g., "WHERE" inside a string, it will line break on that—and I’m OK with that for a quick and dirty debug tool.

Some thoughts on fake news, patriotic correctness, the president-elect & why one voted for him, and issues fundamental to securing a representative democracy. read full post…
A recount of the time I was hanging out with Arnold and Linda. read full post…

24 February 2016

Welcome to the Night Files

A piano mashup of the X-Files and Welcome to Night Vale theme songs. read full post…

Peter Coles

Peter Coles

is a software engineer who lives in NYC, works at Ringly, and blogs here.
More about Peter »

github · soundcloud · @lethys · rss

It’s time to get big money out of politics. Join the kick-started campaign to put government back in the hands of the people. Pledge now