januari februari (2) maart (3) april mei (7) juni (1) juli (1) augustus september (5) oktober (1) november (3) december (2)
The order is an order is an order.
2016-09-02 15:19 anorder [permalink]
Then there was the day I decided to redesign. I had a hard time explaining. Not only why I thought a redesign was needed, but what is was exactly that I would do differently in this new design.
There would be a small distance between the data of the orders and the rest. The design would center around the idea that an order is exactly just and only that, an order. A request from a customer to have us do something. The distince between order-data and the rest wouldn't be large, it would more be something like a conceptual demarkation. In practice the order-data would be insert-only. A new order is registered, and after that read-only. This is easily explained to you, but caused shockwaves over the entrenched toilers of the company.
So to get closer to the common root of a great number of small problems, I started a design with just this, drawing up a model of reality where this is the first fact to note: the fact that an order comes in. When, by whom and for what. Not that the order is accepted. Not if it is payed for or not. Not if it's covered by customer credit or not. Not that it's cancelled or completed. Register different facts in different tables. Back to the books. Back to the 16th century penwright toiling in candlelit accounting books.
I sometimes joked that serious companies would require a stamp and signature to transfer this or that between departments. And silently I hope some still do. And even if none are left, it's up to us to see the romance in it. It's man-made structure to guide a man-made process, but it's structure and process none the less. Things break down swiftly when those go.
AES, DES (TripleDES)
2016-09-09 23:08 aesdes [permalink]
I've added AES and DES. DES may be deprecated, and Triple-DES may be soon, in any way it's cryptographically superceded by other ciphers, but still in use by some systems. I should do some work extra and change
array[0..7] of byte into
record l,r:cardinal; end; or even
int64 but I needed it only for something small and this works, so I'll leave it at that for now.
more unsolicited advice
2016-09-15 14:49 rant [permalink]
Make it look easy. Don't let any of the hard work you put in show. Hard work is what you put in onbeforehand, or need to afterwards just to keep up. So start early. Incredibly early, just because then you can still hide your beginners mistakes. Don't believe the crap the others are selling. They don't know. People that know won't just tell you. You could ask them, but in general they won't feel like telling you. Unless you can show you're determined to make it work. Resolve is currency, it buys you stuff. Just keep sure you buy the right stuff from the right people. People tell you to commit, but sometimes you need to let go, especially when it's clear it's not right for you. Be sure to break cleanly though, if you part rough it might cause more trouble than it's worth. Sleep. Right before you get tired the part of the brain shuts down that picks up what's going wrong because you've been up for too long. Wrap up slowly, calm down, drink, eat, wash, then sleep, enough. There is no sleeping when you're dead. Anything looks much better with a fresh head. Don't fear change. Change make a difference, and that holds people down. Just learn about what is going to happen, whether you make a change or not. Use that to keep control, to stay ahead of things. This one is hard: don't get angry. If you get mad it's because it's not clear why it's wrong. Find that out first. Check if you're even sure what is it at all. Then instead of getting livid, attack the misunderstandings. There are always misunderstandings. Even perhaps with you yourself, be sure to check. That's about it. One more thing, tough: have fun. Not always, some things are really tough. But as much as possible: have fun.
Delphi and MySQL or MariaDB
2016-09-15 21:12 libmysql [permalink]
Tadaa! I added a wrapper around libmysql.dll (to connect with MySQL or MariaDB) to my collection of really (really!) thin wrappers around things like ADO, or LibPQ (to connect with PostgreSQL) or now libmysql.dll. I also had the idea to align them as much as possible into almost the same interface. It's specifically not my point to have them be exactly the same, but very much almost so, just in case when I use this for a project and need to switch database back-end later on, the work that goes into that is minimalised and can concentrate around the different in SQL dialects. (for example the postgres branch here)
xxHash: an extremely fast non-cryptographic hash algorithm
2016-09-23 23:50 xxHash [permalink]
I'm slowly but surely (finally!) working towards a (long overdue!) rewrite of DirDiff, but this time using threads and perhaps a different algorithm. Apparently there's still progress to make there, and I read good things about the diff git is using internally. Looking into that, some performance can be gained by doing the actual comparing on hashes of the data, instead of all of the data itself. Which lead me to xxHash, which should hit the sweet spot between fast enough and safe enough against collisions. (Unless I misunderstood.) I'm not sure if anyone thought of combining those two. But I may be looking into that for DirDiff 2... But since I didn't find a Delphi implementation rightaway, here it is, and it fits nicely with this collection of other hashes I did before. (Though xxHash is specifically a non-cryptographic hash...)