DaedTech

Stories about Software

By

Getting a Card’s Info From Trello

One of my absolute favorite all time tools is Trello, which is essentially a web application that digitizes the kanban board.  As a Trello user, you have one or more boards, and each board can have one or more columns.  In each column, there are cards.  And, like a live kanban board, you can move the cards around between columns.

Trello is good enough to expose a RESTful API so that I can interact easily with it.  I’m not going to go into a lot of detail on the particulars of the REST style of architecture here, as that’s not my main purpose.  But I will offer the useful way of thinking about REST that it’s an idea of pairing identified resources with actions — specifically, HTTP actions.  Or, more simply, it’s the idea of pairing nouns and verbs.  And so, figuring out who the members of the Beatles were might involve making a GET request to http://somesite/music/beatles while adding myself to the Beatles might mean issuing a PUT request to http://somesite/music/beatles with a JSON payload containing my name.  Pretty awesome, huh?  I’ve always wanted to be a Beatle.

Alright, so let’s use this REST API from Trello to get a card out.  Trello offers a “getting started” tutorial, and that got the job done for me, but I think it could be explained more simply.  They’re aiming to get you started writing applications that interoperate in rich ways with their web application, but I’m just interested, for now, in getting back “toothbrush.”

To understand what I mean, take a look at the screenshot below from one of my Trello boards, “Packing.”  I use this board when preparing for trips.  I populate the “pack” column with stuff to put in my suitcase, “non-suitcase” with stuff like my laptop and Kindle, and “To Do” with things like “set the thermostat” or “water the plants.”  What I want to do here is thus dead simple.  I want to get ahold of that toothbrush card via their API.  That’s it.

image01

To do this, you need to be logged in to Trello and, obviously, you’re not going to have my toothbrush card, but you can create your own board and card to follow along.  Do that now, if you like.

Once you’ve identified a card for which to do this, you’re going to need three things: the id of the card, an “application key,” and a “token.”  What you’re not going to need is to open Visual Studio or any other IDE, nor will you need to figure out some kind of REST client to build your request.  You’ll do just fine with your browser, as-is.  We’ll get to the REST clients and IDEs in future posts.

What was initially confusing when you’re reading their “getting started” page is why you need a key and a token.  Well, the key is for you as a Trello developer, whereas the token is your way of authorizing calls to your non-public boards (and most boards aren’t public).  To make it easier to understand, I could use my developer key to query Trello’s public development board and I could also use it to access Ringo Starr’s private boards if Ringo Starr issued me a token allowing this.  So when it comes to querying my own board, I need a developer key, and I also need to grant myself permission with a token.

Make sense?  Good.

Now, to get down to business.  Navigate to the trello app-key page while logged in and you’ll be granted your key at the top.  That’s the easy part.  To grant yourself a token, you’re going to need to work.  Scroll down to the bottom and click on the link that says “Click here to request a token to be used in the example.”

image00

Once you click that, you’ll get a pop-up requesting permission to grant the application access to use your account.  Hopefully this drives home the idea of a token.  In general, if you want anything to be able to interact with your Trello account, you have to give it permission via this token.  Once you’ve done that for your own account, it’s time to rock and roll.  Now all you need is the ID of the card that you’ve created, which you can get just by clicking on the card through the application, like so.

image02

With that id in hand, type the following into your URL bar making appropriate substitutions for the placeholders that are colored orange:

https://api.trello.com/1/cards/cardId/?key=YourKeyId&token=YourTokenId

You should see a bunch of JSON in your browser, outlining the attributes of this card.

image03

And that’s it.  Without code, IDE or tools beyond the browser, you’ve successfully used Trello’s API.  

This was a post that I originally wrote for Infragistics, and you can find it here.  Check out their site for the rest of the posts in this series, where I actually go through building a page using IgniteUI and the Trello API to build a little, client side utility that shows you cards and their due dates.

By

Chess TDD 45: Onward with En Passant

This episode followed right on the heels of Chess TDD 44, in terms of the coding, and was basically a session extending that episode.  It wasn’t always pretty, but I made more progress on solving this edge case.  I’m in the midst of a pretty brutal stretch of travel, and then my wedding and honeymoon are coming up in early September, so I don’t know how many more episodes I can promise in the near future.  I’m home in about 2 weeks, so hopefully I’ll get a few in then.  Stay tuned!

What I accomplish in this clip:

  • Made the implementation of en passant sophisticated enough that a pawn can be made aware of an en passant target.
  • Got black capture of white pawn en passant working for moves to the right and left, both.

