I'm not sure this is a good thing Mercedes...

๐ŸŽ™๏ธ afterm ยท 1265 points ยท Posted at 21:33:18 on August 8, 2016 ยท (Permalink)


Saved comment

grapearls ยท 545 points ยท Posted at 21:55:09 on August 8, 2016 ยท (Permalink)

Jimi Hendrix used a 6 string guitar.

We use a 42 string one.

Obviously we are superior.

MaddTheSane ยท 189 points ยท Posted at 22:35:47 on August 8, 2016 ยท (Permalink)

"But we only use 7 strings, because the other 35 somehow cause the car to crash.

"We have yet to figure out why."

Nloveladyallen ยท 89 points ยท Posted at 11:29:13 on August 9, 2016 ยท (Permalink)

"But if we remove any of the other 35 strings, the car won't start."

kyl3r123 ยท 36 points ยท Posted at 12:31:56 on August 9, 2016 ยท (Permalink)
[deleted] ยท 49 points ยท Posted at 14:25:31 on August 9, 2016 ยท (Permalink)

Some one actually completed the project...

Here

jidouhanbaikiUA ยท 9 points ยท Posted at 17:45:12 on August 9, 2016 ยท (Permalink)

We need a bot for posting that.

kyl3r123 ยท 5 points ยท Posted at 19:47:42 on August 9, 2016 ยท (Permalink)

I think they stretched the goals a bit. Perpendicular means they are in 90ยฐ, which is impossible for more than 2 lines, because at least one would not be perpendicular to another. The way he did it is quiiite right, becuase they are in a 90ยฐ angle to each other, but also to itself and additionally at 0ยฐ to each other which is a bit of a paradoxon...

coltwitch ยท 18 points ยท Posted at 22:29:47 on August 9, 2016 ยท (Permalink)

I view convincing sales that what I delivered is what they asked for as part of my job.

Stop_Sign ยท 4 points ยท Posted at 02:32:43 on August 11, 2016 ยท (Permalink)

We consider 3 perpendicular lines on a sphere to be possible, so why not that?

arnedh ยท 2 points ยท Posted at 06:28:25 on August 11, 2016 ยท (Permalink)

You can add an additional perpendicular line if you add a dimension: put your line out at 90 degrees to reality.

Kurtoid ยท 1 points ยท Posted at 23:23:22 on August 14, 2016 ยท (Permalink)

Holy shit...

hobolow ยท 3 points ยท Posted at 18:03:45 on August 9, 2016 ยท (Permalink)

*brought to you by C++

Murzac ยท 9 points ยท Posted at 11:03:40 on August 9, 2016 ยท (Permalink)

Reminds me of how when I was a kid I thought that the more gears your bicycle had, the better it was.

NuclearRobotHamster ยท 14 points ยท Posted at 16:35:50 on August 9, 2016 ยท (Permalink)

Kinda true to be honest. If you measure goodness by top speed and acceleration

Prod_Is_For_Testing ยท 6 points ยท Posted at 17:27:33 on August 9, 2016 ยท (Permalink)

Not really. For nice road bikes, the people with 3 front sprockets get laughed at (most road bikes have 2 fronts). Granted, the third usually doesn't help with top speed

NuclearRobotHamster ยท 7 points ยท Posted at 19:52:07 on August 9, 2016 ยท (Permalink)

That's because anyone who cycles more than once a month doesn't need the lowest ratios to accelerate quickly or to climb hills.

Fingebimus ยท 3 points ยท Posted at 21:23:03 on August 9, 2016 ยท (Permalink)

3-7 all the time

fredinvisible ยท 1 points ยท Posted at 23:57:03 on August 10, 2016 ยท (Permalink)

Hey now, I vary between 3-5 and 3-9 I'll have you know!

Fingebimus ยท 1 points ยท Posted at 00:13:55 on August 11, 2016 ยท (Permalink)

My bike doesn't go heavier than 7. And my other ones only have 1-6. So sad. Want to go faster but move my legs less.

bumblebritches57 ยท 12 points ยท Posted at 11:20:35 on August 10, 2016 ยท (Permalink)

Who cares about road bikes tho? Obviously mountain bikes are superior...

Prod_Is_For_Testing ยท 16 points ยท Posted at 13:02:34 on August 10, 2016 ยท (Permalink)

Sir, I'll invite you to suck a dick

thespanishtongue ยท 10 points ยท Posted at 16:33:34 on August 10, 2016 ยท (Permalink)

While I decline your invitation, I will admit that some people could consider road bikes superior

lawl just kidding mountain bikes FTW

garboblaggar ยท 1 points ยท Posted at 00:45:53 on August 11, 2016 ยท (Permalink)

He already said he doesn't care about road bikes.

fb39ca4 ยท 3 points ยท Posted at 18:05:03 on August 9, 2016 ยท (Permalink)

I have a bike with 3 in the front, 6 in the back and I only ever use the top 2 and 5 in the front and back respectively.

ginglymus ยท 4 points ยท Posted at 22:54:05 on August 8, 2016 ยท (Permalink)
hamfraigaar ยท 1 points ยท Posted at 10:50:27 on August 11, 2016 ยท (Permalink)

Each string only plays one note. This makes it harder to play, so our melodies are obviously more complicated. We haven't figured out how chords work yet.

monster860 ยท 291 points ยท Posted at 23:08:55 on August 8, 2016 ยท (Permalink)

I too can make a file that has a million lines of

// comment 0,000,001
// comment 0,000,002
// comment 0,000,003
// comment 0,000,004
// comment 0,000,005
// .....
// comment 1,699,996
// comment 1,699,997
// comment 1,699,998
// comment 1,699,999
// comment 1,700,000
A_C_Fenderson ยท 241 points ยท Posted at 03:43:46 on August 9, 2016 ยท (Permalink)

And it doesn't have ANY bugs!

boarhog ยท 54 points ยท Posted at 04:41:36 on August 9, 2016 ยท (Permalink)

