Archive for April, 2011

autocomplete=”off”

Something I haven’t thought about much, but very important: for sensitive information, turn off autocomplete on input tags.

<input type="text" name="super-secret-pin-num" autocomplete="off" />

It’s a non-standard attribute, but all the major browsers implement it (including Webkit/Safari).

h/t Pete Freitag

Packaging for webOS 1.4.5

The newer SDKs don’t compile an IPK for webOS 1.4.5, but you can use the awesome Ipk Packager by Jason Robitaille to make a 1.4.5 package.

Ipk Packager 1.5

Imperative vs. Declarative Languages

Interesting read. However,

Declar­a­tive lan­guages allows for greater exten­si­bil­ity, agility and pro­duc­tiv­ity.

I don’t know that I would attribute any of these terms to SQL.

The Craftsman

I loved the music in Unreal, Unreal Tournament, and particularly Deus Ex, so I was happy to stumble across the the website of Alexander Brandon recently. I love his work and enjoyed listening to the new music he’s posted to Bandcamp. Below is one track I particularly like.

For a bit of nostalgia, if you have Unreal, Unreal Tournament, or Deux Ex lying around, grab the Modplug Player which will allow you to play the umx files within the music directory of those games.

webOS list modelChanged bug

I ran into a bug with the webOS mojo framework a while ago, which I nailed down thanks to this forum post. Simply put, calling this.controller.modelChanged on a list doesn’t work properly if the user has scrolled down the list. With the dotspott webOS app I notice a gray rectangle popping up, obscuring the last 2 items in the list.

From pacemkr,

Calling this.controller.modelChanged on a list that has been scrolled past renderLimit will blank out the screen and not show the changes. This happens because modelChanged handler in the List widget resets renderOffset to 0. In other words the list widget assumes that the user is at the top of the list when modelChanged event happens. This is a pretty nasty bug.

The solution is to use mojo.setLengthAndInvalidate() instead:

listElement.mojo.setLengthAndInvalidate(this.listModel.items.length);

While Mojo has been superseded by Enyo, this is still a pretty big deal, there’s still lots of Pixi and Pre models out there with webOS 1.4.5.

Todd Replogle interview

I don’t remember what I was searching for, but I came across this interesting interview with Todd Replogle, programmer and co-creator of the Duke Nukem series. The interview was done by Peter Bridger in December 2001, well after Replogle’s retirement from the industry in 1997.

Todd, how do you pronounce your last name?

Good question. The name originates from Germany, I think. The first syllable ‘Rep’ the ‘e’ is short, as in ‘rep’resentative. The next, ‘lo,’ is pronounced ‘low.’ The final syllable ‘gle’ is tricky. It’s pronounced ‘gull,’ as in sea’gull.’ Rep-low-gull. There were times when I was embarrassed during the first day of school where new instructors had a tough time pronouncing my name. Very embarrassing at first to hear my last name pronounced Rep’loogie.’ I often had to correct him/her. After the name sinks in however it seems the name ‘Replogle’ is difficult to forget once one hears it for the first time. Its uniqueness makes the name stand out from the rest, I suppose.

How’ve you been doing since Duke3D?

Wonderful! I found a small town in Oregon to live in, where I’m slowly buying up the surrounding land at fair prices. My goal is to dig several new home sites for families optimistic about the future, and for the elderly (who aren’t so optimistic.)

Do you still have that ‘I NUKUM’ licence plate?

No, the misspelled plate vanished when I sold the NSX. Lately I’ve been owning larger cars (without custom plates.)
Much more safer than a low-to-the-ground vehicle. I’d rather drive a car that’s taller than the tires of a big rig.

What stands out in your mind as a key moment, or moments even, of your time spent developing Duke3D?

Inventing/programming subways. I enjoyed laying the laser trip-mines along side the walls and watching the subway charge through the tunnel, setting each one off one at a time. Very cool to watch! I also enjoyed (and now miss) working with such an excellent group of people.

If you could go back in time now, with the knowledge you have now, what would you do differently in making Duke3D?

Hum, I’d have to say rework the sounds effects at higher sample rates (44khz) and have Jim Dose find a way to get the sounds effects to not sound ‘choppy.’ There was something about the sounds that didn’t seem right… I guess another issue would be in the actor AI field. After Ken programmed the DukeBot my actor AI seemed even more redundant and boring.

How easy was it to build on all the sound, control, weapons, monster etc.. code for Duke3D, on top of Ken Silverman’s BUILD engine?

Working with Ken’s BUILD engine was very simple to work with. Ken understands that interfacing with engine must be effortless, with routiens that are easy to understand and implement.

Are you surprised by the way Duke3D took off, both commercially and with the community?

No. I knew that both Duke’s smart mouth attitude, well-written/distinctive code and fun gameplay would take Duke3D to new heights with the video game community.

It’s June 1991, Apogee have just released Duke Nukem (the original side scroller), the sound effects made by Scott Miller. Should he write some PC speaker sounds effects for DNF?

HAHAHA! Speaker sound effects are only appropriate with computers lacking digital sound capabilities, something uncommon in all but the oldest tabletop PCs and laptops. Scott also did all level design for Vol. I of Duke I too. Scott and George, unlike me, are good level designers, and know what the customer wants with respect to puzzles and indepth gameplay.

Do you plan to get back into the games industry?

No. I’m not sure there is a future for the video game industry. Unless one has the capability of using both the left and right hands independantly, I doubt video games will sell like they used to.

If John Carmack called you up today, and offered you a job at id software, would you take it?

No. I’d be a tempting offer. Again, what is the future of video games? Oh BTW, John deserves credit for helping me code some low level code in Duke Nukem One. I’m not a very good assembly language programmer, and John was kind enough to help make Duke successful with well-written optimal assembly.

What are your plans for 2002?

Make money through property ownership and management, I hope. 🙂 I also found a shifty way to take gold and silver away from the American public (including J.P. Morgan/C, Goldman Sachs) by both ‘shorting’ the metals market at the right time, then taking delivery during minor ‘squeezes.’ Paper money is not wealth, IMHO. I’d also like to raise a family some day.

Thanks for taking time for this interview Todd, happy Christmas!

Thank you Peter. Happy Christmas and a merry new year to you too.

jxNotify

I made a little JavaScript notification system, somewhat inspired by webOS and also by the type of notifications you see on Gmail.

jxNotify code

The central idea was to have an elegant system that could sensibly display the progress of AJAX operations; meaning notifications stays up while the operation is being done (i.e. while sending request and waiting for a reply from the server), then a success or failure message is posted upon completion, which fades away automatically.

While designed for AJAX calls, this could certainly be used in other cases as well.

jxNotify notifyPre

jxNotify notifyPostError


Initializing

// optional argument = icon, recommended size of 18x18
jxNotify.init('jx-notify.content/sdotspott-notify-icon.png');


Notify of operation in progress (notifyPre)

jxNotify.notifyPre('doing stuff...');


Notify of operation completed (notifyPost)

jxNotify.notifyPost('finished!');


Notify of operation failure (notifyPostError)

jxNotify.notifyPostError('something bad happened!');

 

Reflex Feedback 0.3

A small update to the Reflex Feedback Widget,

  • Design tweaks (border, box-shadow, border-radius on textarea; padding-top on copyright)
  • widgetPos argument added to init(), valid values => ‘left’, ‘right’

reflex feedback widget 0.3

So you can now position the widget on the right edge of the page like this:

Reflex.init($('body'), 'controller/post_feedback.php', 'right');

More info about the widget itself can be found in the original blog post.

dotspott public pages

New feature added to dotspott earlier this week: you can now create a public URL for any of your spotts, which will generate a page that looks something like the following,

dotspott public page, 63 bites

… and is accessible to anyone on the web.

Currently this can only be done from the web client:

  • Login
  • Click “Share…” on the submenu for the spott you want to make a link for
  • Click the “Make Public” button; the spott will be made public and the URL will appear

Note: All spotts are private by default; they can only be seen by you when you login or by someone with whom you’ve shared the spott info via email.

Edit: I should mention this is a proof of concept of Unity. There are actually no async calls beyond those for Google Maps.