Bourbon & Sass

Bourbon & Sass

I have always hated working with CSS.  To me the syntax is often painful to look at, almost like I’ve gone down to a level within the plumbing that I explicitly hate working with.  Many years ago I let go of keeping up with web technologies and languages in favor of native apps and development, but now I find myself needing to find new tools to work with these things.  Enter the Sass language and Bourbon a framework that runs on top of it.

Let’s begin with Sass.  Sass stands for  “Syntactically Awesome Style Sheets” which is a way of saying that they want to make CSS files and their management easier.  Essentially you have a language that is compiled down to CSS in a programmatic way, making it “easier” to manage things like stylesheets or other fragments.  In this example I’m probably leveraging more of the Bourbon framework and its associated layers on top: Bitters, Neat and Refill.  We’ll talk about those a bit later.  First, lets get the environment all set up.


On to Spring

On to Spring

My attempt to throw myself headfirst into contributing to an open-source project didn’t go quite as well as I hoped.  I think I just need some more practice using other open source software in my projects.  With that in mind, I’m turning towards the Spring framework for Java to help me out with some of these things.

Surprisingly, the Spring site is incredibly robust with tutorials about how to deploy stub Java classes with embedded Apache Tomcat or Jetty servers.  I was futzing last night with simple hello world and other simple projects, just getting it up and running and familiar.  Along the way, I’ve picked up a host of other open source tools as I dance around with deployment via Heroku.  Let me tell you– Heroku is fabulous stuff to me right now.  It makes deploying a quick containerized Java web app easy right up on AWS with a great hobbyist tier so I’m not incurring anything.

I’m becoming more proficient at using Brew to find other packages that I may not have– I’ve been working with PostgreSQL, the Heroku toolbelt and the Springboot components all from within the CLI.

I think I have an incoming project where Spring will probably be the easiest and most useful framework to solve the problem.  I’m actually coming to enjoy doing some of my webwork in Java now that I’m not trying to screw with the stock JDK libraries for things. Its nice not to be treated like a second-class citizen for wanting to work in a language that I already know so well.

Apache Maven & Homebrew

The OK-HTTP project lists that I can compile this project using Maven.  The Maven project is a build tool for (primarily) Java projects.  It provides a dependency list of other bits of compiled code and pointers to how to fetch them for a compile.  There is an alternative tool called gradle, but I’m not going to delve into that that.  I’d love to learn it at some point but I’ll stick with Maven.

Let’s check and see if I’m running Maven already: 

mv --version

.  I get an error back that signifies that I’m not running it on my local machine.  Ok, very well let’s go grab it. This seems like a good time to mention Homebrew, an package manager for OSX.  The description of Homebrew on the official site is that it gives you all the programs and tools that Apple took out of of OSX.  It is command line based, and it’s a quick scripting engine to find common projects and libraries and compile them and any dependencies they may have.  Its very straightforward to install, and you can query it for formula (read: software packages) that they have by running:

brew search maven
brew install maven

 At the end you’ll have a version of Maven installed in your “cellar” under “/usr/local/Cellar/…”  The idea is that programs compiled or installed by Homebrew shouldn’t interfere with a possible prior installed version in the normal “/usr/local/…” directory.  In this way there’s no real conflict if some other app also happens to install maven in the default directory.

Alright, so first up I’ll rerun the “mvn –version” command.  This tells me that unfortunately the version of Java it found on my $PATH is the default Apple provided version, JDK 1.6.**.  That’s definitely not very useful because the OK-HTTP project requires compiling against Java 7, and even I’m running the latest sub-version of Java 8.  Apparently this is common enough that someone has written a shell script to solve this here.  It looks legit, and I’ll tweak it to look for Java 1.8.  Success!  Here is the result of Maven now reporting the correct version:Switch JDK Version

