Results 1 to 5 of 5

Thread: Should I be bothered...?

  1. #1
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,230
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Should I be bothered...?

    I've just spent a few minutes trying to work out an issue in a colleague's website. I've encountered two issues. One is that he's deployed the website as a compiled site and he's never shared his source code with me, so looking at any of his code is actually impossible - so he'll have to sort his own bug out. It may be good practice to protect your intellectual property by compiling sites when deploying them to client servers, but I've never seen the point when the site is being deployed on our own servers that only we have secure access to - I'd much rather have the code easily accessible and fixable by anyone. No doubt someone will come in and tell me why this is a terrible idea, though

    The second is in a bit of javascript handling. The first thing that struck me was that he'd written any javascript at all, since he's a dyed-in-the-wool WebForms developer and seems to hand off as much code writing to Microsoft as possible, so I'm not sure why he hasn't just added a validation to the element in question. The second was that he'd used document.all to grab a reference to the element. Now, I started web development in 1994, so I'd seen document.all before, but not for a very long time. So I did a quick google search. The top result in a google search for document.all is a page titled "Five Most Common Coding Errors". Here's what it says about people using document.all:

    Use of document.all anywhere in a script is a clear indication that either the script was originally written for IE4 or the person who wrote the script doesn't know the latest Javascript standards.
    So, should I be concerned about it? Should I take my colleague to one side and suggest that he reads up on modern standards? Should I fix up his code in the mean time? Or should I just shrug my shoulders and let it be, given that I'm probably going to be made redundant in a couple of months?

  2. #2
    Senior Moment blueball's Avatar
    Join Date
    Aug 2005
    Location
    Edinburgh
    Posts
    2,426
    Thanks
    846
    Thanked
    379 times in 294 posts
    • blueball's system
      • Motherboard:
      • Asus Z390A
      • CPU:
      • i9-9900KS
      • Memory:
      • Kingston 64GB (2x32GB) DDR4 2400MHz
      • Storage:
      • 2TB Samsung 970 EVO Plus NVMe PCIE M.2 plus Samsung 860 EVO 4TB SSD
      • Graphics card(s):
      • ASUS TUF RTX 3080 Ti GAMING OC
      • PSU:
      • Corsair HX850 850 W Full Modular 80 Plus Platinum
      • Case:
      • Corsair Carbide 330R Ultra Silent Midi Tower
      • Operating System:
      • Win 10 Pro x64
      • Monitor(s):
      • IIYAMA 3461WQ IPS 34" 3440x1440 plus BenQ GW2765HT IPS 27" 2560x1440
      • Internet:
      • Plusnet 28Mb

    Re: Should I be bothered...?

    Let him know what you have read in a matter of fact way. If he wants to fix it then he can but at least you have done the "right" thing.
    Rgds,

    BB
    Hexus Trust here and here

  3. Received thanks from:

    scaryjim (09-06-2011),Terbinator (09-06-2011)

  4. #3
    Does he need a reason? Funkstar's Avatar
    Join Date
    Aug 2005
    Location
    Aberdeen
    Posts
    19,874
    Thanks
    630
    Thanked
    965 times in 816 posts
    • Funkstar's system
      • Motherboard:
      • Gigabyte EG45M-DS2H
      • CPU:
      • Intel Core2Quad Q9550 (2.83GHz)
      • Memory:
      • 8GB OCZ PC2-6400C5 800MHz Quad Channel
      • Storage:
      • 650GB Western Digital Caviar Blue
      • Graphics card(s):
      • 512MB ATI Radeon HD4550
      • PSU:
      • Antec 350W 80+ Efficient PSU
      • Case:
      • Antec NSK1480 Slim Mini Desktop Case
      • Operating System:
      • Vista Ultimate 64bit
      • Monitor(s):
      • Dell 2407 + 2408 monitors
      • Internet:
      • Zen 8mb

    Re: Should I be bothered...?

    "Dude, what's with the document.all? you are such s JS looser. nube. lolz"

    Something like that should get the message across

  5. Received thanks from:

    Disturbedguy (09-06-2011),scaryjim (10-06-2011)

  6. #4
    Senior Member
    Join Date
    May 2009
    Location
    Norfolk
    Posts
    474
    Thanks
    3
    Thanked
    26 times in 26 posts
    • pipTheGeek's system
      • Motherboard:
      • Asus P6T Deluxe
      • CPU:
      • Core i7 920 @ 3.6GHz
      • Memory:
      • 3 * 2Gb Corsair XMS @ DDR3 1800
      • Storage:
      • 300GB 15K SAS + 500Gb
      • Graphics card(s):
      • GTX570
      • PSU:
      • corsair 760i
      • Case:
      • Corsair 550d
      • Operating System:
      • Windows 7
      • Monitor(s):
      • Dell Alienware 23"
      • Internet:
      • VM 50Mb

    Re: Should I be bothered...?

    Never mind the Javascript, why isn't the source code in source control?

    I'd much rather have the code easily accessible and fixable by anyone. No doubt someone will come in and tell me why this is a terrible idea, though
    There is your reason "I'd much rather have the code easily accessible and fixable by anyone"

    The code should be in souce control, when it is changed it should go from source control to testing. You really don't want people to be encouraged to edit code directly on live with no record of the changes made or why they were made.

    As for the "how to tell someone else that their code is bad (in some way)", it is something I struggle with and don't like doing. However, if I think something is wrong then I always say something. Either I'm right and the other programmer can learn something, or I'm wrong and I can learn something. (Or sometimes we never reach a decision and have to agree to disagree)

  7. #5
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,230
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: Should I be bothered...?

    Quote Originally Posted by Funkstar View Post
    "Dude, what's with the document.all? you are such s JS looser. nube. lolz"

    Something like that should get the message across
    I'd have to repeat it about nine times though: he's not an English national and while his English language skills are functional (and far better than my skills in his native language) they don't go much beyond that! Lovely idea though...

    Quote Originally Posted by pipTheGeek View Post
    Never mind the Javascript, why isn't the source code in source control?
    A variety of reasons, but mostly because I've been too busy doing the actual programming part of my job to do the "making sure everything is done by best practice". I've been meaning to implement source control since I started working here, but I spent more than two years as the only developer so it wasn't as urgent, since the only person making changes to files was me (I also maintained separate dev, test and live environments for all my sites anyway, just out of habit )! When this other guy was appointed my programming workload was meant to go down so I'd have time to do things like put source control in place and write and enforce deployment policies, but instead my boss decided to create a shiny new project for him to work on so I've had exactly the same amount of programming work to do, but I've also been expected to clear up when the new guy drops the ball. I may be the only person I know who is actually hoping to be made redundant at the minute...!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 03-03-2008, 08:04 PM
  2. Replies: 0
    Last Post: 28-03-2007, 12:36 PM
  3. Replies: 12
    Last Post: 10-10-2006, 10:43 AM
  4. Replies: 54
    Last Post: 28-09-2006, 06:03 PM
  5. Replies: 3
    Last Post: 31-08-2004, 06:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •