Click here to Skip to main content
15,900,378 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Give a man a fish... Pin
dan!sh 29-Aug-16 17:59
professional dan!sh 29-Aug-16 17:59 
GeneralRe: Give a man a fish... Pin
virang_2129-Aug-16 19:11
virang_2129-Aug-16 19:11 
GeneralRe: Give a man a fish... Pin
W Balboos, GHB30-Aug-16 0:46
W Balboos, GHB30-Aug-16 0:46 
GeneralRe: Give a man a fish... Pin
Rage30-Aug-16 4:02
professionalRage30-Aug-16 4:02 
GeneralRe: Give a man a fish... Pin
Dr.Walt Fair, PE1-Apr-19 12:41
professionalDr.Walt Fair, PE1-Apr-19 12:41 
GeneralAPOD Pin
kdmote29-Aug-16 7:33
kdmote29-Aug-16 7:33 
GeneralRe: APOD Pin
R. Giskard Reventlov29-Aug-16 9:38
R. Giskard Reventlov29-Aug-16 9:38 
RantI hate JavaScript PinPopular
Marc Clifton29-Aug-16 7:20
mvaMarc Clifton29-Aug-16 7:20 
You know you've posted this too many times when Chrome auto-completes the subject line for you!

Anyways, I have this function:

function initializePage(raceList, hlsList) ...

(for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways,

Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site.

Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way."

Anyways, in one place, I accidentally forgot to pass in the lists:

initializePage()

which resulted in the random "why isn't the list showing up" error.

I blamed my SPA code, I blamed jqWidgets, I blamed my mother.

And after staring at the code for hours over several weeks, I finally actually saw the offending line.

God, I want parameter type checking. I know, use TypeScript or something.

Marc
Imperative to Functional Programming Succinctly

Contributors Wanted for Higher Order Programming Project!

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

GeneralRe: I hate JavaScript Pin
Vark11129-Aug-16 7:42
Vark11129-Aug-16 7:42 
GeneralRe: I hate JavaScript Pin
Marc Clifton29-Aug-16 9:24
mvaMarc Clifton29-Aug-16 9:24 
GeneralRe: I hate JavaScript Pin
W Balboos, GHB29-Aug-16 7:48
W Balboos, GHB29-Aug-16 7:48 
GeneralRe: I hate JavaScript Pin
Jeremy Falcon29-Aug-16 9:42
professionalJeremy Falcon29-Aug-16 9:42 
GeneralRe: I hate JavaScript Pin
Jeremy Falcon29-Aug-16 9:41
professionalJeremy Falcon29-Aug-16 9:41 
GeneralRe: I hate JavaScript Pin
Marc Clifton29-Aug-16 10:17
mvaMarc Clifton29-Aug-16 10:17 
GeneralRe: I hate JavaScript Pin
Jeremy Falcon29-Aug-16 10:28
professionalJeremy Falcon29-Aug-16 10:28 
GeneralRe: I hate JavaScript Pin
Jeremy Falcon29-Aug-16 10:33
professionalJeremy Falcon29-Aug-16 10:33 
GeneralRe: I hate JavaScript Pin
Marc Clifton29-Aug-16 10:49
mvaMarc Clifton29-Aug-16 10:49 
GeneralRe: I hate JavaScript Pin
Jörgen Andersson29-Aug-16 12:18
professionalJörgen Andersson29-Aug-16 12:18 
GeneralRe: I hate JavaScript Pin
Jeremy Falcon30-Aug-16 1:12
professionalJeremy Falcon30-Aug-16 1:12 
GeneralRe: I hate JavaScript Pin
Master.Man198029-Aug-16 10:31
Master.Man198029-Aug-16 10:31 
GeneralRe: I hate JavaScript Pin
Kiriander29-Aug-16 21:40
Kiriander29-Aug-16 21:40 
GeneralRe: I hate JavaScript Pin
Plamen Dragiyski30-Aug-16 0:20
professionalPlamen Dragiyski30-Aug-16 0:20 
GeneralRe: I hate JavaScript Pin
kalberts30-Aug-16 2:19
kalberts30-Aug-16 2:19 
GeneralRe: I hate JavaScript Pin
RugbyLeague30-Aug-16 2:42
RugbyLeague30-Aug-16 2:42 
GeneralRe: I hate JavaScript Pin
CygnusBMT30-Aug-16 3:24
CygnusBMT30-Aug-16 3:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   487 votes