Sunday, February 07, 2010

PERL: convert CSV file to hash

use Text::CSV;


open (my $CSV, "< file.csv") || die "Couldn't open file.csv";

my $csv = Text::CSV->new ( { binary => 1 } ) # should set binary attribute.
or die "Cannot use CSV: ".Text::CSV->error_diag ();

# Assume first row contains column names.
$csv->column_names ($csv->getline ($DOMAINS));

while ( my $hr = $csv->getline_hr( $DOMAINS ) ) {
print $hr->{'Col1'} . "\n"; # 'Col1' is one of the column headers from first line of csv
}

Saturday, February 06, 2010

High Definition Security Cameras

If you need a HD security camera for your business or home, check out this great product from H2A Systems:

The Ajna 720 HD camera is slick and sexy. Very crisp and clear pictures. Nice demo on the site: www.h2asystems.com

Jorge

Tuesday, February 02, 2010

3 Patches for Perl CPAN Module: Net::MySQL

I patched Net::MySQL with several patches I found in CPAN bug archive, since no one has fixed it in years.

I have another patch, for connecting to old mySQL versions, which is not included:
  • BUG#53558: Affected rows length not cleared after new query.
  • BUG#36646: When table has an index, a SELECT with a WHERE clause on indexed column fails.
  • BUG#14755: Fixed from CPAN bug fixes. Last insert index not correct when > 65535
Here is the whole file:

http://argw.com/MySQL.pm.txt

Monday, February 01, 2010

JS Tookits for iphone

Hybrid development today


  • NimbleKit ($99) is a commercial framework for creating JS-based iPhone applications.
  • QuickConnect (free) takes a similar approach, enabling you to get JS-based iPhone apps up and running very quickly.
  • PhoneGap (free) is an open-source framework for creating JS-based iPhone apps for multiple mobile platforms (iPhone, Android, Blackberry and more) without needing to code separately for each platform.

Thursday, January 28, 2010

Small to big

Pretty amazing flash to see how insignificant you are: http://www.newgrounds.com/portal/view/525347

User tracking without cookies.

User tracking without cookies.

I've wanted this several times, so here it is for future reference: http://joshduck.com/blog/2010/01/29/abusing-the-cache-tracking-users-without-cookies/

Wednesday, January 20, 2010

Custom UI Navigation Controller for UIWebView.

This sample looks like it will be helpful in my quest to make an iPhone app that gets its content from a web page. I have already implemented something similar, but it looks like this guys has done a better job (more features). Worth investigating.

http://www.gotow.net/creative/wordpress/?p=16

Sunday, January 17, 2010

Tips for using UIWebView to host content on iPhone app.

This link was relevant to some iPhone stuff I was doing. :)

Good tips: http://www.codingventures.com/2008/12/using-uiwebview-to-render-svg-files/

Friday, January 15, 2010

Cleanup your CSS.

I've always wanted to do have a way to do this. Find all the unused rules in CSS.

http://github.com/geuis/helium-css

Monday, January 04, 2010

Nice alternative to Google Trends

Google trends has gone down the tubes lately. Used to have dozens of the most popular search terms, but down to 20 or so, now.

Surchur is a good alternative.

Friday, December 18, 2009

Goldmine for Dropping Domains

DomainStryker is a new domaining service that just launched. Basically, DomainStryker gives you access to statistics (like searches, CPC, etc) for domains that will be dropping over the next few days.

DomainStryker provides statistics for dropping COM/NET/ORG domains on GoDaddy, SnapNames, and NameJet.

Why is this so good?

Because thousands of domains drop every day! Who has time to look at them all?

With DomainStryker you can instantly sort for names with high search traffic, high CPC, etc.

This is a great technique to quickly find the names you want to buy, bid on them, and then resell them for big profits!

DomainStryker has a subscription model: You pay monthly for access to COM, ORG and NET drop lists. But it's totally worth it -- you'll have access to domain information that other domainers just dream of.This huge advantage will help you win the best names.

Highly recommended. Try it for a month.

For a limited time only you can save up-to 50% on your monthly membership fees by using the unique discount code provided below:

AD1F30

This code is good until the end of this week. So hurry if you want to save some $$$ because this discount code will be expiring.




Wednesday, December 16, 2009

Best comment ever

Talking about social media websites like Friendster , Facebook, Twitter, etc...
"These sites are like TV Shows. Not TV sets. Not TV stations. Not TV networks. TV Shows. Now, a hit TV show can make a lot of money when it’s hot. But, they need to make the money when it’s hot, not fantasize that they are building something for the future on investment capital."

-- "Tim", Comment seen on TechCrunch.com

Tuesday, December 15, 2009

How to make $10B the easy way

Interesting stuff: http://www.businessinsider.com/henry-blodget-how-to-make-the-worlds-easiest-10-billion-2009-12

Here's why it doesn't work: http://news.ycombinator.com/item?id=992945

Important note to self about simulating posts.

Make sure to use perl uri_encode() instead of escape() when encoding post params.

See: http://www.perlhowto.com/encode_and_decode_url_strings

Monday, December 14, 2009

Converting Words to Text Via Google URL

http://translate.google.com/translate_tts?q=Today%27s%20top%20available%20domains%20are:%20HotNameList%20DOT%20com,%20Avantla%20DOT%20com,%20and%20Google%20DOT%20com%20And%20a%20whole%20lot%20more

Storing chess positions efficiently.

<44 bits per position.

Sunday, December 13, 2009

Another tool for converting words to diagrams.

Diagrammr.com <- Check it out.

Tuesday, December 01, 2009

Nice all-javascript graphing library.

http://www.highcharts.com/

Friday, November 20, 2009

Cool DB design tool

DeKlarit seems worth further investigation:

Wondering if there is someway to apply the changes that you make at design time to your production DB.

--Jorge.

Friday, November 13, 2009

Creating your own C# attributes.


PostSharp makes it easy to create your own custom C# attributes like:

[Log] // Adds logging to function.
public void myFunction()
{
}

Tuesday, November 10, 2009

haha

I'm somewhat reminded of the DOS era story of a voice recognition product
demo where someone in the audience yelled "FORMAT C:" and "YES"....

Thursday, November 05, 2009

Interesting javascript templating system.

Jaml: See http://github.com/edspencer/jaml

Monday, November 02, 2009

Low cost dedicated servers

For future reference. Cheap dedicated server list:

LowEndDedi.com

Friday, October 30, 2009

How much could you make with $5 in 2 hours?

Neat video.

Wednesday, October 28, 2009

JS adds functional APIs to jquery.

Invoke, each, map, etc.

http://documentcloud.github.com/underscore/

Hilite.me

http://HiLite.me

Nice simple app for generating HTML (pretty) source code from some pasted text. Supports many languages.

I used this to paste some code into an email, so that it retained some color syntax highlighting in the mail.

-- jorge.

Thursday, October 22, 2009

Question about Web Domains?

I started a new website for domainers to ask each other questions about domaining, SEO, trademarks, cybersquatting, and the like...

AskAboutDomains.com

It's part-WIKI, part-FORUM, and very addicting.

It's built on the latest community software: StackExchange

Check it out.

-- Jorge.

Wednesday, October 21, 2009

iPhone App Approval: Are you kidding me?

I have a simple "free" app in the iPhone App Store. It lets users browse "available" Web domains. One feature is a BUY button that forwards them to Godaddy.com, if they want to buy the domain.

I don't make any money from Godaddy.

The app has been approved for a while, but I wanted to patch one little bug, so I submitted a patch.

... And waited two weeks. Apple's testers found a bug that was in the original approved app, and asked me to re-submit.

... And I waited three weeks. This is classic: Apple rejects my app again because they want to test the domain "buying" feature on Godaddy.

It's a website! Not even my app! Not even a new feature.

Please kill me.

Wednesday, September 23, 2009

Java is better than I last time I used it.

1) Enums: Way more powerful than .NET. You can add values, other properties, constructors, toString() override, interfaces, etc. Enums were VERY weak in older versions of java.

2) for( x : y) // Like .NET foreach keyword

3) Generics: hashmap

4) @annotations // Like .NET [attributes]

---

.NET still wins on:

1) Not so much boxing/unboxing.

Saturday, August 29, 2009

Sequence Diagram Creator.

Pretty cool program generates sequence diagrams from TEXT. Try the "Back of Napkin" mode.

Nice job!

Friday, August 07, 2009

You take your car to work... I'll take my board.

Great stuff... It should be called "Japanese Telephone".

Monday, May 04, 2009

PrestaValve.com

The PrestaValve.com site has fallen off google top 5 searches for the term "Presta Valve". Not sure why this is really.

It used to be in the top 5 and the content has not changed much.

The sitemap.xml seems ok, and google webmaster tools don't tell me much. Still gets a ton of type-in traffic, but I'd like to figure out this issue.

Does anyone really read their twitter feed.

Following 7000? Sure.

Friday, April 03, 2009

MasterPage.Master does not exist

After publishing an ASP.NET 2.0 project to new production server got:

The file '/MasterPage.master' does not exist.

Worked on this for hours and searched google like crazy.

My solution: Installed a missing dependency: "Microsoft ASP.NET 2.0 AJAX Extensions 1.0"


Sunday, March 15, 2009

Password on new account

You know on a website, when you create a new account. They always ask you for a password twice. And you can't see what you type.

Ostensibly, the password is hidden so that someone can't read over your shoulder at the time that you create the account.

Is this really that valuable? It just seems like security taken too far. If someone is watching, don't create an account in front of them. Is the added security worth the chance of mistyping our password and never being able to login?

I understand the hidden password when you're logging in, since that action happens more often.

Comments?

Monday, January 12, 2009

Top 25 Worst Programming Errors.

Cool list: http://cwe.mitre.org/top25/#Brief

Sunday, January 11, 2009

Cheap plugs on Guitar Hero Drums

Apparently the plugs on the guitar hero are really cheap. My three year old pulled the wire out of the plug -- it was way to easy.

This happens a lot, because there are instructions on the net for fixing: http://www.ocforums.com/showthread.php?t=588417

Ugh.

Sunday, November 23, 2008

Using WGET for screen scraping HTML pages.

(THIS POST IS STILL IN PROGRESS)

Ever want to get some content from a web page on a schedule? That's a pretty simple programming task, but sometimes the content is behind a password protected page. What do you do then?

Wouldn't it be nice to be able to do the above from a simple batch file, and then run the batch file using the Windows scheduler? This quick tutorial will show you how.

The following procedure will work on WINDOWS or UNIX (at least in concept). But, I'll be writing it from the point of a Windows user.

STEP 0: Plan
Figure out what you want to automate. In this blog, I'm going to show you how to login to GMAIL using your account info and get the first email in the list. This is not particularly useful (there are easier ways to get your email), but it shows the process.

STEP 1: Install WGET and PERL.
Install CYGWIN and select the WGET component (from the "Web" category) during the installation. Another good component we'll be using is the PERL language (from the "Interpreters" category), which is good at simple text processing of the WGET output.

Both of these tools are command line tools, which means this entire example will be runnable from a batch file.

The PERL module is optional.

STEP 2: Install HTTPFOX plugin.
Install FIREFOX and the HTTPFOX plugin. This plugin only works on Firefox. HTTPFOX lets you examine the streams of data going between firefox and the website -- kinda like a network analyzer, but all handled by the plugin instead of a network driver.

STEP 3: Record as session with HTTPFOX
For this step, it is a really good idea to make sure you only have one FIREFOX window open, and only one tab open. Close all the rest.

Start HTTPFOX (it's a small green icon in bottom right corner of your browser) and then navigate to the site: http://gmail.com (I assume you have an account there).

When you start HTTPFOX, it creates a window at the bottom of the screen. There is a START button for starting recording, and a STOP button for when you are done.

So start recording. Just as a not, HTTPFOX isn't recording what you type. It records all the HTTP traffic between your browser and the webserver.

Then, in the GMAIL web page, type in your username and password. Press SIGN IN.

You'll see a bunch of activity in the HTTPFOX window. This is each request being sent to the browser, for each HTML file, image file, javascript file, css file, or media files in the web page. Plus there can be additional traffic for AJAX HTTP requests.

Each request has a header, cookie, query string, post data, and content that you can see as you click on each one.

After the login is complete and you see your mail. Press the STOP button in HTTP fox.

STEP 4: Analyze the HTTPFOX data.

This is really the toughest step. You have to figure out what HTTP requests are important for the problem you are trying to solve. In our case, we're only interested in the HTML content (no images, scripts, etc)

In this case we're looking for the request where the password was sent to the server, and the main page returned. This is often a POST request, which sends data to browser, and returns a response. The post in this case, send your username and password over HTTPS. It is probably the second item in the list:

00:00:13.430 0.274 1428 533 POST 302 Redirect to: https://www.google.com/accounts/CheckCookie?continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3F&hl=en&service=mail&ltmpl=default&chtml=LoginDoneHtml https://www.google.com/accounts/ServiceLoginAuth?service=mail

If you click on that request, and then look through the tabs, you'll see a "POST Data" column.

There is a radio below that allows you to choose "RAW" format, which is really useful:

ltmpl=default&ltmplcache=2&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3F&service=mail&rm=false&ltmpl=default&hl=en&ltmpl=default&Email=YOURMAIL%40gmail.com&Passwd=PASSWORD&rmShown=1&signIn=Sign+in&asts=

The username and password are highlighted above. Since Google is using HTTPS for the login, no one on the internet between your browser and google can read it, though.

You'll want to keep that RAW POST DATA handy because we are going to copy it later.

There's another interesting tab, the cookie tab, which shows you all the cookies that were sent and returned with this request. That's important to know about, although the details aren't important. Generally any site that sends cookies, probably needs them to work properly, so we'll need to simulate the cookies when we automate with WGET.

STEP 5:
Learn about WGET and it's command line params. WGET does what your browser does, but in a command line. WGET only does one HTTP request at a time, so you may need to run it multiple times.

Here is a sample command line that will get a web page:

wget --keep-session-cookies --load-cookies=cookies.txt --save-cookies=cookies.txt -q --no-check-certificate -O - "https://www.google.com/accounts/ServiceLoginAuth?service=mail" --post-data="ltmpl=default&ltmplcache=2&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3F&service=mail&rm=false&ltmpl=default&hl=en&ltmpl=default&Email=YOURMAIL%40gmail.com&Passwd=PASSWORD&rmShown=1&signIn=Sign+in&asts="

A couple important notes:
1) The first three command parameters make sure all cookies are saved to a local file cookies.txt. This will be the repository for all cookies each request. Cookies are SAVED and WRITTEN to the file. Since the server sends the cookies to the browser (or WGET in this case), then if you run WGET a second time, you want the cookies to be sent back with that request. In other words, maintain a session.

2) The "-O -" option sends the received html to STDOUT. You can also specify a filename there, if you want to keep the HTML.

3) The URL is self explanatory. I copied this URL directly from the POST request in HTTPFOX.

4) The --post-data is copied from HTTPFOX, too. It's the RAW POST DATA that was discussed in the previous step. Pretty nifty eh? [NOTE: I modified the text above to hide my real password]

STEP 6: Write a batch file.
Simulate the interacnption with the website using WGET.

STEP 7: Parse the output from WGET.
If you look at the response, you won't see much. Google is actually throwing us a bit of a curve here. The google webserver just returns a web page that redirects you (via javascript location.replace) to another non-https page:


Some HTML...

location.replace("http://mail.google.com/mail/?auth\x3dDQAAAHwAAADmne2aBCW1j
C8CLoxi-cm6bOgBHKMF-wyh8A_RyKDLjHrbEPCnA53NjBOxPYYk-y6QXQJKeVGyzD8_g9JIDbTbZISyP
H74ub7JP3FiNVGxPrXKGj2V4o-iYOQ9o2RPdYCSOJyil8VApveTpUpBDZqRNtiuR1A-oLTLEnh4gikaW
A\x26gausr\x3ddejasurf%40gmail.com")

More HTML...

This is where PERL will shine: The easiest thing to do is to parse the HTML and get the new url, then WGET that url. The following perls script does it all:

TBD:

Step 8: Make a final batch file to run it all.
You can just run the above perl script like this from Windows Scheduler (or Unix cron job):

perl myscript.pl


Sample Code

If you make software that is used by developers, you probably include some kind of API for developers to extend your product. And you probably have some sample code.

If the above statement applies to you, here are some important things you should know about samples:

1) Public Sample code is indicative of the quality of your product.
2) Public sample code is indicative of the quality of your programmers.
3) Public sample code is not for interns or junior programmers.
4) Public sample code should lead your customer to making a great product.

Break these rules at your own risk.

Wednesday, October 29, 2008

Technology website

My buddy Mark has a good site for Information Technology tips: http://3minutetech.com

Saturday, October 18, 2008

HotNameList.com

I recently added a blog to HotNameList.com.

Also, there is an RSS feed now: http://feeds.feedburner.com/HotNameList

Thanks for checking it out.

Saturday, September 13, 2008

HotNameList.com

A new site I am working on to help people find great domain names: http://HotNameList.com

Wednesday, March 19, 2008

Can a business plan fit on a post card?

Like a 30-second "elevator pitch", but written. It'd be a nice handout.

Sunday, February 17, 2008

New Post -- Feb 16th.

See here: http://www.pralm.com/index.php/February_16th

Saturday, February 16, 2008

We're moving

I am slowly moving all the "Programmer's Almanac" content to http://www.PrAlm.com

I'll use this blog for general blogging purposes.

Friday, February 09, 2007

Programmer's Almanac: Feb 10th, 2007

Today in 1902 is the birthday of physicist Walter Houser Brattain, co-inventor of the transistor. The transistor is the basic circuit of all digital computers. The invention of the first transistor garnered Brattain, William Shockley and John Bardeed the 1956 nobel prize.

In fact, an estimate of computer chip’s performance can be given by the number of transistors in it. Transistor count is related to Moore’s law, which says that the number of tranistors in the fastest microchips doubles every 24 months.

The first IBM PC CPU had about 29,000 transistors in its CPU. Today, a typical microprocessor used in a PC, such as an Intel Core duo, has about 290 million transistors

Also today in 1996 was the day that “Deep Blue”, a computer, beat the World chess champion for the first time. Gary Kasparov, arguably the best chess player of all time was beaten by a computer that consisted of approximately 480 million transistors. Deep Blues circuitry was highly optimized for playing chess, including hundreds of custom ASICs. Deep Blue was capable of calculating approximately 200,000,000 chess positions per second. Even with all that horsepower, the computer couldn’t win every game against the human champ.

Project Deep Blitz is a recent attempt to make a computer using off the shelf components that would be more competive than Deep Blue. There’s an interesing table in the link that shows the relationship between chess rating and calculated moves-per-second.

(c) 2007, Jorge Monasterio

Wednesday, January 31, 2007

Programmer's Almanac: Feb 1, 2007

