Saturday, November 29, 2008

Python Graphs ---- GO!

Martin, you sly dog.

The idea was thus: build a graphical graph-building application. You can make nodes and make connections between them and drag them around to check planarity and stuff. Maybe even read values in them or something. In Turing.

I challenged him to make it in Python and use the experience to learn Python. I know Python to the extents that I can read it and if you asked me to write something I could bumble around for a while and produce it - ie. I don't know it very well at all.

So now I have accepted my challenge to Martin, and am creating the program. It's one I've wanted to make for a while, but I was thinking I'd dive back into my C graph implementations. Why not just make a new graph library though, eh?

So let's plan this crap out. (Warning: Now entering intensely rambly incomprehensible mode ... project planning)

Situation: I'm learning Python with the intent of developing a user-interactive graphical application that presents and manipulates representations of graphs.

  • I don't know Python that well.
  • I don't know how to do graphics in Python.
  • (Same vein) I don't know how to do window-level UI with Python.
  • I don't have a Graph Library for Python.
  • I don't have a List library for python.
  • 99 Bricks (a joke)
  • Learn Python better (I can do this along the way)
  • Learn about pygame (gives me graphics+window-level UI)
  • Build a linked list adt.
  • Build a Graph adt.
Refactored/ordered Tasks:
  1. Build a Linked List ADT using Python.
  2. Follow some tutorials and make some simple pygame apps.
  3. Build a Graph ADT using Python.
  4. Make the UI I want, sans graph stuffs.
  5. Plug the graph stuffs into the UI.
Cool. Next up: Subtasks!

Build a Linked List ADT using Python:
  1. Write out an ADT spec (can be simple and concise, just make one).
  2. Read some stuff on classes/object creation/destruction in Python.
  3. Read some more in-depth stuff about python's Pass-by-X system. (I don't know if it uses pass by value or pass by reference, .. and I don't have an immediate appreciation of what the differences are going to mean to me. If I thought about it, I'd get there, but I'm restricting that thought because I need to research this anyway, and keep on task. And be longwinded.)
  4. Write a simple sample class and then test it out.
  5. Write a LinkedList type according to my spec or simplified.
  6. Debug.
  7. Much Rejoicing

Okay! That's a good enough start for now. I'll come back and post.append() later on once I've done all this. I'll post up my ADT and any relevant stuff.

Thursday, November 20, 2008

Systems of Government

Tuesday, November 11, 2008


Saturday, November 8, 2008

Step 4: Ideas & Decisions

Unfortunately, now that I actually stand in the intersection of free time, available tools, and preparedness, I'm finding every excuse to stall... But I'll manage to press forward. This is all about momentum. I just have to start in order to continue.

So I think it'd be reasonable for me to outline what size/style of project I'm thinking about here. I would like to start off smaller, so that I have a higher probability of actually finishing, but this shouldn't be so small that it's just "Write a tiny easy program in a language I know". A project can be anything though. Just start writing them and delete them if they look stupid.

