Originally posted by d000hg
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!
Reply to: Is C a 'good' programming language?
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Is C a 'good' programming language?"
Collapse
-
-
Originally posted by OwlHoot View PostAt my last permie position I had to write a shed load of cleanup code to remove blemishes etc from signature image thumbnails for a building society (actually a shareholder vote for privatization).
I started out writing it in C, but as there were half a million of the brutes, which all had to be tarted up by a certain date, performance was imperative and we worked out that at the rate the code was chugging through them it would never be done in time.
So I started embedding assembler bit blitters into the code, small sections at first but of course getting more ambitious as time went on, and sure enough it started speeding up significantly.
At the same time, I was writing an Intel disassembler as a personal hobby, and so had a pretty intimate knowledge of all the prefix codes that specify a 32-bit operand etc, and I found that using these operands speeded things up even more.
In the end, the 16-bit C code went like the clappers, but was a mere shell and comprised mostly hundreds of lines of 32-bit assembler much of it hand-coded using numeric values (as the 16-bit compiler didn't support 32-bit).
When I was due to leave, to start my first contract, my magager asked the project leader about this code, and the project leader assured him it would be no problem as it was C. Although I had mentioned the assembler, he luckily had no conception of the untold horrors awaiting anyone who ventured to change it.
Leave a comment:
-
Just found a bug:
Code:// borked AutoInterface<T> r(reinterpret_cast<T*>(Base::RemoveTail(), true)); // fixed AutoInterface<T> r(reinterpret_cast<T*>(Base::RemoveTail()), true);
Although this is C++, it's thanks to C's stupid comma operator that this compiles. What's passed into the reinterpret_cast is not the result of the function call, but second expression (true). It happily casts true into a T* whose value is 0x00000001 with hilarious results.
(AutoInterface's constructor has an optional second parameter, so that doesn't cause an error either).
I take it back. Tis a stupid lanugage.
Last edited by VectraMan; 1 September 2009, 20:32.
Leave a comment:
-
Originally posted by zeitghostMmmmmmm...
Hand coded 32 bit assembler
Mmmmmmmm....
Leave a comment:
-
At my last permie position I had to write a shed load of cleanup code to remove blemishes etc from signature image thumbnails for a building society (actually a shareholder vote for privatization).
I started out writing it in C, but as there were half a million of the brutes, which all had to be tarted up by a certain date, performance was imperative and we worked out that at the rate the code was chugging through them it would never be done in time.
So I started embedding assembler bit blitters into the code, small sections at first but of course getting more ambitious as time went on, and sure enough it started speeding up significantly.
At the same time, I was writing an Intel disassembler as a personal hobby, and so had a pretty intimate knowledge of all the prefix codes that specify a 32-bit operand etc, and I found that using these operands speeded things up even more.
In the end, the 16-bit C code went like the clappers, but was a mere shell and comprised mostly hundreds of lines of 32-bit assembler much of it hand-coded using numeric values (as the 16-bit compiler didn't support 32-bit).
When I was due to leave, to start my first contract, my magager asked the project leader about this code, and the project leader assured him it would be no problem as it was C. Although I had mentioned the assembler, he luckily had no conception of the untold horrors awaiting anyone who ventured to change it.Last edited by OwlHoot; 30 August 2009, 19:58.
Leave a comment:
-
Come on gents. Surely you can agree that you use the right tool for the particular job?
Declared interest - C and Motorola assembly language programming person. A long time ago.
Leave a comment:
-
Originally posted by d000hg View PostSince when is that in the spirit of CUK?
Leave a comment:
-
Originally posted by RichardCranium View PostEither give it rest or abuse him by PM.
Anyhow, maybe us 2 will have to form coalitions with DP & sy01 otherwise it's just too risky... me and C will be unable to commit fully in case DP makes an opportunistic attack from the rear.
Leave a comment:
-
-
Originally posted by Churchill View PostIt wasn't thinly veiled rudeness, my post was meant to show that not all software development is for PCs - you made an incorrect assumption and made yourself look a noddy!
Btw, my feelings aren't hurt - it takes more than a drunken keyboard warrior to upset me.
Anyway, how long shall we play this game before we and make up?
Leave a comment:
-
Originally posted by Churchill View PostJust thought I'd let you guys know. 3 Interviews in 7 days. Blown out.
Oh well, not meant to be!!!
Chin up, onwards n' all that.
Leave a comment:
-
Originally posted by d000hg View PostActually, you made the wrong assumption. I was responding to your know-it-all comment about (non)PCs/BIOS. If you're going include thinly veiled rudeness and act superior when you share knowledge, perhaps best not to bother, or at least not be surprised people call you a smartarse (do you deny it?)
Aw, your feelings are hurt. Nevermind, I'm sure it will soon blow (goats) over.
Btw, my feelings aren't hurt - it takes more than a drunken keyboard warrior to upset me.
Leave a comment:
-
Originally posted by Churchill View PostYou made the wrong assumption and also resorted to insults.
Your problem not mine. Also, the jibe about interviews, not big and certainly not clever.
Leave a comment:
- 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
Leave a comment: