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/
No comments:
Post a Comment