Keeping languages straight



  • Found in some Delphi code that's apparently been ported more than once:

      //Store the start position at the beginning of the output string
      //Note that we have to make a shift for backwards compatibility:
      //the old VB code is 1 based, while C# is 0 based
      Result := Encode(Position + 1);



  • Ported to Delphi? There's your WTF right there.



  • Well, our Delphi product is currently stomping all over all the competition that was written in other languages, in large part due to the competitive advantage we gain by how easy it is to read, write, debug and modify Delphi code.  So no, not really.



  •  You got a competitive edge because you're better programmers and/or the product is better. Its not the hammer; it's you.



  • @dhromed said:

    You got a competitive edge because you're better programmers and/or the product is better. Its not the hammer; it's you.

    Not necessarily.  If better languages didn't help make creating better products easier, then why aren't we all still writing in FORTRAN?

    For example, our software handles scheduling for broadcast media, so it's very database-intensive.  Take a look at this comparison of database access across different languages, and bear in mind that all of the actual low-level database manipulation is taking place in the same external library, so what's really being compared is the overhead of actually working with the data.  And Delphi is the clear winner.

    (Granted, the linked article is about Firebird, and we're using SQL Server, but since the actual database-specific stuff is a constant factor here, that's less relevant than it might seem.)

     



  • @Mason Wheeler said:

    For example, our software handles scheduling for broadcast media, so it's very database-intensive.  Take a look at this comparison of database access across different languages, and bear in mind that all of the actual low-level database manipulation is taking place in the same external library, so what's really being compared is the overhead of actually working with the data.  And Delphi is the clear winner.

    Are you... regularly selecting 100,000 rows at once?  Because if you're only selecting 1000, then .Net is the clear winner, along with the other one that isn't Delphi.


  • Well, the break-even point seems to be around 4,000, and the hockey-stick curve is around 10,000, and yes, both of those are realistic scales for our software, especially when running complex reports.



  • @Sutherlands said:

    Are you... regularly selecting 100,000 rows at once?  Because if you're only selecting 1000, then .Net is the clear winner, along with the other one that isn't Delphi.

    And isn't virtually 99.9% of that performance cause by the DB driver and not the language? In which case, 1) a comparison with Firebird is useless alone; you need to include other major DB products, and 2) swapping out drivers without swapping out languages could make a huge difference. (For example, how about a chart showing .net using ADO.NET compared with ODBC? I wager there's a huge, huge difference between the two.)

    And of course the secondary question, is this really the best measure of performance? What if .net queries 100,000 rows slower, but has significantly better caching code so it's reading from cache while all the other environments are reading the same query results over and over? How often are people performing these "complex reports" that it's a matter for concern in the first place? (And why don't you just have the DB run the report in the first place, and your software could just echo out the 20-50 actual pieces of useful data?)



  • People run large, complex reports often enough that when something does run slowly, it tends to get escalated to us in Dev on a very expedited schedule and get made a top-priority issue. :P



  • @Mason Wheeler said:

    If better languages didn't help make creating better products easier, then why aren't we all still writing in FORTRAN?

    Wait, we moved on from FORTRAN? Why the fuck didn't anyone tell me!?!



  • @Mason Wheeler said:

    Well, the break-even point seems to be around 4,000, and the hockey-stick curve is around 10,000, and yes, both of those are realistic scales for our software, especially when running complex reports.
    According to that (superbly accurate) "performance profile", at 10k rows .Net is .05 milliseconds slower than Delphi.  How do you figure that means that the break-even point is 4000, and how often do you run 10k row reports that 1) the losses from smaller datasets is overtaken and 2) .05 ms/run actually matters?



  • @morbiuswilters said:

    @Mason Wheeler said:
    If better languages didn't help make creating better products easier, then why aren't we all still writing in FORTRAN?
    Wait, we moved on from FORTRAN? Why the fuck didn't anyone tell me!?!
    Well, we sent you a message, but it got truncated to 6 characters...



  • @Mason Wheeler said:

    Well, the break-even point seems to be around 4,000, and the hockey-stick curve is around 10,000, and yes, both of those are realistic scales for our software, especially when running complex reports.
    Oh, and it's a "hockey-stick curve" because it's a logarithmic scale...



  • @Sutherlands said:

    @morbiuswilters said:

    @Mason Wheeler said:
    If better languages didn't help make creating better products easier, then why aren't we all still writing in FORTRAN?
    Wait, we moved on from FORTRAN? Why the fuck didn't anyone tell me!?!
    Well, we sent you a message, but it got truncated to 6 characters...

     

    FORTRA?

     

     

     



  • @blakeyrat said:

    (And why don't you just have the DB run the report in the first place, and your software could just echo out the 20-50 actual pieces of useful data?)

    Because databases don't run reports.

    I'm guessing you meant "why not have the database extract, group and filter the data then have your software just handle presentation of that data?" - in which case I agree.

    @dhromed said:

    FORTRA?

    CHOP

     



  • @Cassidy said:

    CHOP
     

    x_O



  • @Cassidy said:

    @blakeyrat said:

    (And why don't you just have the DB run the report in the first place, and your software could just echo out the 20-50 actual pieces of useful data?)

    Because databases don't run reports.

    I'm guessing you meant "why not have the database extract, group and filter the data then have your software just handle presentation of that data?" - in which case I agree.

    HEY LOOK A NEW LOW IN PEDANTIC DICKWEEDERY



  • @Cassidy said:

    Because databases don't run reports.

    Databases can run reports. And not just manipulating the data, but formatting it. I've seen sprocs that generate HTML.


  • Trolleybus Mechanic

    @morbiuswilters said:

    @Cassidy said:
    Because databases don't run reports.

    Databases can run reports. And not just manipulating the data, but formatting it. I've seen sprocs that generate HTML.

     

    ... and you then tracked down the developer and punched his testicles up into his throat?



  • @Lorne Kates said:

    @morbiuswilters said:

    @Cassidy said:
    Because databases don't run reports.

    Databases can run reports. And not just manipulating the data, but formatting it. I've seen sprocs that generate HTML.

     

    ... and you then tracked down the developer and punched his testicles up into his throat?

    Unfortunately, no. We were paying him $250k /year, after all. However, we did get rid of him before too long.



  • @morbiuswilters said:

    @Lorne Kates said:

    @morbiuswilters said:

    @Cassidy said:
    Because databases don't run reports.
    Databases can run reports. And not just manipulating the data, but formatting it. I've seen sprocs that generate HTML.
     

    ... and you then tracked down the developer and punched his testicles up into his throat?

    Unfortunately, no. We were paying him $250k /year, after all. However, we did get rid of him before too long.
    Holy fuck, $250k?!  I've got a bridge I'd like to sell to your boss...


  • @blakeyrat said:

    HEY LOOK A NEW LOW IN PEDANTIC DICKWEEDERY

    I aim to please.

    @morbiuswilters said:

    Databases can run reports. And not just manipulating the data, but formatting it. I've seen sprocs that generate HTML.
     

    Bugger. Out-pedanted. But who in their right mind --

    @Lorne Kates said:

    ... and you then tracked down the developer and punched his testicles up into his throat?

    Back of the queue, bitch. First hit's mine. Especially after hearing he got paid 250k for pulling THAT stunt.



  • How do I get that position?...



  • Usually by following the queue to the end.


Log in to reply