Showing posts for tag "projects"

Trying To Escape From Designer

Nov 8, 2011 11:14 AM

Though I've grown to more or less enjoy writing Domino applications, I always feel like this is in spite of the tools, namely Designer. In a lot of ways, Designer has improved significantly over the last couple versions: as long as you ignore the speed, the Eclipse-ified Java and LotusScript editors are miles ahead of the antiquated previous ones, and it's handy to be able to switch to the Java perspective. However, so much else makes it a drag:

  • It's a Windows app. I use a Mac, so there's simply a big hurdle to using Designer. Parallels has smoothed the process greatly - running Notes in Coherence mode means I can use my preferred OS while still getting work done. However, it means that it's a big to-do whenever I want to make any tiny change in the code. For day-to-day work stuff, I can get a lot done in the Mac Notes client, since I put in a lot of work to make managing client web sites doable without going to the design side, and the Mac client still lets you edit views and agents. However, there's no XPages editor, so I can't use that for serious work.
  • It has a mind of its own. For some reason, a new clean install of Designer I made the other day got it into its head that opening any database should involve recompiling every XPage and Java class. Sometimes, it turns off "Build Automatically" for no reason, and then turning that back on also requires a full recompilation. Sometimes, it just holds up all user actions while it does... something for five minutes. What's it doing? Beats me.
  • How many times have I seen this window? A billion?
    Removing a database from the project list has about a 30% chance of causing a crash and quitting Designer has about a 50% chance. Sometimes, saving a form will do it. Sometimes, walking away from the computer to get a drink is enough. And every time it crashes, I have to dismiss the dialogs and check the task manager to get rid of any residual processes, such as an instance of nsd pegging a processor, then relaunch Notes and get back to the environment I had, which is not a speedy process.
  • I'm not that crazy about Eclipse. DDE is better than previous Designers, yes, but Eclipse is still a giant beast with the same sense of style and simplicity as the monstrous Java language that spawned it. On the plus side, the blue look that IBM came up with is actually rather attractive compared to the standard Eclipse UI, but little quality-of-life things are a drag. For example, how do you specify how many spaces a tab should take up visually? It's in a couple places in the preferences and you have to set them all, including buried inside a weird sub-preferences dialog for messing with your Java formatter. And how about changing your code syntax coloring? You have to go to a dozen places, one for each syntax type. Compare to a text editor like TextMate, where you can swap between packaged color schemes with a drop-down.

That's enough for the rant. So what is there to do about it? I give this problem a thought from time to time, and I don't think there's really a great option, but there are some places to start. The real key to any alternative scheme is DXL - using that, you can (more or less) view and modify design elements freely. I've toyed with this notion before - maybe a web UI that lets me pick the DB and design element I want so I can tweak the DXL manually for when I want to make a quick change but don't already have Windows or Designer open. It would mostly work, but it would take a lot of work to make it practical.

There's a big sticking point, too: XPages. If you export an XPage to DXL, you can see that the exporter basically punts on it - it's exported as a generic "note" type with Base64-encoded binary fields. I haven't run the field data through a decoder, so maybe one of them is the XML "source" of the page, and maybe it could be made to work, but that just raises more questions. Would that require updating the other binary fields in some way? Would importing it with a DXL importer cause it to generate and compile the Java representations? What about generic Java classes? Would those work with DXL and would they be compiled?

I'm starting to get an idea of what would be ideal and almost practical, though. One could write a WebDAV server (possibly with a complex servlet, a small web server to the side, or other trickery) that represents the design elements as editable files in a folder structure similar to the Java perspective view of the database. Traditional files and image resources could be edited as-is (which I think the built-in WebDAV server does), but design elements could be represented just as DXL and then re-imported when modified. Even if it doesn't support XPages, such a scheme might have a lot of promise and wouldn't be reliant on Designer or any other IDE.

If I ever get brave enough to delve into WebDAV or frustrated enough with Designer, I might just look into it myself.

Sync

Oct 25, 2011 9:52 PM

So there's a new round of talk lately about syncing and the trouble involved, thanks to some changes in Google Reader's behavior and the desire to find a new safe haven for RSS syncing. The best example is, unsurprisingly, from Brent Simmons:

