Monday, January 13, 2014

Early 80's microcomputer magazine

Nostalgia. I grew up on this stuff.

https://archive.org/details/80-microcomputing-magazine-1983-03

Tuesday, December 17, 2013

VT-60 Wine Cooler not cooling.

VT-60 Wine cooler not cooling.

Symptoms: Don't hear compressor. Hear a relay click every few minutes.

1. Unplug!
2. Take off back
3. On the left side, is the compressor.
4. On the left of compressor, remove plastic housing.
5. Overload protector is on top (under where housing was) with wires going to it. You should be able to pull the overload protector out (to the left). It has some guide pins, so don't pull up.
6. Open the overload protector. There is a brown disk inside that you may be able to flip over (if it looks scarred). Like this (see last few pictures on this site):

http://chadmunkres.blogspot.com/2010/10/refrigerator-compressor-repair.html

7. If that doesn't look damaged, try replacing the relay (although, you might not be hearing it click if it is damaged).

8. Reverse steps 4...1

Tuesday, December 03, 2013

Embedding an editor in C# Winforms project.

I wrote some code to create a UserControl that is a syntax-highlighting code editor in Win Forms .NET application.

The "tricky" thing is that I am embedding the ACE HTML editor to do it.

Support syntax highlighting and themes. You can insert text and get text out via code.

Very simple. All BSD license (including the ACE editor).



Friday, February 22, 2013

Cool regex debugger

http://www.debuggex.com/?re=x.%2Ay&str=xjorge

Wednesday, January 09, 2013

It's just too difficult.

I want to scan an image.

To difficult on Mac. Practially impossible on the PC.


Monday, December 31, 2012

SuperOrca

Discovered this nice free tool called SuperOrca -- replacement for the ORCA MSI editor that microsoft makes so difficult to download.

http://www.pantaray.com/msi_super_orca.html

I will probably give their installation tool a try next time I have to make an installer, too.

Tuesday, November 27, 2012

Mall in Mexico City, November 2012:


Microsoft must just have an insane marketing budget! How many countries are they doing this in?

Thursday, September 13, 2012

If I ever want to get back into embedded development, this looks useful:

http://www.saleae.com/logic

Boy, times have changed. The future is better than the past.

Tuesday, September 11, 2012

Monday, August 13, 2012

CYGWIN - Kill all process with same name in Windows


Suppose you have several processes in Windows with same name and you want to kill them all from CYGWIN command line:

ps -W | grep WorkerProcess32.exe | grep -v grep | gawk '{print $1}' | xargs kill -f

Friday, July 06, 2012

6-letter domains

Here is a neat list of available 6-letter domains that are "readable".


Tuesday, May 08, 2012

Idea for new Question and Answer site.

I am going to make a q&a site that only has questions that are banned on StackOverflow -- ie. all the cool ones:

http://stackoverflow.com/questions/243387/best-language-for-safety-critical-software

Thursday, April 26, 2012

Sequence Diagrams: Text is better.

I often like to make UML sequence diagrams. Graphical UML editors are a pain in the butt -- too much mousing around.

I'd rather edit a text file, since I can type really fast. And, then I can source control my text files.

And I found just a tool to do it: Quick Sequence Diagram Editor

This is a nice tool. You edit text in one pane, and it dynamically creates the sequence diagram in the other. Or (although I haven't tried it), you can create the diagrams from command line using text file input.

Great stuff.

Sunday, April 22, 2012

15 Minutes of Fame

A thought experiment:

What would you say if you had 15 minutes with a guaranteed audience of 10,000 people listening to you? How about a 1,000,000 listeners?

Practical implementation:

TheListServe.com is an email lottery that gives you a chance to find out. Each day, a random user is selected from everyone on the mail list. That person gets a chance to send an email to everyone on the list.

The more people who sign up, the more listeners there are.

Why I think it's cool:
Just thinking about what I would say, and asking my friends what they would say has been very fun. Even if I never win, it's neat to ask people what they would say.



Nice article on how to choose a domain for your tech startup:

http://thenextweb.com/entrepreneur/2012/04/22/before-naming-your-startup-read-this/

Or really, any new business, for that matter.

Thursday, April 12, 2012

Notes on dynamically modifying CLR code.

Some notes for a possible project:

How edit and continue is implemented:
http://blogs.msdn.com/b/jmstall/archive/2005/02/19/376666.aspx

Writing debugger in .NET: An entire debugger with edit-and continue. The link ABOVE explains how to make delta files used in this debugger.
http://www.microsoft.com/download/en/details.aspx?id=2282

Simpler debugger in .NET wrappers.
https://tripleemcoder.wordpress.com/2011/12/10/writing-an-automatic-debugger-in-15-minutes-yes-a-debugger/

Using debugger APIs (this is most interesting -- works on live code).
http://msdn.microsoft.com/en-us/library/bb384380.aspx

Reflector/Reflixil (on an assembly, not live):
http://www.codeproject.com/Articles/20565/Assembly-Manipulation-and-C-VB-NET-Code-Injection

Similar to above (REBEL.NET):
http://ntcore.com/files/netint_injection.htm

CLR Injection:
http://www.codeproject.com/Articles/37549/CLR-Injection-Runtime-Method-Replacer

KEYWORDS:
CLR INJECTION
JITCachedFunctoinSearchStarted
Edit and continue (debugger)

Thursday, March 15, 2012

Never retire!

Love this:



1. There is no physical reason to retire.
2. Continued work can support healthy aging,  including better physical and mental health.
3. Well-being and happiness are boosted when people are engaged in challenging and meaningful activities. Work is a major place to find such activities in our society.
4. Older people have rich experience and mentoring skills to help enrich the workplace experiences of younger colleagues.
5. Declining numbers of younger workers, courtesy of lower fertility rates, will raise the need to retain older employees in the workforce.
6. We need and like the money, and shorter retirements sharply cut the risk we will outlive our assets.

Wednesday, February 29, 2012

AT&T "High Data Usage" on Leap Day

Today, FEB-29-2012, my wife got the dreaded "high data usage" email from AT&T on her iPhone today -- her first. Basically, AT&T sends this email to their customers with the "top 5%" of data usage.

Just to let her know that the "unlimited" plan is not so "unlimited" after all.

As a programmer, I was just happy to know that the AT&T billing system handled leap day correctly :)

I guess my kids won't be watching movies on the iPhone in the car anymore.

The text of the mail:


High Data Usage Alert
Dear XXXX XXXX, 

Like other wireless companies, AT&T is taking steps to manage exploding demand for mobile data. We're responding on many levels, including investing billions in our wireless network this year and working to acquire more network capacity.

As mentioned on a previous bill, we're also taking additional, more immediate steps to help address network congestion and improve reliability. One of these steps involves a change for some customers who use extraordinarily large amounts of data in a single billing period - about 12 times more data than the average smartphone user.

For the current billing cycle, your data usage indicates you could be affected by this change. Here's how it works:

Smartphone customers with unlimited data plans may experience reduced speeds once their usage in a billing cycle reaches the level that puts them among the top 5 percent of heaviest data users. These customers can still use unlimited data and their speeds will be restored with the start of the next billing cycle.

We're writing because you are in the top 5 percent of heaviest data users for this billing cycle. Because we recognize that data usage can change from month to month, you will not see reduced speeds this billing cycle.

Beginning with your next billing cycle, we'll send you a text message if you are approaching the top 5 percent of heaviest data users. We'll also send you a second text message if you cross into the top 5 percent of heaviest users, at which point you may see reduced speeds for the rest of the month.

Customers have several ways to manage extremely high data usage.

Wi-Fi offers great speeds and doesn't add to your wireless data usage. Consider using Wi-Fi when possible for applications that use the highest amounts of data, such as streaming video apps, remote web camera apps, large data-file transfers (like video) and some online gaming.

You may also consider switching to a tiered data plan if speed is more important to you than having an unlimited data plan. Customers on tiered plans can pay for more data if they need it, and will not see reduced speeds.

To estimate how much data different activities use, and find out more about Wi-Fi or tiered data plans, visit https://www.att.com/dataplans or call Customer Care at 800-331-0500. 

Thursday, February 23, 2012

This happened to me a couple times on AskAboutDomains.com, and I forgot how to fix it, so here:

Problem with OSQA database:

django_session is marked as crashed and last (automatic?) repair failed

Fix:
1) Using SQLYog open the database.
2) Run this command: REPAIR TABLE django_session USE_FRM

Wednesday, February 01, 2012

Cool HTTP Techniques

WebHooks - POST to an HTTP address, when something happens in your system. Your users (other servers) can subscribe to be posted to.

Comet/Long Polling - Keep an HTTP connection to a server open, until it times out or server responds. This is to avoid polling.

Tuesday, January 31, 2012

More WP7 nonsense - Interop Unlock

So (see previous post), I finally got my Microsoft App Hub account to work. MS had to manually enter my credit card info -- their sign up pages are very broken. Lots of pain there.

But I did it and then I found out that there are several levels of unlock for the Windows Phone 7.


  • Locked - This is how a phone comes. You can't upload any apps.
  • Student Unlock - "Student" developers can sign up for this and are able to upload 3 development apps to their phone.
  • Developer Unlock - This is what you pay $99 for at AppHub. It gives you up to 10 apps that you can upload to your phone. I have this.
  • Interop Unlock - Upload as many apps as you want. But, even better, the apps that you do upload have can access all kinds of features that you can't access with lower accounts: The registry, etc.
Obviously the Interop Unlock is something to shoot for. There appear to be lots of jailbreaks for this for First Generation WP7 phones, but not many for second generation like the HTC Radar that I have.

So, after signing up, I still am pretty limited on what types of apps I can write for my own hardware. 

This is a little bit different from Apple. When I developed iPhone apps, I could write any app I wanted and use any API I liked -- I couldn't put the app in the store, but I could put it on my phone.

I'm so used to Microsoft giving developers a lot of freedom. In fact, if you bought earlier generation phones, they even supported Homebrew. But that era seems to have ended.

So I don't have full control of my hardware.

This situation will not stand.


Sunday, January 22, 2012

WP7 Development: Oh the humanity!

After lots of research, bought a new HTC Radar Windows Phone 7 (WP7) phone.

I wanted to port some of my iPhone apps to this new platform, mostly because I am sick of Apple's dev tools. I've always liked .NET, and thought this was my big chance.

But, oh, the WP7 tool chain is a giant pain in the butt -- basically can't get the toolchain to work for me.

1. On my main dev machine, the Visual Studio 2010 refuses to create WP7 projects. See: http://stackoverflow.com/questions/8903229/error-creating-silverlight-4-0-project-for-windows-phone

2. So, I installed everything (again) on a VM (which isn't as fun to develop on). After installing ZUNE and a bunch of other crap. Can finally compile. But emulator doesn't work on VM (I get a warning about the video card, ugh).

3. No bother, I will just deploy right to my new phone: No emulator needed. Well, to do that, it turns out you need to "developer unlock" your phone. Two ways to do that.

    a. Join "App Hub" for $99/yr. No problem, but the dang site won't take my credit card. Lots of people have this problem, but Microsoft has no fix. Truly lame: http://forums.create.msdn.com/forums/p/78616/480263.aspx

    b. Use this tool called ChevronWp7 to unlock the phone for development. This is supposed to cost $9, but Microsoft seems to have stopped them from selling any more. https://labs.chevronwp7.com

Maybe I will stick with Apple.


Tuesday, January 17, 2012

HTC Radar Review

I've had HTC radar now for 10 days... here are my thoughts:

My previous smartphone experience is with all versions of the iPhone (we've had them all). I got this radar phone on a new T-mobile plan.

Pros for the HTC:
- The phone is a good size and weight.
- Windows Phone 7 operating system is a pleasant surprise. Works well and is speedy on this phone. Simple to figure out.
- It doesn't come preloaded with a too much junk. There are a few T-mobile and HTC apps, but easy to remove them.

Cons for HTC:
- Rear (?) speaker is not very loud.
- Hard to hear when talking on phone.
- Somehow I got some tiny scratches on on screen in the first week. Never did that to iPhone.
- No digital compass (although it does have GPS receiver). So some GPS apps are not happy. I suspect this is a bummer for virtual reality apps, too.

Sunday, January 01, 2012

My solution to project Euler #80 in F#:

https://gist.github.com/1547673

Friday, November 04, 2011

Copy protection

Awesome quote on pricing page of reaper.fm:

"We believe that technological enforcement of copy protection is not in the best interest of our customers."



If only the world were run by engineers...

Wednesday, November 02, 2011

Looking for an iPhone app developer?

I didn't write this article, but it sums up my thoughts quite well -- making an iPhone/iPad app is not for everyone. It's expensive, painstaking, and could  be more trouble than it's worth.

http://www.engineeringadventure.com/2011/11/why-not-to-make-iphone-app.html

On the other hand, if you still want to make one and are looking for an app developer, I can do it for you.


Saturday, October 22, 2011

25 Tablet Demos in One Day

On Friday, I left the comforts of San Diego to attend Jason Calacanis' Launch 'Pad conference in the Silicon Valley.

The format of the event made for fast-paced learning -- and was a ton of fun: 25 companies gave 5 minute demos of their latest tablet apps (mostly iPad). The demos were in groups of 5 with Q&A between groups. Jason served as host, and kept things moving along nicely. Throw in a free breakfast, lunch, cocktails and an overload of networking and you have a great event.

The other thing that made the event neat: It was full of creative people -- not all suits and pointy-haired folks. Almost everyone was either a founder, a software developer, or a product designer. Not the usual "VC & Headhunter" crowd, as Jason put it. And it wasn't too big (less than 500 people).

My Favorite Demos
  • Kiran Bellubbi, (955 Dreams) (Band of the Day, History of Jazz) - Kirin was entertaining and opinionated -- the true designer at the conference. This company has created a process for shipping hit applications repeatedly. Quote (paraphrase): "MVP doesn't mean you can ship crap".
  • Peter Ciccotto & Dan Holly Wells (Condé Nast). Idea Flight app - Very cool app allows you to show a presentation on multiple iPads. The flight metaphor is fantastic (pilot, passenger, seatbelts, boarding passes). I even managed to download the app and connect to their presentation "live" during the demo.
  • Osman Rashid (Kno) Kno - Textbooks on the iPad. Very nicely done, and already a top app. These guys are going to make a ton money.
  • Trey Ratcliff, Stuck in Customs, Stuck on Earth app. Look for this one when it comes out. Fantastic photos.
  • James Currier, DrChrono. Best B2B app. Great market/great product for helping doctors keep track of patients. How they get this complex of an app thru the AppleStore review process beats me... but more power to them.

I also enjoyed playing with the "haptic" android pad that was demoed. The iPad really needs that "vibration" feature...

There were a lot of great apps (the Golf training app, blue-ray movies synchronized with "extra" content on another iPad, and more) -- actually every single demo was very good.

Best in Show
The audience voted for best in show, and Condition One won...
  • Danfung Dennis (Condition One), ConditionOne. The demo was Hollywood tight, and the product is going to be an amazing hit. Their first app is a virtual reality view into real combat video from Libya. 
My personal "Best in Show" vote went to 955 Dreams -- As a software developer I loved hearing the story about doing 46 prototypes before shipping the 47th. What a dream job :) Plus Kiran made for the most entertaining Q&A session!

My Takeaways

  • On the iPad, incredible design wins. iPad owners won't buy junk that you throw into the store.
  • MVP doesn't mean you can ship crap.
  • The app store is still very tough for B2B, but take advantage of that as a barrier-to-entry for your competitors.

Special Thanks
Jason: Thanks for the free ticket. Funny you mentioned that developers never get to go anywhere because their boss is always too cheap -- it's so true in this case (I'm the boss of me ).

What a great learning experience!

Friday, July 29, 2011

Rules for working with me

