I've rewritten this year's Brewfest website using an old design I liked on top of Phoenix.  Phoenix is an MVC framework, like Rails, but for Elixir.  The rewrite has been interesting.

The design requirements include displaying a single-page website that describes the Brewfest, while capturing information from brewers about themselves and the beer they plan to bring to the fest to share.  I wanted the "login" to be extremely simple so that brewers didn't need to go through a whole enrollment process.  The information they enter should also go through an editorial process before anyof it is published to the site.  Some nice-to-have features include displaying ticket sales information/graphs, and the ability to edit the single-page site content from an administrative area on the site (protected by a preset http-authenticated login).

The initial build out of the site was a little challenging, since I was fighting with the Phoenix template system.  It's not so much that it's hard to work with, just that the layout vs content templates were unfamiliar, and the use of View modules (which are mostly empty in this design) was confusing at first.  I did eventually get the templating worked out to the point that the single-page site worked the way I wanted.  The more complex forms pages for the brewers to enter data were only slightly challenging, but after sorting out some confusion about whether I was editing the form for the brewer or for the admin (the files are named the same, but in different directories), it was reasonably smooth.

One definite problem with Phoenix is that the generators for model forms do not create any type of field for a relation.  The Beer model, for example, related to the Brewer model, but the form for it did not include any type of field for the admin to connect one to the other.  This was easily fixed with some hand-rolled code, but it was a conspicuous absence.

The brewer-facing forms were an interesting challenge, since I wanted to provide the brewers with a URL that included a unique code as part of the path rather than forcing them to use typical login authentication.  This meant making some changes to the routing to support this feature.  It was not dificult, but was definitely different from the typical.

I added several custom Plug modules to implement various facets of the application.  Both the authentication and adding the appropriate navigation to the page were handled via Plug.

Because the system used coded URLs for the brewers to log in, I devised a communication mechanism that would send email to the brewers and add on their unique URL to the end of the message so that they could look at any email we sent them and find their login URL.  To do this, I added a package that connected the application to PostMark, which reliably sent out the emails for me, rather than using sendmail or some kind of local MTA.  This went together very easily.  It was more difficult putting the WYSIWYG editor on the page that lets you edit the email.

Overall, the worst part of the project was getting the javascript/css build system to work cleanly.  Phoenix uses Brunch, which, if you're not doing anything other than what Phoenix comes with, seems to work fine.  But I had a lot of difficulty understanding how Brunch was doing things, and its insistence on AMD and packaging everything up to be used from calls to require() were a huge stumbling block for me.  It turns out that you can replace the entire javascript build system with whatever you want, and so I swapped out Brunch for Gulp, which fits my personal taste better.  I feel like Gulp provides a lot more direct control over how it works, rather than Brunch's implied conventions.  I think Gulp is rather a lot like Phoenix itself in this respect, and I'm surprised that Brunch is the default.  In any case, I spent hours trying to get the javascript to do what I wanted with Brunch, and after I switched to Gulp, it took probably 30 minutes at most to get everything working the way I wanted.  If I start a new Phoenix project for anything, switching the build system out for Gulp will probably be one of the first things I do.

I managed to connect the admin pages of the site to Brown Paper Tickets' API system so that I can get ticket purchase information and display it on the site.  This is an advantage because it's difficult to set up logins for BPT that access this information, and it's better to see it directly on the site, anyway.  One thing more I did here was institute a cache so that the values are only updated from the API every two hours at most.  This keeps them fresh enough without BPT complaining about how frequently the site polls their API.  One thing I would like to do yet is pull daily sales information from last year and compare it to this year's sales to get an idea of how well ticket sales are tracking.  Putting this information into a graph could show whether we're on pace with last year's sales.

I have yet to do the templating for the beer information on the public site.  I plan to have the beer template use a carousel for display.  This will keep the design aesthetic sane and allow all of the beer text to be used for SEO purposes.  I need to institute the approval system also.  I plan to implement this in the database by adding an "approved_description" field to the beer table that will appear on the site.  A button in the admin will copy the description to the approved field.  Any row with an approved value will be displayed. This seems like the simplest mechanism.

I also want to add a feature that will let me add, edit, and remove sections from the site directly.  This will make the system more flexible for the future.  I think I will do this by offering a form that lets the admin select a template, and then providing a simple WYSIWYG editor for filling in the template content.  In this way, I could create templates that display brewers, beer, and sponsors to be included in the single-page layout, and use the admin to organize the order of these things.  I also want to add a sponsor editor for this purpose, and a drag-and-drop UI for reordering the created sections of the page.

