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

Kudos to making this self-hosted. So very much appreciated!


> I have a secret that I use to keep myself healthy

Whats your secret?


I promise I’m not trying to sound like a jackass. But I’ve been told that my secret is offensive to some people. But it’s the same secret I’ve used to quit all of the bad habits in my life and also pivot from a ~20 year career in manual labor to a successful software engineering career.

My secret is “self respect.”

That’s all I used.


I'm trying to take you at your word that you aren't trying to be a jackass, but I'm honestly having a really hard time reading this another way so I'll ask:

Are you saying that overweight people lack self-respect?


It is a somewhat laconic presentation, but what I take Hollywood to mean is that hen values hens future self more than hens current impulses, and applies constant vigilance to succeed at it.

It gets somewhat preachy to promote that one should practice delayed gratification instead of YOLO.


Yes. I'm saying that all poor behavior stems from a lack of self respect.


Not that this is really news at this point but halting funds that have already been approved by congress (if I'm understanding this right) is exactly the violation of separation of powers. Once its finally challenged in court, and I guess assuming it is struck down, do all these executive defunding orders just all go away or does every single one have to be challenged separately? What a huge waste of time.


Americans at least are statistically lonelier now than they were before and it has a measurable negative effect on health.

https://www.pbs.org/newshour/show/why-americans-are-lonelier...


Is there a guide somewhere for someone that has used mongodb before but is new to postgres on how to map the first to the second? Would love to try some of this out, but the complexity is a little daunting.


The SQL can look a bit complex at first, and advanced queries can look complex, but MongoDB is quite limited what operations you can do with it, so the SQL queries that correspond to MongoDB operations are fairly simple.

Here's a documentation from MongoDB which could be used the other way as well: http://docs.mongodb.org/manual/reference/sql-comparison/

For normal use you really need 4 operations:

SELECT - query data

INSERT - inserting data

UPDATE - modifying existing data

DELETE - remove data

Everything else is either used for database maintenance or DDL (Data Definition Language, defining how the data is stored) commands.

The DDL is the main reason why some organization are considering using MongoDB, they believe that by removing the schema (definition how data is stored) they will get more flexibility, the problem with it is that if you use MongoDB you still will have schema, the issue is that the schema will be enforced by your application. And if you don't enforce the structure you'll end up with quite a mess, and very complex code.

Also if you use Java (or JVM based language) there are many frameworks that supposed to help interacting with database each has their strengths and weaknesses. There's one called JOOQ[1] that allows you to write SQL queries in Java in a way very similar to MongoDB.

Edit: There's also article about MongoDB aggregate functions and equivalent PostgreSQL: http://tapoueh.org/blog/2014/02/17-aggregating-nba-data-Post...

[1] http://www.jooq.org/


I was in this exact situation two weeks ago. Because Mongo databases tend to have an implicit schema, I used variety.js (https://github.com/variety/variety) to first uncover it for a given collection. I then hand-created a SQL table that corresponds to said collection, using variety.js's output as a guide for what types to use.


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

Search: