News for hackers. Stuff that matters.

pilotdeveloper

Re:Show HN: Pg_yregress, Structured Testing for Postgres on Sunday October 15, 2023 @05:17PM (#37893466)
How does this compares to pgTAP? I've been using pgTAP for a long time, how is this better?
Re:Is ORM still an anti-pattern? on Monday July 03, 2023 @01:33PM (#36576288)
I think I expressed myself in a confusing manner. I write _SQL_ for migrations and nothing else. What I meant was that in order to _run_ the migrations it's enough to have a simple bash script of a few lines (which basically calls psql, ls and feeds the sql migration files in order).

I don't use jsonb with migrations. My migration files look like

migrations/1645698230_create_orders.sql create table orders (.... );

migrations/164595623_setup_some_trigger.sql create trigger...

--------

In response to "Elimination of boilerplate to load data from a table into a type"

Unrelatedly to migrations, when working with postgres, I use postgres'json capabilites to get nice nested structures that I can convert to any other language easily (or even send it to the browser if serving a webpage). Instead of using tabular responses, I get json structures _directly_ from postgresql.

Very often I just write SQL queries that return a single row with a single json/jsonb field that has the whole JSON response to be served to a web endpoint. Basically I write most if not all my webservice in SQL. And I just have a very thin layer of a server language to work as a proxy between a frontend application and my database application (written in SQL).

Re:Is ORM still an anti-pattern? on Wednesday June 28, 2023 @06:54AM (#36504742)
1) I'm querying JSONb for that from postgresql and then the conversion to Ruby types is trivial. 2) Parameterized queries and you don't have SQL injection 3) The migration tool is a script of a few lines (bash in my case). It has a "migrations" table, it reads a list of migration files in a migration dir, check which ones don't exist in the migrations table and runs them in order. A migration file is just a .sql file

My whole setup is a few lines of code. A very small library covering the first two, a small script for the third one.

Re:Ask HN: What's your opinion on weekly 1:1s? on Friday June 09, 2023 @03:22AM (#36254463)
In my experience, most of the time they are either (1) a waste of time or (2) a place to play politics.

Ask HN: A manager to get me interviews?

I'm a software developer with +13 years of experience, worked as a Principal-Staff Engineer/Tech Lead/etc. Lately I've been working as a contractor for the US but my contract ends soon.I never looked for a job in my life, offers always arrived (mostly via Linkedin) but the situation looks different now, and I don't want to go blindly applying and filling forms that people don't even read (I've...

( Read More... | 1 comment | on HN )
Re:Ask HN: Has anyone started over outside of tech? on Friday March 03, 2023 @03:21PM (#35014535)
It's also possible to go to a cheap country to build hours on your bill and getting there faster. In Argentina you could get a wet hour of a Cessna 150 for $50. 1500 hours is 75Kusd. In two o three years you could be there
Re:Ask HN: Has anyone started over outside of tech? on Friday March 03, 2023 @03:13PM (#35014444)
I'm in the process of switching careers _again_. I come from a different background and I moved to Software development ~10 years ago. I'm a skydiving instructor and also a commercial pilot and trying to find out which kind of pilot I want to be (avoiding the airlines, looking for bush flying, firefighting, etc). Life is too much fun to have only one career