|
Well, I have to admit, I did not fully understand your request in your original post.
Let me ask you: is your solution working, and working - acceptably? If so, why second guess yourself? This type of stuff is like ETL work. Everyone has a way of doing the work, and everyone's way is the correct way, more or less. It is not exact science.
|
|
|
|
|
I figure it's best to learn if possible rather than re-invent the wheel. I respect my fellow developers.
Think of the fault tolerant Retry solution I came up with. It took me a long time and it consisted of a string that indicated Process_RetryCount. When I found someone else's solution it had
Process_RetryCount_DelayToNextAttempt. That was a slick bit of improvement I would have used if I had known it up front (code was too complicated for me to want to change without compelling reason).
Right now I'm enhancing my current model of c_Field by adding reflection. That way I can use NewtonSoft to serialize c_Client to JSON. My requirements are a bit odd, so I was just looking for good ideas. ... Oh yah, talk about problems, try PDF scraping. Tabula should do it.
|
|
|
|
|
We do PDF scraping where I work, both forms and OCR.
|
|
|
|
|
Ahh, stringly typed code, once again!
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Strongly typed code is so overrated. Just make everything a string and throw validation to the wind.
|
|
|
|
|
That's the old VB and Variant school!
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Maybe no one has done anything like this before...
I don't care about Ducks, Geese, vultures or pelicans or even feathered dinosaurs. It doesn't matter in the slightest what notation I used.
I'm not looking for a technical discussion or code, I'm looking for a conceptual discussion or perhaps even ideas for search words.
Here, have some codish stuff and think about this... No whining please. Just good, bright, positive, helpful thoughts. Maybe you can learn something... Maybe from someone who has done this before and has some conceptual thoughts on it. Otherwise you are saying I came up with a completely new idea or certainly one you haven't thought of and I am sure you don't want to do that.
List<c_Field> Lst_c_Field = new List<c_Field>()
DataSet ds = new DataSet()
foreach(c_Field cField in Lst_c_Field)
cField.sDataFromDatabase = ds.Tables[0].Rows[0][cField.sNameInDatabase];
Then I can parse from my screen scraping and add values to other c_Field(s) in Lst_c_Field based on their sCaption. Compare what you got from the database and from the screen scrape and you could then generate an update statement for the database... for that Client
|
|
|
|
|
Well, I've seen your construction before.
It's known by many names, such as MUCK (Massively Unified Code-Key), OTLT (One true lookup table) and EAV (Entity Attribute Value) for example.
And it's generally not a good idea.
I won't bore you with my own experiences since I saw the problems in time. So read this [^] instead.
<edit>And another one[^]</edit>
|
|
|
|
|
I really like your signature... It is true! Evil must be defeated! (I happen to be writing a book on morality currently.)
Very cute article, but since I am all those roles, it should work out... If only I could get Jack (my personality #3 - handles database code) to quit just repeating "burn them, burn them all" again and again... but he always does that anyway.
I do understand the objection, but my database is pretty well set.... mostly varchar, date and some int keys. It's the conversions between them that is an issue. When parsing from scraped PDF or HTML, I have to have the the string literal indicating what I am scraping such as "First Name:" or "Date of Birth:" and the value scraped, so there are two strings in the c_Field object. Then there is the name in the database "FirstName" and "DOB" with their values "Chucky" and "01/10/2017". Then the length in the Db and the data type. Add OutputCaption, DataSource and Error and you have a description of a data member that can be put into a data base or... use reflection to populate the data members of the class (with or without the same name as in the Db)... since there is reason for me to serialize this to JSON. It is parsed on one machine with no good connection to the machine that consumes it. Oh yah, it becomes part of an HTML page displayed in a Win Form Web Browser Control.
Partly it seems sort of cool too. Besides, the same stuff that keeps my MAR Clap at bay holds off the fever. Really, if that isn't enough explanation for why this is difficult, realize it's for my wife.
|
|
|
|
|
Well, conversions shouldn't be a very big problem. That's just a lot of work.
Your serious problems start when you need to put relations and constraints between the different entities.
But if you don't need relations and it's only a common lookup table where you have proper checks for your data in place, then go for it.
|
|
|
|
|
|
And he obviously edits Wikipedia pages: Universaw Synchronous/Asynchronous Receiver/Transmitter - Wikipedia[^]
Quote: The USART's synchronous capabiwities were primariwy intended to support synchronous protocows wike IBM's Synchronous transmit-receive (STR), Binary Synchronous Communications (BSC), Synchronous Data Link Controw (SDLC), and de ISO-standard High-Levew Data Link Controw (HDLC) synchronous wink-wayer protocows, which were used wif synchronous voice-freqwency modems.
By the way, does anyone happen to know a USART besides the Intel 8251 or the Zilog types?
Edit: I'm glad I posted a quote from the page. It's now back to normal. Did anyone edit it?
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
modified 10-Jan-17 8:58am.
|
|
|
|
|
|
Microcontrollers are not an option. I want to interface PS/2 keyboard and mouse or possibly SPI EEPROMs to an old 8 bit processor. The Intel 8251 looks about right and probably could read input from a PS/2 device, but not send anything to them. SPI also would not be a problem if I could figure out wether or not it can use the same serial clock output for sending and receiving.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
This might become slightly off-topic here in the lounge:
Does it care how the interface device is working internally (dedicated interface chip, or programmed FPGA or micro controller)?
SPI and I2C can be implemented in software (done that for I2C). For both, the master is generating the clock used for sending and receiving (I2C knows also a feature called "clock stretching" where the slave can block the clock to inform the master that it is not yet ready to send / receive the next bit).
|
|
|
|
|
The problem is the old architecture. I need I/O chips that signal incoming data by raising an interrupt and stay off the data bus until the processor comes and reads the data register. All microcontroller solutions I have seen had some trouble with that last part, as they could not tri-state their I/O pins and put the data on the bus when the read signal comes. Otherwise I would not mind using a microcontroller for the PS/2 ports.
Another option would be to use standard UARTs and use them to attach USB keyboard and mouse with a converter inbetween. Ugly, but it would work.
As for the serial EEPROMs: Bit banging has a long tradition on this particular computer, but it's quite slow. We used to bit bang RS232 to attach terminals. The old programs ran at 'safe' 300 baud, but with a little tweaking we already reached up to 2400 baud. At a slightly higher clock frequency 4800 baud have been reached and (without having tried it yet) 9600 baud may also be possible at the maximum clock frequency. A bit banged SPI or I2C interface would perform no better than that.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
I grow up with 8-bit controllers (8080, 8085, 8051, Z80, 6502) and have written programs for all of them. But that is more than 30 years ago.
Regarding the tri-state:
Just let the micro controller ports be inputs (high impedance) and switch to output mode when data should be put onto the bus.
Then you might also use the micro to interface with serial SPI or I2C EEPROMs using the corresponding hardware interface. But this might require some delay between reading and writing multiple bytes to finish serial communication and write delays.
|
|
|
|
|
Jochen Arndt wrote: I grow up with 8-bit controllers (8080, 8085, 8051, Z80, 6502) The old CDP1802 processor fits well into that collection.
Jochen Arndt wrote: But that is more than 30 years ago. Exactly. It's my first computer and the keyboards are worn out. Real key switches are hard to get and some that fit onto the old boards are almost impossible to find. I'm going to leave the old computer as it is and just build a new one, but I will need a solution for interfacing a more modern keyboard and a mouse.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
CDP1802 wrote: Edit: I'm glad I posted a quote from the page. It's now back to normal. Did anyone edit it?
The page wasn't edited since the 1st of November, 2016... You have a virus
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
A virus that only messes things up one time and then disappears?
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
CDP1802 wrote: A virus that only messes things up one time and then disappears?
It was a good-will-warning...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
It might help if you notice that you haven't actually linked to Wikipedia But rather to: "http://wikien4.appspot.com/wiki/USART"
|
|
|
|
|
Overlooked that. Thanks. And thanks, Google, for sending me there from the top of the list.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Be quiet!!! You spoil the fun!!!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Sorry
|
|
|
|
|