Domain: mindprod.com
Stories and comments across the archive that link to mindprod.com.
Comments · 111
-
Re:Increment and decrement
Well, my question was not "why were they removed?", but "what can I do to get them back?". And they were removed -- they were there!
I have seen the link (back when it was just a proposal), and I cannot find a compelling removal reason in the list of disadvantages. Let's cover each in turn:
- 1. new users. Add one or subtract one is difficult? I think not. Plus, removing a great feature because it may be difficult for some users to learn is weak — might as well ban regular expressions all together.
- 2. minimal expressive difference. I could not disagree more. Not only am I saving keystrokes when typing, but it takes me significantly less time to undertand the meaning of x++ than x += 1 when I come across them in code. Again, increment and decrement are concepts apart from full-up addition, and having dedicated operators increases the overall exressiveness of the language.
- 3. Swift isn't c. This is a truly spurious reason. Neither is Perl, Python, Go, Ruby, JavaScript, Matlab, Mathematica, etc. And yet Swift still has the bitwise operators from c, so this disadvantage can be little more than list padding.
- 4. Swift has features that replace many of the typical uses of ++ and --. This is true, as far as it goes. However, increment are decrement are used in significantly more instances than as a loop counter.
- 5. ++ and -- are hard to read and encourage "tricky" code. I believe this is conflating two concerns: confusing and makes for "tricky" code. Well, I cannot disagree with the first more; I assert that the semantics of ++ and -- are well understood and their appearance saves significant time when parsing by the maintainer. As for "tricky" coders — well, they'll screw you no matter what you do (you can write FORTRAN code in any language — or see http://www.mindprod.com/jgloss/unmain.html). Basically, don't hobble the language in anticipation of "misuse".
- 6. the result of ++ and -- are difficult to predict, even with well defined operator precedence. I don't buy it. But again, there will be jerks that write difficult to understand code. If they really scare you, then follow one of the presented alternatives and remove the pre versions or post versions, but not both! Or, even better, have Xcode flag their convoluted use (or generate a compiler warning for those who don't use/have Xcode).
- 7. not every data type can use them. Spurious. What about %, ~, |, ^, &, <<, >>, &+, &-, or unary - and +?. Not to mention the logical operators (|| and &&), which had typically supported types removed! Moreover, increment and decrement are useful to add to a class (more so than, say, bitwise or).
The above list seems seems so negative, I know. What is missing is the positives that increment and decrement provide; I tried to express that before. Sure, I'd love to have the ?
: operator, but I'll survive (I hope you like wordy code); but take away my ++ and -- and coding becomes constant frustration that raises my stress level and will eventually lay me low. -
Re: Politics aside for a moment.
At least we know that you have been smoking some nice cognitive dissonance crack there. If you recall Bush admitted to cocaine use.
Seriously if you're going to slander Hillary/Obama you might not want to juxtapose them with Bush.
Of course you're also the one saying that this somehow affects what they are capable of. Bush had 20 years as a mostly known to the public world model citizen, not unlike Hillary/Obama. I wouldn't hold what any of them did in their youths against them at this point when it come to recreational drug use. Of course Bush had known issues with alcohol and cocaine, I don't believe either of those had any affect on his presidency though.
There is far too much polarization in politics today. Painting either side as evil is completely unproductive. I think its fair to characterize that the modern Republican party at the federal level has been very unproductive while the modern democratic party has been ineffectual. When you have people outright saying that their goal is not to pass legislation to make Obama fail you have to question the character of the representative making the claim. We didn't see the level of obstruction while Bush was President but it would be just as wrong. The only difference being is that democrats are like herding cats. You're never going to get them lockstep like the Republican party.
At the end of the day we're all supposed to be on the same team. It's not about liberal or conservative, its about the great good. At least that's what it should be about.
-
Re:Tied this
Well, maybe you should try this much more venerable, thorough, and entertaining encyclopedia of unmaintainable code tips. Should make you as immovable as the CEO's firstborn.
He has an unfair advantage in the area of unmaintainable code since he is writing about C/C++.
-
Re:Tied this
Well, maybe you should try this much more venerable, thorough, and entertaining encyclopedia of unmaintainable code tips. Should make you as immovable as the CEO's firstborn.
-
Re:"Perfect"???
Meet Roedy Green, an unusual dude with decent Java documentation.
Quoted: "CMP's purpose is to stand up for the rights of plants and animals. Animals also includes cetacea, humans, gay people, atheists, war victims and invertebrates. CMP attempts to inculcate planetary consciousness — concern for the planet as a whole."
-
Re:bad spelling in variables/etc get me
This essay says that it's good practice.
-
Re:Only $1.25 Billion?
The usual answer for buying commercial software with a support contract is "to have a throat to choke". If you're into the vendor for $20k, the person on the other end of the phone tends to know something. Below $5k, good luck with that. At this point I'd specify open source below that price point just to shed the delusion that having a throat to choke is worth lifting a finger. Such a crock.
There really ought to be some stronger anti-fraud provisions against this kind of tech support experience. They can just sit there and stonewall, no money down. Appalling. A few high-profile class action lawsuits against tech support fraud would be a good start. Lying is not ignorance, it's plain old fraud. The guy on the phone must be presumed to speak on behalf of the organization. Cultivated ignorance is no excuse, either.
The usual business sentiment is that lying is the best policy, until it isn't. Intel had some 'splainin to do over the Pentium FDIV bug. More recently, Nvidia proved to be a slow learner.
From Nvidia reports problem with laptop chips
Nvidia will take a charge
... of $150 million to $200 million to cover the expected cost of repairing and replacing the products ... didn't say [which] products were affected. ... products have been failing in the field at "higher than normal rates," Nvidia said.Higher than normal
... for small values of $200 million.Let's not pretend that AMD invented this mess, or perfected the drill. The museum of culpability is standing room only: Iomega click of death, IBM Deathstar disk drives, Fujitsu disk drives, ABit leaky capacitors, IBM Mwave, an early version of the KT7A which scribbled on hard drives (until a BIOS fix), and the even more brilliant EIDE controller flaw, just to name a few off the top of my head I've personally experienced.
I never actually touched a machine with the godforsaken IBM MWave, but in my foolish youth, I agreed to do the tech support call for a dim-witted friend who stupidly purchased such a system without asking me first (did I mention he was an idiot?). I was soaking my wrists in warm water before the call ended. If no one has ever been found lying in pool of their own blood for buying IBM, it's not because they never tried.
Long ago I had a girlfriend afflicted with the bogus EIDE chip (Zeos Pantera, early Pentium era) that immediately scribbled all over the hard drive once you enabled a fast software disk cache (such as Hypercache, or any of its competitors). Immediately meant your system would melt down in less than a day for no obvious reason, once enough digital cannon balls toppled your castle. Relationship harmony dictated that I re-install the OS over and over and over again, since the cause took a full week to diagnose.
I'm well aware that it's a black art to get these complicated products right every time (excluding IBM's MWave, where the main challenge was to dream up something so brutally stupid in the first place). Personally, I don't have the stomach to sell disk drives. IBM and Fujitsu both sought ulcer relief in the aftermath of their data chomping disasters.
Normally I have a fairly high tolerance for "shit happens". What severely raises my ire is pissing on common sense. The high point of my tech support career was an HP printer driver which borked a friend's Windows 2000 machine to the point where it would only boot in safe mode.
Of course, HP provided a driver uninstall program
... brilliantly engineered to require a screen resolution which safe mode doesn't offer. Imagine if GM designed a car jack too tall to stick under (wiener clause: the lift strut beside) a flat tire, because they needed more room to draw their logo. Feeling impressed?I then went to the HP online support sit
-
Algorithms by Sedgewick
It's not very sexy, but it's fascinating and readable. I remember coming across it in Dillons bookshop, not knowing the name, and flicking through. Half an hour later, when I realised the time, I knew I had to buy it! Other books go into more exhausting detail (Knuth in particular), or cover a wider range (Knuth again!), or more modern ideas or languages. But Sedgewick is a great read, and I've been through it several times.
It covers all the basics (maths, searching, sorting, strings, graphs, and touches on FFTs and hardware and optimisation), and gives enough detail that you could go off and write some programs yourself. But more importantly, it explains them: how each algorithm works, what it's trying to achieve, how it behaves, and why. And it's because it explains the ideas so well that I'd recommend it. After every section I felt I'd learned something -- not because I had to, but for the sheer pleasure of understanding something new and interesting.
Other recommendations: Effective Java (a staggering amount of insight into the language), Thinking in Java (by someone who understands that language is more than just syntax), Deep C Secrets (again a pile of insight, interspersed with anecdotes and some rather off-the-wall diversions), Programming Pearls and More Programming Pearls (problem-solving in bite-sized chunks -- a little dated but still interesting). Plus I've already mentioned Knuth. K&R is well done, though narrow in scope. I find Design Patterns useful, but more for clarifying things I've already seen than for learning new things. I've never actually read The Mythical Man-Month, but people I respect mention it, so I'm sure it's well worth reading too!
Of course, times being what they are, especially in this field, a lot of interesting stuff is on-line. Some hat should go without saying hereabouts include the latest Jargon File, some of Eric Raymond's books, and more online documentation and archives than anyone but Google can cope with.
Other interesting articles include The Programmer's Stone, a guide to writing Unmaintainable Code, The Ten Commandments for C Programmers (annotated edition), Ken Thompson's Reflections on Trusting Trust, What Colour are your Bits?, and Guy Steele's Growing a Language.
-
Re:lameThat there is. But as long as you understand how it should be done, then you're able to
... well, start with the basics, and work up to idioms far quicker than learning from scratch. Whilst the exact mode of array implementation in a given language isn't necessarily something you know, you'll know that what you want _is_ an array, and thus you might need a few algorithms to go with it.I personally hate VB, because every time I've heard someone declare it 'easier' I've gone on to see them pull out a wodge of utter bodge coding, which is basically unmaintainable. Because they didn't understand what a program was _supposed_ to be like, and VB let them do it. I'm currently working on one bit, that's a really ugly botch of 'goto' style code, but with a few prototyped procedures in there, just to throw me off the scent. It looks a lot like 5 different sets of copy-pasta code, and it's
... well, I'm still itching for the time to do a full rewrite, and have almost justified it based upon the amount of extra lead time any form of modification to this ugly hack job is taking.Erm. Which I think's agreeing with what you said
:).Someone who knows how to program, knows that http://mindprod.com/jgloss/unmain.html is a comedy site, even if they don't know the specifics of a given language.
-
Re:Java.sun.com
Candian Mind Products http://mindprod.com/ for Java. Good info, and some of the dirt too.
-
how to write unmaintainable code
This site is good for a number of languages, particularly for Java. Just read it and do the opposite.
-
Re:Pollution
If wealthy, polluting industries "pay to pollute", does that actually reduce emissions?
Err... yes. "Pay to pollute" => pollution costs money => you can make a bigger profit by lowering costs, in the form of pollution => Profit! Oh, and Environmental Quality! Economics 101, hello?Where does the money go?
That depends on the scheme. Some governments issue the certificates for free and let the industry trade amongst itself. The money then goes to whoever sells their certificates i.e. whoever pollutes the least. How much is polluted then depends primarily on how many certificates are issued.
Alternatively the goverment can sell the certificates. This isn't a bad idea, because that way the Gov't gets the money and can fund environmental cleanups (or minister junkets, whatever). Biggest problem is the fact that the government may set a too low or too high price.You can get the benefits of both by having the government sell a fixed number of certificates (who gets to buy them is another issue) and letting the secondary market take care of the process of marginal cost/benefit equalisation. The issue price would have to be below the market equilibrium price, but with a bit of practice the government can figure it out.
Current practice in the EU, AFAIK, is Model 1: issue the the certificates, let the market trade. In the last few years there were far too many permits on the market, so that the costs for a ton of CO2 were somewhere around 0.26â, but this year it's around 20â, I think (haven't checked the market recently).
I don't know what the GP meant with his "two largest emerging world economy haven't signed the Kyoto protocol" statement: Brazil, China, and India have all ratified it.
Answers to the OP's further questions can be found in the Kyoto protocol itself:
Full Text
Layman's guide -
Compare against 'How to Write Unmaintainable Code'Never mind other ISO standards, just compare the flaws listed against How to Write Unmaintainable Code!
[Main page] http://mindprod.com/jgloss/unmain.htmlI'd only got as far as item 3 on Rob Weir's list, "... The allowed values of this type express the measurement units to be used: Auto, Twentieths of a point, Nil (no width), Fiftieths of a percent. I find these choices to be capricious and not based on any sound engineering principle..." and from the HowTo, in the section on Coding Obfuscation, item 6: "Foolish Consistency Is the Hobgoblin of Little Minds When you need a character constant, use many different formats: ' ', 32, 0x20, 040..."
Is this resemblance coincidence? I doubt it.
[Coding Obfuscation section] http://mindprod.com/jgloss/unmainobfuscation.html -
Compare against 'How to Write Unmaintainable Code'Never mind other ISO standards, just compare the flaws listed against How to Write Unmaintainable Code!
[Main page] http://mindprod.com/jgloss/unmain.htmlI'd only got as far as item 3 on Rob Weir's list, "... The allowed values of this type express the measurement units to be used: Auto, Twentieths of a point, Nil (no width), Fiftieths of a percent. I find these choices to be capricious and not based on any sound engineering principle..." and from the HowTo, in the section on Coding Obfuscation, item 6: "Foolish Consistency Is the Hobgoblin of Little Minds When you need a character constant, use many different formats: ' ', 32, 0x20, 040..."
Is this resemblance coincidence? I doubt it.
[Coding Obfuscation section] http://mindprod.com/jgloss/unmainobfuscation.html -
Sounds like a lack of documentation... abuse it.
use all sarcastic hints from http://mindprod.com/jgloss/unmain.html. Once they start getting desperate, ask them to produce complete documentation so you can actually do your job.
-
Not quite true
Come on. When was the last time you had anything good to say about anybody else's code? Ever? All programmers say all other programmers are incompetent. And typically, management believes us.
Not quite true. I can think of a few people whose code gave me no reason for complaints. To pick just two extremes out of the pool:
- one of them is pretty much the pragmatic programmer prototype. He'll (also) apply some pattern only if it's needed, not because it would be fun to have it on the resume. Sometimes a switch block with 10 cases is really all you need, you know? His programs tend to be compact, work and be actually fairly easy to get the hang of.
- one of them is, well, pretty much the opposite. His programs tend to be a lot larger than they need to be, and have layers upon layers of patterns even to print "Hello World". With some reflection thrown in for good measure. Strangely enough, though, they _are_ well organized, and you can fairly easily find the class that processes a given event or command... or the singleton factory that supplies it, or the manager class it's registered with, or...
Are they perfect according to my tastes? Nope. But I can nevertheless tell good code when I see it, even if it's not perfect. And say it.
On the other hand, at the other end of the spectrum, I've had to deal with pieces of code which were truly atrocious. E.g., one particular program not only raped all best practices known to mankind, but also was living illustration of half the techniques from How to write unmaintainable code. Literally. It even had stuff like the using people's first names for variables, in addition to the more mundane techniques like mere undescriptive names, obfuscated flow, heavy use of global variables, non-obvious side-effects to those variables, or methods which can also do some 2-3 other unrelated things if called with the right parameters. And I don't mean just side-effects or cramming more functionality in one call than expected. I mean stuff like the class which should have normally sent an email, could render and print a PDF _instead_ of sending one email, or update the contract in the database instead. And for bonus points, not even determined by parameters, but by the contents of those global variables. But, again, the nicest touch was finding uninformative variable names like Pete and Eve in the very first class I opened.
Basically IMHO lumping it all into one everything-is-the-same "all programmers hate each others' code" pool doesn't do it justice, and paints a misleading image. _Some_ may be just nitpicking about the style, but some code is genuinely evil stuff that should be buried at crossroads with a stake through its chest. -
Re:Writing code is easy. Debugging it is hard
Well, for an even more comprehensive index, see: how to write unmaintainable code
-
Re:HuH?
-
In the interest of full disclosure.
Although java centric one must include information on how to write UNmaintainable code as well. The original unmaintainable code site (AFAIK)
-
Re:Yuri Gagarin
Correct me if I'm wrong, but isn't he the guy who developed the Hungarian notation
And thereby making huge swaths of code unreadable. How much Microsoft code uses a rgs16 to store 32 byte values? Some consider Hungarian notation to be the tactical nuke equivalent for unmaintainable code. -
Re:Ghostbusters
http://mindprod.com/politics/bushismsgay.html
Evidence Bush Enjoys Kinky S&M and Gay Sex -
Re:This is like the US Forest Service...It's overdesigned and inconsistent.
There's hardly any inconsistencies on that page. The only ones that are inconsistencies are simply methods in the JRE that don't follow the string case conventions. Wow. People still type method names (and not code-completion)?
;-)The rest of the things are simply "gotchas" (the title of the page) that might catch you out coming from another language. And most of them are desirable, just confusing if you're a newbie to the language.
And the "over-design" is what makes it very very secure. When was the last time you heard of a buffer-overrun hack in a java app? That's one of the main aims of the JRE.
-
This is like the US Forest Service...
...making it easier for Linux users to eat tree bark. Java has jumped the shark. It's the COBOL of the 21st century. C# is less baroque, and is comparable in size for the SDK and runtime. Applications can be written and deployed more quickly and easily in Python or Ruby. Seen any new Java applets in your web browser lately? Not any to compare with Flash, Javascript, PHP, and AJAX. It's no good for system scripts, like Perl (or the even sh for that matter). It's overdesigned and inconsistent. It will run on your cell phone, possibly. Big woop.
-
Better sources for indecent Esperanto
Even better sources for indecent Esperanto can be found in the article How To Talk Dirty In Esperanto: Kiel Paroli Maldece en Esperanto. When you're done with that, check out Tabuaj Vortoj En Esperanto.
-
Re:April Fool's Right????
The article is obviously meant to address people who think this way
Actually, the article is obviously a joke.
In fact it's a joke stolen from Roedy Green; the original starts with the words, "This is my most popular essay. It is amazing how many people don't realize it is tongue in cheek."
(And, as others have pointed out, it's a dupe.)
-
This is not news
This page: http://mindprod.com/jgloss/unmain.html
Says: ©1996-2005 Canadian Mind Products
Not to mention being much more comprehensive. -
This is old
This web page has been around for ages. The original version is at http://mindprod.com/jgloss/unmain.html and has been updated loads since. I remember reading this when I first started work after university, back in 1999. Still funny though.
-
Another good one (Re: *yawn*)
Thankfully, the OP provides a link to the original author, Roedy Green.
Here's another good article he wrote in the same vein called How to Code like a Newbie.
I was in stitches the first time I read it several years ago.
-
This is ancient...
Roedy started this back in the 90's, you could at least have the decency to link to the latest version.
-
Also, see this link with essays.
A co-worker sent me these unmaintainable code essays back in August 2005. Taken from AQFL.
-
Just a couple of references
Successful Strategies for Commenting Code By Ryan Campbell
The Fine Art of Commenting by Bernhard Spuida
How To Write Unmaintainable Code -
!(How to write unmaintainable code)
Read this thoroughly, and try to do the opposite.
-
Re:Naming conventions
Like this? marypoppins = ( superman + starship ) / god;
-
Feed the troll
http://mindprod.com/religion/biblestudy.html
Have fun explaining all that, then. -
Re:Huh?
Here's a funny guide about how to write unmaintainable code. Here's a link to the documentation section:
http://mindprod.com/jgloss/unmaindocumentation.htm l
and here are the general principles:
"To foil the maintenance programmer, you have to understand how he thinks. He has your giant program. He has no time to read it all, much less understand it. He wants to rapidly find the place to make his change, make it and get out and have no unexpected side effects from the change.
He views your code through a toilet paper tube. He can only see a tiny piece of your program at a time. You want to make sure he can never get at the big picture from doing that. You want to make it as hard as possible for him to find the code he is looking for. But even more important, you want to make it as awkward as possible for him to safely ignore anything. " -
Unmaintainable Code Article (Funny)
I got this from a co-worker last week...
Unmaintainable Code article gave tips from the masters on how you write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code! -
Unmaintainable code
If you want to write perfectly unmaintainable code, you should follow these guidlines
They explain how to write perfectly unmaintainable code. Suggestions range from naming variable (re-using variables outside of scopes, using single lettre names, using people name), camouflage (using #defines, etc), and many other perfectly normal (albeit evil) strategies -
here's some Pretty Evil Shit - Re:Even more annoyiHere is an example of some Pretty Evil Shit:
I want to laugh when I read it.
Some of it is funny.
Some of it is just scary.
The human mind can be a freakishly messed up thing.
http://mindprod.com/unmaindocumentation.html
It is part of a larger essay about writting crappy code.
Anybody that even comes close to software development
should check it out.
--- begin excerpts ---
Avoid Documenting the "Obvious" : : If, for example, you were
writing an airline reservation system, make sure there are at
least 25 places in the code that need to be modified if you were
to add another airline. Never document where they are. People who
come after you have no business modifying your code without
thoroughly understanding every line of it.
Units of Measure : : Never document the units of measure of any
variable, input, output or parameter. e.g. feet, metres, cartons.
This is not so important in bean counting, but it is very important
in engineering work.
As a corollary, never document the units of measure of any conversion
constants, or how the values were derived.
It is mild cheating, but very effective, to salt the code with some
incorrect units of measure in the comments.
If you are feeling particularly malicious, make up your own unit of
measure; name it after yourself or some obscure person and never
define it. If somebody challenges you, tell them you did so that
you could use integer rather than floating point arithmetic.
On the Proper Use of Design Documents : : When implementing a very
complicated algorithm, use the classic software engineering principles
of doing a sound design before beginning coding. Write an extremely
detailed design document that describes each step in a very complicated
algorithm. The more detailed this document is, the better.
In fact, the design doc should break the algorithm down into a hierarchy
of structured steps, described in a hierarchy of auto-numbered individual
paragraphs in the document. Use headings at least 5 deep. Make sure that
when you are done, you have broken the structure down so completely that
there are over 500 such auto-numbered paragraphs.
For example, one paragraph might be: (this is a real example)1.2.4.6.3.13 - Display all impacts for activity where selected
then... (and this is the kicker) when you write the code, for each of these paragraphs
mitigations can apply (short pseudocode omitted).
you write a corresponding global function named:Act1_2_4_6_3_13()
Do not document these functions. After all, that's what the
design document is for!
Since the design doc is auto-numbered, it will be extremely difficult
to keep it up to date with changes in the code (because the function
names, of course, are static, not auto-numbered.) This isn't a problem
for you because you will not try to keep the document up to date.
In fact, do everything you can to destroy all traces of the document.
Those who come after you should only be able to find one or two
contradictory, early drafts of the design document hidden on some
dusty shelving in the back room near the dead 286 computers.
--- end excerpts --- -
how to write unmaintainable code
How To Write Unmaintainable Code
In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code!
You don't want to overdo this. Your code should not look hopelessly unmaintainable, just be that way. Otherwise it stands the risk of being rewritten or refactored.
i read this article a few years ago and personally found it interesting. as i bolded out, documentation is important even for yourself. it depends on your motive for or for not including good comments for your code. if you're on a team, good comments helps speed up the project. if anyone else will be reading your code and using it, i think it's personally quite important to leave comments especially on what the function does and how to use it.
on the other hand, as this article states, if you really really want to keep your job... then useful comments are totally unnecessary for that'll only help the guy that's coming along to replace you. ;p -
obligatory link
-
Re:Resurgence of the Superhero
Very evil people were about and the average joe needed some measure of hope that good would triumph.
Not much has changed
There are evil people about and the general population feels powerless.
You're 100% right! -
Replay with nondeterministic events
It is possible to replay the execution of programs that communicate with the outside world, rather than just in an isolated virtual machine: you have to log nondeterministic events. See http://www.erights.org/elang/concurrency/determin
i sm/overview.html.
The first language I know of that supported replay is the Abundance database language, back in 1986. Also see http://c2.com/cgi/wiki?ReversibleProgrammingLangua ge. -
Re:Oh Boy.
Perhaps this would be helpful to you...
http://mindprod.com/unmain.html -
Don't ask this guy...
This link comes to mind
-
Re:Clear Code
Really depends if your job is replacable.
Here's a guide on How To Write Unmaintainable Code.
In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code! -
Actually, this is a more general xml problem
XML munches up bandwidth like a lardy butter lover. Yes, yes, RSS feeds are handy, but they dont actually do anything that couldnt be achieved with a much leaner binary format. Its 2004, we dont have byte compatablitily issues any more
See Roedy Greens (one time comp.java.lang FAQ maintainer)excellent essay on why XML causes these problems. -
Re:What about Fortran?
Nice reply. If I had mod points I would give you some.
Fortran goes back to when saving bits was a good thing. I learned all my bad habits from Fortran.
But I don't really use it anymore. These days I write my unmaintainable code in Perl.
There are a lot of good principles for writing bad code here. -
Time to brush up on your l33t coding skillsHow to write unmaintainable code
Some gems:
Naming variables :
#1 Baby names: Buy a copy of a baby naming book and you'll never be at a loss for variable names. Fred is a wonderful name, and easy to type. If you're looking for easy-to-type variable names, try adsf or aoeu if you type with a DSK keyboard.#17 Bedazzling Names: Choose variable names with irrelevant emotional connotation. e.g.:
marypoppins = ( superman + starship ) / god;
This confuses the reader because they have difficulty disassociating the emotional connotations of the words from the logic they're trying to think about.#26 Misleading names: Make sure that every method does a little bit more (or less) than its name suggests. As a simple example, a method named isValid(x) should as a side effect convert x to binary and store the result in a database.
-
How to Write Unmaintainable Code
Isn't this article a bit like the classic, How to Write Unmaintainable Code?
-
Re:But if you're going to do it wrong...
Personal favorite pet peeve:
http://mindprod.com/unmainnaming.html
28. o_apple obj_apple
: Use an "o" or "obj" prefix for each instance of the class to show that you're thinking of the big, polymorphic picture.
Love that one. I see it all damn day.