Now that depends on what the requirements were

f03nix ยท 125 points ยท Posted at 08:23:15 on August 9, 2016 ยท (Permalink)

Requirements:

  1. Need a million lines of code.
Ek_Los_Die_Hier ยท 22 points ยท Posted at 10:04:34 on August 9, 2016 ยท (Permalink)

Instructions unclear, 0 requirements?

Me4Prez ยท 5 points ยท Posted at 13:35:10 on August 9, 2016 ยท (Permalink)

Index starts with a 0

Ek_Los_Die_Hier ยท 11 points ยท Posted at 13:41:06 on August 9, 2016 ยท (Permalink)

I know. Was attempting a joke.

Me4Prez ยท 11 points ยท Posted at 13:49:39 on August 9, 2016 ยท (Permalink)

Oh... a whoosh for me then

Ek_Los_Die_Hier ยท 6 points ยท Posted at 13:55:48 on August 9, 2016 ยท (Permalink)

Haha no worries, it wasn't that good to be honest.

Bainos ยท 2 points ยท Posted at 16:01:50 on August 9, 2016 ยท (Permalink)

That was not required.

DrFapkinstein ยท 3 points ยท Posted at 23:12:23 on August 10, 2016 ยท (Permalink)

I too have done a program on occasion.

NSA_GOV ยท 1 points ยท Posted at 19:13:15 on August 11, 2016 ยท (Permalink)

unless you explicitly change the # base it starts at. I'm yet to find a reason to do this though.

KBWars ยท 2 points ยท Posted at 12:29:37 on August 9, 2016 ยท (Permalink)
  1. That does not crash a car.
RaxFTB ยท 6 points ยท Posted at 01:03:21 on August 10, 2016 ยท (Permalink)
-1. Causes car to crash on negative comment index.
NSA_GOV ยท 3 points ยท Posted at 13:11:22 on August 9, 2016 ยท (Permalink)

Requirements? HA!

boarhog ยท 1 points ยท Posted at 13:25:01 on August 9, 2016 ยท (Permalink)

Best joke in this thread ;)

flingerdu ยท 4 points ยท Posted at 09:41:37 on August 9, 2016 ยท (Permalink)

Unless you encouter a strange bug when deleting/changing comments destroys your code.

antaryon ยท 41 points ยท Posted at 06:16:31 on August 9, 2016 ยท (Permalink)

I can make a program that makes that file.

Dis446 ยท 43 points ยท Posted at 08:12:52 on August 9, 2016 ยท (Permalink)

I can make a program that makes the program that makes that file.

gogglechu ยท 51 points ยท Posted at 08:36:30 on August 9, 2016 ยท (Permalink)

I can make a program that makes all possible files. Eventually.

Dis446 ยท 27 points ยท Posted at 09:36:33 on August 9, 2016 ยท (Permalink)

And I will make a program that makes THAT program. Eventually.

[deleted] ยท 42 points ยท Posted at 11:53:36 on August 9, 2016 ยท (Permalink)

