Thursday, April 19, 2012

What it could have been.

These are my thoughts on Joe's group and the Table Top Studio.

On some levels I'm happy that I'm not in the group, and on most of the levels I'm pretty sad.

From what I'm constantly hearing they are working really hard on their project.  I doubt I could have put the same amount of work into it as Joe or Stephen.  If I did, I probably would have been miserable.  That being said, I think I could have done a million times better than what I've heard Stephen L has done.  Maybe, if I had been in the group the need for Joe and Stephen to work insane hours wouldn't have happened nearly as much.

What I really miss, is the opportunity to be apart of the group.  I'm really good friends with Joe and Jan, and I know Stephen from a few classes and I really think he is a guy I want to get to know.  I don't know Brady much, but we chat every now and then at work.  I think it would have been a really good group, that could achieve many things.

From the word about the amazing super progress they've made I can't believe how I could have done any better, but I'm sure I would have done great.  If Joe would make a start up, I'd join it instantly.  That guy is going somewhere, and I want to be along for the ride.  If TTS becomes big, I'm going to be so sad that I wasn't there when it started.  To think of the opportunities I've missed, I'm sad.

This summer I'm signing on to the team though, so I will be a part of it.  Sadly though, it will be after the feverish grind and I'll be coming into it without any idea of what is going on.  Should be fun though.

Frustration Levels Rising

Grrrrr

I did pretty much all of the programmatic things I needed to do Monday.  That day I also sent out an email with some questions/issues that needed to be resolved by other group members, such as:

  • What method do I call to do ___
  • I think this functionality should be in your module because ____
You get the idea.  I still haven't gotten a response yet from anyone.  Most of this stuff is pointed towards Chris, because its pretty much me and him that own the code.  Daniel has a bunch too, but the issues are usually between me and Chris.  I just can't ever get a reply from the guy in email.

My other task this week was to debug the apscheduler issues we were having.  The schedules the gui was generating weren't working for some reason.  I went over the syntax again and saw a minor change I could make, but other than that it seemed fine.  I wanted to test the save files then and required to start the daemon.  The daemon has been the white whale for Chris for the past few months.  He's always had problems with it and is always fighting it.  I don't know the details, but he seems pretty determined to get it to work.  Recently though he said it was pretty solid, and should work.  So I ran the cernentd module on the command line with no args just to see what it would do.  I got "start|stop|restart".  Makes sense.  I tried again with the argument start, and looking at our log file saw something about shutting down the thread pools. Odd...  I tried again with stop, and got a "Are you sure the daemon is running" sort of deal.  The log file also said the threadpool had been started.  Being thoroughly wierded out, I tried the last option restart.  This threw an exception.  So when our daemon control module starts it stops, when it stops it starts, and when it restarts it dies.  I checked to make sure I had the latest update, and I did.  So I sent Chris specifically an email detailing the encounter.  I have yet to hear from him, and this was Wednesday.  I feel really bad for not working on the project much, but I keep hitting these barriers waiting for simple things from other people that are just ignored.

I think Chris bit off more than he could chew.  He's doing pretty much the whole back-end, which deals with managing the daemon, reports, and all the command line stuff as well as the reporting framework.  Last I talked to him he said he was going to reword the reporting framework to get rid of some hardcodings and such.  I haven't seen his code, but from what I hear going on he hacked it up for demo purposes and now we're dealing with the consequences.  I wouldn't mind helping, but it would mean he would have to stop ignoring me first.  I'm sure he's not doing it on purpose, he's just too bogged down to pay any attention.  I don't think this has anything to do with alfonso, I think that if we would have egged him on to do more things, we'd have multiple areas that we would be having problems with.

Brian_D is working on non code stuff.  It seems like he is being rather productive too.  That's good.  We came up with a pseudo marketing plan as well.  Just trying to get posts on I.T. related blogs and posting on the nessus forums about it.  I think that is all we should really do, this isn't a product with a large target audience.

I don't know what Daniel is up to, but I'm sure hes busy with something.  From what I've known from him he is always taking really hard classes, so I can understand if he's booked.

Alfonso is probably doing nothing.

Monday, April 16, 2012

Starting Early

So this week I'm trying something different.  Instead of starting my goals on wednesday leaving two nights to finish them, I've started much earlier in the week.  I haven't had a problem yet, but for some reason I it just seemed easier to start now.  What I'm doing is just small gui stuff here and there, such as a status bar so when the gui loads stuff from the nessus server it will say that it is loading, instead of just pausing.  Also, if you try to select a server in the listbox, and for some reason the connection fails the listbox item turns red and the status text tells you that it can't connect.  Then I made some graphical changes to the launchpad again, its starting to look like it did when I first made it.  Odd.

What I still need to do is have the gui respond to validation checking.  This means when something is set, I ask the ScanEvent if it was actually valid and then reflect this in the gui.  Then I need to talk to Chris about the daemon controls.  Apparently something funny is happening when you try to start a daemon using the gui controls.  It seems like the current process dies and the daemon starts.  This means the gui will die if you start a daemon through it.  He said he wanted me to spawn a new process to start the daemon, but this sounds like something for the daemon controller to do.

Thursday, April 12, 2012

Prepare for code review!

Thats what I've been doing since I got home at like 3pm.  I went through all of my code, which is the majority in the project.  Since I own the majority, I felt the most pressured to do well tomorrow.  I'm usually proud of the quality of my code, but since I didn't know python well from the start I have some concern that something will be found.  For the most part I expect it to be, "oh you could have named this better".  If that is the worst of my fears, then I think I'll be fine.  Most of what I did today was commenting with the sphinx scheme, which is very close to javadoc.  I did the usual if its not private comment it scheme.  About 90% of my code is in private methods, since most of it is gui boilerplate.  So for the "private" methods, I prefixed them with "_" so I know.  This seems to be the standard in python.