Google Reader and Mac/iOS RSS readers that sync

However, the whole time I was reading this article, my brain kept yelling at me, louder and louder as time passed:

This is Lotus Notes! The system you're describing is Lotus Notes! It does syncing and deletion stubs and read marks! IT'S LOTUS NOTES!

This kind of thing would indeed be really easy in Notes/Domino, particularly if you were actually using the Notes client (though it wouldn't be much to look at). Subsets of data, managing deleted elements, timed refreshes from the source, storing each feed entry as its own entity, and offline access that can have its changed synced back to the master are all things that Notes has done since its conception - the only problem is that it's so ugly and arcane that mass-market appeal is nigh-impossible.

Nonetheless, it got me thinking about the viability of using Domino as a syncing server for this. You wouldn't be able to use NSF files in your RSS clients, which would make the job a bit tougher, but the new "XWork" licensing model would fit into this nicely. Scalability would be a serious concern, but the simple nature of the data would keep view updates quick, and it'd just be a bit of cleverness in the database layout to direct users to the correct place. Toss a couple clustered servers in there and you should have some good load balancing, too. The Domino Data Services API might be enough to handle data access from the client, but, if it's not, a couple simple agents would do it.

I'm sort of tempted to try hashing something out.

Hacking Together a Backup System

Jul 23, 2011 5:10 PM

Tags: projects

Recently, my living room Mac mini's external drive, where it kept its iTunes library, met a horrible, clicking death. Naturally, I had devised a proper backup plan long before this happened - unfortunately, however, I had not yet implemented this plan. Crap.

So I decided to straighten out my backup system all around, ideally covering all of the machines in the apartment as well as my hosted Domino server. My ideal (at least for now) backup plan would fit within a couple attributes:

  • Cheap. I've been trying to spend less money overall lately, and picking up a new bill for hardware or services would counteract that somewhat. I wanted to come up with something that would work with the hardware I had on hand, plus one purchased replacement HD.
  • Automatic. I don't want to have to remember any manual backup process, since I most likely wouldn't.
  • Off-site backup isn't important. Sure, it would be nice to keep my data in the event of a physical catastrophe, but we're talking about TV shows and movies here, not anything vital.
  • Quick recovery or automatic failover aren't important. They'd be NICE, certainly, but I'm just looking for a basic "the data exists in at least one other place" setup. If a computer meltdown means that recovery will take a while or I'll have to rebuild the OS, that's fine.
  • Versioning isn't important. The occasions where I would want to restore intentionally-deleted files or modified documents are so few and far between that it's not worth going out of my way to achieve that.

My main laptop was far and away the easiest to set up. A while ago, my boss gave me an external USB drive which I've been using for Time Machine backups. Time Machine does pretty much everything I would want to, and even gets bonus points for ease of recovery and versioning. When I'm out of the office, it even kind of counts as off-site.

My Domino data was the next easiest, primarily since I work with it all the time. I set up a Parallels virtual machine to run a new Domino server, set up scheduled replication, and pointed my "create a replica of everything" agent at my production server. VoilĂ : up-to-the-hour backups without having to give it a second thought.

The hard drive I purchased to replace the failed one was a nice 2 TB one, giving me enough room to store my media library plus some Time Machine backups for the mini itself, the iMac in the bedroom, and the two other laptops floating around. It won't be enough space permanently, but it'll last me at least until I'm comfortable enough to buy another one. So that covers the other Macs themselves.

In addition to the media drive, the Mac mini also has a 750GB drive salvaged from my poor, video-card-exploded iMac. I cleaned off enough old crap from there that it will be able to serve as a mirror for the media files on its larger brother - again, at least for now. To implement that, I wrote a quick, two-line shell script:

rsync -aE --delete /Volumes/Tartaros/Movies /Volumes/Diaspar
rsync -aE --delete /Volumes/Tartaros/iTunes /Volumes/Diaspar

That basically mirrors the Movies and iTunes folders on Tartaros (the media drive) to equivalent folders on Diaspar (the iMac's old drive). The "-a" switch toggles "archive" mode, which enables a lot of useful behaviors for this case, "-E" enables support for HFS+ metadata like ACLs, forks, and extended attributes, while "--delete" removes any files in the target directory that no longer exist in the source. I added this to my crontab to run at 3 AM each day.

All in all, I think this setup should cover my basic needs pretty well. My next step, when I want to spend the money, will be to sign up for an online backup service like CrashPlan. There are some cheap options and they would hopefully be more reliable than my current scheme, which is still dependent on the fragile health of a handful of external USB drives.

Not much to look at

Mar 17, 2011 11:48 PM

Tags: projects

So I finally wrote a proper Cocoa app to accomplish a specific task! Here it is:

Ok, so its lack of actual UI makes it somewhat unimpressive. The "specific task" part is true, though. After running across a bunch of old AIM chat logs from various sources in my recent hard-drive-trawling, I decided to put them all in a DB for no discernable benefit, because that's the sort of thing I do in my spare time.

The AIM+ and two styles of gaim chats were easy, and I expect the Adium ones to be not too bad, but iChat gave me a little trouble. It's apparently used two formats over time, both of white are Apple-proprietary formats. I decided to focus on the older format, since most of the chat logs were circa-2002/2003.

After doing a little digging, I found that the files are in the format used by NSArchiver and NSUnarchiver, which appear to be the Cocoa method of object serialization. I pointed an NSUnarchiver at one of the chats and... it complained about not having the InstantMessage class. Fair enough.  After finding that Apple's InstantMessage framework is just meant for looking at your buddy list and doing AV stuff and not parsing logs, I grabbed the source of the horrifically-named chat browser Logorrhea. After I plunked its iChat data type classes into my project, all was well.

I found that the files consist of an NSArray (well, NSCFArray) with a mix of children representing chat attributes and the chat lines itself. I looped through that, checked the class of each one, and dealt with each appropriately. "Appropriately" in this case meant "converting to XML", so the agents in my database could read it back in properly. I haven't yet taken a whack at converting the body text from an NSAttributedString to HTML, so for now it's just the plain-text version.

It's rickety and I'm sure I did tons of stuff wrong, but it works! I ended up with a folder full of XML versions of the chats, ready to be imported next to the other logs. There's not much better to get your feet wet with a new environment than a clearly-defined basic task, I say.

For the morbidly curious, the pertinent code is here:

UnarchiverAppDelegate.h

UnarchiverAppDelegate.m

Television Man

Mar 10, 2011 10:29 AM

Tags: projects

A couple months ago, I set out to cut down as many expenses as I could, and my Comcast bill stuck out like a sore thumb. Thanks to a couple weeks of daily five-minute outages, I had already been switching over to (similarly-priced) FiOS service, but my TV service remained. Not only is cable service with a DVR, reasonable channels, and good HD coverage an expensive proposition regardless, what really gnawed at me was how ludicrously out of proportion the cost was to the actual use I got from it. TV service was about twice as much as my Internet service, but, whereas I use the Internet just about 100% of the time, I only watch a couple hours of TV a week... most of which is available from those channels for free online.

One option was to switch from Comcast TV over to Verizon. It'd be cheaper for a while, but I have no illusions that Verizon wouldn't creep up the price over time as new-customer deals start to wear off, and even if they didn't, the price/usage mismatch would remain.

So I set out to tackle the nigh-insurmountable problem of successfully replacing cable service with a computer with a good net connection. I had a circa-2007 Mac mini laying around that fit the bill nicely, so I cleaned off the old Leopard Server installation and got to setting it up. There are a couple things that make replicating a good TV setup such a sticky wicket:

  1. Many shows have their own, usually-crappy delivery mechanism. Some of them, conveniently, use Hulu, but some aren't even readily available at all.
  2. Even when shows ARE available, the image quality is pretty much universally far inferior to real HD TV shows.
  3. Much like replacing radio with an iPod, it's tougher to discover new shows without seeking them out. Fortunately, this isn't a huge problem.
  4. Media center apps, while impressive, tend to have at least one crucial flaw that undermines their utility.

The first two problems have necessitated a step into questionable morality and technical complexity. Namely, I set up an RSS reader to pull torrent files for new TV shows in pretty-much-HD quality, then a torrent client to download them, categorize them by name, seed to 200%, and then stop the torrent. I still don't have EVERY show we used to watch, but I have the big ones, and they're in pretty solid quality.

The last one is an ongoing project. I started out using Plex, which is pretty great and edges out the competition with some Mac-specific support. However, its YouTube plugin is pretty lacking and I'd rather not resort (yet) to learning Python and writing my own. I've switched over to its progenitor XBMC for now, which has a pretty solid YouTube plugin, but took a step back on other video sources. I'm considering setting up a Windows partition on the thing to see how the options are on the other side (like MediaPortal), but I'd rather avoid having to do that.

Overall, my TV experiment has worked out pretty well, but it's primarily due to my specific situation. If normal TV was a bigger deal in the apartment (say, if we had kids), this would be a woefully inadequate replacement. Similarly, if I didn't enjoy doing crap like setting up RSS feeds for torrent processing or manually managing TV-show libraries and video-output settings, it'd be too much hassle to be worth it. And I certainly don't miss the Comcast bills.

What's next?

Mar 6, 2011 3:22 PM

Tags: projects

Thanks to The Brads, I ran across Dribbble the other day, and it's the new coolest thing ever. The two main things that struck me were "man, modern web designs use a LOT of soft gradients" and "hmm, I really want to make some more web sites now." The latter is pretty much the point.

I've never been a web designer. With enough effort, I can sort of emulate one, but the results are expectedly mediocre. That's mainly because that's a natural extension of being a web developer - the stuff I program has to look like something, and CSS is essentially a programmer's design tool anyway. However, visual design isn't my gig, so I don't feel the least bit squeamish about cobbling together something reasonably clean and aesthetically pleasing from various sources of "inspiration" and calling it a day.

Fortunately, looking at nice, clean designs (like this WordPress admin site, actually, which I kind of like) is good inspiration nonetheless, since it makes me want to write something cool enough to rise to the occasion. A minimalist design with exaggerated tabs, labels, and such implies that the stuff you're looking at is organized logically enough to match, and that's the kind of thing I can do.

Now that GCD is a reasonable 1.0, Dribbble has me itching to move on to what's next. Far and away the best candidates for fancy new UIs are my various projects for work, but that's only ever so exciting. Maybe I'll take another pass at my Minecraft server to see if I can take advantage of its database-attached-ness. Probably better would be really diving into Cocoa programming - that'd be fun AND potentially directly useful for future job prospects. Heck, it'd even be good for my CURRENT job, since having a proper iPhone UI is on our list of big to-dos. Hmm, yep, that's what I'll do.

Real Artists Ship

Feb 26, 2011 3:18 PM

Tags: gcd projects

Getting Crap Done checklist:

  • iCalendar feed? Check.
  • Email reminders? Check.
  • Basic mobile support? Check.

I have a couple more little things I'd like to add and some UI changes I'll no doubt make, but I'd call the quick development of GCD a success. Which is good, since the idea is to get me to do stuff, and quickly.

So what's next?

The big thing is to get Raidomatic, my new guild forums and raid composition tool, released and into use. It's mostly there, but there are little problems to take care of and a couple small features I should add before release. The vital thing will be to get it out there - I can add any other big features (like sorting loot rollers by how proper the item is for their spec) in later revisions.

After that, I want to make a Mac client for GCD. It's not like the site is screaming out for native clients, but I want to learn Cocoa programming and nothing helps learning a new environment more than having a very explicit and attainable goal to reach.

In addition, I've got a family-company web site to work on. Between that and the other couple things I have to do, I should be able to keep myself pretty busy for a while.

Gaze Upon My Works

Feb 21, 2011 9:26 PM

Tags: projects

So I think I need a project to work on.

Back during my education, when I had weeks of time on my hands, I had projects going all the time, the most prominent of which was my old blogging site. Aside from that, though, I had lots of little things - server admin stuff like setting up mail access, getting Gaim to work on OS X back when that meant using the non-Apple XFree86 build, and my on-again-off-again relationship with building pseudo-filesystems with MySQL in Java, Objective-C, or Ruby.

Then, I started working and actually doing  things with my time, and my beloved projects have gone by the wayside. For a while, even when I had free time, I'd be too tired and annoyed from work to do much other than play WoW or watch TV. I've still finished a couple small-time projects here and there, like my new home page when I finally got fed up with my ancient My Yahoo home page, my AIM log parser DB, and a little runeword-tracking app for Diablo II. My big project lately, which has been taking longer than it realistically should have, has been the new forums/raid comp utility for my guild. That's finally just about good to go, which means my spare programming time will be free.

So: what's next? A couple candidates come to mine:

  • Another blogging platform. I've already done this, but I'd love to take a whack at it in Ruby or another modern language, not PHP. I have to admit, though, that (NIH flareups aside) WordPress is doing a fine job.
  • Some just-for-fun apps in Cocoa. I have only a cursory knowledge of Cocoa, and it'd serve me very well to learn how to write Mac and iOS apps.
  • Some stuff in Cappuccino. This would have much the same effect as learning Cocoa, but would keep within my usual web-dev domain (which could be either a plus or a minus).
  • More Minecraft Server work. This could be fun, but I'm getting pretty tired of looking at Java all day.
  • Plugins for Plex. I've recently switched to using my Mac mini in lieu of a proper cable TV subscription, but there are some rough edges. Namely, Plex's YouTube app is pretty feature-light, but XBMC doesn't support Hulu or Netflix. Plex plugins are just Python, though, which is like Ruby if you squint, so maybe I could fix it myself.
  • More WoW stuff. I'm not sure what specifically I'd do next, but there are plenty of places I can improve the forums and raid comp tool.

The important thing, though, is that, now that I've written it down in a public forum, I'll have to do something. All I have to do is decide what, and the rest is an implementation detail.

Running Minecraft as a Domino Server Task

Jan 13, 2011 1:57 PM

Tags: projects

A couple months back, I started getting into the wonderful game Minecraft, which I heartily recommend. Since I really just wanted to play the multiplayer one, I decided to try setting up my own server. The actual setup is very easy - drop the minecraft_server.jar file from their download page somewhere on your computer and launch it. The tough part was making sure it'd do real server stuff like, primarily, launching automatically at startup.

I looked around a bit for ways to create normal Windows services ro run a Java app, but the process I found looked painful. Then, I realized that I already HAVE a server capable of running Java-based tasks with aplomb - Domino. After not a lot of searching, I found the perfect starting point: http://nsftools.com/tips/JavaAddinTest.java.

Now, I had a couple choices for how I could implement this: I could extract the JAR and figure out how to run the server from the raw classes, essentially writing my own server; I could include the JAR in my project and run the main(...) method of the server class; or I could go the "easy" route and just run the Java task externally. Though the first two would be interesting and are potentially something I'll look into down the line, I went with the final option and it's been serving me pretty well.

Basically, the Java task, when loaded, does a system call to run java.exe to load the server and attaches a couple stream readers to that to read in the standard and error output from the task (error-out from Minecraft appears to include tons of non-error information).

That was sufficient to get it up and running, but I decided to be a little tricker. I set up a database to house reports and config parameters (yes, yes, I know you're not supposed to put database file paths in code, but meh). That way, I can keep a log of all the messages in a searchable format, keep track of the users that have logged in and their last login times, and store parameters like the memory sizes and Java and JAR paths without having to re-edit the server task code for every change.

It's been working out pretty well! I've been working on an XPages UI along side it for viewing the information and sending along server messages, and I'll eventually put in an editor for the .properties file the server uses for its startup preferences.

Here's the (likely bug-ridden) code I'm using:

MinecraftServer.java

Now THERE's a terrific idea

Dec 21, 2010 9:53 AM

Tags: projects

This post over at Codestore hit me as one of those "oh huh... why aren't I doing that?" things. My current computer setup is blessedly homogenous, consisting of a handful of Macs. Since pretty much everything on the Mac, including Chrome, stores saved passwords in the Keychain, which is then synced across my computers via iTools .Mac MobileMe, I don't even need to use 1Password to assist me (though I have a license around somewhere). Keychain Access has a nice random-password generator when you go to change the Keychain password, and I've also found the results of @HashPassword(@Unique) in Formula language to be quite suitable.