• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Is it true that Google uses C/C++ a lot?

 
Ranch Hand
Posts: 701
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've heard that Google uses C/C++ a lot for their search programs. Is it true?
 
Ranch Hand
Posts: 433
Netbeans IDE
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://panela.blog-city.com/python_at_google_greg_stein__sdforum.htm

At Google, python is one of the 3 "official languages" alongside with C++ and Java. Official here means that Googlers are allowed to deploy these languages to production services. (Internally Google people use many technologies including PHP, C#, Ruby and Perl).



It's also worth noting that Guido van Rossum, the inventor of Python, works for Google.

And yes, he was tested on Python just like all other applicants
 
author
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't say for certain, but I would venture an educated guess... it is likely that they use C and/or C++, because these are more likely to be used in big commercial applications that can't run with the overhead or restrictions of, say, Visual Basic or LISP.

The most efficient code of all of course would be written in assembly language or machine code. But those languages require ten times the man-hours to do the same things you'd do in C++. It's not worth it to spend those extra man hours.

I can't say for sure that Google couldn't be written C# or Java. I'm not sure. But C++ allows you to do pointer arithmetic and lower-level operations when you need to. Of course, you need to know what you're doing, because there is less protection against bad coding. But this is exactly why the "Big Boys" use it.

Different situations require different tools. Visual Basic has long been the best fast prototyping tool. C/C++ is now considered the best "close to the hardware" program, so the largest commercial applications tend to be written it.

That's all by way of speculation, but still....

Brian Overland
 
Marshal
Posts: 79978
397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would assembly code be more efficient? I thought the optimising compilers available for C nowadays can produce code which runs faster than handwritten assembly code.
 
Brian Overland
author
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No offense intended, but the question "Would assembly code always be more efficient?" made me smile because it strikes me like asking, "Can a computer beat a human at chess?" The answer is probably, yes, but it does depend to some extent on both the human and the computer.

You could, in theory, do any trick with assembly code or machine code that even the best optimizing compilier could do -- in theory. The real question is, would it be worth all the extra work of applying all those tricks yourself? And would you be smart enough to see all the optimizing opportunities yourself? And: is any human that smart?

A fascinating case in point (tho I'm sure there are others) is Bill Gates back in the late 1970s or was it early 80s, writing BASICA for the first personal computers and miraculously fitting it all into 64K -- including enough space for user program/data area. He had to program down to the hardware, pulling off every optimizing trick he could think of. He couldn't possibly have created BASICA in 64K without writing it at the assembly-code-machine-code level. For one thing, a HLL would've generated far too much overhead for him to fit the code into that tiny space.

But yeah... since then, the cases in which it has been necessary to write anything in assembly code have become rarer and rarer.
 
Campbell Ritchie
Marshal
Posts: 79978
397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brian Overland wrote:No offense intended . . .

. . . and none taken.
 
Campbell Ritchie
Marshal
Posts: 79978
397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brian Overland wrote: . . . And would you be smart enough to see all the optimizing opportunities yourself? . . .

Of course not. That is why we have optimising compilers. And in an attempt to optimise at the low level, we may introduce bugs.
[Edit]Add the following:[/edit]
That is exactly what I meant about handwritten ”assembly code‟ earlier.
 
Campbell Ritchie
Marshal
Posts: 79978
397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brian Overland wrote: . . . And: is any human that smart? . . .

Yes, but humans and computer programs are smart at very different things.
 
Brian Overland
author
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And so the example I gave was that Bill Gates did programming that was probably way beyond what any compiler of the time could do.

But yes, things have progressed a bit since then. <grin>

At Microsoft, it has long since been an internal policy that a developer (i.e. a writer of production code) has to make a clear case before writing any function in assembly language -- the presumption is that the optimizing compiler can usually do better!

-- Brian Overland
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to question this statement: "Visual Basic has long been the best fast prototyping tool."

I can't believe that this was ever really true, and especially today with all of the myriad of alternatives.

It's possible that this could be true in certain Microsoft centric shops, but I would think that this is increasingly the exception, rather than the rule.

Of course, this is bound to ignite a firestorm of religious zealotry, but I guess I am just trying to figure out why, after over 26 years in the software programming industry I have never ever seen Visual Basic used for anything other than one obscure little web plugin project used by someone at Data General, a project which was soon cancelled and replaced by Javascript.
 
Brian Overland
author
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is more a subject for a Visual Basic BB, David, but I personally find that Visual Basic is outstanding for personal productivity software I write for my own use and for others. Visual Basic is not intended to produce commercial software you buy off the shelf. It is great for the recreational, hobbyist, and part-time programmer who wants to get things working fast in the Windows environment.

If you want to write professional applications to be sold to a mass market, then yes, I suggest you learn C++.

Maybe I over stepped by saying that VB is the BEST of its kind. Ok, that's a matter of opinion, and to be honest, I haven't checked every development environment in the entire world.

My point was -- use the right tool for the right job, that's all. You may have your own favorites, that's fine.

Brian Overland
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is all very off-topic, but would it even be possible to tell a Windows app written in VB from one written in VC++? I'd think that they would possibly look similar, or even identical ... ?
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic