And then there was one…

No Comments

Francis is flying back home to the Philippines and Arvin is in Malaysia. I am left holding the fort alone for the next 3 weeks. It is a good thing that men are built with less emotional tendencies or else I would have been depressed. Well maybe not all men are built that way but I am a lone wolf ever since I have found that I enjoy books than playing outside. The same rule applies and there is still Ivy whom I can still talk to in Tagalog.

Have a safe trip Soy. Enjoy the short reprieve that you are getting because we both know that you will be back in the bloody frontlines soon enough.

ciao!

Some Java and MySQL Connector/J tips

No Comments

Ok, I and others have been bitten by some of these oversights so I hope it will be of some use to some:

1. Dont use the jar file ending with -g. That will require the aspectj libraries which is a paradigm for simplifying inclusion of boiler plate code (e.G. Debugging, etc.). Use the other one.

2. At least in the development phase: DO NOT WANTONLY OVERRIDE EXCEPTION MESSAGES AND STACKTRACES. They may seem ugly but they have their purposes. Handle the exceptions but output the error somewhere to help you debug. You can remove the debugging statement later.

As an added tip, use a unique word to tag statements that you will remove later (e.g. prepending System.out.println messages with “[REMOVE]”) to facilitate search and remove later on. Or use the task feature of Eclipse if you are using it (i.e. start a comment with “//TODO” and it will appear in the task list) .

3. Use PreparedStatement calls whenever possible. However, DO NOT USE them when executing SQL INSERT statements with embedded SELECT statements. Construct your SQL statement via plain-jane string manipulation and execute them with Statement objects.

When constructing SQL statements for PreparedStatement objects, escaping strings that will be dynamically specified are not required. Just make sure that the question marks have spaces before and after.

4. The latest MySQL Connector/J drivers require JRE 1.4.x. Aside from that, aim for the lowest JDK possible to ensure maximum compatiblity. Java Runtime Environments are usually backward-compatible.

5. Modularize your code. This way you can do unit tests on your methods before integrating them to the main code structure.

6. Maximize comments. Make sure you create comments for all methods (no matter what the scope is) to describe what it needs to do. It is also good to create multi-line comments on how you would proceed in the body of the method. It gives focus on what you need to do and what will come after it.

I’ll just post additional ones as I encounter them.

ciao!

Zempt, shave, SQL and sleep

No Comments

Zempt has a flaw. It keeps on escaping single and double quotes repetitively that the resulting post is rather unsightly. I end up having to edit it on the blogsome web interface. I have already raised this in the zempt forum and I think the developers are too busy with their real lives. The disadvantage of using FLOSS. 😀

Shave. I got around to shaving my head yesterday using Arvin’s electric razor. Being accustomed to having very short hair, the hair on the side of my head are beginning to irritate me. I am also beginning to develop a mannerism wherein I am pulling those hair so it was about time I mowed them down. I know I promised my wife I will let them grow for the duration of my stay but it is already driving me crazy. And no, trimming them with the local barber is too expensive. I just hope I shaved the back portion to a passable level. 😀

SQL. I am done with the BK and VER command in my IS238 TMA. The BK was the most complex since it involved a lot of trapping. And it also dictates the structure of my classes. I assume the others will be a breeze since they are simple in comparison. I did the VER command in an hour so I should be able to start the documentation on Wednesday since I still need to iron my clothes and cook my baon and dinner for the week.

Sleep. One thing that I am being deprived of. I cant wait to finish this TMA so I can get some well deserved rest.

ciao!

Small world

No Comments

The dinner was great although Francis re-clarified that birthday dinners here does not mean that the person inviting (celebrant) is going to shoulder the tab. Unlike the custom back home, almost everything here is dutch treat (on some restaurants you can even request the bill to be split individually).

Did that mean that dinner was not free? Not quite because it was Francis’ despedida so it counted as a team-building dinner and Tomas picked up the tab. The cajun steak was alright but the serving was a little bit on the skimpy side, or maybe I just really have a big appetite.

One of Ivy’s Fiipino friends joined us. I initially thought it was Pen but it turned out that it was ‘Pheng’. I did not know her but she looked very familiar. Ivy said Pheng did not work for the firm so I was really trying to remember where I saw her. Apparenty she also recognized me and thinking along the same lines. I do not know if I am really that bad with faces or women just have better recall but when Pheng asked if I was from Tsukiden it dawned on me: she was from the Infosys group. That explains why I cannot recall her name or where I met her because technically we did not meet since I was in another group. What a really small world….

After the dinner at Eatz, the group went to Angleteria which is about a minute away from Arvin’s apartment. I did not touch any liquor or else risk pulling another ‘Jojo’ because I ate sorbet during the dinner. And my stomach was already rumbling. Somebody was already playing at the darts area so Ivy decided to move to another bar. The plan was that we (the onsite guys) would not go and do some Tekken tournament before Arvin goes to Malaysia tomorrow. But since Francis was already drinking beer he was easily coerced to go. The Tekken tournament did not push through since Arvin and I were already sleepy.

ciao!

When will databases leave me alone?

No Comments

Two days of feverish (ok so feverish is an exaggeration) work on my TMA and I am yet to finish one command. I have been working on the booking command and it was taking waaaaay too long. I did not realize there were a lot of things to be considered. A huge thanks to the Eclipse IDE for making the debugging work easier although it manages to freeze my laptop whenever I am alt-tabbing to switch applications. It does not seem to be in friendly terms with Firefox and Thunderbird. Firefox is needed for the API browsing so Thunderbird has to go.

I find it ironic that for somebody who keeps on telling the world that he doesn’t want database work gets hounded by database tasks. Database backup and restoration is one thing, but doing SQL work is really a chore for me. It is a little bit above testing and documentation but a chore nonetheless. SQL work has the same effect on me as a warm milk on others: they make me want to fall asleep. IT is all about information, and information means storing them in digital format. Database work is inevitable in IT but I still would want to avoid it as much as I can.

Back to slugging it out with the TMA. The internet radio seems to be not agreeing with me either. I was hoping to hear some oldschool alternative music (e.g. eraserheads, yano, the youth, siakol, etc.) but Xpidernet and Pinoy Radio is bombarding me with Regine Velasquez, Rey Valera and occassional Renz Verano’s. Nothing good is on TV which I think is a good thing, less distractions for somebody who is screaming to get this TMA over and done with.

Plus side, dinner is going to be free courtesy of Ivy’s birthday celebration and Francis’s farewell dinner. Im getting sick of this mexican weekend meal escapade. Maybe a steak is in order… What the heck, it is free. :woot:

Which reminds me, I need to butter up my excuse dispenser since Francis and Arvin might do a last ditch attempt to coax me to treat them. Yeah right, you guys need to provide me with a very good reason why I need to treat you. Besides, I did not charge you for eating my Nilagang Anak ng Tupa the other weekend, right? 😛

ciao!

Older Entries

Social Media Auto Publish Powered By : XYZScripts.com