Why I Don’t Use Postman

I do tutorials. Lots of them (check out my 2018 publications).

Sometimes the tutorial involves a REST or SOAP interface. And I get questions like, “Stevie baby, why you use SoapUI? Postman is so much nicer!”

First, I’ve used SoapUI for years, and I really like it (warts and all).

Second, it’s free and open source.

Finally, this:

WhyIDoNotUsePostman

I absolutely DESPISE sites that make me sign up for anything in order to use their products. When I run across stuff like this, it makes me want to grind my teeth.

Why Postman does this is not lost on me. Creating software is an expensive endeavor. I totally get it.

But, if I have another choice, I’ll exercise it rather than give these companies my email address (which almost immediately increases the already hefty amount of spam I get).

I’m not arguing for or against this type of signup-to-use-our-product shannanigans. I’m simply answering the question I was asked: why don’t I use Postman as a REST client?

Now you know.

What do you think? Leave me a comment. Thanks for reading!

–jsp

Naming Things is Hard

Good names are hard to come up with.

Some reasons we suck at naming:

  • We get in a hurry
  • Good names take careful thought
  • We are in a hurry

I see a theme.

Here are some rules of thumb I’ve found handy.

Don’t encrypt a variable name. For example, if you are tempted to call a “request id” hashValue because every request is assigned a unique hash, you have encrypted the meaning of the variable (and obfuscated it on top of that). Yeah, don’t do that.

Don’t make method names overly generic. For example, if you have a method that calculates the balance in an account, don’t call it “processAccount()“. Instead call it calculateBalance(). It’s much clearer what it does, and you’re less tempted to pollute it with other functionality that should be included elsewhere as you maintain and enhance the code (think of it as technical debt insurance).

Don’t abbreviate variable or method names. Ever. EVER. The abbreviation might make sense to you, today, as of this moment. But chances are six months from now, it will take you a second to figure out what the heck maxBalCalcd means (maximum calculated balance value? maximum balance calculation date? No, sorry, it’s “has the maximum calculated balance been reached”, thanks for playing). As sucky as we are at naming, we are even suckier at abbreviating those bad names. Your colleagues will thank you (okay, probably not, but it’s still a good idea).

Don’t play code golf with variable or method names. I’ve seen really smart developers use variables like e to hold the return value from a function call. And the description of the data does not even start with the letter e. But even if it did, it’s still a bad idea. It’s not obvious what it does, and just makes the code harder to read.

Do give something a name that exactly matches what it is does. If it’s a function or method, name it according to what it does (and if it’s name would be too long if you called it everything it does, then you need to refactor your design). If it’s a variable, name it according to the type of data it holds.

Do give loop variables simple names. Yes, this seems to fly in the face of what I’ve been saying, but I’m talking about throw-away variables that are used to loop through the items in a collection, for example. I like aa, bb, and cc. Some like i, j and k. But whatever you do, for god sakes, though, don’t call it loopVariable. That’s overkill.

Do use long names because they’re descriptive. I would much rather see a method called computeChecksumIfPossible() than compChksum().

Do learn the language of the business domain you’re writing code for, and name things accordingly. My favorite awful method name of all time: getAreaCode(). Looks innocent enough, right? Turns out the developer wanted the first three digits of the U.S. zip code. In the USA the term “area code” has a whole other meaning. I’m not making this up.

Hope you found these tips helpful. Please feel free to comment and add a few of your own.

Happy naming!

–jsp

Make: Please Cancel My Subscription

I don’t know what has happened to Make Magazine over the years. When I received my first issue in 2004 I was very excited about the content, the projects (Mousebot!).

And this great editorial focus continued for years. Robots? Check. Circuit design? Check. Tesla coil? Van deGraff generator? Check. Check.

But something has happened in the past couple of years or so. The occasional article about “wearable blinking jewelry” (W.T.F?) has become the norm.

Back in the day, my Make subscription was a nice complement to my Nuts and Volts subscription (which has stayed true to its editorial focus since I’ve been a subscriber in 2005). Now, they are nothing alike.

O’Reilly, please cancel my subscription to Make. And good luck with wearable drone jewelry.

–jsp

Breaking Bad

I began watching this show on a lark, and was hooked from the very first episode. I’ve watched them all (now multiple times, thanks to Netflix), and enjoy them very much. More than once I have asked myself why I am so drawn to this story of greed, obsession, lust, avarice, and raw humanity.

