Funky world of Juha

Bizarre and funky world of Juha

Git hooks: Pre commit & grunt January 28, 2013

Filed under: Frontend,git — juhq @ 4:07 pm

I’ve found the powers of git hooks recently. There are multiple hooks, for local client and for server. These will save you a lot of time and money when used properly.

 

In this article, I’m going to talk a bit about pre commit hook, which I’ve found to be the most important for my work.

Pre commit hook will run any command you want, before each commit. You can automate tests, do validation, building etc.

This should usually prevent you from pushing bad code to the server.

 

Hooks can also be set to the server, for example pre-receive hook, which you can command to run the same grunt for each push. This has the downside of not preventing bad code from being pushed to the server.

 

 

But let’s talk a bit about pre commit with grunt.

 

First, you’re going to need to install grunt

$ npm install grunt

Then set up your git hook

$ nano .git/hooks/pre-commit

To run grunt against your project on each commit, simply copy&paste the following code.

#!/bin/sh
grunt
if [ $? -ne 0 ]; then
 echo "Grunt failed, please fix code and recommit"
 exit 1
fi
exit 0

Now add grunt.js file to project root folder, with the following basic configuration.

module.exports = function(grunt) {
  // Project configuration.
  grunt.initConfig({
    lint: {
      all: [
        'grunt.js',
        '**/*.js'
      ]
    }
  });
  // Default task.
  grunt.registerTask('default', 'lint');
};

On each commit, git will now automatically run grunt against your codebase. For this example, I’m only using jslint to catch coding errors.

Grunt is a powerful tool which has over 300 different plugins, you can run automated tests, build your project, minify/uglify codebase, deploy your code to Amazon S3 and much, much more.

If your code is fine, the commit will continue as normal, but if your code has some issues, the hook will prevent you from committing bad code, which could break your project.

If your code passes, you should see something like this

Grunt ok

If your code has issues, you should see something like this

Grunt fail

More about hooks: Git hooks

Get grunt: Grunt

Advertisements
 

Lead UI/UX Developer – Helsinki May 6, 2011

Filed under: CSS,CSS3,Frontend,Jobs,jQuery — juhq @ 9:26 am

Company Description
DealDash – Social Game-Shopping is looking for their Lead UI/UX Developer. DealDash is an extremely fast growing high-tech startup based in Helsinki and Silicon Valley. Our mission is to make shopping fun through our innovative game-like auction model. With currently more than 150,000 registered users in the US and a dozen servers DealDash has a constant need for increasing scalability and performance. With several upcoming patents; innovation and creativity is a key driver in DealDash´s ongoing product development.
Job Description
Create and direct exceptionally great user experience design according to user-centered design principles.
DealDash, a social game-shopping company is looking for an exceptionally brilliant user experience expert. DealDash´s vision is to revolutionize the entertainment shopping market and to become a market leader. In order to do so, DealDash must provide the ultimate user experience for its users. DealDash combines social gaming with e-shopping.
– As UX lead you will be fully responsible for both the web design and user experience by DealDash users.
– You will be responsible for conceptualizing, planning and executing the entire user experience process at DealDash. This includes, user research and analysis, interaction planning, requirements definition, web design work, graphical and front-end HTML/CSS and jQuery.
– Creating project deliverables that clearly and persuasively communicate the UX strategy and the reasoning behind it. These deliverables include: project plans, discovery findings, research protocols, research findings, personas, task lists, workflows, wireframes, page maps, interaction and behavior specifications, and anything else required to describe UX plans and strategies. Creating these deliverables to Method specifications and within described project timeframes.
– Present concepts and facilitate brainstorm sessions.
– Work closely with the developers and other team members at DealDash – advocating for the best design for the end user.
– Staying abreast of industry best practices for UX design and processes, and for any project, gathering sufficient information to support appropriate UX design for the given platform and technology.
– Design graphics for web design, create clean HTML and CSS, jQuery

Qualifications
– Proven experience leading the UX practice on projects.
– An exceptional portfolio showcasing innovative design solutions.
– 7+ years experience designing workflow, interaction and UI for large-scale, web applications (B2C).
– Extreme obsession to detail. You must be able to work very well with both the big picture as well as the nitty-gritty details.
– BA or MA in Interaction Design, Cognitive Science, or HCI, or equivalent experience.
– Expertise in human interface guidelines, standards, and best practices as they apply to platforms.
– Effective communication skills (both in conversation and in writing).
– Ability to work with technology experts to uncover and understand technology requirements and capabilities as they relate to design deliverables.
– Use appropriate software (e.g., Adobe InDesign and Adobe Illustrator or OminGraffle) to create professional-quality, well-designed deliverables, to Method specifications.

Additional plus:
– Understand game mechanics and what brings fun and excitement into social gaming applications.

Why you should join?
DealDash is run by a small team of passionate, driven entrepreneurs with a vision to transform, grow and become the US market leader in social game-shopping. We are venture capital backed and based in Helsinki, Finland and Sunnyvale, California.
If you are driven, committed to excellence and obsessed about details then we are looking for you.
If you want to create the next-gen platform for game-shopping then we are looking for you.
Location
Development team is based in Helsinki, Finland. Work can be done remotely
Compensation
Salary and potential for early stage equity through stock options.

Apply here!
http://bit.ly/lHG2Et