Extra-terrestial browser

No Comments

Existence of extra-terrestial browser has been confirmed when visitors from outer space left clues to what tool they use when surfing the intergalactic information super-highway…

http://lug.oregonstate.edu/gallery/firefox-crop-circle/mg_5491_1
http://lug.oregonstate.edu/gallery/firefox-crop-circle/mg_5572
http://lug.oregonstate.edu/gallery/firefox-crop-circle/mg_5587
http://lug.oregonstate.edu/gallery/firefox-crop-circle/mg_5491_1
http://lug.oregonstate.edu/gallery/firefox-crop-circle/mg_5572
http://lug.oregonstate.edu/gallery/firefox-crop-circle/mg_5587
http://www.youtube.com/watch?v=-DsHlev5Dg4

Credits to Ariz and Gideon for providing the links!

๐Ÿ˜€

ciao!

Wanted: Optical trackballs

4 Comments

I am currently on the hunt for a good optical trackball for use here in the office. Apprently trackballs are a dying breed in today’s computer marketplace. I have hit a couple of online computer stores here in the Metro and nobody carries any trackball, even the non-optical kind. I also went to TipidPC to see if any enterprising individuals is offering or offloading an optical trackball. Nada, not even a single trackball hit.

I have also scoured the Glorietta shops since that is the nearest mall in the office and the only thing I saw was an overpriced Logitech wired trackball that seems to belong to the first generation of pointing devices.

Hopefully I can see a good trackball when we go malling this weekend . Neth still owes her nieces and nephew a trip to ‘Hall of Asia‘. ๐Ÿ™‚

ciao!

LLTHW: Importing Eclipse projects

No Comments

I thought I was starting a new acronym but it seems NetHack has already first dibs on Lessons Learned The Hard Way. ๐Ÿ˜€ Anyway, any posts that I tag with this acronym should be self-explanatory. ๐Ÿ˜€

One of the training machines we are using is encountering a weird error because the user could not launch the plugin project for debugging. To make the matters worse, the error message just contains an empty string. The other machines does not seem to exhibit the problem.

After an hour of trial and error, we finally figured out the problem. Eclipse does not like importing projects that are placed in the C:\ (or root drive). The solution was to place the project code base in a intermediary directory (C:\Something) and then proceed with importing it in the workspace.

I do not know the rational explanation for this one and my initial google searches does not reveal anything that is remotely related. I will just chalk this one as a lesson learned the hard way.

ciao!

WordPress write functions resulting to a 404 (page not found) error

4 Comments

This week I encountered an error when writing the wget post since saving or publishing it causes a page not found (or 404 in techie parlance) error. I found this thread in the wordpress support forum and tested the “limit” scenarios which did not fully apply in my case. Posting a short test message works but somehow even one paragraph from my wget post causes the 404 message.

Later on the support thread I read a mod_security issue that causes in the post with the word curl in the post. That hit me, curl is a download utility similar to wget!!! Just like in the post, I just enclosed wget in span element and voila, problem solved!

+1 karma for internet support groups!

Using wget

1 Comment

I use wget from time to time (via cygwin when I am in the office) but the most I have used on its parameter is the -c option. This post is a reminder of the options and tips that I could use and have used for the wget utility. Why not just consult the manpage? It is because it is easier to put it here for further reference. There are a thousand wget tutorial sites out there, so why waste space here? The answer to that is because I can. ๐Ÿ˜›

Usage: wget [options] URL

  • Instead of specifying the proxy using the environment variable http_proxy, consider putting it in /etc/wgetrc instead. Not advisable if you dont have a consistent single source of connection (e.g. prepaid cards,etc)
  • -c – continue the file being downloaded. nifty if you are downloading a big file although it requires the download site to support resuming.
  • –user-agent=”UA_STRING” – based on a tip from the PLUG list. Spoofs the user agent to look like the download request is from a browser. This is good for sites that disallow dowloads from download managers. Example would be -user-agent="Mozilla/4.0 (compatible; MSIE 5.0b1; Windows NT 5.1*) "
  • –limit-rate=[number] – limits the download rate so wget does not hog all the bandwidth. Appending a k at the end of the number signifies kilobytes per second.