Walter White is a superbly intelligent individual. But he is also a deeply flawed human being. Several times throughout the show he could have walked away a rich man, and chose not to. Though it’s not completely clear why he walked away from Gray Matter (which, ironically, would have made him more millions – legitimately – than cooking meth every did), a careful study of the show reveals that Walter always feels that his genius is unappreciated. So he sold his shares, left Gray Matter with a huge resentment and “a couple of months’ rent”, and subsequently slid into mediocrity. That haunted him until his diagnosis.

From the beginning we see a man on a mission, and it takes him from hero, to killer, to criminal mastermind, and finally to fugitive. Like the man, the mission is deeply flawed. Never feeling fully appreciated, his obsession (matched only by his brother-in-law Hank’s obsession to catch the mysterious “Heisenberg”) leads him down a very dark path from which redemption is hopeless.

That said, Walter seems comfortable knowing that what he is doing is illegal. He seems to grow more at ease with the terrible things he has done, but never tries to justify it in terms of “free markets” or any other such nonsense, and does not try to disguise stealing from innocent (if perhaps greedy) people as “Capitalism at its finest.” In fact, he proudly declares more than once that the money he has acquired by cooking methamphetamine is money he “earned.”

Perhaps the lesson is this: greed in any form, leads to destruction. Period.

Or maybe the lesson is, when you have 1,000 gallons of methylamine and you can sell it for $15,000,000, take the deal.

That doesn’t make for very good TV though.

God and Guns: Vote GOP!

Hypocrisy irritates me. Speaking of hypocrisy, this is an election year, and the GOP primaries are in full swing. This week’s topic: morality!

While I believe Mr. Santorum is sincere when he spouts his brand of noise, claiming America’s moral decline is due to the number of unwed mothers, in the end, the GOP utopia is the World of “Bladerunner” where everything is privatized and corporations run the world (we are closer to this than you might think).

The GOP only cozies up to the religious right and the second amendment with their scare tactics to get the votes to bring that utopia to pass (after all they represent only 1%, which isn’t enough votes). The don’t give one tiny toot about morality.

Truth be told, the U.S. is a plutocracy; a system set up to (a) protect the wealthy and (b) make sure the system perpetuates itself. All this talk of morality is scare-noise meant to frighten the religious right into voting GOP.

And it works.

Facebook Addicting? That’s Ridiculous (I’m Totally Making That My Status)

I saw this article at ZDNet (they’ve been ON FIRE lately!) about Facebook and Twitter and how they’re more addictive than alcohol or nicotine. Can that be? It…

Sorry, had to check my twitter. What was I saying? Oh, yeah, Facebook and Twitter are addictive. I know for me that they hardly have any effect on me at all. For example,…

Oh, how funny. Somebody just posted the funniest link on my Facebook Wall. Where was I? Oh, yeah, Facebook. I don’t really check it all that often. I mean, I do have alerts sent directly to my Android phone (same for Twitter). But, really, it just doesn’t mean that much to ….

Wow, it looks like Lance Armstrong will be racing a 70.3 Ironman soon. Just saw a Tweet about it. What was I saying?

Oh, nevermind. I forget. Now if you’ll excuse me, I think I’ll check Twitter. It’s been, like, forever.

–jsp

Deep Thoughts

There is no difference between strong and weak nuclear force, electromagnetic force and gravitational force. Force is force – and force is mass – and depends on the definition of “is”. At least, all this is true in three spatial dimensions, in which the speed of a photon in a vacuum is constant. Very exciting. There are also conditions under which, when time is constant and the speed of light varies that universes can be created and studied in an instant. In scenarios with multiple time dimensions, even more spatial dimensions are possible.

Our mathematics is too primitive to deal with the universe as it really is.

All structures are unstable. We have even been able to calculate the half-life of a proton (though it is longer than the currently speculated age of the experiment (universe)).

Eventually this experiment (universe) will end, the data will be collected, analyzed and the conclusion will be drawn: physics in three spatial dimensions with constant time is not sustainable. Everything eventually breaks down. The universe itself even “leaks” this truth through to its doomed inhabitants on occasion (to those who are open and listening). The ultimate truth is this: all are one.

How can it be that such primitive life can arrive at this marvelous conclusion?