Questions That I Asked to Myself When Writing Codes

Lately, I’ve been involved intensively in Test Driven Development environment. Which is great! I’ve been waiting to have this experience of writing codes with clear standard. However, there’s no such thing of perfection (maybe I can talk about this later), but I give my highest respect to this new experience.

This cause some changes in how I write codes, to be precise, my attitude towards software development. So, there are more questions in my questions list, which I need to answer one by one, from the beginning of writing codes until the end. These are the complete questions:

  1. What’s the story?
  2. What am I suppose to do to solve it?
  3. Have I pulled new revisions?
  4. Do I need to create new branch?
  5. Do I need to write behaviour test?
  6. Do I need to write view test?
  7. Do I need to write controller test?
  8. Do I need to write model test?
  9. Do I need to write lib / other test?
  10. Do I need to write javascript test?
  11. Have I completed the story?
  12. Do I need to refactor?
  13. Do I need to extract the codes?
  14. Have I tested all related codes?

Those 14 questions are mandatory, in order to make sure that I always deliver quality codes.

Anyway, there’s other big question which should be asked in the very beginning.

Do I need CI?



Insert Post to Wordpress via XML-RPC

Hello programmers!

I can’t count the days since the last time I added a post to my blog and here I am with a new post. This is about WordPress and XML-RPC.

Several days ago, I made a huge and gigantic mistake to the company’s server. I formatted the disk. Oh my God! How dumb I was for not reading the instruction thoroughly. The consequence, I erased some critical scripts which had been used to pull content and saved it to the database. Fortunately, I didn’t erased any critical data. Well, there will always a bright side in every trouble, right?

So what did I do? Of course, I rewrote the scripts. Those scripts are not mine, but at least, I get the logic of it. It’s actually read some XML files, parse it, insert it to a WordPress database through XML-RPC, and delete all the XML files. Easy right? Continue reading “Insert Post to WordPress via XML-RPC”

Plain Text Reading and Processing with NodeJS, Ruby, and PHP

Hello coders!

There was a time when I wondered, which one has better performance, NodeJS, Ruby, or PHP? And I decided to make a little test. I didn’t think this test would conclude overall performance, but specifically for this context, I would know which one was the best. The test were divided into 3 phases, they were: preparation, result, and conclusion. I hope my little research here will help you in your development. And for your information, this test is using NodeJS (0.8.9), Ruby (2.0.0p0), and PHP (5.4.17). Continue reading “Plain Text Reading and Processing with NodeJS, Ruby, and PHP”

Learning Devise for Rails is Out Now!

It’s very exciting for me to announce that my very first book is out! Actually, I’m not the only author in this book, there are Giovanni Nugraha and Nia Mutiara whom I collaborate with to produce this great book. This book is about using devise in your rails application. It will helps the reader to start with devise, apply some customizations, add privileges, make remote authentication, and tests. So why wait? Go to the book website and make an order!

Learning Devise for Rails Continue reading “Learning Devise for Rails is Out Now!”

Capture Your Site with PhantomJS

“Hey! What kind of stuff is PhantomJS?”. This could be the first time for you to hear or read or use PhantomJS, but for you guys who don’t, you still can read this article, because I still need your traffic (kidding).

PhantomJS is a headless WebKit scriptable with Javascript API.

So, what does “headless WebKit” mean? It’s like a browser (WebKit based browser), but without the GUI. So, you can use many kinds of WebKit functions in your own scripts. Then, you may ask “what is it used for?”. PhantomJS is used for headless website testing, page automation, network monitoring, and page automation.

The reason I play with this stuff is because I had a simple idea that capturing website automatically. People just give the URI of the page and the application will get the screen shot of it. Then, it can be shared or organized by that person. At first, I thought that I was going to have a tough journey to get thing done, fortunately I wasn’t. Continue reading “Capture Your Site with PhantomJS”

Paint on HTML5 Canvas with KineticJS

Paint on Canvas at Clodeo Lab
Paint on Canvas at Clodeo Lab

This idea came up when I needed to add new feature at clodeo. The basic idea was to improve current meeting room feature. The feature currently can only be used as a chatting room with manageable room, but in fact, chatting feature is not enough. I need something which can handle visual process like painting, adding image, or resizing image and that’s why I started this research. A virtual “white board” which is complemented with chat board, so users will be able to coordinate with other team remotely, for sure. Continue reading “Paint on HTML5 Canvas with KineticJS”

A Story About Clodeo – A Simple Project Management Application

One day, there was an idea that came up in my mind. The idea was a simple application that works for project management. I knew it was a “red ocean” kind of an app, but I believed that with so many kind of project management apps I would still have a market. So the story began…

I built it with Ruby on Rails, MySQL, and Bootstrap. I developed some simple features that covered project management and issue or task management. After several weeks, I finished the application, named it with wirapm as the code, and deployed it at the office to help us controlling what we were doing with our project. Unfortunately, I was the only who use the application. It really helped me to know where we were in our project, but I thought I could add more feature. So, I got an idea to add a feature for users to write about anything and they can share it to other users or not. Then, I developed the feature, I named it with journals, and I updated the app for the office.

This change gave me more reasons to use this app. The blog-like feature helped us to give daily report or share something new to others. And again, I still thought that I could scale the features and I got the idea about meeting room. I would like to make a virtual meeting room, so people which is not in the same location could have a small meeting. The concept was only a chat room where users are able to create their own meeting room and invite other user. So, I developed it in around 2 weeks with the help from nodejs and juggernaut to cover the websocket module. But, it’s not used at all.

So, what’s the problem exactly? Continue reading “A Story About Clodeo – A Simple Project Management Application”