|
Spatial posted:"The Unstoppable Will of Code" Sieg++
|
# ? Feb 22, 2019 18:35 |
|
|
# ? May 24, 2024 21:46 |
|
Oops I got it wrong the actual quote was "The steadfast iron will of unstoppable code" lol
|
# ? Feb 22, 2019 19:42 |
|
Athas posted:Really? I can come up with a ton of ideas for a pure functional language that I expect from the kind of mind that would create Solidity: Are you saying that's what it was before they said gently caress it and went with an imperative structure?
|
# ? Feb 22, 2019 20:31 |
|
Athas posted:Really? I can come up with a ton of ideas for a pure functional language that I expect from the kind of mind that would create Solidity: Hey, I just had an idea for a new cryptocurrency.
|
# ? Feb 23, 2019 01:01 |
|
Had a weird one. I'm looking over code that takes in IDs and returns search results for them. There can be a series of comma separated IDs, or a magic number built in, zero means "return all results". So the guy wrote this:code:
|
# ? Feb 23, 2019 02:42 |
|
Scaramouche posted:Had a weird one. I'm looking over code that takes in IDs and returns search results for them. There can be a series of comma separated IDs, or a magic number built in, zero means "return all results". So the guy wrote this: What is it even meant to do? Extract the individual ID values to query on?
|
# ? Feb 23, 2019 10:50 |
|
Cuntpunch posted:
Someone who didn't know that strings have null as their default value wrote this ten years ago and then it cargoculted from there. Also, I'm new to C# and serious coding so I'm really looking forward to see my code in here very soon.
|
# ? Feb 23, 2019 12:29 |
|
I assume there's no constructor that ensures _text has a value.
|
# ? Feb 23, 2019 14:21 |
|
megalodong posted:What is it even meant to do? Extract the individual ID values to query on? The IF is a pre flight check to see if the IDs are null or zero, of not split the string into comma separated list. However the way he checked for zero is particularly problematic
|
# ? Feb 23, 2019 22:43 |
|
Scaramouche posted:The IF is a pre flight check to see if the IDs are null or zero, of not split the string into comma separated list. However the way he checked for zero is particularly problematic oh i was so confused but all the other problems that i didn't even notice that.
|
# ? Feb 24, 2019 01:28 |
|
Spatial posted:Oops I got it wrong the actual quote was "The steadfast iron will of unstoppable code" lol mooooooods
|
# ? Feb 24, 2019 12:00 |
|
https://twitter.com/sghctoma/status/1089906975167660032?s=19
|
# ? Feb 24, 2019 15:10 |
|
i'm the signed byte. thanks sun microsystems
|
# ? Feb 24, 2019 15:43 |
|
Suspicious Dish posted:i'm the signed byte. thanks sun microsystems literally the worst thing about java. gently caress having to litter my code with "& 0xFF" everywhere whenever trying to do literally anything with binary data. "we can't have any unsigned integer types, they'd confuse everyboyd" *makes char an unsigned integer that's too small to hold the full range of character values*
|
# ? Feb 24, 2019 16:11 |
|
zergstain posted:I assume there's no constructor that ensures _text has a value. Oh of course not, this is the single constructor and - irrelevant to this little nibble of bad code - owing to the structure of things, that *specific* argument will always be non-null, since these are being created out of a factory that error-checks on null before calling this ctor.
|
# ? Feb 24, 2019 18:23 |
|
Oh, sorry, I had been thinking that was a method. Guess it didn't register with me that it had the same name has the class. Yeah, so that was my only idea as to how that little code snippet could accomplish anything. Wouldn't you want the ctor to be private or something to ensure the class can only be instantiated via the factory?
|
# ? Feb 24, 2019 21:09 |
|
Not in Foo no, I think Foo is not the factory, but they're saying whatever creates the string argument is
|
# ? Feb 24, 2019 21:17 |
|
The example is trimmed down, but there's a lot of things that look like Foo that are instantiated reflectively as part of a plugin style architecture. So we have a separate class for loading these that handles the creation of the string, and then passes it in as an argument to these ctors. But that also handles the default case, so no nulls will get passed anyway.
|
# ? Feb 24, 2019 21:53 |
|
Because this is how we self-implement permission systems in TYOOL 2019.code:
|
# ? Feb 25, 2019 05:23 |
|
That ts? Does run on the client???Hammerite posted:I'd never heard of the product this relates to, though it is apparently a .NET framework language. Do you really think it's probable that Cuntpunch's coworkers got it from there? At the risk of generalising from my own experience, I assume that most C# programmers also haven't heard of this thing. It has fewer than 300 questions on Stack Overflow, which surely is hardly anything. I think Microsoft Dynamics has one if the larger market shares for ERPs but not sure if that's just AX or thier NAV and CRMs combined. But you need to look for axapta on stackoverflow since thats what it's called before Microsoft bought it out. Much more results that way than searching X++ or xpp. Google makes it near impossible to search X++ anyway because of C++. I don't think it is probable. Just pointing out the similarities. X++ doesn't have constructors anyway. e: Well rather it does, they're just protected statics and you're not supposed to init anything in them. Instead they want you to write a static method that calls your new foo, then sets the params/properties and returns your class. Of course there's no standard naming and no overloading so you see poo poo like: SalesLine::init(); SalesLine::initFromSalesTable(); SalesLine::initFromSalesLine(); SalesLine::initFromPurchLine(); SalesLine::initFromSalesQuotationLine(); And it wouldn't be uncommon to look inside SalesLine::initFromSalesLine() and see it call init, then query the salesTable and use it to call initFromSalesTable. itskage fucked around with this message at 08:02 on Feb 25, 2019 |
# ? Feb 25, 2019 07:29 |
|
itskage posted:That ts? Does run on the client??? No, it's a node app that connects to a db (credentials committed to the codebase) with all db instructions wrapped in async promises that immediately wait for completion.
|
# ? Feb 25, 2019 08:19 |
|
Trammel posted:Because this is how we self-implement permission systems in TYOOL 2019. We do something like this at work. It sucks and we hate it. We need a better way, but we’re not sure what yet, nor do we have the time.
|
# ? Feb 26, 2019 15:32 |
|
A place I worked had a nightmare of a permissions system, because it had to be ~~~totally dynamic~~~ so the frontend devs could modify it, without talking to the backend devs. (It never worked out that way, of course.) We finally started to make some headway on it when we forced ourselves to separate Roles from the Authorities they granted. Our code had been doing isAdmin() checks in some places and canEditWhatever() checks in others, with the end result being that nobody could remember what each Role was supposed to be able to do. On top of that, some of the Roles were progressive, in that they were supposed to grant every Authority that every Role below them had, while other Roles were stand-alone. We finally had User objects with a single Role ID for which ranked Role they had, along with a many-to-many map of Users to Roles for the unranked Roles. Each Role had a many-to-many map to its granted Authorities. The Authorities were an enum in the code and all permission checks in the code were only allowed to check Authorities. Took us years to figure that out, ugh.
|
# ? Feb 26, 2019 16:46 |
|
Trammel posted:Because this is how we self-implement permission systems in TYOOL 2019. As somebody who's worked on video games, this is giving me flashbacks. So many of them have a global struct of bools for things like userHasExploredForestTemple.
|
# ? Feb 26, 2019 18:04 |
|
xtal posted:As somebody who's worked on video games, this is giving me flashbacks. So many of them have a global struct of bools for things like userHasExploredForestTemple. My favourite was an engine that had std::list<int> visited; where the list entries were the CRC32 values of the internal nicknames for every selectable static world object.
|
# ? Feb 26, 2019 20:19 |
|
Blockchain scripts shouldn't be any more complex than what bitcoin has planned. Unbound loops in a blockchain script interpreter is a really really dumb idea. Even the scheme where scripts fail on time-out or count-out is terrible. Blockchain scripts don't need to be turing complete to be useful. They're really more useful with those boundaries in place.
|
# ? Feb 27, 2019 05:24 |
|
dougdrums posted:Blockchain scripts shouldn't be
|
# ? Feb 27, 2019 05:48 |
|
dougdrums posted:Blockchain shouldn't be
|
# ? Feb 27, 2019 07:17 |
|
dougdrums posted:Blockchain scripts ... a really really dumb idea.
|
# ? Feb 27, 2019 11:12 |
|
Look, guys, don't worry, no matter how dumb blockchain projects get, at worst they're going to be a money sink for gullibe VCs. They're not going to affect normal people in their everyday life or their basic necessities.
|
# ? Feb 27, 2019 11:54 |
|
Actually, replacing the current fiat money systems and the finance oligarchy with the blockchain will ensure unprecedented equality of wealth for humanity. We'll all be poor.
|
# ? Feb 27, 2019 11:58 |
|
The problem I can see is that since everyone is treating blockchain as a joke, within five years, you're not going to be able to compile anything without blockchain being involved, because anything that big a joke is going to have to become integral to your product's build tools.
Bruegels Fuckbooks fucked around with this message at 16:51 on Feb 27, 2019 |
# ? Feb 27, 2019 16:01 |
|
But I already use Git?
|
# ? Feb 27, 2019 16:12 |
|
Munkeymon posted:But I already use Git? G-g-g-g-g-gitchain!?!?!?
|
# ? Feb 27, 2019 16:16 |
Bruegels Fuckbooks posted:The problem I can see is that since everyone is treating blockchain as a joke, within five years, you're not going to be able to compile anything without blockchain being involved, because anything that big a joke is going to have to become integral to your product's build tools. okay, look, hear me out nodejs on the blockchain
|
|
# ? Feb 28, 2019 00:11 |
|
Jazerus posted:okay, look, hear me out
|
# ? Feb 28, 2019 00:41 |
|
Hello I would like to purchase some gitcoins
|
# ? Feb 28, 2019 05:05 |
|
Is it too much to ask what's so horrific bout blockchain? Apologies in advance if so.
|
# ? Feb 28, 2019 06:23 |
|
Nude posted:Is it too much to ask what's so horrific bout blockchain? Apologies in advance if so. it's a solution in search of a problem. the idea is like, say you don't have a secure place to store a transaction log. if you distribute that transaction log to a bunch of people online, and do a bunch of bullshit with digital signatures, people invest money in your company. of course, you still don't have a secure place to store your transaction log...
|
# ? Feb 28, 2019 07:29 |
|
|
# ? May 24, 2024 21:46 |
|
Bruegels Fuckbooks posted:it's a solution in search of a problem. the idea is like, say you don't have a secure place to store a transaction log. if you distribute that transaction log to a bunch of people online, and do a bunch of bullshit with digital signatures, people invest money in your company. of course, you still don't have a secure place to store your transaction log... Am I wrong to find that Blockchain is being split into two definitions these days? The first is the 'original' meaning, which involves Work of Proof nonsense ala Bitcoin. This is basically just a roundabout way to feather the accelerator for rising sea levels. The second is the 'free VC money' meaning, which is basically what git does. When we talk about things like chain of custody solutions, I don't see any reason why we'd be talking about the original meaning, but the latter meaning seems like a 'of course you'd want to do something like this, but now if we say Blockchain, we get showered in cash' opportunistic thing.
|
# ? Feb 28, 2019 07:49 |