Wouldn't that just be a copy of /u/gogglechu 's program? (since a program consists of file(s), and /u/gogglechu 's program makes all possible files (eventually), it will (eventually) produce itself...)

Dis446 ยท 32 points ยท Posted at 11:55:44 on August 9, 2016 ยท (Permalink)

Unexpected recursion...

[deleted] ยท 14 points ยท Posted at 21:23:13 on August 10, 2016 ยท (Permalink)
ninonic99 ยท 8 points ยท Posted at 21:35:53 on August 10, 2016 ยท (Permalink)

My head...

Barbariandude ยท 9 points ยท Posted at 13:58:37 on August 9, 2016 ยท (Permalink)

Only one way to find out...

To the library of Babel!

gogglechu ยท 5 points ยท Posted at 03:33:01 on August 10, 2016 ยท (Permalink)

A sometimes-quine!

TotesMessenger ยท 2 points ยท Posted at 21:27:28 on August 10, 2016 ยท (Permalink)

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

jebediahatwork ยท 2 points ยท Posted at 15:44:05 on August 9, 2016 ยท (Permalink)

Gentleman we have achieved quine

A_C_Fenderson ยท 1 points ยท Posted at 06:44:17 on August 12, 2016 ยท (Permalink)

The binary digits of pi contain an .exe file that will make THAT program.

somebody12345678 ยท 4 points ยท Posted at 10:18:33 on August 10, 2016 ยท (Permalink)

Done:

function* everything() {
  let array = new Uint8Array([0]);
  while (1) {
    yield array;
    let i = array.length - 1;
    while (array[i] === 255)
      array[i--] = 0;
    if (i === -1)
      array = new Uint8Array(new Array(array.length + 1));
    else
      array[i]++;
  }
}

Usage, after pasting in browser console (Ctrl + Shift + I -> Console tab):

var everythingGenerator = everything();
everythingGenerator.next().value; //to get next value

Note: this doesn't actually create the file, I don't think anyone wants that

xerxesbeat ยท 2 points ยท Posted at 14:04:58 on August 9, 2016 ยท (Permalink)
TheCodingEthan ยท 8 points ยท Posted at 14:28:35 on August 9, 2016 ยท (Permalink)

uncompressed 35.6MB, 7z: 485KB, now that's a masterpiece of intelligence.

theOdysseyEffect ยท 3 points ยท Posted at 17:44:04 on August 10, 2016 ยท (Permalink)

To be fair it is the same line over and over and over. Compression gets easier the more you repeat yourself.

TheCodingEthan ยท 3 points ยท Posted at 20:55:02 on August 10, 2016 ยท (Permalink)

the comment was more about the fact that it wasn't compressed along with some humor from the post itself, rather than the capabilities of compression algorithms on text documents.

Sudo-Pseudonym ยท 2 points ยท Posted at 16:02:25 on August 10, 2016 ยท (Permalink)
for i in {1..1700000} ; do echo // comment $i >> perfectcode.cpp ; done    
lefthandpisces ยท 1 points ยท Posted at 19:51:56 on August 12, 2016 ยท (Permalink)

I can ride my bike with no handle bars.

[deleted] ยท 170 points ยท Posted at 23:02:42 on August 8, 2016 ยท (Permalink)

[deleted]

blazesquall ยท 142 points ยท Posted at 04:39:33 on August 9, 2016 ยท (Permalink)

A million lines covered? I wish..

I bet it's 40% compiled Matlab equations, 50% vendor supplied devices/busses from the lowest bidder, and 10% glue.

Some1-Somewhere ยท 145 points ยท Posted at 07:44:38 on August 9, 2016 ยท (Permalink)

Don't forget six different linux kernels, two copies of FFMPEG, and Chromium.

[deleted] ยท 100 points ยท Posted at 11:12:38 on August 9, 2016 ยท (Permalink)

We've thrown node.js and 11 secret herbs and spices in the mix too.

SketchySeaBeast ยท 56 points ยท Posted at 12:19:05 on August 9, 2016 ยท (Permalink)

I asked on the interwebs, they said I should include jQuery.

Bainos ยท 12 points ยท Posted at 16:05:50 on August 9, 2016 ยท (Permalink)

Don't forget the brainfuck interpreter.

somebody12345678 ยท 3 points ยท Posted at 10:22:35 on August 10, 2016 ยท (Permalink)

You mean Lenguage?

poiu45 ยท 3 points ยท Posted at 19:36:31 on August 10, 2016 ยท (Permalink)

Some part of me wanted that to be a langauged based on the Lenny face, and some part of me is dissapointed.

That aside, that is horrifying(ly amazing)

EternallyMiffed ยท 3 points ยท Posted at 23:43:06 on August 10, 2016 ยท (Permalink)

You know, you could take brainfuck and substitute Lenny and the Disaproving stare along with some other text memes in there. Throw in a unicode snowman for good measure.

kirmaster ยท 1 points ยท Posted at 10:44:00 on August 11, 2016 ยท (Permalink)

Ook does this to great effect.

Scriptorius ยท 1 points ยท Posted at 02:14:47 on August 11, 2016 ยท (Permalink)

A brainfuck interpreter is pretty short, though, maybe a couple dozen lines.

Gubru ยท 7 points ยท Posted at 15:47:12 on August 9, 2016 ยท (Permalink)

They're probably including code from their entertainment system, which likely includes all those things.

LiteNorsk ยท 6 points ยท Posted at 07:48:17 on August 9, 2016 ยท (Permalink)

I like that expression, glue. Is it commonly used?

jasmineearlgrey ยท 22 points ยท Posted at 07:51:35 on August 9, 2016 ยท (Permalink)
GregTheMad ยท 3 points ยท Posted at 15:35:43 on August 9, 2016 ยท (Permalink)
Insecure Code: 99%
dgiakoum ยท 173 points ยท Posted at 08:28:19 on August 9, 2016 ยท (Permalink)

"Ok guys. Marketing says we have to manually unroll all the loops"

is0lated ยท 56 points ยท Posted at 13:16:19 on August 9, 2016 ยท (Permalink)

Also, no setting integers to a value. Instead, we'll initialise it to 0 and use a bespoke for loop to increment it to the desired value, then we'll unroll that loop.

RuthBaderBelieveIt ยท 27 points ยท Posted at 14:10:19 on August 9, 2016 ยท (Permalink)

Also we're moving from this

if (hours < 24 && minutes < 60 && seconds < 60) {
    return true;
} else {
    return false;
}

to this

if  ( hours   < 24
    && minutes < 60
    && seconds < 60
)
{
    return true;
}
else
{
    return false;
}
GregTheMad ยท 21 points ยท Posted at 15:45:17 on August 9, 2016 ยท (Permalink)

You should use the following instead of your original code:

if (hours < 24 && minutes < 60 && seconds < 60) return true;
return false;

Not that there is anything wrong with your code, but this way you're expanding from 2 lines to 12 (+500%) instead of from 5 to 12 (+140%). Marketing will think you did 3,571428 times the work!

MrIndianTeem ยท 35 points ยท Posted at 16:01:32 on August 9, 2016 ยท (Permalink)

You can also expand one line to twelve if you start with:

return (hours < 24 && minutes < 60 && seconds < 60);

DavidFongs ยท 10 points ยท Posted at 16:01:44 on August 9, 2016 ยท (Permalink)

For maximum expansion he should start with:

return hours < 24 && minutes < 60 && seconds < 60
RuthBaderBelieveIt ยท 8 points ยท Posted at 16:02:07 on August 9, 2016 ยท (Permalink)

Didn't think of that. To be fair though if we're going down that route

return hours < 24 && minutes < 60 && seconds < 60;

Would also be correct and with only 1 line we get an even better percentage return!

ImWatchingYouPoop ยท 4 points ยท Posted at 17:02:17 on August 10, 2016 ยท (Permalink)

We can do better:

if  ( hours   < 24 )
{
    if  ( minutes < 60 )
    {
        if ( seconds < 60 )
        {
            return true;
        }
    }
}
else
{
    return false;
}
kurmis ยท 12 points ยท Posted at 17:53:01 on August 10, 2016 ยท (Permalink)

i think you meant

 if  ( hours   < 24 )
{
    if  ( minutes < 60 )
    {
        if ( seconds < 60 )
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        return false;
    }
}
else
{
    return false;
}   
Madonkadonk ยท 20 points ยท Posted at 20:54:59 on August 10, 2016 ยท (Permalink)
 boolean still_true = true
 if ( hours < 24 )
 {
      if ( still_true ) 
      {
            still_true = true;
      }
      else
      {
           still_true = false;
      }
 }
 else
 {
      if( still_true )
      {
            still_true = false;
      }
      else
      {
            still_true = false;
      }
 }
 if ( minutes < 60 )
 {
      if ( still_true ) 
      {
            still_true = true;
      }
      else
      {
           still_true = false;
      }
 }
 else
 {
      if( still_true )
      {
            still_true = false;
      }
      else
      {
            still_true = false;
      }
 }
 if ( seconds < 60 )
 {
      if ( still_true ) 
      {
            still_true = true;
      }
      else
      {
           still_true = false;
      }
 }
 else
 {
      if( still_true )
      {
            still_true = false;
      }
      else
      {
            still_true = false;
      }
 }
 switch(still_true) {
       when true:
              return true;
              break;
       when false:
              return false;
              break;
       default:
              return false;
              break;
 }
Matrix_V ยท 11 points ยท Posted at 19:05:17 on August 11, 2016 ยท (Permalink)

Only now are you ready for enterprise development.

RuthBaderBelieveIt ยท 4 points ยท Posted at 07:25:49 on August 11, 2016 ยท (Permalink)

You win

benlippincott ยท 2 points ยท Posted at 06:30:08 on August 11, 2016 ยท (Permalink)

Jesus fuck, that's just insane

miauw62 ยท 2 points ยท Posted at 16:46:19 on August 9, 2016 ยท (Permalink)

no whitespace between } and else?

