Arif Widianto musings on development, design, and craftmanship

Building OS X Apps With JavaScript 

My first thought, it's an interesting idea. It could have lot potential to many web developers out there to try to tap into OS X apps. I think if someone in future come up with a framework for this, it could turn into something great forward. Just my thought. I could be wrong if not really excited about this. Let's see how this will wrap up in the future. (Via Mike Gunderloy)

Top 10 Essays Since 1950 

If you crave for non-fiction reading pleasure, here is a chance to refill your Instapaper list. See Robert Atwan's full list and a few of his choices. (Via Kottke)

The Best You Can Make It 

From the previously linked website:

So it just has to be the best you can make it. You put all the best stuff into it so you can get the best out of it, and get your price or don’t sell it.

This is what craftmanship are all about.

The Distance 

The Distance is website that publishes stories about hard-working, long-lasting businesses and the people behind them. That from their tagline, and I think they really meant it. Formatted as an internet magazine. Beautifully designed. The illustration adds some level of enjoyment to the reading experience, which is already fulfilled. The website brought by Basecamp.

RubyMotion New Renewal Pricing 

RubyMotion just announced their new renewal pricing, after the long awaited Android support is now fully emerged. RubyMotion lets you develop full-fledged native apps for iPhone, iPad, Mac and Android (still in beta), using Ruby language, all of this toolchain would be sold as one unified product, you have to buy license for $199/year to use them. If the license expired and you need an updates, you have to pay full renewal price.

The pricing model seems simple and fair. I think it's affordable. I have a high hope their business is sustainable. I would consider to purchase one if I need to jump into Android wagon.

iPhone Camera Evolutions 

It's amazing seeing how the smartphone camera turning like in this presentation. Even today, me and wife decided we didn't buy a new 'real' camera. We'll happily maxed out the only iPhone 5c as our main camera. That alone is worth than the price we paid for the iPhone.

Kudos to the creator, the website is fully featured, like we able to see each photo detail by hovering then clicking it, and it's beautifully designed.

Full-text WWDC Transcripts 

For you out there who develop iOS apps, this is tremendous. Other than it helps people who not able to catch the fast spoken English, it definitely help discovering WWDC sessions by easily search there by topic, technology, etc.

Really useful.

Never Name a Field With "_change"

Three days ago I worked on a rails project. The fact is, I'm new to rails. Sure, there're many trial and error, but I knew coding is like that, and then I have no big problem. Except for the error on that day. I actually faced the error for couple of days. Headache. Bump.

Really, what's wrong?

I was working on a data retrieval, in rails it's called active record. I added a new field for capturing calculation result from the other fields, so I called the field price_change (note the _change here). I filled some values. I tried rails console. I tested loading some data, it prints in the console. Let's say I call the data to a variable named stuff. Then I wanted to manipulate the price_change of that stuff, and it turns out I got a 0 (zero!). It's totally different number than real number on the database. I tried to solve for couple of days, tried google, stackoverflow, I have no luck. What's wrong with my code?

The Solution

Fortunately, I stumbled upon to this site, Reserved Words in Ruby on Rails. Gotcha! Tough there is no reference to _change, but I think I knew something.

A something_change method will be created to every activerecord fields, It serves as a hook as well as capturing field behavior. If I have a field called price, rails will create price_change automatically. Then, yeah, I had a field called price beside the price_change. I finally proved this via simple .inspect and .methods from the particular object.

Lesson learned.

Other tips

  • Always check the method names carefully
  • Always look yourobject.inspect. And, every things in ruby is object. So be careful, and have fun.
  • And finally, take a look at the object.methods method.
  • Always check documentations.

Have a nice weekend. Happy coding!

iOS 8, Rails 4.1.6, iPhone 6 & 6 Plus 

Many things released this couple of days.

iOS 8 released for public use today, last night to be precise. I updated many apps on my iPhone. I deliberately don't plan to upgrade the iPad 2, because I need to use it as our iOS 7 device testing. I decided not to upgrade to CloudDrive, for now, since I don't have Yosemite installed on my 2011's MacBook Pro. It seem seems no use, at least for now.

Meanwhile, Rails gang released 4.1.6 and 4.0.10. It just a bug fixes.

And lately, the iPhone 6 and its sibling, the big iPhone 6 Plus, shipped to most countries. The third world citizen should be more patient. I don't plan to upgrade for this big iPhones. I think my old iPhone 5c would suffice for our development purpose.

Jekyll 2.4.0 Released 

Many great additions introduced, several that I liked:

  • Auto watch by default!
  • Support for CSV file in data. Data and collection, have to learn this soon.
  • File new filters: push, pop, shift, unshift, inspect and slugify. More power to the templating system. This is why I like Jekyll ;)

Read more at the 2.4.0 release notes.