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
- How to answer at interview, ‘What’s your greatest weakness?’ Yesterday 09:59
- Business Asset Disposal Relief changes in April 2025: Q&A Nov 13 09:37
- How debt transfer rules will hit umbrella companies in 2026 Nov 12 09:28
- IT contractor demand floundering despite Autumn Budget 2024 Nov 11 09:30
- An IR35 bill of £19m for National Resources Wales may be just the tip of its iceberg Nov 7 09:20
- Micro-entity accounts: Overview, and how to file with HMRC Nov 6 09:27
- Will HMRC’s 9% interest rate bully you into submission? Nov 5 09:10
- Business Account with ANNA Money Nov 1 15:51
- Autumn Budget 2024: Reeves raids contractor take-home pay Oct 31 14:11
- How Autumn Budget 2024 affects homes, property and mortgages Oct 31 09:23
Leave a comment: