Archive for the ‘personal’ Category

Barcamp Bangkhen #3

Posted on September 16th, 2012 in BarCamp, computer, CPE, in English, in Thai, personal | No Comments »

TO SPEAKERS: If I have FACTUAL ERRORS or OFFENSIVE MATERIALS within this entry, please contact me ASAP. I will remove (or correct, at your discretion) them at the first opportunity.

กลับมาอีกครั้งสำหรับบารแคมป์บางเขน การ(อ)สัมมนานอกกรอบที่ทุกคนจะได้แลกเปลี่ยนเรียนรู้ซึ่งกันและกันอย่างเสรี แถมเสื้อฟรีให้เอาไปใส่ได้ไม่ซ้ำใครด้วยละเอ้อ!! ครั้งนี้ผมก็ไปเข้าร่วมมาด้วย และมี session น่าสนใจเยอะแยะเลยครับ มาอ่านกันว่าผมไปเข้าห้องไหนมาบ้าง!
Here we come! The third Barcamp Bangkhen, the very great unconference where people will meet and exchange, and get FREE SHIRT while we’re at it! I joined this time as well, and there are loads of great sessions! Let’s see which rooms I joined.

(หมายเหตุ ที่เรียกว่าห้อง “เด็กD” ผมจะใช้คำกลางๆ ในที่นี้ว่า “Auditorium” นะครับ // “Auditorium” will be used to refer to the “DekD” room )

Session 2 Auditorium: ทำไงให้เว็ปเร็ว ตอน เว็ปช้ามากเบยยย (Make web faster)

โดย/by @vinboxx / Download Slide

การทำเว็บให้เร็วด้วยเทคนิคต่างๆ เช่น minification, caching, การทำงานกับ query string และ unique file name, การใช้ content delivery network เช่น CloudFlare เพื่อทำให้เว็บเราเร็วขึ้น โดยเราสามารถเลือกการใช้ content delivery ของเราได้ นำเสนอฟีเจอร์ต่างๆ ว่ามีอะไรบ้าง (ผู้เขียนคิดว่า CloudFlare ก็น่าสนใจดีนะ ^ ^)
Web acceleration using techniques like minification, caching, minding query string and unique file name, using CDNs like CloudFlare to accelerate website and its customization. Features of CloudFlare are also explored.

ต่อมาก็พูดเรื่องเครื่องมือหรือ tool ต่างๆ เพื่อช่วยในการพัฒนาเว็บที่เร็วขึ้นได้ เช่น ใช้ PageSpeed Tools หรือ pingdom วิเคราะห์เวลาในการโหลดเว็บ หรือใช้ WebPagetest เพื่อวิเคราะห์เว็บอย่างละเอียดก็ได้ ว่า optimization สามารถทำให้เร็วขึ้นได้มากขนาดไหน อย่างไรบ้าง
Then the speaker talked about tools that can be used to aid web acceleration like Google PageSpeed Tools, pingdom, or WebPagetest to analyze website for possible optimizations. (i.e. where we went wrong and made the site slow)

Session 3 Auditorium: Google Student Ambassador

โดย/by GSA Thailand

แนะนำ GSA, ทริปสิงคโปร์และกิจกรรมต่างๆ แจกของ งานและหน้าที่ของ GSA
Introduction to GSA, the Singapore trip, and SWAG!

ขั้นตอนการสมัคร

  1. ส่งแบบฟอร์มออนไลน์
  2. สัมภาษณ์กับ Google มีการสอบข้อมูลทั่วไปเกี่ยวกับบริษัทในรอบเช้า และการสัมภาษณ์ในรอบบ่าย โดยใช้การสุ่มตอบคำถามที่กำหนดไว้ เน้นการตอบคำถามมากกว่าตัวคำตอบ
  3. รอ 2 เดือน ประกาศผล ให้ส่งเอกสารต่างๆ เพิ่มเติม

Application Procedures

  1. Online form submission
  2. Interview with Google consisting of “examination” and “interview”. Decision is made more on presentation and delivery than the answer itself
  3. Results are announced after two months. Qualified individuals will be required to submit additional documents.

การเป็น Ambassador จะมีอายุงาน 1 ปี
Ambassadors will remain in position for one year.

บทบาทและหน้าที่

  • ต้องจัดกิจกรรมประชาสัมพันธ์ปีละ 5-8 กิจกรรม ตามที่เราเห็นสมควร โดยจะมีของแจกจาก Google
  • เป็นช่องทางการสื่อสารระหว่างมหาวิทยาลัยกับ Google

Roles and duties

  • Hold 5-8 PR events per year at their discretion. Google supplies swag.
  • To be a channel of communication between the university and Google

ตัวอย่างคำถามรอบสอบ

  • ผู้ก่อตั้ง Google = ไม่รู้ก็…
  • ผู้ก่อตั้ง Gmail = Paul Buchheit
  • Google ซื้อ Android ปีใด = 2005
  • Google ประเทศไทย ตั้งอยู่ที่ใด = CentralWorld ชั้น …
  • อะไรคือผลิตภัณฑ์ของ Google ที่บ่งบอกความเป็นตัวคุณ = iGoogle

Example Questions from examination round

  • Google founder = (you know ‘em!)
  • Gmail founder = Paul Buchheit
  • The year which Google acquired Android = 2005
  • Where is the Google Thailand office = Somewhere in CentralWorld
  • Which Google product defines ‘you’? = iGoogle

Session 4 17304: Ruby on Rails

โดย/by Zack Siri / @artellectual

การพัฒนาเว็บด้วย Ruby on Rails การสร้างฐานข้อมูล platform ต่างๆ ที่เกี่ยวข้อง ฯลฯ Rails เป็น platform แบบ MVC (Model-View-Controller)
Web development using Ruby on Rails, database creation, platforms, etc. Rails is an MVC platform.

การสร้าง Controller จะมี convention ที่ชัดเจน คือเป็นกฎที่ชัดเจน เพื่อให้เราทำตามได้โดยง่าย โดยเราจะสร้าง Controller เองหรือจะให้ Rails ทำให้ก็ได้
Rails has specific conventions that must be followed. Controllers can be written manually or can be automatically created. Either way, they must follow the Rails conventions.

จากนั้นจะเป็นการสร้าง View ซึ่งจะบอกว่า controller นั้นจะแสดงผลออกมาอย่างไร โดย view จะต้องมีชื่อตรงกับ controller (ตรงนี้เป็น convention หนึ่งของ Rails) ทำให้การทำงานก็จะตรงไปตรงมามากขึ้น โดยเราสามารถที่จะใช้ helper method เพื่อให้เขียนเว็บได้ง่ายและเร็วขึ้นด้วยก็ได้ สำหรับตัวอย่างของ session นี้คือการสร้างเว็บฟอร์มง่ายๆ เก็บและแสดงข้อมูลได้
After creating model and controller it’s time for view. In Rails, view must have same name as controller. Helper methods can be employed for ease and speed. This session demonstrates simple case of web form creation that can collect and display data.

โดยสรุป ผู้เขียนก็ไม่ค่อยเข้าใจเท่าไหร่เหมือนเดิม เพราะไม่ค่อยคุ้นเคยกับ Ruby หรือ Rails ตั้งแต่แรก
I still don’t understand Rails much due to unfamiliarity with Ruby itself. Actually, I’m a bit familiar with Ruby, but I can’t figure out how to make websites out of them.

Session 5 17302: Methods of Payment: How we waste money on the Internet

โดย/by LunaticNeko / Download Slide

อธิบายองค์ประกอบที่จะนำไปสู่การใช้เงิน 5 ประการ (Product, Want, Money, Can Pay, Delivery) วิธีการคำนวณหาเงินที่ต้องจ่ายจริงจากราคาสินค้า ค่าส่ง อากรนำเข้า และภาษีมูลค่าเพิ่ม จากนั้นอธิบายถึงการจำหน่ายสินค้าแบบดิจิตอลและสินค้าเสมือน (digital and virtual goods) หนทางการหาเงินของเกมบน Facebook ว่ามาจาก 3 ทางหลัก ได้แก่โฆษณา โฆษณาแฝง และการจำหน่ายสินค้าเสมือนให้ผู้เล่น ต่อด้วยการแนะนำ Kickstarter ว่าเป็นแหล่งที่มาของธุรกิจที่จะนำเงินออกจากกระเป๋าเราด้วยนวัตกรรมต่างๆ มากมายในอนาคต
Describes the five components of spending (Product, Want, Money, Can Pay, Delivery), method to calculate how much one must really pay after shipping, import tariff, and VAT; describes digital and virtual goods sales. Facebook games earn money from three ways: advertisement, product placement, and virtual goods sales. Kickstarter is described as source of new businesses and innovations that can bring money out of our pockets.

ในส่วนต่อมา อธิบายการนำเงินออกจากกระเป๋าโดยใช้บัตรเครดิต หากไม่มีก็เป็นการสร้างบัตรเดบิตออนไลน์ผ่านบริการของธนาคาร หากไม่มีก็ใช้ช่องทางอื่นๆ เช่นบัตรเติมเงินของบริการต่างๆ หากไม่มีเงินจริงๆ ก็สามารถทำแบบสอบถามเพื่อแลกกับสินค้าเสมือนได้ ดังนั้น จะเห็นว่า แม้ว่าเราจะไม่มีเงิน ผู้ให้บริการก็ยังสามารถนำเงินออกจากกระเป๋าของเราได้อยู่ดี
In the next part, the presenter describes how to pay using credit cards, or debit if one does not have credit, or other payment methods like cash cards. If they really have no money, they can do surveys to earn virtual goods. This is summarized as “even if we don’t have money, they can still take it from us.”

ดังที่กล่าวไว้แล้วถึงองค์ประกอบการใช้เงิน 5 ประการ เราสามารถตัดองค์ประกอบตัวใดตัวหนึ่งเพื่อตัดการใช้จ่ายของเราได้ ทางที่ง่ายที่สุดคือใช้การควบคุมตนเองเข้ามาตัดความต้องการ (Want) ทิ้งไป โดยให้หลีกเลี่ยงการซื้อในขณะที่ความสามารถในการตัดสินใจลดลง การป้องกันไม่ให้ซื้อสินค้าในขณะที่ความสามารถในการตัดสินใจลดลง การปรับทัศนคติที่มีต่อสินค้าที่ล่อตาล่อใจ และสุดท้ายคือการลดละความต้องการทางโลก
As described earlier, if one of the five components of spending is eliminated, spending will not happen. The easiest way is to eliminate the Want by 1) avoid purchasing with impaired judgement, 2) prevent purchasing with impaired judgement, 3) change of initial attitude towards attractive items, and 4) reduce earthly desires.

จากนั้นผมก็แทบจะกลับบ้านทันทีครับ เพราะการบ้านเยอะ และมีงานต้องทำอีกหลายอย่างด้วย เช่นการอัพบล็อกนี้เป็นต้น
Then I left for home almost immediately due to many things to do, including homework and blogging.

บทสรุป / Conclusion

ขอขอบพระคุณ คณาจารย์ผู้รับผิดชอบกิจกรรม คณะวิศวกรรมศาสตร์ ผู้สนับสนุนทั้งหลาย ผู้ที่เข้าฟังการบรรยายของผม ตลอดจนวิทยากรทุกท่านที่ร่วมงานในครั้งนี้ และขอขอบคุณ น้องๆ ปี 2-3 ที่ช่วยกันจัดงานนี้เป็นอย่างดีครับ ปีนี้ผมคิดว่างานประสบความสำเร็จดีมากในแง่จำนวนคน แต่ยังมีข้อจำกัดเรื่องจำนวน “เซสชั่นเกรดเอบวก” ที่ยังมีน้อยเกินไป ทำให้ Auditorium ยังเป็นที่ของวิทยากรหน้าเดิมเช่นเคย
I hereby thank the faculty, the Faculty, sponsors, my audience, and all speakers who participated today. I also thank the Juniors and Sophomores who organized this as well. I think this year is quite good in terms of participation, but there’s still a lack of “A+ sessions” which results in the Auditorium still held down by the same old speakers.