FROM HERE:
http://nullisnull.blogspot.com/2011/07/how-to-work-with-me.html

  1. I prefer to work fast, minimize bullshit, get to the point.
  2. You will sometimes have bad news for me. I want it immediately. I can usually show you how to fix it. And I never blame the messenger.
  3. Bring pen and paper to every meeting with me. Pay attention to what I say; I'll try to speak with care. If I frequently must repeat instructions, or remind you of something I've already told you, you will not work with me again.
  4. If I've scheduled a weekly meeting with you, don't assume that this meeting is the only time to raise issues with me; Interrupt me for time critical issues.
  5. If you have a meeting with me at an assigned time, and I am in another meeting with my door closed, interrupt me. I stack meetings, and each meeting leads into the next.
  6. I like "micro-meetings". Get in quick, bring only the necessary parties to the table, make a decision, get out. Five minutes or less. Make these effective by knowing what decision needs to be made before you start, and presenting the decision criteria ahead of time to all participants.
  7. Stand during micro-meetings.
  8. I don't like email, particularly for discussing complex topics. If a decision needs to be made, do a micro-meeting. If a problem needs to be discussed, ask the person with the most depth to prepare something, an agenda, have a whiteboard, and work through it quickly.
  9. One exception to the above: I like "micro-updates": Quick emails confirming time critical commitments and mutual understanding. These are especially useful after we hold a meeting and I give you a set of directives: I always like to hear our agreed-upon commitments echoed back to me. I may not respond, but I will read it. Keep these emails short: Spare me the greetings, thank yous, regards.
  10. Be consistent in your communication. Use words consistently. Use email headers consistently. Strive to make your work immediately comprehensible.
  11. If you disagree with me, voice your differences. I welcome and invite dissent. If this makes you uncomfortable, feel free to prepare your thoughts after the meeting and then later return to make your case.
  12. Ego-driven debates annoy me. Check your ego at the door: I'm only interested in reaching the best, most elegant solution —I don't care if it's your idea or mine.
  13. Don't be afraid to ask questions if you're not clear. I have more patience for explaining and clarifying my position before you start than I do patience for fixing a wasteful, incorrect approach after the fact.
  14. Don't tell me something is in the process of being done without telling me when it will be done. I'm more interested in the time commitment than the fact that an effort exists.
  15. Always give me options, informed by an economic analysis where possible (if there are dollars involved, an analysis is mandatory), and then make your recommendation. Don't tell me there's a problem without offering a solution. Don't offer me multiple solutions without giving me your best and final recommendation.
  16. If you must prepare reports for me, review spreadsheets I've created. Copy the style and format.
  17. Don't sent me long documents. I like precision and concision. Say it on one page (or less).

I am going to Chile.

This is my plan. Govt of Chile gives $40k to entrepreneurs, if founder moves there...

Monday, June 13, 2011

Whiley.org

Whiley is an in interesting computer programming language: Compile-type Constraints, pure functions, unpure methods, Async/Sync messages, and coolest of all: Compiler can reason about correctness of code.


Tuesday, June 07, 2011

What web servers do *most* domains use?

The June 2011 Web Survey had some interesting data about the various web servers (Apache, Microsoft IIS, NGINX, etc) used across most of the websites (346M+) on the entire Internet. As you might expect, Apache leads by a wide margin -- most likely because of parking.

As noted on news.Ycombinator.com, "Comparing the two [Apache and IIS] over all domains is ridiculous as this includes mass domains such as parked domains which can easily give Apache 10s of millions of useless stat points as one registrar switches a couple of servers."

Interesting conversation here.

Thursday, May 26, 2011

Wednesday, May 25, 2011

Building zombie.js on cygwin.

NOTES TO SELF:

Took me a long time, so I don't remember all the steps. But here are some tips:

1) NPM problems on cygwin with PIPE and SPAWN for TAR. Basically tar returns an error (on cygwin) that should be ignored.

I changed npm/lib/utils/exec.js: function Pipe(...)

