Julython 2014 Recap

Julython 2014 has come and gone. I hope everyone had a blast, I know I did!

A Month of Hacking In a Nutshell

Let's take a quick look into what was worked on in July:

An Opportunity to Learn, Build

I like to use Julython as a very good excuse to learn something new or learn something more about. In this passed July's case, I have been toying with the idea of learning SQLAlchemy, and this was a perfect excuse to do so.

Take a look at my Slidedecker repository and you will see that I added SQLAlchemy to it. Obviously, I wanted to learn more about it first, so I also added the tutorial to my Julython projects. But I really wanted to learn by example, so obviously working on your own personal project is the way to go!

PyPI Contributions

Both bump and MPPyResponse are packages available on PyPI.

bump is a fork of the original that I use to do version bumping. I had a need to do version bumping for release candidates or beta candidates and that functionality was missing, so I added that in.

MPPyResponse was created out of sheer humor. A friend of mine jokingly asked me to create an application that responded with a random Monty Python quote; no problem!

Obviously, with it still being Julython, I wanted to learn something new while still having fun, so with MPPyResponse, I started that project off with cookiecutter. It is truly a fantastic little package for starting off your own little package. I highly recommend it if you need a little boilerplate to get your projects going!

Summary

In summation, Julython for me is really just an excuse to learn something new in Python while having a little fun. Yes, sharing code and watching myself on the leader board are awesome too, but all in all, contributing to a month-long event of hacking is really just a wonderful thing!

Until next time! Cheers!

By Adrian Cruz | Published Aug. 6, 2014, 1:51 a.m. | Permalink | tags: julython, opensource, python

Stand-ups and Bikesheds

I've been hearing far too many stories about folks having their daily stand-ups take too long. So, I feel compelled to write about stand-ups and how to keep them brief.

Full disclosure: I am not a PM nor a Scrum Master; I am an engineer and my stance on stand-ups is viewed as an engineer solely.

Timebox Your Stand-ups to 15 Minutes

If 15 minutes is not enough time for you to get through your stand-up, then something is wrong. As an engineer, you have three main questions you will need to answer:

  • What did I do yesterday?
  • What will I do today?
  • Is there anything blocking me?
That's it. Done. Go!

If you are having lengthy discussions about every little thing you mention during your update, then that is why your stand-up is taking too long. Stop that. Just remember to stick to those three questions and anything more than that should be discussed outside of the stand-up. Try and be respectful of other people's time. If you are discussing something at length, that is time taken away from another person's updates, which will make you go over your allotted time, which means everyone at that stand-up now has less time away from doing actual work!

Painting the Bikeshed

"Painting the bikeshed" is a phrase that comes from the BSD mailing list and it could possibly be why your stand-ups are running too long. If you have folks that give their feedback for every little detail of someone else's update, then send them that bikeshed link. Once again, I cannot stress this more, discussions that are thought of as quick, add up after time.

By Adrian Cruz | Published July 18, 2014, 3:48 a.m. | Permalink | tags: agile, scrum

Py-Closure: A Python Client for Closure

I made a little command line utility to assist in minifying javascript files. It uses Closure Compiler to compile. I've been using the web app and needed a way to automate the minification process; this command line utility is just the beginning of that process.

What can I do with it?

Well, if you use Closure Compiler already I'm sure you have always wanted a way to streamline your minification process. This is really just a piece of that. For example, you can probably add this to your build process in Jenkins to minify all javascript files within your code repositiory.

But, there are a bunch of other asset minifiers I can use!

There are, and I actually was looking into using Grunt. Well, I have been busy with this new project and just want to keep the ball rolling. So, I'm sure that I will revisit this minifying process again in due time.

So, where's the code?

Sure, it's here on my GitHub. It's short and sweet and super simple. I'm actually going to fork this off and use it similarly at work. Anyhow, I just thought I'd share. Cheers!

By Adrian Cruz | Published May 7, 2014, 2:35 a.m. | Permalink | tags: javascript, opensource, python

Silly Bug Fixes

Yes, this was a bug fix. "A one line bug?" you ask? Yes, sad but true.

Now, for some background...

A bug was sent in about pagination not completely working for a web application. It was consistently showing only four pages. This is obviously not expected behavior especially if the user knows that there should have been 10, 20, 50 pages.

Okay, now the history of that code

So it just so happens that the portion of the site was quickly rolled out to return only 100 rows from the database as a shortcut. As part of technical debt, a fix for pagination was then added. Unfortunately, sometimes working in a fast pace, you miss some details in code and bugs like this slip through.

Doh!

Silly, but let's fix this

So, I know I'm not the only engineer to have commits like this. I mean, remember the goto fail; bug? To remedy this, we've already started doing code review on this project. Why haven't we been doing code review from the beginning? Well, if you remember my post on a quick site launch, I'm sure you are aware that this is for a site that was bootstrap'd fast to ship a functional product in a short amount of time.

Unfortunately, things like this was expected due to the lack of time. But here's to finding a humorous tone in my mistakes. Cheers!

By Adrian Cruz | Published April 7, 2014, 5:29 a.m. | Permalink | tags: mysql, python, silly bug fixes

From Initial Commit to Launch: The Story of a Quick Site Launch

Here is a tale of commits starting from the first initial commit, up to the production release commit. Full disclosure: these are not complete commit logs, I have tailored out any work-specific text. These are also not all of the commits in the log, but only the highlights.

Initial Commit and Commuter Commits In One Week

So, here's the problem, I've been tasked to build a web application. They need it "A.S.A.P." aka "we need it yesterday". I'm up for the challenge, I do my research, get the requirements, pick my tools, and off we go.

commit fc230bbd88e488224145e2dcb8d3522aebbd706d
Author: Adrian Cruz 
Date:   Tue Jan 7 11:20:48 2014 -0500

    initial commit

It's a Python Django application. My second place choice was to use Play Framework, and honestly, I would have loved to use it, but I would just be learning Scala and the stress to have the application ASAP resonated. I know Python, I've built web applications in Django before. Let's do this.

commit e65ef58f6f32c39a7b345f137c899479485cdc04
Author: Adrian Cruz 
Date:   Wed Jan 8 09:44:32 2014 -0500

    working on the bus commit

I've been having issues with Thrift. We use Thrift to provide service API calls for cross-functional teams to use. Thrift is not documented very well. Learning how to utilize Thrift to pull data and store data is taking up too much of my time. It's a blocking item, pushing all of my other tasks further back.

