Jump to content

Dalija Prasnikar

Members
  • Content Count

    1062
  • Joined

  • Last visited

  • Days Won

    91

Posts posted by Dalija Prasnikar


  1. 18 minutes ago, Lars Fosdal said:

    A forum is a place for reasoning and discussion.

    SO, not so much.

     

    What do you prefer?

     

    I guess most people go to SO to get an answer, provided one exists, and if not - use a forum.

    Edit: I gave up on SO for asking questions a long time ago.

    If you want to discuss then forum is the right place, if you have specific question then SO is the right place to go.

     

    I would not say it is about preferences, but what you need at particular moment. 

     

    Besides Delphi I am using other tools for development, most notably Android Studio and Xcode. I never needed forums to solve my problems... I could find all the answers on SO and official documentation. 

     

    Hanging out with other developers and discussing all kinds of things... well, Delphi forums and communities were more than enough for me.

    • Like 4

  2. 35 minutes ago, brummgrammierer said:

    Because I didn't find any issue, I have now filed RSP-30365 that describes the problem of 'Preserve line ends' off still leaving the first and last line of a file with <LF> as the terminating character.

    I voted for it, but I would not hold my breath... this will be either closed as won't fix or will stay open for a long time.

     


  3. You need different architecture to achieve such timing. 

     

    Timer is not precise enough and even if you can make it precise, there will always be other events that will mess up your timer schedule. You need a some kind of game loop. 

     

    Basically, you should not rely on timer to calculate and paint your screen, you need to trigger paint event with delta time and based on that time (elapsed from last paint) you will calculate positions and render your screen.

     

    Some starting point: https://gamedev.stackexchange.com/questions/651/how-should-i-write-a-main-game-loop 

     


  4. 41 minutes ago, Mike Torrettinni said:

    Oh, yes, I have it, just not in the 'usual' way, more it looks like manual version control, not full blown product like TFS, Git... which I understand could be considered as if I'm missing something really beneficial, but not everything has to be perfect to be useful, right?

    Manual version control is an oxymoron - there is no such thing as manual version control. It is not about something working perfectly or not, it is about manual version control not working at all.

     

    All you have are backups of your code at some point in time. Nothing else. 

    • Like 3
    • Thanks 1

  5. 8 minutes ago, Mike Torrettinni said:

    Sorry, I don't understand your comment. Probably is my English and the way I phrased the question: the question is about how to start implementing new feature into existing project, where compiling and running it takes a while, but I just want to focus on feature on it's own, and compile and run it to see if it goes into the right direction. Just what your experience is, do you start new feature within the project or do you create new, empty project and implement the new feature, and once the feature is developed then integrate it into the existing project. Or a combination, or some other ideas.

     

    Depending on the feature. If I need to test some general concept and/or feature is not tightly coupled with app I will make separate test project until I figure whether it will work as intended. 

     

    If feature is tightly coupled with rest of the application I will create new feature branch in that app repository and start from there, even if compiling/running takes time.

     

    8 minutes ago, Mike Torrettinni said:

    Branching, merging and version control of the new feature is not issue, this is all taken care of.

    But, this is what we are trying to tell you, not having VCS is an issue. Because, new feature workflow highly depends on VCS. 

     

    I know it may seem that learning how to use VCS takes valuable time, but you can get that time back in a week (literally).

    • Thanks 1

  6. 1 minute ago, Bill Meyer said:

    You can write bad code in any language. It's a poor workman who blames his tools. Delphi is not perfect, and certainly we battle defects in the IDE, but failure to design is a plan for failure in any language.

    I literally just started typing same sentence.

     

    Delphi devs always complain all logic is dumped in form (event handlers), Android devs always complain all logic is dumped in Activity (Delphi form equivalent), iOs devs always complain all logic is dumped in ViewController (again Delphi form equivalent)...

    • Like 7

  7. 14 hours ago, Kas Ob. said:

    One thing though, the point of having syntax in a language is to make written in a stone or let it evolve to something better, shorter, may be just more productive.

    I am not against evolution, but that evolution must follow some basic rules - and not all rules are Delphi specific, some common language rules also apply. If you are building a castle, you cannot go ahead and add another tower by ruining the foundations first.

     

    As far as rest of your posts is concerned, I am sorry to say, but I have hard time understanding what you want to say. Maybe it is the fact that you want to design things in different order is throwing me off course, maybe it is something else, but I cannot exactly pinpoint it.

     


  8. 47 minutes ago, Kas Ob. said:

    So, what about something hybrid like this 

     

    One thing worth mentioning because you seem to take interface-class relation backwards.

     

    The whole purpose of interfaces (COM or native, or whatever) is that they are abstraction. They just define API, not the implementation. It is class that implements interface and knows about the interface, not the other way around. 

     

    In other words, interface should never ever know anything about classes that implement interface and any proposals that violate that are practically useless.

    • Like 5

  9. 1 hour ago, David Heffernan said:

    I'd far sooner use Sender in an event handler to identify the control, and then have a map to anything else.  Tag falls over as soon as you need to handle more than a single aspect.  Plus there is no type safety.

    Sorry, but I don't see how

     

    if Sender is FooButton then
      DoFoo
    else
    if Sender is BarButton then
      DoBar
    ....

    Is preferable to

     

    case TComponent(Sender).Tag of
      TAG_FOO : DoFoo;
      TAG_BAR : DoBar;
    ...
    end;

    It also gets worse if you have several Senders that perform same task - for instance, button and menu (I know that you can have actions, but actions share same caption - not always preferable, especially in non-English environments)

     

    I am aware that you can also add dictionary and map actions that way, but then you need to maintain dictionary, its lifetime, mappings and on top of that you don't have spelled out logic in place where action happens - following code through dictionary is debugging nightmare.

     

    Mappings are mappings... you can always use wrong mapping being it integer based or not.

     

    • Like 2

  10. 10 hours ago, David Heffernan said:

    I have never understood why Tag would ever be used. I mean I get it for a toy program knocked up in a couple of minutes. But not for real world code. 

    For stuffing in pointers and such... it is not appropriate, but for storing integer values that can later be used to determine appropriate action... why would that be wrong or used only in toy apps?

     

    In Delphi I never used Tag in toy apps knocked up in minutes, because they were pretty simple, but in more complex ones, especially with dynamic content and multiple entry points for actions, tag is the most straight forward thing to use and maintain.

     

    Also, just yesterday, I wrote a whole a lot of tag based code in native Xcode iOS application where native view also has tag property specifically used for determining which action you want to run. And there just like in Delphi you have Sender object that you can also use to determine appropriate action, but just like in Delphi code working with objects would be more convoluted and using Tag is preferred when you have to determine or change action at runtime.

     

     

×