Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Neuroses and Programming

Name: Anonymous 2010-07-08 13:25

Are any of you guys neurotic? (Are all of you neurotic?)

I'm super neurotic. And I fear that, more than it helping me to program well, it gets in my way. I am obsessed with doing things the right way, and I begin to feel very uncomfortable if something I'm working on is becoming too complicated in the wrong way -- but somehow I'll be completely oblivious to how overblown my "clean and modular" solution ends up. But sometimes, the solution isn't obvious to me -- so if something is really stumping me, it eats my productivity and prevents me from feeling good about my work.

How do you deal with this? What general rules do you follow, and what do you do to put your mind at ease? For one thing, I'm thinking of getting a fish to put on my desk so that I can unload my stress on him.

Name: Anonymous 2010-07-08 13:53

I have a field of points and a vector in direction which the point field will be moving.  I want to generate a bounding box around the field in such a way that the box's front and sides are aligned with the vector and its perpendiculars.  It's driving me crazy that the only way I can think to do this is to iterate through all the points and use a lot of vector projection math, and that I'd have to do this every time I'd need to use a bounding box which is every time something represented by a field of points needs to move.

Name: Anonymous 2010-07-08 13:55

I have Asperger's syndrome. I read about it once in a webcomic and it turns out I have it.

Name: Anonymous 2010-07-08 14:23

>>3
/prog/ - XKCD, Living The Dream

Name: Anonymous 2010-07-08 14:32

I'm obviously not. You should see the hacked up c-style c++ code I write for work. I take pride in it's terseness and lack of enterprise bullshit.

Name: Anonymous 2010-07-08 14:38

I'm not neurotic, just a cunt

Name: Anonymous 2010-07-08 14:56

>>3
It didn't happen to be this webcomic, did it?
http://www.qwantz.com/index.php?comic=1310

Name: Anonymous 2010-07-08 14:57

>>1
Same here.

I can get so obsessive about my shit that i refuse to eat, or sleep or even my other duties and if i do sleep, my subconcious still keeps thinking over this problem, but not in the cool "im in the matrix way" but just the same feeling echoing i have at day.
When i have problems i think for days about my shit without results mostly, even knowing what i will gain nothing of it, i just cant stop thinking.

*Brofist.

Name: Anonymous 2010-07-08 15:06

Name: Anonymous 2010-07-08 15:11

>>3,9
Personally, I don't identify with XKCD. I'd like to think that I'm funny.

Name: Anonymous 2010-07-08 16:02

Name: Anonymous 2010-07-08 16:49

Reduce salt consumption and you'll get less neurotic.
______________________________
  (\_/) This is Bunny. Copy and paste
 (='.'=) Bunny into your signature to help
 (")_(") him gain world domination

Name: Anonymous 2010-07-08 17:08

>>11
Huh.

Name: Anonymous 2010-07-08 21:24

>>11
Terrible!
Unnecessary!

Name: Anonymous 2010-07-08 21:46

>>14.
15.

Name: Anonymous 2010-07-08 22:21

When you've been a programmer for a while, you usually start to see where some solution may be, ah, problematic. For instance, I can immediately see the problems involved in venting on a fish.

Name: Anonymous 2010-07-08 22:41

>>1
Always happened exactly the same for me. If I somehow get the impression that what I'm working on has become impure, I can't set upon anything else until I figure it out.

Name: Anonymous 2010-07-09 0:57

>>17
Why are you speaking in the past tense? Is everything ok?

Name: Anonymous 2010-07-09 4:31

Do the very simplest thing that could possibly work.

That attitude has always helped me, take it easy, premature optimization is evil. It's a way of life, don't build anything for the future, even if you know you will need it, when the future comes, it'll be much clearer what you need and more often what you don't need.

Name: Anonymous 2010-07-09 15:18

>>16
Are you implying that this fish idea is actually a second problem?

Name: Anonymous 2010-07-09 16:03

