Hooking Bitbucket Up With Jenkins

Seh Hui Leong

Programming

Previously I’ve blogged about automating Hyde deployment with Jenkins and I’m prety much hooked with the idea of doing automated deployment and continuous integration in the future.

Now as much as I loved Github, Bitbucket is where I store all my private repository at — after all, you can’t beat the notion that it allows you to have private repositories even with free accounts :). So, with my blog stuff hosted at Github and my other stuff hosted with Bitbucket, some configuration changes are needed.

After reading the documentation and some trial and error, here’s how you would hook up with an secured instance of Jenkins:

Setting up a secured Jenkins instance

  1. To setup up a secured instance, click on “Manage Jenkins” and then “Configure System”
    • Under “Access Control > Security Realm”, select the …
Continue Reading (618 words, 3 minute read)

Developing Hyde Templates - Part 1

'Just Me…' by Jerry, Flickr

Seh Hui Leong

Programming

Let’s see… it’s been close to three weeks I’ve migrated this blog from Wordpress to Hyde. And ever since then I have been constantly fixing bugs in my template.

Let’s run down the commit history and show you some of the lessons that I’ve learned along the way :).

[Note: I’ll be referencing my own template]

Multiple Layouts with Template Inheritance

For my site, I needed two different layouts that shares the same base design: a two-column layout for my blog and full page layout for other static pages.

This is easily achieved by using template inheritance using the extends feature. In my current template, you can refer to the following three files:

  • layout/base.j2 — The overall site design, acts as base template
  • layout/blog.j2 — (child template) The …
Continue Reading (769 words, 4 minute read)

Workflow And Tools To Maintain a Hyde Blog (featuring Jenkins)

Seh Hui Leong

Programming

Having switched my blog from Wordpress to Hyde, my blogging workflow now looks something like this:

  1. Write the blog post in Markdown format
  2. Run it through a Markdown previewer to make sure it’s formatted the way I intended
  3. Attach the metadata to the finished post
  4. Create the appropriate directory structures if it doesn’t exists (I’m now organizing the post with each month having their own directories, like /blog/2012/01/) and copy the file into that particular folder
  5. Push it to Github to backup my work
  6. Run it through hyde gen to have the site generated
  7. Once the site is generated, rsync the directory into the server

Now, writing a blog post is already a laborious process in by itself and having to go through the menial and boring workflow like this …

Continue Reading (941 words, 4 minute read)

Recovering From A Long Outage

'The Clean Up!' by One Hell Of A Loser, Flickr

Seh Hui Leong

Programming

The whole ordeal started a month ago when my server decided to have temper tantrums and PHP and Nginx just mysteriously decided not to talk to each other again. And with that my Wordpress blogs are taken down with it.

Ouch.

Stress levels rising at an inopportune time when my workload was at an all time high. And it was additional salt rubbed on the injury as I was still scrambling to salvage deleted data from the only backup drive that I have. I totally don’t want to get into specifics, it’d probably stress you out as well.

Then again, I’ve had enough dealing with PHP so that makes the perfect time to migrate my blog away from Wordpress to Hyde - a static site generator. Yes, you read me correctly, it generates …

Continue Reading (474 words, 2 minute read)

Restyling Yahoo! Mail Beta

Yahoo Mail Beta Minimalist Design

Seh Hui Leong

Programming

'Yahoo Mail Beta - Before'

Yahoo! Mail just launched a beta for their latest user interface, which looks like the screenshot above. I have to say that I kind of liked the new skin but the heading just looks awful in my opinion: it’s too large, too loud and, honestly, pretty useless. With such a loud purple and a lot of whitespace, they are a complete distraction and annoyance when I’m reading emails.

So I took matters in my own hands and made some restyling tweaks to really make the heading compact, and the result were way better than what Yahoo does (in my own biased opinion :-)):

'Yahoo Mail Beta - After restyling the heading'

