Category: Programming

  • Real World C# Object Oriented Usage

    I have never really had to work with Object Oriented programming for anything in the real world before. I have studied the theoretical implementations as well as done the course work required to make it happen, but this weekend I am getting my first taste of actually having to implement a solution (to an actual problem) using the C# language. Not to go into too many details, but there is a streaming media service that works on the concept of a web browser platform and then gives info off to a Windows Media plugin. Well, before a few days ago Chris and I were using another tool to read this info and let it pass through to TVersity so that we could listen to the stream without having to use a PC. A few days ago the media provider decided to change their URLs and as a result broke the previous tool. Unfortunately, we didn’t write the original tool, so there was no way to change the URL being used. In general, this sucks. We made an attempt at using C++ so that we could use some of the same libraries that the existing tool used, but unfortunately, after 45 minutes I couldn’t manage to get Visual C++ to take a string declaration (since C++ doesn’t take STRING as a primitive type). Once we threw C++ out the window and switched to C# everything came together and now the app is coming along nicely. I still have no clue if it will work, or if it will be able to be converted easily to a Windows service, but the whole damn thing is pretty fun to work on. I always stayed clear of object oriented projects, but this is coming out so clean as a result of using the objects. The only thing I am regretting is my lack of knowledge of how to extend/inherit classes in C#. I’m sure I could do it, but I probably wouldn’t like the difficulty in managing the resources implemented higher up in the chain. We have a pretty neat class that works on some of the HttpWebRequest/HttpWebResponse stuff in .NET, and it would be really cool to simply extend it with new methods than make everything have to call back to it. I might have to work toward that once this application actually works.

    I can’t believe that I haven’t taken time to write anything except GITI in the past few years, even though I obviously have the proper training to do pretty much anything I want in C# or Java (probably C++ too, but just not Visual, MS seems to have corrupted the zen of C++). I haven’t felt particularly useful in technical tasks lately, as in most of them, Chris is more talented than I could ever hope to be, but in the area of C++/C# programming, I seem to be the only one who has gotten then hang of the languages, although Chris has been very useful in figuring out certain things of logic.

  • The Tag Phenomenon

    What is the big deal about tags? You can tag photos, you can tag blog entries, and you can even tag your bookmarks. What is the point of tagging?

    I have just written the tag code for GITI. It is universal code that can be used by all modules for interacting with the GITI Tags table. Presently it is implemented by the Cookbook module in two forms. I am implementing it for “standard” recipe tags, as well as “meal tags” for associating recipes with meals or days. It is presently a very simplistic implementation, but from what I can tell, tags are very simple. I think this works for now, but I am trying to remember why I added the ability to tag these things.

    COOKBOOKTAGS

  • GITI’s Biggest Problem

    GITI’s biggest problem as far as development and module completion is my inability to create an effective and useful UI. I can’t see in my head how things should look and outside of the first few modules I don’t really know how I would really want to present things anyway.

    Cookbook is the present module that is being created. The first few ideas for the module called for something very similar to the way the other modules presently look, with an intention to change the look later. The problems are that the module ends up looking very empty when implemented that way and also, I have a habit of giving modules my intentions and then not remembering to go back and complete what I intended (see about 4 attempts at ToDo and Schedule). I am having a hard time with cookbook because I am making it more graphical and I have many ideas for what I want to see in it, but those things are not as simple to create as the things that I have done many times on other modules. This module is different because it has to be both a GITI module and a useful individual app, and I am also trying to make sure that things I create are not too hard to port into a desktop application as well (if for no other reason, then just to defeat the cloud concept).

  • GITI: Time Is Now Relevant

    Upon a user request, in GITI Education, Time is now a relevant field for assignments. Basic time support has now been added to the Add, Edit, and View single assignment pages. With this update to the Education module also comes a change of intention for the “Date Assigned” and “Time Assigned” fields. The field labels now express the intention of taking on the earliest date the assignment will be available, and not necessarily recording the actual date the assignment was created.

    The batch add system will receive the functionality after implementation options are considered, especially with regard to the programmatic assigning of times to a batch of assignments. The batch edit system will receive the functionality as soon as the batch edit code itself is written.

    • Summary now utilizes the “Time Due” field when sorting the assignments that are due in the current context
    • Overdue assignment notices do not presently consider Time
    • Summary will now only show assignments with “Date Assigned” dates that are ‘yesterday’ and before
  • Update on GITI.Cookbook

    I finally got the base code written so now it is possible to:

    • Add recipes
    • Search by title
    • List categories
    • See recipes by category
    • View recipes

    I still have to do the following:

    • Add “Edit Recipe” functionality
    • Add “Ingredient search”
    • Refine interface
    • Create side toolbar

    It is still very basic, but it does work 🙂 The biggest thing is going to be to make the interface not look ugly. That will take many hours to get right.

  • The Modules

    Module Status Description
    Address Book Stable Converted from its independent state, Address Book is fully functional with no presently pending issues or incomplete features. The module is however, due for an overhaul to bring it into the GITI space more completed as well as to refine its mission.
    Bookmarks Dead Module was started a few times in different ways. Module was never completed and is not currently in the list of modules to be created.
    Collection* Stable Feature complete module for managing footwear, wear logs and various other attributes. This is Chris’s module to maintain. I am just a happy user.
    Cookbook Theoretical This module is in the planning phase, but should become a fully functional module for managing recipes.
    Documents Minimal This module is very much functional, but in a minimal state. None of the planned advanced features exist. The module is a very basic document editor for creating fairly plain documents, such as MLA style research papers.
    Education Incomplete Education is almost complete, but not quite. There are still many outstanding features as well as some bugs that need to be resolved. The module is quite usable and can easily manage classes for many semesters, including course planning for future semesters.
    E-mail Dead Simple send-only email tool, recorded sent mail to the database. Utility is no longer functional and has been removed from GITI.
    Health Variable Health is listed in GITI as a module, but it really is not yet, it is an “umbrella”, it contains other modules (or parts of modules). Health contains the very simple, but yet functional masturbation logger, an almost non-existent Nutrition module that does basic meal tracking including calories, fat, protein and carbohydrates. There is also a nice module created by Chris that can track workouts and progress towards fitness goals.
    Inventory* Planning Inventory does not really exist. It is prototyped based on Library. Its eventual goal will be to track a bit of everything. The original data that was given to it was a glaze list, which has since become inconsistent. Eventually it should be able to track any physical assets, including things that need to be reordered, or just general stuff that is around that might need to be recorded.
    Journal Stable Journal is a bit of a shell module as itself, but it is much more robust as ItemJournal, its inter-modular counterpart which utilizes a lot of the same code. Over time I have lost the need for Journal personally because I tend to blog whatever is going on, especially now that I have a private blog as well. ItemJournal is more useful for associating information with objects in other modules.
    KeyChain Minimal Minimalistic utility for storing software keys. It works, that’s about it. 
    Library Stable It puts books in, it checks books out. Nothing more complicated than that. It is a nice, clean module.
    Notepad Stable Its a hierarchical notepad system, supporting multiple “pads” and “pages”. Another one of the “clean” modules
    Schedule Unknown Schedule, the module that gave GITI its internal name, is in a somewhat variable stage at the moment. Its between being sort of working and being ready to be overhauled. The module works ok. It schedules things, including stuff other modules need to add to the schedule, but some of the stuff, like invitations and a working calendar are not yet implemented.
    Status Complete There is not much to it. Its hooked up to a web interface. It manages a status put into it. Doesn’t even require its own page, plugs right into the summary system.
    Summary* Complete This module takes “summary” information from other modules. This can be anything from contacts with birthdays occurring soon, to assignments coming up soon in Education. It is quite useful, but of course, like anything that is truly working in GITI, I didn’t write it. This is considered part of GITI’s core code.
    ToDo Deprecated This version of ToDo has a lot in common with its GITI v1 predecessor, including about 90% of its code. It works, but not very well. I haven’t used in in a long time because it just doesn’t fit in with the rest of GITI v2. This version was actually reverted to the original code after a close call with being rebuilt from the Notepad module. Seemed like a good idea at the time, but after the fact, it wasn’t pretty.
    ToDoList Minimal This is a new approach to To Do. It does not look or feel anything like the other attempts at ToDo. So far, it is only a simple list, as featured in a previous blog entry. It will be finished with more detailed management soon, but for now, it stands as it is, quite usable.
    Weather* Complete Uses weather channel weather information. Not much to it on the user end, but a pretty nice module. Thanks for yet another module Chris.

    * Not my module

    I now understand why I have had to rework the menus lately, more modules than there is space, plus there has to be space for the independent constructs.

  • GITI Cookbook

    We’ve all seen a cookbook and there are tons of web-based as well as desktop applications for cookbooks as well. So why would I want to write my own for GITI? First of all, because its GITI, it is MY Personal Information Manager. Second, I like things a little more  custom to the application of things than some of the other apps are. I do not need shopping lists and things generated (at this point anyway, and if I do later, that will probably be coordinated with the Inventory module). The third reason is because there is a lot of integration I can see for this. From just being able to store and retrieve single recipes to being able to assign “tags” to recipes to make them part of a master meal plan, it can all be used across multiple modules. Finally, if I write the code, then I know how the data is assembled and I can more quickly build web apps that use the information or even write an app in C# that can use the information.

    The major origin of this entire project is my recent growing collection of recipes I am keeping in a 3-ring binder. Most are from Cooks.com or other similar sources, but some are recipes that I have written. I do not like having my recipes stored in physical form, it limits my access to them as well as makes it more difficult to get another copy if I get something on the physical pages. I will probably still keep my physical copies in a notebook, since I tend to be a little messy when cooking (especially baking).

     

    The planned functions for GITI Cookbook are:

    • Recipe Storage
    • Search by name
    • Search by ingredient (perhaps even multiple)
    • Servings adjustment for recipe output
    • Nutrition export directly to GITI Health
    • Date/Event Tagging
    • Image of food (when available) via GITI Assets
    • Notes about the recipes (alternate ingredients, etc)
  • Little More Attention to ‘Quick Key’

    One of GITI’s least developed features is called “Quick Key”. Basically, it is a shortcut system for GITI. Type your command in the box (a “key” command, not the fully GITI path) and it takes you where you want to go. Unfortunately, they are very simple, and most rely on module functionality to make them work. The biggest drawback to something like this is that it is not possible to type “add assignment” and have GITI pick up the meaning on that. The most advanced that gets is being able to call a specific assignment by number “assignment 1143” returns the details page for Assignment #1143. The way that works is that GITI only recognizes one word in the string for the key, so if there is more than one, it breaks it up and passes the other part as a parameter to the module.  This eliminates any possibility for “natural language” keys, which sucks. Most keys do not even accept parameters, so that further limits flexibility.

    Add, Find and View are some of the functions I would like to add as universals, but I have not quite gotten to writing the core level code that would allow GITI to have its own internal keys that are not module dependant. To do this will also likely require me teaching GITI a list of mappings for each of the special “natural language” commands (ie. “Add Recipe” calls Cookbook’s Add function). Find should be especially interesting, since at this point no modules, except Address Book and Library even support the ability to search for anything. The weirdest possibility for “find” would be writing a universal search tool that would look through specified fields on each module’s entities. I would worry about the database load of such a functionality though. I am not sure how “natural language” typing the phrase “find contact Kularski” actually is.

    All of this stuff comes up now because of the creation of a new empty module called “Cookbook”. The module at the moment has no code, only its GITI constructs and things that will expedite my ability to write the module. It is a fairly simple module on the surface, its ingredient lists, directions and cooking times. No big deal at all there. I will likely get into more elaborate concepts such as categories and ingredient searches, but so far, I am just planning to create the data constructs for them and put not much effort into writing those components,focusing on the “important” stuff, like recipe insertion and retrieval. The mere conceptualization of the module causes these other needs to arise in Quick Key because it is a module that can require things to be accessed in a short amount of time, perhaps being pecked out on a keyboard using the end of a wooden spoon.

    Quick Key could be a very useful functionality if I spent more time with it and perhaps made it more obvious in the user interface (beyond a small textbox).

    Quick Commands
    Key Title Address
    about  About GITI    root.giti.home.about
    assignment  View Assignment    root.giti.education.view
    calendar  Calendar    root.giti.schedule.calendar
    checkers  Checkers    root.giti.home.games.checkers
    class  Class Overview    root.giti.education.classes.view
    classes  Class Details    root.giti.education.classes
    cook  Recipe Search    root.giti.cookbook.search
    cookbook  Cookbook    root.giti.cookbook
    courseplan  Planned Courses    root.giti.education.classes.planned
    doc  List Documents    root.giti.doc.list
    education  Education Home root.giti.education
    food  Add Meal Record    root.giti.health.nutrition.new
    frog  Frogger    root.giti.home.games.frogger
    hangman  Hangman    root.giti.home.games.hangman
    help  List Quick Commands    root.giti.home.quick.list
    home  Home    root.giti.home
    homework  View Current    root.giti.education.list
    keychain  KeyChain    root.giti.keychain
    mario  Mario    root.giti.home.games.mario
    pacman  Pacman    root.giti.home.games.pacman
    people  Find Person Record root.giti.addressbook.quickfind
    quick  Quick    root.giti.home.quick
    schedule3  Schedule3    root.giti.schedule3
    schools  Manage Institutions    root.giti.education.manageinst
    sneaks  Sneaker Collection    root.giti.collection
    tetris  Tetris    root.giti.home.games.tetris
    time  Time    root.giti.home.time
    wank  Add Masturbation Note    root.giti.health.sex
    weather  Weather    root.giti.weather

    exhibit 1: Quick Key command list

  • GITI’s Hidden Talents

    GITI comes across as a very timid web app. It doesn’t even attempt to be Web 2.0 at all, aside from a little CSS, but things are not as simple as they appear on the surface. There are many functions and tools hidden in GITI that have hardly ever made it to a menu. I don’t know why I have allowed things to get like they are, but there is NOT a good menu system for GITI at this point. For something with Interface in its name, it is lacking in end-user friendly components, such as menus that clearly outline the functions that are available.

    Last fall, Chris became a student and at the same time became a GITI user for more than tracking what sneakers he wore when (a module he wrote). At the time the class tracking functionality was somewhat limited, most things had to still be managed manually, except for class closing (which is easier to do one class at a time as they close when you are bored at the end of a semester… when do you think the function was written anyway?). I added more features to make things easier,  including a class planning and registration process, but  that functionality was not apparent and the entire process was a little obtuse. Functions designed to make batch management simpler ended up being easier to do manually, one course at a time. Seems a little counter-productive. The truth is, aside from the new welcome page for the Education module (which almost screams “MAIN MENU”), nothing else even gives a hint to the new functionality. Part of GITI’s charm is supposed to be an integrated menu system that is universal across the system which will allow “one click” navigation (in v1 it was like 3, but still, no new page to load to get to your function). Getting from place to place should not require loading a separate page, and certainly should not require actually entering the module to get access to its internal side bar menu, that makes the modules too independent and less part of a cohesive system.

    Another thing that has come to my attention is that GITI is no longer modular. If you pull out certain modules, other modules stop working. They are more like organizational units of functional code. Education now has a dependency in Address Book, Address Book has a dependency on the Asset manager functionality, nothing is separate anymore. The lack of separation makes GITI more usable in my opinion, but it also makes it less versatile. There is no common API yet, just a bunch of code held together by a string (literally, a string variable, called cmd).

    So much stuff is hidden because it isn’t in a menu and isn’t in a user friendly location. There are functions in GITI that even I forgot were there.

  • Instructors Are Annoying

    ok, the title sounds bad, but it really is not about my instructors, its about my instructor objects. Today I have been working on moving some things around and creating a bond between the AddressBook and Education modules. I want my instructors (present and future) to be registered with the AddressBook so that I can store a lot more information about them. The problem with this comes from the process for associating an instructor to a class and the handling of old instructors.

    The main issues are:

    • Allowing user to enter information, but avoiding duplication of instructors
    • Keeping Class.Instructor and the Instructor object consistent
    • Promote data insertion at various points in the process without overwhelming user
    • Keeping my sanity while tracking all possible permutations of data manipulation

    I have a majority of my code written, but there is still a lot of things I need to consider to prevent data contamination.