Friday, September 12, 2008

Last Day

Well, this day marks the last day that I'll be working with the company (ironic, since I'm not working at all, just spending my last employee hours here. he he). Anyway, I'll be parting from this company, which has given me the chance to prove to myself that I can do so much better (and I'd say a lot of things) than being a tester. Working here (even before when I was just a Junior Web Developer) gives me the feeling that I have slapped their faces so hard (I mean my previous employer), for putting me in the Verifications Team, without even looking at my Transcript of Records (politics, huh?). Come to think of it, an Ateneo Cum Laude given the tester role, while the average fresh graduate from San Carlos became a Software Developer. Well, that's one reason why a lot of people hated that company.

Anyway, so now I'm walking away from this company proud, even with a little hurt feelings because of some "minor catastrophic events". I'm not expecting anything more from the management, since they haven't given me much too, except for the chance to work as a programmer, train and teach me a little, and pay me for my hardwork. I just hope I get my last pay, that's all. But I still thank them for risking to hire me, even if my experience was a Quality Assurance Engineer. I thank them for their trust that I can do programming stuff (unlike the previous one that didn't even look at my grades. Sheesh!!!). And I also thank Sander, for trusting me with his projects, and recognizing my skills. Even if there was a time that I failed you (I think) when your client sued you (was it my fault? I don't really know), you're still thankful for having me.


So what now? Tomorrow, I'm going home, with some of my stuffs. I'll leave early since my son is also scheduled for immunization. I'll be back on Tuesday for my salary and my clearance. I planned on going this Monday, but I have to take care of some business. Actually, someone's not doing their job well so I'll go there and give him some lessons. I hate unprofessional people. Hehe


So that's it! It's my last day at work, but I hope it's not my last day to be online and do the usual stuffs. The internet connection at home is freaking slow, but I hope I can manage and still browse the net, upload pictures and videos, play games, etc. he he he

Wednesday, September 10, 2008

Freedom; Birthday

I felt so depressed (again) yesterday. I know, it's not good for me and the baby, but what can I do? My husband's far from us, and I don't have anyone to really comfort me, especially during these times of my pregnancy. From what I've noticed, most pregnant women are more emotional compared to women who are not pregnant. And it's really bugging me, because I don't want to get so stressed out.


Anyway, I told him that even though I'm the one together with our son, I (quite shamefully) envy him. His "freedom", I mean. He gets to go to a lot of places easily, without considering someone else, and get to enjoy and have fun and laugh and do whatever he wants, God knows what. I know I'm not in the right position to say these things, but that's just me. I love freedom, I'm accustomed to freedom, I'm used to it. My family, my parents exactly, gave me so much freedom that I get so depressed thinking that I don't have that freedom anymore. Now, I'm quitting my job to "embrace" more of that "freedom"-less life. And the only thing that kept me holding on, kept me moving forward, is the thought that someday (SOMEDAY!!!), I'll have that freedom once again.

Of course, I didn't say all of these to him yesterday. It's enough to tell him that I was so depressed, and I was thinking he understood me perfectly (I hope I'm right, though). He, on the other hand, made an effort to make me smile, to forget my depression. He sent me these:
Peace, Baby....mwaaaaaaaahhh

Moving away from that topic, since it will just bring more tears in my eyes (again), it's his Mom's birthday today. I'm planning to give her a basket of flowers, as a present. I can't think of anything else, and since girls love flowers, that's what I've decided to give. I went to SM last night to find a flower shop, but to no avail. I went home empty handed. Today, I'll try going to NCCC Mall, will checkout a flower shop there. I hope I found one (though my officemates already told me there is). If I can't find one, then I'll think of something else. *sigh

Tuesday, September 9, 2008

Uploading/Importing File in C# .NET

Just want to share this code I used when uploading a file. I need to read a CSV file and save the data on a database.

First off, of course, is to add a file upload function in my page. I used the following syntax in my page, then code everything else.
<asp:FileUpload ID="fuCSVFile" runat="server" />
<asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" />
Then in my source code, when click button event is being called, my page will save the file in another folder. Then call a function to process the import to database.
void btnUpload_Click (object sender, EventArgs e){
.
.
.
String Name = "Import_" + System.DateTime.Now.ToLongDateString().Replace(" ", "").Replace("/", "").Replace(":", "").Replace(".", "");
HttpPostedFile hpfCSV = fuCSVFile.PostedFile;
String textFile = HttpContext.Current.Request.MapPath("../" + Name + ".csv");
if (hpfCSV.ContentLength != 0)
{
hpfCSV.SaveAs(textFile);
ImportFromCSV(textFile);
}
.
.
.
}

void ImportFromCSV(String csvFile)
{
StreamReader sr = new StreamReader(CSVFile);
ArrayList values = new ArrayList();

// reading each line of the file
while (!sr.EndOfStream)
{
string[] val = null;
string fields = sr.ReadLine();
if (!fields.Contains("Artikelnummer"))
{
fields = fields.Replace("\"", ""); //remove all double quotes
// split each field
// delimiters depend on what is used in the CSV file.
// mine was a semi-colon
val = fields.Split(new char[] { ';' });
values.Add(val); //save the array of strings to an arraylist
}
}
foreach (string[] v in values)
{
//...
// import each array as one entry in the database
// we may call another function for the import to database
//...
}
}
Everything worked fine, until when I tried importing a CSV file, which is around 6MB. I always get a connection timeout error. My colleague told me to check the maximum file size that ASP.NET allows. And there it is, by default, ASP.NET only permits files with at most 4MB file size. So I researched again for the solution and found this handy solution. This should be put in the Web.config file.
<configuration>
<system.web>
<httpRuntime executionTimeout="90" maxRequestLength="7168"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
</system.web>
</configuration>
Anyway, if you want this setting to all of your workstations, or all of your web pages in your PC, then put this in your Machine.config, which is located in the \System Root\Microsoft.NEt\Framework\Version Number\CONFIG.

So that's it. Just want to take some notes so that I won't forget this. he he

Thursday, September 4, 2008

Suzuka

I just finished reading this manga yesterday. It's a story of two high school students who fell in love with each other. Well, the boy already fell for her the first time he saw her, and the girl eventually developed her feelings for him.

Typical love story? I don't think so. But what made it amaze me is its plot. It's quite similar to what happened to me and my husband. Each chapter I read, I remember my husband more, I MISS him more. I always remember how we were when we were still together. And it's really pretty similar to the manga.

Anyway, I really recommend this manga. I almost cried at some chapters. Just a precaution, it's a little bit ecchi. Hehehe

Tuesday, September 2, 2008

September

There are a lot of things that I want to talk about in this post, so I can't decide my title for this. Since one common thing of them all is that everything takes place during this month, then I entitled this post "September". Silly reason, isn't it? He he he

Anyway, it's pretty lonely this time. My husband left for Japan last Sunday, August 31, for a business trip. He'll be there for two straight weeks. Which means, I won't be able to hear his voice during these two weeks of September. We can still communicate, though, through SMS, but that's just it, no voice. huhuhu. After two nights of being there, I miss him even more. It's quite weird since there's no big difference about it, we're not together, anyway. I don't know, I just miss him.

Second thing, since yesterday, I'm just counting my last days here in the company (countdown begins!!!). My last reporting day will be September 12, and I will be officially out starting September 15. I'll be returning that day, though, because I still have to get my salary for the first half of the month. Then I'm gonna take care of my clearance. I just hope there won't be any problem, since traveling from Kidapawan to Davao and back is really tiresome, and is not good for me and the baby (not good for my money, too. hehehe).

And come to think of it, I'm the last remaining pioneering employee of this company, who started out in Brokenshire College. All of them already left, and if it wasn't because I'm pregnant and trying to hold on, I might have left this company earlier too. But right now, I just can't take it anymore. People were saying, why leave now? Why not enjoy the benefits of being an employee first, before leaving? They were referring to the Maternity benefit's I'll get if I'm still part of the company. But no, I'm really stressed right now. Aside from the fact that I really want to go home, I just can't handle these people anymore. For what reasons, it won't be appropriate if I will start pointing those out. For all I know, the former employees of this company, who left before me, know very well those reasons.

So after my last day, what now? I don't actually know. I haven't accepted my boss's offer yet to work for him as a freelancer. When I say boss, I don't mean the one owning this company. I will never work for him again. Why I say boss? Because I know the real deal. Anyway, I haven't accepted it yet, so maybe I'll be a fulltime Mom, right now. Well, I can always help with my father's business through my own ways (they are feeding me anyway...he he he), so I may still be online from time to time. Plus, my sister's teachers are also demanding, want them to research through the internet about things that we usually learn even without connecting online. So I can get some chance to go online, too. He he he.

What's next? Hmmmm...September itself. Start of the -ber months. It'll be Christmas in three months. But before that, my delivery in November. Anyway, I can feel the cold breeze already. In fact, I'm having a running nose because of this cold air. It's really annoying. But aside from that, I don't feel the season at all. When I looked at the calendar this morning, I just told myself, "Hala! Ber na man diay, hapit na December. Pero dili pa nako feel ang Christmas." (Oh! It's a -ber month already, and December is approaching. But I don't feel the spirit of Christmas yet.) I don't know. I just don't feel it. Maybe because of the depression and stress that I feel right now.

Other things during this month. Well, my former dorm-manager's birthday is coming up. I forgot her age, though, but she'll be celebrating her birthday this Saturday, September 6. After her, my mom-in-law's birthday on September 10. I'm thinking, shall I buy her a present or not? What do you think? I can't say I will be short of budget if I do. My husband won't be able to give his share of Myles's finances until he returns, and my next salary will be on the 15th. So until then, I will have to stretch yesterday's salary, which won't be that much anymore since Myles's needs are increasing and becoming more expensive because of economic fall. Hmmm...What should I do?

Another birthday coming is Art's, which will be on the 15th. He's in Cebu anyway, so a simple greeting will be enough. Then Carlo's birthday is also coming, this September 20. Who else? I guess that's all of them. I don't think I forgot anyone. he he he.