Adam Gent

May 22

Spring Social Eventbrite plugin -

I started on a Spring Social Plugin for Eventbrite. Right now it only supports search (event_search) but in the coming days I will be adding more support.

Its on github.

May 02

The Lead Engineer should be the Release Engineer

While it may not be true in small companies/startups the majority of organizations make the least experienced developer manage the build and releases. In other words the least experienced person is generally given the “release engineer” job.

I have seen this at many companies and its a horrible practice because a release engineer needs to have the following:

The above sounds like a description of a senior role? 

One could argue that all engineer’s should maintain/know about the build (which I do agree with) but in large organizations that either does not happen or is not possible.

I’m actually incredibly annoyed to find “lead architects”  that have no idea how the build works. That’s right. Have no idea how one of the most critical pieces of custom software their organization uses works. If you asked them to cut a release they probably could not. Why is this so wrong? BUILD IS ARCHITECTURE! How you build is very correlated to how you do business (SAAS, iPhone App, etc). For SAAS/Websites your build is deploying so even more knowledge is needed.

However what I am most annoyed with is the accountability. As a contractor I have seen it a dozen times where a junior engineer (release engineer) get trashed by a manager for screwing up the release. Often bugs are even blamed on the release engineer (and not the lead/principal or project manager). Not only does the release engineer usually get the blame he/she is usually an FNG. So he/she is already dealing with loads of social bias.

On top of accountability Release engineers get pulled from all sides of the organziations:

“Hey can you cut me a build with the special new stuff” — Desperate Sales Engineer.

As a junior employee its rather hard to say no to senior people or make correct big picture decisions. That just takes experience and relationship clout.

One could argue that its a “Good Thing” to throw the FNG’s into the deep end as a sort of intense training but in my experience this has been bad. It can be detrimental to the moral of a junior engineer even an excellent junior engineer. 

If your a lead engineer please consider taking over the build and letting junior developers learn to develop. By taking over the build you will be watching checkins making it easier to provide on demand mentoring.

Otherwise I don’t have very strong feelings about the subject. 

May 01

Copy rows from one table to another (SELECT to INSERT)

I always seem to need to copy a few rows from our production postgresql database which is remote to my local development database. I could use something like pgdump but I really just want to turn my SELECT statements into INSERT statements.

A stackoverflow post shows how to turn SELECT->INSERT for Postgresql but its still rather manual: http://stackoverflow.com/questions/1820650/sql-script-to-create-insert-script/10392124#10392124

So I have written a python script that will take a SELECT statement into INSERT statements. The script assumes that your selecting on all the columns in the table which is easy to do with pgAdmin III: right click on a table and select ‘Scripts->SELECT’.

Sometimes Tumblr messes up the Gist embed: https://gist.github.com/2568047

Apr 03

i18n with Mustache Partials -

I’m thinking of replacing our current i18n with Mustache.

Looked to see what others have done and found a post on Stackover flow.

My answer covers the solution of using Mustache partials.

Mar 27

A better Mustache Spring View -

I forked a github repository that has a Mustache View Resolver. It had no support for partials.

I fixed that: https://github.com/agentgt/mustache-spring-view

I need this for some Spring MVC Single Page Application work I’m doing. I plan on making another github project to show how it works.

Mar 06

JATL 0.2.1 released

JATL 0.2.1 has been released.

A rather strange issue with how XML treats white space was fixed: http://code.google.com/p/jatl/issues/detail?id=10

It turns out that XML normalizes white spaces in attribute values

That is:

Will be replaced with Space #x20 when parsed by a compliant XML parser. The only way to avoid this is to explicitly escape these characters. JATL now handles this correctly such that if you put a newline, tab, or carriage return character in your attribute its escaped properly. I feel slightly stupid about missing this as I even remember learning about this a long time ago.

The future release of JATL (0.3.0) will make it possible plugin your own custom escape strategy for both attributes and elements. 

The important thing to take from this is that there are different forms of XML escaping:

