Online Discussion Groups Remind Me of School

If there is one thing I really cannot stand about other developers is there incessant need to declare which framework is better. These are the kinds of “discussions” that cause me to leave groups and communities, for they often seem to get way out of hand. It reminds me of how children act in elementary school, really, and I don’t want to be trying to learn from someone with that kind of mentality. Let me explain this with a story.

When we are young and are looking to be in Kindergarten (or whatever equivalent in your country), we may be excited and a bit nervous, even if we don’t then realize it. School time happens and we find ourselves surrounded a hundreds of other children in a variety of age groups. We all use the same spot of land (the playground), we use the same toys in that playground, and all go to class around the same time. Seems a pretty standard fare, yeah? Well, as the days, months, perhaps years roll by, acquaintances are made, friendships form, and pretty soon we children have clumped together with other children that share something in common, even so simple as, “hey, we have Mrs. X as our teacher!”

So now we’re a few years into school, and the core of these circles have become more or less stabilized, with new kids coming and going. These circles end up clashing; it is their nature, especially as we children would test our boundaries of what we can and should not do. Bullying happens, pranks, teasing. You name it, it’s probably happened. We boast about our new presents from our birthday, or we are envious of another for what we perceive as receiving “better” presents. We declare the big toy as ours, and kick other kids off. Fights happen between some groups, over really silly things. Like chocolate milk, or who’s got the curliest hair. Adults see these and do what they can to play interference and end things peacefully. That’s what adults do, right? Especially parents?

Why then, do these “peacekeepers” of children decide to turn discussions into arguments and flame wars over really silly things? Like programming styles, or who’s got the best framework? Things like this always have an air of hypocrisy about them.

I’m sure you might be thinking, “but programming styles and frameworks can make or break a project/company, and are not to be trivialized by being compared to chocolate milk and curly hair.” And I assure you, I am not trivializing it. Rather, I am pointing out that as a child, chocolate milk and curly hair were big things to be talking about as children, just as talking about programming languages and frameworks are the topics of developers. Arguing over which one is better is really lame, and it seems that a lot of people become confused by a healthy, fervent, and possibly enlightening debate on the pros and cons of whatever. A lot of people seem to take points as personal attacks, and that baffles me.

If you find yourself being riled up, please be the adult you are and stop whatever you’re doing, take a slow, deep breath, and relax. It’s just a discussion. Don’t like what people are starting to say? Peacefully step out of the conversation. Most of the time these discussions (especially within the groups on LinkedIn) are not started to rile you up, but rather, challenge the complacency that programmers tend to fall into. What happened to being open to learning new things, especially if they will improve your abilities?

Seriously though, I don’t like going into a group discussion with the intention to learn and share information, only to feel like I’m stuck in a hot and sweaty locker room while a fight has broken out. At least in these discussions, the doors can’t get blocked…

Folder Diff in Windows Command Line

Sometimes I wish I could easily use something like the lovely Linux diff tool in Windows, but am loathe to really want to install anything more than necessary. Today I was surprised to find that my basic Windows command-fu wasn’t totally wasted on previous versions. This is what I came up with (copypasta into Notepad (or anything that isn’t WordPad/Word/etc.) and save as filediff.bat):

As you can see, it is a very minimal script right now, and it should probably be updated for the sake of Sanity to nicely exit when something goes wrong. Like when you try to diff a local folder with a folder on another computer across the network. This script won’t work and it just barfs an error without quitting, creating an unnecessary file.

That was the whole point of writing this little script up, too, which was a bummer.

Shorten URLs in PHP With Bitly API

Today I found myself visiting a project I tend to update each year. I am laying the framework for creating a more “social” site for WizardSpire. While playing around with FluxBB, I came across a modification that would send out a tweet for each new topic started. This is pretty fantastic and exactly the sort of thing I want to do with WizardSpire, so I implemented it (with some alterations) and all was good. When the first tweet came out though, I realized that the way URLs are handled by default in the script is kind of unsightly and doesn’t leave a lot of room for post title or hash tags.

Seeing as Bitly is one of the more popular URL-shortening services, I went straight to them to check out their API to see how I could do this. It turns out that it is super easy to implement: all you need is a validated email on their dev site, and a little snippet of code:

This is how I implemented it with the tweeting modification. In addition to the bitly change, I created a set of if conditionals to append hash tags depending on which forum the topic is being posted in. (This will only work if you use the modification linked above):

If you have any questions, let me know!

Edit: I have done a major update to the above plugin and am sending the code to the original author, with the intention of it becoming integrated. It is available on GitHub!