Jangan Salahkan Tuhan

Kalo orang celaka atau kesusahan, emangnya Tuhan yang nyobain? Ya kali Tuhan begitu.

Advertisements

Renungan menarik datang pada hari ini. Jangan pernah menyalahkan Tuhan. Adapun nats menarik itu ada di Yakobus 1:13. Continue reading “Jangan Salahkan Tuhan”

Jangan Mau Jadi Rata Rata


Jangan mau jadi rata rata. Begitulah saya ucapkan tiap hari ke diri sendiri. Kalau sekarang ada di kondisi rata rata, jangan mau stay. Begitu juga saya ucapkan ke diri saya setiap hari.

Rata rata orang melakukan hal A untuk mencapai pencapaian X. Jangan mau ngikut. Biasanya pakai B biar mudah sampai ke Y. Jangan mau nurut.

Jalan rata rata ga ada tantangannya. Semua jalur rata rata sudah pernah ditempuh orang. Masalah di sana pasti sudah ditentukan jalan keluarnya. Jangan mau ikut karena itu hal biasa.

Di jalur yang rata rata orang lewatin ga ada hal baru. Ga ada penemuan bisa kita lakukan. Ga gagal ga belajar. Berhasil cara biasa hanya buat kita jadi rata rata. Berhasil cara baru kita jadi penemu.

Jangan mau jadi rata rata. Bergeraklah lebih cepat. Berpikirlah lebih cepat. Kalau salah, koreksi dengan segera. Yang kurang segera cukupkan.

Jangan mau jadi rata rata. Rata rata orang hidupnya biasa dan menerima nasib. Lawan hidup ini! Tantang dan berdiri! Tegar layaknya orang di atas rata rata!

Jangan mau jadi rata rata. Begitulah saya ucapkan kepada diri saya sendiri.

http://about.me/yedijas/

Memangnya Ini Badan Elu?!


Pada hari minggu kemarin, saya mendengarkan khotbah yang terambil dari surat Paulus kepada jemaat Korintus. Paulus berkata bahwa tidak ada yang haram baginya. Tentu memang sampai sekarang juga tidak ada yang diharamkan bagi saya juga. Namun tidak satu pun dari hal yang halal itu membuat candu kepada Paulus.

Sungguh menarik statement Paulus ini. Semua halal, tapi berguna engga? Kalau ga berguna ngapain juga dilakuin? Semua halal tapi jadi tergantung ga sama itu? Jadi lebih banyak cari itu atau cari Tuhan? Berarti main game ga haram. Boleh dong. Seks juga ga haram. Bisa laaah. Merokok, ganja, putaw? Ga haram juga. Barulah ditanya, berguna ga?

Mungkin bisa ajalah berguna kaya morfin, tapi kita ga allied forces yang lagi di Normandy juga kan? Seks juga ga haram. Sembarangan juga merusak diri sendiri kan. Kalo diri sendiri aja ga disayang apalagi diri orang lain? Padahal katanya kita harus mengasihi orang lain seperti diri sendiri.

Lalu selanjutnya apakah hal tersebut ut bikin kita candu? Lebih banyak nyari itu ga kita daripada nyari Tuhan? Atau jangan jangan kita sampai menelantarkan Tuhan karena kita suka hal itu? Kan ga baik juga kalau kita sampai melakukan itu kepada pencipta kita.

Jadi semuanya balik ke kita lagi. Kita melakukan semua itu dengan akal sehat atau tidak? Kita melakukan semua itu sadar resiko atau tidak?

http://about.me/yedijas/

DNA Mapping


Hello! I had this idea when IPv6 firstly intorduced. I put this here now because recently I talked about inventions and reaearch with my coworker.

Imagine of there is a DNA database. It stores the DNA information in your body. Your specification and uniqueness. Not exactly how you are, but more like what you really are when you are born.

The next part is what if we had a scanner. It can scan the DNA of living being just like a barcode scanner. DNA db is expanded and even all species and kinds of living being is stored. You can scan your friend and people around you. You can know whether they are a fugitive or a kind man. Even better you can know what kind of insects dwelling in your garden. You can be proud of if a rare species exists there!

Further more,what if every devices is mappex with your DNA? You can have limitless or limited to certain number of devices. Lost devices can be found easily.

Let us not stop right there. You can have a smart home. Your refigerator is having your DNA address and only you and your family can access it. Your dog feeder will only give food when your dog asks for it. Even your room, your private room can only be accessed by yourself. Hacking will be harder then.

Gun selling will be easily tracked. Each guns can be used only by the registered DNA owner. Even ammo will have track of DNA to see who is the one making the bullet.

Everything is mapped. You own your own things. Surely you can still share because you can add other DNA as authorized user of your things. Would everything be easy?

http://about.me/yedijas/

Troubles on After Delete Trigger on SQL Server


So, last week, I stumbled upon an error in an application used frequently in the company I am working for. The problem occurred when executing a statement to delete data preventing redundancies when uploading a new batch of data. Sure, my team was appointed to fix the error since I am working as a support in the company.

When we were trying to debug, we got the error stating that the SQL Exception because the subquery returned more than one value. That was quite frustrating since the command we tried to execute was a simple delete command without using subquery. The frustating part was not that we did not understand the error, but because we did not have access to see what was inside the trigger.

So after we get the access to the trigger, we could understand that the subquery was to select data from DELETED temporary table. Unfortunately, the DELETED table result from query returns many rows and cause the error. That time I did not quite understand why. But after reading the MSDN entry about Using the Insterted and Deleted Tables, I understand the problem.

The statement to delete is

DELETE
FROM [dbo].[dailyUpload]
WHERE DATEDIFF(d, [uploadDate], GETDATE()) = 0

Meanwhile inside the trigger,

DELETE
FROM [dbo].[someAnother]
WHERE DATEDIFF(d, 
    [uploadDate], 
    (SELECT [uploadDate] 
        FROM DELETED)) = 0
    AND [IDDaily] = 
    (SELECT [ID] 
     FROM DELETED)

Surely, the subquery inside the trigger would return so many data since there were thousands of data uploaded to dailyUpload table.

So, I came up on a solution, storing the deleted value then delete it through looping in application side. Why not database side? Since the database was used by many users, it would not be fair to use the resource for some faulty of a user. Here is the code in C#.

// get the data
dailyUploadTableAdapter
    .FillByUploadDate(dailyUploadDataTable,
        DateTime.Now);
// delete data
/** OPTION A **/
foreach(var singleRow 
    in dailyUploadTableDataTable.Rows){
    dailyUploadTableAdapter
        .DeleteByUploadDate(singleRow.uploadDate);
    /** OPTION B will not need the line below **/
    someAnotherTableAdapter
        .DeleteByDUIDAndUploadDate(singleRow.ID,
            singleRow.uploadDate);
}

In the little example above, there are two alternatives. Alternative A will not need the trigger anymore. In my case, we cannot disable the trigger, that is why there is solution B. Option B will stick with the trigger rule.

So I think you can come up with either the solution. Anyway, if there is another way to process, please kindly share and we can talk it here!