>>1,17
Yeah, I get this also. I've been working on a side-project and I have spent *a lot* of time refactoring it over and over just trying to get a style and architecture that makes sense to me. I don't have enough experience with this stuff to understand how to do it properly.

The best solution I've found to keeping it under control is YAGNI (you ain't gonna need it). Basically exactly like >>19 says: do it in the most straightforward way possible, even if it leads to some dirty code or a small amount of duplication. Only refactor it if it starts being a big problem.

The only thing I don't agree with >>19 is that it's not a matter of optimization. I'm not trying to make it fast; I'm trying to make it clean, where clean is ill-defined. I only know that it's dirty when I look at it. That's the root of the neurosis.

Name: Anonymous 2010-07-09 16:08

Something tells me you fuckers aren't in industry.

Name: Anonymous 2010-07-09 16:49

I'm not neurotic, I'm just very, very good and have an eye for details. I alternate between designing clean, perfectly structured programs and hacking together the most ``clever'' code I can manage as my fancy strikes, though the latter only on personal projects.

For work I put some effort and research into a clean start and flexible design, but if some of the pieces won't quite fit towards the end I often just jam them in instead of backtracking and trying for perfection.

Name: Anonymous 2010-07-09 16:54

>>22
I've also noticed the very low standards when it comes to code ``in industry''. No wonder so much software sucks.

Name: Anonymous 2010-07-09 16:59

I try to just hack things togheter and then fix things so that they are proper.

Name: Anonymous 2010-07-09 17:06

>>25
* together

Name: Anonymous 2010-07-09 17:55

sure is /r/circlejerk in here

Name: Anonymous 2010-07-09 22:38

>>27
Back to the imageboards.

Name: Anonymous 2010-07-10 0:29

>>22,24
Actually this is the other "best solution" to the neurosis is to code for someone else; when you're on the clock, and programming someone else's ideas instead of your own, you just get shit done and don't worry too much about how dirty it is. I work in the industry and unless you're building rockets, it pretty much works like that. When it's your own code and your own time though, it's a lot different.

Name: Anonymous 2010-07-10 5:15

>>29
I work in the industry and unless you're building rockets, it pretty much works like that.
Don't project your own incompetence onto the world at large, Leah.

Name: Anonymous 2010-07-10 14:50

>>12,22
Cured.

Name: Anonymous 2010-07-10 18:31

>>31
CURE MY ANUS

Name: Anonymous 2010-07-10 18:32

                                     _
                                    (_)
              |    .
          .   |L  /|   .          _
      _ . |\ _| \--+._/| .       (_)
     / ||\| Y J  )   / |/| ./
    J  |)'( |        ` F`.'/        _
  -<|  F         __     .-<        (_)
    | /       .-'. `.  /-. L___      
    J \      <    \  | | O\|.-'  _  
  _J \  .-    \/ O | | \  |F    (_)
 '-F  -<_.     \   .-'  `-' L__   
__J  _   _.     >-'  )._.   |-' 
`-|.'   /_.           \_|   F   
  /.-   .                _.<    
 /'    /.'             .'  `\   
  /L  /'   |/      _.-'-\
 /'J       ___.---'\|
   |\  .--' V  | `. `
   |/`. `-.     `._)
      / .-.\
VK    \ (  `\
       `.\

Name: Anonymous 2010-07-10 18:32

>>32
The real anus poster at least has the decency to sage.

Name: Anonymous 2010-07-10 18:32

* g o a t s e x * g o a t s e x * g o a t s e x *
g                                               g 
o /     \             \            /    \       o
a|       |             \          |      |      a
t|       `.             |         |       :     t
s`        |             |        \|       |     s
e \       | /       /  \\\   --__ \\       :    e
x  \      \/   _--~~          ~--__| \     |    x 
*   \      \_-~                    ~-_\    |    *
g    \_     \        _.--------.______\|   |    g
o      \     \______// _ ___ _ (_(__>  \   |    o
a       \   .  C ___)  ______ (_(____>  |  /    a
t       /\ |   C ____)/      \ (_____>  |_/     t
s      / /\|   C_____)       |  (___>   /  \    s
e     |   (   _C_____)\______/  // _/ /     \   e
x     |    \  |__   \\_________// (__/       |  x
*    | \    \____)   `----   --'             |  *
g    |  \_          ___\       /_          _/ | g
o   |              /    |     |  \            | o
a   |             |    /       \  \           | a
t   |          / /    |         |  \           |t
s   |         / /      \__/\___/    |          |s
e  |           /        |    |       |         |e
x  |          |         |    |       |         |x
* g o a t s e x * g o a t s e x * g o a t s e x *

