Jourdein

I code, I experienced, I blog and I share my enthusiasm

RSS
people

I tried Git

images-1.jpgCurrently, I hosted my repositories with XP-Dev that utilize Subversion as it’s source code management system (SCM). Hearing a lot of hypes about the Git, I did try setting up a git account at Project Locker.

images-3.jpgYep, it seems that Git is really is an advance SCM. It has a lot of features. What differentiate it from Subversion is it’s decentralize repository system. Rather than recreate the post, you can read it at Why you should switch form Subversion to Git.

images-2.jpgOn Mac, if you’re using git, there an open source Git UI called GitX. It trying to utilize the advance features in Git producing such an interface. You have a history graph which I’ve never seen in Subversion UI yet. After you commit, you can see which file and which line has been merges/changes rather than executing command diff.

When you first checkout, you are cloning form the main repository. Thus, when you are in offline mode, you can still commit or revert to previous revision. When you online, push it the server and it will merge with other repo.

Frankly, I would love to convert to Git but project-wise, Subversion can still do what Git can do since my project is not so big and with small team. Moreover, Git is complex because of features it has while in Subversion, I just need to commit or update and does not worry about commit, push and branch merging etc.

No Comments | Tags: , ,

Software Is Hard

Developing software is hard. Below is an article form August 19, 2007.

Software is hard

Really, developing software is hard. If you want all those nifty features, biasing to certain framework because it’s the best, feeding your preference for certain os and without final decision. Yes, if all of those are free then go for it. In reality, those are cost. What languages you gonna use and how many developers you have? What are their expertise?

Some need to be compromise in order to benefit others or to maintain balance.

No Comments | Tags: , ,

Submitting app to App Store

images.jpgReally… it was really a tricky tasks making sure that your app is codesign correctly and Apple website accepted your app. As I could remember, I repeat myself more than 7 times doing the same thing, making sure that I did the steps correctly or when changes require you to start from the beginning.

In a simple understanding flow of process, you need to:

1. Create a request for certificate
2. Install the certificate
3. Create App Id
4. Create Provisioning profile
5. Download Provisioning profile
6. Setting XCode to CodeSign using the certificate.
7. Get the binary file, zipped it and upload to Apple website.

So, your target is to get the binary file (.app). That .app file must be signed by XCode using certificate given by Apple. The signing process also requires that you have a valid provisioning profile which you get from Apple, generated from the certificate you’ve requested.

No Comments | Tags: , ,

ForkLift 1.7 crashed on Snow Leopard

forklift.pngI’ve install ForkLift 1.7 and suddenly, it crashed. Examining the report that is supposed to be sent to Apple, I found that, ForkLift is trying to access some of the files that aren’t there.

Googled and found that the files has been placed under a different folder in Snow Leopard. Logical thinking, the files are there but ForkLift doesn’t know where they are.

Found a fix that restore those file references by creating symlinks:

sudo ln -s /System/Library/Frameworks/AppleShareClientCore.framework /System/Library/Frameworks/AppleShareClient.framework
sudo ln -s /System/Library/Frameworks/AppleShareClientCore.framework/Versions/A/AppleShareClientCore /System/Library/Frameworks/AppleShareClientCore.framework/Versions/A/AppleShareClient
sudo ln -s /System/Library/Frameworks/QuickLook.framework /System/Library/PrivateFrameworks/QuickLookUI.framework
sudo ln -s /System/Library/Frameworks/QuickLook.framework/QuickLook /System/Library/Frameworks/QuickLook.framework/QuickLookUI
sudo ln -s /System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook /System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLookUI

Run the above commands in terminal. If you have problem copying and pasting, download it here. Execute the file from terminal either by

$ ./fixsymlinks

or

$ source fixsymlinks

From whom did I get the solution… Zolntanb (thanks mate)

No Comments | Tags: , , , ,

Google is phasing out Microsoft internet Explorer 6

ie6trash.png Google will begin phasing out support for IE6 and other older browsers on Google Docs suite and Google Sites editor on March 1. I’ve received the notices since I’m an admin for Google Apps.

Seems that, somewhere in 2010, Google Apps will continue to support IE7 and above, Firefox 3.0 and above, Google Chrome and above and Safari 3.0 and above.

Since Google has forgotten IE6, it would also be natural for me to forget IE6. My life would be easier developing website without worrying how it will render on IE6 or IE5.

Google said that they want to harness latest improvements in web browser technology and it would be HTML5 and faster Javascript. Google has their experiment on this technology and it was mind blowing experiences. And mind you, IE is not welcome there. It mainly targeted for Chrome browser but Firefox and Safari can view correctly but not IE (I’ve read some comments there about this). Head to Chrome Experiments to see for yourself.

No Comments | Tags: , ,

Updating a has_many relational model

has many relationship solution.png

Last night, found a problem in codes during updating form for a has_many relationship model. Rather than updating the record, it created a new one.

The solution is in railscasts episode 75.

Consider contact that has_many contact_email addresses. Created

def contact_email_attributes=(contact_email_attributes)
  contact_email_attributes  do |attributes|
    contact_emails.build(attributes)
  end
end

Changed to this one:

def contact_email_attributes=(contact_email_attributes)
  contact_email_attributes.each  do |attributes|
    if attributes[:id].blank?
      contact_emails.build(attributes)
    else
      contact_email = contact_emails.detect { |e| e.id == attributes[:id].to_i }
      contact_email.attributes = attributes
    end
  end
end

that will updates contact_email if there’s :id attributes. Then, I need to add the :id inside the form as hidden_field_tag:

- @contact.contact_emails.each do |contact_email|
...
= hidden_field_tag "contact[contact_email_attributes][][id]", contact_email.id
...

And that’s all. It’s done.

In the form, you could do fields_for rather than using _tag methods. In fact, my original code was using that but after I tried everything and it ended up with the _tag methods, I was lazy to change it back. By the way, it works both ways…

No Comments | Tags: