Archive for the 'Uncategorized' Category
JQuery Validation

If you already use jquery for your javascript framework.  May I recommend jquery validate.  Simply put, the just javascript form validator I have ever used, and I have used a few.  This is one is a real winner.  It’s one line of js, and you put stuff like class=’required’ or class=’required email’ inside of your input tags.  That’s it.

Development

Been working on a project for a while and it got me thinking about some project flow.  I use cakephp, yui, and jquery frameworks to help speed up development.  In general this makes projects go quicker, at least initally.

Once the broad strokes is done, development slows.  And this is to be excepted, when somebody builds a house, the framing goes really quick, but the finishing takes a long time.

When you get to the end that seems to be when the rush of feedback happens.  Feedback from the people that you are building the application for that is.  Sometimes the feedback is dumb, sometimes not, sometimes it means redo parts of the application.  Lots of wisdom applies here from the “eat your own dogfood” thinking or the “build for yourself” people.

Success often is in the details though.  Lately I have been thinking about just ignoring the details until close to the end, then really focus on them.  So far, I think this is a good idea.

JQuery and Speed

I use jquery a fair amount.  Overall I am very pleased.   I use the full effects and ui suite.  Both UI and JQuery offer a minified version of their libraries.  Which is great, but sometimes I like to have the source to look at, so I often download the developer versions of this libraries.  So to use them, I would have to use the non-minified versions and would have to make many more http requests then needed and now on top of that, include any of my own javascript code.

This could make things very slow.  To work around this, I wrote a bash script, that is executable in Linux and uses the wonderfully simply jsmin program.  I place all of the files that comes with jquery ui (along with thickbox) in the /js/ folder along with this bash script.

#!/bin/bash

gcc -o jsmin ./jsmin.c

cat jquery-1.2.6.js | ./jsmin > main.js

cat effects.core.js | ./jsmin >> main.js

cat effects.blind.js | ./jsmin >> main.js
cat effects.bounce.js | ./jsmin >> main.js
cat effects.clip.js | ./jsmin >> main.js
cat effects.drop.js | ./jsmin >> main.js
cat effects.explode.js | ./jsmin >> main.js
cat effects.fold.js | ./jsmin >> main.js
cat effects.highlight.js | ./jsmin >> main.js
cat effects.pulsate.js | ./jsmin >> main.js
cat effects.scale.js | ./jsmin >> main.js
cat effects.shake.js | ./jsmin >> main.js
cat effects.slide.js | ./jsmin >> main.js
cat effects.transfer.js | ./jsmin >> main.js

cat ui.core.js | ./jsmin >> main.js

cat ui.accordion.js | ./jsmin >> main.js
cat ui.datepicker.js | ./jsmin >> main.js
cat ui.dialog.js | ./jsmin >> main.js
cat ui.draggable.js | ./jsmin >> main.js
cat ui.droppable.js | ./jsmin >> main.js
cat ui.resizable.js | ./jsmin >> main.js
cat ui.selectable.js | ./jsmin >> main.js
cat ui.slider.js | ./jsmin >> main.js
cat ui.sortable.js | ./jsmin >> main.js
cat ui.tabs.js | ./jsmin >> main.js

cat thickbox.js | ./jsmin >> main.js

cat page.js | ./jsmin >> main.js

The file page.js is my javascript source. Sometimes I add additional files as well.  Here is a download-able demo of this.

Some other speedy libraries that I enjoy to use are CSSTidy and OptiPNG

Intel Motherboard

I bought an intel D201GLY2A from newegg. Just going to share what I had to do to get it working correctly in Ubuntu 8.04. The video had very strange lines, almost like static. Audio didn’t work at all. Those were the two things that needed the attention.

First the video, the SIS are crap

sudo apt-get remove xserver-xorg-video-sis

Now the sound.

sudo vi /etc/modprobe.d/alsa-base

find “options snd-intel8×0 index=-2″ and set it to “=0″

sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa

Now reboot. That worked for me, I have 1280×1024 video with good quality and sound that works fine off the front headphone jack, and is quiet off the back.

Delicious

I find it useful to spend about a half hour to an hour every month reviewing my delicious bookmarks.  I have found some good stuff on the internet in the past, only to forget when I need it.  In my experience, it is a fruitful use of time to search my delicious for cool stuff.

Javascript Frameworks

If you do any web 2.0 style rich internet application stuff, a good JavaScript frameworks is a must. There are two frameworks that I have used a bunch. Prototype with Scriptaculous and jQuery. Before I get to far into this, let me say, I really like both. Both are powerful, both are extremely good libraries.

I started with Scriptaculous (with means prototype as well).  This worked very well.  I was so impressed with the utility methods in prototype and the way ajax calls were wrapped.  Scriptaculous/Prototype has powered many websites that I have put together.

Lately I have been using jQuery.  I have only done one large project with jQuery.  I found jQuery very powerful as well.

So which one is better, well, it depends.  Here are my opinions.  Documentation for all three (prototype, scriptaculous, jQuery) is good.  Prototype and jQuery’s documentation is the best.  Scriptaculous has many more visual effects than jQuery.  jQuery’s selector (”$” function) is way more powerful then prototype’s.  jQuery’s syntax is better, more efficient.  jQuery plugins simply rock.

I would recommend both.  In the future, I will use jQuery.

Twitter

Has twitter, or micro-blogging, killed the normal format of blogging. It seems that people are blogging less and micro-blogging more. Just from thinking about the people that I follow. I don’t know if this is a good thing.

Full blogs are good because they force you to think out were thoughts better, explain yourself more, and better express opinion. Full blogging, both reading and writing requires more attention, but I think you learn more.

Twitter, or micro blogging, requires little thought, littler effort. But it’s a great way to publish one liner thoughts.

Twitter has it’s place, I hope people don’t became too lazy and abandon blogging though.  One thing I would like to see, is for feedburner to provide daily digest of twitter into their feed.  Just exactly how they do delicious now.

Amazon and Twitter


So twitter was down, nothing too new there, but amazon, what happen to amazon today.

Scrolling

In most of the 37 signals apps, like campfire, and most of the google apps, like gmail, reader, etc, scrolling is almost inside the div.  I like this for web app, I think it’s silly for content sites, but makes lots of sense for apps.  It’s nice to never have to scroll to reach your controls, always have the controls reachable.  That really helps make it more app like.

Debian SSL Problems

So we all know of debian’s SSL woes.

Here is the command that I used on boxes to fix it.

rm /etc/ssh/ssh_host_*
apt-get install openssl openssh-server
dpkg-reconfigure openssh-server