fast-parenthesis-bot ยท 3 points ยท Posted at 14:10:27 on August 9, 2016 ยท (Permalink)

>>>>>>


This is an auto-generated response. contact

RuthBaderBelieveIt ยท 7 points ยท Posted at 14:11:51 on August 9, 2016 ยท (Permalink)

Thanks Brobot

TheCodingEthan ยท 5 points ยท Posted at 14:32:42 on August 9, 2016 ยท (Permalink)

<({>}<)<})

Madonkadonk ยท 3 points ยท Posted at 20:47:43 on August 10, 2016 ยท (Permalink)

For a second there, I thought there was a merge error

homesarstar ยท 3 points ยท Posted at 14:10:41 on August 9, 2016 ยท (Permalink)

I think I just vomited a little.

ElectricParkour ยท 1 points ยท Posted at 02:21:00 on August 12, 2016 ยท (Permalink)

I laughed.

tbonanno ยท 66 points ยท Posted at 00:58:40 on August 9, 2016 ยท (Permalink)

Why does a modern car need so many lines of code? Is it all the libraries of functions that allow the hardware to communicate with each other?

Chris2112 ยท 43 points ยท Posted at 02:12:01 on August 9, 2016 ยท (Permalink)

Cars have had computers in them since the mid 90s, to monitor things like engine performance, status conditions of different components, and much more. Then in the late 2000s we saw a rise in "infotainment" systems, with built in touch screens/ GPS etc. This has led to more complex systems such as Apple Carplay and Android Auto being included in modern cars. The third wave of automotive software is semi-autonomous driving features, such as computer assisted parking, automatic emergency braking, more intelligent cruise control, and, eventually, self driving. All of this adds up, and as long as everything runs fast enough then there's no reason for a company like Mercedes to go crazy optimizing everything.

A_C_Fenderson ยท 29 points ยท Posted at 03:44:39 on August 9, 2016 ยท (Permalink)

... and which means if one line of code has a bug, you have to buy a new car, instead of fixing it yourself.

Turdles_ ยท 11 points ยท Posted at 09:22:41 on August 9, 2016 ยท (Permalink)*

deleted

[deleted] ยท 13 points ยท Posted at 13:36:14 on August 9, 2016 ยท (Permalink)

iirc the Mercedes operating system was based on Linux and covered by the GPL. Someone got a DVD in the mail of the source code.

Infiniteh ยท 7 points ยท Posted at 05:53:14 on August 9, 2016 ยท (Permalink)

Or they do an update the next you take it in for maintenance? And I'm sure more manufacturers will go the Tesla way and just push OTA patches and updates.

mnbvas ยท 16 points ยท Posted at 07:12:13 on August 9, 2016 ยท (Permalink)

I hope no OTA, considering their track record with security.

HowDoIMathThough ยท 14 points ยท Posted at 09:43:28 on August 9, 2016 ยท (Permalink)

OTA

pls no

That shouldn't even be physically possible for a fucking car.

[deleted] ยท 4 points ยท Posted at 10:55:41 on August 9, 2016 ยท (Permalink)

Isn't that how Tesla does it?

HowDoIMathThough ยท 7 points ยท Posted at 15:17:47 on August 9, 2016 ยท (Permalink)

That doesn't make it ok.

redlukas ยท 3 points ยท Posted at 11:09:17 on August 9, 2016 ยท (Permalink)

Teslas update OTA

remy_porter ยท 9 points ยท Posted at 11:48:18 on August 9, 2016 ยท (Permalink)

And they shouldn't.

ColdFire75 ยท 1 points ยท Posted at 18:19:15 on August 9, 2016 ยท (Permalink)

Why?

Seems like they just get more features and bug fixes, what's not to like?

Horde_Of_Kittens ยท 12 points ยท Posted at 19:02:20 on August 9, 2016 ยท (Permalink)

If Tesla can do it, it is not outside the realm of possibility a malicious entity can push an update to brick or otherwise fuck with your car's computer from anywhere in the world.

remy_porter ยท 5 points ยท Posted at 20:06:07 on August 9, 2016 ยท (Permalink)

It's so, so easy to compromise. Plus- if an Apple update bricks my phone, it's annoying, but survivable. If Tesla bricks my car, that's a much bigger issue.

Remember: every change made to software carries with it risk, and no extent of testing can ever fully eliminate that risk. OTA car updates are just plain risky.

ColdFire75 ยท 4 points ยท Posted at 20:17:24 on August 9, 2016 ยท (Permalink)

I can understand an argument based on malicious intent. The risk of a vendor software update bricking your car though, doesn't seems like anything nearly strong enough to outweigh the benefits.

They won't be pushing an update except when your car is stationary at home, so safety isn't a risk. If they did 'brick' your car, they would send someone out to fix or replace it, or provide a method to revert. Seems far more likely they updates prevent a bug from affecting you than they brick you car.

remy_porter ยท 1 points ยท Posted at 22:15:50 on August 9, 2016 ยท (Permalink)

Safety is absolutely still a risk! Did they test the update on my car specifically? Did they test it under my driving conditions? Of course not. So how do they know it works for me? The can have a degree of confidence from their testing, but they cannot guarantee it. There's a risk, and we need to recognize that and give the user control of updates.

Beyond that: what if I don't want the update? How many times has a forced vendor update removed a feature you used? I've seen that happen all the time.

And you also underestimate the risk of malicious tampering. Think of how useful this would be for corporate espionage. If GM wanted to kill Tesla, they could do it for a few hundred grand, probably. Even if it cost millions, that's a steal!

amunak ยท 1 points ยท Posted at 21:40:46 on August 10, 2016 ยท (Permalink)

Not so easy with proper precautions (code signing, authentication, doing it only in repair shops under supervision and obviously when the car is stationary, not being used).

remy_porter ยท 2 points ยท Posted at 23:16:42 on August 10, 2016 ยท (Permalink)

doing it only in repair shops under supervision

We're talking about OTA updates. But it's still so, so easy to compromise, on a number of levels. First off, you have internal attacks- developers or people who have access to the code who make unauthorized changes. Yes, code reviews provide a defense, but that requires ME as a user to have FAITH in a vendor's software development practices, and that's worrisome when we're talking about cars.

You have a number of external attacks built around compromising the signature validation process. This could happen through poor key management (a number of instances of keys being compromised have happened), through attacks against the keystore itself, and so on.

You've also got to worry about the network stack that powers the OTA updates. Why worry about compromising the key if I can trigger a buffer overrun and get arbitrary code execution? The very act of giving the car a network interface increases the surface area of attack so much it's ridiculous.

All of this assumes that auto manufacturers are using reasonable coding practices- and we already know they're not. Which model of car was it had bugs resulting from piles of global variables and spaghetti code? Was it the one that accelerated uncontrollably or the one that would shift into park while drivingโ€ฆ I forget.

Notsoslimshade ยท 12 points ยท Posted at 03:49:03 on August 9, 2016 ยท (Permalink)

Patches?

Kyanche ยท 48 points ยท Posted at 05:57:30 on August 9, 2016 ยท (Permalink)

Sorry, the patch is included in the 2017 firmware. The 2016s can't run it, because that unit was made by a different vendor.

ukalnins ยท 11 points ยท Posted at 05:53:06 on August 9, 2016 ยท (Permalink)

Patches?

No one likes to do support.

hotel2oscar ยท 5 points ยท Posted at 03:59:20 on August 9, 2016 ยท (Permalink)

If they are like appliance industry they will be memory constrained by use of cheapest microprocessors possible

devdot ยท 11 points ยท Posted at 08:46:11 on August 9, 2016 ยท (Permalink)

What I heard from people working in Automotive as Software Engineers: About 90% of the Software is Infotainment, 10% is actual hardware control and all those things.

Ser_Rodrick_Cassel ยท 97 points ยท Posted at 23:11:21 on August 8, 2016 ยท (Permalink)*

haha whoosh

[deleted] ยท 29 points ยท Posted at 07:32:08 on August 9, 2016 ยท (Permalink)

[deleted]

mgrier123 ยท 10 points ยท Posted at 17:57:41 on August 9, 2016 ยท (Permalink)

Might have something to do with including an entire C++, C#, and VB.NET compilers? As well as some others as well maybe. That'd be my best guess.

Tomarse ยท 12 points ยท Posted at 09:41:05 on August 9, 2016 ยท (Permalink)

Dont you also need to factor what language is used? Certain ones will naturally be more verbose than others.

melance ยท 19 points ยท Posted at 12:48:30 on August 9, 2016 ยท (Permalink)

I think we should count the number of bytes in the source code. COBOL would so win WITH_ITS_LUDICROUS_VARIABLE_NAMES_THAT_ARE_ALL_AROUND_TWO_HUNDRED_AND_FIFTY_SIX_CHARACTERS.

RuthBaderBelieveIt ยท 13 points ยท Posted at 14:05:52 on August 9, 2016 ยท (Permalink)

Also depends on coding style

Function(){
    return x;
}

vs

Function()
{
    return x;
}

Makes a difference. So does limiting the number of characters per line and other stylistic choices.

Asraelite ยท 1 points ยท Posted at 13:22:17 on August 9, 2016 ยท (Permalink)

But not by orders of magnitude.

melance ยท 11 points ยท Posted at 12:50:18 on August 9, 2016 ยท (Permalink)

It'll be awesome when Google has a googol lines of code.

Meshiest ยท 11 points ยท Posted at 15:05:38 on August 9, 2016 ยท (Permalink)

I don't think we will ever be able to store a googol lines of code

melance ยท 5 points ยท Posted at 15:18:18 on August 9, 2016 ยท (Permalink)

I would say you are probably about 99% right, but then again, I couldn't have fathomed a terrabyte hard drive when I was a teenager.

Meshiest ยท 22 points ยท Posted at 15:25:40 on August 9, 2016 ยท (Permalink)

There's a difference between

1,000,000,000,000 bytes (1 terrabyte)

and

10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 bytes (1 googol bytes)

I'm afraid we don't have enough atoms :C

Here's relatively how many atoms there are in the world:

133,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 atoms

melance ยท 19 points ยท Posted at 15:26:52 on August 9, 2016 ยท (Permalink)

But maybe if we pay for WinRar!

Meshiest ยท 4 points ยท Posted at 15:49:38 on August 9, 2016 ยท (Permalink)

Winrars Weissman score can't compete

Lakonislate ยท 11 points ยท Posted at 16:01:29 on August 9, 2016 ยท (Permalink)

how many atoms there are in the world

Now that's a terrabyte.