cp2.on("exit", function (code) {
cp2._exited = true
if (errState) return
// JORGE if (!code) return log.verbose(cp2.name || "", "success", cb)
return log.verbose(cp2.name || "", "success", cb)

log.error(buff2, cp2.name || "")
cb(new Error( "Failed "+(cp2.name || "")+"\nexited with "+code))

And npm/lib/utils/tar.js (probably not necessary if above is changed):

function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
if (!dMode) dMode = DMODE
if (!fMode) fMode = FMODE
log.silly([dMode.toString(8), fMode.toString(8)], "gunzTarPerm modes")
//console.error(npm.config.get("gzipbin")+" --decompress --stdout "
// +tarball+" | "+npm.config.get("tar")+" -mvxpf - --no-same-owner -C "
// +tmp)
console.error("JORGE");
pipe( spawn( npm.config.get("gzipbin")
, ["--decompress", "--stdout", tarball]
, process.env, false )
, spawn( npm.config.get("tar")
, ["-mvxpf", "-", "--no-same-owner", "-C", tmp] // JORGE --ignore-failed-read
, process.env, false )
, function (er) {
// if we're not doing ownership management,
// then we're done now.
if (er) return log.er(cb,
"JORGE Failed unpacking "+tarball)(er)
if (npm.config.get("unsafe-perm")) {


Also I had to manually install waf-1.5.16 (must be this version) in ~

And set my PYTHONPATH to:
export PYTHONPATH=/home/jorge/waf-1.5.16/wafadmin/Tools:/home/jorge/waf-1.5.16:/home/jorge/waf-1.5.16/wafadmin/:/usr/local/lib/node/wafadmin/Tools/:/home/jorge/node/tools

Basically, the whole process sucked on CYGWIN. I can never get the 8 hours I spent on this crap back.

Now, I am going to go do some node.js screen-scraping.

-- jorge.

Wednesday, May 11, 2011

Quickbooks

Good bye quickbooks. You always were a piece of shit.

---------------------------
Could not initialize license properties
---------------------------
[Error 3371,StatusCode -11118] QuickBooks could not load the license data. This may be caused by missing or damaged files.

For troubleshooting steps, note the error and type the following in a Web browser window:

www.quickbooks.com/support/register.html
---------------------------
OK
---------------------------

Saturday, May 07, 2011

Einstein for everyone

Cool link to explanation of Eintein's theory of general relativity.

Monday, May 02, 2011

Bloom filters for SSL certs

Interesting article -- want to keep link for other project.

Thursday, April 28, 2011

Some pain points for possible startups.

When you are looking for a new business idea, experts recommend solving a problem that is bothering you.

Some ideas I've been pondering lately.

1) InstallShield is a big piece of junk, for developers. I could go on and on. This is a market ready to be won, again. Perhaps, though, the ship has come-and-gone, since application software is dead. Who needs installers when we have apps?

2) The use of Third-party cookies is killing affiliate advertising. Ad blockers and modern browser browers block them, so no one gets paid. How about an advertising network that doesn't use them?

3) I look at VM and I can't tell what's on it. What have I installed since the OS? It'd be nice to get an automatic summary of changes to a machine. The "description" I write with the VM is never right.

4) Trouble tracking all of my domain names.

5) Can't view flash on my iphone. How about a server that converts flash (and restreams) to some format that can be viewed. Too CPU intensive?


Monday, February 07, 2011

TreeSaver.js

Nice for making magazine style web pages that work on iPhone, iPad, and newer browers.

Friday, January 21, 2011

OpenSourced my DotClock Flash app

Demo: http://clownpatrol.com/c.html

Source: https://bitbucket.org/jm/dotclock/src

License: http://Unlicense.org

Monday, December 20, 2010

Initial thoughts on Netflix Streaming

Just opened my Netflix streaming account a few weeks ago and I have some observations:

(1) Parental controls - The parental controls are really lame. Since my entire family uses one account on our TV, I don't want my small children to see content (or names of movies) that are greater than rated PG-13. This has 2 problems:
  • I need to turn off parent controls when I want to view R-rated movies. But it takes HOURS for the switch in parent controls to take effect.
  • Some movies are not rated (like old movies and documentaries). The netflix system can't separate old NR movies from the more ADULT content. So if you disable anything above rated R, you can't see a lot of valid content. And then, if you turn it off, you have to wait hours. Then turn it OFF afterwards, so you kids can't see bad content. Dumb.

(2) Usability - My main beef with the Silverlight plugin that displays movies is that it doesn't remember that I always watch in full screen. So after starting a movie, I have to manually do this.

(3) Selection - Not one single academy award winning movie is available in streaming. All the way back to 1930. Also Christmas classics would be handy this time of year, but they're not there (Rudolph, etc).

(4) Quality: Bad audio on a lot of movies. The video quality is not that great, except for the limited HD content.

Monday, November 01, 2010

How Outsiders View Domainers

Do end users really understand domaining? Do they know what a "drop" is and how it works.

Read this interesting article written by a noob trying to buy KhansAcademy.com for a friend.


Friday, October 29, 2010

Virtual Memory Exhausted by GCC on VPS

This article had some tips for getting gcc/g++ to compile on a VPS that doesn't have a swap file.

Thursday, October 28, 2010

Scraping Made Easy

Found this cool tool, pykhtml. It is a python library that allows you to programatically access the DOM of a a web page -- the best part it is that it understands javascript which most text browsers (lynx, curl, wget) can't even begin to understand.

Great stuff. This is going to be VERY useful.

Friday, September 10, 2010

Instant free DNS for an IP address

Quick and simple way to create a name for an IP address.

Thursday, September 09, 2010

Impressive CMS for .NET

Ran into Kentico today, and it's something I need to investigate in the future. They have a free edition.

Monday, September 06, 2010

Just how biased is HackerNews?

Interesting messagebox on my visit to Nodejitsu from Ycombinator's Hackernews:


hello, i see you are coming from hacker news.

the article you clicked on was most certainly not submitted by nodejitsu.

news.ycombinator has a long history of squashing articles and submitters that aren't funded by y-comb.

most of this is done through their "silent" banning and censoring mechanisms, that leave people not even realizing they have been silenced.

i hope you enjoy this article, and remember that HN is extremely biased and that you should keep your horizons broad.

I guess I am easy to fool, because I always felt HackerNews was unbiased. It's great when someone shatters your misconceptions. Thanks!

Sunday, September 05, 2010

6 Top Reasons Not To Save For Retirement

  1. The Big One - Earthquake in California ruins my life.
  2. The Singularity - AI takes over the world and kills everyone.
  3. Super Volcanos - Yosemite is due to blow.
  4. Peak Oil - This already happened. Will civilization collapse in my lifetime?
  5. Comet Impacts - Overdue. Also near-earth asteroids.
  6. Avian Flu - We got luck ylast time.

Thursday, August 19, 2010

Tuesday, July 20, 2010

How to listen to Pandora when blocked by DNS

Put this at the end of your c:\windows\system32\driver\etc\hosts file:

208.85.40.20 pandora.com
208.85.40.20 www.pandora.com
208.85.40.37 autocomplete.pandora.com
216.239.122.34 audio-sjl-t1-2.pandora.com
208.85.41.11 audio-sjl-t1-1.pandora.com
208.85.41.36 audio-sjl-t2-2.pandora.com
208.85.44.11 audio-ash-t2-1.pandora.com
208.85.40.20 autocomplete.pandora.com
216.239.122.34 cont-sjl-2.pandora.com

NOTE: IP's may change over time, so you may want to ping them all from a machine that is not blocked, to make sure they are all correct.

Saturday, April 24, 2010

Mechanize (new version)

Great way to programatically access a website.

http://wwwsearch.sourceforge.net/mechanize/

(python)

Sunday, April 18, 2010

Google's open source OCR.

PYTHON:

http://code.google.com/p/ocropus/

Wednesday, February 24, 2010

Installed MonoTouch -- .NET Development for iPhone

After beating my head against Xcode and Objective C for 6 months, I finally bothered to install MonoTouch. If you don't know MonoTouch is a C# framework for developing iPhone apps.

Oh, soooo sweet.

1) No more manual memory handling.
2) The MonoDevelop environment is very close to Visual Studio, so I got an app up and running in the simulator in just a few minutes.
3. Did I mention, no more manual memory handling?
4. Integrated debugger! And works with Interface builder (much easier to hook up outlets).
5. I've read that the smallest possible app is about 5MB :( Haven't checked, though, and the release notes claim this has been improved.

Really looking forward to this for native iPhone app developement.

I'm still a big fan of just using the native app as a container for HTML via WebViews. But, MonoTouch will definitely be part of my arsenal for quickly creating iPhone apps.

Proposed Constitutional Ammendments for the United States of America

Time to simplify things, my friends...

Proposed Constitutional Amendments

  1. Each new law passed by Congress must be fewer than 500 words.

  2. For every new law passed, the Congress must remove one previously existing law.

Tuesday, February 23, 2010

Create Testamonials for your Website

Nice online tool for creating testamonials. Great for mini sites.

http://pluspanda.com/

Research into caching webview content.

Possible way to automatically hook into page loading, to implement a MANIFEST (local cache) for iPhone webview.

It's not clear that the cache gets called on the WebView first load ?

http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/

Monday, February 22, 2010

Annoyance

Must Sun Microsystems update Java every day on my PC? What a pain.

Saturday, February 20, 2010

Colo a Mac Mini

http://www.macminicolo.net/

Wednesday, February 17, 2010

