|
OriginalGriff wrote: So the punch girls could mistake 'O' and '0', '1' and 'I', and just about any other letter for just about any other letter
Good excuse to ask her out for a drink
OriginalGriff wrote: Then the operators could drop the stack of cards, but run it anyway
Yeah, we had power when I was an op.
OriginalGriff wrote: I had one card set returned with bits of a salad sandwich in it!
Probably went through the sorter first.
|
|
|
|
|
I started my career writing RPG and we had the same coding sheets that you could fill out by hand. IBM also produced templates that were designed to overlay a 24x80 screen to make sure everything lined up and was in the correct column. (By which I mean actual physical templates made of cardboard.)
|
|
|
|
|
I didn't think that kind of a display existed in the workplace any more. That's more of a horror than the code!
|
|
|
|
|
ANY code that is repetitive is almost always an indication that it's bad code. The main exception to this is if the code is generated.
If the only thing that could change was the strings used to represent the two possible values declaring two string constants would overcome it. But the point is it's usually impossible to know what will change on a detailed level, so in software of any real complexity it's usually worth the upfront time to make code that is truly flexible. Doing so is mainly a matter of encapsulating as much as possible and making a habit of using virtual methods by default.
It's a pity that human nature makes it so difficult to take a truly long term view and think ahead. Whether it's climate change or software, we too often never even consider the implications of our actions until the mess we made has become rather difficult to clean up. A lot of code has a lifetime of at least 30 years, not in the sense that it's unchanged for that long or even that it's necessarily the same technology 30 years later, but in the sense that it continues to have direct implications for that long - even though it's been amended and bugfixed and optimized and refactored and ported and supposedly "cleaned up" many times.
I'm convinced of this, because I often refactor code in our only eight-year old codebase. Because absolutely everything is entangled with everything else, it's only possible to make improvements to specific parts of the system, while the complexity and chaos continues to increase at a far greater rate than we can untangle things. There may be many reasons for this, but the main one imho is quite simply that nobody ever tried to sit down and think about how to organize the code *for* long-term evolution. And I don't think we are alone in this.
|
|
|
|
|
I think wasting space would be right at the bottom of my list of priorities.
Much more important would be clarity, execution speed etc.
If you really want to save space, write your source code using a smaller font.
JustAStupidGurl
|
|
|
|
|
justastupidgurl wrote: If you really want to save space, write your source code using a smaller font.
Now why didn't I think of that?
|
|
|
|
|
Nah, for real space savings you also want a propotional, kerned font, and only use thin letters and numbers!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Actually, I've always hated that inline if syntax. In fact, my version of that routine would be even longer:
private void appendBooleanField( boolean value, boolean lastField )
{
strind field;
if ( value )
{
field = "y";
}
else
{
field = "n";
}
appendField( field, lastField );
}
|
|
|
|
|
Convert.ToDateTime(txtDtaPermissao.Text);
Convert.ToDateTime(txtDtaValidadePermissao.Text);
object a = Convert.ToDateTime(txtDtaValidadePermissao.Text) - Convert.ToDateTime(txtDtaPermissao.Text);
if(((TimeSpan)a).Days < 0)
... from here it only shows the message... it is not the problem anymore.
|
|
|
|
|
Paulo Zemek wrote: ... from here it only shows the message... it is not the problem anymore.
That's a relief
|
|
|
|
|
Message Closed
modified 20-Jun-23 15:21pm.
|
|
|
|
|
Do you mind sharing your collection so everyone can benefit?
Jeroen De Dauw
---
Forums ; Blog ; Wiki
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
Easy, you just ask each of them to step on the scale.
He said, "Boy I'm just old and lonely,
But thank you for your concern,
Here's wishing you a Happy New Year."
I wished him one back in return.
|
|
|
|
|
Our low-level embedded communication servers use a .INI file for configurable parameters. There is a [send] section, and a [receive] section. The [send] section contains an aptly named SendRetryCount parameter. In one of the drivers, we also need a ReceiveRetryCount parameter. Guess where the programmer chose to place it. If your bet was the [receive] section, you lose. It is of course in the [send] section...
-- Quidquid latine dictum sit, altum sonatur.
http://streambolics.flimbase.com
S. L.
|
|
|
|
|
probably wasn't sure if he was coming or going?
|
|
|
|
|
Clearly the programmer was highly organized and wanted to keep all the RetryCount parameters in the same place
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
WilliamSauron wrote: If your bet was the [receive] section, you lose. It is of course in the [send] section...
Might be he was doing a mirror-coding.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
I am currently moving a powerbuilder application from a SQL server 2000 environment to SQL 2005. Easy you would think until I discovered the code was full of this sort of thing
select getdate() from sysobjects where id=1
simply to get the current date / time!! In SQL 2005 sysobjects does exist as a compatibility view however the data in it does not contain a record with an id of 1... the application fails in a big way..
Alex Baker
|
|
|
|
|
nasty! did the original programmer not realise that select getdate() would work too?
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
Looks kinda Oracle-ish -- it could be Oracle ported to SQL Server... badly.
I worked for a company that had always used Oracle (on OpenVMS), but one customer wanted SQL Server (6) (on WinNT) so a bunch of PowerBuilder idiots were brought in to write some of the worst code I've ever seen. Data access in the UI?!
|
|
|
|
|
The wonderful thing about standards is that there are so many of them. If I recall, I create a variable (in vb.net) with the name of the SQL get-date function, and then I use that. I forget how I set it, but it was something pretty clunky like "If database type looks like SQL Server, set it to GETDATE() otherwise set to NOW()".
|
|
|
|
|
Hello,
How to get miliseconds form MS SQL Server using ADO and C++ ?
COleDateTime doesn't support miliseconds ...
Best Regards,
Irek
|
|
|
|
|
You can do it sql by using 'DatePart(ms,<dbColumnTime>)' function
|
|
|
|
|
--You can use 'set' instead of 'select'
declare @t as DateTime
set @t = getUtcDate()
-- Testing--
print @t
print DatePart(hh,@t)
print DatePart(mm,@t)
print DatePart(ss,@t)
print DatePart(ms,@t)
|
|
|
|
|
If I remember right, I think Oracle programmers had to do something like SELECT "Hello World" FROM DUAL because it wouldn't allow a SELECT without a FROM.
Could be a recent convert.
|
|
|
|