แล้วพบกันใหม่ที่บาร์แคมป์ที่ไหนอีกซักแห่งครับ สวัสดี
See you again in the next Barcamp … somewhere! KTHXBAI!

อ้อ ขอบคุณ GSA Thailand สำหรับ Swag ด้วยครับ แต่ผมก็ยังไม่รู้ว่าจะเอามันเข้ามาใช้ในชีวิตประจำวันยังไง ขอใช้ขวดเก่าไปพลางๆ ก่อนนะครับ
Before I go, thanks GSA Thailand for the Swag. I still don’t know how to use this bottle so I’ll use the old one for a while. Thanks again!

[Kickstarter] DRAMA IN SPACE!

Posted on September 13th, 2012 in personal | No Comments »

โครงงาน HEARTSAT ที่ผมสนับสนุนไว้ผ่านแล้วครับ ผมตอบแบบสอบถามรางวัลไปแล้วด้วย
My backed project, the HEARTSAT, just got funded! This is my survey response!!

ผมยิงดราม่าออกสู่อวกาศเป็นที่เรียบร้อยครับ ชีวิตผมก็ประมาณนี้แหละ มั้ง
I just launched a drama into space. Yeah. This is my life. Probably.

หวังว่าผมจะไม่โดนติ่งอวกาศเล่นงานนะครับ

Skyrim Story II: Escalation

Posted on August 13th, 2012 in games, in English, nonsense, personal | No Comments »

After mastering my “home turf” at Woodland Home in the previous post, I took my Nord “multi-role” for another spin. This time we met a bunch of civil war combatants (Imperials vs Stormcloaks) fighting each other near Redoran’s Retreat. Since my doctrine is to “unify Skyrim my own way, one troop at a time”, I went ahead and Fireballed both sides, prompting them to go after me.

A minute into the fight I realized there were too many Stormcloaks than I could handle. I decided to run away to the nearby bandit-owned Silent Moons Camp. While the name says it’s a camp, it’s a stairtop forge facility with moderate bandit garrison. Hoping for Stormcloaks and the bandits to slaughter each other. I knew the Stormcloaks would win, but this will give me some breathing room.

My break ended when I heard a dragon’s cry. My duties as the Dragonborn forced me to come out and slay the dragon, whatever means necessary. The situation escalated quickly when two mammoths entered the battle area. I did what I have to do: kill them all. Lacking proper rage spells, I shot more fireballs at the mammoths, prompting them to fight. After a lot of running and slashing, the dragon landed and relieved many Stormcloaks of their heads before succumbing to combined forces of swords, spells, and stampede. The dragon died, and I killed all the weakened loose ends.

Result of battle:

  • Imperial units routed
  • Stormcloak rebels suffered too much loss due to dragon attack and had to leave
  • One dragon and two mammoths slain
  • Silent Moons bandit camp nearby suffered heavy collateral damage, no survivors
  • Someone just got a hell a lot richer

Now I try embedding an album from imgur, too.

Internship, Days 33-35 (6-8 Jun 2012) [END]

Posted on June 10th, 2012 in computer, CPE, in English, in Thai, personal | 1 Comment »


(Photo: A gift from Symphony, and my faculty-paper)

สำหรับตอนนี้เป็นตอนสุดท้ายของซีรี่ส์ฝึกงานแล้วนะครับ ขออภัยที่มาช้าไปเล็กน้อย เริ่มกันเลยดีกว่า

ในช่วงเวลาสามวันที่ผ่านมานี้ผมก็ได้ใช้เวลากับงานชิ้นใหม่คือการวิเคราะห์ข้อมูลจากอีเมล์ โดยอีเมล์จะให้ข้อมูลต่างๆ เกี่ยวกับระบบเครือข่ายมา โดยประกอบไปด้วยบรรทัดต่างๆ ในรูปแบบ <ชื่อฟิลด์ข้อมูล> : <ค่าของฟิลด์> ทำให้สามารถถอดข้อมูลมาวิเคราะห์ได้ง่าย

ผมก็คิดว่าใช้เวลาไม่น่านาน แต่ด้วยความที่ใกล้จบฝึกงาน ผมต้องเตรียมนำเสนอการฝึกงานทั้งหมด และต้องเตรียมเอกสารที่จะต้องส่งด้วย ไม่ว่าจะส่งไปที่ใดก็ตาม เช่น ใบเวลาทำงาน ฯลฯ จากนี้ผมขอแบ่งเป็นส่วนๆ ดีกว่า โดยแต่ละส่วนก็จะเป็นไทยอังกฤษสลับกันจะได้ตามง่ายๆ ครับ

This is the last episode in the internship series. Sorry for being late, let’s begin anyway.

During the three days I spent time with the new task analyzing data from emails. The emails have network data as <field> : <value> lines, which are easy to extract.

I didn’t think it would take time, but as the end of internship nears, I have to prepare the presentation as well as the papers to submit to matter where they are such as time record, etc. For this entry I’ll split into multiple parts, with Thai and English interleaving for easy reading.

งานชิ้นสุดท้าย / Last Task

ดังที่ได้กล่าวไป สำหรับงานชิ้นสุดท้ายเป็นการสร้างระบบคัดข้อมูลออกจากอีเมล์ ซึ่งจะทำงานบนฐานข้อมูลเดียวกับระบบแจ้งเตือนอีเมล์ แต่อยู่คนละบริบทกัน โดยใช้อีเมล์ชุดเดียวกันจริง แต่แยกส่วนการประมวลผลออก ทำให้ไม่ต้องเขียนระบบรับอีเมล์ใหม่

