TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sensible Defaults

74 pointsby amjithalmost 8 years ago

6 comments

eriknstralmost 8 years ago
Filling the indent area with dots is not a sensible default IMO. Often when I work on a query I am going to reuse it in an application. If PgAdmin III or psql filled the indent area with dots then they would be included when I copied the query I&#x27;d written.<p>Even though I always reformat the query, and even though the text editor I use -- vim &#x2F; neo-vim -- supports rectangular text selection, I would be annoyed at such dots.
评论 #14795721 未加载
评论 #14794581 未加载
oftenwrongalmost 8 years ago
Beyond &quot;sensible defaults&quot;, it&#x27;s also important to have the defaults specified sensibly. For robust application development, mainly when working with large software systems, I find it best to disallow &quot;unset&quot; configuration options and the implicit behaviour they entail. That is, every option must have its setting explicitly specified in the configuration. The defaults should exist as a &quot;full&quot; configuration, similar to the configuration file pgcli comes with. Unset configuration options result in a runtime error during application startup.<p>Also, I believe I first heard of pgcli from an HN comment, and since then I have been a daily user of it.
flgralmost 8 years ago
<p><pre><code> Expanded mode in psql is a way to output the results of a query if the output is too wide to fit in the screen when shown as a table. This can be toggled by \x on or \x off. [...] In pgcli, we have the ability to do this but this is not enabled by default. It has to be enabled via the config file (~&#x2F;.config&#x2F;pgcli&#x2F;config) by the user. I don&#x27;t think we&#x27;ll change this behavior. </code></pre> Why not? Seems quite sensible a thing to do when the output otherwise wouldn&#x27;t fit.
评论 #14797924 未加载
logicalleealmost 8 years ago
This is a serious, genuinely curious and open-ended comment - I&#x27;m not arguing for a position here or making a point and can accept any response.<p>Do people here think the world would be a better place if installing something didn&#x27;t require reading any documentation (not even 45 minutes of it) or necessarily spend any time making choices?<p>For example, if it were possible to requisition a new AWS instance and install a Ruby on Rails configuration with &quot;sensible&quot; defaults on it, in, say, &lt; 30 seconds, and it being secure and properly configured so that a newbie without any experience can immediately deploy apps on it securely and without understanding the parts involved or making choices?<p>I can see arguments for both sides.
评论 #14798024 未加载
评论 #14796278 未加载
gleennalmost 8 years ago
Actually a really nice command-line interface with autocomplete to postgres. I&#x27;m usually rapidly dissappointed with all the GUI offerings to Postgres so this is a breath of fresh air. Defaults definitely seemed reasonable as per TFA
评论 #14795059 未加载
Animatsalmost 8 years ago
Oh, for a command-line SQL client.<p>I was expecting this to be about web pages.<p>&quot;Yes, of course I want to sign up for your &quot;newsletter&quot; offering me the latest deals every hour on the hour!&quot; Click on the invisible x to opt out. (Very Facebook.)