|
fletcher posted:I can't imagine why they even put something like that in. Are people really that lazy that they can't keep their code formatted properly as they write it? I spend most of my "coding time" thinking through algorithms or optimizing code. Typing is the tedious part. I've set up my indenter to format my code in the style I like. I use autocomplete. It's a tool. Do you use an IDE?
|
# ? Aug 7, 2009 21:08 |
|
|
# ? May 14, 2024 23:57 |
|
Autoindenting is one thing, but moving code around vertically would throw me off all the time.
|
# ? Aug 7, 2009 21:15 |
Zakalwe posted:I spend most of my "coding time" thinking through algorithms or optimizing code. Typing is the tedious part. I've set up my indenter to format my code in the style I like. I use autocomplete. It's a tool. Do you use an IDE? Yeah, I use autocomplete all the time, I couldn't live without it. I have my indenter setup the way I like as well, and it will add curly braces for me at convenient times. None of that has to do with what I was talking about. I use eclipse.
|
|
# ? Aug 7, 2009 21:26 |
|
fletcher posted:Yeah, I use autocomplete all the time, I couldn't live without it. I have my indenter setup the way I like as well, and it will add curly braces for me at convenient times. None of that has to do with what I was talking about. I use eclipse. Sorry dude, read you completely wrong. Thought you were pulling out that "real programmers do X" bullshit.
|
# ? Aug 7, 2009 21:28 |
|
Perhaps you should all try the Forth way of organizing codeThinking Forth posted:Some Forth practitioners advocate storing source code in variable-length, named text files, deliberately emulating the approach used by traditional compilers and editors. This approach may become more and more common, but its usefulness is still controversial. "what is stackholm syndrome?" - leo brodie, 1984, 1994, 2004
|
# ? Aug 7, 2009 21:31 |
|
Otto Skorzeny posted:By the way, does Java make any guarantees as to the layout of the class based on the order of declaration of members? In case you weren't being ironic: no. IIRC there was a paper about implementing profile-directed field layout in the Jikes RVM.
|
# ? Aug 7, 2009 21:57 |
|
fletcher posted:Eclipse lists it in alphabetical order in the sidebar while leaving the code alone as well, but if you do Source->Format or Source->Cleanup or whatever the hell it is it will rearrange everything. The real horror is that it can be set up to do that every time you save. But eclipse still rocks.
|
# ? Aug 8, 2009 00:19 |
|
Otto Skorzeny posted:By the way, does Java make any guarantees as to the layout of the class based on the order of declaration of members? For the most part, you can put anything in any order you want. Initializer blocks are run from top-to-bottom, but if you have more than one, and they depend on each other, then there's something wrong with your design anyway.
|
# ? Aug 8, 2009 00:44 |
|
Goat Bastard posted:The real horror is that it can be set up to do that every time you save. The worst one is where it's set to remove unused local variables upon save. I, out of instinct, hit CTRL + S every time I finish typing anything. Frequently I'll go like this: code:
Also, one of our projects at work is in a weird half-Mavenized state which Eclipse doesn't like and really messes up the 'build automatically option' which really sucks.
|
# ? Aug 8, 2009 00:46 |
|
I found this today while working on a C++ program. Most of the class's variables have get-()/set-() functions, but... this one variable... I'm not sure what's going on here, but I don't like it.code:
|
# ? Aug 8, 2009 01:20 |
|
plushpuffin posted:I found this today while working on a C++ program. Most of the class's variables have get-()/set-() functions, but... this one variable... I'm not sure what's going on here, but I don't like it. Presumably it's so: code:
|
# ? Aug 8, 2009 02:21 |
|
UraniumAnchor posted:Presumably it's so: Yes, I understand what it does and how, I just don't know why anyone would bother writing it that way, especially when there are fifty other normal get/set functions in the same class.
|
# ? Aug 8, 2009 03:49 |
|
Otto Skorzeny posted:By the way, does Java make any guarantees as to the layout of the class based on the order of declaration of members? There's no guarantees or need to do so. The class file format begins with some identifiers and then a constants pool. Everything else within the file refers to the constants pool including the class name itself. When the class is loaded the constants pool is interned, creating exactly one canonical copy of each constant in the permgen space which everything refers to. Since method, class and field references are also in the constants pool, interning dynamically links the program.
|
# ? Aug 8, 2009 04:15 |
|
UraniumAnchor posted:Presumably it's so: What. That's practically a standard idiom. (Granted, it's an idiom that dumb people use, but that's neither here nor there.)
|
# ? Aug 8, 2009 04:47 |
|
Avenging Dentist posted:What. That's practically a standard idiom. (Granted, it's an idiom that dumb people use, but that's neither here nor there.)
|
# ? Aug 8, 2009 04:50 |
|
sex offendin Link posted:Autoindenting is one thing, but moving code around vertically would throw me off all the time. I don't know where most of my code is vertically. It's convenient having two related functions next to each other, but otherwise I'm just Ctrl+F/jumping to what I'm looking for. What really sucks is when.... Otto Skorzeny posted:Perhaps you should all try the Forth way of organizing code You're working in MUMPS and you have a 32k routine size limit and you have to spread your code across 17 different routines.
|
# ? Aug 8, 2009 06:15 |
|
Zhentar posted:What really sucks is when.... This sentence went on 19 words too long. Seriously, if you work at Epic Systems, just loving quit, it's not worth it.
|
# ? Aug 8, 2009 06:20 |
|
Well, Hearts of Iron 3 came out today, with plenty of broken code in it. I caught myself trying to debug the ai files in a game I want to play for fun. I deal with that enough at work. The problems are probably much deeper than I can see or fix. Here's an example of the quality that sent me over the edge:code:
|
# ? Aug 8, 2009 08:13 |
|
Avenging Dentist posted:What. That's practically a standard idiom. (Granted, it's an idiom that dumb people use, but that's neither here nor there.) serious question: does the idiom include putting "Get" in the method name
|
# ? Aug 8, 2009 08:20 |
|
GrumpyDoctor posted:serious question: does the idiom include putting "Get" in the method name How can the class give the variable to the caller to modify it if it doesn't get it first?
|
# ? Aug 8, 2009 08:30 |
|
Avenging Dentist posted:just loving quit, it's not worth it. I like it. (My job, not MUMPS) Otto Skorzeny posted:"what is stackholm syndrome?" - Zhentar, 2009
|
# ? Aug 8, 2009 14:19 |
|
Zhentar posted:I like it. (My job, not MUMPS)
|
# ? Aug 8, 2009 17:52 |
|
code:
|
# ? Aug 8, 2009 20:08 |
|
TRex EaterofCars posted:
I see you're working on the genocide that is the ot_coupon module. May god have mercy on your soul.
|
# ? Aug 9, 2009 03:10 |
|
TRex EaterofCars posted:
I always use i,j,k for my n^3 for loops
|
# ? Aug 9, 2009 04:54 |
|
royallthefourth posted:What a horror! I'm having trouble coming up with anything worse than i, iii, and ii in that order other than x, l, and platypus or something like that. At least i,j,k are easy to keep track of. Edit: lI, Il, l1 could be amusing, depending on the font.
|
# ? Aug 9, 2009 07:40 |
|
My guess is it started out i, ii, iii, and at some point the programmer decided to just switch the loop order without changing anything else.
|
# ? Aug 9, 2009 08:22 |
|
quadreb posted:My guess is it started out i, ii, iii, and at some point the programmer decided to just switch the loop order without changing anything else. I think I'll start using roman numerals as names for nested loop variables in the future.
|
# ? Aug 9, 2009 12:56 |
|
TRex EaterofCars posted:
For the past 6 years I've worked with a codebase that "grew" out of oscommerce. The amount of sheer... god, I can't think of a word bad enough to describe it, sickens me. Thankfully I'm moving to a new job at the end of the month ><
|
# ? Aug 10, 2009 01:31 |
|
PraxxisParadoX posted:For the past 6 years I've worked with a codebase that "grew" out of oscommerce. The amount of sheer... god, I can't think of a word bad enough to describe it, sickens me. Thankfully I'm moving to a new job at the end of the month >< I just finished writing a wrapper in CodeIgniter around OSC. It's amazing the amount of bullshit global crap you need to provide to run some of this poo poo. It's kind of funny that the part I hate most about php (specifically it's half-assed accidental flexibility) is the exact mechanism I used to make this work.
|
# ? Aug 10, 2009 02:06 |
|
PraxxisParadoX posted:For the past 6 years I've worked with a codebase that "grew" out of oscommerce. The amount of sheer... god, I can't think of a word bad enough to describe it, sickens me.
|
# ? Aug 10, 2009 08:07 |
|
Sebbe posted:I think I'll start using roman numerals as names for nested loop variables in the future. The real WTF is, of course, the fact that you're writing a 4-level nested loop, but that's another story.
|
# ? Aug 11, 2009 05:07 |
|
Sebbe posted:I think I'll start using roman numerals code:
|
# ? Aug 11, 2009 15:43 |
|
Incoherence posted:Another way to make people crazy: if you ever have an opportunity to write a 4-level nested loop, use the variables i, ii, iii, and iiii. Or a four-level nested SQL join with table aliases T, TT, TTT, and TTTT. Sadly such a beast exists, and they exist in numbers
|
# ? Aug 11, 2009 15:54 |
|
pokeyman posted:
code:
|
# ? Aug 11, 2009 15:58 |
|
No Safe Word posted:Or a four-level nested SQL join with table aliases T, TT, TTT, and TTTT. Sadly such a beast exists, and they exist in numbers hahahaha, at another job: code:
|
# ? Aug 11, 2009 16:06 |
|
Incoherence posted:Another way to make people crazy: if you ever have an opportunity to write a 4-level nested loop, use the variables i, ii, iii, and iiii. I kinda miss the simple elegance of mathematical programming loving enterprise Java
|
# ? Aug 11, 2009 16:30 |
|
pokeyman posted:
code:
|
# ? Aug 11, 2009 19:15 |
|
Lexical Unit posted:an unholy abomination. Jesus H Christ. I think I need to lie down for a minute.
|
# ? Aug 11, 2009 20:57 |
|
|
# ? May 14, 2024 23:57 |
|
Tell me about it! That stupid code accepts things like IIII and IIV. Madness.
|
# ? Aug 12, 2009 01:13 |