Friday, June 17, 2016

.NET world

I was just rereading some of my posts from this blog, and I realize that it was born out of a desire to capture my thoughts as I ventured down the path on Android development.  If you've read them, you probably picked up on the fact that I'm really a .NET developer.  I "think" in C# when it comes to programming, and that's because I've been doing it for a long time and it's been burned into my brain.  I think that every programmer has a "mother tongue", which is the language they think in.

But I wanted to take a moment here and get back to .NET.  Because my resume and professional experience are so .NET heavy, I typically land myself in jobs that are .NET jobs.  And my current position is no different.  I've spent the last year and a half in ASP.NET MVC  / JavaScript / CSS /  SQL Server land.  I am in the insurance sector writing line of business apps, and we use these tools because they help us just get stuff done. 

I'm excited that Microsoft under Nadella have embraced open source, and made some shrewd business moves to attempt to remain relevant.  I'm excited for selfish reasons, because in some ways I've hitched my wagon to Microsoft technologies with regards to my livelihood.  I have no real loyalty to them, and I'm always intrigued by non-MS technologies (see previous posts).   Tools are tools.  Let's not get into a religious war because you like a 16" long claw hammer and I prefer an 18" curved claw hammer.  At the end of the day, we're both just driving nails.

Over the past 20 years, I've flitted around different industries.  And the more exposure I get to different businesses and domains, the more I believe that the technologists who add the most value are the ones who understand their customer.

I'm a believer that a good, battle tested developer can pick up a new tools very quickly and outperform mediocre ones who've been using the same tools for years.  It's a shame that we still live in a world where hiring managers want to know how many years of technology X you have, rather than assessing what kind of problem solver you are.  But I get it.  Measure what's most easily measurable.  But I would still love to work for a company that is not quite so lazy.  Like, if a candidate lists git repos on their resume, maybe you should go take a look.  How about a job interview over a beer where you can get a more pure signal for your bullshit meter to read?

Which really brings me to this:  small companies and start ups are where it's at for me.  The enterprise and it's heavy process rigamarole and constant fear of being sued creates an environment where the pay is decent, but the culture is one step removed from a government job.  I don't mind engaging with MegaCorp, but it needs to be on terms and conditions where they act like a small company.  For example, I'm in the middle of changing teams right now inside an enterprise-y company.  But I'm going from a team that sits in an open office plan and must dress business casual, to a team that sits in a satellite office, wears jeans every day and has an impromptu work space setup using folding tables.  Those kinds of details that may seem small to some, mean a great deal to me.

Tuesday, June 14, 2016

Can you talk the talk?



We've all the heard the saying, "You talk the talk, but can you walk the walk?"  It’s a close cousin to “put your money where your mouth is.”  It’s intended to goad someone into action, because “talk is cheap”.

There are a lot of people in the technical space that pride themselves on being doers and not talkers.  Sometimes people who are introverted, whose fight or flight reaction kicks in when they need to talk with someone outside of their inner circle, will begin to justify why they don’t need to interact with other human beings.  “I let my actions speak for me,” they think to themselves, “I’m a maker, not a taker.” 

I’ve been there, holding an irrational disdain for salespeople, because they sell and profit off of the product that the engineering team built.  But for me it’s mostly jealousy, because they make their own schedule, while I am expected to be visible and in a chair for 8 hours a day. 

Several years ago, I took steps to steer my career down the management track.  And it didn’t feel natural.  I didn’t take to it.  I was working for MegaCorp and saw how little they valued the smart engineers, treating them as pawns on the board.   And I didn’t want to be a pawn.  So I got my MBA and got sent to leadership courses by my employer.  But I eventually was drawn back to software development, and it felt right.  

But the game hasn’t changed.  There are still plenty of highly intelligent, timid engineers who are happy to stay out of the chatter and politics.  And if one is truly happy in that position, then great.  But if you’re not, then I challenge you to invert the question.  It is no longer, “You talk the talk, but can you walk the walk”.  It becomes, “You walk the walk, but can you talk the talk?”

Talking and communicating in a confident manner is not just mindless banter, not just small talk.  It needs to happen, for a host of reasons.  The thing that engineers need to understand is that communicating with other human beings equates to getting things done.  And if you can form thoughts and arguments in your mind that are well thought out, and you can put them on paper, then you can look someone in the eye and verbalize them too.

I believe that there is a decently sized contingent of tech workers who are frustrated with the false dichotomy that you must either be an engineer OR a business person, but you can’t be both.  We’ve all heard something along the lines of “If you have technical chops and business acumen, you’re a rare double threat and opportunites abound for someone who fits that profilie.”  But, in my experience that turns out to only be the case if you make those opportunities.  They’re not just out there waiting to be filled.

Sunday, June 22, 2014

Python + MongoDB

The opportunity to brush up on Python and MongoDB presented itself, so I'm spending some time doing just that.  I played with Python a few years back, in my GE days, but haven't made my way back to it.  I love REPL based languages because you can just fire it up and go!

So I have Mongo running on my machine, and I need to pump some data into it.  Since it wants JSON, I figured I'd just hit some web api out there, grab a bunch of JSON data, and then pump it into Mongo.  I already had an api key for imgur, because I was messing around with uploading camera images to it from an Android app.

So I poked around a little bit on the web api documentation, and pretty quickly I had a legit response.  It looks like the 'requests' library (http://docs.python-requests.org) is pretty popular.  So first thing I had to learn to do was import a 3rd party library.  Looks like this is easier in the Unix world because they have command line retrieval built in.  Windows appears to have it too, but of course you have to download it.

Anyway, I learned the "manual" way.  Basically, fetch the zip file, extract it, cd into the folder and run a command and it pulls it into your site-packages folder and you're good to go.

I do have to say, 5 lines is pretty terse.  And 2 of those are import statements.  I love terse.

 import json  
 import requests  
 url = 'https://api.imgur.com/3/gallery/g/memes/'  
 header = {'Authorization': 'Client-ID 31d84e7e126befd'}  #not my real api key!
 r = requests.get(url, headers=header)  

Here's an example of one item returned from the above call:

{u'account_id': 11545168,
 u'account_url': u'PCard',
 u'animated': False,
 u'bandwidth': 76530096,
 u'datetime': 1403397798,
 u'description': None,
 u'downs': 0,
 u'favorite': False,
 u'height': 820,
 u'id': u'1DZ31Oy',
 u'is_album': False,
 u'link': u'http://i.imgur.com/1DZ31Oy.png',
 u'nsfw': False,
 u'score': 2,
 u'section': None,
 u'size': 708612,
 u'subtype': u'Good Fireman Greg',
 u'title': u'Good Fireman Greg',
 u'type': u'image/png',
 u'ups': 2,
 u'views': 108,
 u'vote': None,
 u'width': 610}


I am working with memes here, because I think they are hilarious.  Good Guy Greg, Bad Luck Brian, etc.

Here's how we add all of the items to the Mongo database.  Note that we can pass the list, and it will be treated as a bulk insert.

 import pymongo  
 from pymongo import MongoClient  
 client = MongoClient()   
 db = client.imgur  
 db.memes.insert(r['data'])  

Now that we've got some data in our DB, we can query.  Let's say that I wanted to get all of the "Scumbag Steve" memes:


 c = db.memes.find({"subtype": "Scumbag Steve"}) #c is a db cursor  
 #print them to screen  
 for i in c:  
   pprint(i)  

There you have it!  Using Python to hit the Imgur Web Api, creating and populating a MongoDB with that data, and querying back from MongoDB.


Sunday, March 30, 2014

Android Accessibility

Well, I was browsing reddit.com/r/android the other day, and someone asked "How does LastPass read and inject into fields of other apps?"  I thought to myself, "yeah, how do they do that"?

When you install LastPass on Android, it asks for these permissions:
http://imgur.com/H9zm95D

That got me thinking, maybe I can read the screen from the William Hill app without requiring the user to take a screenshot and then send the photo to my app.  That would be a way nicer user experience.

So, that led me to discover the AccessibilityService, and today I'm going to see if I can figure out how to make this thing work.

It's March Madness right now, probably the 2nd best thing to football, which got me thinking about my app again.  I've also been giving more thought to taking the image recognition logic off of the phone and putting it on a server somewhere.

Anyway, just thought I'd post an update here.  That's all for now.

Thursday, January 9, 2014

Dormant

Well, I think it's pretty clear from the inactivity on this blog that I lost much momentum.  I haven't looked at the code for the Trakker project in months.  The NFL football season is coming to an end, and my Bengals suffered an embarrassing loss to the Chargers for another 1st round exit from the playoffs.

My son Benny is doing great.  Being a father has been amazing so far, and I know it's only the beginning of a long adventure.  It has proven much more difficult to get long stretches of uninterrupted time at home however, but I think that's just the way it goes.  I certainly don't want to be the kind of father who is always absorbed in something other than his children.

The tech space is so fun to be in.  There are so many options for things to learn and ideas to build.  I have made an effort recently to shore up my weaknesses on the web side and try to learn javascript and some frameworks.  I like Durandal so far, and I backed it on Kickstarter because the author of the framework seemed genuine and he's kind of doing a David & Goliath thing battling Google and AngularJS.

My tech goals as we kick off 2014:


  • Get an app on the Google Play store.  Even if it's trivial
  • Get more of a presence on GitHub so that I have a functional resume, rather than just the traditional one
  • Come up with more ideas that appeal to me because I am passionate about the domain and the problem being solved.  If it involves my interests like golf, guitar, sports, etc I am much more inclined to work these projects rather than contrived sample applications.
I don't know if I'll continue this blog or not, but I enjoy getting my thoughts out so I will continue to author posts like these in one form or another.

Here's to a great 2014!

Sunday, November 24, 2013

Dormant

Well, it has been over a month since I've posted here.  My wife and I had our first child, and I grossly underestimated the demands on my time. But, it's been amazing and I don't regret putting my hobbies on hold.

The football season is more than half way over.  I love betting on football, and I still believe there is a need for helping to track bets. That's why I love working on this app, because scratching your own itch is when writing software is the most rewarding.

I've come a long way with the application, and I still intend to get into usable shape.  But, you know, priorities, and life, and stuff.


Saturday, October 19, 2013

private repos

I think Hall & Oates had a song called Private Dancer.  Nope, just googled it and it's Tina Turner.  Anyway...

Ok, I know github.com is all the rage, but dammit, I'm not ready to share all my hard work with the world.  So I've decided to go private.  This post sums up my sentiments:

http://somatose.com/2011/10/from-github-to-bitbucket-in-60-seconds.html

So we live in a world where people won't pay $7/month if there is a free alternative.  What can I say.  It's a slippery slope, because as soon as I go with a private github repo, then travis ci wants to charge to integrate with a private github repo.  Now it's almost $20 a month!  That's like 4 beers at Great Basin Brewery!

I'm embarking on these projects mostly because I get off on developing, and especially on learning new stuff.  But I also like to control my assets.  I know that listing a public github repo on a resume makes it really easy for a potential employer to look over your "portfolio", but oh well, I'm gonna go with the proverbial "available upon request".

I'd like to get an app on the app store anyway, and let the finished product speak for itself.

As for dev details, I dusted off the Tapster project after having lunch with my friend/former colleague Nick W. last week. It was his idea to mount a phone to a keg and make it do cool stuff to begin with.  That codebase is surprisingly in good shape.  It was my first Android project and I learned quite a bit.  Some things I did different on AR/Trakker versus Tapster:

Tapster:  All external dependencies I went and found the jar file, put it in a libs folder, and checked it into source control
Trakker:  I discovered Maven.  Nuff said.

Tapster: I actually used Dagger for Di
Trakker:  I fiddled with Dagger again and chose RoboGuice because it seemed easier.  Weird when your former self could figure out something your present self couldn't

Tapster:  Wrote my own data access layer in the "standard" Android way.  No ORM tools.  Old fashioned SQL statements.
Trakker:  Went with OrmLite.  Did I mention I hate SQL?

Tapster:  Had my college roommate Big Bill design me a sweet pint glass for an icon.
Trakker:  Still using stock icon.  Need to make pretty.

Tapster:  No CI
Trakker:  Travis CI.  Although, as mentioned above, I am about to turn my workstation into my own CI server and ditch paid services. At least until if/when this turns into more than a hobby.

Learning and experience are awesome.  Want more.