Jump to content

aehimself

Members
  • Content Count

    1030
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by aehimself


  1. With all respect, I don't think Git structure is the root cause here; refactoring the 850 EXEs to one single application plus modules (not necessarily .DLLs) would worth more on the long run in my opinion.

    Most of us, Delphi developers were hired to maintain old, large (and often poorly written) legacy applications; I know how likely the management approves 1-2 devs to "break free" and start re-designing everything.

    But, with properly structured and divided code, you'll quickly see that there will be no need of mapping one git repository to a number of drives.

     

    Thus, achieving your current goal to reduce merge conflicts.


  2. I'm using String for string everywhere with no noticeable performance penalty (although, I never had to write performance-critical programs so far). If I know that encoding is in the game (e.g.: receiving data from a web browser) or I'm working with binary data I'm using TBytes.

    Pretty happy until now.

    • Like 1

  3. 1 minute ago, Anders Melander said:

    I'm doing incremental backup and I rotate media every one or two weeks so it's not that bad. The "other house" is right next to the main building and the cabinet is in my workshop, right next to where I keep the beer, so it's nice to have an excuse to "go file the backup".

    Damn it. First of all, have the highest possible levels of my admiration.

    As for the location... damn it again. I should re-structure my IT equipment at home.


  4. Just now, Anders Melander said:

    At home I'm doing rotating backups to disk. The disks are stored in a non-fireproof cabinet in another building.

    If you mean you physically remove and transport disks between houses on a regular basis for years, you have my highest possible admiration. I'm just too lazy to do that, I give up after a month or two.

    I still have so much to learn 😞


  5. First things first, I am horrible in UI design. With that said...

     

    Considering the fact that one main step can not change without all the sub-steps complete, my main UI would only show the currently active step.

     

    "Project XY is in Pending Signoff state"

    list of substeps below, with a fancy green checkmark right next to the substeps already accomplished. Don't make a dfference between optional and required ones - the main step will change anyway if all required ones are completed.

     

    This applies to the user and admin interface too. I don't really care when the previous main step's substeps were completed if my only purpose is to approve something / check how my thing is progressing. Have a history, as a side menu option.

     

    But then again, I am really, really bad in UI design. It's just how I would do it.

     

    Edit:

     

    image.thumb.png.6ae4eaaa856209f56ae7d4b11a76645c.png

    • Thanks 1

  6. 15 minutes ago, Anders Melander said:

    No. You want your media isolated from anything that can damage it.

    That is a really valid point. So you need 2 fireproof safes. 1 for the library, 1 for the server 🙂

    15 minutes ago, Anders Melander said:

    That includes the backup device.

    That is not possible. How are you writing data on a media, which is not physically in a drive?

    Again, I am strictly talking about home-use "hacky" but safe-enough solutions.

    17 minutes ago, Anders Melander said:

    400 EUD will get you started and I'm sure they can be had for a fraction of that second hand.

    I have trust issues. I'll not buy critical equipment (like a fire extinguisher or car tires) second hand. If I want my data safe - brand new safe. If not - no safe at all.

    400 EUR is a bit off the hobby limit in my opinion. But then again - how much one is willing to and how much one can spend on their hobby is a subjective factor.


  7. 1 minute ago, David Schwartz said:

    You don't have to keep telling us here that you're allergic to anything but mag tapes

    I'm not. I'm not even using mag tapes, they (and the drives + libraries) are too expensive for a hobby. I'm just accepting the opinion of smarter people than me, who still describe the ONLY valid (local) backup medium as tapes. I'm not that good in physics, but the industry standard have its tests.

    I'm only strictly against calling flash-based devices as backup. They are not that reliable. End of story.

    6 minutes ago, David Schwartz said:

    But replacing it with cloud storage kind of negates the whole idea, so don't bother to go there.

    Never said that. Cloud backup is a valid option. I never did - and will never - discourage people of Cloud-based backup. I just have trust issues, but that's my own business.

    8 minutes ago, David Schwartz said:

    BTW, why is it that so many people who are allergic to paying anything for software seem to have no problem paying for cloud storage when they can roll their own using an old computer, whatever storage medium they prefer, and free software?

    I mean, that's basically what I'm suggesting here -- save yourself $100/yr in cloud storage fees by using free stuff and things you're already paying for.

    I'll bet almost anything that at least half of the people here (and majority of IT geeks around the globe) do this. We are happy to spend the price of a house on a backup server for our company but private life is different - if it is still a hobby.

    People usually pay because they need GUARANTEE. What happens if your house and your friends house catches fire at the same time?


  8. Yes, it does (but I don't know since when):

     

    Type
     TMyClass = Class
     public
      Class Var Counter: Integer;
      Constructor Create; ReIntroduce;
     End;
    
    Constructor TMyClass.Create;
    Begin
     Inc(Self.Counter);
    End;
    
    Procedure TForm1.Button1Click(Sender: TObject);
    Var
     v1, v2: TMyClass;
    Begin
     v1 := TMyClass.Create;
     v2 := TMyClass.Create;
     ShowMessage(IntToStr(TMyClass.Counter)); // Will show 2
    End;


     


  9. 11 hours ago, Angus Robertson said:

    Change to using the TIcsMailQueue component, you prepare email using THtmlSmptCli after which you forget about it while a thread tries to send the mail using several mail servers over several days, all queued.

    That's actually quite impressive, I didn't know ICS has these functions built-in! Simple question - does it (or offers a way to) handle backlogs? What happens if an E-mail could not be sent because no connection could be made and the application shuts down?


  10. 6 hours ago, dummzeuch said:

    I'm not sure whether I'd care much about Delphi projects when my house burns down.

    Well said. That would be my last concern too, especially since I have offsite replication of my upstream git repositories 🙂

    7 hours ago, dummzeuch said:

    I don't have a house, I live in a rented flat, so maybe I would care.

    <OFFTOPIC>

    If there are no swarm of mosquitos, it's quite pleasant to have your morning coffee / lunch / dinner outside. On the downside - a house will ALWAYS keep you busy. There is no such thing as "I'm bored" it's only "I'm lazy to do this and this" 😄

     

    <EVENMOREOFFTOPIC>

    I had a landlord once. She was a living creature from hell. Even though I had good relations with the neighbors and paid on time, after a couple of months I was already afraid she is going to poison my dog so I decided to cancel our contract and move out to nowhere. That was the last nail in the coffin - I do not trust people ever since and I do everything in my power not to depend on anyone.

    </EVENMOREOFFTOPIC>

    </OFFTOPIC>


  11. 8 minutes ago, FPiette said:

    It is possible to have some kind of fireproof safe. In a company I worked for, they have such a safe.

    My wife already looks suspicious when I tell her we take the car to the mechanic and it's going to be expensive. I don't even want to imagine convincing her why I need a fireproof safe, which costs triple the amount than our car.

    At home you'll quickly get bored of rotating backup mediums and locking them away. You'll want your backup equipment INSIDE the safe so it can do everything automated. As safes SHOULD act as a perfect Faraday-cage, unless they include a fireproof RJ45 socket wired from the outside in...

    I'm not saying anything more. I'll trademark this stuff 😄

    • Haha 1

  12. 17 hours ago, Edwin Yip said:

    BTW, what do you mean by "burnt myself" in this context?

    It was outside of the IT area, a real-world thing. Unfortunately I can not remember (happened a long-long time ago) but for example:

    - I have a personal problem with John Doe, and he writes an application

    - Since I don't like him, I start to talk sh*t and discourage people from using his product

    - Everyone is still using it. Then, it turns out it has a bridge to some inconvenience I faced for years

    - I start to use it because of that minor thing and it turns out the application is pretty good

    - Now, try to explain to everyone you discouraged why exactly you are now a user too

    - ???

    - Profit

     

    Fortunately, the only thing I achieved is my own humiliation, no legal stuff. It was still a remarkable experience.

    • Haha 2

  13. 9 hours ago, haentschman said:

    ...yes.

    What if your house burns down? All data that cannot be restored, especially the Delphi projects, must be transferred to the data center outside the house. (Webspace/Webserver) :classic_cool:

    Proper backup solutions require the backup area (including servers and libraries) to be physically separated to different buildings. Thus, production center burns - you still have backups and vice versa.

    I also run a machine with extremely low power consumption kilometers away from my house. It's only job is to replicate the data from my prod server, when network is up.


  14. 3 hours ago, Edwin Yip said:

    maybe the Delphi community/market is very small and we really need quality libraries and components.

    That is true; more that true actually. I remember back in the 2000s browsing Torry's Delphi Pages for components and I was not really able to choose from the incredible amount. Oh, and I remember how many were free!

    3 hours ago, Edwin Yip said:

    And my past experience shown that when a Delphi library/component is advertised as fast, it's usually fast, at least it proves the author really has a passion, or really tried to make it fast.

    Don't get me wrong, I'm not going to judge anything I have no experience with. Been there, done that, burnt myself, never again. I just gave an unpleasant grin to the "marketing".


  15. 42 minutes ago, David Schwartz said:

    Whatever you might think of SDs, I guarantee they won't decompose the way old magnetic media does over time.

    Ah yes, We used to compost floppy disks 😐 I already imagine the next-gen "uSD libraries" in data centers. At least the replacement drives would be cheap to order from Wish.

     


  16. 5 minutes ago, Lars Fosdal said:

    I love SSDs and I have not had one fail yet over the last six years.  HDDs, on the other hand, has failed me numerous times.

    As for backups - Online, multiple services = redundancy.

    The amount of numbers HDDs failed on us more is because SSD is much-much younger than HDDs are; but I already experienced SSD issues too. I still have an SSD in my laptop and in my dev server (with OS drives of guests on it) and they are still error free. I love them too; we all love them. But their lifespan is shorter than a HDDs - especially if we don't let that HDD to stop 🙂

     

    Edit: online backups are nice and should be safe enough. I just happen to be paranoid enough not to trust any big company.

    • Like 2

  17. Ahaaaa, makes sense. This is how IRC worked.

    To have a "private" chat, you have 2 options:

    1, Look in the source of the OnReceive event of the server. Instead of sending the received message to everyone, if the message contains a special flag, send it to one recipient only. For example, if you start your message with "@IP" then it will look for all connected clients, and where the IP address matches - send the message only there

    2, A more secure way is if you initiate a DCC-like (again, IRC did it this way) channel. If the message starts with @IP DCC, the server will send your IP address to @IP. Then, on your client, you open up a server socket and wait for a connection from @IP.

     

    Long story short, wither your message will travel around the network twice (thus, more vulnerable) or you have to establish a client-server connection directly between the TWO CLIENTS:

     

    image.thumb.png.4731987ec97add148fb6a90d5feb47f7.png

    • Like 1

  18. I know, it was only my very personal opinion and yes, I can be wrong. I guess - unless a component is really badly written - I doubt that it can cause slowdowns (there can be specific high-end cases where the design can cause a bottleneck but that's an other story).

     

    Back to your question. Usually there's not much to set a TCP connection up. You need a server (listener) component and a client (which is connecting to the server) component. Set the port number to the same, set the server and the client to active and it should work.

    Sending data is a completely different topic. Are you using text-based or binary communication? For text, most components have a .SendText method which will accept a string parameter. For binary - I don't think we want to go there just yet.

    Now look for events of said components. There should be something like... onReceiveBuf, onReceiveText, onDataAvailable... something like this - you have to handle those. And within that event handler, you have to read the data out of the socket with... socket.Read socket.ReceiveText, socket.receivebuf or something.

    Unfortunately that's all I can say, as I never used this component.

     

    Did you look at the Demo folder? There seems to be a chat application - just the one what you are looking for.

    • Thanks 1
×