Failure Notification
Work is too busy to blog at the moment so that's why my posts are less frequent than usual. At home I'm either very tired after work, or else I'll have Malaysia homework to do which leaves less time for words.
This week I decided to refactor my automatic download / extraction programs to make them more robust and less susceptible to un-notified errors. This need came from the fact that I realised the stupidity of users, most of which don't bother to notify you when there is a download error. People do not realise that if they don't notify me I would not know what is going on with my automatic programs. At last I decided that I had to make the programs themselves notify me if they decide to take a day off.
Now I've filled batch files with ERRORLEVEL trapping and added job failure notification in my scheduling program Automize. From experience it's much better to get e-mailed when the program is not working rather than when it is, because as time passes you start to unconsciously disregard success emails. The problem with this approach is that if the job is not run in the first place then you're not notified. It would be a great idea if a daily report can be sent at the end of the day so that at a glance you can identify the status of each job.
Hand in hand with this issue, this weekend I got interested in testing programs and frameworks. This whole testing thing is an integral part of extreme programming. It seems that the most common Java testing framework is Junit. JUnit is an open source unit testing framework, but it is extended to different variants of Java programming (like Cactus for JSP and Servlets and JUnitPerf for testing performance and scalability)
As a last note on computing, there is a good article about passwords or their lack of, in this new blog.
Yesterday we watched Gothika (review) starring Halle Berry and Penelope Cruz. At least the film proved slightly better than the newspaper articles. The first part could have been much more interesting but at the end of the second part the story gets interesting. 2.5 Stars.
Database problems and solutions
This week was a hard programming week at work and I had to reface the hardships of database programming in Java with JDBC. On Monday morning I decided to solve the quotes problem when inserting and updating into the database. As in most programming languages, SQL gets quite upset when certain special characters are used incorrectly. In SQL's case the single quote (') is the trouble maker because it has a special use to enclose a character / string value. If you've got a field and a user types in a single quote the single quote must first be "escaped" by inserting another quote, before adding it to the insert statement. So for example insert into remarks value ('I don't want to drive'); must become insert into remarks value ('I don''t want to drive');.
My first attempt at solving this problem was to use the replaceAll() function in Java to replace all ' by '', for each field. This method is cumbersome and not very elegant, so I had to look for a better solution. The answer was to use the PreparedStatement object instead of the Statement object to update values in the database. Apart from solving the quotes problem the PreparedStatement pre-compiles the SQL statement passed as a parameter, thus making it faster than the normal statement. For more information of the usage of the PreparedStatement object see Sun's Java JDBC basic tutorial.
While I was learning how to use the PreparedStatement object I stumbled across a new connection leakage error. The actual error was: ORA-01000 maximum open cursors exceeded. To help me analyse the fault better I found two SQL statements to document the number of open cursors in the database:-
SQL Statement 1: List of al open cursors, users and the SQL executed.
select user_name, status, osuser, machine, a.sql_text
from v$session b, v$open_cursor a
where a.sid = b.sid;
SQL Statement 2: The number of truly open cursors.
select a.value, b.name
from v$mystat a, v$statname b
where a.statistic# = b.statistic# and
a.statistic# = 3;
The culprit for the error was that I was had an unclosed PreparedStatement well hidden inside a loop. Although it was not so difficult locating the error, the problem was not fixed immediately by changing the code, so I started going around in circles looking for problems that didn't exist. The reason for this was that Oracle frees the inactive connections every 15 minutes (this might be dependent on a database parameter [INITSID.ORA]), so the open cursors had to be freed before the code could work.
This week I had very little time to experiment with common applications but I found a quick way to load Adobe Acrobat faster i.e. without loading the plug-ins. To do this all you've got to do is press [Shift] while the program is loading. Apparently this feature also works with other programs that load plug-ins.
Some links:-
- Calciomercato.com
- This is the most complete source for summer football transfers, covering most of the European clubs. (Calciomercato means Soccer Transfers in Italian)
- Perry-Castaneda Map Collection
- Need a map? Go here.
- Awstats
- The best open source web log analyser around. I compared it to analog and webalizer but they are too featureless against awstats.
- Ofofo
- Photo storage and sharing by Kodak
Work Interview by Mail
Yesterday my pals left me alone all morning because they attended the SMS presentation. I juggled some software maintenance and helping a quitting friend write his CV. Strangely enough, the company sent him the first interview by mail as a test.
The company he applied for is a Microsoft based security company, and amongst other questions there was a question about VS API. This is a Virus Scanning API integrated within Microsoft Exchange to ensure that each e-mail message is scanned at least once. The major advantage of this API is that if the message has already been scanned it is not rescanned thus increasing efficiency. There was a question about the NTFS file system and did a quick search to find additional info apart from the usual things everybody knows. NTFS allows security at file level while FAT does not, and theoretically NTFS provides better security against viruses.
Today I bothered to search how to split a huge file into smaller files in Linux. I split the 1GB web log file into 10 smaller files by "split b 100m combined_log" . The 100m stands for 100MB and sizes can be defined in bytes, kb or number of lines. Split then creates files with names xaa, xab, xac I finally compressed them with "tar czf xab.tar.Z xab"
After work we went to the computer store to replace my 7th million faulty RAM chip and solve the printer ink smudging problem. The ink problem was caused by a small piece of plastic that remained attached to the print cartridge. My RAM was a little more problematic because from three different sets of RAM none was compatible. I got my money back and spent half of them on cat food. She laughed so heartily when I got a 4kg dried food bag that half of the super market starred at us like idiots. My loved ones freaked out when they saw so much food. We played God and showered them with cat food.
FC Porto won the Champions League final beating Monaco by 3 0. Like all finals it wasnt an over enthusiastic game with Porto scoring the latter two goals from counter attacks. Morientes played a dull game but had a number of miscalled offsides to his disadvantage.
At last I am busying myself with Romania Research. Good Boy! These are the accommodation results of the Tulcea Region.
Tulcea
Maliuc vilage
Letea (typically village in the delta)
Mila 23 / Lakes Furtuna & Baclanesti
Crisan
Sf. Georghe
Uzlina
Hotels for Danube Trip
Tulcea
Hotel Egreta, Tel.0240.51.71.03 carmenjolo@yahoo.com
Hotel Europolis, Tel.0240.5124.43
Hotel Delta, Tel.0240.51.47.20
Hotel Ipo, Tel.0240.531.674
Maliuc
Mila 23
La VicaGuesthouse MARCOV, Tel.00 40 (0)240 546 452, 8 Euro, B & B
Crisan
Silviu Gheorghe
Trifim Sorin, 00 40 (0)240 547 077, 7 Euro, B & B
Calin Maria
Vasiliu Petre, 00 40 (0)240 547 021 petrerotl@yahoo.com, 10 Euro, B & B
Cacencu Trifan, 00 40 (0)240 547 066, 7 Euro, B & B
Gherasim Gabriel, 00 40 (0)240 547 020
Catching up with the week
I managed to finish my planned version of the corpus creation mini project. That's a good sign that I worked rather hard this week. Actually I still need to write the documentation and clean up the code but I'll try to do those at work, hoping it will not be a busy week. Now I must concentrate my efforts on Romania since we're still miles away from the usual holiday planning routine.
The difficultly I'm pondering upon at the moment is how to identify a full post in an RSS feed. There are some heuristics I can think of, but I need further research into this:-
- xx% of the items finish with ...
- xx% finish with a letter and no full stop (e.g. everywh</description>)
- Check whether the [CDATA tag helps in the identification
- Maybe total size of feed, but I think this can be dangerous
With all the hassle during the week I forgot to mention two important things. Last Friday we launched my most important system to date, to another 4 power users amongst which one outstation. At last things are taking a stroll forwards after the loads of bureaucracy and other banal stumbling blocks. The system main programming has been ready since December with the original launch planned for October; my God we're in the third week of May! A worst case project implementation. Despite this my soul is at rest because I was on schedule in all deliverables. There's little I can do if the project owner is more abroad than here, and the internal auditor has half a million other things on her mind.
Last month we squeezed the last ounce of ink out of our HP 710C until the cartridge ribbon tattered to strings. On Tuesday we brought an HP 5150 and more importantly a serious (PS like) Logitech joypad. I though this will pose a serious threat on my blog, allowing me to play Pro Evolution Soccer 3 as it is supposed to, but I had little time on my hands (and still kept blogging). I'd better remove it from my field of vision as I feel it calling each time I approach my PC. Let's wait and see.
In such a beautiful time of the year we are finding ourselves rather lonely because most of our friends are busy with exams. One of the worst consequences is our weekly volleyball game which is slowly fading away. At least yesterday night we returned to our good old Saturday night habits and held a bar-b-que in the wild. It was nice fiddling chicken in breadcrumbs by the fire. Having nothing better to do, today we washed our cars after about 6 months of filth gathering. It was nice so see my car white again. What's even more amazing is that I've borrowed a Vacuum cleaner and used it. This is a first for me.
Before this uninteresting special event, we went for the now habitual Sunday ice-cream. As soon as my aching bottom rested on the sea-side bench, I heard what seemed to be a duck. I turned at the sea, but before immersing in the blue I saw a most welcoming vision a PUG!!!! I almost started hyperventilating with the obvious amazement of his proud owner. Needless say, my eyes followed the beauty throughout the whole promenade. To my good fortune few minutes later a man with a green Mercedes stopped for a few seconds in front of us and he had another PUG cutely staring out of the window. I'm getting Goosebumps such amazing creatures.
Before closing I must say hi and thanks to Mega Volt who left a welcoming note in my BeBlog comment field. Your name wasn't new as I recalled your interesting anti-spam quests. I will delve deeper in your blog as it seems pretty appealing at first glance.
Posting of a busy day
- Javascript selective combo boxes - The best piece of work my brother did this week. I've been avoiding this function for ages now I can implement it.
- Perl DBI - I was implementing using the Don't do this part before, now I found the reason for a couple of errors.
- RSS Specification - A comprehensive, nicely formatted RSS specification
- Hacknot - Worth reading software development blog. Current article "The top 10 elements of good software design"
Blog Based Dynamic Corpus
Since I started blogging I realised that blogs have an enormous data value and have a great potential for various research areas. At the moment I am trying to create a dynamic corpus based on blogs. This is the first step which might open way for a full blown research project. I've re-looked at my thesis code after about 2 years.
Work was fragmented, but my main effort was on the corpus. I attended the presentation and as expected it was a total waste of time. We spent two hours listening to sales talk about products we already have, and were launched last year. I busied myself selecting music records from a catalogue and reviewed some research papers.
My wiz kid brother failed his HTML exam. I was furious at him as I've been preaching for a long time so that he'll start paying more attention to his studies. This was the easiest assignment for this semester, go figure what will happen with the others. I hope he'll get some more sense in his brains soon.
It seems that my mumblings about nobody indexing my site have been heard. Yesterday somebody visited mind spill from a Google referral.
Install Day
Today was install day at work. There comes a period when I take intense pleasure installing programs. I installed Webmin and PHP with Oracle and MySql support on the live machine.
Webmin is a graphical (web based) administration tool for Linux. I'm sure Linux hardcore administrators and our ex-security guy wouldn't be proud users of such tools, but run them whenever nobody is looking. Although I believe in the power of the command line, I must admit that I was amazed by the power and features Webmin provides. Basically all aspects of the operating system can be controlled via a web interface from anywhere. Webmin is essentially a series of perl scripts. It also has its own http server which must be run on any non usable port (default is 10000). I am a little bit hesitant installing such a system on an actual web server accessible through internet since I'm not well versant in the security issues involved with the project. I intend to test it on the intranet though. Anybody who ever touched a Linux box should at least know that such facilities exist.
I had some interesting discussions today with my planet trotter pal. The topic at hand was language evolution. Even though I was always aware that language evolution existed, I never met the term before. This topic definitely deserves more research.
Results 169 - 175 of 181 found. << Previous 1 | 2 | 3 ... 13 ... 24 | 25 | 26 Next >>