ปัญหาจากงานนับอีเมล์ก็จะตามมาด้วย ก็คือฐานข้อมูลที่ไม่มีคีย์หลัก เป็นต้น ซึ่งผมแก้ปัญหาโดยการสร้าง log มาเก็บไว้ว่าระบบของเราตรวจเมล์ไปแล้วกี่ฉบับบ้าง โดยจะไม่มีการตรวจอีเมล์ซ้ำไม่ว่าในกรณีใดๆ ก็ตาม ตรงนี้ทำให้เกิดข้อจำกัดมากมาย เช่น การไม่มีผลย้อนหลังของการตั้งค่า เป็นต้น แต่ช่วยให้เราตรวจสอบเฉพาะอีเมล์ใหม่เท่านั้น จึงไม่น่าช้าจนเกินไป

การเลือกเมล์ทำได้ตามผู้ส่งเท่านั้น ยังไม่มีการคัดกรองตามหัวข้อ (ซึ่งเป็นข้อจำกัด) และงานก็ยังไม่เสร็จด้วย ซึ่งถ้ามีโอกาสจะพยายามทำให้เสร็จ เพราะเป็นประโยชน์กับทุกฝ่าย

As introduced earlier, the last task consists of email data extraction which works on the same system as mail alerts, but on a different context. The emails will come from the same source, but processing will be separated so we do not need to build another database-inbox.

The no-primary-key problem from email counting task also carries over, which I fixed by building an execution log which keeps track of the last time we checked emails, and will never revisit older emails no matter the reason. While this makes the system relatively faster, it suffers from the non-retroactiveness of email inspection, i.e. if you change the email definition midway, old and new data won’t be consistent. (So it might be better to delete the definition entirely)

Email definition can only be done on a per-sender basis without per-subject separation. The work is not done, but I will try to finish if possible, as it only benefits everyone.

การนำเสนองาน / Presentation

วันที่ 7 เป็นวันที่นิสิตนักศึกษาฝึกงานจะต้องนำเสนอผลงาน ด้วยความที่ผมคุยกับพี่เลี้ยงไว้ว่าอธิบายงานตั้งแต่ต้นจนจบ (ความเป็นมา ความต้องการ โครงสร้าง กระบวนการ แสดงโปรแกรมถ้าเป็นไปได้ สรุปและข้อเสนอแนะ) และงานผมมีถึงสี่งาน (จริงๆ คือห้า ได้แก่ ติดตั้งเซิร์ฟเวอร์ ตัวเล่นวิดีโอ นับอีเมล์ ระบบ IDC และดึงข้อมูลอีเมล์ แต่อันแรกไม่นับ) ผมก็เลยกดไป 43 สไลด์ เวลาอีกเกินครึ่งชั่วโมง ในขณะที่คนอื่นใช้เวลาน้อยกว่ามาก โดยที่ผมแทบจะไม่ได้อธิบายความรู้อะไรเลย (ผมมองว่ามันเป็นแค่งานโปรแกรมมิ่งธรรมดาๆ คิดว่ากระบวนการสร้างโปรแกรมน่าสนใจกว่า) แต่คนอื่นๆ ก็มีพูดเรื่องความรู้ที่ได้ออกมาด้วย ผมก็รู้สึกแปลกๆ กับงานตัวเอง แต่ก็ดีใจที่ได้พูดออกไปว่าทำอะไรบ้าง

7th was the day the intern students present their works. Since I’ve talked to my supervisor that I will be explaining the work “from beginning to end” (reasons, requirements, architecture, implementation, demonstration, conclusion and suggestion) and I have four tasks to do (five actually: server installation, “vplay” video player, email counting, IDC system, and email data extraction but I won’t count the first)  and I ended up with 43 slides taking up more than half-hour while others used much less time; and I did it all without telling any kind of knowledge at all (I see my work as ordinary programming tasks so the process is more interesting than the code) while others presented more content and knowledge than I did. I felt awkward afterwards, but still happy being able to tell others what I do.

งานเลี้ยงส่ง / Farewell Party

งานเลี้ยงจัดที่ร้านเอ็มเค โรบินสันรัชดา เป็นหนึ่งในไม่กี่โอกาสที่ได้คุยกับเพื่อนๆ พี่ๆ คราวละหลายๆ คน ขอขอบคุณพี่ๆ ทุกท่านที่มาเลี้ยง และขออภัยที่พวกผมกินเยอะนะครับ

The party was hosted at MK Restaurants, Robinson Ratchada. This was one of the few moments I get to talk to many friends and seniors at once. Thank you very much, and sorry for over(-the-budget)eating.

เคลียร์เอกสาร / Final Paperwork

การจัดการเอกสารทั้งหมด

  • ลอกข้อมูลเวลาจากตารางเวลาทำงานของบริษัทลงใบเวลาของคณะ ให้พี่เลี้ยงลงนามรับรอง
  • ถ่ายเอกสารทั้งหมดที่ต้องมีการส่งคณะหรือบริษัท ยกเว้นความลับองค์กร (ซึ่งไม่ถึงมือผมอยู่แล้ว สบายใจได้)
  • เขียน TODO ในส่วนที่ยังไม่ได้ทำ และอธิบายโครงสร้างงานของเราไว้สำหรับคนต่อไป
  • ส่งรายงานของบริษัทฉบับสุดท้ายให้ HR
  • คืนบัตรพนักงานและบัตรลิฟท์อาคาร

Just do all the paper.

  • Copy the times from company log to faculty log, have supervisor sign it.
  • Photocopy everything that need to be submitted, except corporate secrets (which I don’t have.)
  • Write TODOs where needed, and document as much as possible
  • Submit last weekly report to HR
  • Return employee and lift cards

ขอขอบคุณ / Thanks to:

พี่ๆ ที่บริษัท CS LOXINFO ทุกคน

  • พี่แพท (เพ็ญโสภา กมลนาวิน) พี่เลี้ยงผู้ควบคุมการฝึกงาน
  • พี่กี (กีรติพงศ์ อุกะโชค) นับว่าเป็นพี่เลี้ยงอีกคน แม้ว่าจะไม่ได้อยู่ตลอดการฝึกงานก็ตาม
  • พี่หนุ่ย (สุรศักดิ์ อุทโยภาศ) หัวหน้าฝ่าย
  • พี่ติ๊ก (กัญญ์ชิสา ดันไหม) ฝ่ายทรัพยากรบุคคล
  • พี่ยอด แต่จะขอบคุณมากกว่านี้ถ้าพี่ซื้อ Diablo III ให้ผมด้วย (อิอิ)
  • และพี่ๆ ทุกคนในบริษัทที่เป็นบรรยากาศและชีวิตในการทำงานของผมด้วย
และสุดท้ายขอขอบคุณเพื่อนๆ ทุกคนที่มาฝึกงานด้วยกันครับ แม้ว่าบางทีจะเจอบ้างไม่เจอบ้างก็ตาม

Thanks to all CS LOXINFO employees!

  • P’Pat (Pensopha Kamolnawin), internship supervisor
  • P’Gee (Keeratipong Ukachoke), technical advisor
  • P’Nui (Surasak Uthayopas), head of technical & operation department
  • P’Tik (Kanchisar Dunmai), HR
  • P’Yod (I don’t know your name), but more thanks if you actually buy me Diablo III instead of bragging how you earn so much from Auction House out loud :)
  • And everyone for providing me with enjoyable work environment and experience!

Finally, thanks to all friends in the same internship program, even though we don’t get to see each other much.

สำหรับผู้ที่ต้องการเนื้อหาหรือข้อมูลจากการฝึกงาน หากสามารถให้ได้จะให้นะครับ ติดต่อมาได้

For those who need content or data from internship, I will provide them if possible so feel free to contact.

Some more pics


At presentation, my two friends preparing


ASCII Art of company name, limited to 80 characters wide


Phase I of MK Pot


Phase II, and we ate them all.

You can view all internship posts here: http://lunaticneko.com/blog/?tag=school-internship

Internship, Day 32 (5 Jun 2012)

Posted on June 6th, 2012 in computer, in English, in Thai, personal, PHP, programming | No Comments »

เวลาเหลือน้อยลงไปทุกทีๆ สำหรับการฝึกงานที่ใกล้จะจบลง งานของผมที่ต้องมานั่งแก้บั๊กก็ยังไม่เสร็จ ตอนเช้าผมก็เลยบอกหัวหน้าฝ่ายไปตรงๆ ว่าไม่น่าจะทัน แม้ว่ามันจะไม่ยากแต่มันเยอะมาก และเป็นการแก้บั๊กจากงานที่ไม่ได้ทำเอกสารไว้ ทำให้ไม่รู้ว่าต้องเริ่มแก้ตรงไหนก่อน ต้องมาคอยไล่ดักเอาเองตลอด ที่สำคัญอย่างที่บอกไปในตอนก่อนๆ คือพี่ที่ทำแอพพลิเคชันตัวนี้มาก่อนใช้หน้าต่างแบบ pop-up เยอะมาก ทำให้ไล่โค้ดยากขึ้นไปอีก