Here are some lessons to take away:

  • Never forget that if you have a failing test you can’t figure out, it’s always possible that you didn’t write the test well.
  • It’s okay to try changing pluses to minuses or tweaking off by one situations to get a test green, as long as you go back and understand what worked and why afterward.
  • It’s often the dumbest mistakes you make that take the most time to track down and are hardest to spot.

By

Use These 7 Tricks to Win Meetings and Get Promoted

Rest assured, there is a list of tricks that you can use in meetings later in this post.  But, before you get to the buzzfeed portion, please indulge me for a few paragraphs that will help determine whether you’re the sort of person that really wants to take this advice.

A while back, I took some material from my in-progress book and turned it into a post in which I offered a different set of names for the MacLeod hierarchy.  For the sake of expediency, here’s the pyramid I created with those terms.

GervaisRenamed

In any company that scales beyond just a few people and starts to include overhead roles, it becomes nearly impossible to assess the impact of any individual on the company’s revenue (if anyone’s interested in hearing me expand on that assertion, let me know, and I’ll add a draft for that).  But we don’t let that stop us from manufacturing performance evaluations to the best of our abilities.  Interestingly enough, performance evaluations of opportunists at the very top and of line level pragmatists at the very bottom tend to be the most straightforward.

Top level opportunists (C-suite folks) are evaluated in the same way as head football coaches.  Company does well?  Accolades and bonuses.  Company does poorly?  Golden parachutes.  It’s not as though C*Os are singly responsible for all aspects of performance, but they are the one neck for shareholders or board members to choke.

Line level pragmatists are folks responsible for cranking out widgets, so they tend to be evaluated with metrics, such as “widgets per hour.”  Speciously, we assume that moar widgets == moar revenue == moar good, and thus are content to conduct evaluations of widgeteer performance with reductionist proxies.  At least, we do that for widgeteers not on the middle management (idealist) “track.”  When they get on that track, we evaluate them differently, as I’ll describe a little later. Read More

By

The Phoenix of My New Site from the Ashes of my Battle with CSS

It wasn’t pretty.  There I stood, knuckles scraped raw, a black eye, and a nose that would probably never look quite the same way again.  But you should have seen the other guy.  I had emerged, victorious, my site finally behaving the way I wanted, and CSS lay quivering on the ground, a shattered mass of pound signs, periods, and curly brackets.  To use the word “literally” the way kids these days use it, that’s literally what happened earlier this evening.

OppenheimerChoking

You may have noticed some changes to my site if you’ve been visiting over the last few days (not the theme as much as content and layout).  Those are now more or less complete, pending any weird, little things that I notice.  There are a lot of changes, but none that should affect your consumption of DaedTech in any but a positive way.  Still, I encourage you to check out the site.

I slimmed down the menu options so that you can think of the site roughly this way, in order of menu items:

  • The blog (which is now “Home”)
  • Things I offer for free or pay (“Products“)
  • Things I do, mainly for pay (“Services“)
  • Things I recommend, or at least use (“Resources“)
  • I explain myself (“About“)

And, that’s it.  No sub-menus or complex navigation.  I wanted to keep things simple.  Along those lines, I’ve cleaned out my site side gutter a good bit, moving all of the stuff about my books and Pluralsight courses to “Products.”  I have no idea whether this will affect sales or not, but these are the kind of things I’m getting interested in measuring, so I might soon install some kind of heat map.  Right now, I’ll just have to see if my sales dip.  But I like it better.  The old gutter felt like a switch statement that was expanding ominously and sorely in need of some polymorphism or something.

I’d like to speak to the resources page.  Over the last several years, I’ve gotten a lot of reader questions along the lines of, “what’s that thing with the dots in your Chess TDD videos” or “what tool do you recommend for text editing” or “what programming books should I buy?”  I usually just gave off the cuff answers, but now my answer is always going to be, “check out my resources page.”  I’ll add to it and modify it as time goes by.  Two important things about that page:

  1. My level of endorsement for things there varies from “I use this and, meh, it’s something I use,” to “this is the best thing ever.”  Everything up there is something I have used or that I currently, actively use, but its inclusion there doesn’t necessarily mean I’d pitch it to you at a party over beers.
  2. Where applicable, I used affiliate linking there, meaning that for some of those links, if you buy the product, I get a commission from the vendor.  Affiliate links have absolutely no impact on the price of the items you purchase or your experience at all.  Still, if it makes you uncomfortable, you can always navigate to the site not through my link.  I still recommend (or at least use) the stuff there.  I built the page first, by listing everything that would go up there, and then did a second pass to see if there were affiliate programs for the stuff I’d picked.

