tags:

views:

615

answers:

18

G'day,

Inspired by this article here, what programming techniques are you glad to see the back of?

Has anything arisen to replace them?

For example:

  • I had to learn Miditran in first year at University and we had to use punch cards. But it got worse than that. Because the physics department had no punch card machine, the punch cards had perforations and we had to poke out the holes ourselves after working out what the pattern of holes was. A right pain in the butt.
  • Or using optical cards, where you had to black out the "holes". If someone used a marker instead of a dark pencil it would burn out the LDR in the reader and it would have to be replaced!

cheers

+1  A: 

Monolithic programming, why separate things into logical block when you can just mash it all together.

I know I know its never really gone....

Saint Gerbil
+3  A: 

Boring answer: memory management (which I now see the article addressed)

Inflammatory answer: compilation on a different machine than that on which it's executed

Anonymous
What do you say about compiling for a mac? Its the most expensive mainstream platform.
Unknown
Also, memory management was fixed in 1959 with LISP. But of course it still is not "fixed". GC is still burdensome for realtime applications.
Unknown
Well, memory management isn't really gone. It is just handled a little differently.
Brian Rasmussen
What do I know about compiling on a particular platform? Not much; let the compiler writers worry about that. All me and my user should care about is the code and the result!
Anonymous
+6  A: 

Postbacks.

Sara Chipps
+2  A: 

Visual Basic 6

Not a programming technique tho, but wasn't it considered GOD (Everything) in the past?!

Kirtan
Visual Basic 6 was an extremely good language for its tasks (COM Interop, RAD Windows development). It was absolutely possible to write a good and readable program in VB6, even if it missed better OOP features.
Andrey Shchekin
+4  A: 

IE6 while not a technique, it has required inventions of many work around techniques.

Chad Grant
IE6? How about NS4? =:O
Greg
+4  A: 

XML. Good riddance.

krosenvold
+1 We must be soul mates :)
Brian Rasmussen
It's just being renamed to OEML, Over Engineered Markup Language
Chad Grant
I think its still prevalent. What is the leading replacement?
Unknown
"Obsolete" suggests that it has lost its usefulness or has been replaced. Given that RSS, Atom, OPML, Microformats, ODF, SOAP, SVG, SMIL/MMS, OWL, X3D, XUL/XBL, XHTML, etc. are all based on XML, and still widely used, I wouldn't call XML obsolete. It may not be ideal for certain applications (JSON is far more efficient for most AJAX applications than XML), but XML is still the most flexible (due to its extensibility), the most human-readable, and the most commonly used semantic mark-up language I know of.
Calvin
Fortunately only a a few of those XML's can be characterized as "programming techniques".
krosenvold
This answer is stupid.
Robert S.
And welcome the Tag Soup? For some tasks (configuration, data transfer) XML is far from perfect, but it is a markup language -- when you have more text than tags it plays very nicely.I wish microformats were XML.
Andrey Shchekin
+7  A: 

Include files — a much obused feature and I'm glad it's gone from most of the modern languages.

It is way too easy to break incapsulation, scoping and obfuscate code readability by using includes, they are also a real pain to unit test.

It's easy for coupling to get out of control when using them. To me an include file is a code unit with a very loosely defined interface.

Totophil
+1. Not only that, you have to tell the compiler everything twice: Once in the .c or .cpp file and again in the header. Keeping them in sync is a huge PITA.
dsimcha
+1  A: 

Copy and paste ;)

empi
Sadly it hadn't been gone. Quite the opposite! But I like the answer ;)
Norbert Hartl
Copy
T Pops
+5  A: 

Standard libraries.

Re-inventing the wheel gets stale after a while (plus most of us aren't that good at it). In this day and age if I want to grab a web page I shouldn't have to write more than about 4 lines of code (try to get web page, if it fails do something about it like set an error). The mount of time this saves, and the fact that I can re-use code written by people much better and smarter at something than I am is a HUGE time saver and a HUGE improvement for my code quality (seriously, how many people are smart enough to write an HTTP client that handles cookies, authentication, POST/GET/HEAD/DELETE/4 more methods, etc, etc.). Things like CPAN, Pypi, etc. that make it absolutely trivial to get and install a really good library that is easy to use is a HUGE improvement.

Kurt
+2  A: 

Well some that everybody was cheerish as it went but nobody recognized it just hided here and there:

GOTO

Norbert Hartl
+2  A: 

Most of the answers here (and in the article) have something in common, so I'll try to state the meta-logic:

Some hard-or-error-prone technique that used to be desirable or necessary due to constrained [memory|processing power|compiler sophistication|hardware facilities], that can now be safely abstracted away, but which people keep using out of habit.

It also seems that "modern" means "agreeing with my pet-peeves".

Not that these answers are wrong.

YMMV.

dmckee
+3  A: 

Goto for control flow.

Rich Bradshaw
+3  A: 

The dumb char []

JRL
What does this mean?
jmucchiello
char[] = character array
JRL
+6  A: 

Looping on an array with

for(i = 0, j = sizeof(array); i < j; i++)
   if(array[i].something)
       do_something_to(array[i]);

instead of

foreach(item in array)
    if(item.something)
        do_something_to(item);
chaos
+5  A: 

Things I don't do anymore that I used to, and are mostly obsolete:

Punch cards. Heck, paper tape. Or, for that matter, cassette tape.

Computed and arithmetic GOTOs (from FORTRAN).

Having to write my own control structures (sometimes ifs, usually loops).

Working on systems that didn't multitask and didn't have any sort of memory protection.

Any compiler that required typing in more than one arcane incantation to get it going.

Languages where terseness was required for acceptable performance (such as the Microsoft BASICs around the beginning of the home computer era).

Languages with restricted variable names (like A1).

Working without a printer because they were so awfully expensive.

Things I don't do any more, and I wish were generally obsolete:

BASIC.

Cobol.

Hand-written memory management (and, yes, I still use C++).

Cobol.

Micro-optimization without profiling.

Cobol.

Hack-and-slash unstructured coding.

Cobol.

David Thornley
+4  A: 

Hungarian Notation

God, I hate it. And uppercase constants. Yeeech.

matt eisenberg
G'day, Don't forget that there are two kinds of HN. Charles's original excellent Apps Hungarian and the abominably crap Sys Hungarian. Joel has written an excellent article about it here <http://www.joelonsoftware.com/articles/Wrong.html>cheers,Rob
Rob Wells
I disagree. An App Hungarian prefix is often much more useful than constantly writing an explanatory comment every time you want to include some basic semantic information. Especially useful in cross-language interop.
Rushyo
+1  A: 

Non-automated profiling.

I say this mainly because at least 80% of the pain and stress in my life comes from the fact that the obsolete technology employed by a long-term project of mine does NOT support automated profiling of any kind. So it's more that I wish it would go.

chaos
+2  A: 

The C preprocessor. While I always admire the creative hacks people use it for, it seems like any real-world C project turns into a rat's nest of #IFDEF statements, such that it's virtually impossible to figure out what a given piece of code actually does in isolation. Furthermore, it's really a separate language from C and has no concept of scoping. This necessitates giving macros unreadable, ugly, ALL_CAPS names.

The preprocessor was a great idea back when C was invented, but compiler technology has advanced. Nowadays, we have real import systems instead of #include, template/generic functions instead of macros that act like functions, mixins instead of macros that exist for inserting snippets into various places, and more general/flexible forms of conditional compilation.

dsimcha