Alright, clone the project and let’s see what we’ve got here.  I’ve followed the “Get up and running with Maven in 5 minutes” tutorial here, which gave me everything I needed (I think).  I created a Maven “goal” to create a stubby simple HelloWorld app.  This gives you a nice organizational tree and a basic JUnit test for that same basic Java class.  It also creates a pom.xml file which is how Maven configures your project.  It’s actually relatively simple– there is a key called “dependencies” and that’s where you can specify that during a build/compile phase of your project, that it reach out and grab a specific version (or the newest) of a JAR to compile your code with.  This makes it really easy for us to add the Ok-HTTP code as a dependency to the project with just a few lines.

Here’s the code I added to my pom.xml file: 


Once there, I asked Maven to go compile my project once again using “mvn compile”, which gave me a successful compilation and the following result:OK-HTTP Maven

I’m now feeling pretty good with the basics of Maven.  If I was to use this in a Java project I could start a project in Maven, do my normal source code, and compile and build against these references to someone else’s code.  I’m ok with that, but honestly (and don’t shoot me), I do most of my Java code in the Eclipse IDE.  Considering this whole project structure that Maven implemented is still different than the Eclipse project structure, (which is in itself different than the Git blob structure) I’ve got some more work ahead of me.

Contributing to Open Source

Contributing to Open Source

Well, another quarter is behind me.  I have like 2 weeks to try and decompress and get ready for the new quarter. I’m not sure if anyone truly decompresses from this stuff though– I think part of me is afraid to let it all go because its definitely the meaty stuff that shows up in a technical interview.  As a way of “relieving the pressure” so to speak, I’m going to try and improve my standing on GitHub today.  As CS undergrads we constantly hear that we should be contributing to open source projects, and to show off your GitHub profile when talking with prospective employers.  So today I’m going to try just that.

The irony is that there are a ton of articles online about “How to get started with open source” and they mostly involve working with a project you’re already using or are interested in.  Unfortunately for better or worse, most of my college career hasn’t been spent using third party libraries or consuming other people’s code, at least not on the surface. I am well aware that right underneath the surface of my OS there is a world of open source libraries and functionality.  My intent is to write about what I come across as I attempt to do something simple like “contribute to open source”.

The basics: Here is my GitHub profile page:

Those squares should be green....

Those squares should be green….

It’s beautiful isn’t it? I’ve got a streak of pushing code to a repo of 1 single day. Ha!  Let’s change that.  GitHub suggests you search or explore the site by specifying a language.  I’ve spent the last 2 years in Java and I’d rather not be thrown a curve-ball today.  Looks like Square has a project called Ok-HTTP which handles HTTP requests via SPDY.  SPDY‘s goal is apparently to reduce web page load time and optimization over the HTTP interface.  Ok, sounds simple enough.  Who doesn’t want to make web connections faster?

I think my peers would say my “git-fu”, i.e. the amount of skill I have using Git is probably fairly high.  I can definitely grok the command line stuff, but I prefer to use the implementations within Eclipse or even Atlassian’s excellent SourceTree application.  I can either grab this thing as a pre-packaged Java JAR (compiled obviously) or I can grab the source through something called Maven.  Hmm…Looks like thats the first place I need to go.

Intel will combine PC and mobile divisions.. | [ExtremeTech]

GitHub For Students Pack

GitHub For Students Pack

Normally my favorite site for repos is BitBucket vs GitHub but this week they announced something really nifty that seems very useful for students, or anyone really working with tools to ease software development.  It’s called the GitHub Education Pack, and it can be found here.  Once you verify your student account, they give you a lot of free or reduced fee access to a variety of services.  Some of these are completely useless to me (right now anyway), but a few standouts that I’m already using:

  • GitHub
    • It may sound stupid but I primarily signed up through BitBucket because they give you unlimited private repositories.  Not all of my code is meant for the world to see, but I like getting in the workflow of branching, staging and committing code even if its only to a repo I work with.  The student pack offers some private repos for free, and access to the GitHub API.
  • Orchestrate
    • Their tag says “databases as a service” but it is so much more than that. It’s simple key/value pairing in a REST API, and since it already exists and is free I’ll probably be leveraging it in some way.
  • Travis CI
    • Continuous Integration is a hallmark of open-source and team collaborative projects.  CI ensures that as code is committed, it’s automatically built and ran against a series of unit tests residing in the cloud.  From there, notifications can kick off to the team informing them of successes or failures and to take the appropriate action.