I’ll probably do a post on affiliate linking for tech bloggers at some point.  But, in the interim, if you have a site and want to monetize it even a little, I’d recommend reading up a bit (and feel free to email me with questions).  Compared to sponsor ads and product pop ups, it’s an extremely low key, non-invasive way to earn a little bit of revenue.  I offer this mainly because I sort of wish someone had explained some of these concepts to me years ago.

One final change that I’ll mention is that under Services and About, I’ve started talking about the increasing share of my living that comes from writing these days, and how I’ve started to stumble into this interesting business model of “tech evangelism as a service.”  I’m writing a lot and enjoying it, so I now have a list of clients I’ve worked with, doing consulting around tech blogging.  Under “About”, I have a list of other sites where you can see posts that I’ve made (look for some new additions to that coming soon, as well).

So, that’s it for the DaedTech service announcement.  I’ll get back to regularly scheduled posts next week, including some Chess TDD and one I’m working on about how to ‘win’ at meetings that I’m hoping you’ll enjoy.

Cheers!

By

Ship Something for Yourself, Even if you Only Earn A Dollar

On the heels of the product kata post, I’m going to double down on the “ship something for money” advice.

There’s no time to lose. Valuable, profitable seconds of your life are ticking by, and you’re missing out. Surely you’re aware of the concept of compound interest? In case you’re not, suffice it to say that long-term investment depends a lot more on when you invest than how much. The same is true with you using the Internet to earn yourself some money.

AnnoyingFireAlarm

Okay, at this point I probably sound a bit like a huckster. I get that. The sense of urgency might have been just a wee bit for dramatic effect, but I think the underlying message is nevertheless valid. You really ought to acquire for yourself the experience of making money via the Internet. I’m not trying to convince you to quit your job and earn your living this way, and I’m not even trying to convince you to attempt to make serious money. All I’m trying to do is encouraging you to make something.

What should you make? You could go any number of routes. You could start a blog and put advertising on it or use affiliate links. Writing a book or making videos for youtube would count. You could hook up with a content creation outfit, like Pluralsight, and do it that way. Building apps and selling them either standalone or through an app store is probably an option that appeals uniquely to software developers. Or you could always build a web-based product or start a company, if you really want to go all in.

If I’m not peddling a get rich quick scheme and I’m not even suggesting that you try to get rich, it’s certainly fair to wonder what my angle is. Why am I so eager to offer this advice? My reasoning is multi-faceted.

Opens Up New Possibilities

The most likely outcome to you starting a blog and advertising or building a little mobile app and selling it is that you’ll put in a lot of time and effort and get a little bit of profit back out. Hey, if you thought I was a huckster at first, hopefully I’m bringing it back from the ledge a little here by telling you that you’re pretty unlikely to get rich quick. The reality is that you’re almost certainly not going to retire from your first foray into entrepreneurship.

This type of bootstrapping is modest in aim and scope, for the most part. But it is an opportunity. And, it’s one with virtually no barriers to entry and not much limit to the possibilities if it takes off. Look at Life Hacker.

You probably won’t be Life Hacker, but maybe your blog/site/app/channel will become a fun hobby for you – a hobby that brings in a few hundred or maybe even a thousand dollars per month. And, over the long haul, it will also help you get your name and information out there to pry open the door to some networking and consulting opportunities as well. You’d be surprised at how many things come up when you just put yourself out there: job offers, consulting opportunities, speaking invitations, and more.

Introduces a New Earning Model

Most white collar workers spend an entire career working 40 (okay, who are we kidding, 45+) hours per week in exchanged for a fixed number of dollars. Wage labor is clearly the dominant model for income in our society, since traditional entrepreneurship tends to be a high risk venture. It’s all well and good for hungry kids just starting out on their career path, but a harder sell for folks with families and mortgages.

Building something small in your spare time with the aim of earning a little money, however, is not high risk. It’s the kind of thing you can do instead of watching a few TV shows. And, while the stakes may be small, the lessons learned aren’t. You’ll develop a sense of what it’s like to earn in a model where income is decoupled from time, which can be a valuable skill that you may use in your day job or, at some point, to start your own venture.

And There’s More

I originally wrote this post for the Infragistics blog.  Here it is on their site.  To read the second part of the post, check it out on their site here.