1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Burnout and sillyness...

Discussion in 'Programming' started by deathshadow, Dec 5, 2015.

  1. #1
    Have you ever stared at a codebase for so long and switched between languages so much on a project, you start making rookie mistakes?

    There's a project that two friends and I started discussing over a decade ago that I have the notes and some prototype code from that I'm finally taking the time to resurrect and launch. Laughably I've been sitting on the domain for nearly a decade with no site at it, partly from the death of those two friends putting a kabosh on a lot of the content development, partly my own health being somewhat dubious.

    ... but last week I found a hard drive backup of information, data, conversation logs, code snippets and other things we wanted to implement, and it has spurred me into action. I'm HOPING to have a working site filled with useful content up and running within the coming week.

    For the first time in a long time, I'm juiced up and enthusiastic about a project... to the point I've hit up against a whole new problem. Being unable to recognize when it's time to take a break.

    How bad did it get? I just spent 30 minutes staring at some code wondering why it won't run. I'm sitting here thinking "This is a perfectly good JavaScript object, why isn't it working?!?"

    Herpa... freaking... derp... It's a PHP file.

    I'm just curious if anyone else has ever pushed that far on coding where you start make glaringly obvious dumbass mistakes. Things like that can be quite amusing in hindsight... I just thought some folks might get a chuckle out of my own silly mental disconnect. We all make mistakes, even the most seasoned of us.

    Seasoned? That's a horrible thing to say to a man.

    Definitely time for me to take some time away from this project.

    So... what's the silliest "obvious mistake" you folks have ever had while working on a project? If you can't laugh at yourself who can you laugh at?
    SEMrush
    I'm sure Dan and Aaron are up there looking down, having a good laugh at my expense.

    Hmm... that's a strange thing for an agnostic to say...
     
    deathshadow, Dec 5, 2015 IP
    th.sigit likes this.
    SEMrush
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    Oh yea. Far too often, though I also don't code that often what with...life and all.
    Wrote a whole program for an Arduino last week and had dollar signs in front of all of my variables.

    CutCodeDown actually going to make it out this century?
     
    blueparukia, Dec 6, 2015 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    Hm. Right now, I mostly remember some stupid "oh, that variable wasn't named that" and other stupidness, but I have one...

    I was coding up a calendar for a site I was working on, where it was supposed to be possible to add and remove events/appointments - pretty standard stuff. While it mostly worked as intended, I got a call from one of the users telling me that the weeknumbers were off. The dates and all were fine, but the weeknumbers were off by one for the current year (and every year after). However, it wasn't off for the PREVIOUS year, so I was a bit confused about how that could suddenly happen.

    I went through the code, read and re-read the documentation, but couldn't for the life of me figure out why the weeknumbers worked for 2012 (which was the first year), but not for 2013, 2014 and so on. Paging through the years, I sometimes came across some that seemed to be working, so I just got even more curious as to what in the world was going on.

    Back and forth, trying different types of date-conversions, and suddenly, it all worked. I backtracked, trying to figure out what I had done to fix it, but couldn't really put my finger on it - until I realised I'd reset the config-file (due to a problem with the server, nothing to do with that exact problem) - and for some reason, now it worked. I dug out the old config file, and went through all the defined date-settings - and found that within a call to a date-function, 2012 was hardcoded as the year - somewhere along the way I had fixed that, and forgotten about it, but not updated the file on the production site. Head hits desk, one or two days, more or less wasted, and a quick upload to the production-site, and a call "it works now" later, it was time to not look at code for a while...
     
    PoPSiCLe, Dec 6, 2015 IP
    deathshadow and Webcenter like this.
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,474
    Likes Received:
    1,919
    Best Answers:
    247
    Trophy Points:
    515
    #4
    deathshadow, Dec 6, 2015 IP
  5. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,731
    Likes Received:
    26
    Best Answers:
    13
    Trophy Points:
    175
    #5
    Yup, been there done that... to often... then i'll grab my fishing rod and go fishing! :)
     
    EricBruggema, Dec 6, 2015 IP
  6. NetStar

    NetStar Notable Member

    Messages:
    2,465
    Likes Received:
    539
    Best Answers:
    21
    Trophy Points:
    245
    #6
    Biggest newbie mistake I have ever made is taking hours to disect my code that won't compile then realizing I was only missing a semi-colon, quotation or bracket on or near the very same line of the warning. When this happens (it happened more than once) I know it's time for a much needed break.

    I use to have a lot of ambition and energy when working on new projects. Over the year I lost that spark. I spend a lot of time bouncing from one idea to the next. It's difficult to find the motivation to start working on a large project. But once you get it.. it's important you set up a schedule and know when to work on it and when not to. It's especially important to take scheduled breaks otherwise you may find yourself burning out and sittign on that project for another 10 years then completing it when it no longer makes sense to!
     
    NetStar, Dec 7, 2015 IP
  7. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #7
    I think experience helps, knowing when to take a break before causing damage. My biggest problem at the moment is I'm working on a couple of different projects, 2 websites and 2 Android apps. I find spending a week coding Android apps and then switching back to PHP throws me completely off and takes me a day to get back into it.
     
    scottlpool2003, Dec 9, 2015 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,474
    Likes Received:
    1,919
    Best Answers:
    247
    Trophy Points:
    515
    #8
    Yeah, I think the switching between languages a lot is a common cause of mistakes. Like trying to break myself of using ":=" instead of "=" every time I come back from a Pascal project... or worse, switching between AT&T/Motorola style assembler (like GAS) and Intel style -- where the targets and source of parameters are swapped, and the AT&T style assembler is too ****tarded to recognize registers so you have to prefix all of them with % signs, must lead hex values with a zero if the first letter is a character, and "must" use upper case for all opcodes and registers...

    AT&T/Motorola/GAs:
    MOV 0x0A5, %EAX

    MASM & TASM: (Turbo assembler the leading zero is optional)
    mov EAX, 0A5h

    BASM (inline assembler in Borland Delphi, Pascal or C):
    mov eax, $A5

    NASM (what I've been working in lately)
    mov eax, 0xA5

    There's a reason a LOT of x86 developers tell the GNU Assembler where to stick it. One of the more annoying things in Free Pascal is that it defaults to motorola style, but at least it lets you switch to Intel.

    ... and don't even get me started about the wide array of C quirks where you'd think the same high level language would be the same across platforms -- but you start messing about with WinAVR and CC65...
     
    deathshadow, Dec 9, 2015 IP