Privatizing the 4th of July

IMAG0123

My family and I went to see 4th of July fireworks in a Southern town north of Charlotte. The only available fireworks were at a country club.  Members of the club had their own roped-off area and the hoi polloi were invited to park on a nearby main road and hike onto the rest of the golf course.  About 5,000 cars were parked on the main road, a mile up and down, and the walk with small children was a challenge.  We chose to park near the main entrance to the club.  There was a community of over $1MM brick houses associated with the club.  Not all residents are members.  Membership in the club starts with a down payment of around $50,000 and then monthly payments around $700.  I saw a non-member resident ask to sit in the club members area, something she had done in previous years, and she was turned away.  This community thus comprises both haves and have-nots, first class and business class.  The rest of us were in coach.  Parking my car I was close to but not blocking one resident’s driveway.  He came out and asked us to move, pretexting visitors soon to come.  After the fireworks were over, we returned and found his house unlit and unoccupied.

Growing up in New England I have a memory, perhaps false, that there were always town-sponsored fireworks in some area big enough to accommodate all of the town. North of Charlotte, where there is a large lake, there is almost no public space other than shopping malls.  The opening of a small beach was a big deal, with nearby residents loudly hand-wringing over the accompanying parking problems.  The beach had about 70 parking spaces. Consistently 700 come to bathe.  Even the highway, route 77, has been privatized, with a fast lane under construction for those that can afford to pay per use.

North Carolina is a state which is notable for the thorough inadequacy of its public transportation, its low teacher pay and disdain for public education, and the refusal Federal Medicaid funds.  The state, which just elected a Democratic governor by a narrow margin, has seen its Republican-dominated legislature systematically strip the governor of his powers and cut funds to his employees.  It’s quite something.

As a state on the losing side of what has been called, down here (not so sure if by the current generation, but surely the prior one), the War Between The States, I wonder if the lack of municipal attention paid to the 4th of July has strong historical roots in that conflict.  There is some evidence in favor of this interpretation.  So despite the otherwise rah-rah nature of Southern conservatives regarding the US of A and all of that, I wonder if institutionally the state is still driven by those older grievances, in a completely unconscious but still persistent way.

Advertisements

Python software spaghetti stack for web apps

aaeaaqaaaaaaaazjaaaajgi4mdgxowu3lwuzndmtngvhnc1ingjilwrmztlmm2m2ndnkzq

When you want to solve a problem, the easiest thing is to follow in the tracks of someone else.  This can lead to a fairly complicated software stack to combine solutions to different issues.  My stack is going in this direction:

SQL/Sqlite: Database.  Simple and light but apparently more than good enough for most web apps.

Python: main application glue.  For those of us who need to get stuff done in the scientific visualization space, and have no patience for Java or random obscure newish languages like Scala and Lua.

CSS: Stylesheet language of all websites.  Hard to avoid knowing about.  A bit unlovely.

Javascript: Popular browser-side programming language implemented in all major browsers, equivalent to Python, loosely Java-like but without all the mind-numbing type checking and package hierarchies (at first glance).

Ajax: Method of communicating between client-side Javascript and server-side application (in Python in my case), to update an element of a webpage without having to redraw and reload the entire webpage

Bootstrap: A library of widgets and good stuff, originally programmed for Twitter, which is public domain and has things like stars for Like buttons.

Node.js: Server-side implementation of Javascript, moving some of the rendering load for complicated pages back to server.  (But initial intention was for browser-side Javascript to make things faster

Django: Python-based web application development package.  Features use of SQLAlchemy to make it easy to bind classes to database tables and incorporate changes in class structure during dvelopment.

React.js: A way of getting much fancier widgets than vanilla Django, in particular the Editable Table.  Requires some tedious and tricky integration to make it play with Django.

Amazon Elastic Compute: Web server in the cloud without compromising my home computer, for modest cost.

Series the wife and I finished watching

The jig is almost up now for Veep

and Silicon Valley.

We closed down Girls.

We’re waiting for Game of Thrones to start up again.

Big Little Lies wasn’t to my taste, so we didn’t get far on that one.

Orange is the New Black was for a while but then I got tired of it and there’s a series and a half of so I haven’t seen.

We finished Homeland and are between seasons.

We just finished Better Call Saul and are sadly beginning the long wait for renewal and the next season.

We finished Crashing

and Master of None,

neither of which is guaranteed a new season.  I finished Archer Season 8.

That’s a show that seems to have run out of variations on a theme, I could be wrong.  I’ll be surprised to see it back, but will watch it if it does.  It’s a one-trick pony but it works for me.   I finished WestWorld.

We are going back to House of Cards, we’ve got a season and a half left.

I quit that a while ago because, prior to the most recent election, I just thought it was too far-fetched.   Now with a Queens landlord as President and his stripper wife as First Lady, not so much.  Even if Hillary won, that would still have played into the House of Cards theme. Only a Bernie win would have broken the mold.  We live in strange times.

Django tables2 list view does not support filtering on model properties

Which kind of sucks.  If you want to filter a column, it has to either be an aggregate function of all rows, or it has to be stored in that table or in a path from that table.  It can’t be a function of that row.  Which kind of sucks, it means that any row level functional properties have to be maintained when you do a row save.

And thus were spent 4 hours of my Sunday.

You’re welcome.

Sad!

Refined photon question, posted to Stack Exchange, let’s see if it gets crushed or discarded

Posted on Stack Exchange:

Mark Andrew Smith’s PhD thesis from 1994 examines relativistic cellular automata models. Also a 1999 paper by Ostoma and Trushyck examines this topic. One topic not discussed is the information required in a cell to represent photons in transit. Suppose we have cells arrayed in a cube so that each cell has 26 neighbors. Suppose there are N cells in the simulation. So it requires \log{N} bits to represent a cell location. If a photon in motion is currently in a cell, it’s direction can be represented by the location of the farthest cell it will reach on it’s straight-line trajectory. Any cell can originate a photon and can receive photons passing through from any other cell. So each cell must be able to represent N \log{N}  bits of information, to represent all photons in transit from all possible sources.

Question: Is there any schema that could represent the set of all photons passing through a cell using less information, with reasonable fidelity?

Question: According to the Pauli Exclusion Principle, any number of photons can occupy a single point in space. In the limit (real physical space), does each point in space contain an infinite number of photons? This would require infinite bits to represent. Storage of infinite bits requires infinite energy.   If so, does this pose a challenge to the idea, expressed in Fredkin’s Digital Philosophy, that the universe is in fact a cellular automata, with the limiting speed of light simply coinciding with the “clock speed” of the automata, i.e. the rate at which photons can move from one cell to the next?

Correct reproduction of BDM

Someone attempted to reproduce BDM, had problems and posted on CodeReview StackExchange asking for insight.  The dummies there criticized the white space and variable names in his code.  I found someone’s blog post with a correct answer and posted it.  Sanctimonious and clueless lifers on the site deleted the information.  The rules of StackExchange pretty much guarantee that narrow-minded lifers, similar to Wikipedia edit patrollers, will defend StackExchange against any useful content.  Oh well.  Here’s my answer:

OP is trying to write a Python program to reproduce a claimed calculation result of Bueno De Mesquita (BDM). There is another attempt to reproduce this calculation, in Python, by David Masad, “Replicating a replication of BDM“. Masad provided Python code, and also showed an approximately 20% divergence in the median score, starting from the same example and same inputs and same references. Jeremy McKibben-Sanders then replicated the model, with results matching BDM. Masad added a new post to discuss the coding issues which led him awry. Reading those posts and their code and comparing with above code will lead to correct diagnosis for above code.