Category Archives: programming

365 Days

It’s hard to let go of things.

After 365 days of work, a modest senior project for school is “finished”. As usual, there’s always more that could be done with this project… and I wish the project could have been more complete by now. At this point it almost doesn’t matter what type of project it was (a simple music generation program) but more that it’s time for a rest.

I’ve learned a lot of things throughout the year, though, like the futility of my plans in life, the emptiness of endless work, the limits of my body under ongoing stress, and the regret for any wasted/misused time this year. Thankful for the lessons (hopefully) learned on the importance of remembering the Sabbath, the importance of right priorities (who am I serving?), and for the Lord’s mercies this year. Time to get back to reality…

There’s something special about programming, though… and building a programming project is like growing a garden: they both take a lot of attention and care. Sometimes programming projects take you away, and some get taken away. This past year has seen both of those directions: a giving and a taking away.

A giving and a taking away.

365

kanjoto collection

Summer provided some time to begin working on the initial Android implementation of kanjoto. The following entries are a step-by-step look at how this implementation was created and where this implementation is headed.

  1. Wireframes Drawn
  2. Framework Created
  3. Code Reviewed
  4. kanjoto Logic Added
  5. Project Demoed and Presented

Generating MIDI on Android

Went back to a previously-found project that helps with generating MIDI on Android: android-midi-lib. This is a really easy-to-use library (albeit with code-only documentation) that makes it easy to generate MIDI on Android.

I ended up trying out one of the examples included with the android-midi-lib project in a new Android application called Generate. This application then generated a simple MIDI file that could then be read by my earlier-created prototype of a MIDI playback application.

Initial Research

Found a way to play back MIDI files by using MediaPlayer class based off of this tutorial:

A simple exercise to play MIDI audio using MediaPlayer

And that tutorial was found via the breadcrumbs from this Stack Overflow post:

How to play changing midi on Android – jetPlayer

where a user named @dorien was previously asking about similar MIDI playback functionality (and evidently went on to create an Android application that generates counterpoint-focused music.) The paper on this app creation process can be found here:

So at this point I am able to play back pre-generated MIDI files in a basic Android app, and have created a prototype Android application named Playback.

Online Dev

As much as I hate to talk about tech/programming… just wanted to note that I’ve been using Nitrous.IO to develop a Rails application for a database class… and it’s been great! Nitrous.IO is some sort of virtualized server/IDE for developing applications via a web browser; pretty convenient!

But, as for anything, I’m not sure if I’d be willing to use this type of service for more than anything non-essential (because of questions related to overall security, reliability, and backup plans…) but I can definitely see browser-based coding becoming the way people develop web and mobile applications in the near future.

The local machine, no longer.

Consolidation

Been working on consolidating the different branches of this website into one “easy to navigate” collection. Not sure if that “easy to navigate” part has happened yet… but at least the sites have a common navigation bar at the top (kind of like all those other websites on the Internet…) so that it’s at least a little harder to get lost when browsing the sites.

At the same time, I’ve been trying to add more detail to entries in the Music Scrapbook so that I can then automatically pull information from the Scrapbook for display on the main website. Trying to reduce the number of times I repeat myself… and maybe it’ll work out this time…

Creating Self-Contained Web Applications

Been thinking lately about how I don’t want to have to eternally babysit every web application I’ve ever made. So it seems like I have a few options for future applications:

  1. Use existing community-driven projects and customize.
  2. Create application that allows for script files and database to be dynamically added, changed, or deleted.
  3. Create application that “virtualizes” the database and abstracts script files.

When I first started working with web application development… I used existing community-driven projects and customized them to try to match the needs of the user(s). At some point, however, I got tired of running up against places that were too hard to customize… which eventually lead me to create web applications from scratch. Web applications from scratch are great (at first,) because they are tailor-made from the very start. But custom applications readily become a liability for users when the application developer has decided to stop supporting the application.

One of my earlier applications tried the second method (of creating an application that allows for user additions, changes, and deletions to the application itself,) and it all seemed to work for a while. But there are dangers in allowing users to change the very foundations they are standing on in order to make those changes. (For example, would you want to be a high-rise window washer with the ability to cut your own safety rope by inadvertently saying a few words?) This second approach seems great at first but the dangers that come along with this method may not be worth the risk.

The third approach of “virtualizing” the database might be a safer approach to a user-customizable web application. The term “virtualizing” here refers more to the idea of “abstraction” instead of other modern-day definitions for virtualization. When a database is “virtualized” it is basically made up of unchanging table columns that point to changeable table rows. It allows for user customization for the web application… while not actually changing the database structure. This method can optionally include a similar “virtualization” pattern for actual script files, as well. This approach would potentially complicate moving this database to another framework or application, however, because database tables would end up being further abstracted than usual.

At any rate, it still seems like there should be something easier between all of these approaches; and there probably is (aside from the “just have someone else do it” option…) I just have to find a better approach, I guess.

There’s got to be a better way…

Been tired of thinking about web programming and frameworks, lately. There’s got to just be some way to easily get stuff up online, right? Something that doesn’t require the “repeat yourself” (from the supposed DRY with Rails,) that inevitably seems to happen (due to my laziness, at least,) all too often. Thinking about an easy way to just get things up without a lot of hassle. o_O

Ideal Framework

Lately, I’ve been working on getting a simple web framework up and running. Partly for show. Partly for practicality. Sometimes I just need to have something in my toolkit that I can use for both of those purposes. Enter Ideal Framework.

It’s really not that great. But, I like to keep things simple. I do like Rails… and the organization it brought to some web applications in general, but I tend to find myself using PHP a lot more often; at least for web-related programming.

If you are interested in things web development… here’s the book on Ideal (in progress.) And, here is the GitHub repository, as well.