Sunday, December 24, 2006 - 5:00 PM
-
Labels:
firefox
Every time I set up a new Firefox installation for someone, or myself, I spend the next 15-20 minutes trying to figure out how to change the tab focus settings to allow tab focusing for elements besides form input fields. For some reason, I never can get the correct Google search terms entered to find this. Anyway, if anyone wonders, here is what you do.
- type in the address about:config in the URL bar of Firefox. This isn't a valid url, but it resolves to the configuration settings for you browser.
- if your installation doesn't have a setting called accessibility.tabfocus, create one by right clicking and selecting "New" -> "Integer".
- set the value to the selection that fits your needs.
Possible settings
1 : Text field form controls only
2 : All form controls except text fields
3 : All form controls
4 : Hyperlinks and hyperlinked images
7 : All form controls and hyperlinks
Well, I'm on vacation, and I'm still tied to the computer. I've been working on a small project for a few members of my family. For those interested, the project is a del.icio.us Firefox extension. The purpose of this extension is to provide quick access to your del.icio.us bookmarks seemingly through Firefox natively.
The extension is actually quite easy to develop. del.icio.us gives a very comprehensively documented api to speed up the process. I am using two different methods to access bookmarks from their site.
I'm using a combination of these to prevent my extension of being throttled. Their direct api has an access limit of one request per second or they will begin sending you 503 errors meaning you have been throttled. So, I use their api to gather bundles, and their feeds to request bookmarks for certain tags. The benefits of using their feeds is that I've not had any throttling issues and it is available as raw JSON, the drawbacks are that there is a delay from the time you add a bookmark until it shows up in your feed and it limits you to 100 results.
There are still a lot of features that I need to implement, but overall it is working out nicely and I find quite a bit of use for it.
Our second Ruby project that I spoke of has been progressing quite nicely, here are the stats for this second project.
Line Count Stats
Line count for src...... 1796
Line count for proc..... 9
Line count for util..... 256
Line count for unit..... 3095
Line count for web...... 7428
Line count for misc..... 198
--------------------------------
Total................... 12782
Unit Test Stats
Started
............................
Finished in 19.257698 seconds.
79 tests, 1669 assertions, 0 failures, 0 errors
Wow, it has been a very busy month since I've posted last. I've not posting in a long time and I'm going to try to rectify that.
Project Update:
Our Ruby project is going well. So well in fact that we have begun another project using the same framework. I'm very excited.
Today is my last day at work for the year, I'm taking the remainder off and enjoying time with my family. I won't however, stop developing, I've got a little project I'm doing for my family that I'm going to try to wrap up.
Monday, November 13, 2006 - 10:26 AM
-
Labels:
programming
Over the weekend I took it upon myself to try creating a Firefox extension. I was lacking for a good idea, so I donated some time to my company and created an extension that would ease the use of one of our internal applications. As such, I can't post it publicly, but I was very impressed with how easy it was to create.
Firefox extensions are basically an xml file to describe the UI (.xul), a couple RDF files to help the installation process, and JavaScript. There are many tutorials on the web you can search for. The one the got me started was found here.
Here is an interesting link about the beta? release of Java 6. I've really been looking forward to this release due to the hype it is getting.
Source: http://headius.blogspot.com/2006/11/java-se-6-passes-final-jcp-approval.html
Due to our hectic schedule and the low priority this project has, we're not exactly burning up the keyboard coding it, but we are having fun.
Code count:
Line count for src...... 484
Line count for proc..... 9
Line count for util..... 176
Line count for unit..... 376
Line count for web...... 9
Line count for misc..... 153
--------------------------------
Total................... 1207
Unit test results:
Started
.....................
Finished in 0.661805 seconds.
21 tests, 107 assertions, 0 failures, 0 errors
Jim Plush posted an interesting article on memory management for Firefox web apps. I've not tested his findings yet, but they look pretty good. In this world of fancy DOM modifications in a browser, memory management becomes a huge issue.
Source: http://www.litfuel.net/plush/?postid=148
As I've mentioned in the past, I'm working on a project using ruby. Here are the line count stats as of this afternoon:
Line count for src...... 305
Line count for proc..... 9
Line count for util..... 176
Line count for unit..... 235
Line count for web...... 9
Line count for misc..... 147
--------------------------------
Total................... 881
Here are the unit test stats:
Started
.............
Finished in 0.192702 seconds.
13 tests, 56 assertions, 0 failures, 0 errors
So far, so good.
For the curious, here is the bookmarklet I wrote thanks largely to Google:
click here
Note: This only works right now in Firefox, but the concept would be similar for other browsers, also be sure to select some text on your page before clicking on the link. I have no error checking in place, just a prototype.
Today I was toying with the concept of how to create a bookmarklet that would scrape a page pulling text, formatting, and photos to make a copy of the selected information on an active page. Basically a script that could be used with a web clippings type application. I have no immediate use for this, but wanted to explore the strength of bookmarklets. As I sat trying to figure out how to get this information from a page, I realized that Google Notebook does this with their Firefox extension. I was able to look at the code for their extension which is written in javascript and come up with the functionality to do this.
Learning from the web doesn't just entail doing Google searches and finding someone who tells you what to do, but it also provides wonderful examples of implemented technology on every page. What a great resource.
Gruff is a very simple graphing library for Ruby. It creates very simple, clean graphs with very little coding. I've been searching for something like this for quite sometime now.
Here is a sample graph of the hours per week logged on a project I'm working on along with 2 other employees:

Check out the Gruff sample gallery (link)
Note: Gruff is easy to install, but the required dependancies were quite tricky. I was warned on the dependancies websites that it wasn't easy, but being cocky as I am, I went ahead and ignored them and tried to figure it out myself. Many hours later, I found myself reading the instructsions found at http://rmagick.rubyforge.org/install-osx.html which then worked. One problem I ran into however was that I had to uninstall what I had already tried by running "make uninstall" from the various libraries I already tried to install :)
I read an article on Ajaxian yesterday about an online organizer. It seemed very promising. There was a nice little video of the service they will supposedly provide which looked great. The just of the service provided by Scrybe would be to have a centralized place one could hold their calendar, todos, and notes/scraps from websites. I hope they can pull it off.
Source: http://ajaxian.com/archives/scrybe-online-organiser-with-true-offline-support
It has been a while since I've written about the Ruby project we are undertaking here. Reporting its progress has been lost in the shuffle of writing about bugs and other things.
The project is going well. We're adapting to some of the smaller things about Ruby such as adopting naming conventions (http://wiki.rubygarden.org/Ruby/page/show/RubyStyleGuide), RDoc, and most importantly unit testing. I feel we are writing very clean code right now. It seems that with Ruby you can focus more on the task at hand and proper algorithms rather than language semantics.
I'm very pleased.
Yesterday's post spoke about an error that I could create in the Tomcat web server. Today I was getting ready to put in a bug report to Tomcat. Now I can't recreate the error! So, perhaps it isn't a bug in Tomcat, or perhaps (and definitely more likely) it is a combination of certain environmental factors that causes Tomcat to behave as such. I'll keep an eye on it and try to discover it again.
I've been rather silent the last few days. With good reason, I've been dealing with a crazy bug in a piece of software our group wrote. The application is 400,000 lines of code long.
Many times as I've searched for bugs in code I get to the point where I think it is 3rd party software only to be proven wrong -- that it is my software. It's always embarrassing when I make the statement that it isn't my problem, but someone else's only to be wrong. Once again, I believe the problem is elsewhere.
Here is the scenario. We have an application which makes many requests to a REST styled web service. We have many clients who run this application. We have noticed that randomly one client will get another client's response. It doesn't happen often, it isn't hardly noticeable, but it is wrong. We are using Tomcat as our web server, our web service is powered by a servlet which I believe isn't handling concurrent requests. To test this, I created a simplified version of our servlet. I pass two parameters to this service, a client id and a random string. The servlet then does a MD5 hash of that string and passes it back along with the client id and the original random string. I'm basically just doing some processing to take up a cpu cycle or two. I have a client with creates 8 different threads, each with their own client id. I then begin make a huge number of requests to the servlet and check to make sure the response's client id matches the requester's client id. It fails after about 1000 requests.
I'll keep looking through this problem and see if I can find a solution.
As a side note, I have the same "servlet" running as a ruby cgi script, it does the same thing, being ran from my same client. I'm at my 16000 request without an error...
Once again, I feel rather sheepish about my lack of knowledge regarding a new language. I just don't know the available resources as well as I should. I spent a good bit of time this morning looking for a Ruby email parsing class. The usual search methods weren't turning up any good results and I was left contemplating writing my own. Then I stumbled onto the website RAA - Ruby Application Archive. What a wonderful site, it is a repository of ruby classes for every imaginable use. It has a great navigational system of possible libraries with sub category names -- in no time flat I was looking at a list of 14 relevant libraries. I chose to go with rubymail by Matt Armstrong.
I guess what I've learned from this is that different languages have a core set of essential resource websites that it is worth finding, bookmarking, and utilizing. This is obviously one for Ruby.
Wednesday, October 11, 2006 - 8:01 AM
-
Labels:
misc
Great idea, not too original, but extremely convenient and great implementation. They've combined two things which logically go together, but added a few things that make it nice such as the currently popular tagging notation. I like it and I'm using it.
Source: Better together: Docs & Spreadsheets
Monday, October 09, 2006 - 3:42 PM
-
Labels:
misc
I've spent the better part of the day recovering from my backups. I lost my hard-drive on my work computer over the weekend. Fortunately, I'm rather meticulous about backing up my data. I'm restoring from a backup that was successfully ran at 2am Saturday morning.
Although I'm rather picky about what I backup and how often, I've ran into a few scenarios that have me rethinking my backup process. I'll blog about those issues and possible solutions once I figure out my ideal situation.
We're beginning our official coding for our Ruby web app. Here is our setup:
Myself and one other employee will be working about 1 hour per day on this project and we're both quite excited.
Total lines of code so far: 76
*We chose Mod Ruby over FastCGI and Mongrel due to the fact that although this is a popular application we are running, the number of users are limited and we were curious as to how well it would work. We do have FastCGI installed in case we need to revert.
Thursday, October 05, 2006 - 8:02 AM
-
Labels:
programming
Google recently released a source code search engine (article here, search engine here.) Krugle released a source code search engine earlier this year and has an amazing product. By available features and ease of use, Krugle currently has nothing to worry about at all. However, if I were Krugle, I'd be a bit antsy. I love Google, but they have a way of dominating things. Worse yet, because of their fame they could dominate with an inferior product but a more widely recognized name.
Good luck Krugle, you're product is wonderful.
Today Google announced that they will be providing support for allowing their Gadgets to be added to any website. This is pretty cool really. Originally, these Gadgets were only available on Google's Personalize Homepage. Gadgets available for porting to ones own site are available here.
Interestingly enough, Google who owns Blogger won't allow you to include one in your blogging posts.
Source: Yes, you can have a pony
Tuesday, October 03, 2006 - 4:09 PM
-
Labels:
programming
It is inevitable, sometime during the software development life-cycle, programmers are required to make a quick update just to get something to work that it time sensitive. The problem with these quick updates lie in the fact that due to their time sensitive nature, programmers aren't able to think up all of the possible consequences of such an update or adequately write test cases or sometimes even test.
Today I did a quick update and I'm anxiously holding my breath for the results to be in.
I was doing some research on unit testing with Ruby when I stumbled onto a great article. It impressed me not for the information presenting on unit testing, but rather the approach to learning a new language.
Quote:
But it was at that very moment when I asked Ruby a question and it responded with the answer that I learned more than Ruby. I knew right then that I didn't want to run the example just once. No, I wanted to preserve the example and ultimately build a Ruby knowledge base that I could draw from later. That meant the examples had to be executable and check their own results. That sounded familiar. I needed to write tests.
This is potentially quite useful. Often times, I search and search for a way to do something, do it, and forget about it until I find myself searching for it again. If when I found something I put it into a central repository, I could find it much easier in theory.
Source: Ruby Learning Test #1: Are You There, World?
In hindsight, it is rather humorous the time one may spend trying to learn how to do the simplest of things programmatically. While it is happening, it can be the most frustrating experience you've had.
As noted earlier, we are working on a web app here at work using Ruby. This project is going to not be using the Ruby on Rails framework. It is going to be a series of web services developed with Ruby and a few Ajax enabled web pages that call and use these services.
Prior to starting this project I worked with the Ruby MySQL module found here and determined that it was impossible to call stored procedures using it. Yesterday, I stumbled across an article from Planet MySQL showing how wrong I was, it is possible. They displayed the following code:
dbh=Mysql.init
dbh.real_connect("127.0.0.1", "root", "secret", "prod",3306,nil,Mysql::CLIENT_MULTI_RESULTS)
which fixed the problem completely. They explained:
If you try to call a stored procedure that returns a result set, you'll at first get a "procedure foo() can't return a result set in the given context error". This is because the CLIENT_MULTI_RESULTS flag is not set by default when the connection is created
Such is the frustration of learning a new language, you aren't aware of all of the little nuances that are used to make it work well.
That being said, I'm still very excited about using the Ruby language. It is going well!
I use the blogger template Minima. It is a very nice layout in my opinion. I have however noticed a problem with this template. Whenever I use the blockquote tag, the remainder of my blog has formatting problems. It appears as if the spacing between lines is compressed. I have a quick hack to this problem, after using a blockquote I then wrap the remainder of my post in paragraph tags. Upon doing this, the problem is fixed.
I'm sure there is a much more graceful way of fixing this problem by modifying the html of the actual template, but this is quick and easy for me, plus I don't have to remember it and do it again if I ever change templates.
I received an invite to upgrade my Blogger account today. I like the new features. I particularly like the labels that have been added. The only problem seems to be something with the layout doesn't look correct. I can't quite put my finger on it, but it seems to change fonts part way through my posts. I'll continue to look into it and report anything useful I find.
Selecting a programming language is quite a process with lasting effects. Here where I work, we currently use Java. I enjoy it despite some of the bad press it is getting lately. It has great tools, great support, and great documentation. I do however, wish I was programming in something different -- Ruby. Unfortunately, we are so invested in our infrastructure and training that it becomes quite a task to change.
We have a few Ruby evangelists here including myself and we are making a bit of noise. We are about to do a rewrite of a highly used but simple web app here in the next couple months, our trouble ticket program. We will be doing it as a proof of concept as well as the needed upgrade it will be. Hopefully, everything will go very smoothly and we'll be well on our way to adopting a new standard language for a our department.
Go Prototype! As quoted by Ajaxian.com:
The results of our second annual Ajaxian.com survey, prepared by Richard Monson-Hafael from the Burton Group, are in. And the winner is… Prototype, the most popular Ajax framework, by a considerable margin: 43% of you use it.
The company I work for is one of those that use Prototype. Our Ajax platform came in second - Java. While I'm very passionate and dedicated to our framework, I would change our platform to Ruby if we could, but at this time switching costs are much too high.
Note: I agree with the first comment listed on this article, I do not believe Prototype to be a framework but rather some utility classes/functions, but that is beside the point right now.
Source: Ajaxian - Ajaxian.com 2006 Survey Results
What can you say? Happy Birthday Google! It is amazing the presence you have gain in 8 short years!
Official Google Blog: How long is 8 years in Internet time?
Tuesday, September 26, 2006 - 2:55 PM
-
The servers were saved. While we did have a water leak, no major damage occurred, the water was diverted and no hardware will need to be replaced. However, I do hope that they redesign the routing of pipes above that room.
Monday, September 25, 2006 - 4:36 PM
-
I kid you not, I am currently expecting rain. My moniker Expecting.Rain has nothing to do with rain, but rather a Bob Dylan song I'm quite fond of... Desolation Row. I think it is a very funny song. However, right now I'm literally expecting rain. We currently have an air conditioning problem above our server room causing a water leak immediately over a rack of servers. Talk about horrible design! Our Network Admin seems to think it is funny. Anyway, I need to go take my shift with the umbrella.
Friday, September 22, 2006 - 3:08 PM
-
As one may have concluded from my blog, I use Firefox and make use of the extensions that are available. Of all my extensions, my favorite is FireBug by Joe Hewitt which can be found here.
According to Joe Hewitt's site:
FireBug lets you explore the far corners of the DOM by keyboard or mouse. All of the tools you need to poke, prod, and monitor your JavaScript, CSS, HTML and Ajax are brought together into one seamless experience, including a debugger, error console, command line, and a variety of fun inspectors.
According to me, FireBug is a Firefox extension to allow you to debug your own web applications by way of inspecting your DOM, your JavaScript, etc. It also allows you to understand and learn from others by inspecting their websites.
Some of my favorite features are DOM inspection, the JavaScript command prompt, and the ability it give you to monitor XMLHttpRequests a page may be calling. It's pretty useful, check it out!
Yahoo! has just release a Developer Center for Ruby development. While I mainly do my development in Java, I prefer Ruby. I really enjoy it as a language, not just the benefits the Rails framework provides.
This is pretty exciting to me.
Anyway, the Yahoo! Developer Network - Ruby Developer Center can be found here.
Thursday, September 21, 2006 - 12:53 PM
-
FoxyMeter :: Mozilla Add-ons :: Add Features to Mozilla Software
It is quite scary how many pages I "surf" each day. While not particularly useful, it is a very amusing extension.
Wednesday, September 20, 2006 - 4:35 PM
-
I'm a Software Engineer. It is what I do, it is what I enjoy. I particularly like the initial phases of projects when you aren't developing software as much as determining how to implement the task at hand and creating prototypes.
Naturally, I'm fascinated with new ideas and technologies. Having this inclination, I've spent a significant amount of time gaining from what others have written and learned. Unfortunately I've not reciprocated by passing on what I've learned to others. I hope to use this blog to fix that. In this blog I'll link to various articles/posts I find interesting, occasionally expressing my opinion on the matter, but not always. As well, as I put ideas together, I'll post about them to get feedback from others and to log the process I'm going through.