Thursday, September 28, 2006

flv video

Create progressive-downloading Flash videos:

" The easiest way to encode the video is with ffmpeg (available through Fink) with something along the lines of:
ffmpeg -i movie.dv -f flv -r 12 -me full -subq 5 -mbd 1 -b 150 -qmin 2 -qmax 31 -s 360x240 -acodec mp3 -ar 11025 -ab 16 -ac 1 video.flv
This will create a Flash video with settings of 12fps, 360 by 240 pixels, 150 video bitrate, and a 16 bitrate mono audio track. Now to make the Flash video support progressive downloading in all the major browsers, we need flvtool2. Once installed, run the following command:
flvtool2 -u video.flv"


(Via macosxhints.)



Thats a great hint for creating the videos. But how do you view flv videos, outside the browser? I've been using vlc, but its a poor experience. You can't forward/back in VLC. Is their another flv player for OSX? How about Linux?

Tuesday, September 26, 2006

Introducing ScobleShow

Introducing ScobleShow:

"It’s 1 a.m. and the engineering team, me, and Valerie, are still working at the office. But the show is slowly coming up. The URL is at http://www.podtech.net/scobleshow/ "


(Via Scobleizer - Microsoft Geek Blogger.)



Downloading it right now. Its an interview with CEO of Sun, amongst other things. Will watch it tonight.

Here is a small intro by Robert Scoble about this first episode!

P.S. Why oh why does blogger always crap out when you're excited and want to post something up fast?

Saturday, September 23, 2006

Alan Cox's Thinkpad explodes!

Alan Cox's Thinkpad explodes!:

"Even Linux gurus are susceptible to the perils of exploding batteries - last night famed kernel hacker Alan Cox's IBM Thinkpad battery burst into flames and exploded. Follow the link for an in-depth story in Telsa's inimitable style and photos of the laptop's remains."


(Via digg.)

Friday, September 22, 2006

Shell script security Seven tips for optimizing shell script security

Seven tips for optimizing shell script security:

"Despite their widespread usage, many shell scripts are written with little to no consideration for security. Worse, due to some inherent weaknesses and a complex syntax, writing secure shell scripts can be pretty difficult. This tip will provide some simple tips for how to make your shell scripts as secure as possible."



A nice article on things to consider when writing shell scripts. Usually I have to write some shell script to do something fast. I've made it a point not to leave scripts lying around after you are done, but slips happen. Considering things like permissions would be a good security consideration to build into your process of writing scripts. Other tips in the article are more common sense, such as not writing in the password into your script and so forth.

Keeping track of where you are in the directory hiearchy could be quite important depending on what your script does. I generally tend echo commands out as a simulation to see how they work, before actually running the script.

Burn - an OSS alternative to Toast

Burn - an OSS alternative to Toast:

"Toast is great, and Mac OS X can handle burning a few types of CDs and disk images natively, but what if you need something in between Toast's $80 price tag and Mac OS X's basic burning abilities? Burn might just be the answer you need. This open source app can handle CDs, DVDs, VCDs, various data disk types, disk images and more"


(Via The Unofficial Apple Weblog (TUAW).)



Cool, I'd been looking for an open source CD/DVD burning program. I'll try it out this weekend.

Tuesday, September 19, 2006

Python 2.5 Release Final

Python 2.5 Release:

"We are pleased to announce the release of Python 2.5 (FINAL), the final, production release of Python 2.5, on September 19th, 2006."

Monday, September 18, 2006

aim bot on the loose

The SpywareGuide Greynets Blog: Pipeline Worm Floods AIM with Botnet Drones


Click the link and allow the file to execute and your day will quickly go bad.


I'm not sure from the above if AIM autoexecutes. Autoexecute is a bad idea! It should be considered a critical vulnerability and immediately patched in any software.

multiGPU

PeakStream unveils multicore and CPU/GPU programming solution:

"PeakStream's product, which I'll describe in more detail in a moment, is basically a set of tools' APIs, a virtual machine, a system profiler, a JIT compiler, etc.'that present a standardized, stream-processing-based programming model for which programmers can develop multithreaded applications."



I'd been wondering about multicore systems and concurrent programming, but it hadn't occurred to me that soon we will be moving to a multiGPU world as well.

Sunday, September 17, 2006

Browser Cache

Slashdot | Tracking Users Via the Browser's Cache:

""



After reading the above article I thought I'd change the browser settings so that I had not cache. I figured out I could set the disk space a browser allocates for cache to zero or something. I've switched to using Camino over the past few days, since its a lot faster than Firefox. I couldn't find an option to set the cache size or any other such option any where. All I found was a button that allows you to empty your cache.

I couldn't find an option to not cache web pages on safari either, but safari did have an empty cache option, and a private browsing option. The private browsing option doesn't add info of the web site you are visiting to for instance your history. However, it doesn't say if it stops a web page from being cached.

Their is an option of Firefox which by default was set to 50MB on my machine. If you go to about:config, and search for cache, their are two entries that seemed interesting to me. browser.cache.disk.capacity and browser.cache.disk.enable. I had already changed the cache size to 0, and I toggled the boolean value of browser.cache.disk.enable to false. I figured it would be a fun experiment to see how the browser reacts with this cache disabled, and how frustrating usage gets if at all.

Tuesday, September 12, 2006

OS play

I downloaded and installed Vista RC1 on my desktop machine at home during the weekend. It still didn't have the network drivers for the old old card in their. I'd forgotten what card was in their, and was in no mood to open up the box. I downloaded kubuntu, and booted of the CD with the intention of checking what card I had so I could Google for Vista drivers. By the time Kubuntu booted up from CD, I was bored, blew of Vista RC1, and installed Kubuntu instead. Which Rocks!

I figured I could always install Vista on the d620, but I haven't had the time yet.

Monday, September 11, 2006

web app framework comparision

better-web-app.mov (video/quicktime Object)

The above is a web app framework comparision of the following

1. J2EE (java)
2. Rails (ruby)
3. Zope/Plone (python)
4. TurboGears (python)
5. Django (python)

The results might surprise you. I liked the results. I have actually played around at some level with all these web frameworks (and a lot of custom built ones as well).

But looking at these frameworks, what bothers me is finding a host that I could put my app on. Their are dozens of hosts out their that offer PHP/MySQL/Apache bundle, which has been working well for years. However, its harder to find a nice stable hosting solutions for your Rails or Django app.

Ruby on Rails and PHP MVC frameworks :
"But the real kicker was at the end of the process when finding a good place to host my Rails app. PHP is everywhere. Rails, by comparison is barely anywhere. There are several hosts stepping up to the plate, but my few attempts to find a stable hosting environment fell short. Currently, Rails runs as a CGI program. This can be terribly slow, unless you use FastCGI, an apache plug-in that keeps CGI programs running in the background so they don't have to restart every time someone hits a page. I had a tough time getting FastCGI running on my own dedicated server (no surprise there) and turned to some shared hosting services in order to make progress. The one that I settled on had some problems, and now I'm testing another rails host."

Friday, September 08, 2006

All the cool things your Mac can do

All the cool things your Mac can do:

"If you highlight at word in any cocoa app (like Safari) and hit Command-Control-D, a small window will appear with the dictionary definition and part of speech of that particular word."


(Via The Unofficial Apple Weblog (TUAW).)



Now thats cool! I've had some occasions where I've really missed having quick access to a dictionary (I removed the dashboard dictionary app for memory reasons). Not any more!

Thursday, September 07, 2006

Running an Automobile on Hydrogen Using Water, by Drunvalo

Running an Automobile on Hydrogen Using Water, by Drunvalo:

"In a suburb of Toronto, Canada, a small company called Rothman Technologies, Inc., has in fact discovered not one but two viable methods for breaking down ordinary water into hydrogen and oxygen. Neither method involves the need to spend a billion dollars. They are simple answers. The existing engines in our automobiles could work with these systems with very little alteration and no need for an external support infrastructure like the one now provided by gas stations, and which would be required by fuel-cell technology."



With all the money being spent in the various wars, why can't we work on something like this? Wouldn't this solve a lot of problems around the world? Damn it, the solutions are out their!

Wednesday, September 06, 2006

Simple Code

The Joel Test: 12 Steps to Better Code - Joel on Software:

"But if you find a bug in code that you wrote a few months ago, you'll probably have forgotten a lot of things about that code, and it's much harder to fix. By that time you may be fixing somebody else's code, and they may be in Aruba on vacation, in which case, fixing the bug is like science: you have to be slow, methodical, and meticulous, and you can't be sure how long it will take to discover the cure."



Even worse, what if those people aren't even with your company. I've had a lot of occasions where I've had to go through code bases written be someone else, without documentation who are no longer around. Its slow work, and requires quite a lot of code reading. Their are some fun aspects to it though. You get to look at various different styles of programming. Some people seem to go a mile to make a simple thing extremely complex. Others write code that documents itself!

You can learn a lot from reading code. I believe in Simple Code, thats easy to read and understand. Maintaining code is hard.

I used to be this way. I used to love complicated designs and read everything I could about complicated technologies. But as I get more experienced and “older” as a programmer I find complex things just annoying. They aren’t a mental challenge to understand anymore, they are just irritating. I’ll pick apart the flashy crap, boil down the technology to its essence and then come up with a much simpler design for the task at hand almost every time.


(Via zedshaw.com/blog)

Tuesday, September 05, 2006

bash basics

To recurse through directories you can do:

for i in $( ls );
do
echo $i;
done

To see if a file exists:

if [ -f file_name ]
then
echo "File exists"
elif [ -d filename ]
then
echo "File is a directory"
else
echo "File does not exists"
fi

Sunday, September 03, 2006

links on concurrent programming

andypurshottam's bookmarks tagged with "concurrent-programming" on del.icio.us:


Some really cool bookmarks on concurrent programming! Suddenly I have all these interesting links to read... and so little time!

Take for instance:
"The Little Book of Semaphores"

Its a free book that can be downloaded in PDF form, that teaches you about semaphores using Python-like syntax.

Mozilla and hypocrisy

Right, but what about the experiences that Mozilla chooses to default for users like switching to  Yahoo and making that the default upon ...