Sunday, December 20, 2009

Done?

Well, the virtual keyboard is looking fairly complete. I changed the display to a text field, so now you can copy-paste in, type in, etc, but still enter stuff with the virtual keyboard. I made this only as a learning project, and not something actually to code, so I don't figure I have to update it much. In addition to adding the text-view field, I also realised that I can use the same variable name to declare multiple buttons. This let me obsolete my text-creator and much tidy up the code.

The code can be found the same place as before, http//students.gctaa.net/~dreich/projects/virtual_keyboard/, under 2.0. Btw, if you can think of any interesting-to-program key to put where I had backspace (I couldn't get backspace to integrate with the new method of storing text. Well, I probably would be able to, but it did not seem like it would be fun to figure out or work with.), that would be good. As-is, I'm going to start on redocnE-gui over winter break, I think.

Tuesday, December 15, 2009

text

Today I looked at the textview gtk widget. It seems to be a relevant and useful one to the virtual keyboard, redocnE, and many other things, and I seem to be at the point that I can kinda jump around the pygtk docs to the various widgets I need.

Reminded of redocnE, maybe I should try to have a useable alpha of it up with graphics sometime - maybe by when I start the NOVA thing? I would probably have to do some stuff over winter break then though, which I might do. I guess I'll see how it goes.

I was too much looking at the textview docs to write any new code today, but I will soon.

Monday, December 14, 2009

caps lock etc

I implemeted a caps-lock button today, along with a number-key row. I'm trying to think of some sort of special key to put in the last avalible space - any ideas?

Anyway, here's the code: http://students.gctaa.net/~dreich/projects/virtual_keyboard/ Hopefully that works.

Wednesday, December 9, 2009

continued work!


I worked a lot more on the virtual keyboard today, making a main button to display the text and adding a spacebar and backspace key (that uses the arrow widget). It works very nicely, but is hard to use - not that that was the point of making it. I left some space on the side, into which I'm planning to put a caps lock key.

Tuesday, December 8, 2009

virtual keyboard

I worked on a virtual keyboard today in class (only got to writing the entry now though), and I got to the point where I had a window with a 4-row table of 26 buttons. In order to declare the 26 buttons, rather than writing a 4-line thing 26 times with different letters once in each, I made a little script to do it, which worked well. It may have been faster to do it the boring way, but that would have been, well, boring. Anyway, I can't take a picture now, I'm at home, but I will later.

Monday, December 7, 2009

more pygtk

