|
Every time you add a new state you need to change the code, recompile and release. And if that weren't enough the third time you'd need to rewrite the function to handle a State of 10.
Did you add the "Code removed" comment, or is this function actually doing nothing at all?
|
|
|
|
|
Jeremy Hutchinson wrote: Did you add the "Code removed" comment, or is this function actually doing nothing at all?
I did that only for CP. There is some code in that block.
|
|
|
|
|
I spent a VERY productive day today refactoring some code which I originally wrote in 1988 (22 years between code reviews!). The code reduced in size by about 90% once all the superfluous code was removed - superfluous now, vital when the code was originally written to get around 16 bit memory addressing and CPU speed issues. I can't believe the hoops I used to have to jump through to get things working.
You youngsters don't know how easy you have it!
Luckily, I had the forethought to surround large sections of code with //HACK tags explaining why some of these strange things were being done. This turned out to be one of the most time-saving coding guidelines I ever implemented!
<edit> Spelling
Paul Hooper
If you spend your whole life looking over your shoulder, they will get you from the front instead.
|
|
|
|
|
Paul Hooper wrote: You youngsters don't know how easy you have it!
Well in my day we had to program using binary switches. And we liked it!
|
|
|
|
|
My first computer's main improvement over older models was a kex keypad to replace the switches, but nothing beats typing in machine code programs directly
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
|
|
|
|
|
ricmil42 wrote: in my day we had to program using binary switches
You had binary! You lucky get! When I started out I had to write an entire batch processes using only 1's. Scratched onto papyrus. Using Mr Babage's pocket knife!
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
Given your age, your memory still serves you well. Or are you having another episode?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
In my day, we had to whistle into a modem!
Before .NET 4.0,
object Universe = NULL;
|
|
|
|
|
So what's the horror?
|
|
|
|
|
This is more like a past action thriller!!!
Just an irritated, ranting son of ... an IT guy.
At your trolling services
|
|
|
|
|
Paul Hooper wrote: You youngsters don't know how easy you have it!
OTOH, they have VS2010.
|
|
|
|
|
In my career, I have made two deep forays into hell required by the technology at hand. Both involved 16-bit memory addressing and the segmented memory model.
If I had a time machine, it's a toss-up which I would do: Go back in time and smack myself up the side of the head about a couple personal decisions, or go back and kill whoever thought the segmented memory models were a cool idea.
|
|
|
|
|
public class OrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructions {}
A 62-character class name that doesn't even make use of generics. The word "Order" appears 4 times. As always, live production code.
|
|
|
|
|
There must be at least one person happy about the newly introduced var keyword then.
var ii=new OrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructions();
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Visual Studio 2005 project
|
|
|
|
|
so it is upgrade time; or refactor time; or both...
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Perhaps. If I have time tomorrow, I'm also going to convert a massive VB.net project (which was converted from VB6 code) to C#.
|
|
|
|
|
aspdotnetdev wrote: VB6
is that the language where variables got called like Excel cells: A, A1, A2, ..., B, B1, etc?
Now which one do you prefer?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
How does the use of that class look like? Perhaps
OrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructions myCurrentObjectOfOrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructionsForCustomerNumber1 = new OrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructions()
|
|
|
|
|
That proves he indeed should go for c#
|
|
|
|
|
|
verbose, no semi-colons, no curly brackets; my bet is on VB.NET
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Nope, just bad C#. The VB.Net would actually be shorter in this case (assuming the "var" C# keyword can't be used):
Dim myCurrentObjectOfOrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructionsForCustomerNumber1 As _
New OrderBatchCustomerOrderOrderShipToOrderShipCarrierInstructions()
|
|
|
|
|
"Small is beautiful, but BIG is wonderful".
(John Holmes)
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|