- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Even Python is better than that. Then again, I do think that Python is better than Java.
Admin
Or defaulted to GETDATE(), then manually entered.
Admin
Admin
Most applications need civil time, and that's what the Unix epoch system uses; the quality of most local time sources is poor enough that the loss of accuracy is no big deal. The applications that need precise scientific time include things like GPS, but are really much less common.
Admin
And what is exactly wrong with TEXT? Unless it is used for something weird like IDs or dates, where other types would be more appropriate, it is actually good way to store posts/titles without worrying that too long title/post will be cut in db.
Admin
TRWTF is that every year-entry in the table took several seconds to create.
Admin
Didn't see the ID10T column anywhere...
Admin
Admin
ORACLE:
Correct, but boring!MS-SQL:
Slightly misleading. And it appears MS_SQL is an object-oriented database?Sybase:
My favorite!Admin
TRWTF is Zylon!
Admin
Actually, it was Friday, December 30th, 2011.
Sincerely,
Gene Wirchenko
Admin
Oh that's nothing. We have a database where almost all the tables have columns named identity, which are auto-incrementing numeric values, which is clustered on, and...
are all varchar(50).
oh the pain...
Admin
And how exactly is storing dates in numbers going to solve this?
I AM FAILINGS TO UNDERSTAND THIS, BOYZ.
Admin
Cue DBA flamewar about TEXT vs VARCHAR.
Admin
Imitation is best form of flatter me.
Admin
I always use VARCHAR2 in Oracle and NVARCHAR in SQL Server. If I can make it fit in VARCHAR2 / NVARCHAR, then TEXT column is not required. As a matter of fact, anything that is not fitting inside of VARCHAR2 / NVARCHAR column size is something you're definitely doing wrong.
So Don't do it wrong. Do it right every time.
Admin
I wonder if any of the developers responsible for todays' entries worked at a certain big bank in America around 1999?
My bundle of joy I had to baby was a carefully crafted Y2K database system the bank was using to inventory all their systems, software and hardware for testing and confirming Y2K compliance.
OK, it was somewhat normalized, so beats out some of the entries here. But OMG, the field names, the field names! Each field name was a lengthy full sentence description including spaces and all punctuation. That's without getting into the little fact that the database system itself wasn't Y2K compliant. I was so happy when the project ownership changed to a far away office so I finally had an excuse to bail. (Too long a commute.)
Admin
My first gig out of college, in the previous millenium it was, at a five-man dotcom-bubble startup (counting the CEO and sole owner, and I use the word "man" intentionally, there being no female employees whatsoever), I don't remember why exactly but our software needed to convert Unix time_t values (i.e. counts of seconds since 1970-01-01T00:00:00Z) to "broken-down" time, and we couldn't rely on the C library for some damn reason which also escapes me now.
The CEO-and-sole-owner had, before hiring me, implemented the algorithmically nastiest part of this task -- deciding what year the count was in -- using a table, hardwired into the executable, of time_t values for the start of every year from 1970 through 2038.
Being a snotty kid fresh out of college, I filed a bug in the internal defect tracker: "this will break in 2038." The CEO-and-sole-owner responded by officially assigning the bug to his son. Who was six months old at the time.
I don't think the company, or the product, still exists, but if it does, I'm sure that table is still there.
Admin
Admin
Deadline enforcement, obviously. If you don't get the Y2K compliance finished by Y2K, the entire project crashes and burns.
Admin
Admin
It's :-} not superfluous, it's correct. In fact the apostrophe in "It[']s" is never superfluous. With the apostrophe it is a contraction of "it is". Without, it's the possessive.
Admin
Admin
In 1986 (before y2k and 4 digit years) I was working on a payroll system where dates were actually stored as part of a fixed length record in a different files. Dates were stored as a 6 digit number, 'yymmdd'. To conserve space (again almost 30 years ago), the date values were actually being stored as packed decimal, so instead of being 6 bytes long, they were only 4 bytes long.
To put storage costs into perspective, a blank 720K floppy (we had access to a PS/2) cost $8 or so. Most computer systems used as little storage space as possible.
A senior developer spent a week redoing all of the common FD (file descriptions) used by the cobol program. He redefined all date fields in all of the FD description so that there were separate fields for the year portion, month portion and day portion.
05 CHECK-RECORD. 10 CHECK-DATE PIC 9(6) COMP-3. 10 FILLER REDEFINES CHECK-DATE. 15 CHECK-DATE-YEAR PIC 9(2). 15 CHECK-DATE-MONTH PIC 9(2). 15 CHECK-DATE-DAY PIC 9(2).
The senior developer was not happy when I pointed out that this did not work, redefining works on byte boundaries, a packed decimal field uses the first 4 bits for the sign of the number, then the next 4 bits for the most significant digit, then the next byte is used for the next two digits and so on.
Admin
Java dates are fucked beyond recognition. Today's (6th August 2014) day month and year is is 6, 7, 114.
Go die in a fire.
Admin
RIP. Robin Walliams.
Admin
Admin
Backticks
code
tickbacksAdmin
Code section
code code code code
Admin
Multiline:
code
code
Admin
Triple backticks