For next year, I would like to add a "year" column to each table so that the rows could be filtered by year, and past years' data could be displayed potentially on a separate URL.  Brewers have asked for this information in the past.  I should also add some metadata for who won what award, so that prior winners are recorded in the site data.

The most amazing statistic about the site is that the compiled application, which runs solely behind HAProxy (no Apache, no Nginx), typically returns its slowest page result in at most 7ms.  Most page loads are returned in microseconds, even with database lookups.  This is orders of magnitude faster than prior sites using plain HTML or WordPress.  Not only that, but unlike the WordPress site used previously, this application is virtually unhackable, since the code that runs it is compiled.  While the application is still potentially vulnerable to user input issues and the server could still have unknown open doors, the application has no power to replace key pieces of itself, like some insecure WordPress plugins do.

On top of that, this application and the Postgres database it runs on top of are hosted on a dirt-cheap $2.50/month VPS at Vultr.  This small server is not only meeting the needs of the site, but seems like significantly more power than the site really needs.  I credit this largely to the small footprint of the compiled application and its complete lack of dependencies (no PHP, no Apache, no Varnish, etc.).  The site is costing me less, is doing more, is more secure, and does exactly what I want with no extra cruft.  I am very pleased with the outcome so far.

There is still a lot of work to do getting the site into shape for this year, but I'm enthusiastic about what Phoenix has been able to provide and how well everything is coming together. 

There is some notion that one can believe in science.  Science is not a belief.  Science is science.  If you don't believe in science, you are a denier.  You deny that evidence that is examined and evaluated can predict future results.  It's that simple.

You can certainly believe that facts are not true.  You can believe that experimentation will not produce repeatable results when the conditions are controlled.  This doesn't make you correct or thoughtful. It makes you ignorant.

Science has baked-in skepticism.  You don't need to be "the one dissenting voice" offering some opinion about a thing that is provably, factually a certain way.  When you offer actual evidence that contradicts science's findings and provides an alternate explanation, that's not belief, that's science.  Not only is the skepticism built in, it's a requirement that it be examined.

This is, I think, why science at times feels soft.  Scientific findings are susceptible to being changed by provable, repeatable alternate results.  This isn't a failing of science, but a strength.  Failing to see it as a strength is not understanding how it works to begin with.

You don't get to pick and choose the science that you like to agree with.  You can dissent that adequate research has been done, or that the results are not conclusive based on the sample size or control.  You can disagree with the method of experimentation.  This is, in fact, how good science works.  It withstands scrutiny. It is able to hold its own in the schoolyard.  But merely holding an opinion that differs from scientific findings doesn't make those findings wrong -- It reveals you as ignorant.

So what is it about the science that you dispute?  Was the research improperly conducted? Were the deductions logically unsound?  Were the controls inadequate?  Was the sample size too small?  Was there not enough debate over the veracity of the claims?  Were the findings not published by a reputable enough journal or peer reviewed thoroughly?  Please tell me what your dispute is with the science that your beliefs force you to deny.  Please tell me what alternate more-reputable research you have done or have become aware of that refutes the claims of these other scientists.  Please tell me of the dissenting scientific argument presented by someone in the field that has yet to be addressed by the claimant.

Don't pick and choose what science you want to "believe" in.  I'd rather you just admitted general ignorance.  Admit to not understanding how the natural world works, and to not wanting to gain that understanding.  I can forgive you for saying that a scientific finding doesn't seem likely as long as you admit you haven't done any research, can provide no evidence to support your claim, and really shouldn't offer your opinion as something someone should repeat.  I find it somewhat harder to forgive parents that take this position, since you're influencing your childrens' beliefs in a very negative way, encouraging them to eschew science for random beliefs that perhaps make their lives more convenient or jive better with some mythological notion of how the natural world works.

It's also worth noting that one thing science is able to do that is perhaps difficult to grasp is that it is able to explain things that are otherwise difficult to observe locally.  It is able to explain global effects based on evidence that are not noticeable only from a local point of view.  But again, you can't throw out one scientifically agreed-upon theory based on the same kind and collection of evidence as another simply on a whim.  You need to have some evidence to the contrary, or explain some way where the evidence doesn't fit.  If you can't, then the science that describes that phenomenon holds until such time as a better explanation arrives.

