Saturday, December 25, 2010

My first Android Market app

To enjoy vicariously the thousands of new Android users this Christmas, I've posted my first app to the Android Market! I don't think it will be the big sell (it's free, after all), but I had fun making it and hope it brings some fun to fellow football fans as well.

Merry Christmas!

Thursday, December 09, 2010

Galaxy Tab Emulator

The latest and greatest Android tools release brings with it a new emulator—and none other than the Galaxy Tab. I got to handle one of those tabs at the AT&T store recently and now understand what's generated all the buzz behind the tab. Alas, I don't have the funds to take one home with me, but I can cough up the bandwidth for a new emulator. Here's a peek at what tXtFL would look like on the Galaxy Tab.


Saturday, November 27, 2010

Iterations on Android

While discussing tXtFL on the mobile handset, I realized that one feature that would keep a person from ending a game is a good end-game. In other words, some sort of celebration or high scores posting at the end of an arduous football game is much more satisfying than a simple score summary. I decided to try integrating the social platform OpenFeint, which I first discovered while playing a simple iPhone game, for posting high scores and point margins after playing a tXtFL football game. Now in the latest iteration of tXtFL on Android, you can track game stats and drive summaries throughout the game, and then share your score with the world through leaderboards!

In my search for social platforms I also came across Scoreloop, which has fancy features such as virtual currency, not to mention a very friendly and responsive support staff. I may give that a shot as well.


Friday, November 26, 2010

Black Friday Best Deal?

This time last year I picked up one of my favorite Black Friday treats, the very laptop on which I'm now typing. A year later and none the richer, I was looking for even better deals to sweeten the holiday. How about a nice Android phone? Or a new Android tablet? (ok, you can tell what's on my mind)

But what do I really need? Ever since upgrading my desktop from Windows Vista to 7, graphics performance has taken a nosedive. Yes, for some reason, Vista has been superior. Previously, I could cruise the skies of San Francisco on FlightGear with wings like eagles, but lately I've been stuttering the skies at 1-2 frames per second on the same simulator. I didn't even bother testing Need For Speed. And it certainly couldn't handle the stunning and intensive graphics of tXtFL (j/k).

So this Black Friday, I thought I'd treat myself to a new graphics card. I'd always been wary of my low-end ATI Radeon X1550 graphics card. My Dell Inspiron 9200 isn't the newest, and one could potentially argue for a complete system upgrade instead, but I'm actually quite fond of the machine. My buddies even told me that I could pick up a handy dedicated graphics card for the likes of $10. As much as I like that deal, $10 can buy you at least 6 sodas at the cafeteria, so I tried an alternate route they suggested.

I tried out a graphics card stress test called FurMark (don't ask me why it's named that). I was reassured that the 32-bit version works on my 64-bit machine, but to my surprise, it aborted a test with an error message saying that my card was not OpenGL 2.0 compatible. Aha! That sign very likely meant that my card was underperforming because subpar graphics drivers forbade OpenGL 2 capabilities. The default Win7 drivers were probably the generic type and unable to tap into the latent graphical prowess of the X1550.

A little forum searching later, I learned that Vista graphics card drivers up through version 9.1 are compatible with Win7. Fortunately, these drivers are freely available and installable. Moments later, FurMark was churning away at graphics card benchmarks, and I was flying my F-4 Phantom through the San Francisco fog. And all at the price of one download, I think it's my best Black Friday deal thus far.

Saturday, October 30, 2010

tXtFL revisits the Android

I still don't have an Android-based phone, but fortunately I do have my trusty emulator, and now I finally have an application to test on it. I worked on a prototype of tXtFL on the Android a few months back, but as you can see it's not much more than a Android port of the command-line version. After releasing tXtFL 2, work has shifted to modularizing tXtFL so that it can plug into specially-designed interfaces for smartphones or web-based platforms in addition to the standard desktop interface. Here's a first pass at the new interface for the Android. Too bad all I carry around is an iPhone.

Wednesday, October 20, 2010

Suffering II

Awhile back I reflected on the age-old question of why God allows suffering in the world. The topic recently arose again as the pastor from my church shared a summer series on just such questions, which evoked another discussion with my brother.

I've always found it interesting how our experience colors our view of God--and it should, for how else could we know anything in this world--but how the same experience can have such a dramatically different impression upon different people.  We who live comfortably while watching the carnage in Haiti, Rwanda, Darfur, and Afghanistan are in an odd position because we have not experienced any of the things that we have seen on the media reports, yet we are tempted to cast judgment from our couches and computers.  I don't think that this is a matter of not patronizing the suffering or checking our anger so as not to exceed theirs, but rather to realize our fundamental inability to fully understand their situation, and to acknowledge the need to hear from their own voices how one might respond.  But of course we are all human, and they just as well as we will have inappropriate responses.  We can only do our best to assess the situation as objectively as possible and to consider the multiple valid interpretations.

The pictures of Haiti are undeniably gut-wrenching.  As anyone who has embarked on even a touristy excursion to foreign countries knows all too well, even the pictures are less resonating than what the eye can see in person.  The destruction is undeniable, and unfortunately it is not unique.  I remember how the media would report of the death tolls in Iraq during the height of the conflict, with counts reaching into the thousands, and protesters marching out in the thousands as well, and feeling a twang that--however horrible those deaths are indeed--we had but a twinge of emotion or evocation of sadness at memory of the battles during WWI, in which up to 100,000 would fall in a single battle.  And then that compared to the bubonic plague or the Holocaust, and what we have is a recurring cycle of maddening destruction.  Yet all of this has happened, and the world has marched on, some faithless, some faithful, and many in-between, regardless of depth of experience.

I agree that just because people respond in a positive way toward God does not necessarily justify him.  But I'm hard pressed to compare God to a physically or verbally abusing husband who elicits positive feelings simply by withholding abuse--as some have--simply because a husband is not a god to his wife.  He may act as if he were god--indeed he may think that he is--but he is human just as she is, and he will die one day and disappear just as she will.  I think that the assumption made is that God is an abuser, and no matter what the abused say, we should always condemn the abuser and free the abused.  We, in a sense, act as god to pronounce to the abused that we know better than they do about their situation and will intervene to restore our view of morality.  This works fine and well when we know what that morality is, but I would dare to say that we don't know what the morality is when it comes to judging God whether he has done right to let these things happen.  From the outset, one of the cruxes of this question is whether or not he has done these things or simply allowed them to happen, and the corollary, whether allowing them to happen is just as wrong as not allowing them to happen.  These are troubling to answer, and subject to much debate.

Let's consider the opposite scenario.  Suppose that God were to intervene whenever something bad happened.  That would have a ripple effect on potentially everything, threatening our freedom at every moment.  And where would it stop?  Surely if he staved off 99% of the earthquakes, we would chafe at the 1%.  In a sense, assuming that he does answer our prayers, we do know that he intervenes, and for all we know, he may in fact have staved off 99% of the natural disasters or even man-made terrors that would have happened.  If we believe in the spirit world, particularly the fallen spirit world, we should only expect to have infinitely deeper terrors than we could ever handle if God had not countlessly intervened.

We're bound to come back to the story of Job, which already sounds like a broken record because it's merely a "story."  But I think that God's response to him in that encounter has relevance.  I've always been appalled by it, to say the truth, because God's answer to him really doesn't answer anything directly.  He just says, I am God, so you don't understand what I have to do.  I think that as hand-waving an answer as that sounds, it has merit because it's like how we in the populace tell the President what he should do, as if we have all the answers and know how to run the country and patch everything up, when in reality if the vast majority of us, even the best and the brightest, took seat in the White House, national chaos would ensue.  Most of us are simply not as smart as we think we are.  Similarly, God manages competing interests far deeper than we realize, including perhaps one of the deepest conflicts of all, that of freedom both to love and to do evil.  But I think that God may have another message embedded in his response.  One lesson I've learned is that sometimes we are simply never satisfied with something.  There are moments and there are people where nothing, absolutely nothing, that one could ever do would bring fulfillment.  I think that the same is true in many scenarios of life, in which no matter what answer we are given, we are never convinced, we are never satisfied.  I think that God may have responded the way that he did because he realized that Job--and the humanity who would read his account--would be unsatisfied no matter the answer that God gave.  He says, Being God is simply too complicated to explain, so what you need to do is to let me be God, while you perform your duties as a human being.  Even that answer might not satisfy everyone, but there we go again.

I write all this rather uncomfortably because I'm discussing the plight of the suffering or deceased from a cozy academic station in comfortable California.  I agree wholeheartedly that those Christians who declare "goodness and love" as a rote expression chafe at the experiences of the suffering, but I also know that there are many who have experienced such suffering and would still declare this of God.  Although we could discount their response as the deluded reaction of the lesser mind, they might be the ones laughing at us if they realized that we had rejected God for the same suffering that had instead strengthened their faith.

tXtFL 2 is out!

After a year of development, tXtFL 2 is out. I was meaning to add a number of additional new features, but in the end I feel it's better to get the release out before the 2010 season rushes us by.

And of course...now on to tXtFL 3!

Thursday, September 09, 2010

tXtFL on the Android

One of the nice things about Android is that it reads Java code, even if it doesn't exactly run Java programs. I couldn't believe it when tXtFL started up on Android with only a few small hacks to hook it up to the Android graphical toolkit.


Hooking up the database was another ordeal, as the the Apache Derby database that I use in the simulator doesn't run on Android. Fortunately, the Android API does support JDBC, meaning that the main code conversion was switching from one SQL-style syntax to another, with a few additional changes to work around some apparent limitations to the JDBC drivers available for Android. Right now performance isn't pretty, but it works!


Enjoy the first day of season 2010!

Friday, August 27, 2010

To fall or not?

As a kid the fall always simultaneously spelled impending doom and incredible delight. On the one hand I had to contend with the coming school year, always a consistent cause for mourning. But on the other hand, the coming of school meant the coming of fall, and the coming of fall meant none other than the coming of football.

Ten years out of high school and yet still in school, things don't seem to have changed much except for one simple fact. School is now year round, and I've passed the point of hoping for it ever to end. So that means that all fall really brings is football, and that means celebration for all.

Well, one other new thing this fall is that along with the football season is the inaugural year of tXtFL seasons. I realized that just as most games have some sort of endpoint—a quest accomplished, a task achieved, a nation saved—so also tXtFL needs a tangible goal. The latest alpha builds feature this progression through seasons marching relentlessly toward playoffs and the final challenge, the tXtFL Bowl. Alas, those alpha builds stop precipitously at the end of a season, but I've just checked in some new code featuring the first round of playoffs. More to follow! In the meantime, I hope you enjoy another round of preseason progress tonight.

Sunday, June 27, 2010

tXtFL on the iPhone

tXtFL has (sorta) finally arrived on the iPhone! via telnet in helmet-to-helmet mode...


Saturday, June 26, 2010

Arena Football

I attended my first Arena League Football game back in 2002 when the Arizona Rattlers took on our very own San Jose SaberCats. If you've ever been to an Arena game, it's quite a different experience--indoor court roughly a quarter the area of an NFL field, players crashing into mini-fences bounding the sides, sky-high scores. It was a wild game with a thrilling if not unsettling ending as fan interference stole the game from the Rattlers and kept the SaberCats on their march toward the Arena Bowl. I came home with a single thought--wouldn't it be awesome to incorporate Arena football into tXtFL?

8 years later, tXtFL finally has built-in capacity to apply new leagues and rule-sets. I've just added separate Canadian and collegiate rules, while holding off on Arena rules because I had heard that Arena had gone bankrupt and was no longer. But today while browsing the infallible wikipedia, I realized that Arena football is coming back! And that includes none other than the SaberCats at HP Pavilion.

So look out for 50-yard fields, 4-point drop-kick field goals, and players smashing into sideline walls at HP Pavilion...and in future versions of tXtFL!

Sunday, June 20, 2010

Yet Another Useful Feature from OpenOffice.org

Awhile back a labmate told me that he was considering using Ubuntu on his laptop. I of course was thrilled at the prospect and only with tremendous difficulty suppressed expression of incredible delight so as to answer his questions more objectively. He asked what I did for word processing in place of Microsoft Office, and I told him that I used OpenOffice.org. When he asked how I made do with it, I realized that not only did I know OpenOffice.org, belovedly known as OOo, better than I did MS Office, but that I had "gotten away" with OOo for a full-on ten years. OOo my goodness--a decade.

Today I realized yet another reason why OOo is so special. In addition to its completely open-source (and thus free) code base, multi-platform compatibility, and integration with Zotero and other open-source tools, I learned that I could also use it to connect with Apache Derby database. What, you ask, is that important for? Why, for none other than tXtFL databasing, of course. While I was prepared to write a completely separate graphical tool for managing the finer aspects of the tXtFL football database, it finally dawned on me that any graphical front-end to Derby could do just as well, if not way better. As expected, OOo lived up to its expectation, as I've attempted to document step-by-step here.

Friday, June 18, 2010

LT Rounds

Today I finished my first clerkship. For the past 6 weeks I had the privilege of drinking daily from the fount of medical knowledge in the office of Larry Tierney, in addition to LT's daily musical selection from classic American rock-n-roll and the ever-distracting views of the Pacific coastline just outside his window. I'm gonna miss those LT rounds.

Friday, May 21, 2010

Ubuntu upgrades from 9.10 -> 10.04

I recently upgraded my mom's laptop and brother/sister-in-law's desktop from Ubuntu 9.10 to 10.04, with the full intention of making these the final, definitive upgrades now that 10.04 is the longed-for "LTS," or Long-Term Support, release. After sequential upgrades from the last LTS release, 8.04, I've realized that these computers have met their match in hardware capacity and are well suited to live out the rest of their days with none other than the latest enduring LTS release.

Unlike previous upgrades, however, the Ubuntu upgrade to 10.04 did not come without hiccup. In an effort to allay your upgrade grievances in case you encounter similar issues, I'll briefly outline the solutions I found.

Dell 700m Ubuntu upgrade

One forum poster commented that the diminutive Dell 700m laptop was simply too reliable. Simply put, it would not die, and that means that software has to keep on dealing with it. I tried upgrading the trusty 700m using the Software Upgrade tool, only to find the screen go black and lock up during start up.

The problem lies in the fact that the 700m graphics chipset was actually blacklisted for the latest release. The solution is to de-blacklist it, which involves adding some boot options.
  1. Hold both shift keys during boot. The tricky part for me was figuring out how to add the options in the first place, since the boot screen has no instructions. Simply press and hold both Shift keys during boot to get the GRUB menu.
  2. Type "e". The editable boot options will display.
  3. Scroll to the end of the line ending with "quiet splash" and type " i915.modeset=1". Note that's modeset, not modset.
  4. Press "Ctrl-X" to boot. The system will boot up, and then you can follow the next steps to make the change permanent.
  5. Open a terminal and type the command "sudo gedit /etc/default/grub" to open the GRUB config file.
  6. Scroll to the line that reads "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"" and add " i915.modeset=1" to the end.
  7. Save and close the file.
  8. Type "sudo upgrade-grub" to apply the changes.
The 700m lives on in Long-Term Support land! Additional forum and wiki information here.

Rescuing upgrade from "too many errors"

While attempting an upgrade from a desktop that's run the gamut from 7.04 through 9.10, I ran into numerous upgrade conflicts that eventually coalesced into a complete upgrade halt with the final, auspicious message: "too many errors."

Normally I wouldn't mind if the upgrade software protected me from the upgrade because it encountered too many errors, but the trouble here was that in halting the upgrade without unrolling any changes, I was left with a half-upgraded system where the new packages could not properly interact with the old. I couldn't open any program, even a terminal, and when I rebooted, the system simply told me that it couldn't find the boot image.

The solution was to boot from a rescue disk and run an install fix. In hindsight, I could have skipped the rescue disk step by typing "Alt-F2" to drop into command-line mode for running the upgrade fix from there, although I'm not sure if I would have run into networking errors for downloading any remaining files.
  1. Download and boot from the "alternative CD." The alternative CD is different from the desktop LiveCD and similar to the DVD but without the language packs.
  2. Type "sudo dpkg --configure -a". Not sure if this is necessary, but didn't appear to hurt. When running from the rescue disk, I didn't use sudo because it's running as root by default.
  3. Type "sudo apt-get -f install". The installer will attempt to fix the broken system. Again, sudo isn't necessary when running from a rescue CD.
  4. Follow the prompts til the completion of the install fix, exit the rescue CD, reboot, and voila!
Hopefully your upgrade experience will be smoother, but if you've run into a rut, hopefully the only barrier between you and the land of no-more-upgrades (ie Long-Term Support) is only a boot option or "-f" install!

Sunday, April 25, 2010

Off to a new stage

Lily and I at my thesis defense.

Tomorrow I start the next stage of my schooling. Today when someone asked how my grad career went and I replied, "It was fun," she looked shocked. It struck me then how blessed I am to have worked with such a great and supportive mentor on a project that allowed me to pursue my interests in translational and computational neuroscience all at once, an experience that can be summed up in none other than truly "fun."

It was sad to bid farewell to my Linux workstation, but I look forward to continued collaborations with Lily and the lab. For now, I'll be scrambling to shift my circadian rhythm forward while dredging up clinical skills from four years' past. At least I found my trusty old clipboard.

Thursday, April 22, 2010

apy 2.0 in the works!

I've (finally) had a chance to get started on updating Arthur's website to inaugurate the publication of his first book. Come follow the development on the beta site! Feedback welcome as usual.

UPDATE: One of the most fun parts about this round of development has been my discovery (finally) of jQuery, a clean API for incorporating a consistent set of JavaScript interactivity across platforms. And I just found out that the jQuery conference is none other than this weekend, in my backyard! (well, the Bay Area backyard.) Unfortunately it's already sold out, so here's looking to next year...

Wednesday, April 21, 2010

alpha3 out the door!

We're halfway into the NFL off-season, which means it's high time to make another tXtFL 2.0 pre-release (alpha3). This time I've focused on making the off-season the in-season with the ability to follow your fav team through a season in the football simulator. I don't know how much time I'll have in the near future to make full (pre-) releases, so it was nice to get this one out the door. In the meantime, I'll focus on incremental feature "pushes" via the new tXtFL Java Web Start mechanism, just to keep things interesting.

Happy tXtFL'ing!

Monday, April 19, 2010

Dial up!

This weekend I visited my brother in SoCal and was fortunate enough to tote along an old-school iPhone 2G. I must admit that traveling with an iPhone made the usual frustrations of travel such as airport waits or transfer downtimes unusually enjoyable. But most of the enjoyment came from the books I had downloaded onto my Barnes & Noble eReader and Amazon Kindle software for the iPhone. The dial-up-modem-like speeds of the original iPhone are nothing to brag about, and their main benefit was to help me appreciate the cable connection once back at home or to reminisce on the good ol' days of early college, when simply having a dial-up Internet connection was worth writing home about.

And speaking of college Internet, I came across a news article from today entitled: "Your fastest Internet in the world is found in Berkeley, CA":
Those three spots are Berkeley (average speed: 18.7Mbps), Chapel Hill, North Carolina (average speed: 17.5Mbps), and Stanford, California (average speed: 17.0Mbps).
There's something beautiful about a campus whose student-run computing facility rivals entire IT organizations from other other universities. Now if only San Francisco could connect the Bay Area campus triangle of Internet splendor...

Wednesday, April 07, 2010

Enabling Java Web Start

Some folks like to start their mornings with Java, but I like to start mine with Java Web Start.  What brew of coffee is that, you ask?  It's the kind that's now powering tXtFL, the football simulator written in the Java programming language.  With Java Web Start (JWS), launching a program is as simple as opening a browser page and clicking on a link.  JWS will identify the platform, download the correct files, and bring you to the football stadium in no time.  But as the road from tXtFL to JWS was considerably more arduous than I had hoped or intended, I'd like to take the liberty to describe how to JWS-enable a program, in hopes that it might help if you are planning to do the same.

Getting your John Hancock: signing JARs

The first step to enabling a program for JWS is to set up both the executable files and the files to execute them.  As much as I'd like to click on a link to open up a program, I also want to know whether that program has any security issues.  JWS gets around this problem by requiring files it launches to be signed, signifying who is the owner of those files.  Signing a file usually involves generating a key and then using that key to sign each of the files that will be downloaded by JWS.

The executable can be generated using a standard JAR command.  The command usually specifies a manifest file that identifies the main path, the name of the resulting JAR file, and the .class files and other supporting files necessary to run the program.  One of the tricks I've just learned is that JARs for JWS require neither the classpath nor the manifest file at all!  All of that information will be provided in a separate launch file.

Here's a jar example from tXtFL.  If you want the file to also be executable outside of JWS, you'll need to pass it a manifest file.

jar -cf tXtFL.jar com about.txt logo.png logo-draft.png draft

To sign the JAR, I needed to generate a key for signing.  The following command creates a key named keystore that will identify who I am using the information I provide it, including company name, etc:

keytool -genkey -keystore keystore -alias myself

Using this key, I can now sign the executable and all the other JAR files that the program requires.  tXtFL needs one of a number of SWT files plus the derby.jar database file, which can be individually signed using the appropriate version of the following command:

jarsigner -keystore keystore tXtFL.jar myself

For a more complete example, see the end of the tXtFL build script.

3-2-1...Liftoff: Setting up for launch

Now that the signed JARs are in place, I can generate the file to execute them.  JNLP files are the launch scripts that specify where the executable and support files are and how to access them.  The tricky thing is that the JNLP specifies where itself is--or should be.  JWS will always check this location and use the version there, regardless of whether it's an older version.  Be sure to check that "codebase" specification in the JNLP file if debugging is turning out to be a nightmare (more on that below).

The whole appeal of JWS for tXtFL lies in the platform-dependence of SWT, the underlying graphical toolkit for tXtFL.  This Eclipse-based toolkit affords many powerful features at the expense of requiring a separate toolkit to be distributed for each platform on which the program is expected to run.  Fortunately for us, JWS can automatically detect the platform and specify the appropriate version of SWT to download.  Detecting the platform is merely a matter of using the "resources" tag to specify both the "os" and the "arch".  That's right--JWS can detect not only whether the user is using a Mac or a PC, but also whether the computer is running a 32- or 64-bit of Java.  One huge source of confusion is that for Java, "32-bit" vs. "64-bit" refers to the version of Java, not necessarily that of the operating system.  JWS bypasses that confusion by doing the detection process for you.  Here's an example of the syntax:


<resources os="Mac OS X" arch="x86_64">
    <j2se version="1.6*" java-vm-args="-XstartOnFirstThread" />
    <jar href="lib/swt-mac64.jar" />
</resources>


Ain't that beautiful?  When JWS loads the JNLP file on a Mac running 64-bit Java, JWS learns that it should download the swt-mac64.jar file and also pass the -XstartOnFirstThread argument, a requirement for running SWT-based programs on the Mac.  Adding similar code for each of the other supported platforms allows custom arguments and resource files for each targeted platform.

Here's a complete example, from tXtFL.

Embedding a database (perfectly optional)

tXtFL had a unique problem on its hands, and that was the fact that deep in the bowels of tXtFL lies legacy code and legacy ways of doing things that longed for a dramatic overhaul.  As a lover of all things Text, I originally wanted to make sure that the player and team configuration files in tXtFL were composed of simple text files, one per player or team.  The end result was thousands of files that would be a nightmare to transmit over the web merely to play a simple game of football.  Of course, these files could be embedded into the JAR executable, but that would defeat the purpose of the text files in the first place since they would be buried rather than accessible in the executable.

As a long-term solution, tXtFL underwent a dramatic overhaul with the introduction of a shiny new Derby database.  Derby takes care of these configuration files by completely doing away with them (or almost, as you shall see).  Each player and team file becomes merely a line or several lines within the database.  The database is generated on the fly when the user first launches the program, and the database resides on the user's computer rather than requiring any additional transaction over the web.

Of course, one issue remaining is how to get the player and team data into the database in the first place.  The program still requires a player and a team spreadsheet containing all of the data.  Collecting the data in 2 files is certainly an improvement over the thousands of files previously used, but they still require the program to have a way to access files in the first place.  It turns out that the solution is rather simple: accessing files using the getResourceAsStream method allows the files to be embedded within the application jar.  Now the player and team spreadsheets are packaged right inside tXtFL.jar.

By default, a new Derby database will be instantiated in the working directory.  That's fine if the directory is where I'm testing the files, but becomes problematic when a user launches JWS from the browser, in which case Derby tries to write its files to the browser directory but fails because of permission errors.  The solution is to set the derby.system.home property to point the browser to a defined, accessible directory.

Testing tXtFL: Finding multiple platforms from which to test JWS

The first place I like to test my files is, of course, on the local system.  I always thought of JWS as an Internet-based solution, but it can also be configured to launch from the local computer.  I simply changed the codebase to point to the directory on my computer where I had stored the JWS files (eg file:///home/user/src/txtfl/), and JWS loaded the application files from there.  When I was ready to "go live," I copied the JWS files to my server and updated the codebase to the server URL.

When I first put the files onto the server and attempted to launch them, I got a page that displayed nothing more than the title and description of the application.  The server wasn't configured to tell the browser that the JNLP launch file is meant to be run by Java Web Start, so the browser tried to display the file as a web page.  Fortunately I'm hosting my pages through a Linux-based service that gave me access to configuring the server file type specifications.

Many folk on the web castigate the WORA principle of Java--"Write Once, Run Anywhere."  I think that everyone agrees that Java (or life) isn't quite that simple even at it's best, but it's a software principle that I for whatever reason have come to believe in.  I guess I like to be able to use my software regardless of whether I'm sitting at a Windows or a Linux or a Mac box, and I want whoever's using my software to have the same options.  Most importantly, I want everybody everywhere to be able to play virtual football whenever they can, football season or otherwise.

Friday, March 26, 2010

tXtFL seasons

Seasons!  At last!

As the dust from the NFL season settles, tXtFL finally gets its act together with its first basic implementation of the Season.

In war games, it's called a mission, and in sports simulations, it's a season.  In either case, it's a battle to develop your team to face the rising competition and mount a stalwart case for victory.  Choosing to start a new season in tXtFL automatically generates a season schedule by shuffling all the league's teams for each week.  Seasons can be resumed at any time to bring up the next week's game against the scheduled opponent.

As usual, much work remains, including the option to run automated simulations of all the other scheduled games for the current week.  Each game will differentially impact players' health depending on their involvement, and those health levels will carry over into the next game and affect player performance.  And at the end of the season, of course, lies the postseason and nothing less than the tXtFL Bowl!

Stay tuned for tXtFL 2.0.0alpha3...

Wednesday, March 24, 2010

Blogger fest!

I stumbled upon a swath of new features offered by Blogger while searching for a better way to integrate the Text Flex blog into its main website.  Evidently Blogger has such a wealth of new features released or on the horizon that apparently it has a special place in its heart for all of it--http://draft.blogger.com.  So what wealth of the new does Blogger in Draft bring us?

Perhaps the most visible feature is, well, what we all around us on this page, the very work of the new Template Designer.  Setting up these new web 2.0 design (or is it 3.0 by now?) features was as easy as picking a template, then searching for alternate background pictures and adjusting a few sliders.  At first I had trouble integrating the text into the mix of lights and darks in the sky and forestial scene.  I tried updating text colors one by one, but I found that the template palette has a single slider that can adjust all colors at once.  The sidebar text still gets slightly lost in the lower levels, but I like to think that one "feature" is the effect from the text "emerging" out of the foliage and into the sky above.  Pretty deep, huh?

Over at Voice of Text Flex, I tried out a new two-column sidebar format that allows me to group up thin items in the same space.  Now the labels, links, and a new "share it" gadget all fit in one neat little square patch of space.  An older formatting customization that I found is to remove the navigation bar at the top, which allowed me to replace it with the Text Flex header as a sort of "branding."  It's the first step toward making the Text Flex blog more of an extension of the main site rather than a separate entity.

I'm sure that Blogger will keep us on its toes with newer and newer features, and I've probably only just brushed the surface.  One thing I'm looking forward to is the ability to add my own background images.  In the meantime, I'm just gonna sit back and enjoy and brooding English (or San Franciscan?) sky...

Monday, March 22, 2010

Puff, the Magic iPhone



Some of my favorite games as a kid were pushing pencils to pound targets across a page, or flipping tightly folded wads of binder paper through open fingers.  The games were all fun and good and, besides a little distraction to classmates, provided a simultaneously innocent and inexpensive form of entertainment to pass away the boredom of lazy Sunday afternoons or the doldrums of Chinese school.

But all that time, I never quite new how deprived I was--until today I saw this clip.  While my generation toiled with paper and pencils, the new generation of children will be blowing Styrofoam balls across hand drawn courts with potent puffs from their iPhones.  All it takes is a piece of scrap paper from the printer, a few brushes of ink, and foam dust from the trash.  Oh, and an iPhone.

Saturday, March 20, 2010

From ink well to Inkscape

I never had the privilege of dipping my pen into ink wells before composing my essay or marking a test.  I did however enjoy the modern equivalent of dip pens in the form of Apple ][ and Macintosh Classic paint programs.  The revolutionary software greatly simplified the mass creation of posters and handouts, but it didn't quite turn my elementary classmates and I into artists overnight.  We had to wait for Adobe Photoshop and Illustrator to do that, and I, ahem, would still never consider myself an artist.

Recently however I had to generate a number of scientific figures at higher than my normal it's-ok-for-PowerPoint quality, and I found myself hunting down new techniques to make use of modern graphics editing software to make up for my artistic inadequacies.  As usual, I gravitated toward my old haunt, open-source software, and to one program in particular: Inkscape.

Inkscape is the open-source counterpart to Adobe Illustrator as a vector-graphics editing software.  Unlike typical raster-graphics software, if I draw a line, I can shift around its endpoints and even add new bends and twists.  Put this together for all lines and many other handy tools as well, and you have the perfect enabler for someone who can't even quite draw a straight line, let alone in the right place.

While browsing the Inkscape news, I saw the results of a class project that used Inkscape to teach 4th graders about graphics software and programming.  The artwork isn't exactly Van Gogh (ok, maybe the blobs look a little Gogh-esque), but I was thrilled by the resourcefulness and ingenuity of teaching young students through Inkscape.  Using Inkscape's toolset--surprisingly simple to the novice and yet packed with tons of hidden powers--students could draw and tweak without the frustration of the paint programs I grew up with.  If they make a mistake, they just drag drag the line's nodes.  No need for even a pencil eraser.  By learning to draw with Inkscape early on, they can hone their designer techniques through junior high and beyond and, hey, maybe some of their student election posters will one day look better than ours.

Oh, and in today's budget crisis, Inkscape's free.  Better yet, you don't even need an expensive Mac to run it.*

* But no need to fear, as you can run it on a Mac, or Windows, or Linux.

Monday, March 15, 2010

Andrew & Miyon Young, DDS

 
Andrew & Miyon have officially opened their dental practice in San Mateo! Here's a snapshot of Andrew finishing up on his last patient of his first day's work. That last patient was none other than myself, and of course I give him a two-tooths up for his excellent care!

Soon to come is his new website, currently parked at their domain of choice, youngfamilydentist.com. If your teeth are itching to get their fill of the latest details, you can check out their temporary site hosted on Weebly, a nifty web creation site.
Posted by Picasa

Saturday, March 06, 2010

Suffering

A couple months ago my brother brought up the question on many minds of why God allows such suffering as we see in Haiti and other such natural disasters that seemingly blast every man, woman, and child--not to mention every tree, animal, or home--in its path. It got me thinking about what's going on there and how we can make sense of all the carnage, and I jotted a few notes that helped me to process this age-old but ever-present problem.

Something that came to mind is that none of us have ever experienced such physical devastation as they have, so we are in essence acting as "advocates" for them, onlookers from the outside seeking justice in their plight. But having never experienced what they have for ourselves, we can make one of two errors, either to be be overly complacent as if to say to them, "That's not so bad; God has good purpose in it," to which they might respond, "How dare you say that! What do you know?" or on the flip side, to passionately cry out against their plight, to which some of them might say, "Who are you to say how I feel? I still have my faith." Of course we strive for the balance, but either extreme is always a possibility, simply because no matter how much we try to empathize, we have not undergone what they have.

I was thinking about this topic over the past couple months, and the church I've been attending is actually going over a book on suffering. The chapter I most recently read is on the Holocaust, and it made me think how of all the worst nightmares I could imagine, that is probably one of the worst. I was also thinking that if we are really to make sense of the plight of those in such dreadful and unjust circumstances, we are best to ask them how they themselves have responded. The book cited a survey conducted in the 70s (I haven't viewed the survey itself, so I'm just taking the book at its word) on Holocaust victims, and the surprising result was that for a vast majority of the victims, the Holocaust had no lasting impact on their faith, yay or nay. A small fraction turned to atheism, and a smaller fraction actually grew stronger in their faith. It made me think that from those who have actually undergone such atrocity, and not merely the spectators who do their best to place themselves in their shoes, a large fraction at the very least found the events essentially unrelated to the major thrust of their faith. In other words, they somehow found their God compatible with the atrocities they had suffered.

Of course, these people may be biased in another way, since they may "have no one else to turn to" in such dire conditions, for example. But even then, I find it remarkable that they still turn to and embrace the one whom we might otherwise castigate for having brought such genocide. Maybe it's the Stokholm Syndrome, or maybe they have a different view of who God is and what his obligations are. I was also watching a Frontline episode on "The Children of the Taliban," where they interviewed a girl of about 7 years in Pakistan at an amputee camp. They asked her what brought her there, and she said that a bomb had taken out her sister and father, and before that a mortar had consumed her aunt, and rocket fire had taken her cousins, and her second cousins were wiped out by gunfire, and on and on... I was appalled, but when they asked her what she thought of all this, she replied without expression of anger, "What can I say? It is the will of God. It just happens." I was humbled, and although I of course believe that God does not condone such action, I thought of how spoiled I am to think that God has an obligation to keep us all healthy and well.

CS Lewis wrote about how God allows evil because he wants to give us the freedom to love him. That of course begs the question of why God would then allow those who love him to experience such evil. What I think it may boil down to is the fact that when God allows us individual freedom to choose between good and evil, to love or to forsake him, it's implicit that he also allows for societal good and evil. Because individuals can choose evil, we as society must bear the consequences of their evil action, even if we have chosen good for ourselves. Societal freedom is sometimes an unfortunate but unavoidable consequence of individual freedom. When it comes to cancer or earthquakes or other "acts of God," it becomes more difficult to see the explanation, and perhaps we never will, or at least until we experience them for ourselves. But even in the trivial things that we do experience, we can ask God to give us the strength to respond.

Monday, February 08, 2010

tXtFL Bowl 4.0

Mike, Andrew, and I had a blast watching yesterday's Saints vs. Colts super shootout, which turned out to be less scoring but more exciting than we had anticipated. We thought that tXtFL [predicted: Saints (33), Colts (14)] was sure to come out the loser after the Colts racked up an early 10-0 lead, but the late surge by the Saints offense and stopping power of their defense kept the Saints and the tXtFL Bowl 4.0 in the game. It's been great having Andrew's and Mike's encouragement to keep plugging along with tXtFL development.

Tuesday, February 02, 2010

The River and the Road on Amazon

Arthur's book, The River and the Road: A Journey of Redemption, has debuted on Amazon. One publisher evidently thought that it's worth bumping the price 80x, to $1,165. As much as I like the book, I suggest opting for Amazon's $14.50 price tag—clearly, it's a steal!

Thursday, January 28, 2010

tXtFL progress report

It's funny how some things sometimes happen all at once. For lab I found myself learning statistics, and suddenly I found myself needing those same tools for analyzing tXtFL simulator predictions. And just as I came to the point where tXtFL development needed nothing less than a game management system overhaul in the form of a new database, I found my lab data crying out for a shiny new SQLite database system resurrected from the mothballs of a bioinformatics class I took last year. Perhaps it's mere coincidence, perhaps the lessons from one domain open one's eyes to other areas, or perhaps tXtFL really is absolutely crucial to understanding lab and all of neuroscience.

Last year marked the release of tXtFL 1.0, sporting an entirely updated interface finally designed for a mouse-driven experience. After a few point releases, I'm now focusing on 2.0 development, starting at the core with work on a new database implementation. Here are some highlights included in the latest alpha2 pre-release.


The bulk of the work is summed up in this one line of output at startup. Behind this line is a new system to simplify and extend team and player management. The decrepit system through tXtFL 1.x has been to organize all team and player records in individual files, each acting as a config file with capability for hand-editing. As the number of fields and files grew, it became more and more of a mess to manage these files and, more importantly, more challenging to create modifications that might add new functionality. For example, one of most requested features is to add seasons, but this would likely require another set of files and new fields and sections in current files.

The database simplifies matters because adding new features is as simple as creating new database tables, and I/O transactions are pared down to a single location. While player and team downloads clocked in around 43 seconds on tests with tXtFL 1.1.1, they're down to 25 seconds in 2alpha2, an over 40% performance boost. Right now there are stub fields for new statistics such as stadium attendance, player salaries and years, seasons, and new leagues and rule sets, but unfortunately I haven't had time yet to implement them. Seasons are top priority for alpha3!

So far there are just a few visible changes to the simulator. I've been looking for ways to make tXtFL more web-interactive, and so far I've settled on a new Game Box for displaying news flashes, tXtFL blog postings, and links for getting connected with other football fans. It's sort of like a tXtFL "portal" for keeping up with tXtFL news and activities. As you can see from the URL bar, the current URL finally shows up, and by passing in version information the portal can also deliver version-specific news and update information. It's all truly a work in progress, so please let me know your feedback.



The Game Box is largely made possible because the underlying toolkit for tXtFL, SWT, has a built-in, fully-functional browser widget. Of course, what good is a browser if its size is fixed at 300 pixels? I stumbled upon the sash form SWT widget that allows one to expand a window area by dragging the divider. Now when you click on the wiki page, you can open the sash to view the full page width's contents in one glance. Heck, you can even use this as your primary browser! (not that even I do that, hehe)

There's only a game left in the season, but as usual, the tXtFL season is only just beginning!

Sunday, January 10, 2010

Roger that, Rodgers

Why didn't the Niners pick Aaron Rodgers?!

Even though he lost today (and phew, says tXtFL), he almost led his team back shortly after I had declared, "The game's over," barely losing in OT.


(Source: Christian Petersen/Getty Images)

This is what the Niners said to the former Cal QB on draft day not so long ago. And this, apparently, is what he's saying back.

Thursday, January 07, 2010

San Mateo dentistry!

If you're looking for a new dentist in the San Mateo area, you're in luck!

My brother and his wife are opening up their new practice in San Mateo. I'm unabashedly recommending paying them a visit. Andrew (er, Dr. Andrew Young) and Miyon (ahem, Dr. Miyon Young) work in orofacial pain and pedodontics, as well as general dentistry.

And they have their own website, too! Check it out here: http://andrewmiyonyoungdds.weebly.com/

"200$ of free software"

I've been noticing more ads promoting free software from third-party sites. That might be fine if the software is open-source, but what's alarming is that these sites often try to charge for membership to download these "products." Here's one from a site advertising OpenOffice.org that was downright shocking, if not downright funny as well:



I suppose that they could mean "free" as in open-source ("free as in speech"), but if so, why would someone need to register for it anyway? For those looking for OpenOffice.org, it's free—as in speech and as in beer.