« first day (2700 days earlier)      last day (2249 days later) » 
05:00 - 15:0015:00 - 00:00

3:00 PM
@SeaCharp en.wikipedia.org/wiki/Boyce–Codd_normal_form :-]
 
If you have duplicate data, split it into another table
 
I know there are extensive normalization guidelines for SQL, but I can't get too technical in this context.
 
huh. Broke my link.
@SeaCharp You probably know about basic normalisation, right?
 
@Squiggle I know some things about normalization, but just seat-of-the pants experience.
 
@SeaCharp hah. The best kind of experience. Well another rule-of-thumb is to break things up if you have loads of nullable columns in a table.
 
3:02 PM
These guys just have a habit of putting 50 fields into every table and it just.... irks me.
Right, so if it's step based, good to break it up so you don't end up with a bunch of nulls.
 
generally, yeah.
 
I don't follow any guidelines. I just go 'Meh this is irky' and break it up.
 
But they have a rule here. Nulls bother them because they mess up queries (don't get me started, ugh) so they make me put blanks in every field.
 
@SeaCharp 3rd normal form gr8
 
The good 'ol intuition-based programming
 
3:04 PM
^ exactly what Roel says. If it feels wrong, it probably is. BCNF is useful to understand if you want a technical explanation.
(BCNF = 3rd-normal-form-plus)
 
Noted, thank you
I have a hard time with confrontation, honestly. They do things weird here and I'm not going to win these battles.
 
At some point you give up, it's true.
 
So far my coping mechanism has been do the work really quickly before they have a chance to tell me to do it wrong.
 
not a bad strategy
 
I get anxiety when I have to justify my position.
 
3:06 PM
but you need to be able to argue your corner occasionally, which is where the technical knowledge kinda helps
 
You're right.
 
Normally that's not more than just using a few technical terms and pointing at a few articles :P
(not CodeProject articles though)
 
@SeaCharp at your work?
 
You don't need to be anxious, just back up your argument with reference-able information. That said, it doesn't mean that the other person will actually agree. People are quite capable of ignoring the entirety of the world, including but not limited to best practices and facts.
 
@SeaCharp if it's any consolation, all of us have been in your position before :)
 
3:14 PM
like yesterday my whole world collapsed in an argue
 
Tales from a Lotus-Notes-Devlopmentfield:

One day this fine young squirrel was learning about Lotus Scipt and the Object Oriented possibiltier of Lotus Script.
He thought himself "Wow this actually is really usefull! One can build Modelclasses for Documents and then interact with this Documents through an instance of the model class."
You see, a document holds Data stored in "Items". An "Item" has a name and you can get the Data from the Item through "document.GetItemValue('ITEMNAME')" followed by a (0) for the value in the item ect.
 
I didn't know that git stores whole files, not diffs
 
/story I believe is suitible here
 
and protected my point with my colleague.
2 v 1
but that 1 won the argument
@Squirrelintraining dynamic dynamic everywhere
 
3:18 PM
@ntohl variant variant*
 
You don't know what does a dynamic have, and 'ITEMNAME' is inside it or not
 
public clas NotesDocument
{
    public void ReplaceItemValue(string itemName, dynamic value) { }
    public dynamic[] GetItemValue(string itemName) { }
}
In c# terms
So when you use .GetItemValue("bla") you always need to specidy [0]even if you've done int i = 3; .ReplaceItemValue("bla", i);
 
3:32 PM
@Squirrelintraining that won't work
syntax error :)
 
* class
write code with class
 
oooh such spoilerino
 
kek
#busted
#vbprogrammingisshowingitseffect
##
 
Hey I have a question, if I'm working on an e-commerce kind of app and I need to generate unique transaction numbers (that do not repeat), what's the best approach for something like that?
How is it normally done?
 
3:44 PM
@Euridice01 number numbers? or IDs?
 
either or
I don't think it matters
It's just got to be unique and never repeat
 
did you consider a database-generated autoincrementing ID?
or whatever the equivalent would be if you're using a NoSQL data store, e.g. atomic stored proc
 
no
the db we are using is Oracle
but the backend is .net core
 
then it's really easy to just use an auto-incrementing identity from the database
 
user5500750
Could Int32.TryParse parse this string 12,?
 
user5500750
3:49 PM
Or 5,
 
user5500750
Or ...15
 
nope
 
user5500750
It has to be a perfect number?
 
well... it could definitely parse it
 
user5500750
Is there some exceptions
 
3:50 PM
it will just return false
you could try taking a substring from it using regex
 
@LogicDev better to sanitize your inputs if you know it's going to be ugly
 
user5500750
The string has to always be a perfect number?
 
user5500750
12123
 
user5500750
I couldn't have something like;
 
user5500750
12123d
 
3:51 PM
 
user5500750
@ntohl Great link. I have been wondering for a while whether source reference exists for .NET library.
 