Science evolves.  It's a shame that some people seem unable to do the same.

Time for yet another post wishing I had an app to do a certain thing...

Over the past few months I've been waffling between written (with a pen) note-taking and taking notes via a computer.  These options both have their trade-offs.

Analog note-taking requires a notebook to take notes in.  I've been using a Classic Squared Moleskine with grid paper for note taking, and I'm not a fan.  I was previously using a notebook that worked with my Livescribe pen, which had a much better feel to it than the Moleskine, but now that I've started in this Moleskine notebook, I feel like I have to finish it out.

I've given up on the Livescribe pen, not because it's not useful, but because the software support isn't great.  I have a whole notebook of stuff stored in my pen, both written and audio, and the only way I can get it out currently is by using the notebook and the pen together, which is cool, but doesn't acheive the goal of getting my notes digitized.

My favorite physical notebook right now is the Rocketbook.  The Rocketbook is designed to be used with Pilot Frixion pens, whose ink can be erased. The whole Rocketbook can be placed in the microwave with a mug of water, and after a minute or two, the whole notebook is cleaned out of ink.  The Rocketbook has a grid design on the pages and a QR code that is used with their app to digitize the notes and send them to any note-recording application they connect with.  It's an interesting feature, but one that I haven't been able to make good use of.  My favorite characteristic of the notebook, however, is one that is provided by the notebook's need to be safely placed in the microwave: The binding is a plastic, snap-together set of rings that allows the notebook to be laid perfectly flat (take that, Moleskine!) or be folded back onto itselff without the typical problems of spiral-bound notebooks.  I have not yet opened my Rocketbook Everlast (a Rocketbook made with plastic pages that feel like paper) shipment, but I think they've changed the binding to a standard metal one, which is rather disappointing.

Regardless, it's pretty useful to be able to take notes on the computer.  Last week, work issued me a new Mac, so I've been reevaluating my position (again) on what app I want to use to take notes.  I primarily use my note-taking app to record meeting notes and to plan out actions.

Previously my go-to app has been FoldingText.  I love this app, and wish that they'd keep supporting it.  Alas, they've basically abandoned it for work on some other task-based app, rather than focusing on their outliner.  FoldingText is neat because you can use markdown to write notes, and while you're typing them, they are properly formatted. Links turn into links, and heading font sizes get big.  You can also fold the text at any heading, which makes taking notes all onto th same file reasonable, since you can focus on only the section that you want at one time.  The todo-list features and tagging are pretty useful as well.

FoldingText doesn't work so well these days, though.  Since I've had to reinstall, I need to re-register the app, and finding the registration code that works with the useful beta version is proving difficult.  Plus, like I said, they're not really supporting the app, and the features I was using were largely provided by custom-written plugins that, since I lost my old Mac to battery issues, are now gone.

I've considered using a few note-taking-specific apps.  Evernote is always a top suggestion, but I simply can't stand its interface.  Combined with its yearly price to do some of the useful things it does (text recognition), I'd really like to stop using it at all.

I've considered nvALT, which seems a capable note-taker.  What I dislike about nvALT is that although it lets you take notes in Markdown, they're not presented in a formatted way.  You can always run the markdown processor, but this defeats the purpose.  The value is that I can see the text differences while I'm taking notes; I have no need to format the notes after I've taken them.  This holds true for many, many note-taking apps that I've tried based on wanting to have my notes stored in a text file, but organized and searchable together inside of an app.

If I give up on file-based storage, which isn't too unattractive since it would be cool to do things like include images or drawings in my notes, I have a few other options.  I've tried Notability, which is neat because it works on the Mac and iPad and has a mode that lets you easily interleave text, image, and drawing.  But for a pure note-taking app, Notability is pretty lacking in terms of organization and just raw text note ability.  I find myself fiddling with the settings a lot before I can even start writing text, and that's just a no-go.

I tried Together, which isn't a terrible app on the whole.  It lets you take notes into templates, which can be (at least) either markdown or rich text.  The markdown side again doesn't have formatting, but the rich text isn't too bad.  The organization tools in the app are fiddly, though.  I'm not sure how to explain it, but it just feels wrong.  nvALT may not do the realtime formatting I want, but at least the UI isn't filled with a ton of taggy/colory cruft.

