Hacker News new | past | comments | ask | show | jobs | submit | harterrt's comments login

Agreed. Fwiw, Mozilla’s style guide prohibits rivers like this.

https://docs.telemetry.mozilla.org/concepts/sql_style


For comparison, here’s Mozilla’s SQL style guide: https://docs.telemetry.mozilla.org/concepts/sql_style


This is a much better style guide in my opinion.

It’s still highly readable but also much much easier to write and modify.

Though I am biased because it’s also how I used to write SQL back when PL/SQL was my day job. Albeit I fell into this design because it proved to be the easiest way to write and maintain readable code.


Thanks for sharing this!

It looks so much cleaner in my eyes.

Plus it uses constant-sized indents, which means less futzing about with spaces and all that.

Also means you can comment out the first select item, something you can't do with the article's approach.


Yes! I can’t see the point of enforcing fussing with indents to get a river.


I am definitely not a fan of that style. Wastes too much vertical space without much benefit.


The benefit is how quickly an experienced programmer can accurately isolate portions of logic and understand / mutate them.

It also achieves that in monochrome, which is likely to be the case when an SQL query is in a shell script's <<< HEREDOC or in a string blob in a log file or source code for another language's compiler.


What would you change?


I think this guide misses the point that “JOIN” is not a root keyword but a modification on “FROM”. It is more akin to logical “AND”, “OR”, etc.

And this stacks much better once you start doing complex joins especially when you can add parentheses to change where you actually join

    FROM a JOIN b JOIN c
Can be different than

    FROM a JOIN (b JOIN C)
Apart from that I think I came up independently to the exact same rules when building the prettier extension for SQL a few years back.


SQLis based on set theory, which is asdociative. So (a JOIN b) JOIN c = a JOIN (b JOIN c)

Your DB's query planner should optimise given the available indices.


blog.harterrt.com

Mostly data science - been slow lately, but I’m working on a couple pieces again.


Thanks for sharing. I want to hear more from him. Do you have a recommended book by McLuhan to start with?


I believe "Understanding Media" is his biggest one; source of his most famous quote "the medium is the message"


Yes, I've reread is the first 2/3rds of "Understanding Media" several times and never finished it, but would still highly recommend it. There is also some excellent old interview footage of him when he was a pop culture figure which is originally what fascinated me. For me it would have been hard to read his writing without having seen those interviews first -- he has a very distinct style of writing/talking and is interesting as an integrated person within recent history and not just a collection of ideas. On that note, I'd also recommend Videodrome.

edit: There are also more polemic anti-tech presentations of his ideas, especially by Neil Postman or Nicholas Carr which are good in their own way. But to me the fascinating thing about McLuhan himself is his dedication to presenting his views in a such a matter-of-fact way that most of his early followers were probably very antithetical to his personal beliefs.


First time I've seen a good argument for tabs over spaces. Richard Hendricks would be proud


+1 to servicability. It's hard to get someone who knows how to clean my minisplits. This looks really cool, but I'd need to be confident that I could maintain my units myself.


Probably he’s referring to zettelkasten systems.


OP hints at this - but the problem seems to be net metering lumps capacity payments in with the cost of power.

Some markets run a separate capacity market that rewards power generators explicitly for their capacity - independently of whether they actually generate any electricity. (California's market (CAISO) doesn't do this)

A long time ago I was involved in setting capacity market prices if y'all have follow up questions.


Speaking of CAISO they have a cool website with electric prices for much of the western US http://www.caiso.com/TodaysOutlook/Pages/prices.aspx


My utility charges separate amounts for generation and for distribution. In theory (I don't have solar), the electricity generated by the rooftop panels should be compensated at the generation rate. The the utility would then charge the consuming customer the distribution rate.


SCE and PG&E both separate out delivery vs. generation costs, and net metering only compensates you for the generation costs, but (per other comments I see here) the delivery costs are laughably low.


Writing is useful even if nobody reads it. Writing clarifies and sharpens my thinking. I have ideas I wouldn't otherwise have.

I wrote for the void for a long time. At the time, some folks on my immediate team found it useful. Now, a few years later, I'm still referencing those posts.

The important hard work was actually writing and polishing the idea until it was good enough to publish.


Agreed. I currently publish a bit of writing about my software engineering opinions to a website that only a couple of my non-software engineer friends know about. It doesn't make much sense to them, but their playful criticisms help me hone my ideas and hopefully simplify my writing (something I have a big problem with).


Thanks for the note and I'm glad the piece was useful!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: