Tuesday, March 15, 2011

Basic scientific explanation of Japan Fukushima nuclear plant disaster

On top of the tragedy from tsunami and earthquake, Japan is experiencing another potential catastrophe from a nuclear plant failure.

This article posted on the site of the MIT department of Nuclear Engineering goes into the basic details of the design of the plants at Fukushima and explanation of the events there over the last few days.

http://mitnse.com/2011/03/13/why-i-am-not-worried-about-japans-nuclear-reactors/

The only question I still have after reading this article was how long that they need to keep cooling the shut-down reactor core? Is it several days (so the end is in sight) or will it be weeks? Apparently it has already been 3-4 days at least.

I am also curious about the temperature / pressures involved. Apparently they are battling to stay under 1200°C, and that is with the heat mainly coming from radioactive decay rather than fission (if I understand correctly). If there were no coolant at all how hot could it get just from that?





Monday, February 21, 2011

Firefox 4 to the future

I just installed Firefox 4.0 beta this weekend. More than any new features, I was impressed by the first run artwork that they are using to market the FF 4 beta. All the illustrations are retro-futuristic, highly detailed, scenes of future technology, space colony landscapes and jet packs. Although the actual browser is just a browser, no self-aware robots or jet packs involved I still liked the concept. Here is an example (from http://www.mozilla.com/en-US/firefox/3.6.13/whatsnew/)


After a bit of digging, the artwork is by artist: Steven Olds.


The marketing blog for Mozilla attributes some of the inspiration for this campaign to "20th century futurist" Klaus Bürgle.

This also reminds me of the amazing paintings I used to read about in space books as a kid, often borrowing images from the 1975 "Stanford Torus" NASA Ames/Stanford study on building a colony in space for 10,000 people. One of the artists for that project was Dan Davis and others such as Rick Guidice who contributed artwork to Gerard O'neill's book the High Frontier

Will using Firefox help me live there? Can someone at least make a persona of this stuff?

Saturday, February 12, 2011

Listing files in a folder to a text file on Windows

One endless source of annoyance in my work is copying and a list of file names from some folder to paste in another document.

In the Windows UI, your only option is really right-clicking on individual file names, clicking Rename and then selecting the name to copy. This must be done for each file.

The fastest way I have found to achieve this uses a DOS Command Prompt and flags for the dir command.

To open a Command Prompt window, in pretty much all versions of Windows. Go to Start > Run > type "cmd" (without quotes).

To get a list of files and directories into a text file use the "dir" command with "/B" option

C:\java>dir /B
Apache Software Foundation
apache-ant-1.8.2-bin
apache-ant-1.8.2-bin.zip
apache-ant-1.8.2-manual
apache-ant-1.8.2-manual.zip
chrome.dmp
databene-benerator-0.6.3-dist
databene-benerator-0.6.3-dist.zip
eclipse-jee-ganymede-SR1-win32
eclipse-SDK-3.6.1-win32
eclipse-SDK-3.6.1-win32.zip
javadb-10_5_3_0
javadb-10_5_3_0.zip
MiniConnectionPoolManager.zip
opencsv-2.2
opencsv-2.2-src-with-libs.tar.gz
swt-3.6.1-cocoa-macosx
swt-3.6.1-cocoa-macosx.zip
swt-3.6.1-gtk-linux-x86
swt-3.6.1-gtk-linux-x86.zip
swt-3.6.1-gtk-linux-x86_64
swt-3.6.1-gtk-linux-x86_64.zip
swt-3.6.1-win32-win32-x86
swt-3.6.1-win32-win32-x86.zip
TimeTrack_win32


To have the output of this command piped to a file "C:\output.txt" use the ">" symbol:
dir /B > C:\output.txt

To only show files, no directories you can use the /A:-D flag ("/A:" is for attribute matching filters, "D" is directories, "-" is for not):
dir /A:-D/B > C:\output.txt

Results in the file contents being:

apache-ant-1.8.2-bin.zip
apache-ant-1.8.2-manual.zip
chrome.dmp
databene-benerator-0.6.3-dist.zip
eclipse-SDK-3.6.1-win32.zip
javadb-10_5_3_0.zip
MiniConnectionPoolManager.zip
opencsv-2.2-src-with-libs.tar.gz
output.txt
swt-3.6.1-cocoa-macosx.zip
swt-3.6.1-gtk-linux-x86.zip
swt-3.6.1-gtk-linux-x86_64.zip
swt-3.6.1-win32-win32-x86.zip


Note: on some versions of Windows you can't save a file to C:\ without running the cmd.exe as an Administrator.

For more information on the other flags for more control over your output:
C:\java>dir /?
Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
Specifies drive, directory, and/or files to list.

/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files I Not content indexed files
L Reparse Points - Prefix meaning not
/B Uses bare format (no heading information or summary).
/C Display the thousand separator in file sizes. This is the
default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/R Display alternate data streams of the file.
/S Displays files in specified directory and all subdirectories.
/T Controls which time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4 Displays four-digit years

Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.

Sunday, February 6, 2011

Introducing the Time Track Project

The Time Track application is a small side-project I have been developing since late November 2010. It is a simple application that lets a user keep track of time spent on work, projects, tasks etc.


Time Track main window, Windows Vista x64

The main requirements for the Time Track application were

  • Be a software version of a time punch clock, for any purpose

  • Keep track of time in a persistant format that can be saved

  • Cross-platform support (at least Windows, Mac OS X)

  • Needs a GUI

  • Lightweight, simple to use and set up

I developed this in Java as a standalone desktop program with a GUI using all OpenSource components. I am nearly complete with an initial version that meets all this functionality and I intend to release it as a free-ware app for now, maybe it can be made released as open source by itself in the future.


Implementation


I had really two paths I could have taken with this, one would be to build a dynamic webapp with a RDBMS backend. The second approach was to develop a standalone self-contained application that could be somewhat portable itself. I was hesitant to take on a project that required any sort of server set up and hosting, I am just not set up to do that now, so although the webapp was pretty easily cross-platform being browser based, I didn't like the idea of the dependency on the remote server.


I went with the standalone app approach, in order to be cross-platform and easy for me to develop I went with Java as the source language. I didn't want the program looking like a Java Swing application so I opted for the SWT api which is the basis for the Eclipse IDE and platform, it tends to look more "solid" in my opinion as one of its main features is native look and feel for UI components on every OS. I think so far it is coming along nicely. You can see a side-by-side comparison of the interface in Windows Vista, and on Linux (Ubuntu 10.04, 64-bit)




I have probably spent around 5 weekends and the occasional hour on a weeknight in total since I started building this application. Probably overall time spent has been under 80 hours. It was enjoyable to more or less go through the full development life-cycle for a new project. I got to do design, open-source research, coding and integration, source-control, and complete build scripts in Ant. Even though I may never release a line of code from this, I am building like I could.

In terms of the OpenSource projects that I used a variety of different components in my stack.

For my build environment, I am using Java JDK 1.6.0_17, Eclipse Ganymede IDE, Junit 3 (for the few automated unit tests that were really helpful with Derby), SVN for source control and builds are done with ANT. Testing was done on Windows Vista SP2 x64 and Ubuntu Linux 64-bit GTK.


RoadMap
On my to do list I still have a number of items I'd like to close out before really wrapping up this release.
  • The main table needs to update when changes occur. Currently it is loaded at start up.
  • Need to think about an import data function.
  • Testing on a Mac
  • Implement a more solid connection pool mechanism
  • Release strategy. Post on this site? or create an OpenSource project page?

Friday, December 24, 2010

Christmas Redwoods

Our redwoods needed to show some Christmas spirit.

Unfortunately the only horizontal branches strong enough to really hold ornaments are near the base of the trees, about an inch or two from the soil in their pots. We managed to hang a few ornaments around the trunk. It didn't help that the ornament kit we got had no hooks for hanging.







As you can see the seedlings are doing just fine so far this winter. Generally they have been near the window for the short amount of direct sunlight we have in the apartment, the cold temperatures from outside haven't seemed to affect them too much.

India Trip Inventory

Inventory of the items to be brought in preparation for two people to travel to the subcontinent. This is not even the full list suggested by the CDC

  • 2 bottles of 30 doses Malarone - Anti-malarial
  • 2 bottles of 3 doses IC Azithromycin - anti-biotic for severe stomach illness
  • 1 bottle of 6 doses IC Zolpidem Tartrate ( Ambien ) - for jet lag
  • 2 tubes of Ultrathon™ Insect Repellent - 34% DEET (2 oz.)
  • 1 tube AfterBite® Outdoor - insect bite and itch relief. (0.7 oz.)
  • 1 bottle Pepto Bismol - 40 caplets
  • 10 fl. oz. total of Purell® Instant Hand Sanitizer - 65% alcohol, 2 bottles
  • 1 Adventure Medical Kits Hand Sanitizer + Lotion, alcohol free spray bottle.
  • 1 tube 100 SPF Sunblock (3.0 oz)
  • 1 tube Cortizone-10® itch relief gel (1 oz.)
  • 6 boxes of Ben's® Tick & Insect Repellent Wipes - 12 individually wrapped packs, 30% DEET
  • 6 packs of Wet Ones Antibacterial wipes, Travel Pack
  • 2 US to India electrical adapters
  • 2 Dr. Fresh Dailies Travel Kit - incl. Toothbrush, toothpaste and brush case
  • 1 schedule book/expenses record/travel diary
  • 2 boxes Pedialyte® Oral Electrolyte Maintenence Powder - help prevent dehydration
  • 1 shaving kit with razor, blades, shaving gel
  • Gauze bandages, band-aids, neosporin, ibuprofen tablets
Next up to pack.

Thursday, December 2, 2010

Helpful Gmail Labs Reviews

I have recently tried out several Gmail Labs features that are pretty good.
  • Mark as Read Button
  • Default 'Reply to all'
  • Authentication icon for verified senders
Mark as Read Button by "Mark K"
If you're tired of digging into the "More actions" menu every time you want to mark unread messages as read, just turn on this Labs feature to add a "Mark as read" button to the top of your inbox.


Very useful, I was missing this for some time. The button blends in well with the other default buttons at the top of your inbox. I found it saves a lot of time as I compulsively read every other email otherwise, I don't really like the "More actions" menu, so this was a time saver, and more direct way to get this function. I did notice it is not 100% production ready.
If you check a already read email, the Mark as Read button remains enabled and you may click it, which gives the erroneos message "The conversation has been marked as read. Undo". Clicking the misleading provided "Undo" link in the message also does nothing. I submitted this feedback to Gmail Labs support.

Default 'Reply to all' by Mark K
When we're working on features for Gmail, the email etiquette on the team is to reply all so everyone involved is kept in the loop. Mark was an intern here this past summer who got frustrated when he'd reply to an email only to realize that he forgot to reply all and had to resend the message. Thus, this Labs feature, which makes reply all your default selection.


Thank you Mark, I had the exact same experience multiple times with Gmail. Often when multiple recipients are copied on an email, among my social group the convention is to include all in your reply to include everyone in the conversation, almost like an ad-hoc forum. This works very well with Gmail's threading of email chains. This is a useful Lab feature, didn't find any issues since I enabled it.

Authentication icon for verified senders by "E R"
Turn on "Authentication icon for verified senders" from the Labs tab under Settings, and you'll see a key icon next to verified emails that are super-trustworthy.
...
It's a bit of work for senders to make their email super-trustworthy, which is why this feature is limited to just eBay and PayPal right now. We hope to add more senders in the future, and when we do, you'll know because you'll see the super-trustworthy key icon magically appear by those senders too. Give it a whirl and let us know what you think.


Seems like a good feature to just have that extra bit of security that you aren't being phished. I verified that it w for a advertisement-type newsletter email from PayPal. It would require more participation from other 3rd parties to be useful as now most companies I receive email from aren't on that list. Top on my priority would be Amazon.com and other "Large Financials"

If you aren't aware you may enable these Gmail Lab features in Gmail.
Click on Gmail menu bar > Settings > Labs (or the little green chemistry beaker icon next to Settings).
In the list of "Available Labs" click Enable radio button for the labs you want.
Click Save Changes button at the top when done.
The Send Feedback link under each individual lab lets you send specific feedback to the Gmail team either to report problems, give praise or make suggestions. This is a great feature in of itself. Wish there was something equivalent for all Google products.