Android Speed Test

Posted by Ben Reubenstein Sat, 25 Oct 2008 06:44:00 GMT

The Android G1 phone is in my hands. Although it definitely lacks the polish of the iPhone, it certainly has huge growth potential, especially for developers. Xcellent Creations has finished up the web based Internet speed test, iNetwork Test for Android web edition. The native version is in the works and we hope to have it pushed to Market Place soon.

Tags , , , , ,  | no comments

Rally

Posted by Ben Reubenstein Sat, 18 Oct 2008 02:13:00 GMT

I have tweeted twice in regards to Rally Software's agile project management system.

"RALLY STOP STEALING MY #$%^(*& FOCUS."

and more recently:

"RALLY IS THE WORST FUCKING PROJECT MANAGEMENT SOFTWARE I HAVE EVER USED. FIX THE UI ALREADY, THIS IS 2008."

Now I must admit that the second tweet was knee jerk and in the heat of frustration. Rally has developed a product to help with Agile Development practices and it has allowed a team I work with to organize and complete a very large project. I appreciate their representative getting in touch with me after the nasty tweet and offering to help me out with some training. I like training, but feel that quality web applications these days have labored over their UI to provide a dead simple interface so that it can help and not hinder productivity. To quote a master in this art, 37signals, "Simple interfaces are easier to use, easier to understand, more intuitive, faster loading, and easier to maintain". I would like to offer Rally some constructive criticism, a much better alternative to cursing on Twitter.

My first tweet, "RALLY STOP STEALING MY #$%^(*& FOCUS.", was in reference to my session timing out. When this happens Rally pops a javascript dialog box stealing focus. Furthermore the default session time is EXTREMELY short at 30 minutes. You can increase this up to 4 hours in your profile, however software should have reasonable defaults. Rally is supplemental software to my day, it will be open ALL day, so don't keep kicking me out.

The actions menu is out of tune with its context. If you are on the Tasks page for a User Story the most likely thing to do is add new tasks. HOWEVER that menu includes all the actions for a story, INCLUDING making a new story. The "New Task" item is at the bottom of the list. I cannot tell you how many times I have created several "tasks" only to realize I hit the wrong option and now have added several unnecessary stories. Another small issue I have with this screen is that navigation items on the left do not emphasize the current page as you move around.
You can set the status at both the Story level and the Task level. The two do not seem to interact well and will sometimes result in stories that are marked complete that actually have tasks still in progress. A story should not be marked as complete until all tasks within the story are marked complete.
Pop up windows are another huge gripe I have with pretty much any site these days, and almost everything you do in Rally will eventually result in a pop up. I can only do one thing at a time and most things I do, especially when it comes to project management, are linear. Eliminate the pop-ups, simply take the user to a new screen.

I would be interested to know if others out there share any of these issues, feel free to leave your comments.

Tags , ,  | 2 comments

Netgear WNR834B to WNR834B Internet Connection Briding

Posted by Ben Reubenstein Sun, 28 Sep 2008 21:42:00 GMT

A friend of mine had horrible reception at the far end of his house for his wireless network. He purchased matching WNR834B Netgear routers and needed to bridge them. Let me start by saying, the below setup CAN BE DONE, but it is not straight forward, well documented, or easy to do. This is the setup I finally got working

Internet Modem -wired- WNR834B (master router) -wireless- WNR834B (wireless repeater)

Here are some tips to get it going:

  • Setup the first router and make sure everything is working properly
  • When setting up the wireless repeater, wire your computer to it and statically set your IP address, do not try to set it up wirelessly
  • Turn off the DHCP server of the wireless repeater
  • Meet all the requirements in section 4-12 of this document

Posted in  | Tags , , , ,  | no comments

Optimize Large MySQL Table Queries with Indexes

Posted by Ben Reubenstein Sat, 23 Aug 2008 03:59:00 GMT

I have been using the magic of Rails for a lot lately but some of those apps are starting to take off and get slow. It isn't Rails however it is MySQL queries to big tables. You don't have to be a MySQL rocket scientist to really make a huge difference. Want to improve queries to your big tables? Add indexes for the columns you use most in your where clause.

1. Turn on slow query logging in your my.cnf (most likely in /etc/mysql/my.cnf). Most like you will just have to uncomment this line:

log_slow_queries = /var/log/mysql/mysql-slow.log

2. Examine your logs and then use the mysql EXPLAIN query to see why it is performing slowly. This query needs to look at almost the ENTIRE table to find a result.
mysql> EXPLAIN select * from network_tests where user_id = 1;
+----+-------------+---------------+------+---------------+------+---------+------+--------+-------------+
| id | select_type | table         | type | possible_keys | key  | key_len | ref  | rows   | Extra       |
+----+-------------+---------------+------+---------------+------+---------+------+--------+-------------+
|  1 | SIMPLE      | network_tests | ALL  | NULL          | NULL | NULL    | NULL | 264559 | Using where | 
+----+-------------+---------------+------+---------------+------+---------+------+--------+-------------+
1 row in set (0.00 sec)

3. Add indexes to the columns that you are querying on most:

mysql> ALTER TABLE network_tests ADD INDEX(user_id,test_key);
Query OK, 285075 rows affected (1 min 7.14 sec)
Records: 285075  Duplicates: 0  Warnings: 0

4. Run explain again, see how many rows now need to be checked for this query? VERY NICE!.

mysql> EXPLAIN select * from network_tests where user_id = 1;
+----+-------------+---------------+------+---------------+---------+---------+-------+------+-------------+
| id | select_type | table         | type | possible_keys | key     | key_len | ref   | rows | Extra       |
+----+-------------+---------------+------+---------------+---------+---------+-------+------+-------------+
|  1 | SIMPLE      | network_tests | ref  | user_id       | user_id | 5       | const |  118 | Using where | 
+----+-------------+---------------+------+---------------+---------+---------+-------+------+-------------+
1 row in set (0.00 sec)

Tags , ,  | 1 comment

iPhone Optimized Olypic Medal Totals

Posted by Ben Reubenstein Sun, 10 Aug 2008 16:39:00 GMT

After my initial surfing on my iPhone for Olympic medal totals, I found no immediate results for an optimized mobile experience. I wrote up a quick site after which I immediately found NBC's mobile site. Mine is super simple, and can be found at iPhone Olympic Medal Counts. CHEERS.

Tags , , , ,  | 1 comment

George Carlin

Posted by Ben Reubenstein Tue, 24 Jun 2008 04:49:00 GMT



May 12, 1937 – June 22, 2008

no comments

iNetwork Test Launches

Posted by Ben Reubenstein Tue, 10 Jun 2008 01:47:00 GMT

After almost a year of collecting data and half a million results recorded, Xcellent Creations, Inc. has released the next version of the iNetwork Test web application. The iNetwork Test web application for iPhone has been moved to http://www.inetworktest.com/iphone_content. The main iNetworkTest.com is now a portal to Mobile Network Testing Results.

User's can now create an account which allows them to save all of their results and create a personal results map. This build out will also support new versions for the Android platform and the iPhone.

Posted in  | Tags , , , ,  | no comments

Server Move

Posted by Ben Reubenstein Fri, 02 May 2008 00:24:00 GMT

If you are reading this you are hitting the new server. I separated my sites out into two servers, one running a LAMP stack and the other running a LNMR (Linux Nginx MySQL Rails) stack.

Tags ,  | no comments

PHP Compiled From Source Mac OS X Leopard

Posted by Ben Reubenstein Sun, 13 Apr 2008 21:06:00 GMT

After getting passenger up and running I realized that I didn't have PHP cranking with the freshly compiled Apache. Here are the steps I took to get PHP going:

  1. Compile PHP from source, be sure to check out ./configure --help for more compile options. Also as always adjust to your systems paths as necessary.

    wget http://www.php.net/get/php-5.2.5.tar.gz/from/this/mirror
    tar -zxvf php-5.2.5.tar.gz
    cd php-5.2.5
    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-curl
    make
    sudo make install
    
  2. I am not sure why but the php bin file ends up being called php.dSYM. There might be a compile option I missed to fix this or it could be the Mac OS X compiler. I fixed the issue by creating a symlink.

    sudo ln -s /usr/local/php/bin/php.dSYM /usr/local/php/bin/php
    
  3. Add /usr/local/php/bin to your path in .bash_login and reload your terminal so that it is in your path. You can confirm that you are getting the right php by issuing:

    which php
    #The command should return:
    /usr/local/php/bin/php
    
  4. Add directives to the httpd.conf for Apache to find the PHP module and handle .php files

    LoadModule php5_module        modules/libphp5.so
    AddHandler php5-script php
    
  5. Restart Apache

    /usr/local/apache2/bin/apachectl restart
    
  6. Put a file in the root of your server or in virtual host directory called info.php with the phpinfo command. Visit the file via your web browser to confirm your install.

    <?php phpinfo() ?>
    

Be sure to leave comments with any issues you have, or updates I can make to this document.

Tags , ,  | 1 comment

Setup mod_rails Passenger Mac OS X Leopard

Posted by Ben Reubenstein Sat, 12 Apr 2008 22:32:00 GMT


UPDATE:

In the latest version of Phusion Passenger (mod_rails) 1.0.3 the default Mac OS X Apache installation is now supported! If you're still into rolling you're own these directions still apply. To upgrade to the latest version if you already have it working:

passenger-install-apache2-module
sudo passenger-install-apache2-module
sudo /usr/local/apache2/bin/apachectl restart