Prod_Is_For_Testing ยท 4 points ยท Posted at 17:49:05 on August 9, 2016 ยท (Permalink)

You bastard

InternetOfficer ยท 3 points ยท Posted at 04:46:03 on August 11, 2016 ยท (Permalink)

That's assuming computers will always be binary. If we tap into atoms like Uranium or similar higher atomic number atoms then we can store exponential 200 times more information in one single atom.

Quantum computer can make this possible

Meshiest ยท 1 points ยท Posted at 06:17:25 on August 11, 2016 ยท (Permalink)

we would need almost as many Earths of atoms as there are atoms in an Earth to reach a googol atoms

Uberzwerg ยท 3 points ยท Posted at 13:04:45 on August 9, 2016 ยท (Permalink)

saying x book has 200'000 words. it gives zero information on the quality of the book

dont tell that to Alan Moore

bumblebritches57 ยท 3 points ยท Posted at 11:25:35 on August 10, 2016 ยท (Permalink)

200'000

What the fuck is that?

wordsnerd ยท 1 points ยท Posted at 17:14:31 on August 10, 2016 ยท (Permalink)
Molehole ยท 2 points ยท Posted at 21:00:20 on August 10, 2016 ยท (Permalink)

Also commonly used in Europe. I was taught 200'000 in school 200,000 would mean 200.000

sje46 ยท -1 points ยท Posted at 13:04:05 on August 11, 2016 ยท (Permalink)

That's dumb. No wonder you guys are prone to fascist dictators.

[deleted] ยท 2 points ยท Posted at 01:42:51 on August 10, 2016 ยท (Permalink)*

A base pair in a genome is 2 bits of entropy, not a full line of code. Assuming an average line length of 60 (conservative, but many people (Google/PEP8) restrict to under 80), and we have 480 bytes on average per line. That's easily two orders of magnitude of discrepancy.

fast-parenthesis-bot ยท 3 points ยท Posted at 01:42:53 on August 10, 2016 ยท (Permalink)

)


This is an auto-generated response. contact

parenthesis-bot ยท -2 points ยท Posted at 01:45:08 on August 10, 2016 ยท (Permalink)

)


This is an autogenerated response. source | /u/HugoNikanor

GregTheMad ยท 1 points ยท Posted at 15:39:02 on August 9, 2016 ยท (Permalink)

Considering that a car is a relative simple machine, and that each line of code is a potential security threat, less is more.

TheChuMaster ยท -57 points ยท Posted at 03:44:58 on August 9, 2016 ยท (Permalink)

you're obviously not a programmer...

kupiakos ยท 41 points ยท Posted at 05:36:56 on August 9, 2016 ยท (Permalink)

you're I'm obviously not a programmer...

FTFY

haatweiller ยท 49 points ยท Posted at 05:32:55 on August 9, 2016 ยท (Permalink)

I'm really afraid to read that code. All my experience with Mechanical engineerings and their coding skills is horrible.

The car is probably mostly Matlab code badly converted to C, or still Matlab code running in Dspace, or it is coded directly in C and they haven't used any functions and specified every single situation.

All three options I have seen happen in Automotive on my university and they work with Mercedes.

CordialPanda ยท 10 points ยท Posted at 05:51:25 on August 9, 2016 ยท (Permalink)

I would be too. If it's healthy code, most of that will be tests considering the difficulty of updating after release.

Otherwise if it can receive over the air updates, it should be mostly tests and analytics.

I know nothing about the problem domain, but I do a lot of business critical software in a heavily regulated industry. Tests are most of the line count.

haatweiller ยท 9 points ยท Posted at 06:14:49 on August 9, 2016 ยท (Permalink)

I once had a cross faculty team project working with arduino robots and my task was integrating every ones code. Most of my time was making functions and reducing the code from more than a thousand lines to around a hundred.

The mechanical engineerings had a habit if a part of code was needed again with small alterations to the parameters to copy those two to ten lines and alter them. Not a problem to have a single list of code, but it makes switch cases very unreadable.

xwcg ยท 10 points ยท Posted at 13:10:57 on August 9, 2016 ยท (Permalink)

All my experience with Mechanical engineerings and their coding skills is horrible.

I know a guy who codes for Mercedes and the amount of times he talks about a "dirty hack" he had to do worries me.

h4xrk1m ยท 8 points ยท Posted at 06:33:48 on August 9, 2016 ยท (Permalink)

Oh god, that makes me nervous. I've seen some seriously shit code in industry, but I really hoped the car industry would have better standards, given how lives will depend on it.

haatweiller ยท 10 points ยท Posted at 06:55:26 on August 9, 2016 ยท (Permalink)

I can say that they have started in improving. But most senior engineers do it the way they did it 20 years ago and a lot of students that go in to automotive think coding standards are unnecessary evil.

The local truck manufacturer (quite a big one) has written out every situation the truck can be in. So a lot of lines of code could be reduced by simply implementing of functions and parameters. [Parafrasing a CS student that had worked for the company for his graduation project.]

h4xrk1m ยท 3 points ยท Posted at 07:01:08 on August 9, 2016 ยท (Permalink)

That's scary as hell to me, as someone who's allowed 2 hours of downtime per year in certain projects I'm in :(

parenthesis-bot ยท -10 points ยท Posted at 07:05:09 on August 9, 2016 ยท (Permalink)

:)


This is an autogenerated response. source | /u/HugoNikanor

KitsuneGaming ยท 1 points ยท Posted at 01:14:00 on August 10, 2016 ยท (Permalink)

People are so mean to parenthesis-bot.

fast-parenthesis-bot ยท -11 points ยท Posted at 07:01:21 on August 9, 2016 ยท (Permalink)

:)


This is an auto-generated response. contact

[deleted] ยท 1 points ยท Posted at 07:01:09 on August 9, 2016 ยท (Permalink)

[deleted]

fast-parenthesis-bot ยท -4 points ยท Posted at 07:01:21 on August 9, 2016 ยท (Permalink)