Dear Young Geek: I Am You in 30 years.

I'm having an anniversary: I've been programming computers since I was 13. That's not a big deal nowadays --plenty of kids start much younger. I feel old, though: It's my 30th anniversary of programming.

Back when I was 13, I knew no one like me. Folks in Ohio had seen nothing else like me. No one I knew had a home computer. I turned in my homework printed on a dot matrix printer. I was a new thing. People would visit our house and find me, the kid with the computer, remarkable. I don't think it occurred to anyone to call me a geek. Were there even geeks, then? I don't think the phrase computer nerd existed.

Kids, today, are like me, back then. The kids have interesting gadgets, and they learn to program at a young age. Older folks say that kids spend too much time in front of a screen. Today's youth plays cool computer games -- my games were black-and-white with giant pixels, but I thought they were cool. Way back then.

How Did I Get Here?

In 1979, I snuck-in to see the movie Alien. In the film, the shipboard computer, called Mother, blew my mind. That computer could display messages on a screen and seemed to have a personality. I knew right then that I had to make something like that. (I was too young to know about HAL).

A few months later, I convinced my dad to lend me $600 for a Radio Shack TRS-80 Model I black-and-white computer with 4K of memory. I was in heaven. The computer couldn't do much, but I learned BASIC from the manual that came with it. And I typed in programs from magazines like BYTE. And I saved those programs on a cassette tape. And I learned. And learned.

In other parts of the world, the seeds of new industries were being sown back then. In California, Steve Jobs and the Woz had started Apple computer three years before. I hadn't heard of Steve Jobs. If I had, I wouldn't have cared -- he was old. Bill Gates and his pals were working on the Microsoft Basic. Hadn't heard of them, either. The IBM "Personal Computer" would be coming in a couple more years. I was pretty sure I'd never be able to afford anything from IBM.

I kept programming, though. In junior high, I got a summer job at an architecture firm. I wrote software to estimate air-conditioning for buildings using an Apple II computer. In high school, I worked after school as a programmer writing some civil engineering software.

At university, I studied Electrical Engineering. They taught me FORTRAN which was ancient, already, on a VAX . The Computer Science department wouldn't even let engineering students audit the C class. The professor told me I probably wouldn't understand pointers -- I'd been writing assembly language for 5 years by then :)

Later came jobs as a C programmer. Then the object-oriented revolution: I was a C++ programmer. Windows! Visual Basic.

Everything really accelerated as the Internet replaced the dial up services in the mid 90's: HTML, JAVA, PHP, Ruby, Python, C#, Haskell, to name a few.

I worked at a bunch of high-tech start-ups, and even got to make some money doing what I love.

Now everybody is a Geek!

Looking back, I sure did a lot of programming over the last 30 years. I spent a lot of time glued to a computer monitor. I think I turned out okay.

Nowadays, I play Xbox360 and Wii games on my HDTVs. And I have a half dozen PC's and Macs around the house. I have a cool cell phone. My job is on the Internet. I work from home, in whatever country I'm living in. I Twitter, Facebook, Link-In, MySpace, and I Google. I don't do Chat Roulette, but I know what it is. I still program a computer every day.

I may be a little unusual. But I know many people, now, who share my interests.

Where Are We Headed?

Thirty years from now, all of today's new-fangled gadgets will sound as ancient as my late-70's TRS-80 Model I.

The pundits wonder what this new Internet generation will grow up to be like. Now, I have a 12 year old son, and I wonder what he will be like...

Will these kids have interpersonal, real-life skills? Will they be able to distinguish between the computer world and reality? Will they find the real world boring? Will they read books or know how to use a pencil? Will they have spent a huge chunk of their life in front of a computer monitor? What will all these computers do to their brains?

I have an answer, and it's based on my personal experience: These kids will be fine. The games won't turn them into morons. The Internet won't fry their brains. They will grow up to be regular people -- some of them may be engineers and scientists.

And with any luck, the geeky kids that are learning to program today will still be having a great time.

Saturday, February 13, 2010

Add to list of thing California would do if we didn't suck.

Why can't California do things like this, instead of making it hard for new businesses to start here...

http://gigaom.com/2010/02/12/iceland-looks-to-create-information-haven/

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

Tuesday, December 01, 2009

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

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

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

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