More updates as I use more options. ๐Ÿ™‚

Tidy XML configuration for PSPad

4 Comments

Working in Windows in inevitable but that does not mean that I am without the good things that the Free Software (FLOSS or otherwise) has to offer.

My previous text editor of choice was UltraEdit but not all of my project has license for it so I started to look for “worthy alternatives”. The closest alternative that I found and currently use is PsPad which has most of the functionalities offered by UltraEdit, and then some.

Since my work brings me into contact with a lot of XML-type of content, the built-in tidy support is very useful especially if I want to do comparison (but I use WinMerge for that). Below is my configuration for XML pretty-print:

[TiDy Fix XML indent]
input-xml:yes
indent-attributes:yes
break-before-br:no
doctype:AUTO
fix-bad-comments:yes
indent:yes
indent-spaces:4
markup:yes
output-xml:yes
quiet:yes
tidy-mark:no
uppercase-attributes:no
uppercase-tags:no
wrap:100
wrap-attributes:yes
write-back:yes

F/LOSS life is sweet. ๐Ÿ™‚

ciao!

One liner: get the last field

No Comments

Problem: I need to get a list of all java libraries in our repository so I can create a matrix of when they are being used and what is type of license they are using. I tried using a pure Windows approach but it is taking too much time so I used Cygwin instead. Getting all JAR files is easy with find but I am having difficulty brewing the correct regexp syntax so why prolong the agony and not switch to another tool instead: awk!

find . -name *.jar | awk -F/ ร‚ยด{$NF}' | sort | uniq

where:

– find searches recursively from the current directly for all files that end with ‘.jar’
– all resulting file paths are piped to awk which, using the forward slash as the column delimiter, prints out the last column
– and finally the list of JAR files are sorted alphabetically and duplicates are removed.

This could probably be done in a whole lot of ways (perl, python, sed, etc.) but the beauty of FLOSS is we can use whatever we can to get the same result. ๐Ÿ˜€

ciao!

Blog migration completed

4 Comments

The migration of the pertinent posting and comments have been completed from the blogsome account. It may look like most of the comments were made by a single man but that is one of the drawbacks of manual migration. ๐Ÿ™‚

The xml-rpc page of this site does not seem to work as well as the feeds section but that is something to do in the future.

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!

The talk of the (geek) town

No Comments

Google has launched its own IM and Voip service and it is free! Wait scratch that, it is not just free but without annoying ads! Like it’s Gmail service, google-talk is still in beta but if you already have Gmail then you can use that to sign-in on Google-Talk.

Google-talk is based on the Jabber framework so you can use other IM clients to chat with Google-talk users. Google even provides an inital list and their capability/availability matrix. Too bad you can only use the talk functionality when you use the official Google-Talk client.

The client is pretty slick (and mine is pretty barren at the moment). You can enable the “friend’s list” to include everybody in your contacts list but if you are like me then that list contains 400 entries and I dont want them to be listed in the talk client. I wish there is an option to limit that to Gmail contacts but according to Google help center the people you most frequently ‘communicate’ with will appear in the list. Even if this people dont have Google-Talk, you can still use these contacts for sending email. You just have to click the gmail envelope across their names. Now if only you can specify which browser it uses because I have mine defaulted to IE as required by the office.

The hype on this service is pretty high and since it is still in beta stage then expect some problems now. I suggest waiting till most of the furor settles down. And since it is still in beta, the functionality offered by Google Talk is rather sparse and Google would need to add more features that is at par or better than the ones offered by current IM providers before it could sway people to their fold. Knowing Google, this is already planned so all we could do is wait. And watch for those saying Google is evil since this is another ammunition in their argument bank. ๐Ÿ˜€

ciao!

Older Entries Newer Entries