Attribute escaping is rather tricky as you have to know when to escape the single (') or double quote ("). That is if you use the double quote to surround your attribute you will have to escape it. Vice versa for the other issue. I added a Util class to handle this and will make it more usable in the future.

Thank you David Portabella for finding this issue.

Feb 22

MOG vs Pandora: thoughts.

I have a both Pandora One subscription and a Mog Primo subscription. 

Both services do a very good job and both I believe are fairly priced.



I have no guilt spending this money. The opportunity cost saving, pleasure, and work effort stimulation these services provide is well worth the money. Still your probably asking why I have two separate service accounts or….

Hey what about?:

This is not to say any of these technologies suck. They are utterly impressive to what we used to have and are much more cost effective than iTunes. However the expectations are much higher. Consequently some more critique:

Pandora is like the USA. Its the oldest “free” streaming music service that most people know. Its everywhere. It was amazing music to the masses when it was released…. 

However Pandora’s sound quality sucketh asseth compared to Mog and Spotify. Particularly Mog which is freakin outstanding. I offer you a simple comparison.

  1. Tune into Pandora to one of your favorite stations
  2. Take note of what song is playing
  3. Pause the song
  4. Sign up for Mog if you haven’t
  5. Play the song in Mog. Take note how you can select your song.
  6. Notice the amazing difference (which is considerably noticeable even with a Pandora One @192kbps account!)

So Pandora must suck right? NO NO NO. Pandora’s automated Music Genome or whatever they call it works for 90% of the population (personal anecdotal qualitative analysis) and is still the best Music Discovery. Mog “Artist Radio” comes no where close. If you have no idea what you like or are not a super music lover I seriously recommend using Pandora or Rdio first. Pandora helped me find what I liked and saved me from screwing with playlists and whatnot. Really. The people who bitch that Pandora plays the same stuff over and over are just too lazy to make another station. That being said Rdio is also has fantastic music discovery.

Mog is kick ass because of its music quality is CD quality, albums selection, semi-descent music discovery, mobile music download (good for airplanes). Annoying audiophiles will claim its still not good enough but it really is pretty much 16 bit 44khz which is what most music is still recorded at. Any better and you really really need a good sound system to notice. What I like best about Mog is it seems its trying to optimize for audiophiles and they seem to be getting better much quicker than spotify…. I hope they do.

(via kluverkamp)

Feb 16

Fixing Spring’s Default View Resolver

Most Spring MVC applications use org.springframework.web.servlet.view.UrlBasedViewResolver

This view resolver allows you to redirect with the prefix “redirect:” thus you can do something like:

	@RequestMapping(value={"/doc/api", "/doc/api/"})
	public String apiDoc(ModelMap model) {
		//some logic
		m.put("hiddenStuff", "blah blah");
		if (success) { return "myview"; }
                else { return "redirect:/doc/api/index.html"; }
	}

This will redirect to http://host/doc/api/index.html?hiddenStuff=blah%20blah . This is probably not what you expected and also seems rather dangerous that its attaching model attributes as parameters.

Below is a fix and some enhancements for this annoying problem:

This view resolver allows you to redirect with out attaching the model attributes with redirect-no-model:. I have also added a way to do a permanent redirect (301) with redirect-permanently: instead of 307. You would use this if you refactored a public URL for SEO purposes.

Feb 08

The problem is Marketing and We can Solve it!

We need more customers.
We need more sales.

We are tired of the fly-by-night loyalty programs.
We are tired of social trickery discount solutions.
Tired of the Amway-Ponzi referral schemes.
Tired of the Groupon phone calls.
Tired of being taken advantage of.
Tired of making our customers mad.

We know what the problem is. Its marketing.
Its not a new problem. Its an old problem.
Its time to do it the reliable way.
The way our parents, grandparents and ancestors did it:
By getting our name out there!
By reminding customers how much we offer!

We know we need marketing. We know we need to sell.
We need better tools. We need better guides and continuous education.
Because marketing is ever-changing. What works today may not work tomorrow.

We know something big is coming.
Its the mobile revolution. Every person in the world will have a mobile device.

Its time for us to put back on the gloves and get back in the fight.
Its time to do what we do best:
Pick the right people and the right resources to drive business.

Its time for better marketing.
Its time for SnapHop.