Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Opinion Haver
Apr 9, 2007

ymgve posted:

Personally, I'd use 4999-01-01 instead. So even if someone for some reason tries to add dates together, it still won't overflow.

As opposed to the well-defined behavior you'd get otherwise?

Adbot
ADBOT LOVES YOU

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Flobbster posted:

I'm working on a Rails app right now where having well-defined infinity values instead of null would be great. Assignments in the database have three dates associated with them: opens_at, due_at, and closes_at. It would be great if opens_at could default to "the beginning of time" and due_at/closes_at could default to "the end of time" for assignments that should remain accessible for ever.

Right now my code has a bunch of "if date && date < other_date" because of the possibility of null. Null sucks, and special cases suck.

My old university's self service system used to spit out pages with phrases like "Valid from 2006-05-12 to The End of Time." It was quite amusing and I assume a result of an underlying system with values like that defined.

zootm
Aug 8, 2006

We used to be better friends.

ohgodwhat posted:

But what if they try to add three or more of them together??? :v:
Clearly all days should be 0001-01-01, in case someone starts multiplying them.

Pardot
Jul 25, 2001




Flobbster posted:

I'm working on a Rails app right now where having well-defined infinity values instead of null would be great. Assignments in the database have three dates associated with them: opens_at, due_at, and closes_at. It would be great if opens_at could default to "the beginning of time" and due_at/closes_at could default to "the end of time" for assignments that should remain accessible for ever.

Right now my code has a bunch of "if date && date < other_date" because of the possibility of null. Null sucks, and special cases suck.

If you use Sequel you can deal with infinite dates pretty easy. Also sequel owns in general. https://github.com/jeremyevans/sequel/blob/master/spec/adapters/postgres_spec.rb#L466-L482

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

Pardot posted:

If you use Sequel you can deal with infinite dates pretty easy. Also sequel owns in general. https://github.com/jeremyevans/sequel/blob/master/spec/adapters/postgres_spec.rb#L466-L482

I was trying to avoid mentioning the shame that I'm using MySQL for this, not Postgres :sigh:

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Has anybody else ran into people using Windows .INI file format for everything? I can't be the only one.

1337JiveTurkey
Feb 17, 2005

Rocko Bonaparte posted:

Has anybody else ran into people using Windows .INI file format for everything? I can't be the only one.

I see a lot of Java .properties files used for everything which are pretty similar.

Catalyst-proof
May 11, 2011

better waste some time with you

Pardot posted:

If you use Sequel you can deal with infinite dates pretty easy. Also sequel owns in general. https://github.com/jeremyevans/sequel/blob/master/spec/adapters/postgres_spec.rb#L466-L482

Sequel owns so much. It's one of the few things that makes me miss programming in Ruby. Rails used to be one of those things, but then... omakase.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
I'm going to be honest, I have a soft spot for key=value file formats for configuration that you actually expect people to change by hand. XML can go gently caress itself.

It'd be pretty dumb to use it for anything that isn't configuration, though.

nielsm
Jun 1, 2009



INI files are great for simple configuration stuff. For more complex configuration things like JSON or Yaml are better. (Never use XML.)

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
IMO, INI files are superior to JSON and YAML for end-user editable config files as it's harder for the user to create a syntax error. Really though, as long as your parser wasn't done by an ~omakase chef~ who serves pufferfish with the liver left in,

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

WHOIS John Galt posted:

Rails used to be one of those things, but then... omakase.

What is it that makes people feel this way? When I started up I glanced at Ruby but ended up settling with Python. What on earth are they talking about when they say omakase, I read the article but what is it exactly that has made the community so repellent for some, too opinionated, too resistant to change?

nielsm
Jun 1, 2009



"Omakase" in the context of Japanese restaurants is letting the chef decide the menu, "the chef knows best". In other words, "the Rails way or the highway." (Not everything is suited to be transported by train! Except Rails is much less flexible than that comparison would let you think.)

Doctor w-rw-rw-
Jun 24, 2008

Maluco Marinero posted:

