Recent submissions

Comment · 4 years ago
nil
Comment · 5 years ago
amavis

All email is perl.

Comment · 5 years ago
in postgres you can do

SELECT a.this, b.that FROM a, b WHERE a.id = b.a_id;

it just implies SELECT ... FROM a LEFT JOIN b ON(true) WHERE ...

Comment · 5 years ago
it only matters when you quote the column name. SELECT a."This_Col" = b.this_col FROM table a JOIN "Table" b;
Comment · 5 years ago
rfc2822
Comment · 6 years ago
sql is the language of the gods
Comment · 6 years ago
two things 1) leading commas in SQL 2) RAISE an EXCEPTION or RETURN --no more `else` statements in code

SELECT this , that , something FROM table

takes a while to get used to

Comment · 7 years ago
yeh, it is quite a bit cheaper. However, heroku is more aggressive in throttling the cheap stuff. I still use it for ci though. AWS simply offers more granular control and a more robust infrastructure. If you dig down into it, you'll see heroku is actually running on AWS.
Comment · 7 years ago
cakePHP on EC2 + postgres on RDS is nice. toss in some Redis caching and feed it traffic from a load balancer. you can get a lot done with very little effort.
Comment · 7 years ago
to be productive, you have to minimize the need to rtfm, but you should also be cognizant of any new implementations -- a refresher may sometimes provide a better way.

I recently stumbled on the postgres method jsonb_insert(jsonb,path,value) which is much more elegant than jsonb_set(jsonb,path,jsonb||value) when you just want to add a thing to some json array inside an object.

I hadn't really looked at the docs much since 9.x, I deal with jsonb everyday, so I had what I needed memorized. But despite keeping my installs updated, I had been doing it the hard way for way too long.

Comment · 7 years ago
yeh... but, we sorta live and die by the evidence. We can't just blindly assume OP is correct. Thankfully, OP knew that and saved us the hassle or typing it ourselves.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton