Wednesday, March 14, 2012

Spring break 5 - FINAL

Well today was the last day of my Spring Break binge on programming.  We had a group meeting today where I finished up the functional parts of the gui.  It doesn't look great but it works.  We can worry about how it looks after the demo.  All the parts that remain is pretty much the email section of the gui (Daniel Chee's realm) and that isn't something that was on my plate.  So really I'm set until I get back.  Hopefully it all goes well, and when I get back we're all having tea on the beach-side.

One of the issues we had to get over was for the Scheduling part of the program we're using a python version of cron that takes a dictionary and does its stuff.  Generating the dict was a bit tricky, but nothing I couldn't handle with some list comprehensions.  The issue though was how to get the dict into a string and back.  Now we could write a parser and all that stuff, but who wants to do that?  Well, Brian D came up with the idea of when you type the name of a dict variable in the interpreter it prints the dict out in a string.  If we could somehow get this string, could that be how we save it?  Well, we can't exactly just put the variable in the code and hope somehow it turns into a string.  Thinking about this I realized that using the str() method should do the same thing, because how else does the interpreter do it?  That worked.  Now all we had to do was convert the string back into a dict.  With our experience in 357, we were curious if there was an eval() method.  There is.  Turns out if "d" is a dict, then eval(str(d)) == d.  Sweet.  Done deal right there.

I think in these past 5 days I've solidified my role in the group as a valuable member.  Not only have I produced a lot of code that works great, (maybe not the best style, but I'm short on time) I also stayed in communication, helped others, and organized a meeting.  Now I get to go play video games for 3 days.

I feel like the last panel in this comic:

http://www.amazingsuperpowers.com/2011/04/high-pitched-noise/

Tuesday, March 13, 2012

Spring Break 4

4th Day of Spring Break and the gui is coming along nicely.  With Daniel adding his elements to the last tab of the ScanEvent Editor, that pretty much wraps it up for building the gui part.  Now all that is needed is taking the data from the gui and configuring the ScanEvent and vice versa.  This shouldn't be too bad.  I have tomorrow left before I go to Austin Texas for the rest of Spring break.  I want to get my group in as good of a position as I can, so that they can continue where I left off and when I get back the I expect the requirements for the demo the following week to be pretty much done.

I hate to say it, but me and Tkinter (the gui library we chose) are finally getting along.  Turns out the grid manager in that is a lot like the GridBag manager, so my experience with Java guis has translated over nicely.  The gui is pretty good so far, everything resizes appropriately and you can load/save/create ScanEvents.  Most of the gui elements don't configure to the loaded ScanEvent, but that is all I need to do really.  We really need to come up with a coloring scheme, and get some graphics for the gui.  Until then, I'll keep using our horrible defualts:

Ugly, but effective
It won't be hard to change the color scheme, I've set up a configuration file that all the gui widgets get the BG color, foreground color, and things like that from.  I might have to add more, but overall it will be an easy change.

Monday, March 12, 2012

Spring Break 3

Today was the first REAL day of programming.  I've been at it since 11am, and it is now 7:30pm.  I made the functional layout of the gui, and finished the launchpad (starting window).  I also put the effort into figuring out how to make the widgets resize.  You can also save/load a ScanEvent from a file using the built in file choosing windows.  I also had to use some lame internet code and fix it up to be a TabPane widget, like in Java.  Overall a very productive day.  Just for evidence in the future:

Suddenly, commits.

Chris seems to be working on the project at lot as well, I've been sending emails to the whole group, and only really heard from him:

I still get his email notices as to when he's not available....

Sunday, March 11, 2012

Spring break 2.

