Coffeehouse Thread

55 posts

Linq is scary

Back to Forum: Coffeehouse
  • User profile image
    Xaero_​Vincent

    SecretSoftware wrote:
    Hi,
       I think LINQ is really scary. This LINQ project is really very powerful in the sense that it will revolutionize the way we write code for the future. I mean we will be writing less for loops and less loops in general to iterate through objects and arrays and that is really significant in terms of performance. To select based on criteria and have the results in your face in a matter of microseconds is really scary.

    I mean wow. Just instant gratification! How does the SQL team feal about LINQ? Is LINQ their Boggart?

    I think I will never write another T-SQL again.

    What do you guys think? Have you played with the CTPs?





    I dont think thats revolutionary at all.

    Whats revolutionary is a system where you develop applications without having to write any code at all.

    http://www.limnor.com/


    Regards,
    Vincent

  • User profile image
    PaoloM

    Xaero_Vincent wrote:
    Whats revolutionary is a system where you develop applications without having to write any code at all.

    http://www.limnor.com/[/quote">http://www.limnor.com/ 


    Yeah, that looks interesting.

    Another fine application built on .NET Smiley

  • User profile image
    PaoloM

    thumbtacks wrote:
    
    PaoloM wrote: 
    Xaero_Vincent wrote: Whats revolutionary is a system where you develop applications without having to write any code at all.

    http://www.limnor.com/[/quote">http://www.limnor.com/ 
    Yeah, that looks interesting.

    Another fine application built on .NET
    Funny, I can't build the revolutionary tools I truly want to build in .NET. At least not without a whole lot of fuss and unsafe keywords. Huh.

    The floor of this forum is littered with unfulfilled promises. From fantabulous games to innovative distros to... well, pretty much everything. And yet, we never see anything, how's that?

    As they like to say in the hacker community, "show me the code" Smiley

  • User profile image
    Xaero_​Vincent

    PaoloM wrote:
    Yeah, that looks interesting.
    Another fine application built on .NET


    Yeah... plus it supports regular unmanaged DLLs (Win32, etc.). So the system is really extensible. .NET 2.0 or 3.0 support is coming soon as well.

    I'm not a good coder in either Win32 or .NET, so this may be just the thing for me. Big Smile

    It doesn't work on Linux, now, but there is always virtualization and future editions based on Mono for Linux and .NET for Windows. Smiley


    Regards,
    Vincent

  • User profile image
    BryanF

    thumbtacks wrote:
    
    SecretSoftware wrote: I am excited about it because I feel as if i just landed from a rollercoaster ride. Its a feeling of happiness to plan in your head how LINQ will reduce 5000 lines of code significantly. Did you ever feel like when someone removes a noise that you always hear, and then you say that makes me feel better , why did I not remove it along time ago? That Is how I feel. No Kidding. This stuff is gold. Its value to me is much more than Gold, because now I can do alot with few words, and cross many boundries at the same time. I feel like I have the power of God! Hence , Its scary.
    Abstraction != performance gains.

    Productivity gains, maybe. How does LINQ work on huge collections of data? Like giant XML documents or large databases. Does it play nice with Oracle databases when you are pulling data from a dozen tables in an effort to retrieve hundreds or thousands of records?
    Actually, LINQ could lead to perf gains as it's integrated across Microsoft's product line, particularly the SQL Server family. Currently, you create a query by creating a string, which is passed to the database. Once in the database, the string is parsed into a native query tree structure. If future versions of SQL Server could be made to understand LINQ's own query tree, then you could pass that tree rather than a string, eliminating the overhead of parsing. (Why build a string only to parse it a few milliseconds later if you can avoid it?) At worst, the database would have to transform LINQ's tree into a SQL Server tree, which is still probably less complex. At least that's my understanding...

  • User profile image
    figuerres

    BryanF wrote:
    
    thumbtacks wrote: 
    SecretSoftware wrote: I am excited about it because I feel as if i just landed from a rollercoaster ride. Its a feeling of happiness to plan in your head how LINQ will reduce 5000 lines of code significantly. Did you ever feel like when someone removes a noise that you always hear, and then you say that makes me feel better , why did I not remove it along time ago? That Is how I feel. No Kidding. This stuff is gold. Its value to me is much more than Gold, because now I can do alot with few words, and cross many boundries at the same time. I feel like I have the power of God! Hence , Its scary.
    Abstraction != performance gains.

    Productivity gains, maybe. How does LINQ work on huge collections of data? Like giant XML documents or large databases. Does it play nice with Oracle databases when you are pulling data from a dozen tables in an effort to retrieve hundreds or thousands of records?
    Actually, LINQ could lead to perf gains as it's integrated across Microsoft's product line, particularly the SQL Server family. Currently, you create a query by creating a string, which is passed to the database. Once in the database, the string is parsed into a native query tree structure. If future versions of SQL Server could be made to understand LINQ's own query tree, then you could pass that tree rather than a string, eliminating the overhead of parsing. (Why build a string only to parse it a few milliseconds later if you can avoid it?) At worst, the database would have to transform LINQ's tree into a SQL Server tree, which is still probably less complex. At least that's my understanding...


    or dLINQ might send mssql a native sql production (the tree and such) and sql might even store them - so that if the same q was exec'd several times with just a parameter change then dLINQ might say exec $1234x , @param in effect like a sproc or pre-parsed q-plan
    less traffic sending the same tree - more perf.

    there are sooo many ways they can tune this in each new version...
    but there should be a balance of how tight they go...

    but heck... make our jobs more fun and more productive!
    Smiley

  • User profile image
    littleguru

    thumbtacks wrote:
    Now, now...I did put up half a game in the Sandbox. I just don't have a whole lot of incentive to actually finish it...but as far as the things I'm actually building right now, they are real, but progress will be slow for a while...I'll post a demo when I'm further along.



    And...like I mentioned in another thread...expect things to come out in rapid succession.


    There have been quite a few dudes here claiming to have build the coolest stuff... nobody ever showed something. And I mean a half finished game from 1980 isn't very exciting.

    Promises over promises over promises over promises *yaaahwwm* I'm getting tired.

    Edit: It's not linq that scares me it is all the unfulfilled promises that scare me... Could somebody please rename this thread?

  • User profile image
    littleguru

    thumbtacks wrote:
    
    littleguru wrote: There have been quite a few dudes here claiming to have build the coolest stuff... nobody ever showed something. And I mean a half finished game from 1980 isn't very exciting.
    I'll post a demo when I can...probably in a month or so. I'm not exactly doing easy stuff here.


    Good Smiley

  • User profile image
    Dr Herbie

    thumbtacks wrote:
    I'm just about to reach the first milestone of sorts...reversing a linked list in place...without moving any data (easy). Then, the next milestone will be to turn that same list into a queue, and then a stack (in place). Then...




    Data structures?  Why?  There are thousands of data structure implementations out there, in fact there's pretty much one for each first year CS student. As I recall Borland BIDS did conversion of data structures without moving data when I started C++ programming in the early 90s. I haven't programmed a data structure for over a decade, there's no need.

    So what's special about yours?


    Herbie

  • User profile image
    SteveC-A9

    Real SQL will "never" go away for a data store. However, LINQ gives a new level of power to the middle and front tiers of an app. It's about time MS finally got the last of Visual FoxPro's power into .NET; some of us have waited a long time for this. Smiley

  • User profile image
    Dr Herbie

    thumbtacks wrote:
    
    Dr Herbie wrote: As I recall Borland BIDS did conversion of data structures without moving data when I started C++ programming in the early 90s.
    Describe...I tried looking up a link for that, but could find little...



    BIDS separated the data storage from the access implementation.  So you could have a queue based on a list, doubly-linked list, array, etc.  It was all done through C++ templates and interfaces.  It's been some considerable time since I used it and I haven't needed to use anything that complex since.
    Comming to thing of it, I can't remember altering the data access method at run time -- I only ever did it by altering the template declaration. So it could be the case that your code will do something different.  But then I never needed to alter the access methods on the fly. I choose a data structure that fits my needs.  If I needed to change it at run-time, I would suspect that I needed to re-design my code to be simpler. I don't like complexity.

    I would say that if you're working on something bigger, maybe you should use one of the existing data structure libraries to start with, replacing it with a hand-rolled one when it becomes an issue.  Starting everything from scratch can get in the way of feeling like you're making progress on the bigger picture.


    Herbie

  • User profile image
    Secret​Software

    Linq is the best thing that happened to a programming language and the framework in a long time. And its extensible.

    More power to the developers.

    Linq to web 2.0, Linq to objects, intities, etc.. is really cool. This is truely a geneuine invention by MS, and will make managed world more attractive than other languages.

    I am woundering when will people use managed world execlusively.
    THe only thing that is unattractive in the C# language or VB.NET is the fact that your compiled source code can be decompiled easily from MSIL. MS should make this hard, as hard as decompiling machine code.

    Infact the compiler itself, when it builds a project, should apply obfuscation natively, without programmer input. Also, there should be some kind of cryptosystem between the runtime, and your compiled source.

    If this happened, I see no real reason to use unmanaged code over managed code.

  • User profile image
    spiked

    some followup reading links on 2 subjects

    http://weblogs.asp.net/fbouma/archive/2005/09/19/425534.aspx

    and my favorite topic;

    http://weblogs.asp.net/fbouma/archive/2006/05/26/Yay_2100_-A-new-Stored-Proc-vs.-Dyn.-Sql-battle_2100_.aspx


    Now, I dont always agree with everything this guy says, in fact we disagree on a lot, but he always provides excellent material from which to form opinions.

  • User profile image
    Secret​Software

    thumbtacks wrote:
    
    SecretSoftware wrote:Linq to web 2.0, Linq to objects, intities, etc.. is really cool. This is truely a geneuine invention by MS, and will make managed world more attractive than other languages.
    No, its a genuine invention by Anders Hejlsberg. Without him, I wonder if the LINQ project would have gone anywhere. Remember all the things he did over at Borland?


    Well he is still a MS employee. So, what he does is compensated for by money, so its still counted as MS.AndresHejlsberg.Invention.

  • User profile image
    staceyw

    SecretSoftware wrote:
    
    thumbtacks wrote: 
    SecretSoftware wrote: Linq to web 2.0, Linq to objects, intities, etc.. is really cool. This is truely a geneuine invention by MS, and will make managed world more attractive than other languages.
    No, its a genuine invention by Anders Hejlsberg. Without him, I wonder if the LINQ project would have gone anywhere. Remember all the things he did over at Borland?


    Well he is still a MS employee. So, what he does is compensated for by money, so its still counted as MS.AndresHejlsberg.Invention.


    And lets not forget there are many other hard working folks on the project.

  • User profile image
    figuerres

    SecretSoftware wrote:

    I am woundering when will people use managed world execlusively.
    THe only thing that is unattractive in the C# language or VB.NET is the fact that your compiled source code can be decompiled easily from MSIL. MS should make this hard, as hard as decompiling machine code.

    Infact the compiler itself, when it builds a project, should apply obfuscation natively, without programmer input. Also, there should be some kind of cryptosystem between the runtime, and your compiled source.

    If this happened, I see no real reason to use unmanaged code over managed code.


    Nope! sorry but this is silly as heck.

    if someone has a "Native" x86 file and wants to work out what it does / reverse engineer it they can if they want to and have the skills to do it.

    if soneone gets a .net dll / exe same thing....

    the premis that a .net app will expose some logic that others will want to steal or modify is not very real IMHO.

    take one direction:

    you wrote a super great xyz() in each of C++ and C# and I want to steal the code...
    why will native x86 stop me?
    why would obfuscation stop me?

    if I want the working code I do not care what the symbols are....
    I just find the start and end of the code and any vars that go with it and copy them....

    if I really want to steal that code and hide my tracks I can run it with varied inputs and log the results .... trace thru the execution path and after a while I will have the algorithim....

    x86 code same deal.... look at how stuff like keycodes get hacked.

    do you think most of the crackers understand the logic?
    nope, just find the way to bypass it and back patch.

    it's much like the whole riaa / music  thing....

    if someone wants it they will get it.

  • User profile image
    stevo_

    figuerres wrote:
    

    it's much like the whole riaa / music  thing....

    if someone wants it they will get it.


    While I'm not commenting on if .net MSIL should be changed to be more 'secure'. Surely your last comment invalidates your argument, the whole DRM security thing, windows activation security and such- yes it gets broken- but that doesn't mean they stop, they keep going to make it so that less and less people are actually capable of breaking it.

  • User profile image
    PaoloM

    thumbtacks wrote:
    Like...who?

    Anders could work wherever he wants. Just like Scoble. Scoble MADE Microsoft marketing what it was.

    Er... while I admire Anders and Robert, I think you severely underestimate all the other people working there.

    I happen to have on hand a September 2005 paper titled "The LINQ Project - .NET Language Integrated Query". It's authored by Don Box and Andres Hejlsberg.

    Andres may very well work wherever he wants, but he wants to work with Microsoft right now, and whatever he comes out during work hours is intellectual property of the company...

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.