With my exploration of things in the small microcontroller space - like Arduino, NodeMCU, ESP8266, Teensy, etc. - I've been considering a handful of projects that really need some kind of casing.  I've always been enthusiastic about natural cases for technology devices, and my latest project idea includes an opportunity to produce a case in natural wood.

What I am intending to build is a small alarm clock for Riley.  It will have a small white-pixel screen, with a resolution of 15x7.  The pixels can be dimmed and animate, and should be able to display a time reasonably well, along with some animations for alarms and different events.

I would like to build this clock into a wooden case, with small holes drilled in the front for the lights from the screen to shine through.  The whole clock will fit inside a small block of wood that will seem reasonably seamless, but will be hollowed out to fit the electronics and have a single long USB cable lead to plug into the computer or a wall socket.

I think I finally have enough tools to embark on such a project.  I've been slowly accumulating power tools so that I could work on small wood projects like this, and yesterday, during a Memorial Day sale coincidentally convenient to my birthday, Berta bought me a portable table saw, which is the final piece of the puzzle for producing the wooden parts I would like to use to complete my projects.

I have a few other things in mind for the table saw (and the scroll saw, drill press, dremel tool, and others that I also have in the garage), including a rack for our k-cups, a large back yard Settlers of Catan set, a nice box to hold my dice collection, a meat and cheese cutting board, and some stands to hold up an elaborate Halloween decoration.  I think this new tool will open up a world of new creative possibilities for me.

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.