commit 61954bbfb2738eba93c8b270fd2dadcce4c99207
Author: Adrian Cruz 
Date:   Fri Jan 10 03:42:20 2014 -0500

    working on page detail view, not quite working (404'ing)
     - time for sleep

commit d62a212b3d44836258d82fa783f7d9388ee27493
Author: Adrian Cruz 
Date:   Thu Jan 9 03:18:19 2014 -0500

    specific pages are loading in a table now.
    -- i should sleep

I want to get this app done. I've got some strength in me to pull some late-night coding sessions.

commit 926607874dfe5ad62064a990e29a27c7d3087367
Author: Adrian Cruz 
Date:   Mon Jan 13 20:08:45 2014 +0000

     - updated settings and models for running on beta box

I've been going back and forth with another developer. I have downtime while he is working on fixing things on his end. I set up a beta server to host my application instead of running this on my local machine. My git logs now reflect GMT time since I am not working on my local machine any longer. Note: convert the time to be in GMT -5 to see the actual times I've been working.

commit bd4ce1a3029fd412a3ae9e4465645a77405d729d
Author: Adrian Cruz 
Date:   Fri Jan 17 19:00:01 2014 +0000

    quick lunch commit -- loading data from thrift successfully

commit dd8d1d209a483bfa32e51203969bc9a83c2a7903
Author: Adrian Cruz 
Date:   Fri Jan 17 09:07:41 2014 +0000

    falling asleep commit -- working on pulling data in from thrift now

Things are getting better. I'm getting the hang of Thrift finally.

commit c6671bbc0ad5aafd41f84096fcdacd59c2466366
Author: Adrian  Cruz 
Date:   Tue Jan 21 19:30:03 2014 +0000

    v0.1-beta-rc1
     - functioning; saves and pulls data

Looks like I have a working beta version. I had to do a lot of AJAX work from this weekend up until January 21.

Snowstorms May Stop Traffic, But Not Development

commit 01695b45c3db9ac521952f6ed9467907e7ad5675
Author: Adrian Cruz 
Date:   Tue Jan 21 22:54:33 2014 +0000

    on the bus commute! wow this snow is horrible! i'm _still_ not home yet.

Working on the commute to or from the office has become a normal routine. But this time, I really had to since it was the only thing keeping me sane. Total commute time due to snow: 4 hours 20 minutes.

On a Weekend Where Staying In Was On the Agenda: Weekend Work

commit 721aa0881e8039925825049e8d3ad2907226171b
Author: Adrian Cruz 
Date:   Sun Jan 26 05:49:53 2014 +0000

    WORKING LDAP authentication!
     - need to make it pretty and add @login_required decorators everywhere

One of the requirements was to be able to snap into our company's LDAP server so users won't need to remember another password. If anything, I could roll out authentication using Django just for the time being. But luckily, just one weekend worth of hacking, I was able to write a custom LDAP authentication module for Django.

commit 01318875cb0f0adaebe7d0d03fd6d38ca8a36593
Author: Adrian Cruz 
Date:   Mon Jan 27 08:13:32 2014 +0000

    i should go to sleep - fixed data models
commit a161c8b476c33dc2330d357143d9a2a8c94dbb79
Author: Adrian Cruz 
Date:   Tue Jan 28 12:06:23 2014 +0000

    Thrift saving seems to be working properly now... it's 7am...

Having Thrift issues certainly did slow down the process.

Production Live Beta

commit 767f9c0796804d3fbca38db0fd0cac2c1bc746b2
Author: Adrian Cruz 
Date:   Tue Jan 28 22:11:10 2014 +0000

    production settings.py
commit 3cbb95e1fa3f7a38e9de8d8d4f392944e5e0e52a
Author: Adrian Cruz 
Date:   Wed Jan 29 19:57:58 2014 +0000

    optimized view for pages
     - LEFT JOIN
     - limited results to 100 until pagination

We did a live beta to demo to our end users. I like these since I get to hear user feedback. But on the other hand, I really got to hear user feedback! A flood of changes were requested and some of them were done. Others, entered in as a feature request for the next iteration.

commit 8a10107c9d3b9ce4ea2ed2d4255b2f6113ae5c7c
Author: Adrian Cruz 
Date:   Thu Jan 30 23:51:02 2014 +0000

    publishing properly
     - TODO carousel json

I now started working on publishing output. I can see the checkered flag.

Production: Rollout!

commit b8ab872dbcb464c63f4b6d260d5a81e9448d1e4f
Author: Adrian Cruz
Date:   Fri Jan 31 01:13:18 2014 +0000

    v0.1 - publishing seems to be working properly

I made it. I've deployed everything I need to production. It's a barebones application that functions. Any further refinements will be handled with maintenance releases.

commit 53554dffeac07a86e9d62791178ca15126877887
Author: Adrian Cruz 
Date:   Fri Jan 31 17:21:03 2014 +0000

    v0.1.1 - maintenance release - bad sql query
     - it was late, i was rushing, everything all looked the same

I'm technically off on holiday. I checked in on email though almost every half hour. I got an email about a couple of bugs. I was able to send over a solution via email for one bug. I VPN'd in and made some changes for the second.

Bullet Points

  • Being able to pivot is key
  • User feedback can sometimes get in the way
  • Quick coding is not quality coding

This is NOT The End

I have obviously got some more work to be done. The code base for a fairly well-designed system is now in place. All that remains is to make some fancy user design changes, optimizations, and of course some general code clean up!

By Adrian Cruz | Published Feb. 1, 2014, 2:29 a.m. | Permalink | tags: django, git, python