Rails Naming Convention

March 16th, 2009 . Posted in general.

Sometime I feel confusing when getting a switch back to code from one language to one language. From PHP to Javascript to ActionScript3 and RubyOnRails, I was confusing the style to code in each language sometime, especially with naming conventions. So, here’s a quick note of naming convention in Rails

Model Naming Convention

Table: orders
Class: Order
File: /app/models/order.rb
Primary Key: id
Foreign Key: customer_id
Link Tables: items_orders

Controller Naming Convention

Class: OrdersController
File: /app/controllers/orders_controller.rb
Layout: /app/layouts/orders.html.erb

View Naming Convention

Helper: /app/helpers/orders_helper.rb
Helper Module: OrdersHelper
Views: /app/views/orders/… (list.html.erb for example)

Tests Naming Convention

Unit: /test/unit/order_test.rb
Functional: /test/functional/orders_controller_test.rb
Fixtures: /test/fixtures/orders.yml

hope not to confuse again :-/
Technorati Tags: , ,

Little update of the first meeting toward Barcamp Phnom Penh 2

March 9th, 2009 . Posted in Event.

It was last Saturday 07 of March, 3pm at T&C World Paster (Street 51) we had our first meeting about our next Barcamp Phnom Penh.

As there was thread started in the Barcamp Phnom Penh list about the Next Barcamp, there’s quite some people are interested in joining to make the event happen while the rest i think might also ready to join. Our first meeting was running quite well, 3 hours talk — kinda long, among 4 people me, @chris, @darren, and @paul from ECCC, few others cant come as they’re busy. We’ve talked around things that was happened at previous Barcamp (So many thing actually, but we sum mostly) and what’s the next one should be.

We were actually trying to figure out the date of the Event, but cannot decide as we seem finding a bit difficult to find the right venue. Some have suggested to use the previous one, CJCC, but it just doesnt work well; we prefer a new place, and some possible on the list maybe:

1. Somewhere behind Phnom Penh Center
2. ITC University
3. RUPP

There are what we can think of. Maybe you can suggest us more the better one for this kind of techie event/gathering?

There was also many stuffs that we have done at the first one. Mostly it’s done, so it’s much more easier for this second one to be organized.

So when will the Next Barcamp be? no answer yet! we’ll figure out on our next meeting. So for those volunteers who interested in making this event happen much better/bigger, please come to join us @t our next meeting, same time same place Saturday T&CWold Paster 3pm!

I might miss some point :-/ no time to review, cos off now! Comment for your ideas.

Forgot to wish you ClogHers

March 9th, 2009 . Posted in general.

On the best occasion of the International Women’s day yesterday, I was kinda busy at home doing all de house works haha (tha leng te) It was offline works that keeping me busy. Havent got time to cheer/wish to our greatest women bloggers in our cloggers shpere.

So, here let me take this chance to wish you all the best and having great time, great achievements, great jobs and more happy blogging!

cheers!
khmerak

Way to the Next Barcamp Phnom Penh

March 7th, 2009 . Posted in Event.

It’s been half year now since the fist ever Barcamp come to Phnom Penh on September 20, 2008. Over 300 tech enthusiasts has been together in one day unconference style event to share and learn from each other. I am sure most of you now know what is Barcamp, not a place for dance or drink/girls (sipek srey ngi oun bong) like many bars in the city that everyone have thought when they first have heard. Until the day our first Barcamp Phnom Penh happenned, we’re all have clearly known that it is a great place/time to learn and share all things about technologies to social fun. I remeber some have told me that, Barcamp was great, especially everything is FREE! heheh…

Some of you that might still not clear about what it is, probably you missed the event, you can learn more at the global barcamp site, barcamp.org. You will notice that Barcamp is happening everywhere around the world! And if you zoom a little bit to see in South East Asian countries, you’ll see

And there’s maybe many more will happen to every cities where Geeks live.

So, some of you might ask, Will we have our next Barcamp Phnom Penh? and i would say, the answer is Yes or No according to the community of you yourself, Barcampers. Because Barcamp is not own by anyone, it’s own by everyone in the community of tech enthusiasts, so if the community want the next one they’ll have it, if not, then the Barcamp will disappear. This mean that to make the barcamp happen, we need a lot of supports, a lot of volunteers, a lot of help from everyone. We have to share a lot of our busy time to participate, to join/share so that it could heppen.

But, what’s the benefits for you to join making it happen? It might be nothing, if you do nothing and someting if you do something. Because it’s a Free event, everything is free, the benefits is everywhere, you can get it as much as you want. However, it’s kinda volunteering work for the community if you like it you do, if you do not, you dont. (Ponte, mok luy pek men kirt te. Think to make it for fun :)

Well, anyways, just want to give you an alert that we are on the way to our Next Barcamp Phnom Penh. The first ever meetup among barcampers who want to make this happen is today Saturday 07, 2009 at 3:00pm, T&C World Street 51.
So, join us if you like the event and want to share how you want the next event to  be like.

I will keep you post on udpates about the event. But, share me back how you think it should be!

cheer, Barcampers!

Google Analytics and Google Ana1yticz

March 6th, 2009 . Posted in general.

There was a scary strange thing happening recently on one of my website which was unexpectically happening that way.

The site was down! OMG, it’s nightmare time again! I thought it maybe was my colleague updating some wrong scripts onto the site and upexpectically making the site stop working, but after a while checking all the possible causes that can put the site down, i have found that the code was exacully changed but not look like not by the person. The files with name “index” and “default” were added by a strange code, and some were duplicated the entire code and added at the bottom of the file with the following stuffs:

Strange huh? it looks like a google analytics code that i use in the index of my site’s homepage to track the site’s traffic, but actually it’s not, it’s a fake Google Analytics.

This is kinda site’s virus? entering by the google analytics code to change all the index files in every directories of the entire site. Indeed it works like a virus! So to solve this, i have edited and removed all those strange codes so the site is working back to normal. But so sorry cause i have to remove Google Analytics code too :(

Still wonder, how could this kind of stuff entering to change the file on my server? Maybe the file is world writable? But, it’s not because all files on the server is 644 (world is not writable).

Have you ever seen stuff like this?