SMF reaction to 'unused, useless globals'
SMF reaction to 'unused, useless globals'
« on November 17th, 2013, 12:05 AM »Last edited on November 18th, 2013, 11:14 PM by Nao
Hm, I see the SMF devs is ignoring the whole thing..thats just strange. It is logical to use only what you need, right? Declaring a whole bunch just for nothing cannot be applauded in any case...I am bit amazed that personal feelings take precedence instead of just common sense there.

:edit: by Nao: Split from http://wedge.org/pub/off/8300/a-short-script-to-remove-unused-useless-globals-in-php/

Auk

  • Can I get a Box?
  • Posts: 64
Re : SMF reaction to 'unused, useless globals'
« Reply #1, on November 17th, 2013, 06:43 AM »Last edited on November 17th, 2013, 06:56 AM
At least Nao is not ignoring. I wonder if mybb cares.

The result: mybb 1.6.11
total: 224

Which is currently my choice of what forum software I would use. Think these variables exists for hackish modular purposes or something?

Nothing is more despicable than respect based on fear.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re : SMF reaction to 'unused, useless globals'
« Reply #2, on November 17th, 2013, 08:48 AM »
Bloc, I don't have access to that topic, even as a friend.

So, I'm guessing they are indeed talking about me in more private sections? Nice. And Arantor was complaining that I had made a fair topic about him in a board that he would still be able to acccess if he hadn't removed himself from it.
Sorry for the OT.

TE

  • Posts: 286
Re : SMF reaction to 'unused, useless globals'
« Reply #3, on November 17th, 2013, 06:24 PM »
Quote
Well, I'm sure you already did 90% of the work through NetBeans, didn't you? ;)
I decided against using NetBeans for that generally, because of the many false positives, such as "undeclared variable" when doing preg_match_all($regex, $string, $my_new_variable)... Yeah, NetBeans, I'm not going to initialize a variable just because you can't fathom that PHP would actually initialize the variable this way, hmm...
yep, I found most via Netbeans but Spuds, Eman and I spend hundreds of hours for cleaning, documenting and improving the code.. It's not only Netbeans' benefit ;)
Re : SMF reaction to 'unused, useless globals'
« Reply #4, on November 18th, 2013, 08:26 AM »
Quote from Nao on November 17th, 2013, 08:48 AM
Bloc, I don't have access to that topic, even as a friend.

So, I'm guessing they are indeed talking about me in more private sections? Nice. And Arantor was complaining that I had made a fair topic about him in a board that he would still be able to acccess if he hadn't removed himself from it.
Sorry for the OT.
Yeah, you know.. there are good friends and bad friends :lol: That's why I've finally quit and deleted my old account.
Thorsten "TE" Eurich - Former SMF Developer & Converters Guru

Re : SMF reaction to 'unused, useless globals'
« Reply #5, on November 18th, 2013, 01:55 PM »
Its a bit of bashing in that topic yes, sad to say. I think its open for SMF helper group, which I am in..but not sure, maybe I am granted special access or something.


Aaron

  • Posts: 356
Re : SMF reaction to 'unused, useless globals'
« Reply #6, on November 18th, 2013, 02:27 PM »
Quote from Nao on November 16th, 2013, 11:11 PM
I can't believe SMF's has always been so 'dirty', in comparison...
Well, at the time, the main rationale behind having all those unused globals was having them there for mod authors to use, so they wouldn't have to modify the global-line as well — which, in most cases, would cause conflicts.

Now that we're all moving towards hook-based mods, it's certainly time to clean it all up, indeed.
"The entire British Empire was built on cups of tea … and if you think I'm going to war without one, mate, you're mistaken."

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Drunken Clam

  • Drool, drool, drool....!
  • Posts: 154


Nao

  • Dadman with a boy
  • Posts: 16,079
Re : SMF reaction to 'unused, useless globals'
« Reply #11, on November 18th, 2013, 08:07 PM »
Quote from Aaron on November 18th, 2013, 02:27 PM
Well, at the time, the main rationale behind having all those unused globals was having them there for mod authors to use, so they wouldn't have to modify the global-line as well — which, in most cases, would cause conflicts.
Yes, I remember that; I was told about that by Norv, IIRC, when I did commits to the SMF base in 2010.
Quote from Aaron on November 18th, 2013, 02:27 PM
Now that we're all moving towards hook-based mods, it's certainly time to clean it all up, indeed.
Yup.
Although, again, it's not a BIG deal... Personally, I'm currently onto other more important issues, globals themselves can wait until I have nothing left to fix. ;)
Re : SMF reaction to 'unused, useless globals'
« Reply #12, on November 18th, 2013, 08:11 PM »
Quote from TE on November 17th, 2013, 06:24 PM
yep, I found most via Netbeans but Spuds, Eman and I spend hundreds of hours for cleaning, documenting and improving the code.. It's not only Netbeans' benefit ;)
I so would love to have them (in addition to you :P) contribute to Wedge, if only for details like these; this is the kind of offer I could never refuse. ;)

Well, it's too bad that Wedge and Elk aren't directly interoperable; I mean, I can't exactly cherry-pick a commit from Elk, etc. Or even from SMF. As such, I really very rarely check out either changelog, and will usually miss any bugfixes.
BTW, I don't know if you read my Wedge changelogs, I suppose you do, but in case you don't, sometimes I'll document bugs that are also in Elk and SMF; or just in SMF, in which case it doesn't concern you. Just search new rev pages for 'smf', and it should narrow them down.

emanuele

  • Posts: 125
Re : SMF reaction to 'unused, useless globals'
« Reply #13, on November 18th, 2013, 10:58 PM »
Quote from Nao on November 17th, 2013, 08:48 AM
Bloc, I don't have access to that topic, even as a friend.
I suspect it is the Development (private) board, right Block?

Until a while ago that board was open to friends as well, apparently now[1] the board has been closed down[2].
 1. I suspect after someone discovered the terrible truth I was able to access it[1]
 1. I don't have a friends badge by choice, but I'm SM member, so I asked for permission to write in the boards I'm supposed to be able to write, and along with that came for some funny reason due to the (in)famous permissions mess the access to Dev-private, not that I asked for it, not that I wanted it, but apparently it was "in the pack"... Yes, I admit I lurked from time to time! I'm so sorry! :cry:)
 2. I can just assume in order to avoid that a competitor would be able to read the development secrets...sorry guys, I may have spoiled you the fun... :(
Re : SMF reaction to 'unused, useless globals'
« Reply #14, on November 18th, 2013, 11:02 PM »
Quote from Nao on November 18th, 2013, 08:11 PM
Well, it's too bad that Wedge and Elk aren't directly interoperable; I mean, I can't exactly cherry-pick a commit from Elk, etc. Or even from SMF. As such, I really very rarely check out either changelog, and will usually miss any bugfixes.
The three are already enough distant (code-style wise) that is almost impossible to cherry-pick anything from anything.
I stopped a while ago cherry-picking things back to SMF because it was just a plain re-write.
Quote from Nao on November 18th, 2013, 08:11 PM
BTW, I don't know if you read my Wedge changelogs, I suppose you do, but in case you don't, sometimes I'll document bugs that are also in Elk and SMF; or just in SMF, in which case it doesn't concern you. Just search new rev pages for 'smf', and it should narrow them down.
I still have the bookmark somewhere with the last page I read, though it's a while I don't have much time to keep up with everything... lol