Name: Anonymous 2010-07-10 18:33

>>35
lol goatse

Name: Anonymous 2010-07-10 18:39

>>34
Usually I do, but I was in antisocial mood

Name: Anonymous 2010-07-10 19:12

The answer is KISS.

Name: Anonymous 2010-07-10 19:14


                            _  _   _  _   _
                        || ̄lノ ̄/ | ̄| / ̄/  / ̄/
                        ||   /  |  |./  〈_/  〈_
             ,、,、,、           ||   \  |  |. ̄/  / ̄/  /
              _从 : : : :从_      ||  「ヽ ヽ,.|  | /  /  /  /
              _≫: : : : : :≪_     ||_j. ',_j |_|./_/  /_/
              ≧ : : ‐‐: : ≦       ̄    ̄   ̄  ̄    ̄
            /ジ⌒V゙⌒ヽ,:\                  __,r~、
.         /: : |,トv(_ ,_)ハノ) |: : \,r~'⌒⌒⌒ヽ,      ノ⌒: : : : : : : \
.         ,(: : : : :j》,苙.||r苙,《 !: : :.)': : : : : : : : : : : : )、   r': :,ニミ彡、: : : : : :ヽ
        从: : : : 八r-、|レ‐、ノ {: :Y´: : : : : ;ノハソ: : : : ハ   |: :l{ ハ .ハ、`(: : : : : : ),
        从 : : : : l{   ^^    }! ,(: : :.)¨,ニ、 `,ニ、`(: : :.:)  |: :j/,_| |.ィr=r\ : : : : ), _,z‐≪ ̄`ー-こ_
       从: : : : 八  ,=ニ=、 .八{ : : 「Y   V/   Y.),: :八_j: :j} ].| ` ¨^'く( : : : : },≫: : : : : : : : : : : : ≧,_
       ),: : : : 从ノ>、 _ , イリj{: : : :{ |.r赱| |r赱 | }: : : :) ノ : :{V^- ̄V^´j}: : : : :)': : : : : : : : : : : : : : : ≪
       _≫'三 ̄\辷竺彡仆): : : :| ⌒ ,r‐┐⌒ |: : : ,(三从∧ 'ニ´   从 : : ノ: : : : : : : : : : : : : : : :: : ヽ,
 \\rく三ヽ, ̄\ \\  ̄⌒Y) : : :ミ ニ_`エ´_ニ l: : :.{ ̄`} } }く>、_ , イ〕 : : ,( : : : : : :__人_ ノ从乂: : : : :.),
   `Y⌒'く.三\  \ \\ _ j从: : :.\_   _/リ: :从 ⌒`'<_\   ノイ: :从 : : : : : : :》rt-《  rtッ《 : : : :《
    |    {\三\  \)^Y 〉〉〉ノ ) : : :ノ   ̄  j乂: : :)) 、、、 Vヽ`=rr≪イ: : : : : : : :レ'⌒ヾ   l|: : : : :.',
    |  .八. \三ヽ, 人 ノ^^^〉ム_,:_ノ     // トrイ⌒`'〉,〉〉 〉 \.|.| 川): : : : : : :.:{    `´   ;:! : : : : :㍉
   ,イ^Y'´ : :\_〉三人   : :/二二f|      //二二||   `く/≫==┴彡'(: : : : : : : : ハ、 ゙こ.'  /从: : : : : : \
 /イ〕  : : : : ⌒>'´   : :,イ二ニ二{{     .//ニニ二||      ´\―=彡仆、: : : : : : :リ|.\ _/彡ハ》、:_: : : : : :)、
./ 〔彡': :`ー彡イ   : :/ ||二ニ二j{{    //二二二リィ        ヽ,二二rヘ\: : : : rヘ込竺彡人 /   ̄ ̄`7 }

Name: Anonymous 2010-07-10 19:37

>>19
I'm convinced that this is a good way to begin. First make it run, then make it run better.

Name: Anonymous 2010-07-10 21:06

>>19,40
I was under the impression that programming in such a way that it's resilient or receptive to future changes is a key sign of good work.

Name: Anonymous 2010-07-10 21:12

I'm trying a new strategy where I work the whole thing out on paper. It's hard to do that because I find the class/object diagrams tedious and unhelpful, as well as some flowcharts -- but my theory is that problems like these most often lie in the design, not a detail of the implementation.

I'm also going to start keeping a journal that I post in only when I'm feeling this way, so that I can get a better idea of what the problem domain is. I know that these sorts of issues feel very particular to the case at hand, but I have a suspicion that there are some very general trends to what sorts of problems cause these feelings of anxiety; identifying this will be helpful because not only will it add familiarity to the problem, it will also provide general guidelines for the solution (which also, in the moment, seem highly specific to the case).

Both of these strategies are not novel. The first is common in the enterprise and the second is common among good creative thinkers of any kind. But only recently have I realized that I'm keeping myself in the dark by trying to suss these things out in my head, rather than plotting them on paper.

Name: Anonymous 2010-07-10 23:07

>>41
Yes and no. You should, of course, write clean and well structured code, but you shouldn't make it more complex than necessary right at the moment. Liek, don't create factories for simple objects, not matter what "future changes" you have in mind, just don't do it, if it isn't necessary.

Name: Anonymous 2010-07-11 0:45

>>43
Factories? Enterprise bullshit?

Name: Anonymous 2010-07-11 11:33

>>44
Factories have their place. Don't be such a pussy.

Name: Anonymous 2010-07-11 13:31

>>45
Only if you are using a crippled language like Java.
;_;

Name: Anonymous 2010-07-12 3:13

>>21
>The only thing I don't agree with >>19 is that it's not a matter of optimization. I'm not trying to make it fast; I'm trying to make it clean, where clean is ill-defined. I only know that it's dirty when I look at it. That's the root of the neurosis.

i suffer from this as well and it stops me from ever getting anything done.

i keep trying to tell myself that perfect is the enemy of good but anything not perfect is, as far as my brain is concerned, garbage...

Name: Anonymous 2010-07-12 4:24

>>47
not a matter of optimization. I'm not trying to make it fast; I'm trying to make it clean

That's still optimization, you have something that works, but you're trying to make it better - optimization.

Name: Anonymous 2010-07-12 11:09

I do the "First it runs, THEN it runs better" approach, too, and while it has its advantages, you'll sometimes find that if you'd gone for the Best Practices approach from the start, shit would've been easier.

Name: Anonymous 2010-07-12 11:56

>>49
My fear with that is that I spend too much time conforming the code to best practises over getting to run well (if even runs at all). I've found it much easier to do prototypes then reimplement it to something I could be proud of.

Name: Anonymous 2010-07-12 13:14

The problem with cheap solutions of mine it that i often dont design a framework/interface and the face lots of trouble when i have to bring my programs in some state.

Name: Anonymous 2010-07-12 17:28

I have a minor problem where I try to make things 'clever' and I'll sit there planning and coding ignoring other tasks until I'm satisfied.
This probably has something to do with rhe large amount of Java boilerplate code that I had to write in a previous life and saying 'This is easy so why does it take so many lines of code to express it?'

The fact that MS has created LINQ makes this problem even worse as I'm doing a pretty large C# project atm.

Don't change these.
Name: Email:
Entire Thread Thread List