C – File Functions

Background Wanted to package up a couple of functions in the C Language that allows one to determine if a file exists. And, also to get the file type and last modification time. We rely in the C function, stat. Coincidentally, it is both a structure and a function. Outline Functions isFileExistsStats Passes file name … Continue reading C – File Functions

ODBC – API – SQLBindParameter – Date, Time – Timestamp – Error Messages

Background Wanted to highlight a few less than intuitive error messages one can run into when trying to work on dates using the SQLBindParameter. BTW,  our programming language is C and ODBC. Code 1) DATE_STRUCT // SQL_C_TYPE_DATE // SQL_TYPE_DATE Code Output 2) SQL_TIMESTAMP_STRUCT // SQL_C_TYPE_TIMESTAMP // SQL_TYPE_TIMESTAMP Code Output 3) SQL_TIMESTAMP_STRUCT // SQL_C_TYPE_TIMESTAMP // SQL_TYPE_TIMESTAMP … Continue reading ODBC – API – SQLBindParameter – Date, Time – Timestamp – Error Messages

Transact SQL – using xp_sscanf to parse input ( Parse Bible Verse )

  Background Let us use xp_sscanf to parse Bible Verse. Introduction Bible people will say my hope rests on John 3:16 An inquiry mind might want to look up John 3:16. In his or her mind, he will break those words down. In computer jargon, one will tokenize it. Tokens Here are the tokens :- … Continue reading Transact SQL – using xp_sscanf to parse input ( Parse Bible Verse )

C – using sscanf to parse input

Background Let us use the C function, sscanf, to parse input. Bible verse Let us say we want to accept bible verses and interpret the input. Example Input Genesis 3:1 sscanf Format %s %d:%d Code Outline Function - requestVerseInput Prompt :- printf Accept Input gets Display Display accepted input Function - parseVerseInput Reset variables sscanf … Continue reading C – using sscanf to parse input

Sharing Code Online – IBM.COM – “SQLDriverConnect() – Use a connection string to connect to a data source”

Background One of the interesting things about blogging is the headache of sharing code online. It is just cumbersome. Sample Courtesy of IBM, here is how teary eye things can be. SQLDriverConnect() - Use a connection string to connect to a data source Link Items Display failure return code Display "completed connection string"; which is … Continue reading Sharing Code Online – IBM.COM – “SQLDriverConnect() – Use a connection string to connect to a data source”

David Heinemeier Hansson – Good Programmers

David Heinemeier Hansson Medium Writing for Medium, Christophe Limpalair ( from Linux Academy ) interviews David Heinemeier Hansson. The post is here. Points Here are some good points from the post. Code Presentation Code Quality Bad Looks Having methods that are 15 lines long and do 5 different things Tons of global variables Poorly named … Continue reading David Heinemeier Hansson – Good Programmers

Software Design – Programming – Language (Coding)

Software Design - Programming - Language (Coding) Everyone needs to learn a new Software Language or quickly convert one's thought in one language construct into another. If you do, consider using "Rosetta Code". Basically, it is the WikiPedia of Software Programming Languages. A list of existing Code Tasks... http://rosettacode.org/wiki/Category:Programming_Tasks If you are looking to write … Continue reading Software Design – Programming – Language (Coding)