:)


This is an auto-generated response. contact

h4xrk1m ยท 16 points ยท Posted at 06:26:20 on August 9, 2016 ยท (Permalink)

http://imgur.com/I6j0o6K

Do you think they meant that if they compile all their code, it results in millions of lines of assembly?

somebody12345678 ยท 1 points ยท Posted at 10:29:58 on August 10, 2016 ยท (Permalink)
jaccovanschaik ยท 16 points ยท Posted at 11:27:08 on August 9, 2016 ยท (Permalink)

The Mercedes E-class. 58 times more bugs than an F-22 Raptor.

HauntedMidget ยท 14 points ยท Posted at 11:34:46 on August 9, 2016 ยท (Permalink)

Since bug count doesn't increase linearly, it should be WAY more that that.

Philluminati ยท 8 points ยท Posted at 13:13:25 on August 9, 2016 ยท (Permalink)

How can it have more source code and NOT FLY as well?

gandalfx ยท 15 points ยท Posted at 00:13:27 on August 9, 2016 ยท (Permalink)

Apply the "If it looks stupid but works it's not stupid" principle. In this case "If the statement is meaningless but people still buy it it's good advertisement".

Chris2112 ยท 7 points ยท Posted at 01:15:34 on August 9, 2016 ยท (Permalink)

It's a pretty stupid ad to anyone who knows how to program, but that's not really Mercedes' target audience.

mellowfish ยท 2 points ยท Posted at 12:44:44 on August 9, 2016 ยท (Permalink)

If it looks stupid but works it's not stupid

This only applies to laypeople and academics.

If you are a professional in a field and looking at something "stupid but works" in your field, it is still probably stupid.

gandalfx ยท -1 points ยท Posted at 13:26:29 on August 9, 2016 ยท (Permalink)

That's the point. Whatever subject you are talking about the laypeople will always be the majority. In other words, we are simply not the target audience of that specific ad, but there will still be more than enough uninformed people who fall for it. Meanwhile we may very well be the target audience of other, equally stupid ads that rely on us not having a clue about a different subject.

Of course a smart person will generally doubt any ad based on the "more is always better" premise but I'd still assume that a vast amount of people are stupid enough to fall for it.

In the end it doesn't even matter if the ad is bullshit. You don't have to intellectually accept that the statement makes sense for your subconscience to be like "damn that looks smooth tho". As long as you spend time thinking about it, it stays in your mind and is effective. "Bad advertisement is better than no advertisement" and all that.

mellowfish ยท 2 points ยท Posted at 13:57:58 on August 9, 2016 ยท (Permalink)

That's the point

The problem is I always hear the phrase about stupidity in context of my own field, or in rare cases other fields I am familiar with. I don't hear it about welding or neurosurgery or knitting or anything else. I basically only hear it about programming. And it is always wrong in programming.

mellowfish ยท 1 points ยท Posted at 13:59:20 on August 9, 2016 ยท (Permalink)

Also, I am well aware of how ads work. But the two phrases in your original post are not equivalent, because one of them is always wrong, and the other is just basic psychology.

Bainos ยท 1 points ยท Posted at 16:13:38 on August 9, 2016 ยท (Permalink)

But that's a stupid principle !

gandalfx ยท 2 points ยท Posted at 16:54:59 on August 9, 2016 ยท (Permalink)

โ€ฆ but it works!

Well, sometimes.

aquapendulum2 ยท 16 points ยท Posted at 12:15:09 on August 9, 2016 ยท (Permalink)*

I can save them at least 5% of those lines of code.

[Proceed to refactor the codebase from using next-line opening bracket to same-line opening bracket]

Yuzumi ยท 34 points ยท Posted at 01:02:00 on August 9, 2016 ยท (Permalink)

When you have no idea what goes into coding or just starting out the number of lines in a program might seem daunting.

You get farther along and realize you'll write 500-1000 lines for the most mundane shit in the world.

I bet they are counting debugging code that will either never run or is not even included in the final binary.

Also, any game today would easily hit that many lines of code.

Terkala ยท 22 points ยท Posted at 05:50:41 on August 9, 2016 ยท (Permalink)

Unreal 3, just the engine with zero gameplay elements is 2 million lines of code.

I agree that measuring it by lines of code is pretty meaningless, but it makes decent advertising if your target demographic is non-technical people.

CordialPanda ยท 20 points ยท Posted at 06:03:34 on August 9, 2016 ยท (Permalink)

Bask in this seat of only the finest subroutines, arduously built by shops overseas that claim to hire software developers. Feel its texture, made gentle and contiguous by a lack of DRY principles.

Or perhaps you would like to enjoy some functional soup? Choose from 3 never ending non contiguous flavors. Just as you think you know the flavor, you'll realize you don't!

If variety is your spirit song, we host a 24 hour buffet of global variables with non idiomatic name spacing for your delight and amusement.

A cornucopia unspoilt by any who've come before, which is why we didn't write any tests. Join Mercedes in a blissful orgy as we speed toward oblivion.

mafagafogigante ยท 3 points ยท Posted at 13:35:47 on August 9, 2016 ยท (Permalink)

"global variables with non idiomatic name spacing for your delight and amusement." So much true. I will have nightmares about some of those "mutable constants" again.

0xembark ยท 1 points ยท Posted at 01:06:45 on August 10, 2016 ยท (Permalink)

How... What? Languages allow this shit? Programmers use this shit?

mafagafogigante ยท 1 points ยท Posted at 22:10:16 on August 10, 2016 ยท (Permalink)

"mutable constants" are static variables which do not have immutability ensured by the language rules.

Most languages allow this. Take Java for instance, if you declare a private static field but do not make it final, it is mutable. Name it with UPPERCASE_WITH_UNDERSCORES and you get something that anyone reading the code that uses the identifier would assume to be a constant but is not.

Don't use any linters and it may go years unnoticed. Until a very clever guy decides to change something by changing the constant during runtime.

