Continued work on the number sets today, which involved finishing up implementation of several methods across various classes, as well as changing a few choices in data structures or algorithms to hopefully optimize run time a little (to be honest, most normal-usage cases in JFLAP are small enough such that it won't really make a discernible difference, but I knew it would bother me personally if I didn't look back at my code at all and wonder where potential improvements could be made). One decision I've been wrestling with is how to handle sets whose elements are from the range of a user-defined arithmetic expression, for example 2, 3, 6, 11, etc. for n
previous day | next day | return to calendar
Similar to yesterday, I've been working more on the number sets and started off with some more testing this morning. I realized that for the Fibonacci numbers set, after the 46th element, negative numbers are added to the set, which clearly can't be right! A semester or year ago, I might actually have panicked more, but I figured this probably was related to integer overflow and by pinpointing the problem, was able to fix it much more quickly by setting a cap on the size of the set. I thought about using longs instead, but honestly figured most people wouldn't need to work with that many Fibonacci sequences and ints are sufficient for most of the other sets (besides, even longs are finite length so there would always be a maximum). Made a number of smaller changes across various classes, and did some quick tests to make sure they worked. I started moving to working on the GUI, including some coding and also a lot of reading JFLAP 7 GUI code although this time focusing on classes from which I knew I could borrow design or functionality ideas as opposed to previously simply trying to see how code worked or fit together. Sketched out the features that I plan to include and the Swing components I should review or consider using. Now that everything seems to be blending together, it's harder to write unique, longer, and interesting blog posts, unfortunately.
previous day | next day | return to calendar
In one word: GUI. From sketching out ideas on paper to starting to create Swing subclasses for various components, most of today was dedicated to chipping away at the GUI aspect, without anything particularly interesting to report yet, unfortunately. During lunch, Professor Ron Paul spoke for this week's undergraduate research series; the topic of his talk was machine learning, specifically the concept of reinforcement learning. He addressed inductives vs. speedup learning; feedback through supervised, unsupervised, and reinforcement learning; and using value functions for states, actions, and perceived rewards for modeling. I actually haven't learned anything about machine learning before this, but found it really interesting and would love to hear more about the field sometime. It seems like it has a lot of real-world potential and future direction, which is an exciting prospect.
previous day | next day | return to calendar
More work with adding classes for the GUI and the controller. I have some independently working parts, since right now it seems to make more sense to work on the individual GUI components and their associated controller methods before getting everything to fit and work together. Realized that I should be explicitly keeping track of all the sets the user has created or chosen, as well as those literally selected in a JList window, and quickly added that, although I'm having a harder time figuring out how to tell which item was deselected from a list if there were multiple items already selected; searched online for reference and tested various ideas but nothing has completely worked yet...
previous day | next day | return to calendar
More work with the view, controller, and even model like yesterday. As much as I wish I could, it's rather hard to isolate a specific thing that I exclusively concentrated on or completed due to all the dependencies between the classes and actions, so a lot of what I've been doing feels like doing bits and pieces so far. Even though I tried to be thoughtful in designing the Model in the first place, once I actually get involved in the View and Controller, I'm finding a lot of things that need to be changed, even minor adaptations. Trying to juggle everything at once feels slightly overwhelming at moments, especially with the goal of extensibility and design at the forefront of my mind. The main problem I've been thinking about pretty much all day is how to get one element at a time from an infinite set and display it to the user, both in terms of time and space/memory efficiency; unless I'm overlooking something incredibly obvious, this is proving to be slightly trickier than I thought. Professor Rodger stopped by our office in the afternoon for another check-in on our work. I'm hoping to have a functional GUI for creating or selecting sets, and testing membership and doing some basic set operations by next Wednesday.