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
Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Munkeymon posted:

Do yourself a favor and don't look into the intermediate code the C# compiler generates to support all the neat language features that have been bolted on since 2.0

You could say the same thing about machine code generated by literally any compiler in existence. It doesn't matter what the code gets turned into, just what the actual behavior is.

(And yes, IL is machine code.)

Adbot
ADBOT LOVES YOU

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"
code:
#include <stdio.h>

int main()
{
        int x = 10//* foo */2 + 2
        ;   
        printf("%d\n", x); 
        return 0;
}

Scaevolus
Apr 16, 2007

What's the horror?

Shavnir
Apr 5, 2005

A MAN'S DREAM CAN NEVER DIE

Scaevolus posted:

What's the horror?

Putting semicolons on the next line.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Scaevolus posted:

What's the horror?
It's standards-compliant code that has different output depending on whether the compiler is in C89 or C99 mode.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Janin posted:

It's standards-compliant code that has different output depending on whether the compiler is in C89 or C99 mode.

That's not a horror, it's a specification check at runtime.

HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance

king_kilr posted:

If you think about how += should be implemented on immutable objects for about a quarter of a second you'd figure it out.

Eric Lippert posted about this exact problem today.

litghost
May 26, 2004
Builder

HORATIO HORNBLOWER posted:

Eric Lippert posted about this exact problem today.

For once I think C++ has the right idea here. += is not the same operator as +. You can create a correct + from +=, you cannot create += from +. So the solution is simply for everyone to define the mutable operator (+=) to defined the non-mutable operator. If the object is immutable, simply don't define +=.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Ryouga Inverse posted:

You could say the same thing about machine code generated by literally any compiler in existence. It doesn't matter what the code gets turned into, just what the actual behavior is.

(And yes, IL is machine code.)

I wasn't talking about IL.

Lexical Unit
Sep 16, 2003

So my boss comes into my office the other day and says that we've sold some Canadian group on our display system. They only have one request, that we change all Imperial units to SI. This is a nightmare because there's no structure or coherence to any of the GUIs we write. Each display and each dialog window is the pet project of someone, some single person, who works on it alone with no peer review, and no standards to guide them.

But I shouldn't fear because my boss has the solution! He picked up a dry erase marker and wrote this on my white board:

ENV_VAR_UNITS_CONVERSION_FACTOR="0.9144"

The solution is so obvious!

Opinion Haver
Apr 9, 2007

Lexical Unit posted:

So my boss comes into my office the other day and says that we've sold some Canadian group on our display system. They only have one request, that we change all Imperial units to SI. This is a nightmare because there's no structure or coherence to any of the GUIs we write. Each display and each dialog window is the pet project of someone, some single person, who works on it alone with no peer review, and no standards to guide them.

But I shouldn't fear because my boss has the solution! He picked up a dry erase marker and wrote this on my white board:

ENV_VAR_UNITS_CONVERSION_FACTOR="0.9144"

The solution is so obvious!

I... what? What the gently caress does that even convert?

mr_jim
Oct 30, 2006

OUT OF THE DARK

ENV_VAR_UNITS, duh.

NotShadowStar
Sep 20, 2000

Lexical Unit posted:

So my boss comes into my office the other day and says that we've sold some Canadian group on our display system. They only have one request, that we change all Imperial units to SI. This is a nightmare because there's no structure or coherence to any of the GUIs we write. Each display and each dialog window is the pet project of someone, some single person, who works on it alone with no peer review, and no standards to guide them.

But I shouldn't fear because my boss has the solution! He picked up a dry erase marker and wrote this on my white board:

ENV_VAR_UNITS_CONVERSION_FACTOR="0.9144"

The solution is so obvious!

Sorry about your floating point future hell.

Thel
Apr 28, 2010

Lexical Unit posted:

So my boss comes into my office the other day and says that we've sold some Canadian group on our display system. They only have one request, that we change all Imperial units to SI. This is a nightmare because there's no structure or coherence to any of the GUIs we write. Each display and each dialog window is the pet project of someone, some single person, who works on it alone with no peer review, and no standards to guide them.

But I shouldn't fear because my boss has the solution! He picked up a dry erase marker and wrote this on my white board:

ENV_VAR_UNITS_CONVERSION_FACTOR="0.9144"

The solution is so obvious!

Oh god. Your life just went to hell in a handbasket. :gonk:

(also, it's 1 yard = 0.9144 metres.)

Contra Duck
Nov 4, 2004

#1 DAD
code:
screenField_disabled=not(not(item.isViewOnly))
I have found 21 of these so far :(

BigRedDot
Mar 6, 2008

Thel posted:

Oh god. Your life just went to hell in a handbasket. :gonk:
I work down the hall, I can assure you that we've already been trundled off to hell, and in much less pleasant accommodations, long long ago. Judged on a scale calibrated to the usual bright ideas at our workplace, this one barely moves the needle.

Lexical Unit
Sep 16, 2003

NotShadowStar posted:

Sorry about your floating point future hell.

Thank gord my boss doesn't work in finances, because I'm sure he'd use floats to store money. Instead he works in the defense industry where things like "quality" and "corectness" are of no real concern.

Thel
Apr 28, 2010

BigRedDot posted:

I work down the hall, I can assure you that we've already been trundled off to hell, and in much less pleasant accommodations, long long ago. Judged on a scale calibrated to the usual bright ideas at our workplace, this one barely moves the needle.

I ... just .... what?


Anyway, I only just noticed that that "conversion factor" was written up as a string also. :what:

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
http://jtcfrost.svn.sourceforge.net...in&pathrev=2865

I'd better comment this out in case anyone needs it later!

*Commits code to SVN repo*

:downs:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Munkeymon posted:

I wasn't talking about IL.

Well, the intermediate C# code generated to support lambdas and stuff is still generated code. Just another pass of the compiler. Generated code isn't a horror if you don't ever have to edit it.

Frontpage did not follow this rule.

ToxicFrog
Apr 26, 2008


Lexical Unit posted:

:gonk:

This wouldn't be a problem if you used SI to begin with like all right-thinking people do. :colbert:

Seriously though, I'm so sorry.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Lexical Unit posted:

They only have one request, that we change all Imperial units to SI. This is a nightmare...

Calmly explain to your boss or the customer that this is how spacecraft explode.

BigRedDot
Mar 6, 2008

pokeyman posted:

Calmly explain to your boss or the customer that this is how spacecraft explode.
Implosion would be more likely in this instance, but the stands. :)

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Ryouga Inverse posted:

Well, the intermediate C# code generated to support lambdas and stuff is still generated code. Just another pass of the compiler. Generated code isn't a horror if you don't ever have to edit it.

I thought he was complaining about the Python pseudocode that explained the weird behavior being ugly, which it was, but it wasn't exactly something people would normally see or even write.

revmoo
May 25, 2006

#basta
I just had a web dev interview where the guy spent 5+ mins insulting my work and portfolio. He said it didn't have any CSS at all. This is a huge company that you're all familiar with.

Just for kicks I ran the W3C validator on the subsection of the site he is responsible for:

quote:

132 Errors, 77 warning(s)

On XHTML 1.0 Transitional doctype. And these are basic, obvious mistakes, not kludges but downright fuckups.

(I don't release a site to a client until it validates XHTML 1.0 Strict)

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

revmoo posted:



(I don't release a site to a client until it validates XHTML 1.0 Strict)

Why are you still using that DOCTYPE? :v:

revmoo
May 25, 2006

#basta
What in the world is wrong with that doctype?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

revmoo posted:

What in the world is wrong with that doctype?

It's depreciated, and if you want to actually use any feature of HTML5, your stuff won't validate any more? What features of XHTML Strict do you actually need?

Lumpy fucked around with this message at 18:44 on Mar 31, 2011

revmoo
May 25, 2006

#basta

Lumpy posted:

It's depreciated, and if you want to actually use any feature of HTML5, your stuff won't validate any more? What features of XHTML Strict do you actually need?

Deprecated in favor of HTML5? I'm not switching to HTML5 until IE catches up.

nielsm
Jun 1, 2009



Also the HTML 5 doctype is so much easier to remember:

<!DOCTYPE html>

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

revmoo posted:

Deprecated in favor of HTML5? I'm not switching to HTML5 until IE catches up.

"catches up" with what? IE6 renders pages perfectly fine using the HTML5 doctype. I suspect you are a little unsure on what a Doctype is and does. <!DOCTYPE html> puts IE6 into standards mode exactly like XHTML 1.0 strict.

A note on IE6 and HTML5: http://ejohn.org/blog/html5-doctype/
EDIT: and another: http://diveintohtml5.org/semantics.html

revmoo
May 25, 2006

#basta
Fair enough, I just don't really like the idea of declaring html5 if I'm not using any of its features. I see your points though.

qntm
Jun 17, 2009

revmoo posted:

132 Errors, 77 warning(s)

To be fair, one unclosed paragraph tag can result in 1 error for every following paragraph, so you can cause 100 errors with one mistake quite easily.

Also, since when is XHTML 1.0 Strict deprecated?

Zombywuf
Mar 29, 2008

Lumpy posted:

"catches up" with what? IE6 renders pages perfectly fine using the HTML5 doctype. I suspect you are a little unsure on what a Doctype is and does. <!DOCTYPE html> puts IE6 into standards mode exactly like XHTML 1.0 strict.
You do know that html5 and XHTML 1.0 are two separate languages right? Standards mode for the one is therefore not standards mode for the other. The clue is in how they have different names.

quote:

A note on IE6 and HTML5: http://ejohn.org/blog/html5-doctype/
EDIT: and another: http://diveintohtml5.org/semantics.html

And MS will be backporting support for html 5 from IE8 to IE6 when exactly?


EDIT: Also just wanting to reiterate the question, when did XHTML get deprecated?

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

Zombywuf posted:

EDIT: Also just wanting to reiterate the question, when did XHTML get deprecated?

When the working group for XHTML2 got disbanded and HTML5 was declared the successor to XHTML 1.1

Zombywuf
Mar 29, 2008

Otto Skorzeny posted:

When the working group for XHTML2 got disbanded and HTML5 was declared the successor to XHTML 1.1

And XHTML was deprecated when? You seem to be claiming the iPhone has been deprecated because of the iPad.

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

Zombywuf posted:

And XHTML was deprecated when? You seem to be claiming the iPhone has been deprecated because of the iPad.

No, I'm claiming something analagous to the iphone 3gs being deprecated in favor of the iphone 4.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
I don't like HTML5 because it's a living standard. :colbert:

NotShadowStar
Sep 20, 2000
There's no reason not to use
pre:
<!DOCTYPE html>
on a new site unless you need to do import XML terms for something like FBML (and even then Facebook says 'don't use this, use the Javascript API instead)

Hell even the new HTML semantic elements (time, article, section etc) work perfectly fine all the way back to IE6 if you do document.createElement for IE and display: block; for Firefox.

Adbot
ADBOT LOVES YOU

Zombywuf
Mar 29, 2008

NotShadowStar posted:

Hell even the new HTML semantic elements (time, article, section etc) work perfectly fine all the way back to IE6 if you do document.createElement for IE and display: block; for Firefox.

That is the very definition of not working perfectly fine.

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