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
hepatizon
Oct 27, 2010

Brecht posted:

context-destroying façade of an ORM.

:madmax:

I think people are kind of overlooking the O part of ORM. They don't just construct a SELECT, they handle the boring process of converting results into useful objects, which is cool if you're not just dumping results to a page.

Also, no ORM aims to totally abstract a complex subquery. The point of wrapping a SELECT is that the majority of queries in the majority of applications are brainless boilerplate and the programmer shouldn't even have to think about how they're constructed, any more than they should have write i = 0; i++ in a foreach.

Adbot
ADBOT LOVES YOU

hepatizon
Oct 27, 2010

tef posted:

should we start a orm/sql apologist thread? it's like tabs vs spaces in here

More like HLL vs assembly.

hepatizon
Oct 27, 2010

npe posted:

code:
if(message.equals(null))
{
  throw new Exception("The Message was NULL");
}
:downs: defensive programming

Is this just about using Exception instead of NullPointerException, or is there an additional horror?

hepatizon
Oct 27, 2010

yaoi prophet posted:

If message is null, message.equals(null) will throw a null pointer exception.

Oh ouch. I'll probably be doing poo poo like that if I ever go back to Java from Ruby.

hepatizon
Oct 27, 2010

Mr. Crow posted:

code:
            //Make sure enddate is formatted correctly
            EndDate = EndDate.Date;
:what:

Please tell me I'm stupid and there's some bizarre case where this makes sense.

I frequently do that (in Ruby) to handle values that could be either a datetime or date.

hepatizon
Oct 27, 2010

That Turkey Story posted:

If you're manually using new and delete for dynamic memory allocation in modern C++, you're probably missing a better alternative in the standard library and/or boost.

The use of "probably" kinda sums up the whole problem.

hepatizon
Oct 27, 2010

how!! posted:

I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable.

Indistinguishable to people who are too loving stupid to read the code.

Adbot
ADBOT LOVES YOU

hepatizon
Oct 27, 2010

Nickopops posted:

not a great MATLAB coder

Nice tautology you got there.

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