« first day (450 days earlier)      last day (3554 days later) » 

11:03 PM
@nhgrif I totally agree with you on "acronym tags". An tag would do nothing to help anyone find/filter questions and answers, for instance.
I always assume that someone who is writing database code knows or at least should know about ACID if they don't.
 
It's not even about the fact they're acronyms.
Although in this particular case, I don't know what most of the acronyms mean.
 
Right, it's just not useful information I feel
 
Like ACID, don't know what that means.
Didn't know what DRY, or SOLID, or SRP were, even though I do as best I can to stick to the things they stood for.
 
> In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably.
In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction. For example, a transfer of funds from one bank account to another, even involving multiple changes such as debiting one account and crediting another, is a single transaction. Jim Gray defined these properties of a reliable transaction system in the late 1970s and developed technologies to achieve them automatically. In 1983, Andreas Reuter and...
Writing by ACID standards, you would rarely use auto-commit SQL for anything but trivial things (like update a phone number or whatever) everything would be wrapped within a start transaction ... commit ... rollback
Which is something I need to start doing myself
Speaking of which, I need to get with someone who is more experienced at this, I wouldn't know where to begin in writing commit and rollback conditions and using control of flow
(i.e., advanced SQL)
 
In MS SQL at work, we usually check for an error condition
And we have output varchars in a lot of our SPs to describe the error
IF @@ERROR <> 0 BEGIN
    SET @Error = 'There was an error';
    ROLLBACK;
END ELSE COMMIT;
4 answers to this question now... not sure if that's a good thing or not:
6
Q: Decision Table for the Movement AI in a Game

bazolaI posted a question on Stack Overflow about how to implement Decision Tables in Objective-C after reading about them for the first time in chapter 18 of Code Complete. Nobody provided an answer, so after puzzling it out for a while longer, I created the following code for the movement AI of the ...

 
11:21 PM
@Phrancis Thanks for the link, I must have seen it before because I've voted on it!
 
0
Q: Why is my image not centered in the middle of the page?

user3885957 <! doctype Html> <html> <head> <style> h1.color {color:blue;} </style> <style> .img.center { display: block; margin-left: auto; margin-right: auto; } </style> <body> <title> Google </title> <h1 class="color">this is blue</h1> <img src="https://www.google.com/images/srpr/logo11w.png" ...

 
@nhgrif help me understand @@ERROR is global error (as in built into SQL) while @ERROR is local to that query... right?
 
Yes.
 
@CaptainObvious off topic...
 
Well, @Error is an OUTPUT parameter to the query
spDOSTUFF for example might take two arguments, one an int, the other a varchar(400) output
Which local to the SP is known as @Error
 
11:27 PM
Ah, makes sense
 
@@ERROR I believe holds an integer value, they're error codes... so if you cared to look them up, you could write various messages for the different possible error codes
The examples there are good, except instead of just returning, you might also rollback or commit
You can also try/catch in SQL
 
I don't like SQL Server N'MyVarchar' notation, you would think the N would be on by default
 
BEGIN TRY
    BEGIN TRAN
    -- do stuff
END TRY
BEGIN CATCH
    ROLLBACK
    RETURN
END CATCH
COMMIT
 
I knew about DRY @nhgrif. The others are recent additions to my vocabulary.
You should commit from inside the try, no?
 
Oh yeah, probably.
COMMIT as last line of try block.
 
11:33 PM
I'm not great at it @Phrancis, but I've had to use the control flow stuff a bit. I only know TSQL though.
 
I'll have to start doing some CTFM work for PL/pgSQL
 
Anyone have the time to put down 1 vote and get this off the unanswered list?
0
A: Secure CURL to & handle response from Payment Gateway

Alex LWell, security from what type of threat? You need to figure out what you want to protect against before you can protect against it! Since I'm unsure of what you're protecting against, I'll point out relevant setopt flags. CURLOPT_VERBOSE - This is fine for a developer, but make sure the client ...

Thanks! It was bugging me that I kept seeing it there...
 
11:58 PM
You've got it in 2 min @nhgrif. Good answer.
 

« first day (450 days earlier)      last day (3554 days later) »