The biggest area of concern for me was the ScanEventEditor.  It is probably the largest single module with about 850 lines of code.  Humongous, I know...  Anyways, my problem with that is python likes to have everything in a single module.  That combined with the small scope of the project I initially decided to keep the controller logic for the editor in the same file as the view stuff.  Terrible.  Well, think about it this way - If I was to make it more MVC modular, I'd put the controller logic in a different class than the view logic.  In python's way of doing things, this would mean I'd have 2 classes in the same module (file).  What would that really get me?  I'd still have to deal with it all in the same file.  The only difference would be at some point in the code I'd add a line "def class <name>".  Thats pretty much it.  What I did do to mitigate any negative feedback about this part is I organized the file layout better.  All the controller code is in the same place, labeled with what parts it controls.  All of the gui creation stuff is in a different part labeled as well.  This way it is almost identical to being in different classes, except I don't have to add inter class communications between them.  Win Win.

The last person I'd like to be tomorrow is Alfonso.  Maybe at some point ackley will get bored looking at gui boilerplate, and ask to see some of Alfonso's code.  Haha!  Good luck trying to find some.

I always think my code could be better.  We'll find out tomorrow if I'm the only one.

Wednesday, April 11, 2012

Finally

After being sick and having my computers crap out, I've gotten my laptop back up and running with the newest version of Ubuntu.  It took me a few hours to configure everything again for python devel, but now I'm in a better position before.  Finally being able to program in this environment and feeling better I went right back to programming.  I've completed 4/6 tasks (not including code cleanup) and I'm certain the last 2 won't take long.

One of the tasks I did today was regarding the Launchpad's looks.  The main argument was that Chris wanted a simpler version that didn't use my terrible microsoft paint graphis, and I wanted something more than just a few buttons.  Well, the deciding argument was won by Chris when we all agreed that neither of us are artistic, so we might as well just stick to what we can do, basic buttons.  Now the window is much smaller for the launchpad, and resizes to fit the other elements.  There are 4 buttons, edit/new/reports and daemon controls.  These are all tightly packed in the 150 x 150 window.

One of the things I worked on that I was not able to get working was the problem that if you resize the window below a certain point, the frames inside stop getting smaller.  This is expected, but you couldn't see the chopped off parts.  The big problem with this is you can't add scrollbars to frames in this gui library.  You can however add them to a "canvas", which at the time this first came up I didn't really understand.  My first approach was to just make a canvas, and put it between the window and the main frame.  Then add the scrollbars to that.  Running this everything showed up fine, but the scrollbars didn't act like anything was there.  I fiddled and googled around and found that canvas's don't init like the other widgets, and you have to call a update_idletasks method on the parent window in order for the sizing to work right.  This fixed it to the point to where the scrollbars knew what size things were, and how much scrolling could be done, but no scrolling actually happened when you moved them.  After searching some more, I didn't find anything that helped but it dawned on me that maybe the canvas was scrolling correctly, but the fact that the contents are all in Frames is the problem.  Since Frames don't scroll, then putting Frames into a canvas won't make them scroll.  I guess the whole deal is off then.  Maybe I can limit how small the window can be made?  That seems to be the only other valid option.

Tuesday, April 10, 2012

blaaaarggggg

is a sufficient term to describe how I've been feeling this week.  I recently went to Florida to visit family.  I didn't sleep the night before the flight in hopes of sleeping during the flight.  That didn't happen.  Then I had poor sleep both nights I was there, and my first night back here I woke up a few times to tango with the toilet.  I'm feeling better today, I still have a lingering cough.  The physical toll it took on my body is more than I excpected though.  I went to work/school for the first time this week, and after walking from the various parking lots to where I needed to go, I spent at least 10 minutes catching my breath.  After getting home in the afternoon, I took a nap.  I then had lunch, and took another nap.  I pulled myself out of bed finally a few hours later to get some homework done.  For the project, other than code cleanup there are a few improvements I've been tasked with.  All of them are pretty small, and I've gotten a few done today.  I fixed the padding in a tab, and redid how I set up the variables and frames for that tab as well.  This also goes with the code cleanliness.

I'm not really worried about the code review.  My code is pretty straight and simple, it pretty much just makes gui widgets.  The names are probably fine, but I'll look over that.  Other than that, there is no public, static, or final modifiers so stylistic things like that aren't going to be considered.  At most it will be the basics of programming:  naming, short succinct methods, modularity, and documentation.  I always incorporate these elements to what I do, except for documentation in this case.  Since I was new to python, I didn't know the standards of commenting (JavaDocs in Java for example) so I didn't do much commenting in the begginning.  Most of my methods are "private" but I guess I should explicitly say so.  A good amount of the "public" ones I have docs for, but I need to go back and make sure they are high quality.

Wednesday, April 4, 2012

Computer Problems Continued

Nothing has yet to improve relative to the situation of my computers.  I'm currently in the process of a full re-install of my laptop, and my desktop still misbehaves.  Luckily, most of the gui has been finished and all that really remains is making it look good.  I still haven't gotten much feedback about this, but the feature freeze is this week and we have all of next week to make it look better.  I sure hope my desktop starts working as it should, and I can get my laptop back up and running.  Otherwise I'm going to be SOL on the remainder of this project.