Originally posted by EternalOptimist
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
That is it : I am becoming a programmer.
Collapse
X
-
-
Originally posted by EternalOptimist View PostThe trick with programming is to get your table structure right. If you dont have control of the table structure, and its not right, you can be in line for a world of pain.
I am working on a legacy system, two main tables
table1 primary key is a long
table2 foreign key to table1 primary key is a varchar
some days I just want to die
Speaking gibberish on internet talkboards since last Michaelmas. Plus here on TwitterComment
-
Originally posted by RichardCranium View PostIn my interview last week I was asked "Explain how you would create a database".
When I got to "Each table typically requires a primary key which should be a unique ID that does not exist in the real world" the boss man stopped me and asked me to explain.
He could not grasp that using someone's name, for example, as a primary key won't work.
"But women change their name when they marry" says I.
His answer? "So you just change the primary key. What's the problem here?"
Maybe I should have done my presentation on fourth normal form.
This boss man is the head of a data analysis section.Speaking gibberish on internet talkboards since last Michaelmas. Plus here on TwitterComment
-
I once failed a trick question based on database keys. I don't think I would have been so easily tricked had I not been in an interview situation though. The question was quite involved by the key misdirection was buried in the database requirement and that was that the primary key was not the column primarily (mainly) searched on, it was some other table field, so that was the index that should have been clustered, rather than the primary key.Comment
-
Originally posted by juststarting View PostOhh so many thoughts...
Anyway here we are.... I have now about had it all with trying to secure a job in MS Infrastructure position .... So basically I have to start studying programming ....
Yes, you can have jumped up administrator types, scribbling scripts, sticking piles of COTS packages together, but they're more like Graphic Designer as compared to the programmer Fine Art artist.Insanity: repeating the same actions, but expecting different results.
threadeds website, and here's my blog.Comment
-
Originally posted by MrMark View PostIt is possible to have a primary key based on a unique id that exists in the real world eg sales number or invoice number,
Why should a sales number be unique? Just because system A generates a number you cannot assume it is and will always be a unique number. What happens when they do a database roll-back after a disaster? What happens when you discover it rolls round at some big number? What happens when some twat in Accounts changes the cost code hierarchy and says sales numbers must be compatible with their system? What happens when the France office opens and their sales numbers start at F0001?
Will the invoice number still be unique when ClientCo merges with OtherCo?
Contrary to rule number 1: a reasonably safe assumption is that you should NEVER use real world data as a primary key.My all-time favourite Dilbert cartoon, this is: BTW, a Dumpster is a brand of skip, I think.Comment
-
Originally posted by RichardCranium View PostNaughty, naughty. 1st rule of programming: do NOT make assumptions.
Why should a sales number be unique? Just because system A generates a number you cannot assume it is and will always be a unique number. What happens when they do a database roll-back after a disaster? What happens when you discover it rolls round at some big number? What happens when some twat in Accounts changes the cost code hierarchy and says sales numbers must be compatible with their system? What happens when the France office opens and their sales numbers start at F0001?
Will the invoice number still be unique when ClientCo merges with OtherCo?
Contrary to rule number 1: a reasonably safe assumption is that you should NEVER use real world data as a primary key.
and Contrary to that - listen to THIS.
I am upgrading the front ends of a sytem, and migrating their data to a common database. The primary keys are non real world, and specific to an application.
EXCEPT that the databases are annualised. So 1990 has a primary key range 1-200k
1991
1 - 210k
1992
1- 198k
etc
If they had used real world data I would have been ok
(\__/)
(>'.'<)
("")("") Born to Drink. Forced to WorkComment
-
Originally posted by threaded View PostProgramming is an art. Some plonkers keep trying to turn it into a science.
In the world of fine art, there are people who apply the pigments to different surfaces and leave them for many years in sunny and dark places just to see what happens to the colours over time. (At least one artist was famous for doing that with hundreds of samples.) Ditto for materials (canvas v wood etc.) and brush types and so on. These are the 'scientists' doing research to see how artists' tools can be improved or added to.
There were the computer scientists that worked out better sort algorithms than I as an applications programmer could never fully comprehend, but made use of.
The art world goes through an occasional major renaissance and many minor ones. These are the artists experimenting with their philosophy and seeing how the boundaries of art can be pushed. Art deco for the masses, cubism for the purists and so on.
Computer scientists cogitate over linguistics and modify or create new computer languages and paradigms. Relational databases, structured programming and OO came out of that. As an applications programmer I took on board some of those developments and new languages and used them as required. I did not have the time to invent my own. The mentalist programming languages such as those based on white space are there, like cubism, as they needed to be done as thought experiments to push back the boundaries of the possible.
I believe computer scientists have a vital role: to come up with new ways we can use this magnificent "spanner for the brain" (I made that expression up 30 years ago) in new and better ways. To allow us the panoply of the ugly and the elegant so we can see what is efficient and what is beautiful.
But it takes the artist to know how to use the palette and tools in an aesthetically pleasing way that will appeal to the buying customer: to combine the efficient and the beautiful. To cut code that works in the required way, quickly and in a maintainable manner.My all-time favourite Dilbert cartoon, this is: BTW, a Dumpster is a brand of skip, I think.Comment
-
Originally posted by EternalOptimist View PostEXCEPT that the databases are annualised. So 1990 has a primary key range 1-200k
1991
1 - 210k
1992
1- 198k
etc
If they had used real world data I would have been okMy all-time favourite Dilbert cartoon, this is: BTW, a Dumpster is a brand of skip, I think.Comment
-
Originally posted by RichardCranium View PostI disagree. The year is real world data. That is why it is broken.
not IT would have been ok
anyways, its a right mess
(\__/)
(>'.'<)
("")("") Born to Drink. Forced to WorkComment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Secondary NI threshold sinking to £5,000: a limited company director’s explainer Dec 24 09:51
- Reeves sets Spring Statement 2025 for March 26th Dec 23 09:18
- Spot the hidden contractor Dec 20 10:43
- Accounting for Contractors Dec 19 15:30
- Chartered Accountants with MarchMutual Dec 19 15:05
- Chartered Accountants with March Mutual Dec 19 15:05
- Chartered Accountants Dec 19 15:05
- Unfairly barred from contracting? Petrofac just paid the price Dec 19 09:43
- An IR35 case law look back: contractor must-knows for 2025-26 Dec 18 09:30
- A contractor’s Autumn Budget financial review Dec 17 10:59
Comment