Jump to content

Lars Fosdal

Administrators
  • Content Count

    3524
  • Joined

  • Last visited

  • Days Won

    116

Posts posted by Lars Fosdal


  1. Totally agree on the lure of RAD UI design and how it causes newbies to write code that is both relying on states in the UI as well as in their business model, instead of the UI reflecting states from the internal model and delivering changes to that model.

    As far as possible, I try to write my code without a UI, and I try to make the interfacing between the internal business logic and the UI as simple as possible, with the UI as far as possible being oblivious about why its values and settings are what they are. I often have separate reusable classes as glue between the UI and the biz objects, so that they remain isolated.

     

    The debugger is not fine when you venture past 32-bit single UI thread.

    The 64-bit Delphi debugger leaves so much to be desired, that it is better to do the debugging in a 32-bit version of the app.

    Multi-threaded debugging - combined with anonymous methods - often causes also the 32-bit debugger to stop working - such as not resuming after a break, or no longer breaking where it was supposed to.

    Debugging code that runs multiple identical threads is a challenge as there is no simple way to specify that you only want to debug a specific thread instance.

     

    • Like 6

  2. I may exaggerate the problem, but there is a lot of abuse of the Flat UI as the new mantra of UI design. 

    Windows 10 is packed with crappy flat UI, and so are a lot of web UIs too. 

    F.x. I really miss proper use of ellipsis in menus and on buttons.  I really miss the use of actual buttons - i.e. something that clearly appears as clickable.

     

    Quote

    Also you will not find similar websites. Why applications should be similar?

    IMO - Applications are running on an OS-specific platform and should adhere to the OS behavior - so that when I change my OS skin, the application will follow, and clickable elements look the same everywhere. 

    It is called consistency and helps with guiding the user. The ideal UI is "invisible" - and that does not mean that the button element is not visible, but that the behavior is so natural, you don't have to think about it.  The UI should not get in the way of what you are using it for but lead and guide you through it so that you only need to think about what you are doing, and not about how you are doing it.

     

    For me, the best kind of skinning is the type that is able to visually adapt to the OS UI settings.

    My least favorite skinning is elements that visually distract from the flow of a UI, or that interfere with the "normal" UI metaphor for a platform.

     

    The great thing about DelphiStyles is that if the developer using it does it right - I can select a style that is pretty close to the standard OS style.

    • Like 2

  3. We sure do, because this makes me cringe.  Too much clutter.  
    That said - I also hate the currently popular naked "flat UI" design philosophy which takes away most UI guidance and makes you guess if something is a link, a button, or just text - and you have to hover and/or click in the right places to find out.

    • Like 8

  4. That said - there may be other NNTP servers out there that propagate content from the usenet/alternet groups that also are on Google Groups, but if the group was initially made on Google Groups, it is not necessarily so that it is propagated out of Google Groups.

    Anyways - NNTP appears to be a thing of the past and there are other federation protocols replacing it in some arenas. IMO, it would have been nice if they revamped it with the necessary security/authentication measures.


  5. My favorite approach is to have a connection thread handler that implements the "protocol" for the connection - using a input queue and an output queue to communicate with the owning thread, which in this case could be the main thread.  This pattern is often called using mailboxes.

    I.e. the main thread posts a "task" to the thread input queue aka inbox, the thread loops with a small sleep to poll the inbox and deals with connects/disconnects and sends whatever needs to be sent over Indy to the remote host, collects the answer, and places it in the output queue aka outbox. 
    The outbox can be polled in the main thread, or you can design the queue to post a message to the main thread, which then polls the outbox on receving the message.  Protocol errors can also be posted as outbox events.

    • Like 4

  6. For an old thread with new content, you are positioned at the first unread new comment. If all new comments are shown on that page, the thread is marked as read.

    In the case that the following new comments "spill over" into one or more new pages of comments, I am not sure if you have to visit each page?


  7. 1 minute ago, Dalija Prasnikar said:

    That part solely depends on a parser. 

    True. But changing the type of an xml field also requires the consuming xml parser to know that type has changed.

    So - if your client used the field as a number, converting the value into a double or integer - changing the content to a string would still be a breaking change, right?

    Hence, that is not really a feature of the format, since the actual interpretation depends on convention i.e. specification of parsing- and if the specification has changed, and your parser is still using the old spec - it breaks.

    But, yeah - we are off topic.


  8. 14 hours ago, Dalija Prasnikar said:

    But not very resilient to changes.

    From what point of view?

    The standard XML parser barfs when a property appears that it is not aware of, while the TJson parser simply ignores it - so in that respect, Json appears as more resilient than XML.
    Edit: FYI, We generally pass most, if not all, numeric values as a string, since that gives us the NULL we need for numeric values as well.  

    • Thanks 1

  9. Can you set the TImage canvas info to the same properties as the printer canvas? From experience, the PPI / resolution / dimension puzzle comes into effect, and if the TImage is operating with different world coordinate resolution than the printer, you run into problems with scaling.

    If you use WinAPI GetDC and GetDeviceCaps on the printer - you should be able to get the info you need.


  10. I am totally for expanding FPC to cover everything Delphi can do and more. I would welcome it and applaud it. I don't think EMBT would mind, either.

     

    Giving up their own compiler is completely different thing.

     

    However, I don't believe FPC will ever catch up. Look at attributes which are still not supported. My Delphi code won't even compile on FPC, and that is not a EMBT problem. 

    • Like 1
×