Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
The longer I work in the industry the more I come to expect that "senior developer/engineer" often means little more than "someone who's managed to stick along long enough to no longer really warrant JUST a 'developer' tag"
-
@angryJavaDev Exactly! What's funny about this guy, he's been at this gig for three years, and it's his first job as a developer.
-
ds12391718ySo I just found out that you are supposed to do that, because databases don't support bools
-
@tomcentrate no, he set it as character varying but treats it as a boolean in his code. My best guess as to why is because the pgdb driver for php returns booleans as a string of "t" or "f".
-
ds12391718y@bryansrhodes I actually just talked to someone who works with databases. He said that in a very large portion of databases, there are no Booleans, so they need to use a char
-
@ds1239 that's about right in a lot of databases, for MySQL, I usually use tinyint, and use 0 and 1.
SQL Server uses a BIT Field for 0, 1
in Postgres' documentation online, there is a database column type of boolean, that translates 't', 'TRUE', 'y' and 1 as a true state. -
@ds1239 Yeah, I figured that when I saw your reply but I still had to go look it up. Even then my OCDs say to use the boolean so I can look at it and know how to interact with it, haha.
I saw a self called "senior developer" store a boolean as a "t" or "f" in a character varying with a max of one character in our postgres database. wtf
undefined