Saturday, April 30, 2016

Tip: Use Spotlight Search as a quick calculator

Do you hate waiting for a calculator app to start up on your Mac? Just bring up Spotlight Search on your desktop and type your numbers.




Oh yeah... It works on iOS, too. Happy day!

Saturday, August 8, 2015

What I've Learned in Four Months Answering Questions on Stack Exchange

I interview a lot of software developers. I used to ask where they went for answers when they were stuck, but I stopped asking the question because literally everybody answered StackOverflow. I knew it. I go there daily, too.

StackOverflow is a question and answer forum for programmers. Their format is so effective for getting answers on how to do things, that the users branched out into other topics, and not necessarily techie topics. Though I've been a StackOverflow consumer for years, I signed up and answered my first question about four months ago (April 2015). Someone asked if it were possible to use the Xcode text editor as a standalone application (without all the IDE stuff). I happened to have been playing around with it like that one day after updating XVim, and happened to know how it could be done. Granted, I had to agree with the others who responded to the question with a "Why on earth would you want to do that?" But I registered as a user and provided an answer to the question. It was an old question from 2013, obviously long-forgotten by the original poster ("OP" in online forum speak), and nobody has up-voted my answer. It's all good. I have 127 reputation points ("rep") on StackOverflow. It's not impressive. Basically, every question I can think to ask, already has an answer, and you don't usually get up-votes for saying something that's already been said.

There is a footer on each StackOverflow page with links to other forums in the StackExchange network. I hadn't bothered to notice any of those in the years I've been a user, though many of them looked familiar, as I had been sent to them by some of my Google searches. I remember thinking when I would see some of those other sites, "Hey, they must use the same forum software as StackOverflow." Silly me. Now I know.

But since I had already signed up for StackOverflow, I figured I'd check out some of their other networks. Since I spent five years aspiring to be a successful financial advisor, I immediately took an interest in the Finance and Money site. I found I could answer a lot of folks' questions, and in looking at some of the other answers, I felt like my conservative approach to money and investing might be appreciated. In four months, I've built up about 2000 rep, which is respectable.

Eventually I ended up spending most of my time in The Workplace network. This site deals with dilemmas, problems, and pitfalls in the workplace. I've really enjoyed offering advice on how I would approach a situation, and reading about others' advice for the same situations. I've learned a lot from people around the world. As of August 2015, I've built up over 6000 rep in The Workplace, which puts me in the top 0.66% of rep growth for the year. Not bragging, though, as there are others who are growing faster than I am, and they deserve it, too -- they give good answers, and generally avoid making someone feel bad for having asked a question.

I've enjoyed spending time on StackExchange. It has filled my need to write, which explains the long gap in this blog (which is something I intend to remedy).  I've learned a thing or two about how to be successful in an online discussion/Q&A forum. I thought I'd share.

#1: Be Nice

I started joining into discussions on Reddit just before getting into StackExchange. When it was appropriate, I'd post a link to a blog post or one of my iOS apps, just to try to generate some traffic to my site. Reddit is similar in many ways to StackExchange, with multiple "sub-reddits," or groups, organized along topics of interest. However, Reddit is more of a discussion forum, whereas StackExchange is a Q&A forum. In those discussions, Redditors (users of Reddit) can often become very rude and crude. To quote the great literary figure, Eliza Doolittle (My Fair Lady), "I'm a good [boy], I am." I've lost most of my interest in Reddit, simply over this one point. F-bombs are not the only way to express strong feelings.

The top rule in each StackExchange site is Be Nice. (See the Help section of each forum: The Workplace, for example). And they enforce it. I actually appreciate that profanity and vulgarity are frowned upon. It elevates the conversation, and keeps the content focused on the questions and answers. I've noticed that many users who join the forum and come on too strong, either soften their tones, or drift away from the site.

When I signed up for StackExchange, I decided to use my real name as a way to encourage myself to always say things I would be willing to have attributed to me later. It has worked well, so far. There have been times where I've been tempted to send out a little extra "Internet Snark" and have decided against it.

The World Is a Huge Place