Today is the birthday of Johannes Trithemius, born in 1462 in Germany. Trithemius is remembered for writing three books on cryptography and hidden messages called Steganographia. These books were written in encrypted Latin, and for many centuries were thought to contain magical incantations. His writings have played an important role in the development of cryptography.

One of Trithemius' crytpographic algorithms can be decoded with this line of perl (Trithemius didn't use ASCII, though):

s/([A-Z])/$c=(ord $1)-$i++; $i%=26; $c+=26 if $c<65;>


By today's standards, Trithemius's cryptography was very basic -- however decoding them has proven to be quite a challenge. The final book, Book III, was decoded in 1998 by Jim Reeds of AT&T Labs. It's an amazing read to see how Reeds did it -- he apparently didn't know Latin.

The technique called steganography, named after Trithemius' book, means hiding messages so that only the recipient knows there is a message. For example, messages can be encrypted in digital images, sound files, and even spam (maybe someone is sending me lots of messages).

Trithemius quote: Speak of things public to the public, but of things lofty and secret only to the loftiest and most private of your friends. Hay to the ox and sugar to the parrot."
- 1848


(c) 2007, Jorge Monasterio

Thursday, January 18, 2007

Programmer's Almanac: Jan 19th, 2007

Today is the birthday of the Apple Lisa computer, forerunner of today's Macs. The Lisa was notable for being the first publicly available PC to include a GUI and a mouse -- the end of the command line interface had begun! The "Lisa" was probably named after co-founder Steve Job's daughter.

The origins of the mouse go back to the 1960's -- the first public "mouse" demo was give by inventor Doug Englebert in 1968.

Since the invention of the mouse, many different input devices such as trackballs, 3D mice, and others have come and gone. There is even an mouse for people who cannot use their hands.

Also, today will be the death (and re-birthday), in 2038, of the timestamp used for file times in Unix and Windows. This timestamp is a 32-bit number that represents the number of seconds since January 1st, 1970. The start date is known as the Unix Epoch. The timestamp will rollover to zero on Jan 19th, 2038.

So, you can expect 2037 to be a busy year for programmer's who will be fixing Y2K-like problems on all the ancient software from the late 20th and early 21st century that depends on this number. Even if we are all running 64-bit hardware.

This site has an list of other "computer failure" dates related to timekeeping that you may want to put on your calendar.

(c) 2007, Jorge Monasterio


Tuesday, January 09, 2007

Programmer's Almanac: Jan 10th, 2007

Today, in 1938, computer scientist Donald E. Knuth was born. He is best known for writing The Art of Computer Programming (TAOCP) , which was named one of the twelve best science/physics monographs of the 20th century.

Currently volumes 1 -3 are available. Knuth retired early to dedicate approximately 20 years to writing the first five volumes. He also has plans for volume 6 & 7, after the year 2015. Dr. Knuth offers $2.56 to the first person to report a particular error in his books. Why $2.56? It's a hexadecimal dollar.

Dr. Knuth quote: "Science is what we understand well enough to explain to a computer. Art is everything else we do. "

The online encyclopedia, Wikipedia, was started on this day in 2001. A Wiki is a web page that allows website visitors to edit and collaborate on a website.

The shortest, full-featured wiki program, according to the ShortestWikiContest, is this CGI by Casey West (222 characters of perl and shell):

#!/usr/bin/perl
use CGI':all';path_info=~/\w+/;$_=`grep -l $& *`.h1($&).escapeHTML$t=param(t)
||`dd<$&`;open F,">$&";print F$t;s/htt\S+|([A-Z]\w+){2,}/a{href,$&},$&amp;amp;amp;/eg;
print header,pre"$_
",submit,textarea t,$t,9,70
Some of the "short" wiki's at ShortestWikiContents have demos -- worth trying out.

(c) 2007, Jorge Monasterio

Friday, January 05, 2007

Programmer's Almanac: Jan 6, 2007

Happy Birthday, Mom.

Thursday, January 04, 2007

Programmer's Almanac: Jan 5, 2007

On this day in 1909 Stephen Cole Kleene, inventor of the regular expression, was born. A mathematician, Kleene layed some of the groundwork of computer science by working on Recursion Theory with Turing, Göedel and others.

From a practical standpoint, programmers can thank Kleene for inventing regular expressions in the 1950's. Regular expressions provide a powerful way of matching strings in computer programs.

Here is a regular expression that will parse any xml (the original source is much more readable):

