SMF WTF (AND SOMETHING TO MAKE THE TITLE LESS INVALID)
-
SMF has its faults from a design standpoint but one of the things it tries to do correctly is separate logic and presentation. That's not to say there isn't presentation logic (if this is defined, output that, or slightly more complex things like displaying the right number of columns in a table based on current situations)
But they have always been good about this rule, so when I see one of the official support team helping someone out by jamming a query into the view, I rebuke them politely. I also point out that if they were to tweak one of the queries currently being run, the extra data can be obtained without any significant extra effort. Apparently, just for fun, it's easier to understand what's going on if you modify the view to include a query as opposed to learning how the entire damn system is built.
Then I see the sum total of what transpires and what he's made of my suggestion. He has now reduced from two queries to one (when I told him he could avoid it entirely though he's listing my advice as helping), and it's still in the view as opposed to the logic because violating good design is helpful to a beginner wanting to learn how to build things for SMF. Go team. And the query makes a buttumption that data will be returned, which is not a certainty.
I cannot believe how nice I've just been in explaining the flaws.
If you're not a strong programmer, giving out advice including programming snippets is probably not for you.
-
it tries to do correctly is separate logic and presentation.
If it makes you feel any better, you beat my company in your introductory sentence.
-
If it makes you feel any better, you beat my company in your introductory sentence.
I may rage at SMF but it's not entirely terrible except for clowns who should never ever be let anywhere near code.
And no, it doesn't make me feel better. It just pisses me off that the average quality of code is going down not up.
-
I may rage at SMF but it's not entirely terrible except for clowns who should never ever be let anywhere near code.
And no, it doesn't make me feel better. It just pisses me off that the average quality of code is going down not up.
The best code is a single line. If you ever want to expand a project, make it do more, add more functionality, by the laws of the universe, it will get worse. It's your job as a senior developer to mitigate that slide.
-
Yes, I tried that. I gave up because it was pushing my blood pressure up. I think I've finally got the lead developer to test his commits before he commits them now, though. At least, he does if he had to ask me about them before implementing them.
-
Yes, I tried that. I gave up because it was pushing my blood pressure up. I think I've finally got the lead developer to test his commits before he commits them now, though. At least, he does if he had to ask me about them before implementing them.
Well, then the problem is elsewhere. Developers shouldn't have control over whether the QA tests pass (outside of writing the proper code to pass them) or releasing the code.
-
We're talking open source with increasingly poor ideas of what QA means. It got to the point where I began to be embarrassed with having my name on things because of their problems.
Testing? There's no actual test system set up. I doubt most of the current devs could even write unit tests, even if the architecture of SMF were not essentially monolithic.
I'm not even talking about that, though. I've seen too many cases of commits being made by various people to SMF... that aren't even tested through the interface by the person making them. It's the practical equivalent of submitting code to repo that you don't even know will compile let alone do the job for which it was written.
-
We're talking open source with increasingly poor ideas of what QA means. It got to the point where I began to be embarrassed with having my name on things because of their problems.
Testing? There's no actual test system set up. I doubt most of the current devs could even write unit tests, even if the architecture of SMF were not essentially monolithic.
I'm not even talking about that, though. I've seen too many cases of commits being made by various people to SMF... that aren't even tested through the interface by the person making them. It's the practical equivalent of submitting code to repo that you don't even know will compile let alone do the job for which it was written.
The site I'm working on by myself is about 18 Python scripts, and has better management than that. o_O
-
SMF 2.0 weighs in at around 110k lines of PHP and JS. 2.1... fuck knows but it's more, and a year ago they were convinced it was 'ready to go' except for the theme and some testing. I reckon it's still got a year to go, but I won't be dragged back into the dev team because it will be a trainwreck because I'm all for cutting dead weight at the code level and they don't like that.
They would rather make every new feature optional than just trust going with a new feature.
-
I don't count lines of JS since it's not Real Code™.
-
There's still over 100k lines of PHP excluding the JS.
-
You should just commit over other commits, but with tests so that yours is pulled.
-
I tried to encourage a good culture there in dev terms. But the entire thing is a hideous mess and I'm not sure I didn't make it worse. I KNOW I didn't help by quitting half way through things I was working on but I found it untenable to be part of a team that claims to support innovation and growth and proceeds to stifle it at every opportunity.
-
SO is down right now. Just throwing that out there.
-
SO is down right now. Just throwing that out there.
I'd love to claim responsibility, but sadly not.
Thing is, this particular case felt like SO all over again. It's the blind leading the blind and trying to excuse bad behaviour without any understanding of why it's bad with a half-assed justification of why it's good. Like most SO questions I've ever seen, really.
-
Could be worse. You could be playing with Unicode in Python right now...
-
I do Unicode in PHP, my suffering trumps yours, I feel.
-
I do Unicode in PHP, my suffering trumps yours, I feel.
with the moderate amount of PHP that I've done, and what I see in Python, I have a feeling that the two are very similar.
-
I fixed your title for you. You can thank me later.
-
There's still over 100k lines of PHP excluding the JS.
10,000 lines of javascript? What is this, Dicsourse2.0? Are you counting jQuery in debug format per line or something?
-
I do Unicode in PHP
Unicode in JS is way more fun.
[code]
var π = Math.PI;
var ლ_ಠ益ಠ_ლ = 42;
var 〱 = 2;
var ൽ = alert;
if (〱< π) {
ൽ(ლ_ಠ益ಠ_ლ);
}
[/code]Also, http://cloudcannon.com/smileys is TRWTF.
Filed Under: Bury that var ൽ = alert; in another file somewhere and watch your co-worker shit brix trying to figure out what is this I don't even.
-
package main import "fmt" import "math" func main() { const π = math.Pi const ლ_ಠ益ಠ_ლ = 42 const 〱 = 2 var ൽ = fmt.Println if 〱 < π { ൽ(ლ_ಠ益ಠ_ლ) } }
-
Are you making a case
foror against go?
jeez big is a terrible markup.Also, the lack of indent inside that if statement makes baby $DEITY cry.
-
There actually is indenting, but Chrome doesn't show it for some reason.
-
eccentric tab type?
-
Also, how can you not <3 the asshole javascript!
-
Copy and paste into a text editor. That line has about five tabs.
-
Double also, why did that reply to me and not you
-
-
-
-
-
ok that wins, i mentioned you without an @
ben_lubar ha. screw the @s.
-
-
Nice.
I think that's how I'm going to do profile links from now on. hell with whether it actually notifies them or not.
-
-
kinda interesting.
-
If you're gonna make it 245x245 instead of 45x45, why not change the image size?
-
Because then it's still a valid QR code
-
Now i've made it worse to spite you.
-
I like it.
-
added spoiler. makes better.
-
Actually the spoiler makes it pretty funny - you think clicking the image will make it more clear.... but it won't, sucker
-
[code]
[spoiler]ben_lubar[/spoiler]
[/code]
is officially my new mention method
-
Damn. now everyone is asleep but me it seems
-
-
10,000 lines of javascript? What is this, Dicsourse2.0? Are you counting jQuery in debug format per line or something?
No, it's simply that I don't know off hand how much JavaScript was in SMF 2.0, but knew that it was somewhere between 0 and 10k lines.
Also, no, jQuery is not included which means it's doing everything itself, including AJAX by hand, heck it even includes an attempt at a WYSIWTF editor which is where quite a few KBs of the JS code came from.
-
NIH syndrome?
-
NIH syndrome?
Nah. The WYSIWTF editor was but it was mostly done in 2006-7 originally and the devs at the time took the view that they didn't want to be dependent on anyone else for patching schedule. I didn't entirely agree, but I understood.
As for the rest of it, most of the JS code goes back to 2005 or so before jQuery was even a thing.
The current 2.1 build has jQuery but barely uses it and one of the devs was noted to have said that while we have it it should not be a dependency, but a tool, meaning that she didn't want to write too much code based on it in the first place.
If you're already loading it every page, you might as well actually make use of it having done so.
-
he current 2.1 build has jQuery but barely uses it and one of the devs was noted to have said that while we have it it should not be a dependency, but a tool, m
This is what happens when people read shitty blog posts denouncing using jQuery at all and proceed to forget the reasons stated why and the alternate solutions. Web hipsters, they do it because they are confused.