The other bits of the tools I’m not really using at this point but that’s because I have my own VPS and infrastructure located elsewhere.  For folks that don’t, the rest of these tools would be an excellent starting place.

Wearables, iWatch, and Biometric Data

Wearables, iWatch, and Biometric Data

(Featured image courtesy of

Tomorrow Apple is expected to announce after months (or years) of speculation some type of watch device or wearable at a press event.  Wearables are front page news today; device makers are tripping and falling all over themselves to release and announce their product before Apple gets their big reveal tomorrow morning.  Moto 360, Motorola’s (can’t tell if its an initiative or a brand yet) thing around their wearable device concepts is in full “blast you with marketing mode”.  Mashable has a review of LG’s latest watch entry up here.  I own two watches that I wear very rarely, and even then only as an accessory to a more business-oriented look– Typically a suit.  However, my money (and excitement) is on Apple’s iWatch for some key reasons.

Wearables are very popular

I know a couple who got each other FitBit’s for the Christmas holiday and both wear them every single day.  The idea of a device that provides a “game-ification” or some sort of challenge for the user to do something is probably more successful than the device that doesn’t.  I liberally use the MyFitnessPal and Nike+ Running apps to provide an incentive and feedback on my runs, activity and diet.  My sister wears a wristband made by Jawbone called the UP.  Aside from it being a little loose, she says it’a great thing.  It provides heart rate and acts as a pedometer throughout her day.

For me, the most basic actions are already taken care of by my iPhone 5S– the M7 motion co-processor in my phone uses crazy low power, and I almost always have my phone in my pocket.  When I run, I wear an armband so I can listen to music and a combination of GPS and pedometer data ensures a high level of accuracy with my runs.  There is no doubt in my mind that among the active or fitness conscious, getting reliable feedback is a wonderful thing.

…But it needs to be multi-purpose

One of the few attributes I’d like while I run would be some heart rate and pulse data.  A few years ago while training for the Seattle Marathon some folks were using blocky pucks they strapped to their chests which communicated via Bluetooth back to dedicated running watches or a smartphone app.  There’s no question this stuff is big business, but I always felt better off because again: The thing tracking my data was already in my pocket, and that made it brain dead simple to manage, to not forget, and to adjust my “bad” behaviors.  An iWatch might purport to do all of those things.  Communicating over Bluetooth 4.0+ LE spec back to your phone, it may be packed with more sensors than display and power guts.  And because it may offer additional features we haven’t thought of yet, I think it could be rather ubiquitous.

It needs insane battery life

In my mind, Apple devices are some of the more battery-conscious items out there.  Anyone familiar with the latest versions of Mac OS X have seen the “Energy Use” tabs in Activity Monitor, and similar datapoints in iOS7.  This is a complete cultural shift away from apps running as quick as possible to apps that also run as efficiently as possible.  I love when I can get my MBP to last all day long, but that won’t happen if I’m running some stupid intensive process (or working in an IDE for that matter).  We’re all trained to charge our phones at night, but it would definitely suck if we needed to charge an iWatch each and every night.  I’m hoping this device gets very efficient storage and use technologies–I’d hate to see it die on the vine.

Rich Datapoints are King.

The things under the hood with regards to HealthKit in iOS8 are really nifty.  I don’t want to violate the terms of my NDA, but there are huge, diverse datapoints available to be used with any number of devices and apps.  It’s a strong foundation with the idea that your data is yours and you can take it and extrapolate whatever you’d need to.  I think that’s very empowering from a fitness standpoint and could help turn some of the issues plaguing Americans into things of the past eventually.

I’m looking forward to tomorrow’s announcement.  I’ve got no disposable income currently, but perhaps an iWatch is in my future.

How the outdated TI-84 still holds a monopoly…[Slashdot]

How the outdated TI-84 still holds a monopoly…[Slashdot]

Well, that didn’t last long– I missed a day, but we’re getting back on the boat here.  Came across this article on Slashdot about how the ridiculously old TI-84 is still the calculator of choice in many classrooms today.  Texas Instruments apparently released an update in 2004, but back when I was in high school I used a Ti-85 with it’s high-end monchrome screen.

Having gone through Calculus and now Discrete Math, I can’t imagine doing any of it without a calculator– hats off to you folks that did not have this technology at your disposal when completing these classes. Yeesh…  I use TI’s latest variant, the Nspire CX CAS— and yes, I know that is a completely stupid name.  It’s got a nice color screen, USB out, and most importantly has an OS that runs in an emulator I use liberally on my Mac.  Being able to have some flexibility when doing homework is key, and I love that I can dump the files back out the calculator when I’m finished with the assignment.

The article points out there are languages like R around, and of course using something like Wolfram Alpha or the desktop version of Mathematica would be a suitable course of action too.  Can I admit something though? I find Alpha ridiculously difficult sometimes to get things out of, even when following their crazy formatting standards.  Mathematica is available to me as a UW student via their site license, and while I’ve downloaded it– it became too much to learn to solve (at the time) what should have been a very simple problem.

Hats off to the TI-84 for lasting this long– when they figure out how to prevent cheating with newer devices I’m sure schools will move to a new device.

Celebrity Hacking

Due to a breach in someone’s cloud service authentication photographs of several nude celebrities are making their way around the Internet.  There used to be a time when I could say they were making their way around a “dark corner” of the Internet, but it seems the net of the present (and maybe the future) is for everyone and a lack of privacy for anyone. I think the phrase “celebrity hacking” will continue to be a prevalent headline in the coming years, but I wonder what happens when it starts to affect the little guy.

I can’t tell whether this is a sensationalist headline or not: Everything we know about the the”Celeb Nude” and Trading Ring.  Or this one, at CNN.  I don’t know if anyone is really concentrating on the real story, which is that there was a failure to keep privileged information secret.  I think of the things I store (encrypted and unencrypted) around the web in public and private clouds, and I would be very shocked to have my private data come out.  I don’t have anything nearing what these people had, private photos, etc. but I think would be rocked just the same.  I’m supposed to be part of the body responsible for helping to keep your information safe, to make you trust us as developers when we say “Hey, I’ve got it under control. Your stuff is secure.”  Instead, I see no articles on the ACM or IEEE privacy group pages.  You might say that this breach happened over a holiday weekend, but I’d still expect some type of response from the provider in question.

The whole thing just kinda bums me out.  I’m going to keep working my way through this course on Obj-C and put my energy to good use.

Back into Objective-C

Trying something new this month– I’m going to try and write a post a day which should be challenging to say the least. I’ve let GA sit dormant for too long, and I’m doing some fun things that deserve to be noted about (if only for my reference).  First off, I’m buried in Objective-C again for the first time in a good long while.  iOS8 is about to be dropped shortly (few weeks) and I think the last time I built a functioning app for iOS was back on version 3; At that point they were still dubbing it an “SDK”.

I’ve been following an e-book that these guys put out, iOS Programming: The Big Nerd Ranch Guide which is rather neat I think.  It’s covering a lot of things about iOS7 that I never knew and is really making it easy to forget about all the crap I learned for dev on iOS3– manual reference counting, myriad hidden API’s and the like.  I’m having a blast doing it.

Anyhow, back to it!