- Check out & compile a linux kernel
- Make a barebones app with Qt
- Make a barebones app with GTK+
- Do something cool with Python. Maybe a web browser? Something grapical
- Check out & compile some sort of OSS software - something interesting and big. Read the code and play with it.
- Get my graph/tree/table/list code imported into SVN and in good working order
- Get openGL and play with it - make a tetrahedron that rotates in 3 dimensions on keypresses in fullscreen - then make some 3D terrain - then make a person move around on it. Then make a game!
- Improve graph ADT by adding things like A* search and perfecting my minimum spanning tree stuff, etc
- Do something cool with Ruby. Something graphical, or something databasey?
- Write that database app, in C, or in Java, or anything
- Play with mySQL. Learn Databases, damn it!
- Write a simulation
- Download & play with a physics engine. First assignment of 3750.
- Play with graphics in Java. Produce a smallish 2D game.
- Ruby on Rails. Get it and see what it's like.
- Play with FTP/SFTP/Telnet by hand a bunch and know the commands
- Learn Regular Expressions, maybe alongside some Perl?
- Continue to mark down RFCs of interest, then Read a bunch of RFCs
- Find out some useful newsgroups/mailing lists, join up. Be active. Get involved.
- Write an actual short story, with a beginning, middle, and end. Or at least (because it doesn't necessarily need a beginning/middle/end) make it complete.
- Write some sort of sound producing program.
- Learn awk/grep magic
- DirectX. Play with that, too.
- Get some sniffing/packet software, maybe libpcap and write a sniffer. Do some kickass security stuff.

Okay, that's a pretty good first list. Now I've just got to choose some particular thing to do.

----------------- Commence thinking! (skip past it if you don't like rambling text)

Okay, the ones that stand at the top (for doing today) are:

- Check out & compile some sort of OSS software - something interesting and big. Read the code and play with it.
- Continue to mark down RFCs of interest, then Read a bunch of RFCs
- Find out some useful newsgroups/mailing lists, join up. Be active. Get involved.
- Play with mySQL. Learn Databases, damn it!
- Get my graph/tree/table/list code imported into SVN and in good working order
- Get openGL and play with it - make a tetrahedron that rotates in 3 dimensions on keypresses in fullscreen - then make some 3D terrain - then make a person move around on it. Then make a game!

That's unfortunately like half the list. The best course now would be to expand on each idea and see which ones just start flowing.

- Check out & compile some sort of OSS software - something interesting and big. Read the code and play with it.

What would I get? Chromium, valgrind, gcc, firefox, pidgin, vlc, vim, the linux kernel, gnome

- Continue to mark down RFCs of interest, then Read a bunch of RFCs

I think I should do this in my odd spare time, like at night or when I get tired of coding - better than take this as a project that blocks other things from being done.

- Find out some useful newsgroups/mailing lists, join up. Be active. Get involved.

I think this should largely be integrated into the OSS thing. Step one would be find a mail/news reader/aggregator, step 2 would be finding the lists for certain projects, step 3 would be aiming it and step 4 would be reading, reading reading, then sign out one that I feel like I understand a bit

- Play with mySQL. Learn Databases, damn it!

This could be really quick and easy to do. Key issue is that I don't really have anything I want to do, or know enough that I could craft a reasonable sample-task. Requires some research on DBs

- Get my graph/tree/table/list code imported into SVN and in good working order

A bit daunting, a bit annoying, but also really inspiring. I want to know SVN better (OSS stuff would help me with this too) and I really want to play with my graph/list stuff, but even moreso I want that stuff to be good and done properly. Issue is that I don't know where the most up to date stuff is stored, and I worry that I may not even have it >_< - definitely needs to be done at some point

- Get openGL and play with it - make a tetrahedron that rotates in 3 dimensions on keypresses in fullscreen - then make some 3D terrain - then make a person move around on it. Then make a game!

This is a biggie. But it's really, REALLY exciting and cool. I think I should have a lot of time available for this one even with the infrastructure. .. hm. Definitely a fair bit of research needs to go into this as well.

Okay, so after expanding them out, I've found:

I will do RFCs no matter what. I'll do them at night regardless of whatever else is going on.
Looking up some OSS projects / their newsgroups and installing some newsgroup software takes me several steps in several directions. I think it points at an SVN checkout/compile of an OSS project being the best first move. So, I think that's where I'll go with this.

-------------------- Thinking done! Action time!


Find out some good newsreaders/how rogers 'does' Usenet access. Maybe sign up through a professional thing.
Go check out some OSS projects' contact info and see how best to communicate with them, where their lists/groups are, etc.
Hook into the parties' groups, read read read read
Whoever is most understandable/cool/interesting/nice, check out their software.
Play with it! Compile it! ... Patch it?

Awesome. Onto Step 5: Execute.

Thursday, November 6, 2008

Steps 0-3


I'm a verbose guy. I like to use a lot of words and to speak in stories that go on and on and on. I know the value of being concise, and I love being concise, but when I write for writing's sake, I often simply let it flow. I hope to present two versions of whatever this is: my version, which will be lengthy and meaty and get things across really well but take forever to read and write; and your version, which will be shorter, better organized, and may somehow miss some sort of crucial step.

Regardless, I'm going to do my way first then cut things down. You're less important than I am in my world, that's just the way the blocks fall.

Given my plan and goal, I'm thinking about my first steps. I'll plot a little path of what I've done so far, and what I plan on doing now and next - this is in the spirit of documenting everything.

The Meta Steps

Step Zero: Prioritize.

Many times in my life, I've sat down (or lay down, or stood somewhere, or swam or something, take your pick) and thought for quite a while on what I want to do in life, how I want to do it, why I want to do it, and all that sort of stupid crap.

My answers almost always change - spy, physicist, video game designer, physicist, video game designer, author, physicist, computer scientist, spy, author - but these are really just surface thoughts. I've been looking for a long time for a concise set of rules (a la Asimov on robots) that sum up my priorities in life. Recently, for the first time, I settled on some. I don't know how it took so long for them to materialize (especially given their simplicity), but they finally have and I'm glad for it. I'll likely write a better explanation of them someday, but for the moment I'm just going to record them:

First, I shall search for my legacy, provided it does not hinder my search for Freedom, which takes precedence.
Second, I shall search for Freedom, provided it does not hinder my search for love, which again takes precedence.
Third, I shall allow love to find me. When it does, it shall override all else, aside from concrete and unbreakable commitments.

The specific notion of Freedom here is intended to mean: Freedom to associate with whomever I like, and to think, act, feel, come and go, and ultimately do as I like. Freedom in this sense (particularly the last two qualifiers) require that I have a certain degree of Power; that being Power over others, through money or some other means. I will go into it in depth at some later point, but suffice to say, I've settled for the moment on what may be naive or foolish, but are satisfyingly concise and complete priorities.

I would advise anyone who wants to be productive, happy, and fulfilled to do the same. From the moment I settled on these things, I have felt a wondrous sense of purpose. It is allowing me to live better, by placebo or some other effect, and I am grateful.

Along with this prioritization, I realized I do indeed enjoy writing and desire greatly to be a writer. That's something I feel you can do about other things and while you do them, which is a large part of why I am documenting this process. Allows me to output my verbal diarrhea into (haha) digestible form.

Anyway, time for Step Zero Point Five.

Step Zero Point Five: Decide to actually do stuff, and, Actually do stuff

Priorities are great, but until you start _acting_, they don't really mean squat. There are always excuses and reasons to put off working on your dreams, but you need to find excuses and reasons to go get started _right now_.

My excuse is that I had toe surgery this afternoon. It's left me bedridden for Thursday and Friday, which means I have from now (Thursday at 3 AM) until Sunday night to get started making my foundation. Once that foundation is there, once the process of storing and working on ideas exists, I'll be able to go back to my hectic day to day and incrementally tick away at my dreams until I again have more time to invest.

So find your excuse - if it's just a weekend or a sick day or a snowstorm or if you really don't have things you need to do, just prioritize and start acting.

A lot of people feel like acting means taking big noticeable steps - and I fear that might lead you away from planning.

Planning may not be for everyone, but I really feel that a good plan is the only sure way to see a task to its end. If you have a bit of a roadmap from point A to point B, you will have a much easier time getting there than if you simply declare your intended destination and begin walking. Your map doesn't even have to be correct; the map just has to exist. This is a lot like grocery shopping. If you make a list and then show up, buy the contents of the list and leave, you can shop in a timely manner and not waste money. You can always come back if you realize you missed something. On the other hand if you just go into the grocery store because you know you need food, you could spend 2-3 hours and come out with things you don't need or even really want, but purchased on impulse. Worse yet, you may forget a large number of necessities and have to return anyway.

So the message is: (god I take a long time to say simple things) No matter how busy you are, find time to start doing things.

Even if you only make a plan, that is at least something to follow later. The important part is beginning, because that's the first step toward finishing.

Actual Steps:

Step One: Make a folder (or organizational unit familiar to one's self)

When I want to do something, or think of an idea, or make a plan, I often jump into my bare bones text editor and just start typing. This is a good habit, and I highly recommend you do the same. Some of the nice things about this are the quickness and lack of distraction (ie. no ability to mess with fonts, not much going on with margins, spacing, anything crazy like that. Just you and your text), and the ability to start throwing #'s or /**/'s in, name your file .sh or .c or something, and have it be compilable.

Some of the downsides are the lack of organization this leads to - I am a man with a folder called "Text" - and it is several gigabytes of unorganised small text files I've accrued over time. This is a problem. Perhaps I should write a program to fix it? Now would be when I post in my idea blog, once it's created - I digress. (Added later: I put that in the idea blog)

The best way I presently know to organize something is to put it into a folder structure and use a sort of naming convention.

So that's what I'm doing here. I named the inital plan "One", because it's my starting point, and I saved it in a new nearly top level folder in My Documents (yes, Windows at the moment. Eck) named "Awesome", because this idea/its execution will hopefully be so. This text will be saved as Two and so on, until I can think of a better convention or am done. I will be placing these texts into subversion soon as well, so that I may have a history of revisions of this project.

The over-riding message of this step is to maintain a level of organization. It is a tight-rope walk between being a cumbersome hindrance, and not even being worth your time, but try to find a scheme that works for you. Such a scheme should allow you to come back and ask "what the hell was I thinking?", then to respond, "Oh, right." It's a nice feeling, when that happens.

Step Two: Document Incessantly!

I began writing before doing anything other than coming up with the idea to do this. This should be a reproducible experience, and I want to be able to have information about every step of the process. This means writing a lot, writing often, and saving everything. I could have just written down 2-3 things to do and gone to do them, but I would likely have gotten lost somewhere along the way, forgotten my purpose, and gone to sleep. Now I have a project started, and I cannot wait to continue. Writing allows ideas to take form, and the expression of those ideas allows you to improve upon and better understand them before you actually need to start dealing with them.

It's a good idea even if you suck at writing. It will make you a better writer. A good process is to write approximately a page, then go back and do a quick edit over your work. One of the best editing methods I am aware of is reading somewhat aloud. Your writing should be easy to say with a normal meter as if in a conversation. If you get tripped up a lot or can't figure out the right pacing on how to say a sentence, then it is likely too complicated or has an error in it.

Step Three: This is where the work begins. Blogfinding!

I want to open up a blog or two. I was inspired by this guy: who, on that personal blog, has a link to a different blog he runs, First off, that's a cool blog as it is. I regularly get kickass ideas in my dreams and that's an awesome way to collect them. Second, having very purposeful blogs is a good idea in its own right. It sort of matches up with the Unix philosophy of many small, specialized components optimized and designed to work together, and be very good at one thing each. A person could have a dozen places to keep very specific things, and that is where I'm going with this. I plan to put up a blog called "Awesome" or something to that effect, where I'll post these notes and my progress in this project, then also a blog called "Todo" where I can post todo lists and modify them when things pop up, and finally a blog called "Ideas", that's not just going to be ideas from dreams but any time I have a decent idea I'll pop the blog open and toss it in there. These will not be primarily kept on my home server because my home
server is dubiously stable at best - and these are resources whose existence I want to rely on.

None of them are necessarily that original, but originality isn't what I'm aiming for. I'm aiming for function.

So now I've got to go set up these blogs. My plan is to find out what technologies are offered for free blogs, what people think of them, and then to rapidly (ie low setup time) open each of them.

Step Three A: The Search.

I'll compile a list of blogging technologies first. Using Firefox I'll go to google, and type in "blog providers".

Some results were:

Step Three B: Results

The gist is:

Blogger, WordPress, TypePad, LiveJournal, or a Yahoo/AOL/MSN sponsored variant. The general opinion seemed to be that Blogger and WordPress are the best. Reasons for each seemed variable. Blogger is owned by Google, which can be a Good Thing or a Bad Thing, but I'm not really taking a stance there. I'm pretty sure I already have a Blogger account, so I may just head back there to minimize signup/setup time.

Step Three C: Rapid Deployment (haha)

Almost 20 hours have passed. I spent most of that time asleep and working on things for SOCIS. However, I have set up 4 blogs under Blogger, and I am about to post this collection of text as a new post. Good progress. Maybe not so rapid. Also, it turned out I didn't want to use my old Blogger account, so I made a new one. It's very easy - if you have a gmail account then you essentially just log in and choose a layout, and you're there.

Looks like I'm almost ready for Step 4: Decide what to do.

Just a quick recap with maybe a slight look forward:

0. Prioritize.
0.5 Actually do things
1. Organize First
2. Document During
3. Set up infrastructure, invest time and thought
4. Sketch some goals out, choose one, draft plan to get there
5. Execute on plan (while documenting)
6. Reflect on success/failure.
7. Goto 4. Repeat until satisfied with life.
8. ????
9. Profit!

Yeah, that sounds good. Onto Step 4, baby!

Situation, Goal, Plan: A Good Start


I am a second year Computer Science student with a bit of time on my hands and a desire to be productive.


Use/installation of Linux OS and Windows XP
Use of C/C++(sans STL) and Java programming languages
Use of SVN

Okay, that's a start.


Develop something cool. Learn a lot. Create the tools and develop the processes necessary to continue developing cool things.


Create a blog called Todo. Create a blog called Ideas. Write out 5-6 detailed schemes of things I would really like to do, then analyse them to figure out what would teach me the most/be doable first. Choose it, do it. Document everything along the way.


*knowledge: These are not the only things I know, but they are the sole things I know reasonably well that I can use to be productive.

An early explanation

I recently decided that I would like to do things.

In the spirit of my decision, I am doing something. Here.

It may be worthwhile, it may be longstanding. It may be flighty and pointless and equivalent to a tribute to whimsy. Only time will tell. Fortunately, time is something that (at the moment) I have got, and I am choosing to invest it here. May it pay off well! Please come along for the ride if you wish, but I make no promises.