StackExchange is used world wide. Although the official language of the site is English, it is used by people from almost every continent (I can't confirm that I've seen anything from Antarctica). I am amazed at how common our questions are, and at the same time, how diverse our cultures are. In The Workplace, it is very common for responders to ask for clarification about which country the OP (original poster) is in. The answers that will follow will be very different when it is known that someone is working in London as opposed to New York City. Labor laws are vastly different. And if you ask me, based on the headaches our European and Asian friends have, I am perfectly happy to stay in the USA and work. But I appreciate seeing the different ways people view the same issues. 

Not Everyone Will Agree With  You

...and that's ok. It happens to everyone who contributes regularly to such a forum. You spend a few minutes crafting the best answer you've ever written. Your advice is sound. Your spelling is checked. You hit the Submit button, and within five minutes, you have two down-votes, and a comment telling you why your advice is bad. (It's usually said in a nice way, but it's still clear that they disagree with you.)

It's ok to have the Internet disagree with you. You have a choice: blow it off and disregard it, or look at it and see if maybe you can learn something from it. I've done both. 

A Final Tip: Be the First to Answer ;)

Ok, this is unabashed self-aggrandizement, but if you want to build your rep, you get a boost from being the first answer (as long as it's a good answer). Most good questions get multiple good answers. Most readers who vote on answers (about 10% of viewers, by my observations) vote for the first one they come across and agree with. Answers are ordered according to the number of votes they receive, so when a question has just been asked, the first answer is often the one that gets the most votes, and would then be ranked at the top of the page, thus helping it to get even more votes.

I recently tried an experiment. I answered a question (first, mind you) and it got 96 up-votes. If it had gotten to 100, I'd have earned a gold badge for a Great Answer. Those are fun to get. It's always nice to have strangers from around the planet validate your self-worth. I was left wondering whether four more kind souls would come along and agree with me. 

But then, I remembered seeing another user (who has more than 88,000 rep) update his own answers from a couple of years ago. Anytime a question or answer is updated, it shows up at the top of the Active Questions list (the default page when you arrive at the site). So it gets an old question in front of new users. I have no reason to believe he was trying to boost his rep. From what I've observed, he values refactoring his answers (to borrow a programming term - it means fixing things now that we've learned a thing or two). But I'm not above juicing my rep a little. So I made an update to the question with the intent that it would get listed in the recent update list, which it did. Now, my update was legitimate. I incorporated advice that was provided by others as comments to my answer. It improved my answer, and if StackExchange had a way to share rep with other users whose ideas make your answer better, I would do it.  But it worked! I got my four more votes, hit 100, and got my fourth gold badge. I feel fulfilled.

PS...

You know the funny thing about me is this... I get a little obsessive about checking whether anyone agrees with what I've said. I'd post an answer and then check 100 times throughout the rest of the day to see if anyone voted for it, or commented, or responded in any way. I'm a little pathetic that way. After publishing this post, I have the strongest urge to go check my stats and see whether I'm getting any extra page hits on this blog. Sigh. I need a life.

Monday, March 30, 2015

Kibana Quick-Tip: Save those Dashboards!

I like to learn things the hard way, I guess. In an attempt to keep my installation clean, I went to remove the kibana-int index from my system. Why? Because I didn't know what it was, and it had a date from way back when I originally set up my ELK stack on this system. (No, I don't actually read docs. I apparently must always learn by sad experience.  Sigh.) It was easy enough to delete, and I felt good that I had cleaned up some cruft.

Except, now my dashboards are gone. Turns out, Kibana creates its own index, named kibana-int for storing the dashboards and stuff. Oops. 

Did I have a backup of my indices? No - it's just log messages, and the originals are still on their respective systems. We use ELK as a convenience when things are amiss, which rarely happens (except when I go around "cleaning" things!). So I had to spend an hour rebuilding my dashboards. The new one is actually better than the old one, so I suppose that's the optimistic view of the story.

Here's the tip: Export your dashboards to a local file, and keep them under source control, like git.



Then, if you ever need to reload your dashboard after a disaster (or a "cleaning"), you can just load it from a local file in the Open Dashboard menu. Bonus: You can also open a dashboard from a Gist using the same Advanced screen under the Open icon.