เวลาที่เหลือส่วนใหญ่ก็ทำสไลด์เพื่อเตรียมนำเสนอในวันที่ 7 ต่อไป

Time’s running out and the end of internship draws near. I have to continue debugging the job but it’s not quite done so I met the boss and told him it’s not going to finish in time. It’s not that hard, but the code was not documented so I have no idea where the possible code defects are. Most importantly, I might have said this earlier, that this application uses a lot of JS pop-ups which makes it all harder.

Whatever time I have left, I spend them on working with the slide to present on 7th.

Internship, Day 31 (1 Jun 2012)

Posted on June 5th, 2012 in in English, in Thai, personal, rant | No Comments »

วันนี้งานก็ไม่ค่อยเดินอีกแล้ว ส่วนใหญ่เวลาก็หมดไปกับการไล่บั๊กเช่นเคย จำได้ว่าพี่บอกว่าให้ทำงานนี้ถึงแค่วันนี้เท่านั้น วันอังคารจะมีงานใหม่พร้อมกับให้เตรียมนำเสนองานทั้งหมดอีกที

There’s still not much progress today, hunting bugs all day. I remember the senior limiting my work until today, as I will be switched to another one with final presentation preparation on Tuesday.

I recommend writing database views to reduce stress on your own part when working with complex database systems.

Internship, Day 30 (31 May 2012)

Posted on June 1st, 2012 in in English, in Thai, personal, rant | No Comments »

Image macro consisting of the Github Octocat (stylized, friendly cartoon creature with cat's head and multiple tentacles) and text macro 'because', 'FORK YOU', and 'THAT'S WHY.', playing on the phrase 'Because f**k you that's why' used to indicate deliberate spite, and the word 'fork you', which in turn comes from the phrase 'f**k you' and 'fork', the latter being a term in source version control system.
(Photo: Octocat, one of the many trademarks of Github. Click on it to go to my page there. I might create some repos in the future!)

งานไม่เดิน รูปไม่มี ของดหนึ่งวัน สาเหตุที่เป็นเช่นนี้เพราะการลงทะเบียนครับ

No progress. No picture. No blogging. All blame goes to registration.

Internship, Day 29 (30 May 2012)

Posted on May 31st, 2012 in computer, in English, in Thai, personal, programming, SQL | No Comments »


(Photo: More “proper food” my friend eats.)

ใกล้ครบกำหนดฝึกงานขั้นต่ำแล้ว (ของผมต้องถึง Day 32 เพราะลางานไป 10 ชั่วโมง) วันนี้ผมไปทำงานโดยมีเจตนาเอาฐานข้อมูลที่มีอยู่แล้วมาใช้ล้วนๆ เลย สำหรับงานที่ได้ในตอนนี้คือทำให้ระบบบันทึกการใช้งาน IDC บันทึกการนำอุปกรณ์เข้าและออกได้สมบูรณ์แล้ว แต่ยังไม่สามารถยกเลิกงานบางส่วนระหว่างทำงานได้ในบางกรณี (การยกเลิกงานอาจเกิดขึ้นในกรณีที่ไม่ต้องการทำงานนั้นๆ อีกต่อไป เช่น ตรวจพบทีหลังว่าเซิร์ฟเวอร์ที่นำมาใช้ไม่ได้ หรือไม่ต้องการนำของออกแล้ว เป็นต้น) เนื่องจากยังติดปัญหาว่าโค้ดเก่าพึ่งพา PHP Session มากเกินไป แต่กลับไม่ยอมเก็บตัวแปรที่อ้างถึงผู้ใช้ไว้เลย

So I’m nearing the minimum hours for internship (actually I need 32 days because I took 10 hours of leave). Today I came to work with pure intention to utilize the old database. Today I got the IDC visitor system working right with equipment installation and returns, but still cannot cancel jobs half-way in some cases (It might occur due to server installation error, or customer no longer wishes to remove the piece, for example.) owing to the dependency of the old code on PHP Session system, but lack of any actual reference to database.

Delete from multiple tables

 DELETE table1, table2
FROM table1, table2
WHERE
  table1.pk = table2.pk
  AND (your_condition_here); 

Select neighbors

If you have some tuple (x1,y) where you know only the value of x1, and you wish to select (x1,y), (x2,y), …, (xn,y), this is way to go.

 SELECT X AS REFX, Y AS REFY
FROM your_table
WHERE EXISTS
  (
  SELECT * FROM your_table
  WHERE Y = REFY
    AND X = $x1
  ) 

Internship, Day 28 (29 May 2012)

Posted on May 29th, 2012 in computer, CPE, in English, in Thai, personal, PHP, programming, SQL | No Comments »


(Photo: Guess where we had our lunch today!)

วันนี้กลายเป็นว่างานไม่ค่อยเดินเท่าไหร่ เนื่องจากผมพยายามสร้าง Task List ที่เอาไว้เก็บว่าลูกค้าแต่ละคนเข้ามาทำอะไรบ้าง ความซับซ้อนมันอยู่ที่การสร้างระบบฐานข้อมูลที่รองรับรายการหลายๆ ชนิดได้ ซึ่งตรงนี้ผมก็ทำโดยใช้ generalization และ specialization และหลังจากที่นั่งมั่วกับโค้ดเป็นเวลานาน ในที่สุดผมก็เริ่มเขียน PHP แบบ MVC เป็นขึ้นมาบ้าง แต่ก็ยังไม่ค่อยเข้าใจเท่าไหร่ ที่บอกว่างานไม่เดินเป็นเพราะว่าที่ทำลงไปจริงๆ ไม่ต้องทำก็ได้ เพราะโค้ดที่มีมามันก็มี Task List อยู่แล้ว แค่เก็บไว้อีกที่นึง อ้อ วันนี้พี่พาไปเลี้ยงมือเที่ยงด้วย ขอบพระคุณมากครับ (ถ้าพี่ตามมาอ่านในนี้นะ ^ ^”)

So I didn’t progress much today. I tried to build a Task List system which keeps track of what each customer does at a particular time. The complexity lies within the database code that needs to support multiple types of entries for the Task List, which can be accomplished using generalization and specialization techniques. After messing around for some time, I started to grasp the concepts of PHP and MVC and can now code a bit more properly. The lack of progress was due to the fact that there’s already a Task List system in place. I was reinventing the wheel all along. Finally, special thanks to the senior that treated me lunch!

The Wheel I did reinvent


Note: Tables authorized_on_customer and equipment and column data in temp_equipment shown here are simplified versions of the “real thing” on the live server.

Internship, Day 27 (28 May 2012)

Posted on May 29th, 2012 in computer, in English, in Thai, personal, PHP, programming, SQL | No Comments »


(Photo: What my friend eats for lunch. Not always like this, but always better than mine.)

เข้าสู่สองสัปดาห์สุดท้ายของการฝึกงานแล้ว ผมก็ยังไปทำงานชิ้นเดิมต่อ โดยวันนี้ผมไปขอพี่สร้างตารางใหม่ลงในฐานข้อมูลได้แล้ว โดยสร้างเป็นตารางขึ้นมาเพื่อใช้เก็บข้อมูลชั่วคราวของ Session ส่วนปัญหาเรื่องโค้ดที่ไม่มีการอธิบายนั้นตอนนี้ผมใช้วิธีสร้างไฟล์ติดต่อฐานข้อมูลแยกไว้ต่างหากออกมาจากตัว MVC ก่อน แต่ก็พยายามใช้ของเดิมเท่าที่ทำได้ ไม่สร้างใหม่ (ปัญหานอกจากการไม่มี document คือเขาเอาปลั๊กอิน JS มาใส่ ทำให้ไล่หน้าต่างๆ ไม่ถูก เพราะต้องมาไล่ทั้ง MVC ไล่ทั้ง JS call) ผลที่ได้วันนี้เลยไม่ก้าวหน้าเท่าที่ควร พี่ก็เร่งให้งานเสร็จ เพราะจะได้ไปทำงานอื่นอีกสองอัน

And now I’ve entered the last two weeks. I still work on the same piece today. I got permission to create new tables necessary to store temporary variables from sessions. The undocumented code problem forced me to build a new (hack) procedural code separate from the MVC architecture provided by CodeIgniter; I still attempted to preserve the old code however. Apart from lack of documentation, there are also JS plugins and they really throw me off balance because I spend too much time hunting each piece down, tracing both JS and MVC. In the end, I have not progressed much despite the expedition given by the senior because they wanted me to do two more pieces.