Thursday, March 29, 2012

Night before Gui Demo

I've dubbed it the Gui demo, because most of the requested items are Gui related.  There are background things that need to be implemented for the Gui stuff to work, and that is what I'm currently waiting on.  Unless I get feedback from my group members, I'm pretty much done with my part.  I'm at the point now with python/Tkinter that adding or changing things goes by really quickyl, due to my knowledge of how it all works and the methods I used to set up things before.  I have only programmed for 2 hours so far today, and I finished the last half of the items I needed for the demo.  I do have an idea on how to improve the Launchpad though, so I'll probably go and do that real quick.  Today I added these enhancements:

  • Completed change notification elements
  • Title bar tells you what file you're working with
  • Reporting manager lets you switch to other reports
  • Improved the New menu command
  • Fixed the layout of the Scheduling tab.

That's it so far.  I'm waiting on method to be implemented that I've created hooks for in my code, so all I'll have to do is call their stuff.

EDIT:

I did what I wanted to do with the launchpad.  It is the rest of the team's fault for letting me design it.  :)

The gui's scheme is gray, black, and white.
 I've asked them a few times for feedback on how to make the gui look better, but I didn't get any.  So I'm just going to do what I want.

For evidence reasons, this is the commit log of the past week:

Commit log of the past week

Wednesday, March 28, 2012

Gui Enhancement

Well the big ticked item for this weeks demo is just Gui enhancements.  It is best summed by this email sent to the group about what we should be doing:

Chris: Report Framework, Scheduler Check/reload, Daemon start/stop/restart, slides for Friday's presentation.

Daniel: Email Item Report selection

BrianK: GUI launchpad, Reporting pane, GUI Polish, Change Detection and Save option, daysBack slider 1-10 + inf, gui option to start/stop/restart daemon.
Reporting window needs (Ad-Hoc Reporting):
Browse button for .nessus file
List box with available report list
Text box for description
Text box for example output
Save-To box/browse button to choose where the report will be saved

BrianD: setuptools/distutils

Alfonso: setuptools/distutils

 I guess I know what I'm doing for the rest of the week.  I started yesterday, but I did the most of it today.  All I really have left is Gui Polish, and the rest of the Reporting Pane.  The Reporting pane will allow you to pick already created reports and push it through a reporting module to process it and save the output.  This way you can do the last half of what the Daemon does without setting up a ScanEvent.  The other things, including Save, Change Detection, Scans To Keep slider (1-10+inf), and the gui options to start/stop the Daemon were really simple and I did almost all of them in an hour.

As for GUI Polish, I'm pretty much screwed.  I'm not good at making GUI's look good, just making good GUIs.  I'll have to look to feedback from the rest of the group for that one.  As far as functionality goes I've added scrollbars and resizing stuff all around, but the GUI itself isn't aesthetically pleasing.  I don't really think there should be much done other than redoing the layout of the Scheduling tab, which is just a bunch of stuff thrown in without any concern whatsoever for looks.  The other tabs are pretty simple and well laid out.  Other than that all I can think of is some padding and changing of colors/borders.  All of these are pretty low on my list of things to do right now.

This awesome coding session brought to you by the awesome song:

http://www.youtube.com/watch?v=hmf34m42JyI

Heads up, this is best listened to loudly.

Tuesday, March 27, 2012

Editor Enhancements

So the big goal for me for the next demo is to add new features to the ScanEventEditor.  Well, not really new features, but common ones.  A "Save" menu item for one thing, and the ability for the editor to know when something has actually changed.  Ackley said it himself, that in order to determine this it is non-trivial if you didn't build the gui right.  Well, it took me all of 5 minutes to implement the "save" menu item, and it is starting to look like the "hasChanged" feature is going to be pretty easy.  I've already done most of the work.  One thing I really like about the gui library in python is for almost all of the input widgets you can set up special variables that when the input changes the variable changes.  You can also add a method that will be called when the variable changes.  So all I have to do is add a method for each one and check the current value with a previous one.  Done deal.  Some days I hate python (most of them) some I like it.

I know there were more features he wanted implemented, but I don't remember what they were.  I don't think the other ones were all too scary, the "hasChanged" feature was the hardest.  I asked my group for a list of things that he wanted changed (Brian D usually takes notes) but I haven't heard anything from them for the past few days.

Before we all left after the client meeting last Friday I told everyone that I would be not working on the project for the whole weekend, as I had 2 take home midterms and a bunch of other stuff to take care of.  Well, they decided to schedule a group programming session that I had no choice but to miss.  So much for trying to make meetings more.  I feel as one of the good programmers in the group I should be kept in the loop a little more.

Monday, March 26, 2012

After Big Demo

Well the big demo is over, and we met if not exceeded his expectations for that meeting.  I'm happy that we were able to do it, but it came down to the wire on a few things.  I think from here on out the project should be much easier than it was for the last few weeks.

I haven't done much in the past 3 days, I've been working on other classes including 2 take home midterms and another group project.  This week I need to get the gui in better working shape with some added features common to most guis.  This includes a save button (not just save as) and some things to track if a save is actually needed.  This will be the most challenging, but I already have a plan of attack on this.

Thursday, March 22, 2012

Before Demo

Well, I'm sitting here at 8:40pm waiting on responses from pretty much everyone on the team about the status of the demo we need to get working tonight.  I've upheld my part of the bargain.  The Gui can fully configure a ScanEvent and save/load it back up.  I don't know how the rest of the system is going though.  I've asked the group multiple times, but I've only heard from Daniel Chee.  He helped me on the gui a lot.   I think this lack of communication is going to really hurt us in the long run.  Chris is supposed to make sure it is working before tomorrow, but I haven't heard from him all day.  On a scale from 1 to worried, I'm worried.

Before the Big Deadline

Well, I came back from Spring Break a little late, I missed all classes/meetings on monday.  We (UNM SC2 Team) were driving back from texas and we arrive home at about 5-6pm.  Next time I talked to my group, it seemed like not much had occurred while I was gone.  I was hoping that the project would be mostly done, in terms of what is asked of us but it does not seem like it is the case.  The demo is supposed to happen tomorrow, and I don't really know what needs to be finished up.  Before I left it seemed like I just had to tighten up some stuff about configuring to a ScanEvent and back in the Editor.  I talked to everyone yesterday and it still seems to be the case.  I'm not too confident though.  I'd feel better if I was doing everything, but I know I can't.  I'm going to try and keep in communication with everyone, so I can help out if needed in a heartbeat.

To make the tension worse, I was in the middle of a system update with my laptop - which I use for development - when the file system went into read only mode.  The only thing I can really do is restart it from there.  This usually isn't a problem, but it didn't finish configuring the update, so when I went to restart it goes through the BIOS, but then immediatly shuts off again.  This started last night, but I just got it back up and running by updating the OS.  I kept all of my files, so I should be good to go again.  Surely didn't help the tension with the deadline tomorrow.

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.