user5500750
All you get is interfaces in the editor.
 
user5500750
I don't have System.Numbers in my project how do I get to use that class?
 
4:06 PM
You can add that to the project
 
user5500750
This is not part of the .NET framework?
 
@LogicDev You don't, it's internal
 
4:23 PM
Should I use a guid instead though?
and how can I prevent transactions where two users perform same transaction at the same time?
How can I make sure only a unique number gets saved and the other user gets a new number?
 
@Euridice01 there is optimistic or pessimistic locking for that
@Euridice01 You might trust the DB for getting You a right ID
a right CQRS example should tackle the conflicting states
 
user5500750
How about SQL transactions and Commit?
 
it's two time dimension. SQL transaction shouldn't lock Your data as You have it on Your screen, modify, upload it
 
user5500750
And Unique fields
 
@ntohl any good resources for looking up this info?
Thanks!
 
I'm out for now
best retards
!!quote hector
where is @Cap?
ah well, cya
 
5:08 PM
@ntohl thanks!
 
 
4 hours later…
9:18 PM
Hey one more question, should guid generation be generated in the frontend or backend?
 
@Euridice01 Depends
 
depends on what?
for transaction numbers
Like I'm creating a transaction
 
@Euridice01 All kinds of things. Your question is super vague.
 
give me a few mins, I'm on a call xD
Thanks for helping XD
Sorry about that
So I'm creating something similar to a basic e-commerce website
When I add items to my cart, I want to generate a transaction number
It has to be a unique string and it can't repeat because what if two users add items to their cart at the same time.... I don't want to use the same the transaction number
I was wondering for this unique number, should it be generated on the front-end or backend ?
Like in js or make an api call to fetch the transaction number?
@KendallFrey I'm wondering if there are any security ramifications for this being done on frontend?
 
9:36 PM
Depends
 
depends on what? haha XD
 
If the client never needs the transaction ID and the transaction ID gives access to sensitive information, then do it all on the server and never send it to the client.
 
What if the client needs the transaction ID
 
If it's possible to generate a malicious ID, don't let the client do it, since the client can't be trusted
 
E.g. the user wants to be able to search for the particular transaction at a later point
using the ID
 
9:41 PM
I think generally you do it as low as possible. Make the DB engine do it if you can, DAL if not, serverside BL if not, client if not.
 
Yeah I'm trying to be confident to my PM about this but he's like just generate on client because he's worried about collisons?
and I'm like we can add a timestamp to the guid on the server side... there will be no collisions
I don't think he understands me XD
 
I can't imagine how generating on the client would make it more collision-resistant
 
yeah I don't get it either
 
Also, adding a timestamp is useless
 
But I think he meant to say, if we generate on the client side, then two users are guaranteed to have different ids?
why is adding a timestamp useless?
 
9:44 PM
Because there won't be collisions regardless
 
We said the words "randomly generated number" (guid) and he's like well if it's randomly generated, then how do you know it won't generate the same two numbers?
 
Because statistics
This is well-documented
random GUIDs just don't collide
For the same reason monkeys don't write shakespeare
 
Any good articles I can forward to my PM xD
I don't think he believes me lol
and I'm adding the timestamp to make him feel better
lol
 
Don't fucking obfuscate your code to make people feel better
71
Q: Is it safe to assume a GUID will always be unique?

Tom SavageI know there is a minute possibility of a clash but if I generated a batch of 1000 GUIDs (for example), would it be safe to assume they're all unique to save testing each one? Bonus question An optimal way to test a GUID for uniqueness? Bloom filter maybe?

 
"you're still more likely to get hit by a meteorite than to have even one collision" LOL Love this part
 
9:50 PM
what-if.xkcd.com/19 for a fun exercise in probability
 
Would one con about generating it on the server vs. frontend is that I have to make another api call to db?
When I can just send over the info once to db when the transaction is submitted?
 
Depends
I don't know why you'd use a system that would require that
 
you mean by why a system that would show the user the transaction number initially?
It's so they can look up the transaction at a later point on the UI
 
I don't have a clue what you're talking about
 
sorry haha. which part should I elaborate?
 
9:58 PM
Everything?
 
10:29 PM
@KendallFrey I got this response from the backend guy after I told him he can do it in C#:
And similar thing can be generated in JS side as well (stackoverflow.com/questions/105034/…). So do we want to make additional API calls to generate the same?
LOL How do I respond to that?
 
I don't fucking know your situation, I don't know
 
sorry
 
11:30 PM
-1
Q: Should I generate GUID/UUID on client or server?

Euridice01I want to generate a GUID/UUID for my web app to use but I'm not sure if I should generate it on the client or server or what should be the preference. Basically, I'm working on a web app similar to e-commerce app. Here are the steps: 1) User logs into the web app 2) User can create a new...

 
05:00 - 15:0015:00 - 00:00

« first day (2700 days earlier)      last day (2249 days later) »