The next quarter will be focused on a couple of critical issues, professionally:
JavaScript
Seven Languages in Seven Weeks
So it should be an exciting three months!
Trying to make sense of modern-day web development, one topic at a time.
With a new job comes 35-45 minutes on a train either direction, and some time to reflect on the day and write for the blog. So here’s my beginner’s attempt to lay out the tools we use at the new job.
It’s always good for a craftsman to get to know his/her tools better, but with so many new tools that’s just going to take a while. Consider this a start!
I’ll also contrast it the tools from the old job, based on all of 5 days of experience.
Old: Subversion
Mercurial is a distributed version control system. It’s similar to, but has slightly different internals from, Git… but the word is that Mercurial is used here because the lead developer preferred it. Maybe he prefers James Bond to McGuyver. Whatever works.
It is far and away better than Subversion, for reasons best explained in this Joel Spolsky post: the short version is that even though one of the advantages of SVN was that fugly merges would go away, in practice they haven’t. With Mercurial, they just might.
Old: None
Virtualbox is a virtual machine the emulates an x86 environment on any given piece of hardware. Vagrant manages most everything else that’s built on top of the machine; operating system, databases, web servers, environment and dependencies.
When managing many web applications (or, really, any software applications at all) it’s inevitable that the dependencies and requirements from one application to the next will change. Deploying a virutal machine for each application, with the requirements for that application built into the machine, allows developers to iterate through changes rapidly on their local box without worrying about local-box issues that inevitably cause shared working areas to break.
Old: Intervals Timetask
It’s not enough to know how much time was spent on a given task. It’s more important to know the current status of the task, especially when coordinating with a team of up to a dozen people.
A scrum board helps do this. Important tasks are at the top. Less-important tasks are on the bottom. The journey of each task is monitored on a scrum board, as it flows from backlog to design, to development, to QA, then back to development to push. Tasks are never lost, because they’re right there, on the board.
It integrates well with commit hooks that tie every commit to a particular task. Since I’m a serial committer, it subtly influences me to commit less than I would, but that’s not a bad thing; a commit should be defined by a proper unit of work.
Old: N/A
In the same way that Vagrant keeps the service layer clean, versions managers keep the application layer clean. Some of our applications were built with Ruby 1.9.3, some were built with 2.0.0. Until there’s development time to migrate each application to the most updated version, project-level declarations of application versions keep developers happy.
Old: Framework-level hooks, sort of
Not much experience with this so far, but we use it to compile our CSS from SASS and minify JS before deploying to production. This is better done automatically than manually.
Old: None
Jasmine is a JS-based framework for unit tests. A large chunk of our business logic is written in JavaScript, and in the future we’ll only be writing more in it, so bringing code coverage for those scripts up to at least 80% would be ideal.
I thought that trying to test complex JavaScript would be an absolute PITA when I first scanned the code, but Jasmine has the concept of spies, so you can do this…
it("tracks that the spy was called", function() {
expect(foo.getBar).toHaveBeenCalled();
});
And what if you’re testing class A and want to make sure the functionality of class B doesn’t get in the way? Well, JavaScript is a prototypal language, {so you can override B really easily}(3):
spyOn(obj, 'method').andReturn('Pow!')
:-D
I want to create a Ruby web app, just to become familiar with the syntax
and to see what my options are out there. Every framework has its own approach
to web apps.
I have minmal, old experience with Ruby on Rails, so for now I’m going to look past
it. An outline of what I want to do goes something like this…
Summary Page
It would be nice if the aggregation took place at the server level, so that the only thing
passed to the front-end was some JSON that looks like this…
someDebugging: {},
neighborhoodSummary: [
{
neighborhood: 'River North',
stations: 12,
availableBikes: 100,
totalBikes: 150,
},
...
{
...
}
]
Since stations appear and disappear all the time, it would be nice to have a way to associate
stations with neighborhoods that didn’t require keeping a file up-to-date in the git repository.
History Page
A big goal of this is to track neighborhood-level changes in station availability over time. This
seems to call for a conventional transactional database.
With the historical changes, you can do some interesting stuff.
I don’t have the faintest idea when this will be done, but I do plan on having the code open-sourced
and available on GitHub. Suggestions would be appreciated!
Pull request #3 (of, hopefully, 5) is to add graphs to the Chicago Crash Browser.
I’m a fan of data visualizations, but I haven’t been able to work with that during my day
job. So this will do. :-)
I utilized Highcharts, and after a few hours of wrestling with JavaScript
objects, I’m happy with the result:
…to me.
The big news today is that beginning Monday, February 3, I will be starting a new position
with GoHealth, a company that sells health insurance to consumers. I’ll be working on both
consumer-facing and intra-company web applications, utilizing Ruby, JavaScript, or whatever
works best for the task at hand.
This comes at the end (or should I say, beginning!) of a process in which I thought more about
web development, and more specifically: what it means to me.
Recently I had considered myself strictly a back-end developer. That is, I saw our web development
stack as this…
There was, I felt, a pretty clear delineation of responsibilities there. Browser is front-end. Server is back-end.
As I dug into enterprise web development, the picture started to get a little blurrier.
I haven’t worked on anything on the other side of the API wall… which probably meant I wouldn’t
pick be able to take on authentic back-end roles (i.e., server-side business logic). That leaves focusing
on web development over non-web development.
Going into this new phase, I have a couple of goals.
My new year’s resolution for this year is to have goals.
A stretch, I know. For this blog I prefer to keep things professional,
though if something sneaks in about me wanting to run in a
half-marathon, don’t be surprised.
In other words, be a full-stack developer.
Which can be a bit misleading. Currently I work in PHP/XSLT, which
can arguably be full-stack or back-end, depending on how you look
at things.
And don’t ask me to design anybody’s website.
But. The structure of data on a page. Managing how data is displayed
on a page. Data binding through models. AJAX-y stuff.
That’s more up my alley, and with the amount of frameworks that
are sprouting up daily to address this problem, it’s a good time to
see what types of client-side solutions are being used throughout
the web.
I have a goal to put in 5 pull requests to some project(s) on GitHub
by the end of the month. I’m not sure if I’m going to make it, but
the broader point applies: the more I work with other people’s code,
the more I learn about codiing as a whole.
This could be a really handy tool throughout all of Illinois, not just Chicago,
so I’d be very happy to help make this a fast, functional tool for bicycle
and pedestrian advocates like me.
There’s a lot of options at Open Gov Hack Night. Which one sounds interesting to me? Which one can help people the most?
Because they’re important too. :-D
New Resources
* Programming with Asserts
Existing Resources
* PHP: The Right Way
Interesting Posts
* How To Be A Great Developer
On My Bookshelf
* Learning Python. (Returned library book. Page 1,024)
* Node.js In Action, borrowed from a colleague (20%)
* Getting Started with NoSQL (70%)
* Programming Python, 4th Edition (not started)
* PHP Objects, Patterns and Practice (page 65)
Summarize later
* The Art of Agile Development
* 97 Things Every Programmer Should Know
* PHP Web Services
Wish List
* JavaScript: The Good Parts
This week I continue my search for a Python (or, dare I say, Ruby) open source project to work with. I also have a couple of good suggestions on Facebook to work in the jQuery library.