-
• #802
Oh, 'horrendous'.
Yes, fortunately the weaknesses associated with being dyslexic usually mean considerable strengths elsewhere.
-
• #803
where the fuck is the rip thread and what do you search to get it?
-
• #804
It's here https://www.lfgss.com/thread15841-8.html
what happened, Graham Norton dead again? -
• #805
Try using 'RIP'. It works for me so I can only assume you made a typo.
-
• #806
http://www.lfgss.com/newpostinthread15841.html
search for string "thread" then ctrl + F RIP
-
• #807
Cheers,
yeah I probably made a typo on a three letter word, its bad enough having to do away with my easel and chalk -
• #808
I'm useless with formatting but I am trying to tidy up my programming style.
Is there a standardised formatting / good practice for local vs global variable naming i.e something simple like this:
Local
rider_weightL = 120
Global
mirror_angleG = pi/3
or is it best just to presume people will work out the scope and not bother with this, am I getting anal?
What language do you program in?
In JavaScript I use ALL_CAPS for global variables (I only have one, though), although in C++ and Java convention that is a constant.
To be honest, global variables open the door to a ton of bugs and if you're serious about improving your style, try to avoid them wherever possible. I know it sounds like a pain in the arse, but it's much better to pass variables around through function calls.
-
• #809
I'm aware that globals are doggy but I'm currently working on a large Fortran 77 code I've inherited. I've also basically learnt to program on this code (well other than a year or so coding in MATLAB with a little Java) too so it's got bad practice from three years ago built deep into it from the people I inherited it off of plus my own bad practice over the last 3 + years added on top that would too difficult to remove now.
Played around with C++ on the side but never written anything big. A friend of mine tells me not to bother and just learn C#. I suppose it depends on hte job if it's C++ vs C# but despite the fact I like C++ from what little I've played with it it does seem like there are more C# job out the just get a job quick type thing compared to C++ where you have to be a guru.
-
• #810
I'd agree with Lenny. Avoid global variables at all costs.
Making code readable is a matter of opinion, so be flexible and consider input from others. I worked with someone who insisted on using Hungarian Notation once and his code was freaking impossible to read. (As an aside, the project we were working on had a massive code base written by west coast acid casualties and no-one really understood it - it took me two weeks to change one input text box to make it Y2K safe. The moral is, always get your code reviewed if possible and include readability as one of the aspects to be covered by the review).
-
• #811
I'd agree with Lenny. Avoid global variables at all costs.
Making code readable is a matter of opinion, so be flexible and consider input from others. I worked with someone who insisted on using Hungarian Notation once and his code was freaking impossible to read. (As an aside, the project we were working on had a massive code base written by west coast acid casualties and no-one really understood it - it took me two weeks to change one input text box to make it Y2K safe. The moral is, always get your code reviewed if possible and include readability as one of the aspects to be covered by the review).
This is the problem, I've never had anyone review my code. I've just come to realise how shit it is. so started to do things differently with new code I've written and look up some "best practices". It's tough though as my code is basically a massive hack. It's a combination of BASH doing some output organization and renaming, and string manipulation (FORTRAN is a bit long winded for string manipulation unless you write your own libraries) and FORTRAN. I'm basically a reasonably competent FORTAN hacker. i.e fucking useless.
-
• #812
Fortran 77? It's over 10 years since I saw any of that, ah the good old days.
-
• #813
Where the fuckity fucking fuck is my lockring tool!??!
-
• #814
is there anywhere you can purchase peanut butter M&M's in the UK?
-
• #815
is there anywhere you can purchase peanut butter M&M's in the UK?
These sound nice.
Peanut butter is lust.
-
• #816
yeah..there amazing.
-
• #819
is there anywhere you can purchase peanut butter M&M's in the UK?
Probably but the only place I've ever seen them was Adelaide and Spencer St station in Melbourne.
-
• #820
Now, where's my lockring tool?
-
• #821
Over there...behind the thing. Well sort of under it really.
-
• #822
Check your midget's arse if it's not there maybe maxcrowe I saw he was looking for one.
-
• #823
What is the name of the icey treat that looks like a zoom (It's a rocket shape) but has banana in the middle and strawberry on top and something blackcurrent as well maybe? All of it is ice except for the banana bit which is kinda ice creamy. The banana ice cream bit is a sort of shell that once eaten off reveals strawberry beneath.
This has been annoying me all day. Anyone got any ideas?
-
• #824
Dunno but that reminded me of a lolly in the 70's called King Kong, they were bloomin' lovely!
-
• #825
Oh dear.
[B]You can buy a case of 24 of this item for just £35.34[/B]
phonetically: whore-end-ouse,
or something. If you think my typing is bad you should see my hand writing. The spelling mistakes while typing are from missed the red lines, sometime in hast I just miss them unfortunately, my hand writing is much worse, plus messy and hence is practically illegible. If I have to write something on a board I need to have it pre-written in front of me to copy, it makes life long winded.