Do I? Don't I? Advice plz.


  • SockDev

    So we all know my hate/love/hate thing with the SMF project. Fuck knows why I still care, maybe it's stupidity, maybe it's pity. But anyway.

    They have a situation with respect to iPhone emoji. 4 byte UTF-8 characters can't be handled properly. Yes, you guys would have a field day, I'm sure.

    What happens is that MySQL's "utf8" datatype isn't really UTF-8. It's 3 byte UTF-8, not real UTF-8. So any 4 byte UTF-8 gets truncated.

    Now, as of MySQL 5.5.3, there is such a thing as the utf8mb4 datatype that will handle 4 byte characters at performance cost and whatnot, but the powers that be have decided that mandating MySQL 5.5.3 is too much of a requirement (bear in mind, they only just made it to making PHP 5.3 a requirement!) so we're at the stage of decoding that shit by hand because PHP can't exactly do so cleanly, and manually converting to entities. Crazy huge entities will be fine, so even if  turns up, nothing will choke on it. (This is 10FFFF, the largest valid character in UTF-8)

    My concern is not whether this should be done. I believe it should, because competence and correctness. My concern is whether I volunteer myself for the job.

    I don't trust them to do it without fucking it up. But I don't want to get sucked in to fixing their shit; I already did more than their entire team put together in figuring out what the problem was (user reports 'iPhone emoji don't work, help') and I don't know what to do for the best.

    Opinions plz. Flaming me for not leaving the poor fools to their fate is fine even if I'd heard it all before and we all know PHP is TRWTF anyway, so I'll spare you that one. (And I am well aware that I myself am TRWTF for not being able to let go of their issues.)



  • Opinions plz. Flaming me for not leaving the poor fools to their fate is fine even if I'd heard it all before and we all know PHP is TRWTF anyway, so I'll spare you that one.

    Start your own forum software project. Eat their lunches. Eat Jeff's while you're at it.



  • Not that this helps, but I recently installed an instance of MediaWiki somewhere and the default text type for MediaWiki is....wait for it....BINARY. Or BLOB. Or something like that. It was NOT one of the text types.

    The reasoning? Database text types weren't flexible or performant enough so they recommend you configure MediaWiki to use a binary type and let MediaWiki handle conversion between binary and text.


  • SockDev

    It's so tempting to do it but I don't trust myself to lead such a thing at this time. And also, I'd use fucking PHP because that's my specialist skill. (Yes, I know, shoot me now please)

    MediaWiki going BLOB makes sense. I actually raised this very point months ago but there's no way I can actually do it in SMF, not even if I were a developer... it has one enormous problem.

    You see, SMF is old enough that it largely predates shit having sane UTF-8 support, meaning that throughout its code base, it's still got ample support for ISO-encoded stuff. There's so many 'are we in UTF-8 mode or not' conditionals, it's not even funny any more.

    The problem this presents is the conversion step since there's a 'convert to UTF-8' in the admin panel, which will get MySQL to do it, and then go back and fix columns that contain serialised data.

    If I didn't have dual encoding fuckwittery, I'd have moved them all to BLOBs everywhere for exactly that reason, but you know, legacy crap.

    I did have a whole list of plans for the next major version, of which sane OOP even in PHP was doable, but it was considered too controversial and too progressive for their tastes so it wouldn't happen.

    But I don't have the balls to go my own. I have so much doubt in myself it's not even funny. I'm simply not in the right place mentally to do that, but I like to think I've got the skills. Others certainly do think that.



  • I agree with Captain Oblivious, because I think the entire open source concept is dumb in the first place.

    At the very least, say you'll take it on if they pay your living expenses for a month. Get some cha-ching out of the deal.


  • SockDev

    I actually pitched that to them once. And it was a literal headdesk moment.

    Those people have a number amongst them that actually believe that developers are no more important to their project than any other contributor. Yes, seriously. An open source project based around developing a piece of software regards developers as equal importance to support people, to doc writers, to marketers etc.

    When it was even so much as hinted about paying anyone, their argument was 'if you pay them, you have to pay everyone and there would be no money left'.

    I only wish I were kidding.



  • @Arantor said:

    An open source project based around developing a piece of software regards developers as equal importance to support people, to doc writers, to marketers etc.

    I actually agree with that sentiment. Software by developers needs a lot of non-developers to tell them all their ideas are stupid. Look at Git to see what happens when you don't have that.

    @Arantor said:

    When it was even so much as hinted about paying anyone, their argument was 'if you pay them, you have to pay everyone and there would be no money left'.

    I agree with that too, which is why I think open source is stupid garbage which only produces stupid garbage, unless it's managed by a corporation that does pay people like Mozilla or Google. (Or, to rephrase that slightly, a thin Google shell and Google itself.)

    EDIT: then again, Discourse pays its contributors, and it's stupid garbage, so my theory still needs a bit of work. Maybe Discourse isn't technically organized as a corporation? Let's go with that.



  • You're not going to improve your self-esteem by not trying to do stuff...


  • SockDev

    I understand the sentiment, to a point. Of course developers need non-devs to provide feedback. But right now the entire project has been in limbo for three years because every single fucking thing is designed by committee.

    I put in a thing to link to the terms and rules of the site, in the footer. I had no negative feedback about this. I did, however, have a three page discussion on what the wording of that link should be, whether it should be 'Terms and Rules' as I'd used, or 'Terms of Service', or 'ToS' with a tooltip saying 'Terms of Service'.

    Or the previous one where the software historically used 'child boards', cue multi-page debate on whether it should be 'sub-boards' or not after (non technical) users were confused by it.

    I got involved with the project years ago to help build something nice, to work on the tools I was using myself, to do a bit of CV-building, you know, all the good and altruistic reasons for doing open source.


  • SockDev

    @Captain said:

    You're not going to improve your self-esteem by not trying to do stuff...

    True enough, but I have enough going on without taking on something of that size and complexity. I am not especially good at managing my time and I could easily spend months on it instead of doing things that make me actual money.



  • You're only inviting yourself to more pain.


  • SockDev

    @chubertdev said:

    You're only inviting yourself to more pain.

    That's what I thought. But I can't let them go 😦



  • Sigh.

    really

  • SockDev

    This. So many times this. For years.




  • BINNED

    @Arantor said:

    sane OOP even in PHP was doable, but it was considered too controversial and too progressive

    Get out. Now. Seriously. If any of them knew what the fuck they are doing, they would already be grovelling at the feet of PHP 5.3 and be in the middle of a major rewrite.

    As the only voice of sanity (that's how it seems from your posting at least), you're the one that's got something to lose in that asylum.



  • @Matches said:

    You could store it in UTF-16?

    Probably still ups the minimum requirements too much.

    "MySQL 4.0.18 or higher (at least 4.1.0 would be better) and PHP MySQL client API version 4.0.18 or higher."



  • Mysql 4? Fuck that. Run arantor.



  • So as I understand it:

    Option 1: continue to endure those people's silly restrictions

    Option 2: send them a nice long rant explaining what they're doing wrong, why they're doing it wrong, how to fix it and how they won't fix it because they're idiots and will end up with an inferior product. Leave if they don't change their ways.

    Option 3: I don't know how your job status is, but maybe you could find another project that satisfied you as a programmer and gave you money in return? vBulletin and XenForo are proprietary so they must pay developers, they're PHP and they might be interested in hiring someone with experience in another forum product.


  • SockDev

    OK, so let me give you some background.

    SMF 2.0 is the current stable release. It started life around Christmas 2005, during the end of 1.1's development (stable in summer 2006)... 2.0 finally lurched to stable in 2011 after much internal drama and bullshit, including an attempted coup by well-meaning but largely inept management. The minimum requirements were never bumped beyond that time from whence it came, but it will not function correctly in PHP < 4.3 no matter what the requirements say (it will 'mostly' work)

    For 2.1, which started in 2011, they bumped minimum PHP version to 5.1.0, as it helped a few things they were doing. I pushed them and got them to bump to 5.3.8 earlier this year - 2014 - for the core.

    As far as MySQL goes, the installer now requires a minimum of 5.0.3, which I bumped and even that was a push.

    Now, I sympathise with their situation. A little. Their primary userbase is full of non-technical people who use truly shitty hosting. Free hosting is common, despite how shite it is. I've seen free hosts that are relatively common whereby they have current PHP versions and crippled old versions of libraries like PCRE, where things like \h don't get processed properly.

    It then becomes SMF's fault when they don't play nicely, of course. So I sympathise with their 'be as generous as possible' in terms of hosting. It's not like Discourse where they can mandate versions of things via Docker and not worry about deploy requirements.

    So, why no sane OOP? Mostly because it's the hobbyist crowd. There's a shortage of competent developers generally. The only reason for 5.3 was because I pushed hard enough to get them to go to bcrypt for password storage. If it hadn't been for that, they wouldn't have gone beyond 5.1, they would have left in the shite compatibility code I wrote to phase out preg_replace with /e for 5.5 compatibility rather than growing up.

    I'd love to go sane OOP. At one time I'd even have been leading the charge but it means breaking so many of their perceived requirements.

    For example: the add-on system is largely an automated find/replace system. While there are ways to do add-ons that don't have to do that with a less than elegant hooking system (and it's better but far from ideal in 2.1), most add-on authors don't bother, nor really exercise the potential of what could actually be done with it anyway, meaning that most users are left in various states of hell due to it.

    They don't want to leave this behind because 'it would reduce flexibility'. Never mind the massive improvements in stability and usability for users by having a sane plugin API. Never mind the massive drop in support issues. None of that matters because this perceived flexibility would be compromised.

    Never mind XenForo basically implemented all of this sanely, because they (SMF) can't conceive that it could be done.

    To the options presented by @anonymous234:

    1. That's kind of where I am right now. I endure because for some fucked up reason I still care.

    2. Been there, done that. The last time I did such a rant was one entitled "Please have more care for code" when I was pointing out that the dev team were making commits they clearly hadn't even tested themselves through the interface (don't even get me started on unit testing, that's something I can only dream of). Problem is related to 1. I can't seem to let go, and I've asserted pretty much since I joined here that I was TRWTF for this very reason.

    3. Right now I'm doing some consulting out of it. I've sunk enough hours into this festering slagheap that I will make money out of customising peoples' stuff and fixing shit that's broken. In theory I could migrate to XenForo (ain't no way I'm going near vBulletin) and do paid offerings there but I've already sunk enough years into SMF that I really don't want to have to rebuild my reputation and cred if that makes sense. XF isn't especially interested in hiring though, judging by the way they're doing things, and I doubt I could convince them I was anything special seeing how XF is largely the leader - not the follower - in the market place right now.



  • Fuck it. Go Full - "Welcome to the MySQL 5....fuck dot versions! 5.Nothing SUCKAS!"

    Not because MySQL supports random version like that, but random versioning like that is fun.



  • If you're looking for a hobby and don't feel the SMF management is reasonable, why not fork it and fix it up the way you think it should. If you're so unsure of yourself, you can make it a private fork and hack at it in secret. If you succeed, great. If not, you can just pretend you went through a MMO stint and move on with something else.

    If you're looking for a paying job, on the other hand, you should probably spread out your interests a bit beyond the forums. Getting too attached to a specific business domain can be beneficial in certain cases, but not when that business is generally shrinking.


  • SockDev

    I already tried. I inherited all the joy of their clusterfucks and bugs, plus the ones I introduced myself while trying to re-engineer their codebase, to the point it would be quicker and more intelligent to torch it, and start again with either Zend Framework or Symfony or similar and build it on top of that.

    Oh, I'm already diversifying, not just outside of forums but outside of IT in general. 😄



  • At this point, I'm not sure what you want for us.

    So my next recommendation: eat Chinese food.



  • @Arantor said:

    < snip >

    None of this indicates to me anything other than 'Run, @Arantor'



  • Best recommendation I've seen today.


  • SockDev

    @blakeyrat said:

    At this point, I'm not sure what you want for us.

    So my next recommendation: eat Chinese food.

    I think I already got my answer, which is to figure out how the fuck to let go of this bullshit and move on.

    If it wasn't like 3am, Chinese food would totally rock, too.



  • @Arantor said:

    It's so tempting to do it but I don't trust myself to lead such a thing at this time. And also, I'd use fucking PHP because that's my specialist skill. (Yes, I know, shoot me now please)

    Madness, PHP can be beautiful if done right. Which is of course rare. But the articles here more than an example of how other languages aren't any better at preventing stupid from stupid people.

    Sigh, I have to defend PHP because I use it too but it works great. I don't need a server farm to run a Hello World app unlike ruby

    Overall though, I come from previously spending 5 or so years developing on IPB. Great forum software and it evolved from the previous origins of no OOP to what it is now(100% proper OOP). phpBB underwent similar transformation though it's in some half/half state. And vBulletin is worse off than phpBB. SMF just went back in time instead and its terrifying.

    Like you said, I really think you should cut your losses. SMF is at a deadend. Only a vahalla rampage like that of libressl could fix it.


  • Impossible Mission Players - A

    I'd be mildly interested in building WhatTheForum or something... I wonder if we could actually put together a working dev team to eat Discourse's lunch... ;P



  • Honestly I'd be in for building a PHP forum too...just for fun, as I have time of course, but it would be nice to have fresh blood in the industry that doesn't suck and isn't totally bogged down by past design decisions. Fresh codebases are fun.



  • @mott555 said:

    PHP forum [...] that [...] isn't totally bogged down by past design decisions

    Isn't that a wee bit impossible, by the virtue of it being PHP? [4]

    Fatal error: Argument 1 passed to lolphp() must be an instance of string, string given in /in/qWENe on line 6



  • I was talking about all of the stories @Arantor's been giving us on how SMF is afraid to move forward.

    I've been working on a PHP side project just to learn PHP and I'm beginning to see why PHP is always TRWTF...but there's the fact that it literally takes 3.3 seconds to get a LAMP server up and running from scratch. Nothing else is that fast and easy to configure yet. A little harder to develop for perhaps, but deployment is so easy a caveman can do it.



  • It's one of the reasons why PHP is so full of wtf, not because there are flaws in the language(comeon, other languages do too) but because it's so easy, it attracts the lobotomized cavemen who proceed to make it look bad.



  • See, this is the extent of the PHP code I've written:

    # factoid: !dyk [args...]
    
    <php>include("http://dl.dropbox.com/u/17987530/factoids/didyouknow.php");
    
    # file: didyouknow.php
    
    <?php
    $h=array('User-Agent'=>'Shocky(IRC) - !dyk - triggered by '.$sender);
    $r=Requests::get("http://en.wikipedia.org/w/api.php?action=parse&format=xml&page=Template:Did_you_know",$h,array());
    $x=new SimpleXMLElement($r->body);
    $y=new SimpleXMLElement("<text>".$x->parse->text[0]."</text>");
    $d=$y->table[1]->tr->td->ul->li;
    $i=min(count($d),max(1,$args))-1;
    $c=$d[$i];
    echo "(".($i+1)." of ".count($d).") Did you know ";
    $l=$c->b->a;
    $c=preg_replace("@\</?b\>@",chr(2),$c->asXML());//bold
    $c=preg_replace("@\<a@",chr(31)."<a",$c);//underline start
    $c=preg_replace("@\</a\>@",chr(31)."</a>",$c);//underline end
    echo strip_tags($c);
    echo "   ".chr(3)."01,08Read more: http://en.wikipedia.org".$l['href']." ";
    ?>
    
    # factoid: !otd [args...]
    
    <php>function h($h){return end($h);};$d=date('F j');$a=count($t=preg_split("#\n+#",h(h(h(h(json_decode(Requests::get("http://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&explaintext&titles=Wikipedia:Selected_anniversaries/$d",['User-Agent'=>'ShockyIRC: OTD'])->body,1)))))))-2;if($args<1)die($t[0].($t[0]==$d?': No holidays for today':'').". Use !otd <n> to view anniversaries (0/$a)");$i=min(max($args,1),$a);echo"[$i/$a] On this day, in ".$t[$i];
    

    Of note is the $i line in didyouknow.php, which asks for the max() of 1 and $args, which is a string.

    Also, the single-letter variables are an artifact from when the whole script still fit in a single IRC message.



  • Yea.......



  • You may also be interested in this monstrosity, which I did not write:



  • You can write the same pile of crap in any language.



  • You can't write obfuscated code in whitespace.



  • [code]
    function array_unique(a){var b="",c={},d="";for(b in a)if(a.hasOwnProperty(b)){var d=a[b],e;a:{e=d;var f=c,g="";for(g in f)if(f.hasOwnProperty(g)&&f[g]+""===e+""){e=g;break a}e=!1}!1===e&&(c[b]=d)}return c}function implode(a,b){var c="",d="",e="";1===arguments.length&&(b=a,a="");if("object"===typeof b){if("[object Array]"===Object.prototype.toString.call(b))return b.join(a);for(c in b)d+=e+b[c],e=a;return d}return b}
    [/code]

    Wait did you mean PHP can't do obfuscated code in whitespace? Ala the C competitions every year? Because PHP will allow that. So will C# and anything else that does bracket based blocks.



  • You can't write obfuscated code in Whitespace because all of your code is, by definition, nicely indented.


  • :belt_onion:

    @delfinom said:

    Wait did you mean PHP can't do obfuscated code in whitespace? Ala the C competitions every year? Because PHP will allow that. So will C# and anything else that does bracket based blocks.

    woosh. @pjh we have a winner.



  • I'm pretty sure he legitimately hadn't heard of the language before.


  • :belt_onion:

    which would mean he legitimately didn't get the joke.

    Someone didn't get the joke: Badge of shame when someone seriously Didn't Get The Joke™



  • What the fuck man. 3 AM is the BEST time to eat Chinese food.



  • I dunno man, I personally feel 2:30AM is a much better time.



  • @ben_lubar said:

    I'm pretty sure he legitimately hadn't heard of the language before.

    Or that.....
    I only know brainfuck, how am I supposed to know all the exotic languages?



  • Some good ones:

    Algorithms:



  • Run away, @Arantor.

    You know how to do it right. You know how to do it right in PHP; you know how to do it right using the technologies that shared hosting provides. You know how to do javascript-enhanced code using those technologies. That puts you in a place where SMF aren't, because their code is a clusterfuck, and a place where Jeff isn't, because his design along with his client and hosting requirements are a clusterfuck.

    So do it. Even if you start now, you'll have something functional well before Jeff manages to get this pile of shit up to anything approaching v1 status.

    Unless by "v1" you're referring to the German pulse-jet powered flying bomb, which took to the air with a mighty farting sound, and then came down, usually way off target, some time later, destroying all around it.

    [edit]
    If you do do it, you must include a special "moron" icon for particularly stupid users. I suggest:

    https://meta-discourse.global.ssl.fastly.net/user_avatar/meta.discourse.org/codinghorror/120/5297.png



  • @delfinom said:

    Or that.....
    I only know brainfuck, how am I supposed to know all the exotic languages?

    There's a short list on the Wikipedia page.

    Also see Esolang, the esoteric programming languages wiki.



  • I'll contribute to forum software if anyone gets it off the ground. I've not used Symfony, but it might be a good base framework. Also, Yii 2 is nearly out of beta and I'm looking for an excuse to try that out.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.