Today I was very excited to see that Passenger (mod_rails for Apache) had been released. Here is how I got things rolling on my Mac OS X Leopard installation. Be sure to refer to the official docs for more information.

  1. Compile Apache2 from source. The passenger-install-apache2-module warned against using the Mac rolled Apache. I used a pretty broad ./configure, feel free to customize.

    curl -O http://www.alliedquotes.com/mirrors/apache/httpd/httpd-2.2.8.tar.gz
    tar -zxvf httpd-2.2.8.tar.gz
    cd httpd-2.2.8
    ./configure --prefix=/usr/local/apache2 --enable-access --enable-actions \
    --enable-alias --enable-asis --enable-auth --enable-auth_dbm \
    --enable-auth_digest --enable-autoindex --enable-cache --enable-cgi \ 
    --enable-dav --enable-dav_fs --enable-deflate --enable-dir --enable-disk_cache \ 
    --enable-dumpio --enable-env --enable-expires --enable-fastcgi --enable-file_cache \
    --enable-headers --enable-imap --enable-include --enable-info --enable-log_config \ 
    --enable-log_forensic --enable-logio --enable-mem_cache --enable-mime \
    --enable-mime_magic --enable-negotiation --enable-perl --enable-rewrite --enable-setenvif \
    --enable-speling --enable-ssl --enable-status --enable-suexec --enable-unique_id \
    --enable-userdir --enable-usertrack --enable-version --enable-vhost_alias --enable-so \ 
    --enable-module=all --enable-shared=max
    make
    sudo make install
    
  2. Install the gem

    sudo gem install passenger
    
  3. Add /usr/local/apache2/bin to your path in ~/.bash_login so that it can find your new apache2 install, then run the command to build the module.

    sudo passenger-install-apache2-module
    
  4. Follow the prescribed instructions from mod_rails adding the following to /usr/local/apache2/conf/httpd.conf. BE SURE TO USE THE SETTINGS DUMPED OUT WHEN YOU RUN passenger-install-apache2-module as the paths on your system may differ.

    LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/ext/apache2/mod_passenger.so
    RailsSpawnServer /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/bin/passenger-spawn-server
    RailsRuby /usr/local/bin/ruby
    
  5. Setup a folder to hold vhosts

    sudo mkdir /usr/local/apache2/conf/vhosts
    
  6. Add an Include to httpd.conf as well and turned on Name Based Virtual Hosts

    NameVirtualHost *
    Include /usr/local/apache2/conf/vhosts/*
    
  7. Create a virtual host(s) that points to your rails app public folder. You can create one for each app you would like to run with Apache

    # Example App
    <VirtualHost *>
      ServerName app.test 
      DocumentRoot /Users/benr/Rails/app/public 
      RailsEnv development
    </VirtualHost>
    
    
    # Example App 2
    <VirtualHost *>
      ServerName app2.test 
      DocumentRoot /Users/benr/Rails/app2/public 
      RailsEnv development
    </VirtualHost>
    
  8. Edit /etc/hosts file to include a line for the vhosts

    127.0.0.1  app.test app2.test
    
  9. Now I store my apps in /Users/benr/Rails, so I turned on the User Home directories mod

    # User home directories
    Include conf/extra/httpd-userdir.conf
    
  10. I then configured the httpd-userdir.conf so that it used that folder, much like in the default Mac Apache it allows you to put a site in ~/Sites

    UserDir Rails 
    
    
    <Directory "/Users/*/Rails">
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS>
          Order allow,deny
          Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS>
          Order deny,allow
          Deny from all
        </LimitExcept>
    </Directory>
    
  11. Start Apache

    sudo /usr/local/apache2/bin/apachectl start
    
  12. To restart your app, create a file called RAILS_ROOT/tmp/restart.txt and reload your page. < HOT!

Voila! It worked when I visted app.test and app2.test. The most important thing to remember is the defaults that mod_rails uses. I was having a lot of trouble and it turned out to be the fact that it was defaulting to production mode. The best place to track down the errors is in your RAILS_ROOT/log/YOURENV.log

If you would like to have your newly compiled Apache start on boot, Jose Hales-Garcia posted this comment:

  1. Create a new file in /Library/LaunchDaemons

    sudo pico /Library/LaunchDaemons/org.apache.httpd.plist
    
  2. Paste in the following lines and save the file (UPDATED thx: ecchi):

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>org.apache.httpd</string>
        <key>ProgramArguments</key>
        <array>
          <string>/usr/local/apache2/bin/httpd</string>
          <string>-k</string>
          <string>start</string>
            </array>
        <key>RunAtLoad</key>
        <true/>
        </dict>
    </plist>
    
  3. Load the daemon into the launchd system using the following command:

    sudo launchctl load -w /Library/LaunchDaemons/org.apache.httpd.plist
    

That's it. The local httpd daemon will load on start-up after that. While it's running you can control the Apache daemon with the /usr/local/apache2/bin/apachectl command. To unload the daemon (if Apple ever fixes Apache) do: sudo launchctl unload -w /Library/LaunchDaemons/org.apache.httpd.plist

UPDATE! Also remember to trash the .htaccess that comes with Rails. This was jacking up a couple of my applications.

UPDATE 2 Don't forget to turn off the Mac OS X Apache if it is running. System Preferences > Sharing

HOPE THIS HELPS! Pease leave comments with suggestions or issues you run into!

Tags , ,  | 20 comments

Older posts: 1 2 3 ... 13