mnbvas ยท 1 points ยท Posted at 07:15:10 on August 9, 2016 ยท (Permalink)

BRB, need to port some software to i8086 assembly.

KitsuneGaming ยท 1 points ยท Posted at 03:31:45 on August 10, 2016 ยท (Permalink)

How's that been going?

shrekthethird2 ยท 11 points ยท Posted at 19:09:16 on August 9, 2016 ยท (Permalink)

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight."

-- Bill Gates

a_moody ยท 10 points ยท Posted at 08:02:21 on August 9, 2016 ยท (Permalink)

Because 100,000 loc is equivalent to safety of 1 airbag.

h4xrk1m ยท 7 points ยท Posted at 06:31:40 on August 9, 2016 ยท (Permalink)

How many lines of code does Star Trek TNG's Data have?

TheTerrasque ยท 21 points ยท Posted at 10:40:52 on August 9, 2016 ยท (Permalink)

About one line of perl code

hypervelocityvomit ยท 3 points ยท Posted at 12:09:30 on August 11, 2016 ยท (Permalink)

About one line of perl python code

import ai;

Tomarse ยท 3 points ยท Posted at 10:05:06 on August 9, 2016 ยท (Permalink)

All of them

hypervelocityvomit ยท 1 points ยท Posted at 12:10:40 on August 11, 2016 ยท (Permalink)
[deleted] ยท 8 points ยท Posted at 12:51:55 on August 9, 2016 ยท (Permalink)

About 87% of it is unreadable spaghetti code that we had to delete pointers and references to last minute.

boxingdog ยท 4 points ยท Posted at 15:49:13 on August 9, 2016 ยท (Permalink)

The ol' ctrl+c ctrl+v software methodology

deviantpdx ยท 3 points ยท Posted at 07:55:38 on August 9, 2016 ยท (Permalink)

I imagine they are exaggerating and including tools and utilities they developed for designing the car. Think custom tuning/programming tools and whatnot for testing and tweaking configuration in test cars while they dial stuff in.

UniversityOfPi ยท 3 points ยท Posted at 15:11:14 on August 9, 2016 ยท (Permalink)

Kif managed to make that holodeck-esque simulation with only 4 million lines of BASIC, so imagine how many moons, water reflections, light refractions, and physics that thing must have!
What's that? It doesn't simulate another planet? That's okay, as long as... Wait it's just a car, it isn't even a self driving car with a smart AI that can run errands?
...

epicgrowl ยท 3 points ยท Posted at 16:55:33 on August 9, 2016 ยท (Permalink)

Mercedes Code Example Lines 1-11

//the following 10 lines //are for making the variables work //don't forget because I commented //ok, Joe? string welcometext = "Welcome," + %name% //above line credits to Joe. //call variable welcometext when someone gets in the car. //man, we really have to get 999,990,000 million lines of comments? //Yep, just keep commentting things on //separate lines //like this. :)

Fingebimus ยท 2 points ยท Posted at 21:32:06 on August 9, 2016 ยท (Permalink)

Mercedes Code Example Lines 1-11

//the following 10 lines
//are for making the variables work
//don't forget because I commented
//ok, Joe?
string welcometext = "Welcome," + %name%
//above line credits to Joe.
//call variable welcometext when someone gets in the car.
//man, we really have to get 999,990,000 million lines of comments?
//Yep, just keep commentting things on
//separate lines
//like this. :)
epicgrowl ยท 1 points ยท Posted at 21:32:36 on August 9, 2016 ยท (Permalink)

Well, I prefer to use 3 spaces instead of tab...

Fingebimus ยท 1 points ยท Posted at 21:37:30 on August 9, 2016 ยท (Permalink)

Those are four spaces

epicgrowl ยท 2 points ยท Posted at 22:08:46 on August 9, 2016 ยท (Permalink)

My excuse is that I'm on mobile, you still get the reference though right?

kevin_with_rice ยท 3 points ยท Posted at 02:52:44 on August 10, 2016 ยท (Permalink)

What the fuck do those 100 millions lines of code do? Maybe they've never heard of "for" loops

SamJSchoenberg ยท 2 points ยท Posted at 22:04:07 on August 10, 2016 ยท (Permalink)

Measuring the value of code based on it's length is like measuring the value of an airplane based on it's weight.

weigookin ยท 1 points ยท Posted at 14:34:50 on August 9, 2016 ยท (Permalink)

Wasn't the raptor's source code compromised? I guess that is an interesting take on auto safety

[deleted] ยท 1 points ยท Posted at 03:09:30 on August 10, 2016 ยท (Permalink)

I wonder how much they actually wrote and how much is non-gpl open source stuff

rib-bit ยท 1 points ยท Posted at 21:37:45 on August 10, 2016 ยท (Permalink)

Mercs and other high end cars are often leased not purchased, not because of the payments (since rich guys don't care) but because they fail so often due to the new technology and the repair costs get ridiculous once the warranty goes...

[deleted] ยท 1 points ยท Posted at 06:04:03 on August 19, 2016 ยท (Permalink)

Probably has 80 million lines of dead library code.

[deleted] ยท -5 points ยท Posted at 02:05:37 on August 9, 2016 ยท (Permalink)

[deleted]

NeonKennedy ยท 17 points ยท Posted at 02:22:17 on August 9, 2016 ยท (Permalink)

It's not IoT, there are a ton of computerised features that do a lot to add safety, performance, durability, etc. Automatic braking, assisted parking, monitoring condition and wear, etc.

rchard2scout ยท 4 points ยท Posted at 06:26:44 on August 9, 2016 ยท (Permalink)

Whilw I agree that Internet of Shit-devices still have a long way to go (think the automatic cat feeder that stopped because the servers were offline, or the home automation system that stopped working because the company that made it didn't support it anymore) that doesn't apply to cars.

Modern cars have a ton of safety features and driving assistance technologies that are slowly coming together to fully automate transport, and that can't happen in a purely mechanical car.