[^<]+|<(!(--([^-]*-([^-][^-]*-)*->?)?|\[CDATA\[([^]]*]([^]]+])*]+([^]>][^]]*]([^]]+])*]+)*>)?|DOCTYPE([ \n\t\r]+([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*([ \n\t\r]+(([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*|"[^"]*"|'[^']*'))*([ \n\t\r]+)?(\[(<(!(--[^-]*-([^-][^-]*-)*->|[^-]([^]"'><]+|"[^"]*"|'[^']*')*>)|\?([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*(\?>|[\n\r\t ][^?]*\?+([^>?][^?]*\?+)*>))|%([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*;|[ \n\t\r]+)*]([ \n\t\r]+)?)?>?)?)?|\?(([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*(\?>|[\n\r\t ][^?]*\?+([^>?][^?]*\?+)*>)?)?|/(([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*([ \n\t\r]+)?>?)?|(([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*([ \n\t\r]+([A-Za-z_:]|[^\x00-\x7F])([A-Za-z0-9_:.-]|[^\x00-\x7F])*([ \n\t\r]+)?=([ \n\t\r]+)?("[^<"]*"|'[^<']*'))*([ \n\t\r]+)?/?>?)?)

Also today, in 1984, Richard Stallman started the GNU project. He quit his job at MIT to found the Free Software Foundation. From Stallman's efforts we now have (among other things) the gcc compiler, the GPL license, and a free version of Unix utilities running on the Linux kernel.

Stallman quote: "If programmers deserve to be rewarded for creating innovative programs, by the same token they deserve to be punished if they restrict the use of these programs. "

(c) 2007, Jorge Monasterio

Wednesday, January 03, 2007

Programmer's Almanac: Jan 4, 2007

On this day in 2004, the Mars rover Spirit landed on Mars. The rover, and its twin Opportunity, has functioned far longer than its expected lifetime -- it's currently almost 1000 days past its warranty date.

A few facts about the Spirit's software systems:
- The rovers utilize a radiation-hardened PowerPC chip with 128MB of RAM running at approximately 20 MIPS.
- The rovers run a commercial embedded operations system: vxWorks.
- Even NASA has bugs: All storage is in RAM and 256MB of flash. Due to a failure to manually clean up the memory based file system, the Spirit rover ran out of memory early in the mission. The problem was reproduced on earth and corrected.

And on this day in 1809, Frenchman Louis Braille, inventor of the Braille alphabet for the blind was born. Braille lost his sight at the age of 3 in an accident. The Braille alphabet he later invented uses a pattern of raised dots that a sight-impaired person can read by touch.

Braille technology has come a long way, though as there are now Braille printers, copiers, and translation software. Interestingly, although Braille is an "alternate" alphabet, software to do automatic translation can still have difficulties with mathematical symbols, mixed languages, and the special abbreviations that are common in Braille writing.

You can donate help a blind child read Braille.

(c) 2007, Jorge Monaterio

Monday, January 01, 2007

Programmer's Almanac: Jan 1, 2007

Happy New Year!

Today is the Birthday of the .COM top-level domain, born in 1985 on this date. The .NET, .ORG and 5 other TLD's were also born on this date.

The design of the DNS system has supported the incredible growth of the Internet since these humble beginnings.

To celebrate the 22nd anniversary of the first .COM domain, symbolics.com, here are some dotcom sites and facts:

1. A list of cool "long" domains, like: http://3.141592653589793238462643383279502884197169399375105820974944592.com/

2. It's hard to be sure, but it looks like sex.com is the most expensive domain name every sold (for which public information is available): $14,000,000 on January 19th, 2006.

3. Are all of the good domains taken? Apparentely about 50,000,000 .COM names are taken. Here is an analysis.

(c) 2006, Jorge Monaterio

Thursday, December 28, 2006

Programmer's Almanac: Dec 28th, 2006

On this day in 1903, John von Neumann was born in Hungary. Von Neumann was an incredible intellect who made contributions to game theory, quantum mechanics, economics, explosives, and many other areas.

In computer science, Von Neumann is best known for creating the computer architecture that bears his name. Today, every popular computer system is a type of Von Neumann machine: A processing unit with a memory storage for data AND programs -- instead of dedicated circuits for the programs. Indeed, almost every programming language (though not all) in use today is isomorphic with a Von Neumann machine.

Incidentally, Von Neumann is also credited with the invention of the "merge sort" algorithm, which sorts a list by recursively sorting each half of the list:

 void mergesort(int lo, int hi)
{
if (loint m=(lo+hi)/2;
mergesort(lo, m);
mergesort(m+1, hi);
merge(lo, m, hi);
}
}

Von Neumann quote: "It would appear that we have reached the limits of what it is possible to achieve with computer technology, although one should be careful with such statements, as they tend to sound pretty silly in 5 years." (Said in 1949)

Happy Birthday today to Finnish software developer Linus Torvalds (b. 1969), the original creator of the Linux operating system. Torvalds started work in 1991 and continues to be the Linux gatekeeper for the kernel, although thousands of developers have contributed to the project.

Linus quote: "With enough eyeballs, all bugs are shallow."

(c) 2006, Jorge Monasterio

Code snippet from: http://www.inf.fh-flensburg.de/lang/algorithmen/sortieren/merge/mergen.htm

Thursday, December 21, 2006

Programmer's Almanac: Dec 22, 2006

On vacation until after the holidays. Merry Christmas!


Wednesday, December 20, 2006

Programmer's Almanac: Dec 21st, 2006


On this day in 1878, Polish mathematician and logician Jan Łukasiewicz was born. In the 1920's he developed Polish notation, a way of writing mathematical expressions without parenthesis -- essentially the invention of the computer "stack." The stack was first implemented in hardware by Charles Hamblin (1963). And in HP calculators as "Reverse" Polish notation (RPN) in the late 60's without digital integrated circuits.

A
lso on this day in 1913, the New York World published the first crossword puzzle, by inventor Arthur Wynne.

At first glance, the crossword puzzle seems as if it would be difficult for a computer to solve, and would make a good Turing test -- because it requires knowledge about the meaning of words, puns, etc.

However, it seems a program called WebCrow, uses a Web search engine to attack the problem quite well -- it's even won a tournament for bilingual crossword puzzle solving (English/Italian). The WebCrow website has a neat flash demo that explains how it wins.

Thank goodness we don't have to worry about Crossword Captcha...

(c) 2006, Jorge Monasterio
HP Calculator Image from http://www.calculator.org/

Tuesday, December 19, 2006

Programmer's Almanac: Dec 20th, 2006

On this day in 1996, Apple acquired NeXT Software Inc for $400M. The acquisition brought Steve Jobs back to Apple, and NeXT Step operating system was used as the foundation of OS X.

The NeXT OS was written in Objective-C, an object oriented language with roots in C and smalltalk. Objective C features dynamic typing, binding, and loading. The hello world program in Objective C can be written like this:

 #include 
#include
int main(int argc,char **argv)
{
id set = [Set new];
argv++;while (--argc) [set add:[String str:*argv++]];
[set do:{ :each | printf("hello, %s!\n",[each str]); }];
return 0;
}
And, today in 1917 was the birthday of David Bohm, American quantum physicist. After helping on the Manhattan Project, he was later branded a communist and moved to Brazil. Besides, physics, he had philosophical theories related to the human brain operating using wave interference, like a hologram.

Bohm Quote: “The ability to perceive or think differently is more important than the knowledge gained.”

(c) 2006, Jorge Monasterio



Monday, December 18, 2006

Programmer's Almanac: Dec 19th, 2006

Today, December 18, is a very important day in computer history for those of us who grew up with with the microcomputer revolution.

On this day in 1974, the MITS company put the Altair 8800 microcomputer on sale -- ads were printed in the January 1975 issue of Popular Electronics. The kit came with all the parts you needed to put together your own microcomputer for $397 (or $495, assembled).

The Altair didn't come with a keyboard, monitor, or any storage devices. It did have 256 bytes of RAM memory and some front panel switches and LED's that you could program to blink. You programmed it by setting the switches to a binary value, and entering that 8-bit instruction or data.

The Altair used the Intel 8008 8-bit microprocessor, which had been released in 1972 and ran at a blazing 200kHz. The normal price for the 8008 was $360, but apparently the founders of MITS got a deal (around $75) for their kit.

The computer was expandable by plugging in cards to a backplane, which became known as the S-100 bus. Eventually there were add-ons such as cassette tape storage, RS-232c interfaces, keyboards.

Bill Gates and Paul Allen wrote the first BASIC language interpreter for the Altair. That success led to Micro-Soft (they had a dash in the name back then).

The product was a huge success. The Altair sold 4000 units in the first 3 months. It's release led to the first home computers: The PET, the Apple I, and the TRS-80 Model I, among others.

Today, an Altair in very good condition goes for about $4000 on Ebay. For a lot less, you can try your hand at programming an Altair by downloading a simulator.

Sunday, December 17, 2006

Programmer's Almanac: Dec 18th 2006

On this day in 1995, Konrad Zuse died. Zuse, an independent German inventor, developed the Z1, Z2, Z3 , and Z4 computers during the early 1940's. The first models featured mainly mechanical systems, and were destroyed by Allied bombing in WWII. The the later models used electrical relays. There is some dispute over who created the first computer, but there is no doubt Zuse's machines were among the first programmable devices.

While Allen Turing helped the allies apply new computing technology to the code breaking effort, the Nazis showed no interest when Zuse volunteered to help.

While building his computers, Konrad Zuse developed the Plankalkül computer language. Zuse wrote sample program to prove his machines would work, including a chess playing program. The language feature loops, conditional statements and a variable naming similar to Hungarian notation.

Also, on this date in 1997 the HTML 4.0 specification was first released as a W3C specification. The spec contained many features we take for granted today, such as scripting, style sheets, frames.

Saturday, December 16, 2006

Programmer's Almanac: Dec 17th, 2006

Today is the birthday of Kenneth E. Iverson, who was born in 1920 and died in 2004. Iverson was the inventor of the APL programming language. APL has been called "was one of the few truly creative masterpieces of the computer world in the last 30 years".

APL, originally named "Iverson notation", is different from almost all other computer languages in that it uses mathematical symbols and requires a special keyboard to type the symbols. Proponents claim that APL programs are much more succinct than other computer languages. The APL language is also known for it's strong support for parallel processing.

Wikipedia gives this short APL program for calculating primes from 1 to R:




It is much shorter than the 87 character C program that does the same thing.

(c) 2006, Jorge Monasterio

Friday, December 15, 2006

Programmer's Almanac: Dec 16th, 2006

On this day in 1917, Science Fiction writer Arthur C. Clarke was born. He is credited with coming up with the idea of using geosynchronous satellites for communications in a science fiction novel. And with the idea of a space elevator.

From his fiction also comes the HAL9000 computer, from the movie 2001 A Space Odyssey.

Hal Quote (from the movie): "I'm sorry Dave, I'm afraid I can't do that. "

Clarke Quote: "Any sufficiently advanced technology will be indistinguishable from magic..."

(c) 2006, Jorge Monasterio

Wednesday, December 13, 2006

Programmer's Almanac: Dec 15th, 2006

On this day in 1994, the Dot.com boom started with the release of Netscape Navigator.

And, on this day in 2005, a distributed prime number program found the 43rd known Mersene prime. Mersene primes are powers of 2 minus 1. It's a big number: 230,402,457-1, which is 9,152,052 digits long. The 44th Mersene prime has been found since.

Finally, today in 1859, L.L Zamenhof was born. Zamenhof invented Esperanto, an artificial human language that doesn't have any of the worts of "evolved" languages. There are supposedly 2 million speakers around the world. In L.L.'s honor, here is "hello world" in Esperanto, written in C++, another invented (non-human) language:

#include 

int main()
{
std::cout << "Saluton mondo!" << endl;
}

(c) 2006, Jorge Monasterio

Programmer's Almanac: Dec 14th, 2006

On this day in 1972, the following "last words" were spoken:

170:41:00 Bob, this is Gene, and I'm on the surface; and, as I take man's last step from the surface, back home for some time to come - but we believe not too long into the future - I'd like to just (say) what I believe history will record. That America's challenge of today has forged man's destiny of tomorrow. And, as we leave the Moon at Taurus- Littrow, we leave as we came and, God willing, as we shall return, with peace and hope for all mankind. "Godspeed the crew of Apollo 17."

Two Apollo 17 astronauts, Commander Gene Cernan and Lunar Module Pilot Harrison Hagen Schmitt, were talking on the moon as they prepared to leave. These astronauts were last two humans ever on the moon -- in the last 34 years we haven't even come close. Apollo 17 was the 6th mission to land on the there.

You can read an annotated transcript of the entire mission, with photos and movies, online. It's really very interesting.

What kind of technology did the astronauts take to the moon on this last mission? They had had a moon rover, which they drove for over 21 miles. They took many instruments, including a gravimeter which Cernan threw to see how far it would go (unaware they weren't done with it -- see timestamp: 169:51:20 at the link above). The lander kept them alive on the moon for 3 days, while the Command Module Pilot, Ronald Evans, orbited above.

What didn't they have? The main thing we'd notice today is the lack of computers. That means no PC's, no digital cameras, really nothing with a microprocessor in it. The computers used in the Apollo missions for navigation were incredibly primitive -- the Apollo missions were the first to use integrated circuits.

The astronauts returned safely to earth. Apollo 18 was canceled, and there have been no more manned landings onto the moon since.

(C) 2006, Jorge Monasterio

Tuesday, December 12, 2006

Programmer's Almanac: Dec 13th, 2006

A couple of anniversaries occur today.

Hungarian mathematician George Pólya was born today in 1887. Besides his contributions to Number theory, he is well known for How to Solve It. This book describes methods you can use for solving problems, a useful skill for programmers. Quote: "If you can't solve a problem, then there is an easier problem you can solve: find it."

British computer scientist, David Wheeler, was born in 1927 and died on this day in 2004. Wheeler is credited with inventing the subroutine, back in 1949. At one time, a call to a subroutine was known as a "Wheeler Jump." A quote from Wheeler: "Compatibility means deliberately repeating other people's mistakes."

Just to put the subroutine in perspective, Fortran was originally developed without requiring a processor that supported a stack. Many early computers had no stack and no call/return mechanism.

If you're still not glad to be programming in the 21st century, check out this photo of some early (?) Fortran source. A few tidbits to notice: Line numbers, the line continuation character ("x"), the one letter variable names, and the handy GOTO.

(c) 2006, Jorge Monasterio

Monday, December 11, 2006

Programmer's Almanac: Dec 12th, 2006

Twenty-six years ago, on this day, the Computer Software Copyright Act of 1980 was signed into law by President Jimmy Carter. Up until then, U.S. copyright laws had not applied specifically to computer programs. But, nonetheless, even though the drafters of the Constitution never envisioned computer programs, copyrights had already been granted to about 2000 programs between the 1964 and 1976.

Copyright gives rights to the creator of a computer program to define whether and how the software they created may be copied and used by others.

Congress added two basic concepts to make copyright apply to software:
1) The Act stated what the user's rights were to software with regards to making backups and copies.
2) The Act defined, legally what software is: "...a set of statements or instructions to be used directly or indirectly in a computer to bring about a desired result".

One wonders whether that second definition really covers imperative computer languages, since these kinds of languages don't define "steps" to be taken, instead letting the computer determine the process from the desired results.

Over the years since the Act was enacted, legal battles have tested whether copyright applies to a computer program's "look and feel": One of the best known is the 10-year series of courtroom battles over the copyright of the menu structure and keyboard-accelerators in the Lotus 123 spreadsheet program. Lotus initially won at trial. The Lotus cases finally went to the Supreme Court, which upheld the appellate court rulings that the look-and-feel was not copyrightable.

Finally, it is interesting to note that software is distinct from books, music, and movies because, unlike these, software is patentable. With a patent, the owner of the patent can prevent someone else from creating and selling software that implements specific ideas. The affect of software patents on creativity and progress continues to be the subject of much debate.

(c) 2006, Jorge Monasterio

Sunday, December 10, 2006

Programmer's Almanac: Dec 11, 2006

On this day in 1871, David Brewster, the Scottish inventor of the Kaleidoscope was born. If you're not familar with this toy, the Kaleidoscope is a short tube containing lenses, mirrors, and small, multicolored objects. When you look into one one end of the tube and twist it, you can see some beautiful geometrical patterns. In the late 1800's and the 1970's, this toy was extremly popular -- although Brewster never made a dime during these fads.

Many computer programs and screensavers to simulate Kaleidoscopes have been written, and are available for download. There are also some web based Kaleidoscopes, where you can view these images online.

If you want to make your own Kaleidoscope simulation, Dr. Cliff Pickover shows some simple pseudocode for a Kaleidoscope on his website:

DO FOR i = 1 to 40
x1 = random; y1 = random
x2 = random; y2 = random
x3 = random; y3 = random
/* Confine initial pattern to lower right quadrant */
if ( x1 > y1 ) then (save=x1; x1=y1; y1=save;)
if ( x2 > y2 ) then (save=x2; x2=y2; y2=save;)
if ( x3 > y3 ) then (save=x3; x3=y3; y3=save;)
DrawTriangleAt(x1,y1,x2,y2,x3,y3)
/* Create 7 reflected images /
DO FOR j = 1 to 7
Flip (x,y) Points as Described in Text
DrawTriangleAt (x1,y1,x2,y2,x3,y3)
END
END
Today many folks spend their days staring at a "tube" with ever-changing mulitcolored pixels -- we call it a television. In the Victorian era, choices were a bit more limited. And maybe the revival of the fad in the 1970's says something about the quality of the TV shows, then.

(c) 2006, Jorge Monasterio

Saturday, December 09, 2006

Programmer's Almanac: Dec 10, 2006

On this day in 1815, Ada Lovelace, the Countess of Lovelace, daughter of Lord Byron, was born. If Grace Hopper (see December 9th) was the Mother of all Programmers, then Ada is definitely the Grandmother of all Programmers.

Ada, a mathematician, is credited with being the first programmer ever. She exchanged letters with Charles Babbage, who built (but rarely completed) complex computing machines, called Engines, using wooden gears. The most famous of Babbage's engines was known as the Analytical engine, and would have featured input using punched cards and even a printer. Ada wrote a program for the engine that would have calculated Bernoulli numbers, which are important for Number Theory.

Although Babbage never completed his Analytical Engine due to lack of funding, a replica of another of Babbage's machines was built from the original plans. It would have worked.

Ada is also the name of a computer language, named after the Countess. Starting in 1975, Ada was developed by the United States Department of Defense, with the goal of a common language for all U.S. military systems, from airplanes to tanks to radars. At that time, the Department and its contractors were using over 450 different computer languages for embedded military systems.

The Ada language features extremely strong type checking and validation capabilities which were hoped to provide high-reliability and maintainability. Today, even commercial systems that we depend on for our safety, such as aviation and railroad control are written Ada.

The hello world program for Ada looks like this:

 -- Hello World in Ada

with Text_IO;
procedure Hello_World is

begin
Text_IO.Put_Line("Hello World!");
end Hello_World;

One of the first success stories using Ada was the BSY-2, an embedded system for Submarine combat. Comprising 3.1 million unique lines of code, it is one of the largest embedded systems programs ever written.

(c) 2006, Jorge Monasterio

Thursday, December 07, 2006

Programmer's Almanac: Dec 9, 2006

Back on December 9th in 1928, the mother of all programmers, Grace Murray Hopper, was born. A mathematician and gadget freak, she was literally one of the first computer programmers.

In 1943, Grace Hopper wrote programs for the Mark I Calculator, an electro-mechanical computer developed by Harvard/IBM that was the first fully-automated computer requiring no human intervention (once programmed). The Mark I was nothing like today's computers: It was 51 feet long and 8 feet high, and five feet deep. It utilized paper tapes, rotating shafts, clutches and other eletromechanical components.

We haven't found record of that first program, although it's rather certain that the program didn't print out: "Hello, World."

There's a story about Dr. Hopper finding a moth in one of the circuit boards of her computer -- but that's not the origin of the software "bug." It's thought that Thomas Edison used the term "bug" for glitches in electrical systems as early as the 1870's.

Grace Hopper pasted that particular bug into her engineering notebook, and that may have been a first, though:

















Dr. Hopper is credited with the invention of the idea of using a human readable language for writing software, which is then converted to machine language. Today this is known as a compiler. At the time, many people believed a computer could (and should) only be programmed in machine language. In the 1950's, this idea led her to create FLOW-MATIC, an English-like language for data processing that was a precursor to COBOL. Source code in FLOW-MATIC would have looked like this:

COMPARE PRODUCT #A WITH PRODUCT #B.
IF GREATER, GOTO OPERATION 10.


Of course, as the saying goes: "The pioneers get the arrows, and the settlers get the land." So, we may know who to blame to for the Dijkstra's dreaded GOTO statement, and (luckily) for the later rise of structured programming.

Dr. Hopper went on to a distinguished Navy career, winning the highest peace-time defense award, being appointed to Rear Admiral, and at one point being the oldest person in the Navy.

Dr. Grace Hopper served as a tremendous role model to women in the computing field. Today women are under-represented in computer science, and their numbers seem to be decreasing, especially in comparison to Science and Engineering.

Grace Hopper died in 1992. Today would have been her 100th birthday.

Addendum: Today is also the birthday of the computer mouse.

(c) 2006, Jorge Monasterio


Wednesday, December 06, 2006

Programmer's Almanac: Dec 8, 2006

On this day, in 1931, the "birth" of broadband took place: The patent for the co-axial cable was granted to Lloyd Espenschied and Herman Affel of AT&T. Originally used for the development of the first television systems, the "coax" cable was in use long before "wireless" over-the-air programming. In the 1970's, coax was used in the first implementations of Ethernet. Today many of us enjoy the power of broadband in our homes because the "last" mile comes over this magic wire from our cable providers, along with MTV and ESPN.

And also on this day in 1865, Frenchman, mathematician and prime number specialist Jacques Hadamard was born. His proof of the prime number theorem helps us understand the distribution of prime numbers.

In Hadamard's day, it wasn't uncommon for mathematicians to own tables of prime numbers - created by hand. One table even had all the primes up to 100,330,200. There were nearly 6 million numbers in that list. Today, you can see the first 5,800,000 primes online. Jacques Hadamard is probably rolling over in his grave.

Below is a short c-program for finding primes (87 characters). It is notable for being easier than the "old fashioned way":

*v;main(a,b){for(v=1[v=b]?atoi(v[--a]):99;
a%++b%a||(a^b||printf("%d\n",a),b=a++

Luckily for us, the theoretical studies of prime numbers in the 19th century serve a useful purpose in the Internet Age: The difficulty of factoring very large primes is the basis for most modern encryption algorithms. Encryption lets you securely view your bank's Web site over safe HTTPS protocol -- on fast coaxial cable connections to the Internet.

(c) 2006, Jorge Monasterio

Programmer's Almanac: Dec 7, 2006

Linguist Noam Chomsky was born on this day in 1928. We can thank him for parts of the grammar theory that is used, for example, when parsing computer languages or for natural language queries. He concentrated on human languages and on discovering a universal grammar that all of us understand innately. He's well known, too, for the Chomsky Hierarchy which describes the various types of grammars (recursive, context free, etc).

Oddly, his leftist politics have made him more famous than his contributions to linguistics and programming. And interestingly, he is one of the most cited authors in scholarly journals. So, in that spirit, I will cite Dr. Chomsky here:

One basic element in what is loosely called "knowledge of a language", then, is knowledge of grammar, now analyzed in terms of certain structure of rules, principles and representations in the mind. -- Rules and Representations, p.91


(c) 2006, Jorge Monasterio

Tuesday, October 24, 2006

Problems on the new host...

Just for historical purposes, here's where I've been with my new VPS at InfoQuestHosting.com:

1) The original VPS I got ran fedora core 2 Linux, which is apparently pretty ancient. Hard to get RPMs for updates, etc.

2) After some waiting, they now have a new fedora core 5 Linux VPS solution, which I have been upgraded to.

3) The VPS's linux installation is for some reason missing YUM, which is a handy utility for updating this. After a bunch of looking, I found a way to get an rpm for it from the Redhat.com/Fedora website. As su, you need to do this to install it:

cd /tmp
rpm -Uvh http://

Now you can run yum. :)

4) My current predicament is to get sendmail to support port 587 for SMTP, because my home office's ISP blocks port 25. So far, I've updated the sendmail.cf file per comments in that file, and opened up port 587 on my firewall (after installing virtuozzo to do this for the VPN). No luck, yet, though.

UPDATE: sendmail is running through xinetd, so that has to be enabled to listen to 587. So, that means creating a file: /etc/xinetd.d/sendmail_587 with this content (not submission = 587 from /etc/services)

service submission
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
group = root
server = /usr/sbin/sendmail
server_args = -bs -Am
nice = 5
instances = 10
}

Changed hosting again.

Well, I'm in the process of switching hosting again. I've moved up in the world, and now am using VPS hosting for all my websites.

VPS hosting is like having your own linux box working in a virtual machine. You have a root account and can install anything you want.

Some advantages:
1) You can install anything you want. Run any version of mysql or apache, or whatever.
2) You have a root account.
3) Plenty of disk space (15GB) and Memory (192MB) for the VM. You can get more.
4) You can host as many domains as you want (which is an issue for me with most hosting sites).

Some disadvantages:
1) You have to configure everything yourself. They have some nice web based tools.
2) You have to worry about security for yourself.

Thursday, June 08, 2006

JavaScript: Why it's wrong.

JavaScript is the VB of the 21st century.

Don't let the title fool you. I think JavaScript is a really, really cool language. It uses Java's syntax, but the similarites end there: No class path, no modules, no using, no...

It's so much more powerful than many people think: Interesting object model, prototypes, full featured, etc. And when you team it up with the DHTML model in a browser, you can do great things. It's remarkably portable across browsers -- most of the incompatibility comes from the DHTML differences.

But it's wrong for web development:
1) In the same way that C++ is too low-level. Too easy to hang yourself. Here is a screwdriver -- make a house.
2) Debugging hell. Becomes painful to debug.
3) Interpreters are not for the timid.
4) In Ajax, requires too much knowledge: DHTML, java, XML, whatever you're using on the server side.
5) Too hard to reuse.
6) Spaghetti code.

Thursday, April 27, 2006

WINXP: Flushing DNS programatically using C#

In order to clear DNS resolver cache like what IPCONFIG /flushdns does, programmatically:

Requires dnsapi.dll which requires Win2000 or later. As usual, MS does not document the API, so your mileage may vary, but I think this is right:

using System.Runtime.InteropServices;

...

[DllImport("dnsapi.dll",EntryPoint="DnsFlushResolverCache")]
private static extern UInt32 DnsFlushResolverCache ();

...

public static void FlushResolverCache()
{
UInt32 result = DnsFlushResolverCache();
}

Friday, April 14, 2006

Moving hosting again.

Selected netfirms.com. They had a pretty good deal for $9.95 for first year.

First impressions:

Good:
1) Php5, mySql4.1, SSH access, and they allow 25 domains. Tons of space and BW.
2) Easy setup and the price is right.
3) They've been adding more features (secure FTP, static IP's, etc) over the last months. Most hosters are so STATIC, they start a new company with new features for new customers. This is good.

Bad:
1) Their shell access is pretty lame. No VIM, for example. Not even SCP???!!! Or WGET. You can't create directories in your own home directory (just under www and cgi-bin).
2) The way they name mysql database is not userfriendly. You get a name like D5022982. I wonder if D5022981 is someone else's. And why can't I limit external db access (when turned on) to specific IP's?
3) The control panel is ok, but a little slow (it doesn't run in your own account, but on a shared server somehwer). Not as good as CPANEL, but usable.
4) Not a lot of apps available. Fantastico would be good.

I guess this is a good step until I get my own server somewhere. Or, at least VPS.

Not sure if I want to move all my sites to netfirms, yet.

Thursday, February 23, 2006

Web Page Flake

I made something on the PageFlakes site.

In the top-left corner, you can add "flakes". Look for the Web Page item in the menu and add it. It should end up on the web page "desktop." Then choose Edit. Pick a site and you can add it to your page.

Wish me luck. If enough people use it, I win a prize.

Saturday, February 18, 2006

The modal message box is pure evil.

If you don't know what I am talking about, the modal message box a little window that many applications popup that looks like this under windows:









Macs have 'em too.

Messageboxes are a basic Windows operating system feature, ever since the oldest versions. Basically, they're very easy for programmers to show, so programmers abuse them instead of using better UI elements.

They have an evil cousin, the modal dialog, which is rarely better.

Here is why modal message boxes are probably the worse UI element ever invented.
  1. The user has to act immediately. They may have to grab the mouse, and click a button or remember some keyboard shortcuts. This distracts the user from whatever work they may have actually had to do. Anything that stops the user from doing work is bad.
  2. When a user sees to many of the same message ("Are you sure you want to continue?"), they start answering them by rote. Ever catch yourself saying: "Crap! I just clicked YES on that messagebox, but it was different from the 20 previous boxes and I didn't read it."
  3. You can't cut and paste the message to send it to someone.
  4. Sometimes they come up behind an app. That always sucks. You can't continue until you find them. This is usually a programming error, but it still is a pain for users.
  5. The help button, when (rarely) implemented, is hardly every useful.
  6. The text in the message is usually formatted terribly. Come on! It's 2006, and there is no control over fonts or boldness or including hyperlinks. NOTE: Even if your custom messagebox has these features, I'd still avoid using it. More later.
  7. Sometimes these little devils are shown in a program loop, and you spend a lot of time closing them all.
  8. Often you'll see a yes/no question like "Are you sure you want to continue", with the options of OK or CANCEL. Please kill me.
  9. If multiple messages occur (happens all the time), the user has to remember them all. There is no history.
  10. These gnarly message boxes rarely remember what you did before. I catch myself thinking, "I've clicked YES 20 times, when is the computer going to catch on." Sometimes, you'll see a fancy one with a little checkbox that says "Always click yes." -- another non-custom hack that is better avoided without messageboxes.
  11. They don't match the UI skinning of the app and are ugly. One of my favorite examples is the new WINDOWS VISTA install. You put in the CD and you get this super fancy graphical install with neat colors and stuff. When an error occurs, poof: An ugly old gray message box.
  12. I love the ones with only an OK button, that don't accept ESC to close. They're uncommon, but exceptionally annoying.

One great example is the FIND dialog in Internet Explorer. When you want to find something on a page, it pops up and you see:








Not so bad, you think, but here are the problems with it:
  • You can't cut/paste to it from the web page, if you want to select some text to find after you show the dialog
  • It doesn't remember your last search, much less your history.
  • It's ugly.
  • It covers up the page your trying to search.
Compare this to the FIND feature in firefox. If you think about it, the majority of the problems with the IE dialog are not related to the coolness of FIREFOX find -- they're caused because a modal dialog is used. And worse, because the developers were lazy and tried to use a reusable modal dialog.

But Firefox doesn't always beat IE. It's fixed now, but many versions of firefox would show a messagebox that said something like "Cannot find server." After TYPING a url, you now have to grab the mouse and click OK. Or figure out if ENTER or ESC works. Lame. IE on the other hand would show you a web page (it IS a web browser) with the error info.

Well, how can you avoid messagebox and other modal dialogs in your designs?? It's hard but it can be done. Here are some tips

  1. Think LONG and HARD every time you're about to show a modal dialog or message box. Just say NO, if possible. Try to think of other apps and how they do it. Take a look at a MAC.
  2. For error messages, pretend you're making a web page instead of an app. In a web page, you'd stick little red exclamation icons next to the illegal fields. Maybe an error message in at the top or bottom of the page.
  3. Try not to interrupt long running processes with message boxes (Windows installs LOVE to do this). Often, this indicates that you didn't ask all the questions you needed ahead of time. Or, maybe, your app can just report all the errors (in a cut/pastable list for tech support) at the end of process in the main application window.
  4. Try to show progress information and errors information in the main page. On color-highlighted status bar, for example.
MessageBoxes really are terrible UI elements. MS would do us all a favor my removing support for them in a future version of Windows. I hear you: "Oh no! That would break my app." Well, your app needs fixing.

Wednesday, February 15, 2006

Wondering about domain names.

Just wondering about domain names:

What sorts of "categories" of words do you suppose are underutilized in the domain busienss.

For example:
1) What percentage of first names (in English) already have a .COM.
2) What percentage of 3, 4, 5, 6, 7 letter words?
3) What percentage of english nouns?
4) What percentage of english verbs?
5) What percentage of words that refer to human body parts? Arm, leg, etc.

Which parts of the English language haven't been completely picked over for domain names?

I guess if you had a DB of all domain names and used something like "google sets" to find related words, you could start to answer some of these questions.

Tuesday, February 07, 2006

I see ads everywhere on the internet... Do I have adware???

Do I have adware???

Many web sites that you and I visit have little google text ads on the bottom or right side. As a naive user, how can I tell if Google has somehow "hijacked" my web browser? Or am I supposed to know that these ads are a part of the web page? The ads sure don't look like they were authored by the website. How do I know I don't have adware?

Obviously, I am being facetious, but... JUST THINK ABOUT IT FROM THE NOVICE POINT OF VIEW.

Remember Gator? It was probably the prime example of "adware/spyware" back in the day. It was a useful application that had the "side-effect" of popping up ads that were related to the site you were visiting.

So my question is this: What is the distinction between adware and NOT-adware? Is it the mechanism that is used to display the ads?

After all, the end effect is the same: I see ads everywhere I go... and Google put them there. Just about the same as Gator used to be, only it is implemented differently.

Oh, and Gator used to track your browsing habits. Google only tracks you if you let them track you.

Are you as confused as I am?

NOTE: Sometimes Gator would even replace existing ads within a page with it's own ads. I'm not talking about that feature. Google doesn't do that... yet.

In the interests of full discolosure: I am a Google stockholder.

Saturday, January 28, 2006

Unsealing Visual Studio Generated Properties.Settings

I've often wanted to have public access to the Properties.Settings classes generated by Visual Studio 2005 because:
  1. I want to inherit from the Settings to add special helper methods to the generated code.
  2. I want to write external unit tests that access the Properties.Settings, but they are internal.
  3. I also want to inherit from Setting to add a buffer layer between my code and the generated code. In case I need to fix things later, when Microsoft changes the generator.

At first, I thought: There's no real good way to do the above without manually editing generated code.

But then I learned more about the "Custom Tool" property that shows when you click F4 (Properties) on the Application ... Properties... Settings.settings node in the project tree. By default this will say: "SettingsSingleFileGenerator"

What is "SettingsSingleFileGenerator"? It's a .NET object that exposes a special COM interface. The .NET object runs and generates code (from XML settings in this case), which you see in the generated code node underneath: Settings.Designer.cs.

Turns out you can make your own generators and then install them into visual studio. But, it would be a pain to re-create the SettingsSingleFileGenerator. Luckily, you can chain these generators together: You just set the CustomTool properties of the previously generated code to use your custom generator. Nice!

Like in this screen shot:





If the instructions in the two links above make sense, then here is the code for a generator that will unseal your settings.

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

using CustomToolGenerator;

// Code downloaded from here: http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=4AA14341-24D5-45AB-AB18-B72351D0371C
// Install notes: http://www.drewnoakes.com/snippets/WritingACustomCodeGeneratorToolForVisualStudio/
namespace UnsealedSettingsGenerator
{
[Guid("828BA458-f1f1-f1f1-f1f1-91ACEC2F38FD")]
public class UnsealSettingsGenerator: BaseCodeGeneratorWithSite
{

protected override byte[] GenerateCode(string inputFileName, string inputFileContent)
{
// Replace the source from the input, with our new text
// This is lamer than parsing, but it does the job and makes the point.
inputFileContent = inputFileContent.Replace("internal sealed", "public");
return Encoding.ASCII.GetBytes(inputFileContent);
}

public override string GetDefaultExtension()
{
return ".Unsealed" + base.GetDefaultExtension();
}
}
}

A key point is to make sure you set the registry keys right (see screen below), so VS2005 will load your generator. Also, you can right click on the source file and choose "Run Custom Tool" to force your generator to run.



This is all a lot of work to generate and install. I have some code that lets create your own generators easily and keep the "generator's code" (not the generated code) in the same project you're running in (without all the COM malarkey). Maybe I'll upload that sometime.

Wednesday, September 28, 2005

Will there ever be...

a succesful programming language that isn't english-like?

APL?

No really. Like french or spanish:

si a > b entonces
llama f(a);
fin;

Tuesday, August 30, 2005

thinstall

Very cool stuff. Wraps an EXE and implements a virtual filesystem and registry, so an app can load DLL's and OCX's (or .NET stuff) from within the EXE.

You end up with a standalone EXE (with no DLL hell) for any app.

Very expensive.

A low-end version of this tool would be hot.

-- Jorge.

Monday, July 11, 2005

I wonder if bad people do this...

I wonder if bad people send stegograms in their IM pictures, while idly chatting.

Wednesday, June 08, 2005

Top 10 things I wish computers could do

1) Bootstrap intelligence.
2) Realize that I'm making the same edit over and over. And offer to repeat it.
3) Keep infinite, multipath undo on every file ever.
4) Auto save every version ever.
5) Allow me to script every application (like user-side javascript -- greasmonkey for windows).
6) Never lose data. I'm old -- only I should forget things.

Saturday, May 07, 2005

4 ideas

1) A "name pronounciation" tool that provides likely pronounciation for a persons name. Handy for telemarketers.

2) A DB of recordings of people's names. Like "George", "Tom", etc. To be used in video games, to personalize the game. Maybe a tool to merge the name to mimick the pronounciation used by the current voice actor. So, if script of game says: "Hello, %S, how are you.", the name could be injected from there.

3) A system to allow a person to take a digital picture of themself and replace the face in a first person shooter. So whenever there is a scene where you see the main character, the player actually sees themself.

4) A web tool/survey to predict how financially sucessful a person is likely to be. Would be nice to know if Wayne is as good as he says he is.

How to avoid dialog boxes in web design...

Thought provoking articles:

Part I

Part II

Saturday, April 30, 2005

Read the first 4 pages of this...

Sunday, April 17, 2005

It's a hoax, but I bet people would want to do this...

Coming Soon:

50 Million years in the future, your fossilized body could be discovered by future paleontologists... After death, you or your loved ones (including pets) can be fossilized, and buried in South Dakota -- very near to the locations where the best preserved dinosaur fossils are found today.

Saturday, April 02, 2005

Donate to "La Vida Robot"

Life's a bitch. If you like it when the underdog wins, help send these kids to college...

Scholarship fund info:

http://www.wired.com/wired/archive/13.04/donate.html

VB6 bug of the day: csng() function problems in different regions.

On english windows, csng("1.1") returns 1.1.
On french-windows, csng("1.1"), fails with "Type Mismatch"
On french-windows, csng("1,1", returns 1.1

So, when reading numbers from a data file created in US, you must do something like this in France:
csng( val( strFromDataFile))

Sunday, January 09, 2005

Windows Registry Bug of the day.

SHRegGetUSValue doesn't work if the key path contains a space, like:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server

What a piece of junk.

Saturday, January 01, 2005

Can't say enough good about this site.

www.vbaccelerator.com - Just a bunch of good code. See the "controls" section.

If you're still doing VB6, they've just got some killer stuff here.

If you're doing .NET (anything), they're starting to have some nice controls for you.


Turns out maybe I am spelling brannick wrong.

Google's super spell feature:

Did you mean to search for: brannock device

Tuesday, December 07, 2004

Crazy Theory of the Year

Cause of America's obesity epedemic discovered!

Air-conditioning.

Think about it.

Saturday, November 06, 2004

The "big show".

Where do the great software programmers go? The "big show."

After discussing it with a friend, we decided that there really is a big difference between working at a small-to-medium ISV, in comparison with going to the "big show". What's the big show? Well in baseball, it's the majors. In software...

Obviously, a gig at Microsoft is the big show.
Google recently has become the big show.
Ebay, Amazon, Yahoo -- The other sucesses of the internet age: The big show.
Apple, IBM, Novell, Borland (?), Redhat(?): The big show.
If your mom has heard of the software company: Probably, the big show.
AT&T Labs: Old-school big show.
NASA, NSA: The government big show.

So what's the big deal? Should we all be trying to get to TBS? Do the really bad-ass programmers typically graduate to it?

Does this have anything to do with why I know so few 50+ year-old programmers?

Give me a startup, any day.

-- Jorge.

Hah! J2ee won't get you a job.

Heard it from a friend. Who heard it from a friend: J2EE on your resume will actually NOT get you an interview at some companies.

That is so freaking practical. I didn't think everyone was "getting" it.

If you really want to make a product late, use J2ee. :)

Monday, October 18, 2004

What if Microsoft could innovate?

This quote from SeattlePi.com really got me thinking today:

"I work for Microsoft. I own plenty of Microsoft stock. I want Microsoft to succeed. But right now Google is kicking our butt. We're so far behind everyone else on these things, and Google is so far ahead of everyone else..."

Where would the world be if Microsoft were an innovative company? When was the last time Microsoft innovated? Is Microsoft capable of anticipating a trend? What if they were?

So here is my list of big Microsoft products:
Windows -- Not innovated. Concept stolen from Apple:) Certainly business genius to push it out inspite of industry pressure that console apps were "good enough."
The Internet -- Surprised Bill.
Office -- Microsoft certainly didn't invent the spreadsheet or the word processor.
.NET -- J2EE, improved. Shoot, C surprised MS!
Internet Explorer -- Not invented there.
VB1.0: Yep. That was innovative. But it came from outside.
XBOX - Fun. Maybe XBOX live is a bit innovative.
Security - This "innovation" sure seems to be catching Redmond off guard.
Foxpro, SQL server, CRM, SourceSafe, all the other crap -- No, no, no.
MSDOS - The biggest of all. The technology was bought from another company.

So what does it mean? Well, Microsoft isn't going to win many contests for thinking ahead on technology. MS is master of acquisitoin, marketing, sales, and continuous improvement (V2 better than V1, etc).

But what if? What if Apple had gotten the MSDOS deal? What if Google had released the first version of Windows. Where would the world be today? My theory:

By chance Bill Gates wins the IBM PC deal. The world technolology improvement slope was greatly flattened by that sales win. What a shame!


-- Jorge



Sunday, October 17, 2004

The reality of Junit

On a few recent projects, I've written some Junit tests. In fact, a few hundred of them. I'm no expert, but I think that junit "out of the box" isn't ready for primetime. Real projects need to add a lot more infrastructure to make it work without become burdensome.

Here are my observations on scalability:

Once you have a lot of Junit tests...
1) When tests fail, it takes a long time to look at them all and figure out what is going wrong. A very long time. Especially, if the classes under test are still immature. Sure, if it's all green, life is good. But on projects with many modules (and many separate developers), the bug list can get pretty big and development can't always fix the tests right away.

2) It becomes very hard (a burden, in fact) to make major improvements to your classes (especially changes that affect the class signatures). All those tests have to be rewritten -- or at least reviewed. In some ways, this slows down innovation -- especially on a V1.0 release.

3) The results aren't summarized well. Which tests failed differently from the last run? Which tests already have bugs reported in the tracking system? This can take a long time to review.

4) For projects that have a test plan, it is painful to correlate the junit test back to the test plan. Which tests aren't implemented yet? Which tests have been code reviewed? Which tests are being deferred because that functionality is no longer expected in the current release?

5) What about all the legacy code that doesn't have junit tests? This problem comes up in every project.

6) Who reviews the test written by the quality assurance department? Are the test really right? Does code pass because the test is improperly written?

It's nice to see a lot of green at the end of the test. It's just not easy to get there on a big project.

-- jorge.

Friday, October 15, 2004

Several new cool products

Need to test websites under various OS: http://browsercam.com

Spanish only: Need a desktop written entirely in Flash? Great for folks who travel or use internet Cafe's frequently (more common in Latin America).

Sunday, September 12, 2004

Modeless windows in VB ActiveX DLL / OCX, etc.

This is lame, but if you desparately need a modeless dialog in an ActiveX dll:

After some pain, I have managed to show a modeless dialog in a Visual Basic ActiveX DLL. It's a total hack: The basic idea is you create a modeless window using the CreateDialogEx() function. Then you recode the frm you want to show, so that the content is within a FRAME or PICTUREBOX control (put all controls inside these containers). Then set the parent of the VB form's FRAME (or PICTURE) to be the new window, using the SetParent API.

Unfortunately, the navigation keys (tabs, ENTER, esc) don't work. I tried a bunch of things to get the MessageLoop to work properly (IsDialogMessage API in various combinations of message pumps). But you can set the KeyPreview propery in the form and then handle these keys yourself.

One thing that does not work: If you simply try to show a modal box, but then use EnableWindow() to enable the main window, the main window will mostly work, but menu items like CLOSE window won't work.

-- Jorge

Friday, September 26, 2003

I like cool stuff

Booya.

Monday, August 25, 2003

New blog for me...

I've decided to create a new blog dedicated to "reviews" of existing code. The point would be for people to write "code reviews" but in format of a "book review." That is, a large piece of (typically available) open source code would be "reviewed" by a "reviewer.": "This code is worthless..." "A brilliantly reusable piece of code at: xxxx.xxx". Etc.

Monday, August 11, 2003

Bad ass band name.

Look who is playing at Kirby's: Brannick Device... Eeek. Now I need a new band name.

The Wichita Eagle | 08/08/2003 | Gig guide

Friday, August 08, 2003

PostMaker for HTML forms.

Idea: A utility that looks at an HTML form (as script) and generates a URL that the form would post. Maybe an option for creating a WGET command batch file for that form.

stenographic privacy

I've decided to increase my internet privacy in the following manner: I will introduce a bunch of bogus data about myself into various systems. Hide my identity, like a "needle in a haystack."

Step 1: My phone number is: 949-322-3111
Step 2: My zip code is: 91113

Wednesday, August 06, 2003

Warthog

"Warthog Jump: A halo physics experiment" -- Great halo movie.

Tuesday, August 05, 2003

Super Funny

Read the title on this MSDN bug. I am going to report a bug to microsoft that not enough people buy my software.

More on VB Tray Icon

So I want to load my single OCX as both a tray icon and an explorer toolbar, depending on the situation.

One possibility: Use visual dll to create a DLL from VB code. Then export a function, createTray(), and use rundll32 to run it (so it lives beyond the lifetime of the toolbar).

Monday, August 04, 2003

Toolbar idea

How about a toolbar that highlights "bad links" in every page that you visit?

Adding an Icon to the tray.

A short description of how.

Now I just have to figure out:
1) A communication mechanism between the tray and the toolbar.
2) How to keep the toolbar alive after IE is killed, so that future IE's can attach.
3) What to put on the toolbar menu: Master logon... Log off... Timeout?

Wednesday, July 30, 2003

Increase visibility.

The key is to keep it in everyone's face. Don't let up. Repeat yourself again and again.

Sunday, July 27, 2003

You learn something new every day...

How could I not have known about regedt32.exe for so many years? I've always used regedit and never realized there was another option. The regedt32 application allows you to set security permissions (on 2000 and XP). Heh.

Thursday, July 24, 2003

Jpeg2000 Links

Here's a site that has a java implementation.
Buy the iso spec.
General information about jpeg2000.
There are some chipsets
A j2k plug-in for adobe photoshop.

Wednesday, July 23, 2003

Some copy protection ideas...

Brook suggests: Download a missing section of code (like for file saving) from the web and stamp it into your executable when they register. At least that way, the hacker has to register once to get the code.

We also pondered: Have the username and registration key hash into executable code that is required for the feature to work.

Hit the web, intermittently, to make sure the key is not stolen.

Always reboot after registration: This makes it harder for the hacker to debug the app.

VM's are tougher to hack. Long live VB. :)

Added free counter...

Retrostats seems pretty good.

Tuesday, July 22, 2003

Integrated blogkomm commenting system.

Very cool stuff. Now my blog has comments.

Note to self: How to set the default file in Apache.

Go to the desired www directory (can be a subdirectory) where you wish to set the default file.

Create a file, .htaccess, with the following line:
DirectoryIndex blog.php index.html

The apache web server will try to find each file in order.

Sunday, July 20, 2003

Cheap authenticode certificates.

My quest for a cheap authenticode certificate continues:
Verisign -> $400/yr !!!
Thawte -> $199/yr !!! (A division of VeriSign -- a "branding" difference worth $200?)
Ascertia -> Will give you one for $0. But they're not a root authority on most browsers.
Ipsca -> $190 Euro
Millenia commercial services -> $179/yr
SolidWeb.be -> $180 Euro.
GlobalSign -> $175 Euro
Chinese money???: Code Signing Certificate: 500 yuan RMB one year


Hmmm. There must be a workaround. I've avoided getting one for so many years. Don't know if it really matters.

Also cool: instantssl / comodo has a $49 SSL cert. Nice comparison of SSL certs: http://www.whichssl.org/content/table/index.html

Saturday, July 19, 2003

Wrong end of the bell curve...

Boy am I a late adopter. Just tried out this blogger thing. Initially, I edited a web page manually, but then I stumbled across blogger.com. This thing is pretty easy to use (if you know HTML). But lots of server crashes, so far -- don't know if that is normal. I really like two things:
1) I can publish to my own web server. I limited the security hole by only giving blogger the password to a lame ftp account.
2) Full control over the HTML. You can edit the "template" to your heart's content.

Oddly, blogger is related to the google toolbar -- google bought blogger. So I am now using my competition's product (sort of).

BrannickDevice.com available!

The URL BrannickDevice.COM is available -- super cheap.

send email to sales@dejasurf.com

Debian Rocks

Playing with Debian lately. This is a pretty nice Linux distribution. The package downloader is awesome. Very open (all free). Install the "test distribution". The stable version is way to old.

X-windows over SSH pretty much sucks for slowness even over the cable modem.

Python suckage...

Why python sucks for me. I spel variables wrong all the time. Oops. Another new variable.

Seeing in the dark...

vim has dark colors! Add this to your .vimrc.vim file: set background=dark

If the shoe fits...

So what's a brannick device? It's that crazy metal thing they measure your foot with at the shoe store. Trying using it in conversation: "Nice Brannick Device, ma'am!"

Customizing Internet Explorer

Crazy discovery: You can easily add your own custom options to the Internet Explorer advanced options dialog. Just add entries in the registry like:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions

Your custom options, for example a checkbox, can be set to change registry settings elsewhere in the registry. Values and bitfields are supported nicely.

Cool Product of the Day

Cool security product I found today: EnTunnel from VanDyke software.

This is pretty cool if you need to create SSH tunnels. It will create all your tunnels when you startup Windows. And keep them alive.

Pretty handy for situations were your home cable ISP provider (Cox in my case) turns off the SMTP port. I happen to have access to an outside server that I can SSH to. This allows me to setup tunnels from my house that go to the outside server (via SSH) and then are translated back to SMTP.

Haven't been able to get AIM to work over an SSH tunnel. Maybe because it's UDP? Zebedee looks like it might do the trick, but I don't have a Zebedee server out there that I can use to test.

Another interesting tidbit from the newsgroups:
Netcat will happily pipe UDP into a TCP stream. On the client machine, you would want to do something like: nc -l -u -p syslog | nc localhost 9999 (as root, to bind to the syslog port) On your syslog server end, you'd do something like: nc -l -p 9999 | nc localhost -u syslog Setup your ssh tunnel from port 9999 on the client machine to port 9999 on the syslog server machine. Setup syslogd on the client to log the messages to localhost. Also, make sure that the client syslogd is set up to not receive messages from the network. You'll want to filter on the TCP listening port on the server to prevent people from DoS'ing you with spurious messages.

AIM Certificates

Got a free cert from Thawte to today to use with the latest AIM 5.2. Kindof a pain -- Thawte's instructions suck. But now I can encrypt my AIM content -- if the reciever also has a cert. Let me know if you want details on the process.