After submitting my evaluation and having lunch with some friends I got home pretty late. I did manage to get a class set up with getters/setters/docs and the ability to load and save instances of that class in a local directory.  It currently wont work, because some of the items it should save/load aren't defined.  I've informed those that should be responsible.  Until that is resolved, it is off to gui land for me tomorrow.  I think it might look weird to the other members of my group, in about 2 hours I've made more emails regarding actual content then probably the whole beginning of the semester.  In order to meet the deadlines made by Ackley, we gotta all turn on HERO programming mode.  I'm already started, and already waiting on the others.  Gui land should keep me busy though, even if definitions don't exist, I can still make widgets and controllers to get everything ready for when those items do exist.

Saturday, March 10, 2012

NOT RELATED TO 460 - But a good read anyways.

This topic isn't related to cs 460, but I wanted to share it anyways.

So I was playing a game of sc2 as usual, when a fellow started to be mean to me.  Well, this is the internet I get that all the time.  After the game was over, that person messaged me personally asking if I was retarded.  At this point I was curious.  Was he just being a dick for the sake of making me feel sad, or was he himself down?  So I decided to ask.  He said that he hates where he is from, and everything around him is failing (America).  Not wanting him to stay mad and walk away, I asked for specific examples.  He went on about the problems with politics and healthcare, and I listend patiently.  He said he was negative because of these issues, and doesn't see anything to be happy about.  I asked him if he had anything to be happy about, friends family job.  He said No.  So I started to relate to him, telling him about things that I've had to deal with recently.  My life hasn't been really hard or anything, but I have a good time seeing things from other people's points of view.  I told him about how I focused on what I wanted to change in my life:  quitting WoW and going to the Gym.  I've been much happier with myself since then.  Simple things that dragged me down.  I asked him if there were things he is happy about, and would like to change.  We talked a little longer, and I tried as hard as I could to provide the best advice I could.  He was surprised that I genuinely cared about him and appreciated it.  One of the major things I said was:  I don't want to be the best programmer ever, or be rich.  I want to try my best and to make the world better as I do it.

An interesting interaction with someone I'll probably never know.  I just hope that I've influenced them away from making bad decisions due to likely depression.  On top of that, I totally proved him wrong :)  I don't want to go about in life spreading negativity.  There is always too much of it.  I'd rather just look on the bright side.  I know that sounds lame, but it really does help in more ways than someone in a negative rut can see.

Spring break - 1

So in order to meet Ackley's request for the demo next time we meet, I have a lot of work ahead of me this spring break.  I don't have anything else really to do, except for LANFEST!!!!!  Anyways, I started today and made the custom gui widgets be able to load configurations from the config file.  I also started on the main gui panel structuring.  I had some difficulties with the layout, still getting used to that.  Also, in python if you have different modules that try to load files by relative paths it is much harder than I thought.  The current directory for each module is the same as the modules that the program entered in.  So if I have a module that handles IO to files in a local directory, then my path to that dir would be "./files" plain and simple.  If I use this module from a module in a different directory then it wouldn't work, because the directory the starting module is in doesn't have a "./files".  I was able to work around this by not using a relative path, but getting the path to the module the code is in via the symbol table.  It ended up taking me an hour to get this part.  It is a bit overly complicated, but now that I know how it should be really easy to duplicate in the future.

Thursday, March 8, 2012

Weekly update

Well, turns out I'm really bad at remembering to do things... such as post on a blog.  But anywho, this is an update for the whole week, because lets face it, I can't fake 3 good posts in a couple of days.  We plan on having a demo tomorrow that should be pretty cool, and show Dr. Ackley a lot about what the project will allow people to do in very little time.  As far as the demo is concerned, I won't be involved since it will be done through the command line and a different part of the gui.  This is good, because this week I haven't had any time to work on 460 stuff.  I've had 3 midterms and a group research project to work on.

I do have to say, as time goes on I find myself more and more happy that I'm in the group I am.  I could not stand being with some of the other students in the class, so not being with them is great.  Also, if I had been in Joe's group, I would be working many times harder on the project.  I kind of enjoy not having to worry about my project all the time.  On top of this, everyone in the group seems to be getting along really well, so all in all it just might turn out to be a good thing I ended up here.