Added: 3 years ago
From: GoogleTechTalks
Views: 51,208
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (38)

Sign In or Sign Up now to post a comment!
  • great future!

  • Google is great at tech talks!

  • Why does the binary search code start looking for x in the middle?

  • //I would consider something like the following to be a binary search

    //

    int* binarySearch(int* first, int* last, int x){ int* location; //if found, will hold the address that holds x bool match = false; //Becomes true once *location == x is true if(first){ for(location = first; ! match && location < last; location++){ match = *location == x;  } } return match ? location : 0;

    }

  • @Jajaja2011Jajaja

    A binary search is one which requires, at worst, lg2(x) iterations to solve where x is the number of entries in the ordered list.

    What you have written is a linear search. As the number of elements in the list doubles, your algorithm would take, on average 2x longer to process.

  • They seem to value a methodical approach to software problem solving and design. And yet, on their career website, there are the standard job requirements - this many years in this technology, this degree, etc.

    That's fine, but nowhere is there a reference to a preferred method of development. Nothing about a rigorous approach to algorithms, an awareness of how proofs are constructed, etc.

    I don't doubt that they value a more formal approach, but it isn't reflected in their solicitations.

  • How is that a correct binary search solution?  If you have an array [0,1,2] it returns the same result when you search for 2 or 3...

  • @jgoemat The range is a semi-open interval. So you would call this as:

    int a[] = {0, 1, 2};

    int* p = lower_bound(&a[0], &a[0} + 3, 2, less());

    The result for searching for 2 will be "&a[0]+2" and searching for 3 will be "&a[0]+3". The later being the end of the array so it would be invalid to dereference the pointer.

  • @seanparent65 Ok, so instead of 'last' meaning the last element of the array, it actually means a pointer to one element past the end of the array?

    Also, the caller must then check if the returned value is past the end of the array and add the element to the end if so?

    And if the value is not past the end of the array, the caller must check the value at that location to see if it was actually found?

    Seems like bad practice to me.

  • @jgoemat "last" refers to the last position, not element, in the array, so yes, one past the last item. By convention this interval is denoted [first, last). For an array of n elements there are n+1 possible positions and n+1 possible results for lower_bound. The return value is the first place the element being searched for could be inserted without violating the ordering. This is an algorithm in the C++ standard library.

  • very Informative :) thank you

  • Regarding my earlier question, the answer seems to be the "External Polymorphism" design pattern.

  • There is a bullet point at the bottom of the slide at 38:52. It says:

    "Extend generic programming to apply to runtime polymorphism."

    This intrigued me. Generic program using C++ and templates is a form of compile time polymorphism. To use runtime polymorphism, you virtual functions.

    So I'm wondering what Sean meant in that bullet point. How do you extend generic programming, via C++, to apply to runtime polymorphism?

  • Comment removed

  • @ProphetVS concrete class with template constructor taking an arg of any T and holds the arg via type-erasure. Operations on the held arg are done through free-functions found via Argument Dependent Lookup.

  • What does adobe mean?

  • Vejam este:

    /watch?v=BPXzkli6NOg

  • Nice Informative Video. Keep it up :)

  • Did he ever solve the integer question, the problem of brainstorming a non-peano integer definition, which is more appropriate to programming?

  • This is what Dijkstra said software development should be!

  • This sounds a great deal like why Erlang uses functional programming (no side effects) and actor-based messaging. A spreadsheet is the most common sort of functional programming. You have established a sort of analogy between a spreadsheet, a DAG and your programming tasks. It seems like this suggests that we are going to see more functional programming. Time to brush up on Lisp/Scheme/Clojure, Erlang, Scala or F#.

  • Does anyone have a citation for the survey paper mentioned around 0:50:00?

  • Sorry - I haven't been monitoring the questions here. Paper mentioned (incorrectly attributed to Doug Gregor - who's done other good work) is:

    Ronald Garcia, Jaakko Järvi, Andrew Lumsdaine, Jeremy Siek, and Jeremiah Willcock. An Extended Comparative Study of Language Support for Generic Programming. Journal of Functional Programming, 17(2):145--205, March 2007

  • The internet ruined everything, lowering the standards of what a "computer programmer" is.

  • yeah...real programmers work with a magnet.

  • Can't wait till Windows 7 comes out. This concept reminds me of SimpleBasic and Boku and XNA concepts.

  • yeah, sure... Did you know that Adobe revolutionized the print industry with PostScript then PDF, "fag software" like Illustrator, they were the first to use Bézier curves for vector graphics, etc.

    "without Macromedia's technology Adobe will be history today ..."

    Creating Fireworks would be impossible without using technologies invented by Adobe.

    Or at least, that is my opinion :)

  • So, Sean, this is why Adobe products are riddled with more holes than a sieve these days?

  • Hahaha. True.

  • It's still the same old approach to software engineering though: look at a class of specific problems to see if it can be solved by a more general solution, which is basically a reusable library. By properly limiting the scope and expressiveness of the library via a DSL, you reduce the probability of errors. Somebody still have to have solved the class of problems before one can embark on writing such generic libraries.

    There is just no silver bullet in software engineering.

  • As with geometry, there is no royal road to computer science. It is a challenge to the industry to learn to collect our knowledge into (re)usable components and the responsibility of every professional engineer and scientist to contribute.

  • Agreed. The video is a great case study on how to build a quality reusable library/framework.

    Kudos to you and everyone involved to make ASL open source in MIT license. I'm one of the fortunate (paid) open source developers as well.

    My original comment meant to point out that the title of the video might be a bit misleading to people who're expecting new methodologies and/or new tools/languages.

  • really important matter.

    how to talk about the future of things that should be mainstream for 50 years :)

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more