I took away the Beta badge, latest trending topic, the button to Yahoo’s homepage and the Search Web button as they didn’t really serve any utility to me and …

Continue Reading (178 words, 1 minute read)

Why Setting Deadlines for Yourself is a Bad Idea

Seh Hui Leong

Reflections

'Feeling Gray' by Seh Hui

Before starting the project:

Got a great project idea, feel really pumped up about it and getting ready to make that first dash.

Read Seth Godin’s Linchpin and liked the ideas that linchpins ship. Decided to follow Seth Godin’s advice of setting a deadline and ship no matter what.

“Let’s make something out next week then! Just this small tiny feature will do.”

Feel good about being so decisive and get to work.

One week later…

Staring at bits and pieces of stuff that has been hacked together. Everything seems to only barely being able to support itself while it wobbles around like jello. Worse, it does practically nothing while all it does is just taking space.

There I was: dejected and frustrated, staring blankly at the piece of junk that’s …

Continue Reading (562 words, 3 minute read)

Going Through Rough Seas

Seh Hui Leong

Art

'Rough Seas' by Seh Hui

Have been going through a rough patch for the past two weeks, and it’s comforting to see the first milestone among many that guides me towards the destination.

For two weekends I have worked on a new feature for Mutual Tracker after a year since it’s inception. It was a rough ride considering how much stuff that I had to learn about PDF parsing and scraping data off ASP.NET pages.

I still have yet to tie everything together and delivering them live. Hopefully I could achieve it by next week. Take it as a publicly announced deadline that I had set for myself.

Speaking of development, I have tons of fun with my iPad and even more recently the Kindle 3. Having too much fun, perhaps. By physically interacting with the device …

Continue Reading (228 words, 1 minute read)

Not Any Price Would Do

'The Price Tag from My Brown Suede Jacket' by abbyladybug, Flickr

Seh Hui Leong

Life

Just recently I took up a simple freelance project, which involves interfacing with a USB camera. Considering the fact this is my first programming related project and having no prior work to base on, I took the naïve approach by using a rough mental estimate on effort and difficulty and then picking a number that sounds just about right based on that mental exercise.

As soon I started this virgin project of mine, I realize one critical thing that I had overlooked: The work involved is not just the programming, but also making the initial setup to my development and testing environment. The mistake of my oversight is made more pronounced by the need to interface with a specific piece of hardware – I’m nastily surprised when Windows 7 crashes spectacularly due to the driver …

Continue Reading (371 words, 2 minute read)

Duplo Programming

'Duplo' by Jeroen Kransen, Flickr

Seh Hui Leong

Programming

Five years ago, I just stepped out from university and immediately transitioned into my first job. It was a time when I’m brimming with youth and confidence to a point close to being boastful (and I wasn’t arrogant at that time). It’s a time full of dreams and unfounded ambition, which I would gladly tell friends that one day I’m going to write a great application which people would use. Even better, I’ll write a framework or a content management system that people could reuse and implement.

Five years later, my accomplishments: nothing. Zip, nada, zero. Talk about not being able to live up to my own expectations.

Despite programmer’s tendency to be optimistic and believes that all problems could be solved using a computer, there are lots of …

Continue Reading (479 words, 2 minute read)

CakePHP 1.2 Documentation in PDF

Seh Hui Leong

Programming

Just recently looked into CakePHP as well, as I find it to be one of the easier to use MVC frameworks for PHP and that the manual is really well written.

And, as usual, I do prefer to have offline documentation so I don’t have to find myself paralysed when I’m developing on a computer without an Internet connection (which is also a good way to cut off distractions :-)). Luckily, CakePHP does offer such a means by giving an option to view the whole manual in one page.

One gripe though: printing the page itself sucks: The text so small it’s kind of unreadable and I couldn’t tell the headings apart from the text. It’s really annoying when I wanted a few printed pages so that I’d refer to …

Continue Reading (230 words, 1 minute read)