What is it that makes people feel this way? When I started up I glanced at Ruby but ended up settling with Python. What on earth are they talking about when they say omakase, I read the article but what is it exactly that has made the community so repellent for some, too opinionated, too resistant to change?

For me, it's the smug superiority and pretentious insistence from the top that they know what's best that puts me off. I quote from DHH's omakase post:

quote:

Rails is not that. Rails is omakase. A team of chefs picked out the ingredients, designed the APIs, and arranged the order of consumption on your behalf according to their idea of what would make for a tasty full-stack framework. The menu can be both personal and quirky. It isn't designed to appeal to the taste of everyone, everywhere.

emphasis mine:

quote:

This rubs some people the wrong way. "But my opinion is as valid as yours!". No, really, it's not. Your opinion is valid for you, but most certainly not for the menu I've designed in this restaurant. The power you always have is to vote with your feet. If most things on the menu disgust you, what on earth are you still doing at the table? The door is right over there, try not to slam it on your way out.

Basically "If you don't agree, :frogout:. We don't care about you."
Python is way more welcoming than that, and from my time on a bay area mailing list for Python (BayPiggies if anyone's familiar), far more accepting of new ideas and dumb questions instead of posturing for credibility in whatever thing they claim to be experts at.

Yehuda Katz also spoke at my college and I had the opportunity to talk with him a bit and found his tendency towards arrogance unpleasant. Some would say that their arrogance is deserved, and certainly they don't encompass the Ruby community, but they sure as hell represent it.

Toady
Jan 12, 2009

Maluco Marinero posted:

What is it that makes people feel this way? When I started up I glanced at Ruby but ended up settling with Python. What on earth are they talking about when they say omakase, I read the article but what is it exactly that has made the community so repellent for some, too opinionated, too resistant to change?

The community has a high level of ego and drama. People like Zed Shaw, David Hansson, even _why who draws cartoons and posts in riddles. It all seems so self-absorbed.

Bunny Cuddlin
Dec 12, 2004

Toady posted:

The community has a high level of ego and drama. People like Zed Shaw, David Hansson, even _why who draws cartoons and posts in riddles. It all seems so self-absorbed.

It is. There are people like this everywhere, and I can't stand them. Unfortunately, in this community, they're all the most important people, and it's impossible to avoid them. So gently caress it.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
The funniest thing about the omakase post is that it isn't even true. The "prime" stack is more popular with most experienced Rails devs these days, and very few projects stick with entirely the default stack.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





We are all customers at Dennys.

bobthecheese
Jun 7, 2006
Although I've never met Martha Stewart, I'll probably never birth her child.

Strong Sauce posted:

We are all customers at Dennys.

gently caress that, I'm a customer at that poorly run cafe which makes really tasty, healthy food, and they encourage you to pick your own ingredients, but half the time they're out of season. Also the menu is several years out of date.

Sure, the service is lovely, half the time you can't even get a basic sandwich, and no-one is able to tell you how you're meant to order (you're meant to just know already), but I still love it.

It's how the type of cafe I grew up with has always run.

bucketmouse
Aug 16, 2004

we con-trol the ho-ri-zon-tal
we con-trol the verrr-ti-cal
Personally I like to eat at mcdonalds except half the time there's no electricity, I can always hear a baby crying from somewhere even if the restaurant is completely empty, and one time I ordered fries and got half of a human head instead

actually no gently caress mcdonalds

Optimus Prime Ribs
Jul 25, 2007

bucketmouse posted:

Personally I like to eat at mcdonalds

C'mon now. McDonalds is pretty awful, but now you're just being mean. :(

kitten smoothie
Dec 29, 2001

I used to work on a team where my coworkers would try to take us all to eat at a place where the menu is in hieroglyphics, but understanding it is moot because no matter what you order, the food is spoiled.

Thesoro
Dec 6, 2005

YOU CANNOT LEARN
TO WHISTLE

Plorkyeran posted:

The funniest thing about the omakase post is that it isn't even true. The "prime" stack is more popular with most experienced Rails devs these days, and very few projects stick with entirely the default stack.
I just finished the Michael Hartl Rails tutorial and yeah, if it's any indicator of mainstream Rails then the omakase thing is kinda bunk. Hartl has you using PostgreSQL/SQlite, Rspec, and skinny models, i.e. half of the 'prime' stack.

Thesoro fucked around with this message at 04:57 on Feb 6, 2013

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
How do these Rails guys write something like the Omasake post and go "hm, yeah, that's a worthwhile article that I should post on the internet"

pseudorandom name
May 6, 2007

Because it gets upvotes on Hacker News.

bobthecheese
Jun 7, 2006
Although I've never met Martha Stewart, I'll probably never birth her child.

pseudorandom name posted:

Because it gets upvotes on Hacker News.

But that's the only valid public forum! THE ONLY VALID ONE!

pseudorandom name
May 6, 2007

Not for long, Jeff Atwood is poised to change the world with his revolutionary new forum software, Discourse!

b0lt
Apr 29, 2005

I've heard of people who eat their own feces and enjoy it.

Bunny Cuddlin
Dec 12, 2004

pseudorandom name posted:

Not for long, Jeff Atwood is poised to change the world with his revolutionary new forum software, Discourse!

I can't wait to see the insightful, high level exploratory articles that come out of this effort like "A Little Known SQL Feature: The Outer Join" and "What ARE Css Selectors?"

pseudorandom name
May 6, 2007

I take it you missed it when he showed up in SHSC and later YOSPOS to ask what makes a good forum, and then proceeded to ignore everything anyone had to say?

het
Nov 14, 2002

A dark black past
is my most valued
possession
Wow, uh, that's impressive.

shrughes
Oct 11, 2008

(call/cc call/cc)

pseudorandom name posted:

I take it you missed it when he showed up in SHSC and later YOSPOS to ask what makes a good forum, and then proceeded to ignore everything anyone had to say?

Wait, YOSPOS? Seriously?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

het posted:

Wow, uh, that's impressive.

"Pipelines is our internal and proprietary web development platform -- written on top of Perl, of course. Call it a template language if you must, but basically it automates away 90% of typical web development -- connecting to the database, user logins, security, user preferences, et cetera. It also throws umbrella features over everything. It's really cool. Code repositories and version control are gone. We work on live sites (Pipelines protects us from stupidity), never document code (it's legible, that's the point), and focus on the client's business requirements. We sell them the flexibility upon which they depend."

Holy poo poo. Hahaha.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
For two years I frequented a restaurant serving raw sewage

tef
May 30, 2004

-> some l-system crap ->

shrughes posted:

Wait, YOSPOS? Seriously?

Yep. He got a little sad when people told him he should have died in a car accident.

omeg
Sep 3, 2012

Maluco Marinero posted:

"Pipelines is our internal and proprietary web development platform -- written on top of Perl, of course. Call it a template language if you must, but basically it automates away 90% of typical web development -- connecting to the database, user logins, security, user preferences, et cetera. It also throws umbrella features over everything. It's really cool. Code repositories and version control are gone. We work on live sites (Pipelines protects us from stupidity), never document code (it's legible, that's the point), and focus on the client's business requirements. We sell them the flexibility upon which they depend."

Holy poo poo. Hahaha.

:stare:
hahaohwow.jpg

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
http://holophrasticenterprises.com/

"hm, why did this take so long to load? it's just a logo"

Bobbin Threadbear
May 6, 2007

Suspicious Dish posted:

http://holophrasticenterprises.com/

"hm, why did this take so long to load? it's just a logo"

This must be some kind of reverse golfing.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Suspicious Dish posted:

http://holophrasticenterprises.com/

"hm, why did this take so long to load? it's just a logo"

Holy poo poo when I was a literal child I actually applied for a job with this place.

Adbot
ADBOT LOVES YOU

Posting Principle
Dec 10, 2011

by Ralp
The joys od modern web development. At least they put it all in one file to save requests.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply