I overheard two young guys most probably college students, talking about deleting files such that nobody will ever read that file again. This happened as I was sitting in a corner next to a coffee shop in Baguio City where a free WI-FI is available as I need to use my iPAQ to check my emails.

One guy advised to the other that after deleting a file, he should Empty the Recycle Bin to make sure no one will ever read that file again.

I just smiled and hoped that this guys will stumble upon this blog and be able to understand that their assumption is wrong.

Deleting a file in Windows does not actually delete the content of the file. It just removes the reference of the file in the file system so that you can no longer see it and the space used by the file will be re-used when Windows needs a space to write something. As long as the space used by the deleted file were not yet overwritten, you can still recover the contents of the file by using undelete tools like the FREEUNDELETE tool. I suggest you download this tool as it may come handy when you need one.

So how do we delete a file such that it will very difficult if not impossible that one will ever read the contents of that file again?

One answer is presented by Peter Gutmann in his paper. It proposes a technique to overwrite the content of the file 35 times with random and fixed pattern. Take your time to read this paper. You would be amazed how data is written into your hard drives and how it can be recovered.

A free, open source program that implements Gutmann technique to securely erase a file is Eraser. It was originally written by Tolvanen.

So next time you delete a file in your computer and wants that no one will ever read the contents, think again.

While searching on how to secure WCF, I stumbled upon this article.

SSL with Self-hosted WCF

This is a very helpful tool for developers like us to implement SSL without going to buy a certificate from a trusted Certificate Authority during the development stage of a product.

However, this self-signed certificate can also be used for production… until such time that the client can afford or be able to buy a trusted certificate of his/her own.

But what if the client does not want to buy a trusted certificate? Is the self-signed certificate good enough for its purpose?

Well, as long as the encryption strength used are the same, self-signed and trusted certificate are equally the same when the certificate is primarily used for securing the communication.

I recently attended a seminar conducted by Institute of Electronics and Communication Engineer of the Philippines – Cordillera Administrative Region Chapter now Institute of Electronics Engineers of the Philippines (IECEP-CAR CHAPTER) regarding Electronics and Communication Engineer (ECE) conversion to Electronics Engineer (EcE). The small ‘c’ in Electronics Engineer is put to distinguish between Electrical Engineer (EE) while the capital ‘C’ in ECE distinguishes between Electronics and Communications Engineer and Electronics Engineer respectively. It was held at University of Baguio, Baguio City, Philippines on March 2, 2008.

ece seminar

I was expecting to meet some of my old friends in college but that was never the case. Where are the Saint Louis University ECE Batch 1994?

Being an Electronics and Communication Engineer myself, I am concerned with this new Republic Act 9292 (RA9292) which is known as “Electronics
Engineering Law of 2004″. I was informed that we can no longer renew our license as an ECE from Professional Regulation Commission (PRC) when our license expires because of this RA 9292. In short, we have to convert from ECE to EcE.

As stated in RA 9292, this law is necessary to “develop and nurture competent, virtuous, productive and well-rounded Professional
Electronics Engineers, Electronics Engineers and Electronics Technicians whose
standards of practice and service shall be excellent, qualitative, world-class and
globally competitive through inviolable, honest, effective and credible licensure
examinations and through regulatory measures, programs and activities that foster
their integrity, continuing professional education, development and growth”

However, I am much concerned with the implementation of this law. I am appealing to the Local Government Units (LGUs) to make sure that this law is enforced so that we can achieve what is being defined in the law. It is high time that laws like should be implemented.

P.S. Field Programmable Gate Arrays (FPGA) in Telecommunications was also presented. Will this technology replace ASIC? That we have to watch out.

One of my functions has to insert to database multiple rows and multiple columns to SQL 2005 Express. In my C# code, I have to make a round trip call to each row that I have to insert.
Accidentally, I stumbled the new feature of SQL 2005 using native XML. Further searching and coding finally gets me to do a single call to insert my data that consist multiple columns and rows.
Here is the stored procedure:
CREATE PROCEDURE [dbo].[rproc_NewMember]
@EducationalAttainment xml
AS
BEGIN
INSERT INTO [dbo].[tblEducationAttainment]([sEASchool],[sEAYear],[sEADegree],[ixEducationalAttainmentType],[ixMember])SELECT R.Table1.value(’sEASchool[1]’,’varchar(100)’) as sEASchool,R.Table1.value(’sEAYear[1]’,’varchar(100)’) as sEAYear,R.Table1.value(’sEADegree[1]’,’varchar(100)’) as sEADegree,R.Table1.value(’ixEducationalAttainmentType[1]’,’int‘) as ixEducationalAttainmentType,@ixMember as ixMember
FROM @EducationalAttainment.nodes(’ea/Table1′) AS R(Table1)
END
Here is the XML:
<ea>
<Table1>
<ixEducationalAttainmentType>1</ixEducationalAttainmentType>
<sEducationalAttainmentType>Elementary</sEducationalAttainmentType>
<sEASchool>CWSC</sEASchool>
<sEAYear>1990</sEAYear>
<sEADegree>ELEM</sEADegree>
</Table1>
<Table1>
<ixEducationalAttainmentType>2</ixEducationalAttainmentType>
<sEducationalAttainmentType>High School</sEducationalAttainmentType>
<sEASchool>ASJ</sEASchool>
<sEAYear>1994</sEAYear>
<sEADegree>HS</sEADegree>
</Table1>
<Table1>
<ixEducationalAttainmentType>3</ixEducationalAttainmentType>
<sEducationalAttainmentType>College</sEducationalAttainmentType>
<sEASchool>SLU</sEASchool>
<sEAYear>1998</sEAYear>
<sEADegree>ECE</sEADegree>
</Table1>
<Table1>
<ixEducationalAttainmentType>4</ixEducationalAttainmentType>
<sEducationalAttainmentType>Others</sEducationalAttainmentType>
<sEASchool>STI</sEASchool>
<sEAYear>1999</sEAYear>
<sEADegree>CLIP</sEADegree>
</Table1>
</ea>
And here is the C# code:
string xml=”"; //set xml variable here
using (SqlConnection conn = new SqlConnection(@”Server=.\SQLEXPRESS;Database=mydb;Trusted_Connection=True;”))
{
using (SqlCommand cmd = new SqlCommand(“rproc_NewMember”, conn))
{
//set command type as stored procedure
cmd.CommandType = CommandType.StoredProcedure;
//add the parameter
cmd.Parameters.AddWithValue(“@EducationalAttainment”, xml);
//open connection
conn.Open();
//execute
cmd.ExecuteNonQuery();
}
}

While developing a module for our Coop System application, I found a quirk bug on Visual Studio 2008 Designer.

bugonvs2008.jpg

The bug is about an enabled timer in a User Control in a Form. When switching to View Code, you can no longer edit your code since the cursor is focused somewhere else.

Steps to reproduce.

  1. Create a C# Windows Forms Application.
  2. Create a User Control into your project.
  3. Add a timer into your User Control.
  4. Add a TextBox item to the User Control.
  5. Select the timer and set the Enable to True in the Properties.
  6. Double -click the Timer to add a Tick event.
  7. In the Tick event, write the following code: textBox1.Focus();
  8. Build the solution.
  9. After successfully building the solution, you can now see the User Control from the Toolbox.
  10. Drag the User Control to the Form1 (main form)
  11. Build the solution.
  12. On the main form, switch to View Code.
  13. Holla!!! Now, see the effect.

Download the sample solution here BugOnDesignerWithTimer.zip

When I was a child, I dreamt to be a successful lawyer, like my Uncle Elping. But it never happened. Instead, my younger sister Rhoda did it. She became an attorney-at-law.

During my high school days, new technologies emerged and so I dreamt to be a Computer Engineer, to be employed in the biggest and best company available. And of course with all the luxuries of a very high-paying job. But it never happened. Instead, I became an Electronics and Communications Engineer and established my own business.

When college days came, I dreamt to study in Manila – where the best and biggest universities are believed to fulfill my studies. But it never happened. Instead, I graduated at St. Louis University, Baguio City.

Every time I started counting my dreams with my fingers, I also started to count my ‘failures’ with my feet. Most probably, I should include your feet too, in my counting.

So, I ask myself. Am I successful in life? A question that is seems to be unfathomable. A question each of us is maybe asking right now.

clavhall_web.jpg That answer came to me just a few days ago in an unlikely manner.

It was late at night. Around 10:30PM. I was busy debugging one of my software under development, when my son passed by to get glass of water from our dispenser. (He usually do that at night.)

When he passed by I ask, “How’s your school?”

He proudly replied, “I got a star in my hand!” And he showed me a red star stamped at the back of his left hand. (If a student did a good job in school, he will get a star in the hand.)

I congratulated him, “Very good!”

He smiled and I kissed him good night.

I don’t know what came to my mind. But I realized how happy had been my child when he got that star. I realized how successful he was to himself.

One by one, I count the things I have done. As I recall each thing, I smiled and look at the back of my hand and I said to my self, “This could have been full of star if I did stamp my hand for every good job I did!”

Surely, being successful is not measured by the amount of money you got. It is not measured by material things you acquire. Nor it is not measured by the luxurious lifestyle.

Being successful is doing what you think is right and best in everything you do. Being successful is appreciating yourself for each good job you made. And don’t forget to stamp that star in you hand!

Originally posted at www.lakay-lakay.com

program HelloWorld;
begin
  writeln('Hello World');
end.

That was the first programming language I was in love with – Pascal. I was able to developed an anti-virus for Sayhawatpu (the most famous virus at that time in our school, St. Louis University, Baguio City, Philippines – 1990’s) and a generic anti boot-virus which I planned to sell but turned out to be a freebie to my friends.

My passion to Pascal died down when I was introduced to C programming language. I was amazed with its efficiency, ability to access low-level system access and its flexible syntax. Eventually, I moved to objected-oriented C++ where I developed my first ever commercial application, Breakpoint WinTimer.

I was not spared from the .NET technology storm in 2002. I co-developed a school system using ASP.NET – VB.NET in 2003. However, C runs deep to my blood so I shifted to C# in my choice of programming language.

For now, all our developments are made in C# using Visual Studio.