So, it's the beginning of the semester at my university, and, as a freshman, I have to take some pretty bs classes. One of these classes is called "University Experience". In UE, ~40% of my grade is divided more or less evenly amongst the following three items:
* showing up to class
* joining an organization
* emailing the instructor once a week
That's a fairly bs class, I pretty much already have 13% of my grade, just by joining orgs. However, that third item, emailing the instructor, is interesting. It can be of any length, however simply sending "Hi, checking in to get my points" won't work. The instructor never said anything about not being allowed to use a script to send email every week.
That got me thinking, I can use a python script to get that 13% of my grade. So I did.
Here's the script, edited to remove email addresses: script
There's code in it that allows me to send from more than one person. Why do I have that? Because, when I was talking to others about this, and mentioned that I was going to set up a script to send the email for me, they expressed desire for me to set one up for them as well.
As it stands, the code goes through a list of names and email addresses, then pulls up a text file which has an email written by them that will be sent once a week. After sending the email, it will wait a random interval between one minute and one hour. I do this so as to keep the fact that this is automated discrete. I also randomly choose from the list of names not yet sent from, so as to not have every week be in the exact same order.
All that was left to do was set up a crontab to call the script every saturday at 9 am or so. Which I haven't done yet, because I'll wait until friday to set that one up, I want at least 5 names in the list before I have it set up to be called.
Younata's Blog
C, Linux, BSD, Apple, and others.
Wednesday, August 18, 2010
Sunday, May 30, 2010
The web doesn't need embracing
This piece by Kroc Camen was posted on Hacker News earlier this morning. Here is my response.
The web does not need to be embraced. Camen's main point is that "the web" will not be embraced by Apple. The web he refers to is the type of internet where everything is accessed through a "web browser", or program used to view files sent over the hypertext transfer protocol, or, in most cases, files sent using the file transfer protocol. This is obviously not the web where I can create my own protocol if I so wished, or use one of many different protocols that have been published.
The web has, and will continue to be embraced by Apple. Maybe not through the use of a browser to view anything and everything, but certainly through various applications that access the web. Right now, if I so wanted to*, I could use Colloquy to chat over IRC with some friends, or I could use some instant messaging app to chat with my friends on our xmpp server.
Camen holds up two examples of current technologies that Apple can easily stifle. These technologies are:
1. Google's pNaCl (Portable Native Client).
2. W3C Device API's
Essentially, Google's technology enables me to play non-flash games on my browser. Incredibly innovative, I'm sure, however, this isn't of use. PNaCl revolves around the idea that you can have native speeds, without downloading the application. I'm sorry, but that's complete bullshit. The only time I've had close to native speeds on an application with the web between me and the host computer is when I'm telnetting into some other server from that host - even a simple text-based irc client such as irssi gives me noticeable lag.
This is not because I have a slow connection. This is all about the fact that it takes light a certain amount of time to move from one place to another. At the distances sometimes covered over the internet, this time is significant, even the human brain can sense 50 milliseconds in lag.
So, I'm sorry Google, but, until you figure out how to send information faster than the speed of light, you can't compete with native clients, unless you're an mmorpg, in which case what are you trying to label yourself as?
The second example Camen brings up is the W3C device APIs. This is a technology that gives control of something like a webcam or a microphone to the browser. Never mind the fact that the majority of internet video watched today is uploaded after having been through at least some amount of time in an editing program (or room). This technology is actually useful, but not something I'd see the average user using - definitely not something I'd want on my iphone*. The cases for this being on the iphone is edge-case at best, and should therefore be relinquished to a non-web browser application.
Therefore, while the W3C Device API technology is somewhat worthwhile, it is edge-case at best. Most video is uploaded not-live, after having spent some time in the editing room. The live video can be used through a third-party application.
Therefore, Camen's examples aren't worthwhile. His entire point is wrong. Centralizing the web around the browser is a Bad Thing. Apple is following the Unix Philosophy - it is far better to have several programs that do one thing well than to have one program that does multiple things mediocrely.
tl;dr:
I'm an Apple fanboy.
* I don't have an iphone or ipod touch, it was just an example.
The web does not need to be embraced. Camen's main point is that "the web" will not be embraced by Apple. The web he refers to is the type of internet where everything is accessed through a "web browser", or program used to view files sent over the hypertext transfer protocol, or, in most cases, files sent using the file transfer protocol. This is obviously not the web where I can create my own protocol if I so wished, or use one of many different protocols that have been published.
The web has, and will continue to be embraced by Apple. Maybe not through the use of a browser to view anything and everything, but certainly through various applications that access the web. Right now, if I so wanted to*, I could use Colloquy to chat over IRC with some friends, or I could use some instant messaging app to chat with my friends on our xmpp server.
Camen holds up two examples of current technologies that Apple can easily stifle. These technologies are:
1. Google's pNaCl (Portable Native Client).
2. W3C Device API's
Essentially, Google's technology enables me to play non-flash games on my browser. Incredibly innovative, I'm sure, however, this isn't of use. PNaCl revolves around the idea that you can have native speeds, without downloading the application. I'm sorry, but that's complete bullshit. The only time I've had close to native speeds on an application with the web between me and the host computer is when I'm telnetting into some other server from that host - even a simple text-based irc client such as irssi gives me noticeable lag.
This is not because I have a slow connection. This is all about the fact that it takes light a certain amount of time to move from one place to another. At the distances sometimes covered over the internet, this time is significant, even the human brain can sense 50 milliseconds in lag.
So, I'm sorry Google, but, until you figure out how to send information faster than the speed of light, you can't compete with native clients, unless you're an mmorpg, in which case what are you trying to label yourself as?
The second example Camen brings up is the W3C device APIs. This is a technology that gives control of something like a webcam or a microphone to the browser. Never mind the fact that the majority of internet video watched today is uploaded after having been through at least some amount of time in an editing program (or room). This technology is actually useful, but not something I'd see the average user using - definitely not something I'd want on my iphone*. The cases for this being on the iphone is edge-case at best, and should therefore be relinquished to a non-web browser application.
Therefore, while the W3C Device API technology is somewhat worthwhile, it is edge-case at best. Most video is uploaded not-live, after having spent some time in the editing room. The live video can be used through a third-party application.
Therefore, Camen's examples aren't worthwhile. His entire point is wrong. Centralizing the web around the browser is a Bad Thing. Apple is following the Unix Philosophy - it is far better to have several programs that do one thing well than to have one program that does multiple things mediocrely.
tl;dr:
I'm an Apple fanboy.
* I don't have an iphone or ipod touch, it was just an example.
Tuesday, May 25, 2010
On Leibniz's Philosophy
Note: The following is taken from an English paper I had to write, I think it's hilarious.
----------------------
Gottfried Wilhelm Leibniz, one of the inventors of calculus, was a genius. While Leibniz was a genius for his mathematical and scientific accomplishment. Leibniz, however, was an idiot for his philosophical beliefs.
Leibniz was famous for the idea of monads, and his philosophy of optimism. Monads are the fundamental unit of the metaphysical world. This means that they are basically atoms, only better. Monads have no mass at all, and the are completely and mutually independent from other monads. Meaning, it would be impossible to detect a monad interacting with another monad, because it couldn't possibly happen. Each monad has it's own program, so that it may know what to do at each moment. Because of this, each monad can act as it's own mini-universe. To further confuse people, monads need not be small. For example, God would be considered a monad, and therefore, the existance of this all powerful being can be inferred by the “harmony” in the other monads. Even in Leibniz's day, the idea of monads was considered eccentric.
Leibniz's idea of optimism is summarized by the idea of “the world must be the best possible, and the most balanced because it was created by an all powerful and all knowing God.” However, this entire argument is based on the idea that “God” created the world, and not logical conjecture based on overwhelming observable evidence. In fact, it is a known fact that a flying spaghetti monster created the world, everything that one sees and touches has, at one point or another, been touched by His Noodly Appendage. However, this is no all powerful and all knowing God, there are several flying spaghetti monsters, each communicating superluminally in order to create the appearance that logical conjecture based on overwhelming observable evidence is correct. Therefore, because these flying spaghetti monster are the true creators of the world, and not some all powerful and all knowing God, Leibniz was incorrect.
Gottfried Leibniz was famous for monadology, and optimism. He was wrong on both accounts.
----------------------
Gottfried Wilhelm Leibniz, one of the inventors of calculus, was a genius. While Leibniz was a genius for his mathematical and scientific accomplishment. Leibniz, however, was an idiot for his philosophical beliefs.
Leibniz was famous for the idea of monads, and his philosophy of optimism. Monads are the fundamental unit of the metaphysical world. This means that they are basically atoms, only better. Monads have no mass at all, and the are completely and mutually independent from other monads. Meaning, it would be impossible to detect a monad interacting with another monad, because it couldn't possibly happen. Each monad has it's own program, so that it may know what to do at each moment. Because of this, each monad can act as it's own mini-universe. To further confuse people, monads need not be small. For example, God would be considered a monad, and therefore, the existance of this all powerful being can be inferred by the “harmony” in the other monads. Even in Leibniz's day, the idea of monads was considered eccentric.
Leibniz's idea of optimism is summarized by the idea of “the world must be the best possible, and the most balanced because it was created by an all powerful and all knowing God.” However, this entire argument is based on the idea that “God” created the world, and not logical conjecture based on overwhelming observable evidence. In fact, it is a known fact that a flying spaghetti monster created the world, everything that one sees and touches has, at one point or another, been touched by His Noodly Appendage. However, this is no all powerful and all knowing God, there are several flying spaghetti monsters, each communicating superluminally in order to create the appearance that logical conjecture based on overwhelming observable evidence is correct. Therefore, because these flying spaghetti monster are the true creators of the world, and not some all powerful and all knowing God, Leibniz was incorrect.
Gottfried Leibniz was famous for monadology, and optimism. He was wrong on both accounts.
Wednesday, May 12, 2010
On Mafiabot.
Right now, if you were to search google for "younata", you would get one of two different results. The first has refers to me in eight of the ten front page results, the second directly refers to me in eight of the ten front page results, however, it indirectly refers to me in one result as well - namely, to a topic in an irc channel, where younata is an irc bot I wrote last summer to play the game mafia. (I am going to get so many links from people wanting help with the "Mafia Wars" game on facebook for writing this article...).
It is this irc bot that I am going to write about.
Younata, as I called it (I use the nick "You" whenever it's available, which is not that often), was an attempt to create a bot that could pass a turing test - at least in reference to the game mafia. What Younata proved, mostly, was that the channel we played in had become so very formulaic that it was possible to make a bot that could more or less pass the turing test - in theory. Younata has never worked as expected.
The most interesting point here is that, while several people ridiculed younata's instability, no one ever pointed out that Younata proved that the way we played mafia had become so stale that it was possible for a High School Junior* to write a python script to play mafia with us. Looking back, this is rather sad that no one realized what what I (and several others, though I was the one who initiated it) was doing meant in relation to the future of #mafia.
I also want to point out that I'm currently working on a rewrite of Younata, named Youtsuba. Youtsuba, however, will not have the mafia-module written until after I have learned enough computer science to be able to make a serious attempt at it. Until then, Youtsuba will just be a generic irc bot written completely in C. The difference between Youtsuba and Younata is that Youtsuba will be able to play with people who have no idea what a "mass claim" is.
Also, Lightning, the name I decided to give the drone, is not being worked on until I have money/parts to build a physical prototype, which will be sometime after I start college. Going to Florida Tech.
* Note that this was the summer between my junior and senior years of high school, I had no prior experience with most of the computer science topics I now know that I would need to have in order to succeed in writing younata.
It is this irc bot that I am going to write about.
Younata, as I called it (I use the nick "You" whenever it's available, which is not that often), was an attempt to create a bot that could pass a turing test - at least in reference to the game mafia. What Younata proved, mostly, was that the channel we played in had become so very formulaic that it was possible to make a bot that could more or less pass the turing test - in theory. Younata has never worked as expected.
The most interesting point here is that, while several people ridiculed younata's instability, no one ever pointed out that Younata proved that the way we played mafia had become so stale that it was possible for a High School Junior* to write a python script to play mafia with us. Looking back, this is rather sad that no one realized what what I (and several others, though I was the one who initiated it) was doing meant in relation to the future of #mafia.
I also want to point out that I'm currently working on a rewrite of Younata, named Youtsuba. Youtsuba, however, will not have the mafia-module written until after I have learned enough computer science to be able to make a serious attempt at it. Until then, Youtsuba will just be a generic irc bot written completely in C. The difference between Youtsuba and Younata is that Youtsuba will be able to play with people who have no idea what a "mass claim" is.
Also, Lightning, the name I decided to give the drone, is not being worked on until I have money/parts to build a physical prototype, which will be sometime after I start college. Going to Florida Tech.
* Note that this was the summer between my junior and senior years of high school, I had no prior experience with most of the computer science topics I now know that I would need to have in order to succeed in writing younata.
Friday, May 7, 2010
On High School Student Films
Note: This is also an article in an upcoming issue of my high school's paper, so it's addressed for that audience.
Many of us have had class projects where you have to make a video or perform a skit. There's always one person in the class whose group will always have a hilarious video. For example, the senior class has [NAME OMITTED]. However, while these videos are hilarious, they suck more than the average vacuum cleaner.
What gives me the right to say that your video sucks? Well I get payed to film events, such as weddings, plays, and performances. I earn a nice amount, and is how I'll be financing college for the next few years. You could say I'm good. In addition to doing event videography, I've also written several scripts, and directed a film. I'm a jack of all filmmaking trades. [NAME OMITTED], my editor, is more than slightly envious of me. However, how will this help you?
To make a good movie, you need four things: A good script, good actors, a good director and a good editor. If you want a great movie, then you need more, but that's beyond the scope of this article. Only four elements are needed because, if your cast and crew is small enough, then the director will have triple rolls – director of photography, audio guy, and director. Director of photography is just a fancy title for the cameraman, the guy in charge of making sure you have good shots. Most people think that the director of photography is most important job, second only to the director. However, most people are wrong. A movie is half visual and half auditory. The director of photography shares importance with the audio guy, the guy responsible for making sure actors and other sounds are heard, and are at good levels. It's not enjoyable when what looks like yelling sounds like whispers.
In terms of scripts, most students tend to do good enough. Good enough means that it's enough to ensure a good grade, but, would definitely not get a contract from any major filmmaking studio. However, what I've noticed from helping with multiple projects are that student scripts have no where near the level of detail required for a good outcome. The saying “90% of everything is planning” applies to filmmaking, and without a well thought out and detailed script – meaning thorough description of the scene, what the actors say, and how the actors say their lines. However, this does not mean to restrict actors and crew members from having some creative license. It's a fine line to balance between being too vague and being too controlling, and is very hard to do. All this means, however, is that, if it is done correct, your script will be so much better than most of the other crap students make.
Finally, editing. If 90% of filmmaking is the script, then 9% of filmmaking is editing. Yes, the actual shoot isn't that important. Shooting is just executing the plan. Editing is where the execution is fit to the vision of the script as best as possible. Editing is the most creative part of the art of filmmaking – writing the script is just creative writing. Being the most creative part of filmmaking means that it is not ok to just pull your favorite song from iTunes and put it in the film. It detracts from quality of the film immensely. Instead, learn to either put music that fits with the pace of the film, or fit the pace of the film to the music, or, forgo music altogether, and instead focus on having good sound effects. The third option is called “foley sound”. A major example of foley sound is a woman walking in stilettos. If I were to just film that scene “as-is”, and hope the sound I had captured was good enough, then there's a ton of swampland that I'm interested in buying. Instead, the foley-editor would have a microphone close up to a pair of stilettos, and make the familiar “clacking” sound that stilettos are famous for. While a seamingly large amount of work, it's not. For example, I've produced the sound of a toilet flushing by just filming a toilet being flushed. It's used in a blacked-out scene in my film, Ash, located at http://www.youtube.com/watch?v=xhfuBkgeNb4.
In conclusion, your video doesn't have to suck. Either get a good cameraman, or learn how to be a good cameraman, then just put in the extra time to make your video not suck. It's honestly not that hard to do.
Many of us have had class projects where you have to make a video or perform a skit. There's always one person in the class whose group will always have a hilarious video. For example, the senior class has [NAME OMITTED]. However, while these videos are hilarious, they suck more than the average vacuum cleaner.
What gives me the right to say that your video sucks? Well I get payed to film events, such as weddings, plays, and performances. I earn a nice amount, and is how I'll be financing college for the next few years. You could say I'm good. In addition to doing event videography, I've also written several scripts, and directed a film. I'm a jack of all filmmaking trades. [NAME OMITTED], my editor, is more than slightly envious of me. However, how will this help you?
To make a good movie, you need four things: A good script, good actors, a good director and a good editor. If you want a great movie, then you need more, but that's beyond the scope of this article. Only four elements are needed because, if your cast and crew is small enough, then the director will have triple rolls – director of photography, audio guy, and director. Director of photography is just a fancy title for the cameraman, the guy in charge of making sure you have good shots. Most people think that the director of photography is most important job, second only to the director. However, most people are wrong. A movie is half visual and half auditory. The director of photography shares importance with the audio guy, the guy responsible for making sure actors and other sounds are heard, and are at good levels. It's not enjoyable when what looks like yelling sounds like whispers.
In terms of scripts, most students tend to do good enough. Good enough means that it's enough to ensure a good grade, but, would definitely not get a contract from any major filmmaking studio. However, what I've noticed from helping with multiple projects are that student scripts have no where near the level of detail required for a good outcome. The saying “90% of everything is planning” applies to filmmaking, and without a well thought out and detailed script – meaning thorough description of the scene, what the actors say, and how the actors say their lines. However, this does not mean to restrict actors and crew members from having some creative license. It's a fine line to balance between being too vague and being too controlling, and is very hard to do. All this means, however, is that, if it is done correct, your script will be so much better than most of the other crap students make.
Finally, editing. If 90% of filmmaking is the script, then 9% of filmmaking is editing. Yes, the actual shoot isn't that important. Shooting is just executing the plan. Editing is where the execution is fit to the vision of the script as best as possible. Editing is the most creative part of the art of filmmaking – writing the script is just creative writing. Being the most creative part of filmmaking means that it is not ok to just pull your favorite song from iTunes and put it in the film. It detracts from quality of the film immensely. Instead, learn to either put music that fits with the pace of the film, or fit the pace of the film to the music, or, forgo music altogether, and instead focus on having good sound effects. The third option is called “foley sound”. A major example of foley sound is a woman walking in stilettos. If I were to just film that scene “as-is”, and hope the sound I had captured was good enough, then there's a ton of swampland that I'm interested in buying. Instead, the foley-editor would have a microphone close up to a pair of stilettos, and make the familiar “clacking” sound that stilettos are famous for. While a seamingly large amount of work, it's not. For example, I've produced the sound of a toilet flushing by just filming a toilet being flushed. It's used in a blacked-out scene in my film, Ash, located at http://www.youtube.com/watch?v=xhfuBkgeNb4.
In conclusion, your video doesn't have to suck. Either get a good cameraman, or learn how to be a good cameraman, then just put in the extra time to make your video not suck. It's honestly not that hard to do.
Wednesday, May 5, 2010
100 is the maximum you need to keep
For those of us who use rss readers, google reader is pretty much king. For me, that's not true. I have used google reader in the past, and left it for several reasons. The main reason I stopped using it was because I wanted a fast application that allowed me to store articles on my hard drive. I currently use newsbeuter as my feed reader, and it works wonderfully. Until I decided I wanted to remove a lot of feeds – about 3 or 4 months worth of hacker news feeds – a little bit under 4000 articles (it's a news aggregation site, what do you expect?).
It was at this point that I discovered that I could simply set a limit of about 100 articles per feed, and I'd be fine.
Looking at my other feeds, I noticed that my non-news aggregation feeds – the ones I actually read – were at about 20-30 articles each. Extrapolating to the future, whenever any of these feeds reaches 100 articles, I highly doubt I'd actually care enough about it to still want it stored in newsbeuter's sqlite database. Even if I did like an article enough to want to keep it, I can simply use newsbeuter's save command to save the article to a .txt file in ~/Articles.
So, while completely arbitrary, I find that keeping 100 articles works very well. Your mileage may vary, of course, but I don't expect it'll be below 100.
It was at this point that I discovered that I could simply set a limit of about 100 articles per feed, and I'd be fine.
Looking at my other feeds, I noticed that my non-news aggregation feeds – the ones I actually read – were at about 20-30 articles each. Extrapolating to the future, whenever any of these feeds reaches 100 articles, I highly doubt I'd actually care enough about it to still want it stored in newsbeuter's sqlite database. Even if I did like an article enough to want to keep it, I can simply use newsbeuter's save command to save the article to a .txt file in ~/Articles.
So, while completely arbitrary, I find that keeping 100 articles works very well. Your mileage may vary, of course, but I don't expect it'll be below 100.
Friday, April 16, 2010
On Apple's new developer ToS.
Of those of us who care about how Apple is saying "thou shalt not use any language other than C, C++, or Objective-C in the presence of the iPhone", most of the people complaining are the people who are DOING IT WRONG.
I'm sorry, but flash is retarded. Yes, there is a lot of content on the web that relies on flash, however, it is possible to surf the web without flash installed. For example, I do it all the time. If someone links me to a youtube video, there is a nice python script that'll download it for you, to watch on your own time, using a non-crap interface. If someone links me to a flash game that "I have to play", I tell them "no, I have better things to do with my time", because, honestly, there are about 3 original flash games out there, and all of them have iphone/ipod touch versions available. The remaining 90% of flash content on the web are ads, which means that not running flash gives better results than having ad-block.
Of the other languages out there, it is completely possible to set up a web page with, say, perl as a back-end that does everything your app would possibly need to do. It's a free way of programming on the iphone that enables you to bypass all of Apple's censorship.
Now, on the topic of "I don't care, it's the principle of the matter". If you honestly feel that way, then the iPhone is not the phone you want. Go get a Nexus One, it's open source, you can use whatever language you want - so long as it's java, and you won't have this problem.
Also, as Daring Fireball has already pointed out, the best iphone apps are written in C/C++/Objective-C. This is because they are native and not some crap cross-platform sdk.
I'm sorry, but flash is retarded. Yes, there is a lot of content on the web that relies on flash, however, it is possible to surf the web without flash installed. For example, I do it all the time. If someone links me to a youtube video, there is a nice python script that'll download it for you, to watch on your own time, using a non-crap interface. If someone links me to a flash game that "I have to play", I tell them "no, I have better things to do with my time", because, honestly, there are about 3 original flash games out there, and all of them have iphone/ipod touch versions available. The remaining 90% of flash content on the web are ads, which means that not running flash gives better results than having ad-block.
Of the other languages out there, it is completely possible to set up a web page with, say, perl as a back-end that does everything your app would possibly need to do. It's a free way of programming on the iphone that enables you to bypass all of Apple's censorship.
Now, on the topic of "I don't care, it's the principle of the matter". If you honestly feel that way, then the iPhone is not the phone you want. Go get a Nexus One, it's open source, you can use whatever language you want - so long as it's java, and you won't have this problem.
Also, as Daring Fireball has already pointed out, the best iphone apps are written in C/C++/Objective-C. This is because they are native and not some crap cross-platform sdk.
Subscribe to:
Posts (Atom)