The latest app I've acquired is Bear.  Bear is interesting because it does do live formatting in markdown style, although it doesn't seem to save the individual notes as separate files. (It may actually do this in its own storage, but I haven't looked yet.)  It does have the interesting ability to embed files and images into a note, and it imported my old FoldingText note without much trouble, sans the special formatting I used from my custom-coded plugins.  The interface is quite light, and has easily-accessed modes to reduce the screen clutter.  Organization can be done by marking a note with hashtags inline, which is nice. The built-in task list feature reminds me a lot of Evernote's; not great, but present.  Linking between notes is very, very cool.

If I could improve Bear, I would make a few changes.  I would make it possible to fold notes at the headings.  Checkboxes should be completely markdown-like, rather than graphical, so that you could add empty brackets to the beginning of each item in a list, and clicking on them would fill them with an X, something like on Github.  It would also use @-tag labeling on some things, like marking completed tasks automatically with something like  "@done:2017-05-11", and allowing you to search on these with more complex search options.  And of course, saving each note as a separate file (with any supporting embedded files) that could be shared would be great.

It would be great to get some integration between the Rocketbook app and Bear.  If I could get my written notes into Bear easily (and OCR'ed!), that would bridge that gap in a very useful way.

For now, I think I will try Bear.  There is at least one other note app like Bear that I want to give a shot, and having the name of the kind of applicaton I want will make it easier to perform seaches for applications like it.  I am enthusiastic about using these new tools, and hope they make a diffference to my daily operation.

I am reminded again how making friends as an adult is hard.  Maybe it was hard as a kid, too - I can't remember having friends as a kid, really.  It's strange that it's so difficult.  One must assume that this is because other people must not want to make new friends, or because people are are very particular about the kinds of people they want to be friends with, even though with how hard it is to make friends, you'd think people would be more open to less ideal friendships.

I may have mentioned before about how even when it's possible to find an adult couple with kids our kid's ages, there may be weird things that make it difficult to relate.  Some differences in religious belief, food tastes, politics, or economic status.  Usually, we're the ones that don't go to church, eat weird food, and are - between the two of us - mostly liberal (even though I registered as a Republian after the 2016 election, which is a whole different topic), and that ends up being part of what turns people off somehow.

But there's also finding common ground about which to have even an initial conversation.  I find smalltalk simultaneously tedious and essential for this purpose of feeling out people or even just passing the time when you're stuck with them for a while during some event.

Recently I've evnjoyed my conversations with people in a hotel elevator.  For whatever reason, these micro-conversations were always reasonably interesting.  They're short, because, you know, "elevator".  They're low-stress because you're never going to see this person again.  There's always something going on in the hotel for some reason, so there's hardly ever nothing to make smalltalk about.  And everyone at the hotel is away from home on some adventure, which makes for a generally happy attitude.  I found this an interesting observation.

Why I find it so difficult to strike up a conversation with people I've known for years via the kids' school functions is beyond me.  Where I seem to get stuck is when talking about the kids.  I think our kids are generally pretty great.  (Don't tell them that.) As a result, I like to talk them up.  It's not so much that they're better than everyone else's kids, but that they do things that I find interesting, and I don't do a whole lot that I can surprise a potential new friend with on a first conversation.  But in the end, sometimes, it turns into a, "Well my kid does this"-battle, unintentionally, and that doesn't lead to a useful outcome.  I suppose I could listen a bit more and respond with questions about their kids instead.

I'm amused and disheartened by the idea that my grade school friend-making instincts, which were terrrible, are what I'm using to make friends as an adult.  I wonder it there's something that can be done about that.

There has been a recent torrent of releases of streaming TV services by companies both expected and unexpected.  Since they mostly provide a free 2-4 week trial, I've signed up for all of them! Here's what I found.

Sling TV

I've been signed up for Sling TV for a while now. Sling was a good service for getting me the channels that I could not get ofer-the-air.  The antenna in my bedroom is connected to a device that can stream TV throughout my home network.  Supplemented with Sling TV's live TV from a handful of channels, things didn't seem like I was missing cable TV so much.

Sling's major downside is that they are missing key local channels.  For whatever reason, I can only receive 2 of the 3 major networks via Sling, and the one that's missing is the one that my antenna can't pick up due to this stupid Philadelphia-area VHF/UHF issue.  I simply can't get channel 6 over the air.  Nonetheless, since I primarily was using this to supplement my antenna, I most often use Sling to watch SyFy and CNN.

Sling also doesn't provide DVR functionality for TV shows that you want to "record" for later viewing. This is handy for when you don't really want to sit in front of the TV while the show is airing, something that I would do very rarely anyway.

Sling TV runs on my Apple TV, iPhone, Roku, and XBox One.  There is no smart TV app for Sling on my LG TV.  You can watch Sling TV on the computer pretty easily, which is good for travel.

YouTube TV

YouTube TV was the first to market in the new "streaming local channels" marketplace.  I signed up immediately.

YouTube TV has all of my local channels.  It's possible to DVR any show, and YouTube TV surprisingly surfaced old airings of shows that I told it I like.  For example, I told it that I wanted to "record" Elementary, and old episodes from the current season (those that have aired in teh past few months) appeared in my saved show list.  Pretty neat.

YouTube TV wins the UI contest hands-down.  When you navigate the interface, the live video from the channel highlighted in the listing appears behind the description of the show.  The audio plays as well.  This is pretty darn awesome.  It is actually better than normal TV, because you get a preview of the actual thing you want to watch.  For this reason alone YouTube TV stands out as one of the top contenders for best streaming service.

Channel availability is great on YouTube TV, and it seems like they intend to add new channels to the offering over time.  While I was glad to have Fox News added to my list of available channels, YouTube TV curiously omits CNN, which I was relying on Sling heavily for.

YouTube TV has some weird device restrictions currently.  It's very nice on the computer, but the only streaming device they support is Chromecast, which basically means I have to throw the TV to the Chromecast input, then use my phone to send the video to the TV. There is no app for my smart TV.  I do not like this, and have never really liked that Chromecast ties up my phone while I watch TV.  I can watch it on the iPhone and iPad, which is nice, and has the same clever interface as the computer.

Hulu TV

I was surprised when Hulu added streaming live local TV to their offering.  As an existing Hulu customer, primarily to fill in gaps that Netflix leaves with cable network shows, it was a pretty easy sell to add live TV to the plan.

Unfortunately, Hulu continues their complete disregard for sensible user experience when presenting their TV solution.  It's nearly impossible to manipulate their TV interface.  I found myself lost and frustrated several times while getting started, and this is simply not something you want when you're replacing a very simple TV experience.  Compared to YouTube TV, Hulu looks like something a fledgeling web consultant would throw together in a weekend - full of glitzy gradients and blipping menus, but lacking completely in the ability to actually use the interface.

Hulu has a DVR feature that is available for extra cost.  This strikes me as pretty weird, considering that all of the other services basically provide at least a limited version of this for free.

Hulu has all of the channel offerings of YouTube TV, plus CNN.  And since that's primarily what I was using Sling for, this makes it attractive in one particular way over YouTube TV.  Enough to overlook the poor interface?  Well...

The nail in the Hulu TV coffin is their device availability.  It initially looked attractive because my LG TV has a Hulu app built in.  But not every Hulu app is being upgraded to support the streaming TV experience.  To get Hulu TV in my livingroom, I'd have to use my XBox.  This is not too bad except...  There is no computer interface to Hulu TV.  Yeah, what?  Moving on...

Playstation Vue

You know, I want to hate Sony.  I don't know why.  I've resisted buying a PS4, and when I got one it was actually pretty slick.  I've resisted signing up for the Playstation Network, but when I did, I got a lot of nice benefits.  So why should I hate Playstation Vue, Sony's TV streaming service?

Vue is available on the PS4, the computer, iPhone, iPad, and Apple TV.  There is no LG TV app for Vue, but that's ok, since it's pretty easy to get to from the PS4 menu.

Playstation Vue has all of the channels I want on their basic arrangement.  They offer several enhanced packages that include movie and sports stations, which might eventually be interesting.  But primarily, I get all of the local stations, plus SyFy, CNN, Fox News, AMC, TNT, and USA.  This is a very good standard offering of channels, and covers everything that the other services provide.

The interface isn't as good as YouTube TV's but it is better (hard not to be) than Hulu.  There are some clumsy menus for setting favorite channels, and Vue provides some DVR functionality, which is also nice.

I was pleasantly surprised by the feature offering for the price, and I'm very likely to stick with Playstation Vue for my live TV streaming needs.