I looked at pygtk some more today, tables (which I understand, but havn't really tested my knowledge of yet) and details of buttons (which I think I get now, but I'm not sure, I'll look at it a bit more tommorow).

Wednesday, December 2, 2009

ubuntu up!

got ubuntu up, running, updated, and made useable - installed LXDE and geany. Didn't get to get any work done though, i'll get back seriously next week

Wednesday, November 18, 2009

implemented!

I got the fixing-up of the redocnE code done yesterday, but forgot to blog about it. What I basically did was, instead of having the bits of code from pycipher copy-pasted in, I just imported it as a module and wrote up the interface between it and ani_crypt. It's on the launchpad, under revision 8 of the devel branch. Today I worked more on figureing out how to return a value in pygtk, and while I didn't figure that out, I learned a lot more about how pygtk works. That code is at ellimistd.doesntexist.com/quit_test.py.

Thursday, November 12, 2009

PEP-8 and more redocnE

Over tuesday and today (no school on wednesday, I accordingly did no computer science) I read PEP-8, and found it somewhat useful, but don't think it'll make me change much. I also thought, inspired by learning about classes, of a new and far better way to have implemented the ciphers taken from pycipher - I'll work on that, should have it done by next tuesday (the origional implementation took twice as long) and then will get back to pygtk.

Monday, November 9, 2009

Tried to write my own thing.

I tried to write a thing, for adding to another application, that would make one of those "really quit?" windows pop up. here

I got the code so that it runs, without copy-pasting (although with a lot of looking back and forth between it and the other sample code), but I have no idea how to hook it up to, say, the hello-world program they made so that it actually does that. I tried a basic return True (or False) statement, but it didn't work. Anything I should do?

Also, it seems the pygtk website is down. I looked at the parts of the tut firefox has cached, but couldn't go further.

Finally, you havn't given me any comments at http://students.gctaa.net/~jelkner/feedback/dreich.html for a while, or on here. Is there another place I should be checking?

Wednesday, November 4, 2009

pygtk boxes and buttons

I looked at http://www.pygtk.org/pygtk2tutorial/sec-DetailsOfBoxes.html today. It seems to make sence, but the example they use is very confusing, in how it creates multiple different things. I'm kind of understanding it, but not very well. Tommorow I may try to write a program of my own with this, without copy pasting. I'd need to look at it a bit more first though, so that would take a while.

Monday, November 2, 2009

More PyGTK

I continued working my way through the pygtk tutorial, I'm understanding it a bit more now. I got to http://www.pygtk.org/pygtk2tutorial/sec-UpgradedHelloWorld.html in the tutorial, and messed around with that code a bit to make the buttons say different things, do different things, call different functions, etc.

Saturday, October 31, 2009

Quarter end summary + pygtk

Ok, the quarter's (almost) over and here's what I've done:

-Found out about this class, signed up for it, met Jeff, figured out how it works

-Decided to make my bookcode program into something a lot bigger; redocnE

-Worked on it a lot, incorperated a bunch of other ciphers, made the launchpad page (https://launchpad.net/redocne)

-Lots of bugfixing, particularly in user-generated ciphers (the hardest one to make that I had made myself)

-finished to a reasonable degree

-decided to learn pygtk

-learned object-oriented programming (as in, I know how to use it, but havn't actually put it into practice yet. I want to though, it seems like I could do some pretty neat stuff with it.)

-started on pygtk. This is mainly what I did the past few days (another thing I did - forget to post here), and I've been able to make windows pop up, and change what happens by changing variables in the sample code. I read about how it works, with 'callbacks' and 'events' and I'm fairly sure I'll have to reread it a few times before I really get it, but I will get it eventually.

Monday, October 26, 2009

educationalization of redocnE

I talked to Jeff, and started commenting ani_cli for use in teaching ciphers. Also, for some reason, blogger didn't actually post this, and I found it on wed. in 'drafts'. I've been going through the code and putting (more) comments in it, but I'm feeling fairly unenthusiastic about writing up a thing about how to use it. Yesterday I was at home, and forgot to update, but I was finishing learning object-oreinted. I know the syntax fairly well now, and just need to put in into practice. I'm thinking I'd just go onto learning pygtk tommorow, unless you really want me to write the thing about redocnE.

Oh, yeah, and I have a question - what's the accepted way of using capitals in variable names and so on? I don't use them at all, I perfer underscores. I've seen sample code with like VariableName, though , when I'd say variable_name or variablename.

Wednesday, October 21, 2009

finally done with redocnE!

I finally found and fixed the bug with user-generated stuff! Actually, the bug was in the random-cipher generator i wrote. I never actually fixed the bug per se, I really just rewrote the function i knew was having a problem (ani_cli.usermade_gencipher()) when I realized there was a much better way to do it. I was previously using a contrived method of dictionaries to show if a letter had been used. If you want to see the old code, it's probably in one of the old bzr revisions.

Anyway, tommorow (or monday, tommorow's a half-day so I'm not sure if we have class, and i know we won't on friday) I'll learn the syntax of object oriented programming, then start on pygtk.

Monday, October 19, 2009

Found what the bug does

I found that the bug in cipher generation creates improper ciphers - some characters don't have both plain and ciphertext versions. I don't know why yet, though. Anyway, the code is here: https://launchpad.net/redocne

Thursday, October 15, 2009

found and tried to fix another bug

.. yeah, the title. In trying to fix the bug i found yesterday, I found another one, tried to fix it, and am not sure if i suceeded or not quite yet.

Wednesday, October 14, 2009

Debugging

I added a function to randomly generate a cipher, which works fine, but in testing it I found an error in the usermade function. I know how to fix the bug, but I havn't done so yet.

Thursday, October 8, 2009

redocnE debugging

I worked on debugging redocnE, testing each code and fixing errors (I had messed up the shift on the ceasar cipher decryption).

Wednesday, October 7, 2009

looked at pyGTK

I looked at the pyGTK tutorial you referred me to. It does seem like I can understand it, I found a hello world code, ran it, and played with it a bit (I figured out how to make a window that doesn't go away when you press 'x'!) and I do kinda get it. The code is written object-oriented though, so I'll need to learn that first. I think I will look at the GASP tutorial still though, just incase I like it more.

Tuesday, October 6, 2009

Launchpad &c

Today I:
Talked to Jeff about redocnE and launchpad, and registered a launchpad account. I worked on redocnE a bit, having a problem with reversing dictionaries until google saved me. I also forgot the time, and forgot to write my entry in class.

Wednesday, September 30, 2009

work on redocnE

I've finished the code for redocnE, and now am debugging. Robbie is helping me out, and right now my biggest problem is with turning a (properly formatted) string into a dictionary. I'm trying to use exec() to get it, and have been getting a syntax error. I actually think that, while I'm interested at home, I may work on it a bit there. if so, results soon. I would upload the code now, but I can't figure out how to do that with blogger, so I'll only worry about then when I really have something to upload

--David

Monday, September 28, 2009

First Post! redocnE and compsci.

I'm starting computer science now, and my first project is redocnE - a simple cipher application, with multiple methods of encryption and decryption. Note that a large number of these methods I'm using the code for from a similar program, although one without any UI, pycipher. (http://agorf.gr/code/pycipher.html). I have emailed the creator of this program, telling him, and it is open source. Still, if this is objectionable to you, I'd be fine with switching to a new project, although I'd finish this myself. Ciphers I'm writing myself are a method of user-defined cipher, ANi_encrypt (a particularly bad character rearangement method I made a while ago, and am only including for backwards-compatability.) and a Bookcode. From pycipher, I'm taking Ceasar, Atbash, autokey, Vigenere, and Beaufort ciphers. This gives me a total of 9 encryption methods, and I'm taking care to use a very modular program structure that lets me add new ones easily. As of now, redocnE (the name is "Encoder" backwards) is nearly done, with only a bit of the user-defined cipher to do, and a lot of debugging.

Oh, If you're wondering about the ANI part of the program names and so on, It's Absolutely Nothing Inc., a company I came up with as a joke a few years ago and now credit basically anything I make with. Any modules called ani_????.py are modules I (or, maybe, a friend i've convinced to start learning python) made for a program, but designed to be useable for other ones.

For the future, I do have a few project ideas, although most would likely be beyond my ability now. I'm interested in pyGTK (which I may actually learn directly, without GASP, unless you think this would be far too hard), Object Oreinted programming, and networking (I have an idea for a p2p shared FTP server/client, but that would be hard to do.). I like the idea of learning pyGTK for GUIs and a few graphical apps, but I'm not interested in writing games much at all.

Anyway, one more thing, just kinda for me to brag about - yesterday I finally managed to get Linux (Linux Mint 7) working on my home computer, so I think I'll probably use the opportunity you're giving us to do some work at home and not come to class occasionally.