This is one of those late night thoughts, so forgive it if it is stupid.
In terms of structure, and complexity, programming has moved forward significantly. We have many new and exciting control structures that (arguably) help us to tackle greater levels of complexity. While individuals may disagree about exactly which control structures (observers, callbacks, object oriented programming, functional programming, event based programming, whatever) actually advance us, I think most agree that the level of abstraction that a programmer can deal with has gone up from the level it was in the past, thanks in large part to these control structures.
However, in terms of relatedness, that is, interaction of a programmer to his program, very little has been done. By and large, it is still just entering text. I will expand.
There is the physical act of programming a machine. This is done by entering text, executing/compiling said text, and observing the result. This has been the same for quite some time.
However, programming is not just about entering text. It is also about setting up a rhythm such that you can work. Finding a flow, that is, being interested and alert enough to tackle the next problem. This is more difficult than it sounds. Writers find flow when they are relating to their characters, when the plot interest them, when the story is intiging. Programmers constantly have jump from one idea/module/structure/file to another. These context switches are interruptions, and make it difficult to find flow. If you could "relate" somehow to the next bit of work, you might have a easier time switching to it.
Because all I do to get my program to work is enter text, I relate to my program as text. But does this have to be the case? Is there some other way I could relate to my program? Perhaps we could anthropomorphize aspects of programming? Maybe individual modules of code could be "skinned" in some way such that they appear to be sick or healthy (depending on how many unit test they pass). Or maybe they appear confused when they aren't properly commented? Or walk around unbalanced when their code blocks don't align very well? How about bloated when a function gets too large?
I am aware that these ideas seem kind of stupid, and perhaps they are individually, but I think they point to the theme I am trying to get at. Simply stated, it is, "Can we make programmers care more about their programs if we present the program in such a way that programmers relate to them?" Currently programmers are forced to interact with pieces of text. If we could transform this text into something that could be more easily related to, anthropomorphize, or compete upon, then that would seem to be a good thing.
What your eyes physically view are only tiny little pinpricks of what you think you can see: your brain fills in a great deal of the detail. Similarly, you imagination can fill in a worlds of details, as long as it is given a few things to run with. If we could just give a few things to spark [interest/ a competitive streak/ a completionist desire] from the source code that we program, I think we could significantly increase the diligence and care that people put towards creating software.
Friday, May 20, 2011
Tuesday, May 17, 2011
A expandable editable list in Sproutcore
This is a continuation of yesterdays code.
Yesterday I built something that allowed one to have a list of items in a list wherein one and only one item could be expanded in said list. Today, I am going to expand and refine upon that idea. Specifically, I am building a list of items, where each item is a bit of editable text. Because each item is a bit of editable text, the vertical height can vary depending on how much text is entered.
Side Note: Sproutcore has the concept of a lazily loaded view container. This is very cool. It allows you to have a list of items that might contain hundreds of thousands of items, but only end up loading the ones you actually see. The catch is that each item needs to be equal in height, because the list calculates which views to display based upon the distance of the currently scrolled view area from the top. Because of this, the list being built today will not really work with lazy loading. This is because each view item in this list does not have a standard height. This really is not a issue if you are dealing with a small list of items, but it is something to keep in mind if you tried to use today's list with a huge list and using lazy loading.
What do we want?
A list, maybe 10 items or so, where each item in the list is a piece of text. Clicking on any item in the list will cause it to become editable. When editable, a item switches to a html textArea, and focus is placed in the textArea. This is a special textArea that resizes depending on how much text you put in it. Clicking outside of the editable item at any time causes it to switch from our textArea back into regular text. The size of the textArea should be roughly comparable to the size of the text when focus is removed. This allows people to gauge what their text will look like when they are done editing.
Work In Progress
Saturday, September 4, 2010
Effectiveness of mathematics
http://www.dartmouth.edu/~matc/MathDrama/reading/Wigner.html
I ran across the above essay a few days ago. I read for content the first time, and detail the second. At the bottom of the essay it basically concludes that all 4 explanations, even if they were allowed to combine their evidence, would still not be enough to explain the “unreasonable effectiveness” of mathematics.
I ran across the above essay a few days ago. I read for content the first time, and detail the second. At the bottom of the essay it basically concludes that all 4 explanations, even if they were allowed to combine their evidence, would still not be enough to explain the “unreasonable effectiveness” of mathematics.
I saw no mention anywhere in the article that one must be a mathematician (or even mathematically inclined) to guess a solution to the “unreasonable effectiveness” of mathematics. So my guess goes as such.
Mathematics is built up from a set of givens. These givens are not proven true or false beforehand, they are simply givens. Laws of mathematics are built up by combining these givens. The more observably correct laws that can be built up from any set of givens, the more likely it is that some (or even all) of the givens are true. If you are ever able to construct a law that is provably false, and you could prove that all the laws that this provably false law reference are correct, then you know that some given that “builds up” to one of these laws must be incorrect.
Mathematics, is different from other science in the sense that it is extremely extensible. The language can be extended by simply creating a new syntax, and extending a particular law/property/invariant without breaking any existing laws/properties/invariants. If the new extension “fits” within the set of existing laws, then does that make it true? Well no, but if the new extension does not break anyone else, then there is a higher possibility of it being true.
My guess is that mathematics is so unreasonably effective because it is so amazingly extendable. We simply create new mathematics every time we need mathematics to cover something new. New distributions for new types of probabilities, moving from scalars to vectors to tensors for physics, it just keeps getting added on. Mathematics is effective because mathematics is based on symbolic manipulation, which is extremely flexible.
The interesting thing to note is how rarely we hit contradiction. Perhaps this points to just how limited (and hopefully not missguided) humanities mathematical understanding is. Picture the set of givens as the root of a tree, and the laws as branches coming out of the root (it has not trunk). Some laws are built using other laws, without even directly referencing a given.
As invariants are added, the chance that another invariant will cause a contradiction to some existing invariant increases. The fact that we can still “easily” add new invariants to the tree seems to indicate that we are not even close the the “final” number of invariants.
So my guess is that mathematics is effective because it is based on symbolic manipulation, which is probably the most extensible thing humanity has ever invented, and because the “tree” of mathematics is very small, and adding new “leaves” to it is still very easy.
Mathematics is built up from a set of givens. These givens are not proven true or false beforehand, they are simply givens. Laws of mathematics are built up by combining these givens. The more observably correct laws that can be built up from any set of givens, the more likely it is that some (or even all) of the givens are true. If you are ever able to construct a law that is provably false, and you could prove that all the laws that this provably false law reference are correct, then you know that some given that “builds up” to one of these laws must be incorrect.
Mathematics, is different from other science in the sense that it is extremely extensible. The language can be extended by simply creating a new syntax, and extending a particular law/property/invariant without breaking any existing laws/properties/invariants. If the new extension “fits” within the set of existing laws, then does that make it true? Well no, but if the new extension does not break anyone else, then there is a higher possibility of it being true.
My guess is that mathematics is so unreasonably effective because it is so amazingly extendable. We simply create new mathematics every time we need mathematics to cover something new. New distributions for new types of probabilities, moving from scalars to vectors to tensors for physics, it just keeps getting added on. Mathematics is effective because mathematics is based on symbolic manipulation, which is extremely flexible.
The interesting thing to note is how rarely we hit contradiction. Perhaps this points to just how limited (and hopefully not missguided) humanities mathematical understanding is. Picture the set of givens as the root of a tree, and the laws as branches coming out of the root (it has not trunk). Some laws are built using other laws, without even directly referencing a given.
As invariants are added, the chance that another invariant will cause a contradiction to some existing invariant increases. The fact that we can still “easily” add new invariants to the tree seems to indicate that we are not even close the the “final” number of invariants.
So my guess is that mathematics is effective because it is based on symbolic manipulation, which is probably the most extensible thing humanity has ever invented, and because the “tree” of mathematics is very small, and adding new “leaves” to it is still very easy.
Tuesday, August 31, 2010
The Egg
I read the above short story a few years ago and liked it, I re-read it recently.
Do you ever find yourself hoping there is a God, an afterlife, all that stuff... but simulatenously hoping that it is a little different then established religion prescribes? Me too! Lets be clear, I am a romantic, and hope that there is a God. Rationally, I don’t really believe it, but I hope that it is true nonetheless.
Do you ever find yourself hoping there is a God, an afterlife, all that stuff... but simulatenously hoping that it is a little different then established religion prescribes? Me too! Lets be clear, I am a romantic, and hope that there is a God. Rationally, I don’t really believe it, but I hope that it is true nonetheless.
I have said that I am agnostic since I was 12 or so. When I was young, I had a friend who was quite religious. He disagreed with my break with faith (not that it was ever all that strong). I told him that if I died, and found myself burning on the floor of hell, I would cry tears of joy knowing that there was something “more” to all this. That there was a God, an afterlife, and (hopefully) a reason for everything. It is a wonderful idea. Unfortunately, I just have difficulty rationally accepting it.
I have thought about it quite a great deal, and one of my biggest breaks with the idea of God was understanding why he would allow suffering in this world. I needed to make up a reason that there could be a God AND suffering. I spent some time thinking about it. The only real solution I could dream up was that God is not in fact all knowing. Perhaps he never said he was, we just assumed. Once I groked this, I found the idea that God may not be all knowing to be a great relief. I am quite uncomfortable with the idea that God might actually be all knowing, and still choose to let humanity suffer in the fashion it does. If he did know everything, understood the ramifications of all his choices, had full comprehension of the breadths and depths of... well... everything. Well, I mean really, that would just kind of make him an ass in my book. What purpose does it serve to make us suffer, other than to pleasure him?
However, what if God is not all knowing? He may be very smart, and very knowledgeable, or whatever, but not COMPLETELY all knowing, then I suddenly get it. I understand why there is suffering. I believe he is doing the best he can, I believe in him because he is the best qualified to lead us. I know that he is not always right, but he does his best, and he is our best. That would be a comfort. That is a God I could really get behind, it would make sense to me. I made up this idea (I am sure others have as well) about how there could be a God and suffering more than a decade ago, it is my personal story for why things are as they are (other than the great void :] ).
Warning: Spoilers Below (Why don't you read the story first?)
Ok, so back to this story. I like this story because it is a completely different explanation of the ethical problems with a all knowing God allowing suffering. One that explores a possibility I had never even imagined. In this story, there is suffering in this world because God is not in charge of it, we are. We are “fetus” Gods that are going through the lessons in life necessary to become God in our own right. God is our father, all of humanity is the God child, life is the training necessary to become as wise as our father.
A new idea! In short story form! You can’t really ask for more. A new explanation about how a all knowing God would allow suffering. You do not run across that every day. Regardless of whether it is true or not, worth reading, worth remembering.
Saturday, August 28, 2010
The Hidden Fortress
Today I saw Akira Kurosawa's "The Hidden Fortress" at The Long Now center. I enjoyed it a great deal. It was the first time I had ever seen it, and I think it was neat that I first saw it on the big screen.
I have heard that the two comic characters in this movie were copied into the Star Wars series as C3PO and R2D2. I don't know if this is true one way or the other, but there were some strong similarities.
When watching a movie like this, you can't help but feel that it is a bit... hmm... conventional. I mean this in the best way possible. When watching a movie like this, you feel that a great deal of the plot elements are things that you have already seen in other movies. My question is, was this movie the first to use these elements? Was "The Hidden Fortress" a first in film? Perhaps it was only a "first" in popular film? When I watch something like this, I recognize that many things will seem derivative because they have become standards of modern cinema. What I want to know is which elements are original? Unfortunately, I would have to do actual research to determine that. Wouldn't it be nice if the film itself were able to answer those questions?
I don't really have anything intelligent to say about this movie. The most frustrating part to me was my curiosity about whether the elements of the film were first, or were already derivative by the time the film was made. I would really like something like hypertext for movies, where you could pause the film, and maybe there would be keywords relating to the scene you are watching, and you could filter through all films and find similar themes.... I don't know. Sounds like a lot of work. I just often find myself wishing that film was more social, interactive, dynamic. I often enjoy being simply passively entertained, but when something honestly interest me, it would be really neat if the film itself allowed me to explore my interest further.
I think there is probably a real market there. The user interest that isn't strong enough to look something up afterwards, but that might be strong enough to engage the person as they are watching the film. Obviously, I have not thought through this idea very clearly, but I nonetheless maintain that it is a untapped desire of the movie viewing public.
I have heard that the two comic characters in this movie were copied into the Star Wars series as C3PO and R2D2. I don't know if this is true one way or the other, but there were some strong similarities.
When watching a movie like this, you can't help but feel that it is a bit... hmm... conventional. I mean this in the best way possible. When watching a movie like this, you feel that a great deal of the plot elements are things that you have already seen in other movies. My question is, was this movie the first to use these elements? Was "The Hidden Fortress" a first in film? Perhaps it was only a "first" in popular film? When I watch something like this, I recognize that many things will seem derivative because they have become standards of modern cinema. What I want to know is which elements are original? Unfortunately, I would have to do actual research to determine that. Wouldn't it be nice if the film itself were able to answer those questions?
I don't really have anything intelligent to say about this movie. The most frustrating part to me was my curiosity about whether the elements of the film were first, or were already derivative by the time the film was made. I would really like something like hypertext for movies, where you could pause the film, and maybe there would be keywords relating to the scene you are watching, and you could filter through all films and find similar themes.... I don't know. Sounds like a lot of work. I just often find myself wishing that film was more social, interactive, dynamic. I often enjoy being simply passively entertained, but when something honestly interest me, it would be really neat if the film itself allowed me to explore my interest further.
I think there is probably a real market there. The user interest that isn't strong enough to look something up afterwards, but that might be strong enough to engage the person as they are watching the film. Obviously, I have not thought through this idea very clearly, but I nonetheless maintain that it is a untapped desire of the movie viewing public.
Monday, August 23, 2010
Pirahna 3D
I was torn on this movie. On one hand, it is a 3d movie. I see almost every 3d movie. I am kind of an idiot about it. It could be "paint drying.... in 3D!" and I might see it. On the other hand, it looked really stupid.
I debated for a few days about seeing it. I know there are movies out right now that are more deserving of my attention. I know the plot, characters, acting, dialogue, pacing... everything, will be pretty dumb. I know just thinking about seeing it makes me an imbecile. I know.
I saw it anyway. What can I say! I have never actually thought of film, in itself, as an elevated medium. I often go to movies with no expectation of seeing truth, beauty, art, or any other higher emotion. Call me a plebeian, but I often go to movies to see action, violence, big breast, bigger explosions, and humor. Occasionally, even romance.
This movie did not disappoint my lowered expectations. The dialogue was... well, it might have been better as a silent performance piece. plot = characters = acting = "none existent". The pacing was good, in the sense that things occurred in the correct order. But who cares, it was still fun.
Why was it fun?
Reason number 1. Boobs. There were a lot of them. At the beginning of the movie, the first pair of boobs we saw had pasties over them. Disappointment. Anger! I said to myself that if something did not happen fast, I was walking to another theater down the hall to re-watch Inception. A short while later, more boobs later occupied the screen. Relief. Later on there is a lesbian themed scene, where two girls make out underwater to classical music. It is funny, but I can't actually remember what the piece was, though I am certain I recognized it. At this point in the development of our movie, we get full frontal nudity, both head on and from the "bottom". Actually, it was pretty risky for a R rating. Did I mention that this nudity was underwater, AND IN 3D? Hell yes!
Reason number 2. It was 3d, this gives you something too watch on the screen while absolutely nothing in the way of a story progresses. Didn't really care about the rest of the movie too much. All I thought about the rest of the movie was the lesbian underwater scene. Really, this is just getting too awesome. I mean imagine, zero buoyancy breast, floating underwater, lesbian girls making out, in 3D! How do you top that?
Reason number 3. Oh, I guess there was one other cool part of the movie. The "proffessor" in the movie was Christopher Loyd of Back to the Future fame.
There were so many stupid things about this movie. I mean really, listing them is just a waste of both of our time. It is a fun movie if you have someone with you who does no take themselves too seriously. Someone who you can turn too and say "Man, that was a big explosion" or "Whoa, look at those breast" without needing to justify yourself. I would not recommend this for women, men with women, or even someone who has a unisex name. Still, if you can turn your brain off for 90 minutes, it is a fun enough midpoint to your day.
Sunday, August 22, 2010
DamageControl
Note: In order to install this ROM you must have unlocked your evo 4g!
DamageControl is a ROM alternative that gives you two things that I care about:
Android 2.2 - Read about it here
Wireless Tether - Allows you to use your phone as a portable wifi router.
It installs other neat apps, and also purportedly increases performance and battery life, but those aren't as important to me.
Installation was painless (if a little frightening).
Of course, after flashing you must re-do the whole "new phone" rigamaroll. Set your google account, set logins and passwords again, etc. This does not take that long honestly.
The guys who put this together are really awesome. If you like this, and enjoy having alternatives, you should drop them some loose change.
http://www.damagedroms.com/
http://code.google.com/p/damagecontrol/
DamageControl is a ROM alternative that gives you two things that I care about:
Android 2.2 - Read about it here
Wireless Tether - Allows you to use your phone as a portable wifi router.
It installs other neat apps, and also purportedly increases performance and battery life, but those aren't as important to me.
Installation was painless (if a little frightening).
- Boot into "recovery mode".
- Make a backup.
- Copy the backup to your computer for safety.
- Wipe your phone (not entirely clear why).
- Copy the DamageControl.zip file from your computer to your phone
- Flash your phone with the DamageControl.zip file.
I also liked how I could "quick mount" my phone onto my computer from recovery mode. In this way, I do not have to reboot the phone every time I want to copy files over. Convenient.
Of course, after flashing you must re-do the whole "new phone" rigamaroll. Set your google account, set logins and passwords again, etc. This does not take that long honestly.
The guys who put this together are really awesome. If you like this, and enjoy having alternatives, you should drop them some loose change.
http://www.damagedroms.com/
http://code.google.com/p/damagecontrol/
Subscribe to:
Posts (Atom)

